From 3b5a4a1c4cfc45fc3c92cbb6598acdf1882a6de1 Mon Sep 17 00:00:00 2001 From: jialbai Date: Thu, 2 Feb 2023 17:14:15 -0500 Subject: [PATCH 01/95] - qb1269: node tier change affect ozlimit --- proto/stratos/pot/v1/tx.proto | 5 + proto/stratos/register/v1/register.proto | 6 + x/pot/app_test.go | 7 +- x/pot/client/cli/flags.go | 32 ++- x/pot/client/cli/tx.go | 14 +- x/pot/client/rest/tx.go | 9 +- x/pot/keeper/msg_server.go | 10 +- x/pot/keeper/slashing.go | 49 ++-- x/pot/types/events.go | 19 +- x/pot/types/msg.go | 4 +- x/pot/types/tx.pb.go | 189 +++++++++------ x/register/genesis.go | 2 +- x/register/keeper/keeper.go | 14 +- x/register/keeper/meta_node.go | 4 +- x/register/keeper/msg_server.go | 2 +- x/register/keeper/resource_node.go | 9 +- x/register/types/events.go | 11 +- x/register/types/register.pb.go | 280 ++++++++++++++--------- x/register/types/resource_node.go | 19 +- x/sds/oz_price_test.go | 11 +- 20 files changed, 434 insertions(+), 262 deletions(-) diff --git a/proto/stratos/pot/v1/tx.proto b/proto/stratos/pot/v1/tx.proto index e8c324b7..8493fffe 100644 --- a/proto/stratos/pot/v1/tx.proto +++ b/proto/stratos/pot/v1/tx.proto @@ -144,6 +144,11 @@ message MsgSlashingResourceNode { (gogoproto.jsontag) = "suspend", (gogoproto.moretags) = "yaml:\"suspend\"" ]; + string effective_stake = 7 [ + (gogoproto.jsontag) = "effective_stake", + (gogoproto.moretags) = "yaml:\"effective_stake\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int" + ]; } // MsgSlashingResourceNodeResponse defines the Msg/MsgSlashingResourceNode response type. message MsgSlashingResourceNodeResponse {} \ No newline at end of file diff --git a/proto/stratos/register/v1/register.proto b/proto/stratos/register/v1/register.proto index 0a29ea10..e8b988cb 100644 --- a/proto/stratos/register/v1/register.proto +++ b/proto/stratos/register/v1/register.proto @@ -82,6 +82,12 @@ message ResourceNode { (gogoproto.jsontag) = "node_type", (gogoproto.moretags) = "yaml:\"node_type\"" ]; + string effective_tokens = 10 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "effective_tokens", + (gogoproto.moretags) = "yaml:\"effective_tokens\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int" + ]; } diff --git a/x/pot/app_test.go b/x/pot/app_test.go index cff6aa48..cd832e55 100644 --- a/x/pot/app_test.go +++ b/x/pot/app_test.go @@ -42,7 +42,8 @@ var ( paramSpecificMinedReward = sdk.NewCoins(stratos.NewCoinInt64(160000000000)) paramSpecificEpoch = sdk.NewInt(10) - resNodeSlashingNOZAmt1 = sdk.NewInt(1000000000000000000) + resNodeSlashingNOZAmt1 = sdk.NewInt(1000000000000000000) + resNodeSlashingEffectiveTokenAmt1 = sdk.NewInt(1000000000000000000) resourceNodeVolume1 = sdk.NewInt(500000) resourceNodeVolume2 = sdk.NewInt(300000) @@ -154,7 +155,7 @@ func setupSlashingMsg() *types.MsgSlashingResourceNode { reporters = append(reporters, idxNodeNetworkId1) reportOwner := make([]sdk.AccAddress, 0) reportOwner = append(reportOwner, idxOwner1) - slashingMsg := types.NewMsgSlashingResourceNode(reporters, reportOwner, resNodeNetworkId1, resOwner1, resNodeSlashingNOZAmt1, true) + slashingMsg := types.NewMsgSlashingResourceNode(reporters, reportOwner, resNodeNetworkId1, resOwner1, resNodeSlashingNOZAmt1, true, resNodeSlashingEffectiveTokenAmt1) return slashingMsg } @@ -408,7 +409,7 @@ func deductSlashingAmt(ctx sdk.Context, coins sdk.Coins, slashing sdk.Coin) (ret return ret } -//for main net +// for main net func checkResult(t *testing.T, ctx sdk.Context, k potKeeper.Keeper, accountKeeper authkeeper.AccountKeeper, diff --git a/x/pot/client/cli/flags.go b/x/pot/client/cli/flags.go index 7b194d53..15b2b73f 100644 --- a/x/pot/client/cli/flags.go +++ b/x/pot/client/cli/flags.go @@ -16,23 +16,24 @@ const ( FlagReporterOwner = "reporter-owner" FlagNetworkAddress = "network-address" FlagSlashing = "slashing" + FlagEffectiveStake = "effective-stake" FlagSuspend = "suspend" FlagBLSSignature = "bls-signature" ) var ( -//FsReporterAddr = flag.NewFlagSet("", flag.ContinueOnError) -//FsEpoch = flag.NewFlagSet("", flag.ContinueOnError) -//FsReportReference = flag.NewFlagSet("", flag.ContinueOnError) -//FsWalletVolumes = flag.NewFlagSet("", flag.ContinueOnError) -//FsAmount = flag.NewFlagSet("", flag.ContinueOnError) -//FsWalletAddress = flag.NewFlagSet("", flag.ContinueOnError) -//FsTargetAddress = flag.NewFlagSet("", flag.ContinueOnError) -//FsReporters = flag.NewFlagSet("", flag.ContinueOnError) -//FsReportOwner = flag.NewFlagSet("", flag.ContinueOnError) -//FsNetworkAddress = flag.NewFlagSet("", flag.ContinueOnError) -//FsSlashing = flag.NewFlagSet("", flag.ContinueOnError) -//FsSuspend = flag.NewFlagSet("", flag.ContinueOnError) +// FsReporterAddr = flag.NewFlagSet("", flag.ContinueOnError) +// FsEpoch = flag.NewFlagSet("", flag.ContinueOnError) +// FsReportReference = flag.NewFlagSet("", flag.ContinueOnError) +// FsWalletVolumes = flag.NewFlagSet("", flag.ContinueOnError) +// FsAmount = flag.NewFlagSet("", flag.ContinueOnError) +// FsWalletAddress = flag.NewFlagSet("", flag.ContinueOnError) +// FsTargetAddress = flag.NewFlagSet("", flag.ContinueOnError) +// FsReporters = flag.NewFlagSet("", flag.ContinueOnError) +// FsReportOwner = flag.NewFlagSet("", flag.ContinueOnError) +// FsNetworkAddress = flag.NewFlagSet("", flag.ContinueOnError) +// FsSlashing = flag.NewFlagSet("", flag.ContinueOnError) +// FsSuspend = flag.NewFlagSet("", flag.ContinueOnError) ) func init() { @@ -121,3 +122,10 @@ func flagSetSuspend() *flag.FlagSet { fs.Bool(FlagSuspend, false, "if the resource node is suspend") return fs } + +// flagSetFsSlashing Returns the FlagSet for slashing amount. +func flagSetEffectiveStake() *flag.FlagSet { + fs := flag.NewFlagSet("", flag.ContinueOnError) + fs.String(FlagEffectiveStake, "", "the amount of effective stake") + return fs +} diff --git a/x/pot/client/cli/tx.go b/x/pot/client/cli/tx.go index a0dc5346..06a3e200 100644 --- a/x/pot/client/cli/tx.go +++ b/x/pot/client/cli/tx.go @@ -2,6 +2,7 @@ package cli import ( "encoding/json" + "errors" "fmt" "strconv" @@ -379,6 +380,7 @@ func SlashingResourceNodeCmd() *cobra.Command { cmd.Flags().AddFlagSet(flagSetWalletAddress()) cmd.Flags().AddFlagSet(flagSetSlashing()) cmd.Flags().AddFlagSet(flagSetSuspend()) + cmd.Flags().AddFlagSet(flagSetEffectiveStake()) flags.AddTxFlagsToCmd(cmd) @@ -388,6 +390,7 @@ func SlashingResourceNodeCmd() *cobra.Command { _ = cmd.MarkFlagRequired(FlagWalletAddress) _ = cmd.MarkFlagRequired(FlagSlashing) _ = cmd.MarkFlagRequired(FlagSuspend) + _ = cmd.MarkFlagRequired(FlagEffectiveStake) _ = cmd.MarkFlagRequired(flags.FlagFrom) return cmd @@ -466,6 +469,15 @@ func buildSlashingResourceNodeMsg(clientCtx client.Context, txf tx.Factory, fs * return txf, nil, err } - msg := types.NewMsgSlashingResourceNode(reporters, reporterOwner, networkAddress, walletAddress, slashing, suspend) + flagEffectiveStakeStr, err := fs.GetString(FlagEffectiveStake) + if err != nil { + return txf, nil, err + } + effectiveStake, ok := sdk.NewIntFromString(flagEffectiveStakeStr) + if !ok { + return txf, nil, errors.New("invalid effective stake aount") + } + + msg := types.NewMsgSlashingResourceNode(reporters, reporterOwner, networkAddress, walletAddress, slashing, suspend, effectiveStake) return txf, msg, nil } diff --git a/x/pot/client/rest/tx.go b/x/pot/client/rest/tx.go index e54ea9bd..1f36ada5 100644 --- a/x/pot/client/rest/tx.go +++ b/x/pot/client/rest/tx.go @@ -14,7 +14,7 @@ import ( "github.com/stratosnet/stratos-chain/x/pot/types" ) -//registerTxRoutes registers pot-related REST Tx handlers to a router +// registerTxRoutes registers pot-related REST Tx handlers to a router func registerTxRoutes(cliCtx client.Context, r *mux.Router) { r.HandleFunc("/pot/volume_report", volumeReportRequestHandlerFn(cliCtx)).Methods("POST") r.HandleFunc("/pot/withdraw", withdrawPotRewardsHandlerFn(cliCtx)).Methods("POST") @@ -50,6 +50,7 @@ type ( WalletAddress sdk.AccAddress `json:"wallet_address" yaml:"wallet_address"` // wallet address of the pp node Slashing int64 `json:"slashing" yaml:"slashing"` Suspend bool `json:"suspend" yaml:"suspend"` + EffectiveStake string `json:"effective_stake" yaml:"effective_stake"` } ) @@ -230,8 +231,12 @@ func slashingResourceNodeHandlerFn(cliCtx client.Context) http.HandlerFunc { } slashing := sdk.NewInt(req.Slashing) + effectiveStake, ok := sdk.NewIntFromString(req.EffectiveStake) + if !ok { + return + } - msg := types.NewMsgSlashingResourceNode(req.Reporters, req.ReporterOwner, req.NetworkAddress, req.WalletAddress, slashing, req.Suspend) + msg := types.NewMsgSlashingResourceNode(req.Reporters, req.ReporterOwner, req.NetworkAddress, req.WalletAddress, slashing, req.Suspend, effectiveStake) if err := msg.ValidateBasic(); err != nil { rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) return diff --git a/x/pot/keeper/msg_server.go b/x/pot/keeper/msg_server.go index 91a32d7b..a429baa6 100644 --- a/x/pot/keeper/msg_server.go +++ b/x/pot/keeper/msg_server.go @@ -197,7 +197,12 @@ func (k msgServer) HandleMsgSlashingResourceNode(goCtx context.Context, msg *typ if !ok { return &types.MsgSlashingResourceNodeResponse{}, types.ErrInvalidAmount } - tokenAmt, nodeType, err := k.SlashingResourceNode(ctx, networkAddress, walletAddress, nozAmt, msg.Suspend) + + effectiveStakeAmt, ok := sdk.NewIntFromString(msg.EffectiveStake.String()) + if !ok { + return &types.MsgSlashingResourceNodeResponse{}, types.ErrInvalidAmount + } + tokenAmt, nodeType, isUnsuspendedDuringSlash, err := k.SlashingResourceNode(ctx, networkAddress, walletAddress, nozAmt, msg.Suspend, effectiveStakeAmt) if err != nil { return &types.MsgSlashingResourceNodeResponse{}, sdkerrors.Wrap(types.ErrSlashingResourceNodeFailure, err.Error()) } @@ -207,6 +212,9 @@ func (k msgServer) HandleMsgSlashingResourceNode(goCtx context.Context, msg *typ sdk.NewAttribute(types.AttributeKeyWalletAddress, msg.WalletAddress), sdk.NewAttribute(types.AttributeKeyNodeP2PAddress, msg.NetworkAddress), sdk.NewAttribute(types.AttributeKeyAmount, tokenAmt.String()), + sdk.NewAttribute(types.AttributeKeyEffectiveStake, msg.EffectiveStake.String()), + sdk.NewAttribute(types.AttributeKeyIsEffectiveStakeChanged, strconv.FormatBool(!effectiveStakeAmt.IsZero())), + sdk.NewAttribute(types.AttributeKeyIsUnsuspendedDuringSlash, strconv.FormatBool(isUnsuspendedDuringSlash)), sdk.NewAttribute(types.AttributeKeySlashingNodeType, nodeType.String()), sdk.NewAttribute(types.AttributeKeyNodeSuspended, strconv.FormatBool(msg.Suspend)), ), diff --git a/x/pot/keeper/slashing.go b/x/pot/keeper/slashing.go index c5e27ac6..82e3f14a 100644 --- a/x/pot/keeper/slashing.go +++ b/x/pot/keeper/slashing.go @@ -8,22 +8,37 @@ import ( ) /* - This function only record slashing amount. +This function only record slashing amount. - Deduct slashing amount when: - 1, calculate upcoming mature reward, deduct from mature_total & upcoming mature reward. - 2, unstaking meta node. - 3, unstaking resource node. +Deduct slashing amount when: +1, calculate upcoming mature reward, deduct from mature_total & upcoming mature reward. +2, unstaking meta node. +3, unstaking resource node. */ func (k Keeper) SlashingResourceNode(ctx sdk.Context, p2pAddr stratos.SdsAddress, walletAddr sdk.AccAddress, - nozAmt sdk.Int, suspend bool) (tokenAmt sdk.Int, nodeType registertypes.NodeType, err error) { + nozAmt sdk.Int, suspend bool, effectiveStakeAfter sdk.Int) (tokenAmt sdk.Int, nodeType registertypes.NodeType, unsuspended bool, err error) { node, ok := k.RegisterKeeper.GetResourceNode(ctx, p2pAddr) if !ok { - return sdk.ZeroInt(), registertypes.NodeType(0), registertypes.ErrNoResourceNodeFound + return sdk.ZeroInt(), registertypes.NodeType(0), false, registertypes.ErrNoResourceNodeFound } - toBeSuspended := node.Suspend == false && suspend == true + toBeUnsuspended := node.Suspend == true && suspend == false + + // before calc ozone limit change, get unbonding stake and calc effective stake to trigger ozLimit change + unbondingStake := k.RegisterKeeper.GetUnbondingNodeBalance(ctx, p2pAddr) + // no effective stake after subtracting unbonding stake + if node.Tokens.LTE(unbondingStake) { + return sdk.ZeroInt(), registertypes.NodeType(0), toBeUnsuspended, registertypes.ErrInsufficientBalance + } + availableStake := node.Tokens.Sub(unbondingStake) + if availableStake.LT(effectiveStakeAfter) { + return sdk.ZeroInt(), registertypes.NodeType(0), toBeUnsuspended, registertypes.ErrInsufficientBalance + } + + effectiveStakeBefore := node.EffectiveTokens + effectiveStakeChange := effectiveStakeAfter.Sub(effectiveStakeBefore) + node.Suspend = suspend //slashing amt is equivalent to reward traffic calculation @@ -42,20 +57,12 @@ func (k Keeper) SlashingResourceNode(ctx sdk.Context, p2pAddr stratos.SdsAddress k.RegisterKeeper.SetResourceNode(ctx, node) k.RegisterKeeper.SetSlashing(ctx, walletAddr, newSlashing) - // before calc ozone limit change, get unbonding stake and calc effective stake to trigger ozLimit change - unbondingStake := k.RegisterKeeper.GetUnbondingNodeBalance(ctx, p2pAddr) - stakeToMakeOzoneLimitChange := sdk.ZeroInt() - // no effective stake after subtracting unbonding stake - if node.Tokens.LTE(unbondingStake) { - return sdk.ZeroInt(), registertypes.NodeType(0), registertypes.ErrInsufficientBalance - } - stakeToMakeOzoneLimitChange = node.Tokens.Sub(unbondingStake) - if toBeSuspended { - k.RegisterKeeper.DecreaseOzoneLimitBySubtractStake(ctx, stakeToMakeOzoneLimitChange) + if effectiveStakeChange.IsNegative() { + k.RegisterKeeper.DecreaseOzoneLimitBySubtractStake(ctx, effectiveStakeChange) } - if toBeUnsuspended { - k.RegisterKeeper.IncreaseOzoneLimitByAddStake(ctx, stakeToMakeOzoneLimitChange) + if effectiveStakeChange.IsPositive() { + k.RegisterKeeper.IncreaseOzoneLimitByAddStake(ctx, effectiveStakeChange) } - return slashTokenAmt.TruncateInt(), registertypes.NodeType(node.NodeType), nil + return slashTokenAmt.TruncateInt(), registertypes.NodeType(node.NodeType), toBeUnsuspended, nil } diff --git a/x/pot/types/events.go b/x/pot/types/events.go index db7d245e..987cc951 100644 --- a/x/pot/types/events.go +++ b/x/pot/types/events.go @@ -8,14 +8,17 @@ const ( EventTypeFoundationDeposit = "foundation_deposit" EventTypeSlashing = "slashing" - AttributeKeyEpoch = "epoch" - AttributeKeyReportReference = "report_reference" - AttributeKeyAmount = "amount" - AttributeKeyWalletAddress = "wallet_address" - AttributeKeyLegacyWalletAddress = "legacy_wallet_address" - AttributeKeyNodeP2PAddress = "p2p_address" - AttributeKeySlashingNodeType = "slashing_type" - AttributeKeyNodeSuspended = "suspend" + AttributeKeyEpoch = "epoch" + AttributeKeyReportReference = "report_reference" + AttributeKeyAmount = "amount" + AttributeKeyIsEffectiveStakeChanged = "is_effective_stake_changed" + AttributeKeyIsUnsuspendedDuringSlash = "is_unsuspended_during_slash" + AttributeKeyEffectiveStake = "effective_stake" + AttributeKeyWalletAddress = "wallet_address" + AttributeKeyLegacyWalletAddress = "legacy_wallet_address" + AttributeKeyNodeP2PAddress = "p2p_address" + AttributeKeySlashingNodeType = "slashing_type" + AttributeKeyNodeSuspended = "suspend" AttributeValueCategory = ModuleName ) diff --git a/x/pot/types/msg.go b/x/pot/types/msg.go index f1957636..27cb84fe 100644 --- a/x/pot/types/msg.go +++ b/x/pot/types/msg.go @@ -255,7 +255,8 @@ func (msg MsgFoundationDeposit) ValidateBasic() error { } func NewMsgSlashingResourceNode(reporters []stratos.SdsAddress, reporterOwner []sdk.AccAddress, - networkAddress stratos.SdsAddress, walletAddress sdk.AccAddress, slashing sdk.Int, suspend bool) *MsgSlashingResourceNode { + networkAddress stratos.SdsAddress, walletAddress sdk.AccAddress, slashing sdk.Int, suspend bool, + newEffectiveStake sdk.Int) *MsgSlashingResourceNode { reporterStrSlice := make([]string, 0) for _, reporter := range reporters { @@ -273,6 +274,7 @@ func NewMsgSlashingResourceNode(reporters []stratos.SdsAddress, reporterOwner [] WalletAddress: walletAddress.String(), Slashing: &slashing, Suspend: suspend, + EffectiveStake: &newEffectiveStake, } } diff --git a/x/pot/types/tx.pb.go b/x/pot/types/tx.pb.go index 94df02fc..770bc9f3 100644 --- a/x/pot/types/tx.pb.go +++ b/x/pot/types/tx.pb.go @@ -440,6 +440,7 @@ type MsgSlashingResourceNode struct { WalletAddress string `protobuf:"bytes,4,opt,name=wallet_address,json=walletAddress,proto3" json:"wallet_address" yaml:"wallet_address"` Slashing *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,5,opt,name=slashing,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"slashing" yaml:"slashing"` Suspend bool `protobuf:"varint,6,opt,name=suspend,proto3" json:"suspend" yaml:"suspend"` + EffectiveStake *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,7,opt,name=effective_stake,json=effectiveStake,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"effective_stake" yaml:"effective_stake"` } func (m *MsgSlashingResourceNode) Reset() { *m = MsgSlashingResourceNode{} } @@ -563,73 +564,75 @@ func init() { func init() { proto.RegisterFile("stratos/pot/v1/tx.proto", fileDescriptor_103c258cace119ca) } var fileDescriptor_103c258cace119ca = []byte{ - // 1042 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x56, 0xcf, 0x6f, 0xdc, 0x44, - 0x14, 0x8e, 0xf3, 0x8b, 0x64, 0xd2, 0x4d, 0x5a, 0x93, 0x90, 0xcd, 0xb6, 0xd9, 0x49, 0x86, 0xd2, - 0xa6, 0x94, 0xd8, 0x4a, 0x38, 0x20, 0xc1, 0x01, 0xb1, 0x45, 0x88, 0x88, 0x04, 0x24, 0x47, 0x6a, - 0x45, 0x2f, 0x2b, 0x67, 0x3d, 0x71, 0xac, 0x7a, 0x67, 0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, 0xfa, 0x1a, 0xfb, 0x87, 0x87, 0x45, 0xcc, 0x1e, 0x39, - 0xa6, 0x8d, 0x3b, 0x99, 0x80, 0x95, 0xa3, 0x98, 0xf5, 0x53, 0x73, 0x01, 0x97, 0x55, 0xcd, 0x21, - 0x18, 0x79, 0x57, 0x06, 0x93, 0xd1, 0x1a, 0x58, 0x2d, 0x0d, 0x91, 0x87, 0x59, 0x42, 0x09, 0xc3, - 0xe8, 0x87, 0x49, 0xb0, 0x70, 0xc0, 0xc2, 0x07, 0x11, 0x3f, 0x09, 0x52, 0xbf, 0x6b, 0x7f, 0x01, - 0x66, 0xfd, 0x36, 0xed, 0x10, 0xae, 0x87, 0x6a, 0xcd, 0x51, 0xef, 0xc4, 0xe9, 0x4d, 0xa8, 0xa3, - 0x27, 0xd4, 0xb9, 0x47, 0x23, 0xd2, 0xf8, 0xe4, 0x99, 0x80, 0x13, 0x99, 0x80, 0x3a, 0x21, 0x17, - 0xb0, 0xa2, 0xbc, 0xa8, 0x33, 0xfa, 0xfe, 0x17, 0xb8, 0x75, 0x89, 0x57, 0xdc, 0xd3, 0x62, 0x9e, - 0x16, 0xe9, 0x35, 0x5c, 0x8f, 0xa1, 0x1f, 0x04, 0x29, 0x66, 0x4c, 0x8f, 0xda, 0xe0, 0xe0, 0x6a, - 0x66, 0x64, 0x70, 0x35, 0x6e, 0x06, 0xf7, 0x03, 0x75, 0xee, 0x69, 0x72, 0x3f, 0x0d, 0x07, 0x34, - 0xa7, 0xfa, 0x9a, 0xc3, 0x4c, 0x5f, 0x73, 0x18, 0x47, 0x5e, 0x45, 0x01, 0x5a, 0x13, 0xad, 0x80, - 0x57, 0x07, 0xda, 0x66, 0xda, 0xf9, 0xcd, 0x24, 0xb8, 0x76, 0xc0, 0xc2, 0x7d, 0x1c, 0xfa, 0xad, - 0xb3, 0xff, 0x4c, 0x53, 0xef, 0x82, 0xe9, 0xe3, 0x94, 0xb6, 0x75, 0x2b, 0x57, 0x33, 0x01, 0xe5, - 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99, 0xea, 0xb4, 0x26, 0xa1, 0x01, 0x6e, - 0xec, 0x3d, 0x3b, 0xaf, 0x5b, 0xcf, 0xcf, 0xeb, 0xd6, 0xaf, 0xe7, 0x75, 0xeb, 0xc9, 0x45, 0x7d, - 0xe2, 0xf9, 0x45, 0x7d, 0xe2, 0xa7, 0x8b, 0xfa, 0xc4, 0x43, 0x77, 0xe0, 0xc2, 0x6a, 0x2d, 0x82, - 0x79, 0xf1, 0xef, 0x76, 0xeb, 0xc4, 0x8f, 0x88, 0xfb, 0x58, 0xca, 0xcb, 0xdb, 0x7b, 0x34, 0x2b, - 0x7f, 0x25, 0xbf, 0xfd, 0x67, 0x00, 0x00, 0x00, 0xff, 0xff, 0x94, 0xd2, 0xe4, 0xc8, 0xbe, 0x0b, - 0x00, 0x00, + // 1077 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x56, 0xcf, 0x6f, 0x1b, 0x45, + 0x14, 0xce, 0xe6, 0x57, 0x93, 0x49, 0xed, 0xb4, 0x4b, 0x42, 0x1c, 0xb7, 0xf1, 0x24, 0x43, 0x69, + 0x53, 0x4a, 0x76, 0x95, 0x70, 0x40, 0x82, 0x03, 0xc2, 0x45, 0x88, 0x88, 0x04, 0xa4, 0xb5, 0xd4, + 0x88, 0x5e, 0xac, 0x8d, 0x3d, 0xde, 0xac, 0x62, 0xcf, 0xac, 0x76, 0xc6, 0x76, 0x73, 0x41, 0x88, + 0x13, 0xc7, 0x4a, 0x70, 0xe4, 0x1f, 0x80, 0x3b, 0x7f, 0x41, 0x2f, 0x3d, 0x56, 0xe2, 0x82, 0x38, + 0x0c, 0x28, 0x41, 0x42, 0xf2, 0x71, 0xef, 0x48, 0xc8, 0x33, 0xb3, 0x63, 0x7b, 0x6d, 0x68, 0xaa, + 0x0a, 0x89, 0x9e, 0x92, 0xf9, 0xbe, 0xf7, 0xbe, 0xf7, 0xf9, 0xed,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2f, 0x59, 0xbf, 0x9f, 0x97, 0xac, + 0xc7, 0x17, 0xa5, 0xa9, 0x67, 0x17, 0xa5, 0xa9, 0x5f, 0x2e, 0x4a, 0x53, 0x0f, 0xdd, 0xa1, 0xbb, + 0xa8, 0xb5, 0x08, 0xe6, 0xe9, 0xbf, 0x3b, 0xb5, 0x13, 0x3f, 0x24, 0xee, 0x23, 0x29, 0x2f, 0x2f, + 0xe6, 0xf1, 0xbc, 0xfc, 0x50, 0x7f, 0xe7, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0x9f, 0x88, 0x12, + 0x28, 0x41, 0x0c, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1196,6 +1199,18 @@ func (m *MsgSlashingResourceNode) MarshalToSizedBuffer(dAtA []byte) (int, error) _ = i var l int _ = l + if m.EffectiveStake != nil { + { + size := m.EffectiveStake.Size() + i -= size + if _, err := m.EffectiveStake.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + } if m.Suspend { i-- if m.Suspend { @@ -1456,6 +1471,10 @@ func (m *MsgSlashingResourceNode) Size() (n int) { if m.Suspend { n += 2 } + if m.EffectiveStake != nil { + l = m.EffectiveStake.Size() + n += 1 + l + sovTx(uint64(l)) + } return n } @@ -2551,6 +2570,42 @@ func (m *MsgSlashingResourceNode) Unmarshal(dAtA []byte) error { } } m.Suspend = bool(v != 0) + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EffectiveStake", 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 + } + var v github_com_cosmos_cosmos_sdk_types.Int + m.EffectiveStake = &v + if err := m.EffectiveStake.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) diff --git a/x/register/genesis.go b/x/register/genesis.go index dbd01c3c..adadd624 100644 --- a/x/register/genesis.go +++ b/x/register/genesis.go @@ -29,7 +29,7 @@ func InitGenesis(ctx sdk.Context, keeper keeper.Keeper, data *types.GenesisState case stakingtypes.Bonded: lenOfGenesisBondedResourceNode++ if !resourceNode.Suspend { - initialStakeTotal = initialStakeTotal.Add(resourceNode.Tokens) + initialStakeTotal = initialStakeTotal.Add(resourceNode.EffectiveTokens) } if freshStart { err = keeper.SendCoinsFromAccountToResNodeBondedPool(ctx, ownerAddr, sdk.NewCoin(keeper.BondDenom(ctx), resourceNode.Tokens)) diff --git a/x/register/keeper/keeper.go b/x/register/keeper/keeper.go index 03142eae..25c2222d 100644 --- a/x/register/keeper/keeper.go +++ b/x/register/keeper/keeper.go @@ -384,11 +384,21 @@ func (k Keeper) UnbondResourceNode( // check if node_token - unbonding_token > amt_to_unbond unbondingStake := k.GetUnbondingNodeBalance(ctx, networkAddr) + availableStake := resourceNode.Tokens.Sub(unbondingStake) if availableStake.LT(amt) { return sdk.ZeroInt(), time.Time{}, types.ErrInsufficientBalance } + // check if 0 < (node_token - unbonding_token - amt_to_unbond) < effective_token, + // if true, tier downgrade needs to be triggered + // if availableStakeAfterUnbond == effectiveTokens, no tier change will happened + // if availableStakeAfterUnbond == 0, node will be removed + //effectiveTokens := resourceNode.EffectiveTokens + //availableStakeAfterUnbond := resourceNode.Tokens.Sub(unbondingStake).Sub(amt) + //needUpdateTier := availableStakeAfterUnbond.LT(effectiveTokens) && + // availableStakeAfterUnbond.GT(sdk.ZeroInt()) + if k.HasMaxUnbondingNodeEntries(ctx, networkAddr) { return sdk.ZeroInt(), time.Time{}, types.ErrMaxUnbondingNodeEntries } @@ -399,8 +409,8 @@ func (k Keeper) UnbondResourceNode( if resourceNode.GetStatus() == stakingtypes.Bonded { // transfer the node tokens to the not bonded pool k.bondedToUnbonding(ctx, resourceNode, false, coin) - // adjust ozone limit - ozoneLimitChange = k.DecreaseOzoneLimitBySubtractStake(ctx, amt) + // not adjusting ozone limit since resourceNode.EffectiveTokens are not changed + //ozoneLimitChange = k.DecreaseOzoneLimitBySubtractStake(ctx, amt) } // change node status to unbonding if unbonding all available tokens diff --git a/x/register/keeper/meta_node.go b/x/register/keeper/meta_node.go index fff9fa29..f059fe29 100644 --- a/x/register/keeper/meta_node.go +++ b/x/register/keeper/meta_node.go @@ -72,7 +72,7 @@ func (k Keeper) SetMetaNode(ctx sdk.Context, metaNode types.MetaNode) { } // GetAllMetaNodes get the set of all meta nodes with no limits, used during genesis dump -//Iteration for all meta nodes +// Iteration for all meta nodes func (k Keeper) GetAllMetaNodes(ctx sdk.Context) (metaNodes types.MetaNodes) { store := ctx.KVStore(k.storeKey) iterator := sdk.KVStorePrefixIterator(store, types.MetaNodeKey) @@ -348,6 +348,8 @@ func (k Keeper) HandleVoteForMetaNodeRegistration(ctx sdk.Context, nodeAddr stra node.Status = stakingtypes.Bonded node.Suspend = false k.SetMetaNode(ctx, node) + // increase ozone limit after vote is approved + _ = k.IncreaseOzoneLimitByAddStake(ctx, node.Tokens) // increase mata node count v := k.GetBondedMetaNodeCnt(ctx) count := v.Add(sdk.NewInt(1)) diff --git a/x/register/keeper/msg_server.go b/x/register/keeper/msg_server.go index 8d6ea4bc..711b5cd0 100644 --- a/x/register/keeper/msg_server.go +++ b/x/register/keeper/msg_server.go @@ -158,7 +158,7 @@ func (k msgServer) HandleMsgRemoveResourceNode(goCtx context.Context, msg *types sdk.NewAttribute(sdk.AttributeKeySender, msg.OwnerAddress), sdk.NewAttribute(types.AttributeKeyResourceNode, msg.ResourceNodeAddress), sdk.NewAttribute(types.AttributeKeyOZoneLimitChanges, ozoneLimitChange.Neg().String()), - sdk.NewAttribute(types.AttributeKeyStakeToRemove, sdk.NewCoin(k.BondDenom(ctx), resourceNode.Tokens).String()), + sdk.NewAttribute(types.AttributeKeyStakeToRemove, sdk.NewCoin(k.BondDenom(ctx), availableStake).String()), sdk.NewAttribute(types.AttributeKeyUnbondingMatureTime, completionTime.Format(time.RFC3339)), ), sdk.NewEvent( diff --git a/x/register/keeper/resource_node.go b/x/register/keeper/resource_node.go index 91731066..b99e929d 100644 --- a/x/register/keeper/resource_node.go +++ b/x/register/keeper/resource_node.go @@ -169,14 +169,7 @@ func (k Keeper) AddResourceNodeStake(ctx sdk.Context, resourceNode types.Resourc k.SetBondedResourceNodeCnt(ctx, count) } - if !resourceNode.Suspend { - ozoneLimitChange = k.IncreaseOzoneLimitByAddStake(ctx, tokenToAdd.Amount) - } else { - // if node is currently suspended, ozone limit will be increased upon unsuspension instead of NOW - ozoneLimitChange = sdk.ZeroInt() - } - - return ozoneLimitChange, nil + return sdk.ZeroInt(), nil } func (k Keeper) RemoveTokenFromPoolWhileUnbondingResourceNode(ctx sdk.Context, resourceNode types.ResourceNode, tokenToSub sdk.Coin) error { diff --git a/x/register/types/events.go b/x/register/types/events.go index 5cdc7957..4af85db9 100644 --- a/x/register/types/events.go +++ b/x/register/types/events.go @@ -28,11 +28,12 @@ const ( AttributeKeyUnbondingMatureTime = "unbonding_mature_time" - AttributeKeyOZoneLimitChanges = "ozone_limit_changes" - AttributeKeyInitialStake = "initial_stake" - AttributeKeyStakeDelta = "stake_delta" - AttributeKeyStakeToRemove = "stake_to_remove" - AttributeKeyIncrStakeBool = "incr_stake" + AttributeKeyOZoneLimitChanges = "ozone_limit_changes" + AttributeKeyInitialStake = "initial_stake" + AttributeKeyStakeDelta = "stake_delta" + AttributeKeyStakeToRemove = "stake_to_remove" + AttributeKeyIncrStakeBool = "incr_stake" + AttributeKeyNeedUpdateTierBool = "need_update_tier" AttributeValueCategory = ModuleName ) diff --git a/x/register/types/register.pb.go b/x/register/types/register.pb.go index 7c4e1e0d..132e414e 100644 --- a/x/register/types/register.pb.go +++ b/x/register/types/register.pb.go @@ -111,15 +111,16 @@ func (m *Params) GetResourceNodeRegEnabled() bool { } type ResourceNode struct { - NetworkAddress string `protobuf:"bytes,1,opt,name=network_address,json=networkAddress,proto3" json:"network_address" yaml:"network_address"` - Pubkey *types.Any `protobuf:"bytes,2,opt,name=pubkey,proto3" json:"pubkey" yaml:"pubkey"` - Suspend bool `protobuf:"varint,3,opt,name=suspend,proto3" json:"suspend" yaml:"suspend"` - Status types1.BondStatus `protobuf:"varint,4,opt,name=status,proto3,enum=cosmos.staking.v1beta1.BondStatus" json:"status" yaml:"status"` - Tokens github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,5,opt,name=tokens,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"tokens" yaml:"tokens"` - OwnerAddress string `protobuf:"bytes,6,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address" yaml:"owner_address"` - Description *Description `protobuf:"bytes,7,opt,name=description,proto3" json:"description" yaml:"description"` - CreationTime time.Time `protobuf:"bytes,8,opt,name=creation_time,json=creationTime,proto3,stdtime" json:"creation_time" yaml:"creation_time"` - NodeType uint32 `protobuf:"varint,9,opt,name=node_type,json=nodeType,proto3" json:"node_type" yaml:"node_type"` + NetworkAddress string `protobuf:"bytes,1,opt,name=network_address,json=networkAddress,proto3" json:"network_address" yaml:"network_address"` + Pubkey *types.Any `protobuf:"bytes,2,opt,name=pubkey,proto3" json:"pubkey" yaml:"pubkey"` + Suspend bool `protobuf:"varint,3,opt,name=suspend,proto3" json:"suspend" yaml:"suspend"` + Status types1.BondStatus `protobuf:"varint,4,opt,name=status,proto3,enum=cosmos.staking.v1beta1.BondStatus" json:"status" yaml:"status"` + Tokens github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,5,opt,name=tokens,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"tokens" yaml:"tokens"` + OwnerAddress string `protobuf:"bytes,6,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address" yaml:"owner_address"` + Description *Description `protobuf:"bytes,7,opt,name=description,proto3" json:"description" yaml:"description"` + CreationTime time.Time `protobuf:"bytes,8,opt,name=creation_time,json=creationTime,proto3,stdtime" json:"creation_time" yaml:"creation_time"` + NodeType uint32 `protobuf:"varint,9,opt,name=node_type,json=nodeType,proto3" json:"node_type" yaml:"node_type"` + EffectiveTokens github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,10,opt,name=effective_tokens,json=effectiveTokens,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"effective_tokens" yaml:"effective_tokens"` } func (m *ResourceNode) Reset() { *m = ResourceNode{} } @@ -892,111 +893,113 @@ func init() { } var fileDescriptor_fef1e3aeec8499d6 = []byte{ - // 1658 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0x4f, 0x6f, 0x1b, 0xc7, - 0x15, 0x37, 0x49, 0x5b, 0x22, 0x87, 0x14, 0xe5, 0xae, 0x15, 0x9b, 0x72, 0x53, 0x8d, 0x32, 0x4d, - 0x1b, 0x15, 0xa9, 0x48, 0xc8, 0x2e, 0x50, 0x34, 0x87, 0x02, 0x5e, 0x5b, 0x75, 0x9d, 0x34, 0x86, - 0xb1, 0x52, 0x13, 0xa0, 0x40, 0xb0, 0x1d, 0xee, 0x4e, 0xa8, 0x89, 0xb8, 0x33, 0xc4, 0xce, 0x50, - 0x12, 0x6f, 0x05, 0x72, 0xe9, 0xad, 0x3e, 0xe6, 0x68, 0xf4, 0x33, 0x14, 0xe8, 0x27, 0x28, 0x60, - 0xe4, 0x94, 0x63, 0xd1, 0xc3, 0xb6, 0xb0, 0x2f, 0x05, 0x8f, 0x5b, 0xa0, 0xe7, 0x62, 0x67, 0x66, - 0x77, 0x87, 0x2b, 0x19, 0x84, 0xdb, 0xfa, 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, 0x9a, 0xdb, 0xf5, 0x8d, 0xdd, 0xac, 0xe7, 0x6e, - 0x81, 0xfa, 0x7f, 0x76, 0x0b, 0x7c, 0x96, 0xcf, 0x79, 0x3a, 0x1c, 0x0f, 0x5f, 0xe3, 0x15, 0xf7, - 0x01, 0x09, 0x96, 0x4d, 0x85, 0xee, 0xe3, 0xe7, 0x2f, 0xb6, 0x6a, 0xdf, 0xbc, 0xd8, 0xaa, 0xfd, - 0xed, 0xc5, 0x56, 0xed, 0xe9, 0xcb, 0xad, 0x2b, 0xdf, 0xbc, 0xdc, 0xba, 0xf2, 0xe7, 0x97, 0x5b, - 0x57, 0x7e, 0xf5, 0x23, 0xcb, 0x83, 0x29, 0x2a, 0x46, 0x64, 0xfe, 0x77, 0x37, 0x38, 0xc2, 0x94, - 0x0d, 0xce, 0xca, 0x4f, 0xec, 0xca, 0xe7, 0x70, 0x45, 0xe5, 0xe7, 0xdd, 0x7f, 0x05, 0x00, 0x00, - 0xff, 0xff, 0x87, 0x6a, 0x97, 0x10, 0x83, 0x17, 0x00, 0x00, + // 1690 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0x4f, 0x6f, 0x1c, 0xb7, + 0x15, 0xf7, 0x6a, 0x6d, 0x69, 0xc5, 0x5d, 0xfd, 0xe9, 0x58, 0xb1, 0x25, 0x37, 0x15, 0x15, 0x36, + 0x6d, 0x54, 0xa4, 0xda, 0x85, 0xec, 0x02, 0x45, 0x73, 0x28, 0xe0, 0xb1, 0x55, 0xd7, 0x49, 0x63, + 0x18, 0xb4, 0x9a, 0x00, 0x05, 0x8c, 0x29, 0x77, 0x86, 0x5e, 0x31, 0xda, 0x21, 0x17, 0x43, 0xae, + 0xac, 0xbd, 0x15, 0xc8, 0x25, 0xb7, 0xfa, 0x98, 0xa3, 0xd1, 0xcf, 0xd0, 0x4f, 0x50, 0xa0, 0x80, + 0x91, 0x93, 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0x12, 0xfe, 0x35, 0x85, 0x3f, 0x1c, 0x30, 0x75, 0x34, 0xee, 0x77, + 0x43, 0x11, 0xdb, 0xe6, 0x60, 0x7f, 0xf6, 0x64, 0x74, 0xdc, 0x53, 0x93, 0x11, 0x95, 0xdd, 0xbb, + 0x5c, 0xe5, 0x2e, 0x8c, 0x7d, 0xe5, 0xc2, 0xac, 0x11, 0xb6, 0x02, 0xef, 0x1e, 0x58, 0x11, 0x8f, + 0x39, 0x4d, 0xca, 0x68, 0x2d, 0x6a, 0x4f, 0x3f, 0x9a, 0xa6, 0x70, 0x56, 0x90, 0xa5, 0x70, 0xc3, + 0x50, 0xcc, 0xc0, 0x08, 0x77, 0xf4, 0xba, 0x88, 0x13, 0x03, 0xed, 0x88, 0xca, 0x30, 0x61, 0xa3, + 0x3c, 0xad, 0x37, 0x97, 0x74, 0xb0, 0x76, 0xba, 0xaf, 0x68, 0xab, 0xdd, 0xdb, 0x95, 0x9e, 0xff, + 0x83, 0x3c, 0xcb, 0x1d, 0xc3, 0x2c, 0x85, 0x9e, 0xf1, 0xe6, 0x80, 0x08, 0xbb, 0x2a, 0x5e, 0x02, + 0x56, 0xc2, 0x84, 0x92, 0xaa, 0x88, 0x5b, 0xda, 0xd9, 0xb5, 0x33, 0x99, 0x71, 0x58, 0x74, 0x5f, + 0x7f, 0xdf, 0x56, 0xf1, 0xac, 0x61, 0x75, 0xb4, 0x19, 0x18, 0x3d, 0xc9, 0xab, 0xb5, 0x53, 0x60, + 0xba, 0x44, 0x7f, 0x0e, 0x96, 0x75, 0x71, 0xe4, 0xcf, 0x78, 0x73, 0x59, 0x17, 0xe8, 0x7b, 0xd3, + 0x14, 0x56, 0x60, 0x96, 0xc2, 0x75, 0x9b, 0xd2, 0x05, 0x84, 0x70, 0x2b, 0xff, 0x7f, 0x38, 0x19, + 0x51, 0xef, 0xab, 0x06, 0x58, 0xa7, 0x8f, 0x1e, 0xd1, 0x50, 0xb1, 0x13, 0x1a, 0xd8, 0xe0, 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, 0x42, 0xe4, 0x1d, 0x80, 0x16, 0x8b, 0x28, 0x57, 0x4c, + 0x99, 0xa6, 0x62, 0xb2, 0xbe, 0xc4, 0xb2, 0x14, 0x6e, 0x19, 0xd3, 0x02, 0x71, 0xc7, 0xa4, 0x52, + 0xcd, 0xbb, 0x09, 0x96, 0x1e, 0xd3, 0xbe, 0x64, 0xca, 0x8c, 0x81, 0x26, 0x14, 0x05, 0x94, 0xa5, + 0x70, 0xd3, 0x90, 0x58, 0xc0, 0xe5, 0x28, 0x94, 0xbc, 0x08, 0xac, 0x4b, 0x1a, 0x8e, 0x13, 0xa6, + 0x26, 0x41, 0x28, 0xb8, 0x22, 0xa1, 0xd2, 0xcf, 0x70, 0xd9, 0xff, 0x59, 0xde, 0xa7, 0xeb, 0xb2, + 0x2c, 0x85, 0xef, 0xd9, 0x86, 0x51, 0x93, 0xb8, 0xec, 0x6b, 0x85, 0xf0, 0x96, 0x91, 0xe5, 0x1b, + 0x8d, 0xa8, 0x22, 0x6c, 0x58, 0xb4, 0x13, 0xbd, 0x51, 0x0b, 0x55, 0x1b, 0xb5, 0xc0, 0xcc, 0x46, + 0x2d, 0xe6, 0xa4, 0xff, 0xef, 0x1b, 0xa0, 0xf5, 0x60, 0x48, 0xe4, 0x11, 0xe3, 0x03, 0x0f, 0x83, + 0xd5, 0xc7, 0x64, 0x38, 0xa4, 0xaa, 0x96, 0xe9, 0x1f, 0x4e, 0x53, 0x58, 0x93, 0x64, 0x29, 0x7c, + 0xc7, 0x3e, 0x90, 0x19, 0x1c, 0xe1, 0x15, 0x03, 0x14, 0x69, 0xde, 0x03, 0x97, 0x4e, 0xc8, 0x70, + 0x6c, 0xc6, 0xff, 0xa6, 0xbf, 0x35, 0x4d, 0xa1, 0x01, 0xb2, 0x14, 0x76, 0x0c, 0x83, 0x5e, 0x22, + 0x6c, 0x60, 0xf4, 0x87, 0x26, 0xb8, 0x7c, 0x28, 0x14, 0x19, 0x3e, 0x50, 0xe4, 0x98, 0x4a,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0x64, 0x48, 0x78, 0x58, 0x4c, + 0x6b, 0x9f, 0xbf, 0x51, 0x93, 0xac, 0x93, 0x54, 0x47, 0xaf, 0x09, 0x10, 0x5e, 0xb5, 0x88, 0x6f, + 0x00, 0x8f, 0x80, 0xa5, 0xc2, 0xb3, 0x99, 0xed, 0xee, 0xbc, 0x91, 0xe7, 0xa5, 0xca, 0xa3, 0x0d, + 0x66, 0xe9, 0xa9, 0x10, 0xa1, 0x27, 0x0b, 0x60, 0xc9, 0xde, 0xae, 0x6f, 0xed, 0x66, 0x3d, 0x73, + 0x0b, 0x2c, 0xfc, 0x77, 0xb7, 0xc0, 0xc3, 0x62, 0xce, 0x33, 0xe1, 0xb8, 0xf3, 0x06, 0xaf, 0xb8, + 0xb7, 0x69, 0x38, 0x6f, 0x2a, 0xf4, 0xef, 0x3d, 0x7b, 0xb1, 0xdd, 0x78, 0xfe, 0x62, 0xbb, 0xf1, + 0xf7, 0x17, 0xdb, 0x8d, 0x27, 0x2f, 0xb7, 0x2f, 0x3c, 0x7f, 0xb9, 0x7d, 0xe1, 0x2f, 0x2f, 0xb7, + 0x2f, 0xfc, 0xe6, 0x27, 0x8e, 0x07, 0x5b, 0x54, 0x9c, 0xaa, 0xe2, 0xef, 0x5e, 0x78, 0x44, 0x18, + 0xef, 0x9d, 0x56, 0x5f, 0xfb, 0xb5, 0xcf, 0xfe, 0xa2, 0xce, 0xcf, 0x1b, 0xff, 0x0e, 0x00, 0x00, + 0xff, 0xff, 0x5a, 0x62, 0xf7, 0x39, 0x0e, 0x18, 0x00, 0x00, } func (this *ResourceNode) Equal(that interface{}) bool { @@ -1045,6 +1048,9 @@ func (this *ResourceNode) Equal(that interface{}) bool { if this.NodeType != that1.NodeType { return false } + if !this.EffectiveTokens.Equal(that1.EffectiveTokens) { + return false + } return true } func (this *MetaNode) Equal(that interface{}) bool { @@ -1209,6 +1215,16 @@ func (m *ResourceNode) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + { + size := m.EffectiveTokens.Size() + i -= size + if _, err := m.EffectiveTokens.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintRegister(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x52 if m.NodeType != 0 { i = encodeVarintRegister(dAtA, i, uint64(m.NodeType)) i-- @@ -1981,6 +1997,8 @@ func (m *ResourceNode) Size() (n int) { if m.NodeType != 0 { n += 1 + sovRegister(uint64(m.NodeType)) } + l = m.EffectiveTokens.Size() + n += 1 + l + sovRegister(uint64(l)) return n } @@ -2718,6 +2736,40 @@ func (m *ResourceNode) Unmarshal(dAtA []byte) error { break } } + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EffectiveTokens", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRegister + } + 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 ErrInvalidLengthRegister + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRegister + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.EffectiveTokens.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipRegister(dAtA[iNdEx:]) diff --git a/x/register/types/resource_node.go b/x/register/types/resource_node.go index e2be33c3..028dfe45 100644 --- a/x/register/types/resource_node.go +++ b/x/register/types/resource_node.go @@ -79,15 +79,16 @@ func NewResourceNode(networkAddr stratos.SdsAddress, pubKey cryptotypes.PubKey, return ResourceNode{}, err } return ResourceNode{ - NetworkAddress: networkAddr.String(), - Pubkey: pkAny, - Suspend: true, - Status: stakingtypes.Unbonded, - Tokens: sdk.ZeroInt(), - OwnerAddress: ownerAddr.String(), - Description: description, - NodeType: uint32(nodeType), - CreationTime: creationTime, + NetworkAddress: networkAddr.String(), + Pubkey: pkAny, + Suspend: true, + Status: stakingtypes.Unbonded, + Tokens: sdk.ZeroInt(), + OwnerAddress: ownerAddr.String(), + Description: description, + NodeType: uint32(nodeType), + CreationTime: creationTime, + EffectiveTokens: sdk.ZeroInt(), }, nil } diff --git a/x/sds/oz_price_test.go b/x/sds/oz_price_test.go index ed816c41..d29d8132 100644 --- a/x/sds/oz_price_test.go +++ b/x/sds/oz_price_test.go @@ -53,7 +53,8 @@ var ( paramSpecificMinedReward = sdk.NewCoins(stratos.NewCoinInt64(160000000000)) paramSpecificEpoch = sdk.NewInt(10) - resNodeSlashingNOZAmt1 = sdk.NewInt(100000000000) + resNodeSlashingNOZAmt1 = sdk.NewInt(100000000000) + resNodeSlashingEffectiveTokenAmt1 = sdk.NewInt(1000000000000000000) resourceNodeVolume1 = sdk.NewInt(537500000000) resourceNodeVolume2 = sdk.NewInt(200000000000) @@ -601,7 +602,7 @@ func setupSlashingMsg() *pottypes.MsgSlashingResourceNode { reporters = append(reporters, idxNodeNetworkId1) reportOwner := make([]sdk.AccAddress, 0) reportOwner = append(reportOwner, idxOwner1) - slashingMsg := pottypes.NewMsgSlashingResourceNode(reporters, reportOwner, resNodeNetworkId1, resOwner1, resNodeSlashingNOZAmt1, true) + slashingMsg := pottypes.NewMsgSlashingResourceNode(reporters, reportOwner, resNodeNetworkId1, resOwner1, resNodeSlashingNOZAmt1, true, resNodeSlashingEffectiveTokenAmt1) return slashingMsg } @@ -610,7 +611,7 @@ func setupSuspendMsgByIndex(i int, resNodeNetworkId stratos.SdsAddress, resNodeP reporters = append(reporters, idxNodeNetworkId1) reportOwner := make([]sdk.AccAddress, 0) reportOwner = append(reportOwner, idxOwner1) - slashingMsg := pottypes.NewMsgSlashingResourceNode(reporters, reportOwner, resNodeNetworkId, resOwner, resNodeSlashingNOZAmt1, true) + slashingMsg := pottypes.NewMsgSlashingResourceNode(reporters, reportOwner, resNodeNetworkId, resOwner, resNodeSlashingNOZAmt1, true, resNodeSlashingEffectiveTokenAmt1) return slashingMsg } @@ -619,7 +620,7 @@ func setupUnsuspendMsg() *pottypes.MsgSlashingResourceNode { reporters = append(reporters, idxNodeNetworkId1) reportOwner := make([]sdk.AccAddress, 0) reportOwner = append(reportOwner, idxOwner1) - slashingMsg := pottypes.NewMsgSlashingResourceNode(reporters, reportOwner, resNodeNetworkId1, resOwner1, sdk.ZeroInt(), false) + slashingMsg := pottypes.NewMsgSlashingResourceNode(reporters, reportOwner, resNodeNetworkId1, resOwner1, sdk.ZeroInt(), false, resNodeSlashingEffectiveTokenAmt1) return slashingMsg } func setupPrepayMsg() *sdstypes.MsgPrepay { @@ -653,7 +654,7 @@ func setupUnsuspendMsgByIndex(i int, resNodeNetworkId stratos.SdsAddress, resNod reporters = append(reporters, idxNodeNetworkId1) reportOwner := make([]sdk.AccAddress, 0) reportOwner = append(reportOwner, idxOwner1) - slashingMsg := pottypes.NewMsgSlashingResourceNode(reporters, reportOwner, resNodeNetworkId, resOwner, sdk.ZeroInt(), false) + slashingMsg := pottypes.NewMsgSlashingResourceNode(reporters, reportOwner, resNodeNetworkId, resOwner, sdk.ZeroInt(), false, resNodeSlashingEffectiveTokenAmt1) return slashingMsg } From 2f6dfd8e6d0d60f87672813ffb60de05a8af0b9d Mon Sep 17 00:00:00 2001 From: Xiong Date: Fri, 3 Feb 2023 13:57:59 -0500 Subject: [PATCH 02/95] remove amino codec from pot module --- proto/stratos/pot/v1/pot.proto | 35 +- proto/stratos/types/v1/wrappers.proto | 20 + types/wrappers.pb.go | 507 ++++++++++++++++++++++++++ x/pot/abci.go | 10 +- x/pot/genesis.go | 2 +- x/pot/keeper/distribute.go | 46 --- x/pot/keeper/keeper.go | 2 +- x/pot/keeper/msg_server.go | 4 +- x/pot/keeper/store.go | 108 ++++-- x/pot/module.go | 6 +- x/pot/types/codec.go | 7 +- x/pot/types/genesis.go | 4 +- x/pot/types/pot.pb.go | 329 +++++++++++++---- 13 files changed, 911 insertions(+), 169 deletions(-) create mode 100644 proto/stratos/types/v1/wrappers.proto create mode 100644 types/wrappers.pb.go diff --git a/proto/stratos/pot/v1/pot.proto b/proto/stratos/pot/v1/pot.proto index a04f0731..f194a92c 100644 --- a/proto/stratos/pot/v1/pot.proto +++ b/proto/stratos/pot/v1/pot.proto @@ -90,25 +90,32 @@ message Reward { message SingleWalletVolume { string wallet_address = 1 [ - (gogoproto.jsontag) = "wallet_address", + (gogoproto.jsontag) = "wallet_address", (gogoproto.moretags) = "yaml:\"wallet_address\"" ]; - string volume = 2 [ - (gogoproto.jsontag) = "volume", - (gogoproto.moretags) = "yaml:\"volume\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int" - ]; + string volume = 2 [ + (gogoproto.jsontag) = "volume", + (gogoproto.moretags) = "yaml:\"volume\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int" + ]; +} + +message WalletVolumes { + repeated SingleWalletVolume Volumes = 1 [ + (gogoproto.jsontag) = "volumes", + (gogoproto.moretags) = "yaml:\"volumes\"" + ]; } message VolumeReportRecord { - string reporter = 1 [ - (gogoproto.jsontag) = "reporter", - (gogoproto.moretags) = "yaml:\"reporter\"" - ]; - string report_reference = 2 [ - (gogoproto.jsontag) = "report_reference", - (gogoproto.moretags) = "yaml:\"report_reference\"" - ]; + string reporter = 1 [ + (gogoproto.jsontag) = "reporter", + (gogoproto.moretags) = "yaml:\"reporter\"" + ]; + string report_reference = 2 [ + (gogoproto.jsontag) = "report_reference", + (gogoproto.moretags) = "yaml:\"report_reference\"" + ]; string tx_hash = 3 [ (gogoproto.jsontag) = "tx_hash", (gogoproto.moretags) = "yaml:\"tx_hash\"" diff --git a/proto/stratos/types/v1/wrappers.proto b/proto/stratos/types/v1/wrappers.proto new file mode 100644 index 00000000..91488007 --- /dev/null +++ b/proto/stratos/types/v1/wrappers.proto @@ -0,0 +1,20 @@ +syntax = "proto3"; +package stratos.types.v1; + +import "gogoproto/gogo.proto"; +import "cosmos/base/v1beta1/coin.proto"; + +option go_package = "github.com/stratosnet/stratos-chain/types"; + +message Int { + string Value = 1 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int" + ]; +} + +message Coins { + repeated cosmos.base.v1beta1.Coin Value = 1 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; +} \ No newline at end of file diff --git a/types/wrappers.pb.go b/types/wrappers.pb.go new file mode 100644 index 00000000..2e94b43a --- /dev/null +++ b/types/wrappers.pb.go @@ -0,0 +1,507 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: stratos/types/v1/wrappers.proto + +package types + +import ( + fmt "fmt" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type Int struct { + Value *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,1,opt,name=Value,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"Value,omitempty"` +} + +func (m *Int) Reset() { *m = Int{} } +func (m *Int) String() string { return proto.CompactTextString(m) } +func (*Int) ProtoMessage() {} +func (*Int) Descriptor() ([]byte, []int) { + return fileDescriptor_60634a56488953a9, []int{0} +} +func (m *Int) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Int) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Int.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 *Int) XXX_Merge(src proto.Message) { + xxx_messageInfo_Int.Merge(m, src) +} +func (m *Int) XXX_Size() int { + return m.Size() +} +func (m *Int) XXX_DiscardUnknown() { + xxx_messageInfo_Int.DiscardUnknown(m) +} + +var xxx_messageInfo_Int proto.InternalMessageInfo + +type Coins struct { + Value github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=Value,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"Value"` +} + +func (m *Coins) Reset() { *m = Coins{} } +func (m *Coins) String() string { return proto.CompactTextString(m) } +func (*Coins) ProtoMessage() {} +func (*Coins) Descriptor() ([]byte, []int) { + return fileDescriptor_60634a56488953a9, []int{1} +} +func (m *Coins) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Coins) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Coins.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 *Coins) XXX_Merge(src proto.Message) { + xxx_messageInfo_Coins.Merge(m, src) +} +func (m *Coins) XXX_Size() int { + return m.Size() +} +func (m *Coins) XXX_DiscardUnknown() { + xxx_messageInfo_Coins.DiscardUnknown(m) +} + +var xxx_messageInfo_Coins proto.InternalMessageInfo + +func (m *Coins) GetValue() github_com_cosmos_cosmos_sdk_types.Coins { + if m != nil { + return m.Value + } + return nil +} + +func init() { + proto.RegisterType((*Int)(nil), "stratos.types.v1.Int") + proto.RegisterType((*Coins)(nil), "stratos.types.v1.Coins") +} + +func init() { proto.RegisterFile("stratos/types/v1/wrappers.proto", fileDescriptor_60634a56488953a9) } + +var fileDescriptor_60634a56488953a9 = []byte{ + // 264 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2f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c, 0xa8, 0x5d, 0x4e, 0xce, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, + 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x84, 0xc7, 0x72, 0x0c, 0x17, 0x1e, 0xcb, 0x31, 0xdc, 0x78, 0x2c, + 0xc7, 0x10, 0xa5, 0x89, 0x64, 0x14, 0x34, 0x84, 0xf2, 0x52, 0x4b, 0x60, 0x4c, 0xdd, 0xe4, 0x8c, + 0xc4, 0xcc, 0x3c, 0x88, 0x89, 0x49, 0x6c, 0xe0, 0x00, 0x30, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, + 0x33, 0x38, 0x1c, 0x58, 0x6b, 0x01, 0x00, 0x00, +} + +func (m *Int) 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 *Int) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Int) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Value != nil { + { + size := m.Value.Size() + i -= size + if _, err := m.Value.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintWrappers(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Coins) 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 *Coins) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Coins) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Value) > 0 { + for iNdEx := len(m.Value) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Value[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintWrappers(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func encodeVarintWrappers(dAtA []byte, offset int, v uint64) int { + offset -= sovWrappers(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Int) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Value != nil { + l = m.Value.Size() + n += 1 + l + sovWrappers(uint64(l)) + } + return n +} + +func (m *Coins) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Value) > 0 { + for _, e := range m.Value { + l = e.Size() + n += 1 + l + sovWrappers(uint64(l)) + } + } + return n +} + +func sovWrappers(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozWrappers(x uint64) (n int) { + return sovWrappers(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Int) 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 ErrIntOverflowWrappers + } + 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: Int: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Int: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowWrappers + } + 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 ErrInvalidLengthWrappers + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthWrappers + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_cosmos_cosmos_sdk_types.Int + m.Value = &v + if err := m.Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipWrappers(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthWrappers + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Coins) 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 ErrIntOverflowWrappers + } + 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: Coins: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Coins: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowWrappers + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthWrappers + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthWrappers + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = append(m.Value, types.Coin{}) + if err := m.Value[len(m.Value)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipWrappers(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthWrappers + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipWrappers(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowWrappers + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowWrappers + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowWrappers + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthWrappers + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupWrappers + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthWrappers + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthWrappers = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowWrappers = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupWrappers = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/pot/abci.go b/x/pot/abci.go index 90c37c87..5c68d318 100644 --- a/x/pot/abci.go +++ b/x/pot/abci.go @@ -1,10 +1,12 @@ package pot import ( + abci "github.com/tendermint/tendermint/abci/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/stratosnet/stratos-chain/x/pot/keeper" - abci "github.com/tendermint/tendermint/abci/types" - // abci "github.com/tendermint/tendermint/abci/types" + "github.com/stratosnet/stratos-chain/x/pot/types" ) // BeginBlocker check for infraction evidence or downtime of validators @@ -30,12 +32,12 @@ func EndBlocker(ctx sdk.Context, req abci.RequestEndBlock, k keeper.Keeper) []ab logger := k.Logger(ctx) //distribute POT reward - _, err := k.DistributePotReward(ctx, walletVolumes, epoch) + _, err := k.DistributePotReward(ctx, walletVolumes.Volumes, epoch) if err != nil { logger.Error("An error occurred while distributing the reward. ", "ErrMsg", err.Error()) } - k.SetUnhandledReport(ctx, nil) + k.SetUnhandledReport(ctx, types.WalletVolumes{}) k.SetUnhandledEpoch(ctx, sdk.ZeroInt()) return []abci.ValidatorUpdate{} diff --git a/x/pot/genesis.go b/x/pot/genesis.go index a24ec971..d8040c0d 100644 --- a/x/pot/genesis.go +++ b/x/pot/genesis.go @@ -43,7 +43,7 @@ func InitGenesis(ctx sdk.Context, keeper keeper.Keeper, data *types.GenesisState // ExportGenesis writes the current store values // to a genesis file, which can be imported again // with InitGenesis -func ExportGenesis(ctx sdk.Context, keeper keeper.Keeper) (data types.GenesisState) { +func ExportGenesis(ctx sdk.Context, keeper keeper.Keeper) (data *types.GenesisState) { params := keeper.GetParams(ctx) totalMinedToken := keeper.GetTotalMinedTokens(ctx) lastReportedEpoch := keeper.GetLastReportedEpoch(ctx) diff --git a/x/pot/keeper/distribute.go b/x/pot/keeper/distribute.go index d5b887f2..1ea093aa 100644 --- a/x/pot/keeper/distribute.go +++ b/x/pot/keeper/distribute.go @@ -443,52 +443,6 @@ func (k Keeper) splitRewardByStake(ctx sdk.Context, totalReward sdk.Int, return } -// Iteration for getting individule reward of each owner at a specific epoch -func (k Keeper) IteratorIndividualReward(ctx sdk.Context, epoch sdk.Int, handler func(walletAddress sdk.AccAddress, individualReward types.Reward) (stop bool)) { - store := ctx.KVStore(k.storeKey) - iter := sdk.KVStorePrefixIterator(store, types.GetIndividualRewardIteratorKey(epoch)) - defer iter.Close() - for ; iter.Valid(); iter.Next() { - addr := sdk.AccAddress(iter.Key()[len(types.GetIndividualRewardIteratorKey(epoch)):]) - - var individualReward types.Reward - types.ModuleCdc.MustUnmarshalLengthPrefixed(iter.Value(), &individualReward) - if handler(addr, individualReward) { - break - } - } -} - -// Iteration for getting total immature reward -func (k Keeper) IteratorImmatureTotal(ctx sdk.Context, handler func(walletAddress sdk.AccAddress, immatureTotal sdk.Coins) (stop bool)) { - store := ctx.KVStore(k.storeKey) - iter := sdk.KVStorePrefixIterator(store, types.ImmatureTotalRewardKeyPrefix) - defer iter.Close() - for ; iter.Valid(); iter.Next() { - addr := sdk.AccAddress(iter.Key()[len(types.ImmatureTotalRewardKeyPrefix):]) - var immatureTotal sdk.Coins - types.ModuleCdc.MustUnmarshalLengthPrefixed(iter.Value(), &immatureTotal) - if handler(addr, immatureTotal) { - break - } - } -} - -// IteratorMatureTotal Iteration for getting total mature reward -func (k Keeper) IteratorMatureTotal(ctx sdk.Context, handler func(walletAddress sdk.AccAddress, matureTotal sdk.Coins) (stop bool)) { - store := ctx.KVStore(k.storeKey) - iter := sdk.KVStorePrefixIterator(store, types.MatureTotalRewardKeyPrefix) - defer iter.Close() - for ; iter.Valid(); iter.Next() { - addr := sdk.AccAddress(iter.Key()[len(types.MatureTotalRewardKeyPrefix):]) - var matureTotal sdk.Coins - types.ModuleCdc.MustUnmarshalLengthPrefixed(iter.Value(), &matureTotal) - if handler(addr, matureTotal) { - break - } - } -} - func (k Keeper) transferTokens(ctx sdk.Context, totalSlashed sdk.Coins) error { // [TLC] [FoundationAccount -> feeCollectorPool] Transfer mining reward to fee_pool for validators err := k.BankKeeper.SendCoinsFromModuleToModule(ctx, types.FoundationAccount, k.feeCollectorName, sdk.NewCoins(foundationToFeeCollector)) diff --git a/x/pot/keeper/keeper.go b/x/pot/keeper/keeper.go index c43a1834..57ee726e 100644 --- a/x/pot/keeper/keeper.go +++ b/x/pot/keeper/keeper.go @@ -49,7 +49,7 @@ func (k Keeper) Logger(ctx sdk.Context) log.Logger { return ctx.Logger().With("module", fmt.Sprintf("x/%s", types.ModuleName)) } -func (k Keeper) VolumeReport(ctx sdk.Context, walletVolumes []*types.SingleWalletVolume, reporter stratos.SdsAddress, +func (k Keeper) VolumeReport(ctx sdk.Context, walletVolumes types.WalletVolumes, reporter stratos.SdsAddress, epoch sdk.Int, reportReference string, txHash string) (err error) { // tx fail when unhandled epoch > 0 diff --git a/x/pot/keeper/msg_server.go b/x/pot/keeper/msg_server.go index 91a32d7b..5267b218 100644 --- a/x/pot/keeper/msg_server.go +++ b/x/pot/keeper/msg_server.go @@ -54,7 +54,9 @@ func (k msgServer) HandleMsgVolumeReport(goCtx context.Context, msg *types.MsgVo txBytes := ctx.TxBytes() txhash := fmt.Sprintf("%X", tmhash.Sum(txBytes)) - err = k.VolumeReport(ctx, msg.WalletVolumes, reporter, epoch, msg.ReportReference, txhash) + walletVolumes := types.WalletVolumes{Volumes: msg.WalletVolumes} + + err = k.VolumeReport(ctx, walletVolumes, reporter, epoch, msg.ReportReference, txhash) if err != nil { return nil, sdkerrors.Wrap(types.ErrVolumeReport, err.Error()) } diff --git a/x/pot/keeper/store.go b/x/pot/keeper/store.go index a1e1f95d..d1f2af66 100644 --- a/x/pot/keeper/store.go +++ b/x/pot/keeper/store.go @@ -1,13 +1,17 @@ package keeper import ( + gogotypes "github.com/gogo/protobuf/types" + sdk "github.com/cosmos/cosmos-sdk/types" + + stratos "github.com/stratosnet/stratos-chain/types" "github.com/stratosnet/stratos-chain/x/pot/types" ) func (k Keeper) SetTotalMinedTokens(ctx sdk.Context, totalMinedToken sdk.Coin) { store := ctx.KVStore(k.storeKey) - b := types.ModuleCdc.MustMarshalLengthPrefixed(totalMinedToken) + b := k.cdc.MustMarshalLengthPrefixed(&totalMinedToken) store.Set(types.TotalMinedTokensKey, b) } @@ -17,13 +21,13 @@ func (k Keeper) GetTotalMinedTokens(ctx sdk.Context) (totalMinedToken sdk.Coin) if b == nil { return sdk.NewCoin(k.RewardDenom(ctx), sdk.ZeroInt()) } - types.ModuleCdc.MustUnmarshalLengthPrefixed(b, &totalMinedToken) + k.cdc.MustUnmarshalLengthPrefixed(b, &totalMinedToken) return } func (k Keeper) SetLastReportedEpoch(ctx sdk.Context, epoch sdk.Int) { store := ctx.KVStore(k.storeKey) - b := types.ModuleCdc.MustMarshalLengthPrefixed(epoch) + b := k.cdc.MustMarshalLengthPrefixed(&stratos.Int{Value: &epoch}) store.Set(types.LastReportedEpochKey, b) } @@ -33,13 +37,15 @@ func (k Keeper) GetLastReportedEpoch(ctx sdk.Context) (epoch sdk.Int) { if b == nil { return sdk.ZeroInt() } - types.ModuleCdc.MustUnmarshalLengthPrefixed(b, &epoch) + var intVal stratos.Int + k.cdc.MustUnmarshalLengthPrefixed(b, &intVal) + epoch = *intVal.Value return } func (k Keeper) SetIndividualReward(ctx sdk.Context, walletAddress sdk.AccAddress, epoch sdk.Int, value types.Reward) { store := ctx.KVStore(k.storeKey) - b := types.ModuleCdc.MustMarshalLengthPrefixed(value) + b := k.cdc.MustMarshalLengthPrefixed(&value) store.Set(types.GetIndividualRewardKey(walletAddress, epoch), b) } @@ -49,13 +55,29 @@ func (k Keeper) GetIndividualReward(ctx sdk.Context, walletAddress sdk.AccAddres if b == nil { return value, false } - types.ModuleCdc.MustUnmarshalLengthPrefixed(b, &value) + k.cdc.MustUnmarshalLengthPrefixed(b, &value) return value, true } +// Iteration for getting individule reward of each owner at a specific epoch +func (k Keeper) IteratorIndividualReward(ctx sdk.Context, epoch sdk.Int, handler func(walletAddress sdk.AccAddress, individualReward types.Reward) (stop bool)) { + store := ctx.KVStore(k.storeKey) + iter := sdk.KVStorePrefixIterator(store, types.GetIndividualRewardIteratorKey(epoch)) + defer iter.Close() + for ; iter.Valid(); iter.Next() { + addr := sdk.AccAddress(iter.Key()[len(types.GetIndividualRewardIteratorKey(epoch)):]) + + var individualReward types.Reward + k.cdc.MustUnmarshalLengthPrefixed(iter.Value(), &individualReward) + if handler(addr, individualReward) { + break + } + } +} + func (k Keeper) SetMatureTotalReward(ctx sdk.Context, walletAddress sdk.AccAddress, value sdk.Coins) { store := ctx.KVStore(k.storeKey) - b := types.ModuleCdc.MustMarshalLengthPrefixed(value) + b := k.cdc.MustMarshalLengthPrefixed(&stratos.Coins{Value: value}) store.Set(types.GetMatureTotalRewardKey(walletAddress), b) } @@ -65,13 +87,31 @@ func (k Keeper) GetMatureTotalReward(ctx sdk.Context, walletAddress sdk.AccAddre if b == nil { return sdk.Coins{} } - types.ModuleCdc.MustUnmarshalLengthPrefixed(b, &value) + var coinsVal stratos.Coins + k.cdc.MustUnmarshalLengthPrefixed(b, &coinsVal) + value = coinsVal.GetValue() return } +// IteratorMatureTotal Iteration for getting total mature reward +func (k Keeper) IteratorMatureTotal(ctx sdk.Context, handler func(walletAddress sdk.AccAddress, matureTotal sdk.Coins) (stop bool)) { + store := ctx.KVStore(k.storeKey) + iter := sdk.KVStorePrefixIterator(store, types.MatureTotalRewardKeyPrefix) + defer iter.Close() + for ; iter.Valid(); iter.Next() { + addr := sdk.AccAddress(iter.Key()[len(types.MatureTotalRewardKeyPrefix):]) + var value stratos.Coins + k.cdc.MustUnmarshalLengthPrefixed(iter.Value(), &value) + matureTotal := value.Value + if handler(addr, matureTotal) { + break + } + } +} + func (k Keeper) SetImmatureTotalReward(ctx sdk.Context, walletAddress sdk.AccAddress, value sdk.Coins) { store := ctx.KVStore(k.storeKey) - b := types.ModuleCdc.MustMarshalLengthPrefixed(value) + b := k.cdc.MustMarshalLengthPrefixed(&stratos.Coins{Value: value}) store.Set(types.GetImmatureTotalRewardKey(walletAddress), b) } @@ -81,45 +121,63 @@ func (k Keeper) GetImmatureTotalReward(ctx sdk.Context, walletAddress sdk.AccAdd if b == nil { return sdk.Coins{} } - types.ModuleCdc.MustUnmarshalLengthPrefixed(b, &value) + var coinsVal stratos.Coins + k.cdc.MustUnmarshalLengthPrefixed(b, &coinsVal) + value = coinsVal.GetValue() return } +// Iteration for getting total immature reward +func (k Keeper) IteratorImmatureTotal(ctx sdk.Context, handler func(walletAddress sdk.AccAddress, immatureTotal sdk.Coins) (stop bool)) { + store := ctx.KVStore(k.storeKey) + iter := sdk.KVStorePrefixIterator(store, types.ImmatureTotalRewardKeyPrefix) + defer iter.Close() + for ; iter.Valid(); iter.Next() { + addr := sdk.AccAddress(iter.Key()[len(types.ImmatureTotalRewardKeyPrefix):]) + var value stratos.Coins + k.cdc.MustUnmarshalLengthPrefixed(iter.Value(), &value) + immatureTotal := value.Value + if handler(addr, immatureTotal) { + break + } + } +} + func (k Keeper) GetVolumeReport(ctx sdk.Context, epoch sdk.Int) (res types.VolumeReportRecord) { store := ctx.KVStore(k.storeKey) bz := store.Get(types.VolumeReportStoreKey(epoch)) if bz == nil { return types.VolumeReportRecord{} } - types.ModuleCdc.MustUnmarshalLengthPrefixed(bz, &res) + k.cdc.MustUnmarshalLengthPrefixed(bz, &res) return res } func (k Keeper) SetVolumeReport(ctx sdk.Context, epoch sdk.Int, reportRecord types.VolumeReportRecord) { store := ctx.KVStore(k.storeKey) storeKey := types.VolumeReportStoreKey(epoch) - bz := types.ModuleCdc.MustMarshalLengthPrefixed(reportRecord) + bz := k.cdc.MustMarshalLengthPrefixed(&reportRecord) store.Set(storeKey, bz) } -func (k Keeper) GetUnhandledReport(ctx sdk.Context) (walletVolumes []*types.SingleWalletVolume, found bool) { +func (k Keeper) GetUnhandledReport(ctx sdk.Context) (volumes types.WalletVolumes, found bool) { store := ctx.KVStore(k.storeKey) bz := store.Get(types.UnhandledReportKeyPrefix) if bz == nil { - return walletVolumes, false + return volumes, false } - types.ModuleCdc.MustUnmarshalLengthPrefixed(bz, &walletVolumes) + k.cdc.MustUnmarshalLengthPrefixed(bz, &volumes) - if walletVolumes == nil { - return walletVolumes, false + if volumes.Volumes == nil || len(volumes.Volumes) == 0 { + return volumes, false } found = true return } -func (k Keeper) SetUnhandledReport(ctx sdk.Context, walletVolumes []*types.SingleWalletVolume) { +func (k Keeper) SetUnhandledReport(ctx sdk.Context, volumes types.WalletVolumes) { store := ctx.KVStore(k.storeKey) - b := types.ModuleCdc.MustMarshalLengthPrefixed(walletVolumes) + b := k.cdc.MustMarshalLengthPrefixed(&volumes) store.Set(types.UnhandledReportKeyPrefix, b) } @@ -129,13 +187,15 @@ func (k Keeper) GetUnhandledEpoch(ctx sdk.Context) (epoch sdk.Int) { if b == nil { return sdk.ZeroInt() } - types.ModuleCdc.MustUnmarshalLengthPrefixed(b, &epoch) + var value stratos.Int + k.cdc.MustUnmarshalLengthPrefixed(b, &value) + epoch = *value.Value return } func (k Keeper) SetUnhandledEpoch(ctx sdk.Context, epoch sdk.Int) { store := ctx.KVStore(k.storeKey) - b := types.ModuleCdc.MustMarshalLengthPrefixed(epoch) + b := k.cdc.MustMarshalLengthPrefixed(&stratos.Int{Value: &epoch}) store.Set(types.UnhandledEpochKey, b) } @@ -145,12 +205,14 @@ func (k Keeper) GetIsReadyToDistributeReward(ctx sdk.Context) (isReady bool) { if b == nil { return false } - types.ModuleCdc.MustUnmarshalLengthPrefixed(b, &isReady) + var value gogotypes.BoolValue + k.cdc.MustUnmarshalLengthPrefixed(b, &value) + isReady = value.Value return } func (k Keeper) SetIsReadyToDistributeReward(ctx sdk.Context, isReady bool) { store := ctx.KVStore(k.storeKey) - b := types.ModuleCdc.MustMarshalLengthPrefixed(isReady) + b := k.cdc.MustMarshalLengthPrefixed(&gogotypes.BoolValue{Value: isReady}) store.Set(types.IsReadyToDistributeReward, b) } diff --git a/x/pot/module.go b/x/pot/module.go index f9f5cb39..7c0c8839 100644 --- a/x/pot/module.go +++ b/x/pot/module.go @@ -82,7 +82,7 @@ func (AppModuleBasic) GetQueryCmd() *cobra.Command { // ValidateGenesis performs genesis state validation for the pot module. func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncodingConfig, bz json.RawMessage) error { var data types.GenesisState - err := types.ModuleCdc.UnmarshalJSON(bz, &data) + err := cdc.UnmarshalJSON(bz, &data) if err != nil { return err } @@ -147,7 +147,7 @@ func (am AppModule) NewQuerierHandler(legacyQuerierCdc *codec.LegacyAmino) sdk.Q // no validator updates. func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) []abci.ValidatorUpdate { var genesisState types.GenesisState - types.ModuleCdc.MustUnmarshalJSON(data, &genesisState) + cdc.MustUnmarshalJSON(data, &genesisState) InitGenesis(ctx, am.keeper, &genesisState) return []abci.ValidatorUpdate{} } @@ -156,7 +156,7 @@ func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json. // module. func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.RawMessage { gs := ExportGenesis(ctx, am.keeper) - return types.ModuleCdc.MustMarshalJSON(gs) + return cdc.MustMarshalJSON(gs) } // BeginBlock returns the begin blocker for the pot module. diff --git a/x/pot/types/codec.go b/x/pot/types/codec.go index ee062375..77dabbc9 100644 --- a/x/pot/types/codec.go +++ b/x/pot/types/codec.go @@ -34,7 +34,12 @@ func RegisterInterfaces(registry types.InterfaceRegistry) { msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) } -// ModuleCdc defines the module codec +// ModuleCdc references the global x/pot module codec. Note, the codec should +// ONLY be used in certain instances of tests and for JSON encoding as Amino is +// still used for that purpose. +// +// The actual codec used for serialization should be provided to x/pot and +// defined at the application level. var ModuleCdc *codec.LegacyAmino func init() { diff --git a/x/pot/types/genesis.go b/x/pot/types/genesis.go index 9fc6a6b5..bf642309 100644 --- a/x/pot/types/genesis.go +++ b/x/pot/types/genesis.go @@ -8,9 +8,9 @@ import ( // NewGenesisState creates a new GenesisState object func NewGenesisState(params Params, totalMinedToken sdk.Coin, lastReportedEpoch int64, immatureTotalInfo []*ImmatureTotal, matureTotalInfo []*MatureTotal, individualRewardInfo []*Reward, -) GenesisState { +) *GenesisState { - return GenesisState{ + return &GenesisState{ Params: ¶ms, TotalMinedToken: &totalMinedToken, LastReportedEpoch: lastReportedEpoch, diff --git a/x/pot/types/pot.pb.go b/x/pot/types/pot.pb.go index bab473d4..bfdc7d95 100644 --- a/x/pot/types/pot.pb.go +++ b/x/pot/types/pot.pb.go @@ -367,6 +367,50 @@ func (m *SingleWalletVolume) GetWalletAddress() string { return "" } +type WalletVolumes struct { + Volumes []*SingleWalletVolume `protobuf:"bytes,1,rep,name=Volumes,proto3" json:"volumes" yaml:"volumes"` +} + +func (m *WalletVolumes) Reset() { *m = WalletVolumes{} } +func (m *WalletVolumes) String() string { return proto.CompactTextString(m) } +func (*WalletVolumes) ProtoMessage() {} +func (*WalletVolumes) Descriptor() ([]byte, []int) { + return fileDescriptor_a05930b44d981057, []int{6} +} +func (m *WalletVolumes) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *WalletVolumes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_WalletVolumes.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 *WalletVolumes) XXX_Merge(src proto.Message) { + xxx_messageInfo_WalletVolumes.Merge(m, src) +} +func (m *WalletVolumes) XXX_Size() int { + return m.Size() +} +func (m *WalletVolumes) XXX_DiscardUnknown() { + xxx_messageInfo_WalletVolumes.DiscardUnknown(m) +} + +var xxx_messageInfo_WalletVolumes proto.InternalMessageInfo + +func (m *WalletVolumes) GetVolumes() []*SingleWalletVolume { + if m != nil { + return m.Volumes + } + return nil +} + type VolumeReportRecord struct { Reporter string `protobuf:"bytes,1,opt,name=reporter,proto3" json:"reporter" yaml:"reporter"` ReportReference string `protobuf:"bytes,2,opt,name=report_reference,json=reportReference,proto3" json:"report_reference" yaml:"report_reference"` @@ -377,7 +421,7 @@ func (m *VolumeReportRecord) Reset() { *m = VolumeReportRecord{} } func (m *VolumeReportRecord) String() string { return proto.CompactTextString(m) } func (*VolumeReportRecord) ProtoMessage() {} func (*VolumeReportRecord) Descriptor() ([]byte, []int) { - return fileDescriptor_a05930b44d981057, []int{6} + return fileDescriptor_a05930b44d981057, []int{7} } func (m *VolumeReportRecord) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -437,7 +481,7 @@ func (m *BLSSignatureInfo) Reset() { *m = BLSSignatureInfo{} } func (m *BLSSignatureInfo) String() string { return proto.CompactTextString(m) } func (*BLSSignatureInfo) ProtoMessage() {} func (*BLSSignatureInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_a05930b44d981057, []int{7} + return fileDescriptor_a05930b44d981057, []int{8} } func (m *BLSSignatureInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -494,6 +538,7 @@ func init() { proto.RegisterType((*MatureTotal)(nil), "stratos.pot.v1.MatureTotal") proto.RegisterType((*Reward)(nil), "stratos.pot.v1.Reward") proto.RegisterType((*SingleWalletVolume)(nil), "stratos.pot.v1.SingleWalletVolume") + proto.RegisterType((*WalletVolumes)(nil), "stratos.pot.v1.WalletVolumes") proto.RegisterType((*VolumeReportRecord)(nil), "stratos.pot.v1.VolumeReportRecord") proto.RegisterType((*BLSSignatureInfo)(nil), "stratos.pot.v1.BLSSignatureInfo") } @@ -501,77 +546,79 @@ func init() { func init() { proto.RegisterFile("stratos/pot/v1/pot.proto", fileDescriptor_a05930b44d981057) } var fileDescriptor_a05930b44d981057 = []byte{ - // 1116 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x57, 0xcf, 0x6f, 0x1c, 0xb5, - 0x17, 0xcf, 0x74, 0xdb, 0x6d, 0xe3, 0x6c, 0xd2, 0xd4, 0xdf, 0x44, 0xd9, 0x6f, 0x81, 0x75, 0xe2, - 0xa2, 0xb2, 0x52, 0x95, 0x1d, 0x52, 0x04, 0x48, 0xe5, 0x80, 0xd8, 0x26, 0x88, 0x00, 0x41, 0x91, - 0x13, 0xb5, 0xa8, 0x12, 0x1a, 0x79, 0x67, 0x9c, 0xcd, 0x28, 0x33, 0xf6, 0x6a, 0xc6, 0xbb, 0xdd, - 0x48, 0x5c, 0x38, 0x70, 0x40, 0xe2, 0xc0, 0xdf, 0xc1, 0x3f, 0xc1, 0x01, 0x54, 0x7a, 0x2c, 0x37, - 0xe0, 0x60, 0x20, 0x01, 0x21, 0xcd, 0x8d, 0xf9, 0x0b, 0xd0, 0xd8, 0xb3, 0xbf, 0x92, 0x6e, 0xb2, - 0x39, 0xf4, 0xc0, 0x69, 0xec, 0xcf, 0x7b, 0xfe, 0x3c, 0x7f, 0xfc, 0xde, 0xbc, 0xf1, 0x80, 0x72, - 0x2c, 0x23, 0x2a, 0x45, 0x6c, 0xb7, 0x84, 0xb4, 0x3b, 0x6b, 0xd9, 0xa3, 0xd6, 0x8a, 0x84, 0x14, - 0x70, 0x2e, 0xb7, 0xd4, 0x32, 0xa8, 0xb3, 0x76, 0x73, 0xa1, 0x29, 0x9a, 0x42, 0x9b, 0xec, 0x6c, - 0x64, 0xbc, 0x6e, 0x56, 0x5c, 0x11, 0x87, 0x22, 0xb6, 0x1b, 0x34, 0x66, 0x76, 0x67, 0xad, 0xc1, - 0x24, 0x5d, 0xb3, 0x5d, 0xe1, 0x73, 0x63, 0xc7, 0xff, 0x14, 0x40, 0x71, 0x9b, 0x46, 0x34, 0x8c, - 0x61,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x7d, 0x19, 0x7f, 0x16, 0x40, 0x31, 0x6f, 0x17, 0x2f, 0x42, 0xc1, 0x77, - 0x16, 0x58, 0xca, 0xbf, 0x3e, 0x7b, 0x91, 0x08, 0x9d, 0xbc, 0x5f, 0xb5, 0x84, 0x08, 0xce, 0x17, - 0x15, 0x66, 0xa2, 0x12, 0x85, 0xc6, 0x31, 0x0c, 0x5a, 0xfc, 0x18, 0x07, 0x7c, 0xa1, 0x13, 0x59, - 0x30, 0x2c, 0xef, 0x47, 0x22, 0x34, 0xdf, 0xa2, 0x6d, 0x21, 0x02, 0xf8, 0xbd, 0x05, 0xca, 0xc3, - 0xf4, 0x32, 0xa2, 0x7b, 0x7b, 0xbe, 0x6b, 0x24, 0x14, 0xce, 0x93, 0x20, 0x72, 0x09, 0x63, 0x29, - 0x52, 0x85, 0xd0, 0x69, 0x0d, 0xc3, 0x1e, 0x17, 0x13, 0xb1, 0x38, 0x10, 0xb1, 0x6b, 0x48, 0x32, - 0x15, 0xf8, 0x47, 0x0b, 0xc0, 0x1d, 0x9f, 0x37, 0x03, 0xf6, 0x50, 0xe7, 0xe7, 0x81, 0x08, 0xda, - 0x21, 0x7b, 0x21, 0x29, 0xff, 0x0c, 0x14, 0x3b, 0x9a, 0x3d, 0xbf, 0x6a, 0x6d, 0x5c, 0xa8, 0x2b, - 0xe5, 0x6b, 0x53, 0x85, 0x66, 0x4d, 0x34, 0x33, 0xc7, 0x24, 0x37, 0xe0, 0xbf, 0x2c, 0x00, 0xcd, - 0xee, 0x09, 0x6b, 0x89, 0x48, 0x12, 0xe6, 0x8a, 0xc8, 0x83, 0xef, 0x80, 0x6b, 0x91, 0x9e, 0xb3, - 0x28, 0xd7, 0x80, 0x12, 0x85, 0xfa, 0x58, 0xaa, 0xd0, 0xf5, 0xde, 0x31, 0x1b, 0x04, 0x93, 0xbe, - 0x11, 0x3e, 0x02, 0xf3, 0x66, 0xec, 0x44, 0x6c, 0x8f, 0x45, 0x8c, 0xbb, 0xbd, 0xcd, 0xdb, 0x89, - 0x42, 0xa7, 0x6c, 0xa9, 0x42, 0x4b, 0xc3, 0x64, 0x03, 0x0b, 0x26, 0xd7, 0xa3, 0x7c, 0x57, 0x39, - 0x02, 0xdf, 0x02, 0x57, 0x65, 0xd7, 0xd9, 0xa7, 0xb1, 0xb9, 0x2e, 0x4e, 0xd7, 0x5f, 0x49, 0x14, - 0xea, 0x41, 0xa9, 0x42, 0x73, 0xf9, 0x85, 0xc1, 0x00, 0x98, 0x14, 0x65, 0xf7, 0x83, 0x6c, 0xf0, - 0xc4, 0x02, 0xf3, 0xf5, 0x8f, 0x77, 0x76, 0xfc, 0x26, 0xd7, 0x5d, 0x66, 0x93, 0xef, 0x09, 0x78, - 0x0f, 0x5c, 0x6b, 0xb5, 0x1b, 0xce, 0x01, 0x3b, 0xcc, 0x32, 0x55, 0xa8, 0x96, 0x8c, 0xca, 0x1e, - 0x36, 0x50, 0xd9, 0x43, 0x30, 0xb9, 0xda, 0x6a, 0x37, 0x3e, 0x62, 0x87, 0x31, 0x7c, 0x17, 0x4c, - 0xc7, 0x3d, 0x32, 0xad, 0xae, 0x54, 0x5f, 0x49, 0x14, 0x1a, 0x80, 0xa9, 0x42, 0xf3, 0x66, 0x75, - 0x1f, 0xc2, 0x64, 0x60, 0x86, 0x6f, 0x82, 0xa2, 0xec, 0xae, 0x53, 0x49, 0xb5, 0x90, 0x52, 0x5f, - 0x88, 0x47, 0x25, 0x1d, 0x11, 0x92, 0x01, 0x5a, 0x48, 0xe6, 0x5c, 0xdf, 0x7c, 0x7a, 0x54, 0xb1, - 0x9e, 0x1d, 0x55, 0xac, 0xdf, 0x8f, 0x2a, 0xd6, 0x37, 0xc7, 0x95, 0xa9, 0x67, 0xc7, 0x95, 0xa9, - 0x9f, 0x8f, 0x2b, 0x53, 0x8f, 0xec, 0xa1, 0xaa, 0xc8, 0x6f, 0xbb, 0x9c, 0xc9, 0xde, 0x70, 0x55, - 0xdf, 0x13, 0xec, 0xae, 0xfe, 0xcf, 0xd0, 0x25, 0xd2, 0x28, 0xea, 0x3f, 0x84, 0x37, 0xfe, 0x0d, - 0x00, 0x00, 0xff, 0xff, 0x4e, 0xb4, 0x28, 0xed, 0x83, 0x0c, 0x00, 0x00, + // 1142 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x57, 0x4f, 0x6f, 0x1b, 0x45, + 0x14, 0xcf, 0xd6, 0xad, 0xd3, 0x4c, 0xec, 0xfe, 0x19, 0x52, 0xd5, 0x14, 0xf0, 0xa4, 0x53, 0x54, + 0x22, 0x55, 0xf5, 0x92, 0x22, 0x40, 0x2a, 0x07, 0x84, 0x9b, 0x20, 0x02, 0x04, 0x45, 0x93, 0xa8, + 0x45, 0x45, 0x68, 0x35, 0xde, 0x9d, 0x38, 0xab, 0xec, 0xce, 0x58, 0xbb, 0x63, 0xd7, 0x91, 0xb8, + 0x70, 0xe0, 0x80, 0xc4, 0x81, 0xcf, 0xc1, 0x97, 0xe0, 0x00, 0x2a, 0x3d, 0x96, 0x1b, 0x70, 0x18, + 0x20, 0x01, 0x21, 0xf9, 0xc6, 0x7e, 0x02, 0xb4, 0x33, 0xe3, 0x7f, 0x49, 0x9d, 0x38, 0x87, 0x1e, + 0x38, 0x79, 0xe6, 0xf7, 0xde, 0xfc, 0xde, 0xfe, 0xde, 0x7b, 0xfb, 0x3c, 0x0b, 0x2a, 0xa9, 0x4c, + 0xa8, 0x14, 0xa9, 0xdb, 0x12, 0xd2, 0xed, 0x2c, 0xe7, 0x3f, 0xb5, 0x56, 0x22, 0xa4, 0x80, 0x17, + 0xac, 0xa5, 0x96, 0x43, 0x9d, 0xe5, 0x6b, 0x0b, 0x4d, 0xd1, 0x14, 0xda, 0xe4, 0xe6, 0x2b, 0xe3, + 0x75, 0xad, 0xea, 0x8b, 0x34, 0x16, 0xa9, 0xdb, 0xa0, 0x29, 0x73, 0x3b, 0xcb, 0x0d, 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 0x34, 0x56, 0x8a, 0x49, 0x9f, 0x11, 0xff, 0xed, + 0x00, 0x68, 0xd6, 0x84, 0xb5, 0x44, 0x22, 0x09, 0xf3, 0x45, 0x12, 0xc0, 0x77, 0xc0, 0xf9, 0x44, + 0xef, 0x59, 0x62, 0x33, 0x86, 0x7a, 0x0a, 0x0d, 0xb0, 0x4c, 0xa1, 0x8b, 0xfd, 0xa2, 0x1a, 0x04, + 0x93, 0x81, 0x11, 0x3e, 0x04, 0x97, 0xcc, 0xda, 0x4b, 0xd8, 0x36, 0x4b, 0x18, 0xf7, 0xfb, 0xa9, + 0x72, 0x7b, 0x0a, 0x1d, 0xb1, 0x65, 0x0a, 0x5d, 0x1d, 0x25, 0x1b, 0x5a, 0x30, 0xb9, 0x98, 0xd8, + 0xa7, 0xb2, 0x08, 0x7c, 0x0b, 0xcc, 0xca, 0xae, 0xb7, 0x43, 0x53, 0x73, 0x39, 0x9d, 0x33, 0x42, + 0x2d, 0x34, 0x14, 0x6a, 0x01, 0x4c, 0x8a, 0xb2, 0xfb, 0x41, 0xbe, 0x78, 0xec, 0x80, 0x4b, 0xf5, + 0x8f, 0x37, 0x37, 0xc3, 0x26, 0xd7, 0x33, 0x6d, 0x8d, 0x6f, 0x0b, 0x78, 0x17, 0x9c, 0x6f, 0xb5, + 0x1b, 0xde, 0x2e, 0xdb, 0x33, 0xa9, 0x2d, 0x19, 0x95, 0x7d, 0x6c, 0xa8, 0xb2, 0x8f, 0x60, 0x32, + 0xdb, 0x6a, 0x37, 0x3e, 0x62, 0x7b, 0x29, 0x7c, 0x17, 0xcc, 0xa5, 0x7d, 0x32, 0xad, 0xae, 0x54, + 0xbf, 0xde, 0x53, 0x68, 0x08, 0x66, 0x0a, 0x5d, 0x32, 0xa7, 0x07, 0x10, 0x26, 0x43, 0x33, 0x7c, + 0x13, 0x14, 0x65, 0x77, 0x85, 0x4a, 0xaa, 0x85, 0x94, 0x06, 0x42, 0x02, 0x2a, 0xe9, 0x98, 0x90, + 0x1c, 0xd0, 0x42, 0x72, 0xe7, 0xfa, 0xda, 0x93, 0xfd, 0xaa, 0xf3, 0x74, 0xbf, 0xea, 0xfc, 0xb1, + 0x5f, 0x75, 0xbe, 0x3d, 0xa8, 0xce, 0x3c, 0x3d, 0xa8, 0xce, 0xfc, 0x72, 0x50, 0x9d, 0x79, 0xe8, + 0x8e, 0xf4, 0xa0, 0x6d, 0x10, 0xce, 0x64, 0x7f, 0x79, 0x5b, 0xdf, 0x4a, 0xdc, 0xae, 0xfe, 0xaa, + 0xd1, 0x0d, 0xd9, 0x28, 0xea, 0xef, 0x91, 0x37, 0xfe, 0x0b, 0x00, 0x00, 0xff, 0xff, 0x12, 0x11, + 0x26, 0x8b, 0xf1, 0x0c, 0x00, 0x00, } func (m *Params) Marshal() (dAtA []byte, err error) { @@ -923,6 +970,43 @@ func (m *SingleWalletVolume) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *WalletVolumes) 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 *WalletVolumes) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *WalletVolumes) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Volumes) > 0 { + for iNdEx := len(m.Volumes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Volumes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPot(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + func (m *VolumeReportRecord) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1165,6 +1249,21 @@ func (m *SingleWalletVolume) Size() (n int) { return n } +func (m *WalletVolumes) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Volumes) > 0 { + for _, e := range m.Volumes { + l = e.Size() + n += 1 + l + sovPot(uint64(l)) + } + } + return n +} + func (m *VolumeReportRecord) Size() (n int) { if m == nil { return 0 @@ -2182,6 +2281,90 @@ func (m *SingleWalletVolume) Unmarshal(dAtA []byte) error { } return nil } +func (m *WalletVolumes) 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 ErrIntOverflowPot + } + 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: WalletVolumes: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: WalletVolumes: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Volumes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPot + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthPot + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPot + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Volumes = append(m.Volumes, &SingleWalletVolume{}) + if err := m.Volumes[len(m.Volumes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipPot(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthPot + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *VolumeReportRecord) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 From 66f4b7f260af1c05cc1f8b9cb829dfa180a8dcf3 Mon Sep 17 00:00:00 2001 From: jialbai Date: Tue, 7 Feb 2023 02:03:34 -0500 Subject: [PATCH 03/95] - qb1296: fix effectiveToken update logics --- x/pot/keeper/slashing.go | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/x/pot/keeper/slashing.go b/x/pot/keeper/slashing.go index 82e3f14a..da41b1ef 100644 --- a/x/pot/keeper/slashing.go +++ b/x/pot/keeper/slashing.go @@ -1,6 +1,8 @@ package keeper import ( + "strconv" + sdk "github.com/cosmos/cosmos-sdk/types" stratos "github.com/stratosnet/stratos-chain/types" "github.com/stratosnet/stratos-chain/x/pot/types" @@ -24,9 +26,21 @@ func (k Keeper) SlashingResourceNode(ctx sdk.Context, p2pAddr stratos.SdsAddress } toBeUnsuspended := node.Suspend == true && suspend == false + effectiveStakeBefore := sdk.NewInt(0).Add(node.EffectiveTokens) + effectiveStakeChange := effectiveStakeAfter.Sub(effectiveStakeBefore) // before calc ozone limit change, get unbonding stake and calc effective stake to trigger ozLimit change unbondingStake := k.RegisterKeeper.GetUnbondingNodeBalance(ctx, p2pAddr) + + logger := k.Logger(ctx) + logger.Info("------ potKeeper.SlashingResourceNode get inputs: ", + "nozAmt=", nozAmt.String(), + "node.Tokens=", node.Tokens.String(), + "suspend=", strconv.FormatBool(suspend), + "toBeUnsuspended=", strconv.FormatBool(toBeUnsuspended), + "effectiveStakeAfter=", effectiveStakeAfter.String(), + "effectiveStakeBefore=", effectiveStakeBefore.String(), + "effectiveStakeChange=", effectiveStakeChange.String()) // no effective stake after subtracting unbonding stake if node.Tokens.LTE(unbondingStake) { return sdk.ZeroInt(), registertypes.NodeType(0), toBeUnsuspended, registertypes.ErrInsufficientBalance @@ -36,10 +50,8 @@ func (k Keeper) SlashingResourceNode(ctx sdk.Context, p2pAddr stratos.SdsAddress return sdk.ZeroInt(), registertypes.NodeType(0), toBeUnsuspended, registertypes.ErrInsufficientBalance } - effectiveStakeBefore := node.EffectiveTokens - effectiveStakeChange := effectiveStakeAfter.Sub(effectiveStakeBefore) - node.Suspend = suspend + node.EffectiveTokens = effectiveStakeAfter //slashing amt is equivalent to reward traffic calculation trafficList := []*types.SingleWalletVolume{{ @@ -58,11 +70,10 @@ func (k Keeper) SlashingResourceNode(ctx sdk.Context, p2pAddr stratos.SdsAddress k.RegisterKeeper.SetSlashing(ctx, walletAddr, newSlashing) if effectiveStakeChange.IsNegative() { - k.RegisterKeeper.DecreaseOzoneLimitBySubtractStake(ctx, effectiveStakeChange) + k.RegisterKeeper.DecreaseOzoneLimitBySubtractStake(ctx, effectiveStakeChange.Abs()) } if effectiveStakeChange.IsPositive() { k.RegisterKeeper.IncreaseOzoneLimitByAddStake(ctx, effectiveStakeChange) } - return slashTokenAmt.TruncateInt(), registertypes.NodeType(node.NodeType), toBeUnsuspended, nil } From 9f2edc9795820fdba6e247e8698aabf4f56a93bd Mon Sep 17 00:00:00 2001 From: Xiong Date: Tue, 7 Feb 2023 15:02:21 -0500 Subject: [PATCH 04/95] 1, remove amino codec from register module 2, code optimization --- app/app.go | 4 + proto/stratos/types/v1/wrappers.proto | 14 + types/account.go | 2 +- types/account.pb.go | 2 +- types/wrappers.pb.go | 389 +++++++++++++++++++++++- x/pot/app_test.go | 8 +- x/pot/keeper/distribute.go | 46 +-- x/pot/keeper/grpc_query.go | 4 +- x/pot/keeper/keeper.go | 24 +- x/pot/keeper/msg_server.go | 2 +- x/pot/keeper/querier.go | 2 +- x/pot/keeper/slashing.go | 24 +- x/pot/keeper/store.go | 44 +-- x/pot/keeper/withdraw.go | 2 +- x/pot/types/expected_keepers.go | 21 -- x/register/allow_ed25519_gas_test.go | 2 +- x/register/app_test.go | 24 +- x/register/genesis.go | 12 +- x/register/keeper/indexing_node_test.go | 250 --------------- x/register/keeper/keeper.go | 243 ++------------- x/register/keeper/keeper_tests.go | 67 ---- x/register/keeper/meta_node.go | 43 +-- x/register/keeper/msg_server.go | 1 - x/register/keeper/node_state_change.go | 193 ++++++------ x/register/keeper/resource_node.go | 22 +- x/register/keeper/resource_node_test.go | 57 ---- x/register/keeper/slashing.go | 33 -- x/register/keeper/store.go | 229 ++++++++++++++ x/register/types/codec.go | 16 +- x/register/types/expected_keepers.go | 50 +-- x/register/types/meta_node.go | 28 +- x/register/types/resource_node.go | 34 +-- x/register/types/unbonding_node.go | 52 +--- x/sds/app_test.go | 52 ++-- x/sds/keeper/keeper.go | 30 +- x/sds/keeper/msg_server.go | 4 +- x/sds/keeper/querier.go | 4 +- x/sds/oz_price_test.go | 6 +- 38 files changed, 930 insertions(+), 1110 deletions(-) delete mode 100644 x/register/keeper/indexing_node_test.go delete mode 100644 x/register/keeper/keeper_tests.go delete mode 100644 x/register/keeper/resource_node_test.go create mode 100644 x/register/keeper/store.go diff --git a/app/app.go b/app/app.go index b1ec71b7..56d650f3 100644 --- a/app/app.go +++ b/app/app.go @@ -751,6 +751,10 @@ func (app *NewApp) GetPotKeeper() potkeeper.Keeper { return app.potKeeper } +func (app *NewApp) GetDistrKeeper() distrkeeper.Keeper { + return app.distrKeeper +} + // RegisterSwaggerAPI registers swagger route with API Server func RegisterSwaggerAPI(_ client.Context, rtr *mux.Router) { statikFS, err := fs.New() diff --git a/proto/stratos/types/v1/wrappers.proto b/proto/stratos/types/v1/wrappers.proto index 91488007..1f17c136 100644 --- a/proto/stratos/types/v1/wrappers.proto +++ b/proto/stratos/types/v1/wrappers.proto @@ -12,9 +12,23 @@ message Int { ]; } +message Dec { + string Value = 1 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec" + ]; +} + message Coins { repeated cosmos.base.v1beta1.Coin Value = 1 [ (gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" ]; +} + +// ValAddresses defines a repeated set of validator addresses. +message SdsAddresses { + option (gogoproto.goproto_stringer) = false; + option (gogoproto.stringer) = true; + + repeated string Addresses = 1; } \ No newline at end of file diff --git a/types/account.go b/types/account.go index f31b0555..fe519138 100644 --- a/types/account.go +++ b/types/account.go @@ -43,7 +43,7 @@ type EthAccountI interface { // ---------------------------------------------------------------------------- // ProtoAccount defines the prototype function for BaseAccount used for an -// AccountKeeper. +// accountKeeper. func ProtoAccount() authtypes.AccountI { return &authtypes.BaseAccount{} //return &EthAccount{ diff --git a/types/account.pb.go b/types/account.pb.go index d95de534..a83022f9 100644 --- a/types/account.pb.go +++ b/types/account.pb.go @@ -26,7 +26,7 @@ var _ = math.Inf const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // EthAccount implements the authtypes.AccountI interface and embeds an -// authtypes.BaseAccount type. It is compatible with the auth AccountKeeper. +// authtypes.BaseAccount type. It is compatible with the auth accountKeeper. type EthAccount struct { *types.BaseAccount `protobuf:"bytes,1,opt,name=base_account,json=baseAccount,proto3,embedded=base_account" json:"base_account,omitempty" yaml:"base_account"` CodeHash string `protobuf:"bytes,2,opt,name=code_hash,json=codeHash,proto3" json:"code_hash,omitempty" yaml:"code_hash"` diff --git a/types/wrappers.pb.go b/types/wrappers.pb.go index 2e94b43a..29940b08 100644 --- a/types/wrappers.pb.go +++ b/types/wrappers.pb.go @@ -12,6 +12,8 @@ import ( io "io" math "math" math_bits "math/bits" + reflect "reflect" + strings "strings" ) // Reference imports to suppress errors if they are not otherwise used. @@ -62,6 +64,43 @@ func (m *Int) XXX_DiscardUnknown() { var xxx_messageInfo_Int proto.InternalMessageInfo +type Dec struct { + Value *github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,1,opt,name=Value,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"Value,omitempty"` +} + +func (m *Dec) Reset() { *m = Dec{} } +func (m *Dec) String() string { return proto.CompactTextString(m) } +func (*Dec) ProtoMessage() {} +func (*Dec) Descriptor() ([]byte, []int) { + return fileDescriptor_60634a56488953a9, []int{1} +} +func (m *Dec) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Dec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Dec.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 *Dec) XXX_Merge(src proto.Message) { + xxx_messageInfo_Dec.Merge(m, src) +} +func (m *Dec) XXX_Size() int { + return m.Size() +} +func (m *Dec) XXX_DiscardUnknown() { + xxx_messageInfo_Dec.DiscardUnknown(m) +} + +var xxx_messageInfo_Dec proto.InternalMessageInfo + type Coins struct { Value github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=Value,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"Value"` } @@ -70,7 +109,7 @@ func (m *Coins) Reset() { *m = Coins{} } func (m *Coins) String() string { return proto.CompactTextString(m) } func (*Coins) ProtoMessage() {} func (*Coins) Descriptor() ([]byte, []int) { - return fileDescriptor_60634a56488953a9, []int{1} + return fileDescriptor_60634a56488953a9, []int{2} } func (m *Coins) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -106,15 +145,61 @@ func (m *Coins) GetValue() github_com_cosmos_cosmos_sdk_types.Coins { return nil } +// ValAddresses defines a repeated set of validator addresses. +type SdsAddresses struct { + Addresses []string `protobuf:"bytes,1,rep,name=Addresses,proto3" json:"Addresses,omitempty"` +} + +func (m *SdsAddresses) Reset() { *m = SdsAddresses{} } +func (*SdsAddresses) ProtoMessage() {} +func (*SdsAddresses) Descriptor() ([]byte, []int) { + return fileDescriptor_60634a56488953a9, []int{3} +} +func (m *SdsAddresses) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SdsAddresses) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SdsAddresses.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 *SdsAddresses) XXX_Merge(src proto.Message) { + xxx_messageInfo_SdsAddresses.Merge(m, src) +} +func (m *SdsAddresses) XXX_Size() int { + return m.Size() +} +func (m *SdsAddresses) XXX_DiscardUnknown() { + xxx_messageInfo_SdsAddresses.DiscardUnknown(m) +} + +var xxx_messageInfo_SdsAddresses proto.InternalMessageInfo + +func (m *SdsAddresses) GetAddresses() []string { + if m != nil { + return m.Addresses + } + return nil +} + func init() { proto.RegisterType((*Int)(nil), "stratos.types.v1.Int") + proto.RegisterType((*Dec)(nil), "stratos.types.v1.Dec") proto.RegisterType((*Coins)(nil), "stratos.types.v1.Coins") + proto.RegisterType((*SdsAddresses)(nil), "stratos.types.v1.SdsAddresses") } func init() { proto.RegisterFile("stratos/types/v1/wrappers.proto", fileDescriptor_60634a56488953a9) } var fileDescriptor_60634a56488953a9 = []byte{ - // 264 bytes of a gzipped FileDescriptorProto + // 313 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2f, 0x2e, 0x29, 0x4a, 0x2c, 0xc9, 0x2f, 0xd6, 0x2f, 0xa9, 0x2c, 0x48, 0x2d, 0xd6, 0x2f, 0x33, 0xd4, 0x2f, 0x2f, 0x4a, 0x2c, 0x28, 0x48, 0x2d, 0x2a, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x80, 0x2a, 0xd0, @@ -124,14 +209,17 @@ var fileDescriptor_60634a56488953a9 = []byte{ 0x2e, 0x66, 0xcf, 0xbc, 0x12, 0x21, 0x07, 0x2e, 0xd6, 0xb0, 0xc4, 0x9c, 0xd2, 0x54, 0x09, 0x46, 0x05, 0x46, 0x0d, 0x4e, 0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0x7a, 0x10, 0x5d, 0x7a, 0x20, 0xaf, 0xe8, 0x41, 0xbd, 0xa2, 0x07, 0x52, + 0xea, 0x64, 0x70, 0xe2, 0x9e, 0x3c, 0xc3, 0xaa, 0xfb, 0xf2, 0x1a, 0x44, 0xd8, 0x04, 0x36, 0x1b, + 0x66, 0x97, 0x19, 0x17, 0x4f, 0x70, 0x4a, 0xb1, 0x63, 0x4a, 0x4a, 0x51, 0x6a, 0x71, 0x71, 0x6a, + 0xb1, 0x90, 0x0c, 0x17, 0x27, 0x9c, 0x03, 0xb6, 0x96, 0x33, 0x08, 0x21, 0x60, 0xc5, 0x31, 0x63, + 0x81, 0x3c, 0x43, 0xc3, 0x1d, 0x05, 0x46, 0x27, 0xe7, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, + 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x71, 0xc2, 0x63, 0x39, 0x86, 0x0b, 0x8f, 0xe5, 0x18, 0x6e, 0x3c, + 0x96, 0x63, 0x88, 0xd2, 0x44, 0x72, 0x02, 0x34, 0x8a, 0xf2, 0x52, 0x4b, 0x60, 0x4c, 0xdd, 0xe4, + 0x8c, 0xc4, 0xcc, 0x3c, 0x88, 0x4b, 0x92, 0xd8, 0xc0, 0x31, 0x60, 0x0c, 0x08, 0x00, 0x00, 0xff, + 0xff, 0x1a, 0x93, 0xc6, 0xe6, 0xec, 0x01, 0x00, 0x00, } func (m *Int) Marshal() (dAtA []byte, err error) { @@ -169,6 +257,41 @@ func (m *Int) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *Dec) 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 *Dec) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Dec) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Value != nil { + { + size := m.Value.Size() + i -= size + if _, err := m.Value.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintWrappers(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *Coins) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -206,6 +329,38 @@ func (m *Coins) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *SdsAddresses) 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 *SdsAddresses) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SdsAddresses) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Addresses) > 0 { + for iNdEx := len(m.Addresses) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Addresses[iNdEx]) + copy(dAtA[i:], m.Addresses[iNdEx]) + i = encodeVarintWrappers(dAtA, i, uint64(len(m.Addresses[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + func encodeVarintWrappers(dAtA []byte, offset int, v uint64) int { offset -= sovWrappers(v) base := offset @@ -230,6 +385,19 @@ func (m *Int) Size() (n int) { return n } +func (m *Dec) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Value != nil { + l = m.Value.Size() + n += 1 + l + sovWrappers(uint64(l)) + } + return n +} + func (m *Coins) Size() (n int) { if m == nil { return 0 @@ -245,12 +413,45 @@ func (m *Coins) Size() (n int) { return n } +func (m *SdsAddresses) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Addresses) > 0 { + for _, s := range m.Addresses { + l = len(s) + n += 1 + l + sovWrappers(uint64(l)) + } + } + return n +} + func sovWrappers(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } func sozWrappers(x uint64) (n int) { return sovWrappers(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } +func (this *SdsAddresses) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SdsAddresses{`, + `Addresses:` + fmt.Sprintf("%v", this.Addresses) + `,`, + `}`, + }, "") + return s +} +func valueToStringWrappers(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} func (m *Int) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -337,6 +538,92 @@ func (m *Int) Unmarshal(dAtA []byte) error { } return nil } +func (m *Dec) 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 ErrIntOverflowWrappers + } + 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: Dec: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Dec: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowWrappers + } + 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 ErrInvalidLengthWrappers + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthWrappers + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_cosmos_cosmos_sdk_types.Dec + m.Value = &v + if err := m.Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipWrappers(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthWrappers + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *Coins) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -421,6 +708,88 @@ func (m *Coins) Unmarshal(dAtA []byte) error { } return nil } +func (m *SdsAddresses) 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 ErrIntOverflowWrappers + } + 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: SdsAddresses: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SdsAddresses: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Addresses", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowWrappers + } + 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 ErrInvalidLengthWrappers + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthWrappers + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Addresses = append(m.Addresses, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipWrappers(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthWrappers + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipWrappers(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/pot/app_test.go b/x/pot/app_test.go index ff1c7d9e..3eb4ef2b 100644 --- a/x/pot/app_test.go +++ b/x/pot/app_test.go @@ -5,6 +5,7 @@ import ( "testing" "time" + distrkeeper "github.com/cosmos/cosmos-sdk/x/distribution/keeper" "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" @@ -191,6 +192,7 @@ func TestPotVolumeReportMsgs(t *testing.T) { bankKeeper := stApp.GetBankKeeper() registerKeeper := stApp.GetRegisterKeeper() potKeeper := stApp.GetPotKeeper() + distrKeeper := stApp.GetDistrKeeper() /********************* foundation account deposit *********************/ header := tmproto.Header{Height: stApp.LastBlockHeight() + 1, ChainID: chainID} @@ -349,7 +351,7 @@ func TestPotVolumeReportMsgs(t *testing.T) { /********************* record data before delivering tx *********************/ lastFoundationAccBalance := bankKeeper.GetAllBalances(ctx, foundationAccountAddr) lastUnissuedPrepay := registerKeeper.GetTotalUnissuedPrepay(ctx) - lastCommunityPool := sdk.NewCoins(sdk.NewCoin(potKeeper.BondDenom(ctx), potKeeper.DistrKeeper.GetFeePool(ctx).CommunityPool.AmountOf(potKeeper.BondDenom(ctx)).TruncateInt())) + lastCommunityPool := sdk.NewCoins(sdk.NewCoin(potKeeper.BondDenom(ctx), distrKeeper.GetFeePool(ctx).CommunityPool.AmountOf(potKeeper.BondDenom(ctx)).TruncateInt())) lastMatureTotalOfResNode1 := potKeeper.GetMatureTotalReward(ctx, resOwner1) /********************* deliver tx *********************/ @@ -383,6 +385,7 @@ func TestPotVolumeReportMsgs(t *testing.T) { accountKeeper, bankKeeper, registerKeeper, + distrKeeper, epoch, lastFoundationAccBalance, lastUnissuedPrepay, @@ -414,6 +417,7 @@ func checkResult(t *testing.T, ctx sdk.Context, accountKeeper authkeeper.AccountKeeper, bankKeeper bankKeeper.Keeper, registerKeeper registerKeeper.Keeper, + distrKeeper distrkeeper.Keeper, currentEpoch sdk.Int, lastFoundationAccBalance sdk.Coins, lastUnissuedPrepay sdk.Coin, @@ -442,7 +446,7 @@ func checkResult(t *testing.T, ctx sdk.Context, foundationAccountAddr := accountKeeper.GetModuleAddress(types.FoundationAccount) newFoundationAccBalance := bankKeeper.GetAllBalances(ctx, foundationAccountAddr) newUnissuedPrepay := sdk.NewCoins(registerKeeper.GetTotalUnissuedPrepay(ctx)) - newCommunityPool := sdk.NewCoins(sdk.NewCoin(k.BondDenom(ctx), k.DistrKeeper.GetFeePool(ctx).CommunityPool.AmountOf(k.BondDenom(ctx)).TruncateInt())) + newCommunityPool := sdk.NewCoins(sdk.NewCoin(k.BondDenom(ctx), distrKeeper.GetFeePool(ctx).CommunityPool.AmountOf(k.BondDenom(ctx)).TruncateInt())) t.Log("resource node 1 initial slashingAmt = " + initialSlashingAmt.String()) currentSlashingAmt := registerKeeper.GetSlashing(ctx, resOwner1) diff --git a/x/pot/keeper/distribute.go b/x/pot/keeper/distribute.go index 1ea093aa..ea7e72ad 100644 --- a/x/pot/keeper/distribute.go +++ b/x/pot/keeper/distribute.go @@ -27,7 +27,7 @@ func (k Keeper) DistributePotReward(ctx sdk.Context, trafficList []*types.Single //1, calc traffic reward in total totalConsumedNoz = k.GetTotalConsumedNoz(trafficList).ToDec() - remaining, total := k.RegisterKeeper.NozSupply(ctx) + remaining, total := k.registerKeeper.NozSupply(ctx) if totalConsumedNoz.Add(remaining.ToDec()).GT(total.ToDec()) { return totalConsumedNoz, errors.New("remaining+consumed Noz exceeds total Noz supply") } @@ -67,8 +67,8 @@ func (k Keeper) DistributePotReward(ctx sdk.Context, trafficList []*types.Single k.SetLastReportedEpoch(ctx, epoch) //9, update remaining ozone limit - remainingNozLimit := k.RegisterKeeper.GetRemainingOzoneLimit(ctx) - k.RegisterKeeper.SetRemainingOzoneLimit(ctx, remainingNozLimit.Add(totalConsumedNoz.TruncateInt())) + remainingNozLimit := k.registerKeeper.GetRemainingOzoneLimit(ctx) + k.registerKeeper.SetRemainingOzoneLimit(ctx, remainingNozLimit.Add(totalConsumedNoz.TruncateInt())) //10, [TLC] transfer balance of miningReward&trafficReward pools to totalReward&totalSlashed pool, utilized for future Withdraw Tx err = k.transferTokens(ctx, totalSlashed) @@ -116,11 +116,11 @@ func (k Keeper) CalcTrafficRewardInTotal( // the total generated traffic rewards as [R] // R = (S + Pt) * Y / (Lt + Y) func (k Keeper) GetTrafficReward(ctx sdk.Context, totalConsumedNoz sdk.Dec) (result sdk.Dec) { - St := k.RegisterKeeper.GetEffectiveTotalStake(ctx).ToDec() + St := k.registerKeeper.GetEffectiveTotalStake(ctx).ToDec() if St.Equal(sdk.ZeroDec()) { ctx.Logger().Info("effective genesis deposit by all resource nodes and meta nodes is 0") } - Pt := k.RegisterKeeper.GetTotalUnissuedPrepay(ctx).Amount.ToDec() + Pt := k.registerKeeper.GetTotalUnissuedPrepay(ctx).Amount.ToDec() if Pt.Equal(sdk.ZeroDec()) { ctx.Logger().Info("total remaining prepay not issued is 0") } @@ -128,7 +128,7 @@ func (k Keeper) GetTrafficReward(ctx sdk.Context, totalConsumedNoz sdk.Dec) (res if Y.Equal(sdk.ZeroDec()) { ctx.Logger().Info("total consumed noz is 0") } - Lt := k.RegisterKeeper.GetRemainingOzoneLimit(ctx).ToDec() + Lt := k.registerKeeper.GetRemainingOzoneLimit(ctx).ToDec() if Lt.Equal(sdk.ZeroDec()) { ctx.Logger().Info("remaining total noz limit is 0") } @@ -210,7 +210,7 @@ func (k Keeper) rewardMatureAndSubSlashing(ctx sdk.Context, currentEpoch sdk.Int immatureToMature := individualReward.RewardFromMiningPool.Add(individualReward.RewardFromTrafficPool...) //deduct slashing amount from upcoming mature reward, don't need to deduct slashing from immatureTotal & individual - remaining, deducted := k.RegisterKeeper.DeductSlashing(ctx, walletAddress, immatureToMature, k.RewardDenom(ctx)) + remaining, deducted := k.registerKeeper.DeductSlashing(ctx, walletAddress, immatureToMature, k.RewardDenom(ctx)) totalSlashed = totalSlashed.Add(deducted...) matureTotal := oldMatureTotal.Add(remaining...) @@ -238,9 +238,9 @@ func (k Keeper) CalcRewardForResourceNode(ctx sdk.Context, totalConsumedNoz sdk. ) map[string]types.Reward { // 1, calc stake reward for resource node by stake - totalStakeOfResourceNodes := k.RegisterKeeper.GetResourceNodeBondedToken(ctx).Amount + totalStakeOfResourceNodes := k.registerKeeper.GetResourceNodeBondedToken(ctx).Amount - resourceNodeIterator := k.RegisterKeeper.GetResourceNodeIterator(ctx) + resourceNodeIterator := k.registerKeeper.GetResourceNodeIterator(ctx) defer resourceNodeIterator.Close() for ; resourceNodeIterator.Valid(); resourceNodeIterator.Next() { @@ -337,10 +337,10 @@ func (k Keeper) CalcRewardForResourceNode(ctx sdk.Context, totalConsumedNoz sdk. func (k Keeper) CalcRewardForMetaNode(ctx sdk.Context, distributeGoalBalance types.DistributeGoal, rewardDetailMap map[string]types.Reward, ) map[string]types.Reward { - totalStakeOfMetaNodes := k.RegisterKeeper.GetMetaNodeBondedToken(ctx).Amount - metaNodeCnt := k.RegisterKeeper.GetBondedMetaNodeCnt(ctx) + totalStakeOfMetaNodes := k.registerKeeper.GetMetaNodeBondedToken(ctx).Amount + metaNodeCnt := k.registerKeeper.GetBondedMetaNodeCnt(ctx) - mataNodeIterator := k.RegisterKeeper.GetMetaNodeIterator(ctx) + mataNodeIterator := k.registerKeeper.GetMetaNodeIterator(ctx) defer mataNodeIterator.Close() for ; mataNodeIterator.Valid(); mataNodeIterator.Next() { @@ -421,9 +421,9 @@ func (k Keeper) GetTotalConsumedNoz(trafficList []*types.SingleWalletVolume) sdk func (k Keeper) splitRewardByStake(ctx sdk.Context, totalReward sdk.Int, ) (validatorReward sdk.Int, resourceNodeReward sdk.Int, metaNodeReward sdk.Int) { - validatorBondedTokens := k.StakingKeeper.TotalBondedTokens(ctx).ToDec() - resourceNodeBondedTokens := k.RegisterKeeper.GetResourceNodeBondedToken(ctx).Amount.ToDec() - metaNodeBondedTokens := k.RegisterKeeper.GetMetaNodeBondedToken(ctx).Amount.ToDec() + validatorBondedTokens := k.stakingKeeper.TotalBondedTokens(ctx).ToDec() + resourceNodeBondedTokens := k.registerKeeper.GetResourceNodeBondedToken(ctx).Amount.ToDec() + metaNodeBondedTokens := k.registerKeeper.GetMetaNodeBondedToken(ctx).Amount.ToDec() totalBondedTokens := validatorBondedTokens.Add(resourceNodeBondedTokens).Add(metaNodeBondedTokens) @@ -445,39 +445,39 @@ func (k Keeper) splitRewardByStake(ctx sdk.Context, totalReward sdk.Int, func (k Keeper) transferTokens(ctx sdk.Context, totalSlashed sdk.Coins) error { // [TLC] [FoundationAccount -> feeCollectorPool] Transfer mining reward to fee_pool for validators - err := k.BankKeeper.SendCoinsFromModuleToModule(ctx, types.FoundationAccount, k.feeCollectorName, sdk.NewCoins(foundationToFeeCollector)) + err := k.bankKeeper.SendCoinsFromModuleToModule(ctx, types.FoundationAccount, k.feeCollectorName, sdk.NewCoins(foundationToFeeCollector)) if err != nil { return err } // [TLC] [TotalUnissuedPrepay -> feeCollectorPool] Transfer traffic reward to fee_pool for validators - err = k.BankKeeper.SendCoinsFromModuleToModule(ctx, regtypes.TotalUnissuedPrepay, k.feeCollectorName, sdk.NewCoins(unissuedPrepayToFeeCollector)) + err = k.bankKeeper.SendCoinsFromModuleToModule(ctx, regtypes.TotalUnissuedPrepay, k.feeCollectorName, sdk.NewCoins(unissuedPrepayToFeeCollector)) if err != nil { return err } // [TLC] [FoundationAccount -> TotalRewardPool] Transfer mining reward to TotalRewardPool for sds nodes - err = k.BankKeeper.SendCoinsFromModuleToModule(ctx, types.FoundationAccount, types.TotalRewardPool, sdk.NewCoins(foundationToReward)) + err = k.bankKeeper.SendCoinsFromModuleToModule(ctx, types.FoundationAccount, types.TotalRewardPool, sdk.NewCoins(foundationToReward)) if err != nil { return err } // [TLC] [TotalUnissuedPrepay -> TotalRewardPool] Transfer traffic reward to TotalRewardPool for sds nodes - err = k.BankKeeper.SendCoinsFromModuleToModule(ctx, regtypes.TotalUnissuedPrepay, types.TotalRewardPool, sdk.NewCoins(unissuedPrepayToReward)) + err = k.bankKeeper.SendCoinsFromModuleToModule(ctx, regtypes.TotalUnissuedPrepay, types.TotalRewardPool, sdk.NewCoins(unissuedPrepayToReward)) if err != nil { return err } // [TLC] [TotalRewardPool -> Distribution] Transfer slashed reward to FeePool.CommunityPool - totalRewardPoolAccAddr := k.AccountKeeper.GetModuleAddress(types.TotalRewardPool) - err = k.DistrKeeper.FundCommunityPool(ctx, totalSlashed, totalRewardPoolAccAddr) + totalRewardPoolAccAddr := k.accountKeeper.GetModuleAddress(types.TotalRewardPool) + err = k.distrKeeper.FundCommunityPool(ctx, totalSlashed, totalRewardPoolAccAddr) if err != nil { return err } // [TLC] [TotalUnissuedPrepay -> Distribution] Transfer tax to FeePool.CommunityPool taxCoins := sdk.NewCoins(sdk.NewCoin(k.BondDenom(ctx), unissuedPrepayToCommunityPool.TruncateInt())) - prepayAccAddr := k.AccountKeeper.GetModuleAddress(regtypes.TotalUnissuedPrepay) - err = k.DistrKeeper.FundCommunityPool(ctx, taxCoins, prepayAccAddr) + prepayAccAddr := k.accountKeeper.GetModuleAddress(regtypes.TotalUnissuedPrepay) + err = k.distrKeeper.FundCommunityPool(ctx, taxCoins, prepayAccAddr) if err != nil { return err } diff --git a/x/pot/keeper/grpc_query.go b/x/pot/keeper/grpc_query.go index 5c57b992..20e788e9 100644 --- a/x/pot/keeper/grpc_query.go +++ b/x/pot/keeper/grpc_query.go @@ -108,7 +108,7 @@ func (q Querier) PotRewardsByEpoch(c context.Context, req *types.QueryPotRewards return &types.QueryPotRewardsByEpochResponse{Rewards: res, Height: height, Pagination: rewardsPageRes}, nil } -func UnmarshalIndividualReward(cdc codec.BinaryCodec, value []byte) (v types.Reward, err error) { +func UnmarshalIndividualReward(cdc codec.Codec, value []byte) (v types.Reward, err error) { err = cdc.UnmarshalLengthPrefixed(value, &v) return v, err } @@ -270,7 +270,7 @@ func (q Querier) PotSlashingByOwner(c context.Context, req *types.QueryPotSlashi return &types.QueryPotSlashingByOwnerResponse{}, err } - slashing := q.RegisterKeeper.GetSlashing(ctx, walletAddr).String() + slashing := q.registerKeeper.GetSlashing(ctx, walletAddr).String() return &types.QueryPotSlashingByOwnerResponse{Slashing: slashing, Height: height}, nil } diff --git a/x/pot/keeper/keeper.go b/x/pot/keeper/keeper.go index 57ee726e..ef7743b2 100644 --- a/x/pot/keeper/keeper.go +++ b/x/pot/keeper/keeper.go @@ -18,11 +18,11 @@ type Keeper struct { cdc codec.Codec paramSpace paramstypes.Subspace feeCollectorName string // name of the FeeCollector ModuleAccount - BankKeeper types.BankKeeper - AccountKeeper types.AccountKeeper - StakingKeeper types.StakingKeeper - RegisterKeeper types.RegisterKeeper - DistrKeeper types.DistrKeeper + bankKeeper types.BankKeeper + accountKeeper types.AccountKeeper + stakingKeeper types.StakingKeeper + registerKeeper types.RegisterKeeper + distrKeeper types.DistrKeeper } // NewKeeper creates a pot keeper @@ -35,11 +35,11 @@ func NewKeeper(cdc codec.Codec, key sdk.StoreKey, paramSpace paramstypes.Subspac storeKey: key, paramSpace: paramSpace.WithKeyTable(types.ParamKeyTable()), feeCollectorName: feeCollectorName, - BankKeeper: bankKeeper, - AccountKeeper: accountKeeper, - StakingKeeper: stakingKeeper, - RegisterKeeper: registerKeeper, - DistrKeeper: distrKeeper, + bankKeeper: bankKeeper, + accountKeeper: accountKeeper, + stakingKeeper: stakingKeeper, + registerKeeper: registerKeeper, + distrKeeper: distrKeeper, } return keeper } @@ -70,12 +70,12 @@ func (k Keeper) VolumeReport(ctx sdk.Context, walletVolumes types.WalletVolumes, } func (k Keeper) IsSPNode(ctx sdk.Context, p2pAddr stratos.SdsAddress) (found bool) { - _, found = k.RegisterKeeper.GetMetaNode(ctx, p2pAddr) + _, found = k.registerKeeper.GetMetaNode(ctx, p2pAddr) return found } func (k Keeper) FoundationDeposit(ctx sdk.Context, amount sdk.Coins, from sdk.AccAddress) (err error) { - err = k.BankKeeper.SendCoinsFromAccountToModule(ctx, from, types.FoundationAccount, amount) + err = k.bankKeeper.SendCoinsFromAccountToModule(ctx, from, types.FoundationAccount, amount) if err != nil { return err } diff --git a/x/pot/keeper/msg_server.go b/x/pot/keeper/msg_server.go index 5267b218..ec204bd1 100644 --- a/x/pot/keeper/msg_server.go +++ b/x/pot/keeper/msg_server.go @@ -120,7 +120,7 @@ func (k msgServer) HandleMsgLegacyWithdraw(goCtx context.Context, msg *types.Msg return &types.MsgLegacyWithdrawResponse{}, sdkerrors.Wrap(types.ErrInvalidAddress, err.Error()) } - fromAcc := k.AccountKeeper.GetAccount(ctx, fromAddress) + fromAcc := k.accountKeeper.GetAccount(ctx, fromAddress) pubKey := fromAcc.GetPubKey() legacyPubKey := secp256k1.PubKey{Key: pubKey.Bytes()} legacyWalletAddress := sdk.AccAddress(legacyPubKey.Address().Bytes()) diff --git a/x/pot/keeper/querier.go b/x/pot/keeper/querier.go index 1d955fcc..e44882b7 100644 --- a/x/pot/keeper/querier.go +++ b/x/pot/keeper/querier.go @@ -162,5 +162,5 @@ func querySlashingByWalletAddress(ctx sdk.Context, req abci.RequestQuery, k Keep return []byte(sdk.ZeroInt().String()), types.ErrUnknownAccountAddress } - return []byte(k.RegisterKeeper.GetSlashing(ctx, addr).String()), nil + return []byte(k.registerKeeper.GetSlashing(ctx, addr).String()), nil } diff --git a/x/pot/keeper/slashing.go b/x/pot/keeper/slashing.go index c5e27ac6..7a63ddcf 100644 --- a/x/pot/keeper/slashing.go +++ b/x/pot/keeper/slashing.go @@ -8,17 +8,17 @@ import ( ) /* - This function only record slashing amount. +This function only record slashing amount. - Deduct slashing amount when: - 1, calculate upcoming mature reward, deduct from mature_total & upcoming mature reward. - 2, unstaking meta node. - 3, unstaking resource node. +Deduct slashing amount when: +1, calculate upcoming mature reward, deduct from mature_total & upcoming mature reward. +2, unstaking meta node. +3, unstaking resource node. */ func (k Keeper) SlashingResourceNode(ctx sdk.Context, p2pAddr stratos.SdsAddress, walletAddr sdk.AccAddress, nozAmt sdk.Int, suspend bool) (tokenAmt sdk.Int, nodeType registertypes.NodeType, err error) { - node, ok := k.RegisterKeeper.GetResourceNode(ctx, p2pAddr) + node, ok := k.registerKeeper.GetResourceNode(ctx, p2pAddr) if !ok { return sdk.ZeroInt(), registertypes.NodeType(0), registertypes.ErrNoResourceNodeFound } @@ -34,16 +34,16 @@ func (k Keeper) SlashingResourceNode(ctx sdk.Context, p2pAddr stratos.SdsAddress totalConsumedNoz := k.GetTotalConsumedNoz(trafficList).ToDec() slashTokenAmt := k.GetTrafficReward(ctx, totalConsumedNoz) - oldSlashing := k.RegisterKeeper.GetSlashing(ctx, walletAddr) + oldSlashing := k.registerKeeper.GetSlashing(ctx, walletAddr) // only slashing the reward token for now. newSlashing := oldSlashing.Add(slashTokenAmt.TruncateInt()) - k.RegisterKeeper.SetResourceNode(ctx, node) - k.RegisterKeeper.SetSlashing(ctx, walletAddr, newSlashing) + k.registerKeeper.SetResourceNode(ctx, node) + k.registerKeeper.SetSlashing(ctx, walletAddr, newSlashing) // before calc ozone limit change, get unbonding stake and calc effective stake to trigger ozLimit change - unbondingStake := k.RegisterKeeper.GetUnbondingNodeBalance(ctx, p2pAddr) + unbondingStake := k.registerKeeper.GetUnbondingNodeBalance(ctx, p2pAddr) stakeToMakeOzoneLimitChange := sdk.ZeroInt() // no effective stake after subtracting unbonding stake if node.Tokens.LTE(unbondingStake) { @@ -51,10 +51,10 @@ func (k Keeper) SlashingResourceNode(ctx sdk.Context, p2pAddr stratos.SdsAddress } stakeToMakeOzoneLimitChange = node.Tokens.Sub(unbondingStake) if toBeSuspended { - k.RegisterKeeper.DecreaseOzoneLimitBySubtractStake(ctx, stakeToMakeOzoneLimitChange) + k.registerKeeper.DecreaseOzoneLimitBySubtractStake(ctx, stakeToMakeOzoneLimitChange) } if toBeUnsuspended { - k.RegisterKeeper.IncreaseOzoneLimitByAddStake(ctx, stakeToMakeOzoneLimitChange) + k.registerKeeper.IncreaseOzoneLimitByAddStake(ctx, stakeToMakeOzoneLimitChange) } return slashTokenAmt.TruncateInt(), registertypes.NodeType(node.NodeType), nil diff --git a/x/pot/keeper/store.go b/x/pot/keeper/store.go index d1f2af66..0731a67d 100644 --- a/x/pot/keeper/store.go +++ b/x/pot/keeper/store.go @@ -37,9 +37,9 @@ func (k Keeper) GetLastReportedEpoch(ctx sdk.Context) (epoch sdk.Int) { if b == nil { return sdk.ZeroInt() } - var intVal stratos.Int - k.cdc.MustUnmarshalLengthPrefixed(b, &intVal) - epoch = *intVal.Value + intValue := stratos.Int{} + k.cdc.MustUnmarshalLengthPrefixed(b, &intValue) + epoch = *intValue.Value return } @@ -67,7 +67,7 @@ func (k Keeper) IteratorIndividualReward(ctx sdk.Context, epoch sdk.Int, handler for ; iter.Valid(); iter.Next() { addr := sdk.AccAddress(iter.Key()[len(types.GetIndividualRewardIteratorKey(epoch)):]) - var individualReward types.Reward + individualReward := types.Reward{} k.cdc.MustUnmarshalLengthPrefixed(iter.Value(), &individualReward) if handler(addr, individualReward) { break @@ -87,9 +87,9 @@ func (k Keeper) GetMatureTotalReward(ctx sdk.Context, walletAddress sdk.AccAddre if b == nil { return sdk.Coins{} } - var coinsVal stratos.Coins - k.cdc.MustUnmarshalLengthPrefixed(b, &coinsVal) - value = coinsVal.GetValue() + coinsValue := stratos.Coins{} + k.cdc.MustUnmarshalLengthPrefixed(b, &coinsValue) + value = coinsValue.GetValue() return } @@ -100,9 +100,9 @@ func (k Keeper) IteratorMatureTotal(ctx sdk.Context, handler func(walletAddress defer iter.Close() for ; iter.Valid(); iter.Next() { addr := sdk.AccAddress(iter.Key()[len(types.MatureTotalRewardKeyPrefix):]) - var value stratos.Coins - k.cdc.MustUnmarshalLengthPrefixed(iter.Value(), &value) - matureTotal := value.Value + coinsValue := stratos.Coins{} + k.cdc.MustUnmarshalLengthPrefixed(iter.Value(), &coinsValue) + matureTotal := coinsValue.Value if handler(addr, matureTotal) { break } @@ -121,9 +121,9 @@ func (k Keeper) GetImmatureTotalReward(ctx sdk.Context, walletAddress sdk.AccAdd if b == nil { return sdk.Coins{} } - var coinsVal stratos.Coins - k.cdc.MustUnmarshalLengthPrefixed(b, &coinsVal) - value = coinsVal.GetValue() + coinsValue := stratos.Coins{} + k.cdc.MustUnmarshalLengthPrefixed(b, &coinsValue) + value = coinsValue.GetValue() return } @@ -134,9 +134,9 @@ func (k Keeper) IteratorImmatureTotal(ctx sdk.Context, handler func(walletAddres defer iter.Close() for ; iter.Valid(); iter.Next() { addr := sdk.AccAddress(iter.Key()[len(types.ImmatureTotalRewardKeyPrefix):]) - var value stratos.Coins - k.cdc.MustUnmarshalLengthPrefixed(iter.Value(), &value) - immatureTotal := value.Value + coinsValue := stratos.Coins{} + k.cdc.MustUnmarshalLengthPrefixed(iter.Value(), &coinsValue) + immatureTotal := coinsValue.Value if handler(addr, immatureTotal) { break } @@ -187,9 +187,9 @@ func (k Keeper) GetUnhandledEpoch(ctx sdk.Context) (epoch sdk.Int) { if b == nil { return sdk.ZeroInt() } - var value stratos.Int - k.cdc.MustUnmarshalLengthPrefixed(b, &value) - epoch = *value.Value + intValue := stratos.Int{} + k.cdc.MustUnmarshalLengthPrefixed(b, &intValue) + epoch = *intValue.Value return } @@ -205,9 +205,9 @@ func (k Keeper) GetIsReadyToDistributeReward(ctx sdk.Context) (isReady bool) { if b == nil { return false } - var value gogotypes.BoolValue - k.cdc.MustUnmarshalLengthPrefixed(b, &value) - isReady = value.Value + boolValue := gogotypes.BoolValue{} + k.cdc.MustUnmarshalLengthPrefixed(b, &boolValue) + isReady = boolValue.Value return } diff --git a/x/pot/keeper/withdraw.go b/x/pot/keeper/withdraw.go index 3459ec53..0b6f24aa 100644 --- a/x/pot/keeper/withdraw.go +++ b/x/pot/keeper/withdraw.go @@ -10,7 +10,7 @@ func (k Keeper) Withdraw(ctx sdk.Context, amount sdk.Coins, walletAddress sdk.Ac if !matureReward.IsAllGTE(amount) { return types.ErrInsufficientMatureTotal } - err := k.BankKeeper.SendCoinsFromModuleToAccount(ctx, types.TotalRewardPool, targetAddress, amount) + err := k.bankKeeper.SendCoinsFromModuleToAccount(ctx, types.TotalRewardPool, targetAddress, amount) if err != nil { return err } diff --git a/x/pot/types/expected_keepers.go b/x/pot/types/expected_keepers.go index 34880d69..83ec7862 100644 --- a/x/pot/types/expected_keepers.go +++ b/x/pot/types/expected_keepers.go @@ -4,37 +4,18 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" - paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" stratos "github.com/stratosnet/stratos-chain/types" "github.com/stratosnet/stratos-chain/x/register/types" ) -// ParamSubSpace defines the expected Subspace interface -type ParamSubSpace interface { - WithKeyTable(table paramstypes.KeyTable) paramstypes.Subspace - Get(ctx sdk.Context, key []byte, ptr interface{}) - GetParamSet(ctx sdk.Context, ps paramstypes.ParamSet) - SetParamSet(ctx sdk.Context, ps paramstypes.ParamSet) -} - // AccountKeeper defines the expected account keeper (noalias) type AccountKeeper interface { - IterateAccounts(ctx sdk.Context, process func(authtypes.AccountI) (stop bool)) GetAccount(ctx sdk.Context, addr sdk.AccAddress) authtypes.AccountI // only used for simulation - GetModuleAddress(name string) sdk.AccAddress - GetModuleAccount(ctx sdk.Context, moduleName string) authtypes.ModuleAccountI - - // SetModuleAccount TODO remove with genesis 2-phases refactor https://github.com/cosmos/cosmos-sdk/issues/2862 - SetModuleAccount(sdk.Context, authtypes.ModuleAccountI) } // BankKeeper defines the expected interface needed to retrieve account balances. type BankKeeper interface { - HasBalance(ctx sdk.Context, addr sdk.AccAddress, amt sdk.Coin) bool - GetAllBalances(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins - GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin - SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error SendCoinsFromModuleToModule(ctx sdk.Context, senderPool, recipientPool string, amt sdk.Coins) error @@ -56,9 +37,7 @@ type RegisterKeeper interface { GetResourceNodeBondedToken(ctx sdk.Context) (token sdk.Coin) GetMetaNodeBondedToken(ctx sdk.Context) (token sdk.Coin) - GetInitialGenesisStakeTotal(ctx sdk.Context) (stake sdk.Int) GetEffectiveTotalStake(ctx sdk.Context) (stake sdk.Int) - SetEffectiveTotalStake(ctx sdk.Context, stake sdk.Int) GetResourceNodeIterator(ctx sdk.Context) sdk.Iterator GetMetaNodeIterator(ctx sdk.Context) sdk.Iterator diff --git a/x/register/allow_ed25519_gas_test.go b/x/register/allow_ed25519_gas_test.go index 66798d3e..4b75d451 100644 --- a/x/register/allow_ed25519_gas_test.go +++ b/x/register/allow_ed25519_gas_test.go @@ -37,7 +37,7 @@ package register // ) // t.Log("registerResNodeMsg: ", registerResNodeMsg) // -// resOwnerAcc3 := mApp.AccountKeeper.GetAccount(ctx, resOwnerAddr3) +// resOwnerAcc3 := mApp.accountKeeper.GetAccount(ctx, resOwnerAddr3) // accNumOwner := resOwnerAcc3.GetAccountNumber() // t.Log("accNumOwner: ", accNumOwner) // accSeqOwner := resOwnerAcc3.GetSequence() diff --git a/x/register/app_test.go b/x/register/app_test.go index 487d530d..39c077b5 100644 --- a/x/register/app_test.go +++ b/x/register/app_test.go @@ -52,11 +52,11 @@ package register // header = abci.Header{Height: mApp.LastBlockHeight() + 1} // ctx = mApp.BaseApp.NewContext(true, header) // registerResNodeMsg := types.NewMsgCreateResourceNode(resNodeNetworkId2, resNodePubKey2, sdk.NewCoin(k.BondDenom(ctx), resNodeInitStake), resOwnerAddr2, NewDescription("sds://resourceNode2", "", "", "", ""), 4) -// resNodeOwnerAcc2 := mApp.AccountKeeper.GetAccount(ctx, resOwnerAddr2) +// resNodeOwnerAcc2 := mApp.accountKeeper.GetAccount(ctx, resOwnerAddr2) // accNumOwner := resNodeOwnerAcc2.GetAccountNumber() // accSeqOwner := resNodeOwnerAcc2.GetSequence() // -// resNodeAcc2 := mApp.AccountKeeper.GetAccount(ctx, resNodeAddr2) +// resNodeAcc2 := mApp.accountKeeper.GetAccount(ctx, resNodeAddr2) // accNumNode := resNodeAcc2.GetAccountNumber() // accSeqNode := resNodeAcc2.GetSequence() // @@ -79,11 +79,11 @@ package register // header = abci.Header{Height: mApp.LastBlockHeight() + 1} // ctx = mApp.BaseApp.NewContext(true, header) // registerIdxNodeMsg := types.NewMsgCreateIndexingNode(idxNodeNetworkId3, idxNodePubKey3, sdk.NewCoin(k.BondDenom(ctx), idxNodeInitStake), idxOwnerAddr3, NewDescription("sds://indexingNode3", "", "", "", "")) -// idxOwnerAcc3 := mApp.AccountKeeper.GetAccount(ctx, idxOwnerAddr3) +// idxOwnerAcc3 := mApp.accountKeeper.GetAccount(ctx, idxOwnerAddr3) // accNumOwner = idxOwnerAcc3.GetAccountNumber() // accSeqOwner = idxOwnerAcc3.GetSequence() // -// idxNodeAcc3 := mApp.AccountKeeper.GetAccount(ctx, idxNodeAddr3) +// idxNodeAcc3 := mApp.accountKeeper.GetAccount(ctx, idxNodeAddr3) // accNumNode = idxNodeAcc3.GetAccountNumber() // accSeqNode = idxNodeAcc3.GetSequence() // @@ -106,7 +106,7 @@ package register // header = abci.Header{Height: mApp.LastBlockHeight() + 1} // ctx = mApp.BaseApp.NewContext(true, header) // voteMsg := types.NewMsgIndexingNodeRegistrationVote(idxNodeNetworkId3, idxOwnerAddr3, types.Approve, idxNodeNetworkId1, idxOwnerAddr1) -// idxOwnerAcc1 := mApp.AccountKeeper.GetAccount(ctx, idxOwnerAddr1) +// idxOwnerAcc1 := mApp.accountKeeper.GetAccount(ctx, idxOwnerAddr1) // accNumOwner = idxOwnerAcc1.GetAccountNumber() // accSeqOwner = idxOwnerAcc1.GetSequence() // @@ -148,24 +148,24 @@ package register // blacklistedAddrs[notBondedPool.GetAddress().String()] = true // blacklistedAddrs[bondPool.GetAddress().String()] = true // -// bankKeeper := bank.NewBaseKeeper(mApp.AccountKeeper, mApp.ParamsKeeper.Subspace(bank.DefaultParamspace), blacklistedAddrs) +// bankKeeper := bank.NewBaseKeeper(mApp.accountKeeper, mApp.ParamsKeeper.Subspace(bank.DefaultParamspace), blacklistedAddrs) // maccPerms := map[string][]string{ // auth.FeeCollectorName: {"fee_collector"}, // staking.NotBondedPoolName: {supply.Burner, supply.Staking}, // staking.BondedPoolName: {supply.Burner, supply.Staking}, // } -// supplyKeeper := supply.NewKeeper(mApp.Cdc, keySupply, mApp.AccountKeeper, bankKeeper, maccPerms) +// supplyKeeper := supply.NewKeeper(mApp.Cdc, keySupply, mApp.accountKeeper, bankKeeper, maccPerms) // stakingKeeper := staking.NewKeeper(mApp.Cdc, keyStaking, supplyKeeper, mApp.ParamsKeeper.Subspace(staking.DefaultParamspace)) -// keeper := NewKeeper(mApp.Cdc, keyRegister, mApp.ParamsKeeper.Subspace(DefaultParamSpace), mApp.AccountKeeper, bankKeeper) +// keeper := NewKeeper(mApp.Cdc, keyRegister, mApp.ParamsKeeper.Subspace(DefaultParamSpace), mApp.accountKeeper, bankKeeper) // -// anteHandler := ante.NewAnteHandler(mApp.AccountKeeper, supplyKeeper, helpers.StSigVerificationGasConsumer) +// anteHandler := ante.NewAnteHandler(mApp.accountKeeper, supplyKeeper, helpers.StSigVerificationGasConsumer) // mApp.SetAnteHandler(anteHandler) // // mApp.Router().AddRoute(bank.RouterKey, bank.NewHandler(bankKeeper)) // mApp.Router().AddRoute(staking.RouterKey, staking.NewHandler(stakingKeeper)) // mApp.Router().AddRoute(RouterKey, NewHandler(keeper)) // mApp.SetEndBlocker(getEndBlocker(keeper)) -// mApp.SetInitChainer(getInitChainer(mApp, keeper, mApp.AccountKeeper, supplyKeeper, +// mApp.SetInitChainer(getInitChainer(mApp, keeper, mApp.accountKeeper, supplyKeeper, // []supplyexported.ModuleAccountI{feeCollector, notBondedPool, bondPool}, stakingKeeper, bankKeeper)) // // err := mApp.CompleteSetup(keyStaking, keySupply, keyRegister) @@ -176,7 +176,7 @@ package register // //// getInitChainer initializes the chainer of the mock app and sets the genesis //// state. It returns an empty ResponseInitChain. -//func getInitChainer(mapp *mock.App, keeper Keeper, accountKeeper auth.AccountKeeper, supplyKeeper supply.Keeper, +//func getInitChainer(mapp *mock.App, keeper Keeper, accountKeeper auth.accountKeeper, supplyKeeper supply.Keeper, // blacklistedAddrs []supplyexported.ModuleAccountI, stakingKeeper staking.Keeper, bankKeeper bank.Keeper) sdk.InitChainer { // return func(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain { // // set module accounts @@ -225,7 +225,7 @@ package register //// getEndBlocker returns a staking endblocker. //func getEndBlocker(keeper Keeper) sdk.EndBlocker { // //return func(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock { -// // validatorUpdates := keeper.StakingKeeper.BlockValidatorUpdates(ctx) +// // validatorUpdates := keeper.stakingKeeper.BlockValidatorUpdates(ctx) // // // // return abci.ResponseEndBlock{ // // ValidatorUpdates: validatorUpdates, diff --git a/x/register/genesis.go b/x/register/genesis.go index dbd01c3c..000a2012 100644 --- a/x/register/genesis.go +++ b/x/register/genesis.go @@ -32,14 +32,16 @@ func InitGenesis(ctx sdk.Context, keeper keeper.Keeper, data *types.GenesisState initialStakeTotal = initialStakeTotal.Add(resourceNode.Tokens) } if freshStart { - err = keeper.SendCoinsFromAccountToResNodeBondedPool(ctx, ownerAddr, sdk.NewCoin(keeper.BondDenom(ctx), resourceNode.Tokens)) + amount := sdk.NewCoin(keeper.BondDenom(ctx), resourceNode.Tokens) + err = keeper.GetBankKeeper().SendCoinsFromAccountToModule(ctx, ownerAddr, types.ResourceNodeBondedPool, sdk.NewCoins(amount)) if err != nil { panic(err) } } case stakingtypes.Unbonded: if freshStart { - err = keeper.SendCoinsFromAccountToResNodeNotBondedPool(ctx, ownerAddr, sdk.NewCoin(keeper.BondDenom(ctx), resourceNode.Tokens)) + amount := sdk.NewCoin(keeper.BondDenom(ctx), resourceNode.Tokens) + err = keeper.GetBankKeeper().SendCoinsFromAccountToModule(ctx, ownerAddr, types.ResourceNodeNotBondedPool, sdk.NewCoins(amount)) if err != nil { panic(err) } @@ -65,14 +67,16 @@ func InitGenesis(ctx sdk.Context, keeper keeper.Keeper, data *types.GenesisState initialStakeTotal = initialStakeTotal.Add(metaNode.Tokens) } if freshStart { - err = keeper.SendCoinsFromAccountToMetaNodeBondedPool(ctx, ownerAddr, sdk.NewCoin(keeper.BondDenom(ctx), metaNode.Tokens)) + amount := sdk.NewCoin(keeper.BondDenom(ctx), metaNode.Tokens) + err = keeper.GetBankKeeper().SendCoinsFromAccountToModule(ctx, ownerAddr, types.MetaNodeBondedPool, sdk.NewCoins(amount)) if err != nil { panic(err) } } case stakingtypes.Unbonded: if freshStart { - err = keeper.SendCoinsFromAccountToMetaNodeNotBondedPool(ctx, ownerAddr, sdk.NewCoin(keeper.BondDenom(ctx), metaNode.Tokens)) + amount := sdk.NewCoin(keeper.BondDenom(ctx), metaNode.Tokens) + err = keeper.GetBankKeeper().SendCoinsFromAccountToModule(ctx, ownerAddr, types.MetaNodeNotBondedPool, sdk.NewCoins(amount)) if err != nil { panic(err) } diff --git a/x/register/keeper/indexing_node_test.go b/x/register/keeper/indexing_node_test.go deleted file mode 100644 index f52d6a74..00000000 --- a/x/register/keeper/indexing_node_test.go +++ /dev/null @@ -1,250 +0,0 @@ -package keeper - -// -//import ( -// "testing" -// "time" -// -// sdk "github.com/cosmos/cosmos-sdk/types" -// "github.com/cosmos/cosmos-sdk/x/auth" -// "github.com/cosmos/cosmos-sdk/x/bank" -// stratos "github.com/stratosnet/stratos-chain/types" -// "github.com/stratosnet/stratos-chain/x/register/types" -// "github.com/stretchr/testify/require" -// "github.com/tendermint/tendermint/crypto/ed25519" -//) -// -//var ( -// spNodeOwner1 = sdk.AccAddress(ed25519.GenPrivKey().PubKey().Address()) -// spNodeOwner2 = sdk.AccAddress(ed25519.GenPrivKey().PubKey().Address()) -// spNodeOwner3 = sdk.AccAddress(ed25519.GenPrivKey().PubKey().Address()) -// spNodeOwner4 = sdk.AccAddress(ed25519.GenPrivKey().PubKey().Address()) -// spNodeOwnerNew = sdk.AccAddress(ed25519.GenPrivKey().PubKey().Address()) -// -// spNodePubKey1 = ed25519.GenPrivKey().PubKey() -// spNodeAddr1 = stratos.SdsAddress(spNodePubKey1.Address()) -// initialStake1 = sdk.NewInt(100000000) -// -// spNodePubKey2 = ed25519.GenPrivKey().PubKey() -// spNodeAddr2 = stratos.SdsAddress(spNodePubKey2.Address()) -// initialStake2 = sdk.NewInt(100000000) -// -// spNodePubKey3 = ed25519.GenPrivKey().PubKey() -// spNodeAddr3 = stratos.SdsAddress(spNodePubKey3.Address()) -// initialStake3 = sdk.NewInt(100000000) -// -// spNodePubKey4 = ed25519.GenPrivKey().PubKey() -// spNodeAddr4 = stratos.SdsAddress(spNodePubKey4.Address()) -// initialStake4 = sdk.NewInt(100000000) -// -// spNodePubKeyNew = ed25519.GenPrivKey().PubKey() -// spNodeAddrNew = stratos.SdsAddress(spNodePubKeyNew.Address()) -// spNodeStakeNew = sdk.NewInt(100000000) -//) -// -//func TestExpiredVote(t *testing.T) { -// -// ctx, accountKeeper, bankKeeper, k, _ := CreateTestInput(t, false) -// time, _ := time.Parse(time.RubyDate, "Fri Sep 24 10:37:13 -0400 2021") -// //genesis init Sp nodes. -// genesisSpNode1 := types.NewIndexingNode(spNodeAddr1, spNodePubKey1, spNodeOwner1, types.NewDescription(spNodeAddr1.String(), "", "", "", ""), time) -// genesisSpNode2 := types.NewIndexingNode(spNodeAddr2, spNodePubKey2, spNodeOwner2, types.NewDescription(spNodeAddr2.String(), "", "", "", ""), time) -// genesisSpNode3 := types.NewIndexingNode(spNodeAddr3, spNodePubKey3, spNodeOwner3, types.NewDescription(spNodeAddr3.String(), "", "", "", ""), time) -// genesisSpNode4 := types.NewIndexingNode(spNodeAddr4, spNodePubKey4, spNodeOwner4, types.NewDescription(spNodeAddr4.String(), "", "", "", ""), time) -// genesisSpNode1.Tokens = genesisSpNode1.Tokens.Add(initialStake1) -// genesisSpNode2.Tokens = genesisSpNode2.Tokens.Add(initialStake2) -// genesisSpNode3.Tokens = genesisSpNode3.Tokens.Add(initialStake3) -// genesisSpNode4.Tokens = genesisSpNode3.Tokens.Add(initialStake4) -// genesisSpNode1.Status = sdk.Bonded -// genesisSpNode2.Status = sdk.Bonded -// genesisSpNode3.Status = sdk.Bonded -// genesisSpNode4.Status = sdk.Bonded -// -// k.SetIndexingNode(ctx, genesisSpNode1) -// k.SetIndexingNode(ctx, genesisSpNode2) -// k.SetIndexingNode(ctx, genesisSpNode3) -// k.SetIndexingNode(ctx, genesisSpNode4) -// k.SetLastIndexingNodeStake(ctx, spNodeAddr1, initialStake1) -// k.SetLastIndexingNodeStake(ctx, spNodeAddr2, initialStake2) -// k.SetLastIndexingNodeStake(ctx, spNodeAddr3, initialStake3) -// k.SetLastIndexingNodeStake(ctx, spNodeAddr4, initialStake4) -// k.SetIndexingNodeBondedToken(ctx, sdk.NewCoin(k.BondDenom(ctx), initialStake1.Add(initialStake2).Add(initialStake3).Add(initialStake4))) -// k.SetInitialGenesisStakeTotal(ctx, initialStake1.Add(initialStake2).Add(initialStake3).Add(initialStake4)) -// -// //Register new SP node after genesis initialized -// createAccount(t, ctx, accountKeeper, bankKeeper, spNodeOwnerNew, sdk.NewCoins(sdk.NewCoin("wei", spNodeStakeNew))) -// _, err := k.RegisterIndexingNode(ctx, spNodeAddrNew, spNodePubKeyNew, spNodeOwnerNew, -// types.NewDescription("sds://newIndexingNode", "", "", "", ""), sdk.NewCoin("wei", spNodeStakeNew)) -// require.NoError(t, err) -// -// //set expireTime of voting to 7 days before -// votePool, found := k.GetIndexingNodeRegistrationVotePool(ctx, spNodeAddrNew) -// require.True(t, found) -// require.NotNil(t, votePool) -// votePool.ExpireTime = votePool.ExpireTime.AddDate(0, 0, -7) -// k.SetIndexingNodeRegistrationVotePool(ctx, votePool) -// -// //After registration, the status of new SP node is UNBONDED -// _, found = k.GetIndexingNode(ctx, spNodeAddrNew) -// require.True(t, found) -// require.Error(t, types.ErrVoteExpired) -//} -// -//func TestDuplicateVote(t *testing.T) { -// -// ctx, accountKeeper, bankKeeper, k, _ := CreateTestInput(t, false) -// time, _ := time.Parse(time.RubyDate, "Fri Sep 24 10:37:13 -0400 2021") -// //genesis init Sp nodes. -// genesisSpNode1 := types.NewIndexingNode(spNodeAddr1, spNodePubKey1, spNodeOwner1, types.NewDescription(spNodeAddr1.String(), "", "", "", ""), time) -// genesisSpNode2 := types.NewIndexingNode(spNodeAddr2, spNodePubKey2, spNodeOwner2, types.NewDescription(spNodeAddr2.String(), "", "", "", ""), time) -// genesisSpNode3 := types.NewIndexingNode(spNodeAddr3, spNodePubKey3, spNodeOwner3, types.NewDescription(spNodeAddr3.String(), "", "", "", ""), time) -// genesisSpNode4 := types.NewIndexingNode(spNodeAddr4, spNodePubKey4, spNodeOwner4, types.NewDescription(spNodeAddr4.String(), "", "", "", ""), time) -// genesisSpNode1.Tokens = genesisSpNode1.Tokens.Add(initialStake1) -// genesisSpNode2.Tokens = genesisSpNode2.Tokens.Add(initialStake2) -// genesisSpNode3.Tokens = genesisSpNode3.Tokens.Add(initialStake3) -// genesisSpNode4.Tokens = genesisSpNode3.Tokens.Add(initialStake4) -// genesisSpNode1.Status = sdk.Bonded -// genesisSpNode2.Status = sdk.Bonded -// genesisSpNode3.Status = sdk.Bonded -// genesisSpNode4.Status = sdk.Bonded -// -// k.SetIndexingNode(ctx, genesisSpNode1) -// k.SetIndexingNode(ctx, genesisSpNode2) -// k.SetIndexingNode(ctx, genesisSpNode3) -// k.SetIndexingNode(ctx, genesisSpNode4) -// k.SetLastIndexingNodeStake(ctx, spNodeAddr1, initialStake1) -// k.SetLastIndexingNodeStake(ctx, spNodeAddr2, initialStake2) -// k.SetLastIndexingNodeStake(ctx, spNodeAddr3, initialStake3) -// k.SetLastIndexingNodeStake(ctx, spNodeAddr4, initialStake4) -// k.SetIndexingNodeBondedToken(ctx, sdk.NewCoin(k.BondDenom(ctx), initialStake1.Add(initialStake2).Add(initialStake3).Add(initialStake4))) -// k.SetInitialGenesisStakeTotal(ctx, initialStake1.Add(initialStake2).Add(initialStake3).Add(initialStake4)) -// -// //Register new SP node after genesis initialized -// createAccount(t, ctx, accountKeeper, bankKeeper, spNodeOwnerNew, sdk.NewCoins(sdk.NewCoin("wei", spNodeStakeNew))) -// _, err := k.RegisterIndexingNode(ctx, spNodeAddrNew, spNodePubKeyNew, spNodeOwnerNew, -// types.NewDescription("sds://newIndexingNode", "", "", "", ""), sdk.NewCoin("wei", spNodeStakeNew)) -// require.NoError(t, err) -// -// //After registration, the status of new SP node is UNBONDED -// newNode, found := k.GetIndexingNode(ctx, spNodeAddrNew) -// require.True(t, found) -// require.Equal(t, newNode.Status, sdk.Unbonded) -// -// //Exist SP Node1 vote to approve, the status of new SP node is UNBONDED -// err = handlerSimulate(ctx, k, types.NewMsgIndexingNodeRegistrationVote(spNodeAddrNew, spNodeOwnerNew, types.Approve, spNodeAddr1, spNodeOwner1)) -// require.NoError(t, err) -// newNode, found = k.GetIndexingNode(ctx, spNodeAddrNew) -// require.True(t, found) -// require.Equal(t, newNode.Status, sdk.Unbonded) -// -// //Exist SP Node1 vote to approve, the status of new SP node is UNBONDED -// err = handlerSimulate(ctx, k, types.NewMsgIndexingNodeRegistrationVote(spNodeAddrNew, spNodeOwnerNew, types.Approve, spNodeAddr1, spNodeOwner1)) -// require.Error(t, types.ErrDuplicateVoting) -//} -// -//func TestSpRegistrationApproval(t *testing.T) { -// -// ctx, accountKeeper, bankKeeper, k, _ := CreateTestInput(t, false) -// time, _ := time.Parse(time.RubyDate, "Fri Sep 24 10:37:13 -0400 2021") -// //genesis init Sp nodes. -// genesisSpNode1 := types.NewIndexingNode(spNodeAddr1, spNodePubKey1, spNodeOwner1, types.NewDescription(spNodeAddr1.String(), "", "", "", ""), time) -// genesisSpNode2 := types.NewIndexingNode(spNodeAddr2, spNodePubKey2, spNodeOwner2, types.NewDescription(spNodeAddr2.String(), "", "", "", ""), time) -// genesisSpNode3 := types.NewIndexingNode(spNodeAddr3, spNodePubKey3, spNodeOwner3, types.NewDescription(spNodeAddr3.String(), "", "", "", ""), time) -// genesisSpNode4 := types.NewIndexingNode(spNodeAddr4, spNodePubKey4, spNodeOwner4, types.NewDescription(spNodeAddr4.String(), "", "", "", ""), time) -// genesisSpNode1.Tokens = genesisSpNode1.Tokens.Add(initialStake1) -// genesisSpNode2.Tokens = genesisSpNode2.Tokens.Add(initialStake2) -// genesisSpNode3.Tokens = genesisSpNode3.Tokens.Add(initialStake3) -// genesisSpNode4.Tokens = genesisSpNode3.Tokens.Add(initialStake4) -// genesisSpNode1.Status = sdk.Bonded -// genesisSpNode2.Status = sdk.Bonded -// genesisSpNode3.Status = sdk.Bonded -// genesisSpNode4.Status = sdk.Bonded -// -// k.SetIndexingNode(ctx, genesisSpNode1) -// k.SetIndexingNode(ctx, genesisSpNode2) -// k.SetIndexingNode(ctx, genesisSpNode3) -// k.SetIndexingNode(ctx, genesisSpNode4) -// k.SetLastIndexingNodeStake(ctx, spNodeAddr1, initialStake1) -// k.SetLastIndexingNodeStake(ctx, spNodeAddr2, initialStake2) -// k.SetLastIndexingNodeStake(ctx, spNodeAddr3, initialStake3) -// k.SetLastIndexingNodeStake(ctx, spNodeAddr4, initialStake4) -// k.SetIndexingNodeBondedToken(ctx, sdk.NewCoin(k.BondDenom(ctx), initialStake1.Add(initialStake2).Add(initialStake3).Add(initialStake4))) -// k.SetInitialGenesisStakeTotal(ctx, initialStake1.Add(initialStake2).Add(initialStake3).Add(initialStake4)) -// -// //Register new SP node after genesis initialized -// createAccount(t, ctx, accountKeeper, bankKeeper, spNodeOwnerNew, sdk.NewCoins(sdk.NewCoin("wei", spNodeStakeNew))) -// //_, err := k.bankKeeper.AddCoins(ctx, spNodeAddr4, sdk.NewCoins(sdk.NewCoin(k.BondDenom(ctx), sdk.NewInt(10000000000000)))) -// //require.NoError(t, err) -// -// _, err := k.RegisterIndexingNode(ctx, spNodeAddrNew, spNodePubKeyNew, spNodeOwnerNew, -// types.NewDescription("sds://newIndexingNode", "", "", "", ""), sdk.NewCoin("wei", spNodeStakeNew)) -// require.NoError(t, err) -// -// //After registration, the status of new SP node is UNBONDED -// newNode, found := k.GetIndexingNode(ctx, spNodeAddrNew) -// require.True(t, found) -// require.Equal(t, newNode.Status, sdk.Unbonded) -// -// //Exist SP Node1 vote to approve, the status of new SP node is UNBONDED -// err = handlerSimulate(ctx, k, types.NewMsgIndexingNodeRegistrationVote(spNodeAddrNew, spNodeOwnerNew, types.Approve, spNodeAddr1, spNodeOwner1)) -// require.NoError(t, err) -// newNode, found = k.GetIndexingNode(ctx, spNodeAddrNew) -// require.True(t, found) -// require.Equal(t, newNode.Status, sdk.Unbonded) -// -// //Exist SP Node2 vote to approve, the status of new SP node is UNBONDED -// err = handlerSimulate(ctx, k, types.NewMsgIndexingNodeRegistrationVote(spNodeAddrNew, spNodeOwnerNew, types.Approve, spNodeAddr2, spNodeOwner2)) -// require.NoError(t, err) -// newNode, found = k.GetIndexingNode(ctx, spNodeAddrNew) -// require.True(t, found) -// require.Equal(t, newNode.Status, sdk.Unbonded) -// -// //Exist SP Node3 vote to approve, the status of new SP node changes to BONDED -// err = handlerSimulate(ctx, k, types.NewMsgIndexingNodeRegistrationVote(spNodeAddrNew, spNodeOwnerNew, types.Approve, spNodeAddr3, spNodeOwner3)) -// require.NoError(t, err) -// newNode, found = k.GetIndexingNode(ctx, spNodeAddrNew) -// require.True(t, found) -// require.Equal(t, newNode.Status, sdk.Bonded) -// -// //Exist SP Node4 vote to approve, the status of new SP node is BONDED -// err = handlerSimulate(ctx, k, types.NewMsgIndexingNodeRegistrationVote(spNodeAddrNew, spNodeOwnerNew, types.Approve, spNodeAddr4, spNodeOwner4)) -// require.NoError(t, err) -// newNode, found = k.GetIndexingNode(ctx, spNodeAddrNew) -// require.True(t, found) -// require.Equal(t, newNode.Status, sdk.Bonded) -//} -// -//func handlerSimulate(ctx sdk.Context, k Keeper, msg types.MsgIndexingNodeRegistrationVote) error { -// nodeToApprove, found := k.GetIndexingNode(ctx, msg.CandidateNetworkAddress) -// if !found { -// return types.ErrNoIndexingNodeFound -// } -// if !nodeToApprove.GetOwnerAddr().Equals(msg.CandidateOwnerAddress) { -// return types.ErrInvalidOwnerAddr -// } -// -// approver, found := k.GetIndexingNode(ctx, msg.VoterNetworkAddress) -// if !found { -// return types.ErrInvalidVoterAddr -// } -// if !approver.Status.Equal(sdk.Bonded) || approver.IsSuspended() { -// return types.ErrInvalidVoterStatus -// } -// -// _, err := k.HandleVoteForIndexingNodeRegistration(ctx, msg.CandidateNetworkAddress, msg.CandidateOwnerAddress, msg.Opinion, msg.VoterNetworkAddress) -// if err != nil { -// return err -// } -// -// return nil -//} -// -//func createAccount(t *testing.T, ctx sdk.Context, accountKeeper auth.AccountKeeper, bankKeeper bank.Keeper, acc sdk.AccAddress, coins sdk.Coins) { -// account := accountKeeper.GetAccount(ctx, acc) -// if account == nil { -// account = accountKeeper.NewAccountWithAddress(ctx, acc) -// //fmt.Printf("create account: " + account.String() + "\n") -// } -// coins, err := bankKeeper.AddCoins(ctx, acc, coins) -// require.NoError(t, err) -//} diff --git a/x/register/keeper/keeper.go b/x/register/keeper/keeper.go index 03142eae..b89d2968 100644 --- a/x/register/keeper/keeper.go +++ b/x/register/keeper/keeper.go @@ -10,6 +10,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + stratos "github.com/stratosnet/stratos-chain/types" "github.com/stratosnet/stratos-chain/x/register/types" regtypes "github.com/stratosnet/stratos-chain/x/register/types" @@ -52,6 +53,10 @@ func NewKeeper(cdc codec.Codec, key sdk.StoreKey, paramSpace paramtypes.Subspace return keeper } +func (k Keeper) GetBankKeeper() types.BankKeeper { + return k.bankKeeper +} + // Logger returns a module-specific logger. func (k Keeper) Logger(ctx sdk.Context) log.Logger { return ctx.Logger().With("module", fmt.Sprintf("x/%s", types.ModuleName)) @@ -66,18 +71,6 @@ func (k Keeper) SetHooks(sh types.RegisterHooks) Keeper { return k } -func (k Keeper) SendCoinsFromAccount2TotalUnissuedPrepayPool(ctx sdk.Context, fromWallet sdk.AccAddress, coinToSend sdk.Coin) error { - fromAcc := k.accountKeeper.GetAccount(ctx, fromWallet) - if fromAcc == nil { - return types.ErrUnknownAccountAddress - } - hasCoin := k.bankKeeper.HasBalance(ctx, fromWallet, coinToSend) - if !hasCoin { - return types.ErrInsufficientBalance - } - return k.bankKeeper.SendCoinsFromAccountToModule(ctx, fromWallet, types.TotalUnissuedPrepay, sdk.NewCoins(coinToSend)) -} - func (k Keeper) GetTotalUnissuedPrepay(ctx sdk.Context) (totalUnissuedPrepay sdk.Coin) { totalUnissuedPrepayAccAddr := k.accountKeeper.GetModuleAddress(regtypes.TotalUnissuedPrepay) if totalUnissuedPrepayAccAddr == nil { @@ -90,38 +83,6 @@ func (k Keeper) GetTotalUnissuedPrepay(ctx sdk.Context) (totalUnissuedPrepay sdk return k.bankKeeper.GetBalance(ctx, totalUnissuedPrepayAccAddr, k.BondDenom(ctx)) } -func (k Keeper) SetInitialGenesisStakeTotal(ctx sdk.Context, stake sdk.Int) { - store := ctx.KVStore(k.storeKey) - b := types.ModuleCdc.MustMarshalLengthPrefixed(stake) - store.Set(types.InitialGenesisStakeTotalKey, b) -} - -func (k Keeper) GetInitialGenesisStakeTotal(ctx sdk.Context) (stake sdk.Int) { - store := ctx.KVStore(k.storeKey) - b := store.Get(types.InitialGenesisStakeTotalKey) - if b == nil { - return sdk.ZeroInt() - } - types.ModuleCdc.MustUnmarshalLengthPrefixed(b, &stake) - return -} - -func (k Keeper) SetRemainingOzoneLimit(ctx sdk.Context, value sdk.Int) { - store := ctx.KVStore(k.storeKey) - b := types.ModuleCdc.MustMarshalLengthPrefixed(value) - store.Set(types.UpperBoundOfTotalOzoneKey, b) -} - -func (k Keeper) GetRemainingOzoneLimit(ctx sdk.Context) (value sdk.Int) { - store := ctx.KVStore(k.storeKey) - b := store.Get(types.UpperBoundOfTotalOzoneKey) - if b == nil { - return sdk.ZeroInt() - } - types.ModuleCdc.MustUnmarshalLengthPrefixed(b, &value) - return -} - func (k Keeper) IncreaseOzoneLimitByAddStake(ctx sdk.Context, stake sdk.Int) (ozoneLimitChange sdk.Int) { // get remainingOzoneLimit before adding stake remainingBefore := k.GetRemainingOzoneLimit(ctx) @@ -163,21 +124,6 @@ func (k Keeper) DecreaseOzoneLimitBySubtractStake(ctx sdk.Context, stake sdk.Int return limitToSub.TruncateInt() } -// GetUnbondingNode return a unbonding UnbondingMetaNode -func (k Keeper) GetUnbondingNode(ctx sdk.Context, - networkAddr stratos.SdsAddress) (ubd types.UnbondingNode, found bool) { - - store := ctx.KVStore(k.storeKey) - key := types.GetUBDNodeKey(networkAddr) - value := store.Get(key) - if value == nil { - return ubd, false - } - - ubd = types.MustUnmarshalUnbondingNode(k.cdc, value) - return ubd, true -} - // HasMaxUnbondingMetaNodeEntries - check if unbonding MetaNode has maximum number of entries func (k Keeper) HasMaxUnbondingNodeEntries(ctx sdk.Context, networkAddr stratos.SdsAddress) bool { ubd, found := k.GetUnbondingNode(ctx, networkAddr) @@ -187,29 +133,6 @@ func (k Keeper) HasMaxUnbondingNodeEntries(ctx sdk.Context, networkAddr stratos. return len(ubd.Entries) >= int(k.MaxEntries(ctx)) } -// SetUnbondingNode sets the unbonding MetaNode -func (k Keeper) SetUnbondingNode(ctx sdk.Context, ubd types.UnbondingNode) { - store := ctx.KVStore(k.storeKey) - bz := types.MustMarshalUnbondingNode(k.cdc, ubd) - networkAddr, err := stratos.SdsAddressFromBech32(ubd.GetNetworkAddr()) - if err != nil { - return - } - key := types.GetUBDNodeKey(networkAddr) - store.Set(key, bz) -} - -// RemoveUnbondingNode removes the unbonding MetaNode object -func (k Keeper) RemoveUnbondingNode(ctx sdk.Context, ubd types.UnbondingNode) { - store := ctx.KVStore(k.storeKey) - networkAddr, err := stratos.SdsAddressFromBech32(ubd.GetNetworkAddr()) - if err != nil { - return - } - key := types.GetUBDNodeKey(networkAddr) - store.Delete(key) -} - // SetUnbondingMetaNodeEntry adds an entry to the unbonding MetaNode at // the given addresses. It creates the unbonding MetaNode if it does not exist func (k Keeper) SetUnbondingNodeEntry(ctx sdk.Context, networkAddr stratos.SdsAddress, isMetaNode bool, @@ -227,65 +150,35 @@ func (k Keeper) SetUnbondingNodeEntry(ctx sdk.Context, networkAddr stratos.SdsAd // unbonding delegation queue timeslice operations -// GetUnbondingNodeQueueTimeSlice gets a specific unbonding queue timeslice. A timeslice is a slice of DVPairs -// corresponding to unbonding delegations that expire at a certain time. -func (k Keeper) GetUnbondingNodeQueueTimeSlice(ctx sdk.Context, timestamp time.Time) (networkAddrs []stratos.SdsAddress) { - store := ctx.KVStore(k.storeKey) - bz := store.Get(types.GetUBDTimeKey(timestamp)) - if bz == nil { - return []stratos.SdsAddress{} - } - types.ModuleCdc.MustUnmarshalLengthPrefixed(bz, &networkAddrs) - return networkAddrs -} - -// SetUnbondingNodeQueueTimeSlice sets a specific unbonding queue timeslice. -func (k Keeper) SetUnbondingNodeQueueTimeSlice(ctx sdk.Context, timestamp time.Time, keys []stratos.SdsAddress) { - store := ctx.KVStore(k.storeKey) - bz := types.ModuleCdc.MustMarshalLengthPrefixed(keys) - store.Set(types.GetUBDTimeKey(timestamp), bz) -} - // InsertUnbondingNodeQueue inserts an unbonding delegation to the appropriate timeslice in the unbonding queue -func (k Keeper) InsertUnbondingNodeQueue(ctx sdk.Context, ubd types.UnbondingNode, - completionTime time.Time) { - +func (k Keeper) InsertUnbondingNodeQueue(ctx sdk.Context, ubd types.UnbondingNode, completionTime time.Time) { timeSlice := k.GetUnbondingNodeQueueTimeSlice(ctx, completionTime) - networkAddr, err := stratos.SdsAddressFromBech32(ubd.GetNetworkAddr()) - if err != nil { - return - } + networkAddr := ubd.GetNetworkAddr() + if len(timeSlice) == 0 { - k.SetUnbondingNodeQueueTimeSlice(ctx, completionTime, []stratos.SdsAddress{networkAddr}) + k.SetUnbondingNodeQueueTimeSlice(ctx, completionTime, []string{networkAddr}) } else { timeSlice = append(timeSlice, networkAddr) k.SetUnbondingNodeQueueTimeSlice(ctx, completionTime, timeSlice) } } -// UnbondingNodeQueueIterator returns all the unbonding queue timeslices from time 0 until endTime -func (k Keeper) UnbondingNodeQueueIterator(ctx sdk.Context, endTime time.Time) sdk.Iterator { - store := ctx.KVStore(k.storeKey) - return store.Iterator(types.UBDNodeQueueKey, - sdk.InclusiveEndBytes(types.GetUBDTimeKey(endTime))) -} - // DequeueAllMatureUBDQueue returns a concatenated list of all the timeslices inclusively previous to // currTime, and deletes the timeslices from the queue // Iteration for dequeuing all mature unbonding queue -func (k Keeper) DequeueAllMatureUBDQueue(ctx sdk.Context, - currTime time.Time) (matureUnbonds []stratos.SdsAddress) { - +// TODO: Unused parameter: currTime +func (k Keeper) DequeueAllMatureUBDQueue(ctx sdk.Context, currTime time.Time) (matureUnbonds []string) { store := ctx.KVStore(k.storeKey) // gets an iterator for all timeslices from time 0 until the current Blockheader time unbondingTimesliceIterator := k.UnbondingNodeQueueIterator(ctx, ctx.BlockHeader().Time) defer unbondingTimesliceIterator.Close() for ; unbondingTimesliceIterator.Valid(); unbondingTimesliceIterator.Next() { - timeslice := []stratos.SdsAddress{} + timeSliceVal := stratos.SdsAddresses{} //[]stratos.SdsAddress{} value := unbondingTimesliceIterator.Value() - types.ModuleCdc.MustUnmarshalLengthPrefixed(value, ×lice) - matureUnbonds = append(matureUnbonds, timeslice...) + k.cdc.MustUnmarshalLengthPrefixed(value, &timeSliceVal) + timeSlice := timeSliceVal.GetAddresses() + matureUnbonds = append(matureUnbonds, timeSlice...) store.Delete(unbondingTimesliceIterator.Key()) } ctx.Logger().Debug(fmt.Sprintf("DequeueAllMatureUBDQueue, %d matured unbonding nodes detected", len(matureUnbonds))) @@ -295,7 +188,13 @@ func (k Keeper) DequeueAllMatureUBDQueue(ctx sdk.Context, // CompleteUnbondingWithAmount completes the unbonding of all mature entries in // the retrieved unbonding delegation object and returns the total unbonding // balance or an error upon failure. -func (k Keeper) CompleteUnbondingWithAmount(ctx sdk.Context, networkAddr stratos.SdsAddress) (sdk.Coins, bool, error) { +func (k Keeper) CompleteUnbondingWithAmount(ctx sdk.Context, networkAddrBech32 string) (sdk.Coins, bool, error) { + networkAddr, err := stratos.SdsAddressFromBech32(networkAddrBech32) + if err != nil { + ctx.Logger().Error(fmt.Sprintf("NetworAddr: %s is invalid", networkAddrBech32)) + return nil, false, types.ErrInvalidNetworkAddr + } + ubd, found := k.GetUnbondingNode(ctx, networkAddr) if !found { ctx.Logger().Info(fmt.Sprintf("NetworAddr: %s not found while completing UnbondingWithAmount", networkAddr)) @@ -316,7 +215,7 @@ func (k Keeper) CompleteUnbondingWithAmount(ctx sdk.Context, networkAddr stratos // track undelegation only when remaining or truncated shares are non-zero if !entry.Balance.IsZero() { amt := sdk.NewCoin(bondDenom, *entry.Balance) - err := k.SubtractUBDNodeStake(ctx, ubd, amt) + err := k.subtractUBDNodeStake(ctx, ubd, amt) if err != nil { return nil, false, err } @@ -328,7 +227,7 @@ func (k Keeper) CompleteUnbondingWithAmount(ctx sdk.Context, networkAddr stratos // set the unbonding node or remove it if there are no more entries if len(ubd.Entries) == 0 { - k.RemoveUnbondingNode(ctx, ubd) + k.RemoveUnbondingNode(ctx, networkAddr) } else { k.SetUnbondingNode(ctx, ubd) } @@ -336,7 +235,7 @@ func (k Keeper) CompleteUnbondingWithAmount(ctx sdk.Context, networkAddr stratos return balances, ubd.IsMetaNode, nil } -func (k Keeper) SubtractUBDNodeStake(ctx sdk.Context, ubd types.UnbondingNode, tokenToSub sdk.Coin) error { +func (k Keeper) subtractUBDNodeStake(ctx sdk.Context, ubd types.UnbondingNode, tokenToSub sdk.Coin) error { // case of meta node networkAddr, err := stratos.SdsAddressFromBech32(ubd.GetNetworkAddr()) if err != nil { @@ -357,8 +256,7 @@ func (k Keeper) SubtractUBDNodeStake(ctx sdk.Context, ubd types.UnbondingNode, t return k.SubtractResourceNodeStake(ctx, resourceNode, tokenToSub) } -func (k Keeper) UnbondResourceNode( - ctx sdk.Context, resourceNode types.ResourceNode, amt sdk.Int, +func (k Keeper) UnbondResourceNode(ctx sdk.Context, resourceNode types.ResourceNode, amt sdk.Int, ) (ozoneLimitChange sdk.Int, unbondingMatureTime time.Time, err error) { params := k.GetParams(ctx) ctx.Logger().Info("Params of register module: " + params.String()) @@ -427,8 +325,7 @@ func (k Keeper) UnbondResourceNode( return ozoneLimitChange, unbondingMatureTime, nil } -func (k Keeper) UnbondMetaNode( - ctx sdk.Context, metaNode types.MetaNode, amt sdk.Int, +func (k Keeper) UnbondMetaNode(ctx sdk.Context, metaNode types.MetaNode, amt sdk.Int, ) (ozoneLimitChange sdk.Int, unbondingMatureTime time.Time, err error) { networkAddr, err := stratos.SdsAddressFromBech32(metaNode.GetNetworkAddress()) @@ -498,7 +395,8 @@ func (k Keeper) GetAllUnbondingNodesTotalBalance(ctx sdk.Context) sdk.Int { var ubdTotal = sdk.ZeroInt() for ; iterator.Valid(); iterator.Next() { - node := types.MustUnmarshalUnbondingNode(k.cdc, iterator.Value()) + node := types.UnbondingNode{} + k.cdc.MustUnmarshalLengthPrefixed(iterator.Value(), &node) for _, entry := range node.Entries { ubdTotal = ubdTotal.Add(*entry.Balance) } @@ -507,9 +405,7 @@ func (k Keeper) GetAllUnbondingNodesTotalBalance(ctx sdk.Context) sdk.Int { } // GetUnbondingNodeBalance returns an unbonding balance and an UnbondingNode -func (k Keeper) GetUnbondingNodeBalance(ctx sdk.Context, - networkAddr stratos.SdsAddress) sdk.Int { - +func (k Keeper) GetUnbondingNodeBalance(ctx sdk.Context, networkAddr stratos.SdsAddress) sdk.Int { balance := sdk.ZeroInt() store := ctx.KVStore(k.storeKey) @@ -518,8 +414,8 @@ func (k Keeper) GetUnbondingNodeBalance(ctx sdk.Context, if value == nil { return balance } - - ubd := types.MustUnmarshalUnbondingNode(k.cdc, value) + ubd := types.UnbondingNode{} + k.cdc.MustUnmarshalLengthPrefixed(value, &ubd) for _, entry := range ubd.Entries { balance = balance.Add(*entry.Balance) } @@ -544,78 +440,3 @@ func (k Keeper) NozSupply(ctx sdk.Context) (remaining, total sdk.Int) { total = St.ToDec().Quo(stakeNozRate).TruncateInt() return remaining, total } - -func (k Keeper) SetBondedResourceNodeCnt(ctx sdk.Context, count sdk.Int) { - store := ctx.KVStore(k.storeKey) - b := types.ModuleCdc.MustMarshalLengthPrefixed(count) - //ctx.Logger().Info("New ResourceNode count = " + count.String()) - store.Set(types.ResourceNodeCntKey, b) -} - -func (k Keeper) SetBondedMetaNodeCnt(ctx sdk.Context, count sdk.Int) { - if count.LT(sdk.ZeroInt()) { - //ctx.Logger().Info("count < 0, count = " + count.String()) - } - store := ctx.KVStore(k.storeKey) - b := types.ModuleCdc.MustMarshalLengthPrefixed(count) - //ctx.Logger().Info("New MetaNode count = " + count.String()) - store.Set(types.MetaNodeCntKey, b) -} - -func (k Keeper) GetBondedResourceNodeCnt(ctx sdk.Context) (balance sdk.Int) { - store := ctx.KVStore(k.storeKey) - value := store.Get(types.ResourceNodeCntKey) - if value == nil { - return sdk.ZeroInt() - } - types.ModuleCdc.MustUnmarshalLengthPrefixed(value, &balance) - //ctx.Logger().Info("ResourceNode count = " + balance.String()) - return -} - -func (k Keeper) GetBondedMetaNodeCnt(ctx sdk.Context) (balance sdk.Int) { - store := ctx.KVStore(k.storeKey) - value := store.Get(types.MetaNodeCntKey) - if value == nil { - return sdk.ZeroInt() - } - types.ModuleCdc.MustUnmarshalLengthPrefixed(value, &balance) - //ctx.Logger().Info("MetaNode count = " + balance.String()) - return -} - -func (k Keeper) SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error { - return k.bankKeeper.SendCoinsFromAccountToModule(ctx, senderAddr, recipientModule, amt) -} - -func (k Keeper) SetEffectiveTotalStake(ctx sdk.Context, stake sdk.Int) { - store := ctx.KVStore(k.storeKey) - b := types.ModuleCdc.MustMarshalLengthPrefixed(stake) - store.Set(types.EffectiveGenesisStakeTotalKey, b) -} - -func (k Keeper) GetEffectiveTotalStake(ctx sdk.Context) (stake sdk.Int) { - store := ctx.KVStore(k.storeKey) - b := store.Get(types.EffectiveGenesisStakeTotalKey) - if b == nil { - return sdk.ZeroInt() - } - types.ModuleCdc.MustUnmarshalLengthPrefixed(b, &stake) - return -} - -func (k Keeper) SetStakeNozRate(ctx sdk.Context, stakeNozRate sdk.Dec) { - store := ctx.KVStore(k.storeKey) - b := types.ModuleCdc.MustMarshalLengthPrefixed(stakeNozRate) - store.Set(types.StakeNozRateKey, b) -} - -func (k Keeper) GetStakeNozRate(ctx sdk.Context) (stakeNozRate sdk.Dec) { - store := ctx.KVStore(k.storeKey) - b := store.Get(types.StakeNozRateKey) - if b == nil { - panic("Stored stake noz rate should not be nil") - } - types.ModuleCdc.MustUnmarshalLengthPrefixed(b, &stakeNozRate) - return -} diff --git a/x/register/keeper/keeper_tests.go b/x/register/keeper/keeper_tests.go deleted file mode 100644 index e4a64f45..00000000 --- a/x/register/keeper/keeper_tests.go +++ /dev/null @@ -1,67 +0,0 @@ -package keeper - -//import ( -// "testing" -// -// "github.com/cosmos/cosmos-sdk/codec" -// "github.com/cosmos/cosmos-sdk/store" -// sdk "github.com/cosmos/cosmos-sdk/types" -// "github.com/cosmos/cosmos-sdk/x/auth" -// authexported "github.com/cosmos/cosmos-sdk/x/auth/exported" -// "github.com/cosmos/cosmos-sdk/x/bank" -// "github.com/cosmos/cosmos-sdk/x/params" -// stratos "github.com/stratosnet/stratos-chain/types" -// "github.com/stratosnet/stratos-chain/x/register/types" -// "github.com/stretchr/testify/require" -// abci "github.com/tendermint/tendermint/abci/types" -// "github.com/tendermint/tendermint/libs/log" -// dbm "github.com/tendermint/tm-db" -//) -// -//func TestMain(m *testing.M) { -// config := stratos.GetConfig() -// -// config.Seal() -//} -// -//func CreateTestInput(t *testing.T, isCheckTx bool) (sdk.Context, auth.AccountKeeper, bank.Keeper, Keeper, params.Keeper) { -// -// keyParams := sdk.NewKVStoreKey(params.StoreKey) -// tkeyParams := sdk.NewTransientStoreKey(params.TStoreKey) -// keyAcc := sdk.NewKVStoreKey(auth.StoreKey) -// keyRegister := sdk.NewKVStoreKey(types.StoreKey) -// -// db := dbm.NewMemDB() -// ms := store.NewCommitMultiStore(db) -// -// ms.MountStoreWithDB(keyParams, sdk.StoreTypeIAVL, db) -// ms.MountStoreWithDB(tkeyParams, sdk.StoreTypeTransient, db) -// ms.MountStoreWithDB(keyAcc, sdk.StoreTypeIAVL, db) -// ms.MountStoreWithDB(keyRegister, sdk.StoreTypeIAVL, db) -// err := ms.LoadLatestVersion() -// require.Nil(t, err) -// -// cdc := MakeTestCodec() -// pk := params.NewKeeper(cdc, keyParams, tkeyParams) -// ctx := sdk.NewContext(ms, abci.Header{ChainID: "foochainid"}, isCheckTx, log.NewNopLogger()) -// -// accountKeeper := auth.NewAccountKeeper(cdc, keyAcc, pk.Subspace(auth.DefaultParamspace), auth.ProtoBaseAccount) -// bankKeeper := bank.NewBaseKeeper(accountKeeper, pk.Subspace(bank.DefaultParamspace), nil) -// -// keeper := NewKeeper(cdc, keyRegister, pk.Subspace(types.DefaultParamSpace), accountKeeper, bankKeeper) -// keeper.SetParams(ctx, types.DefaultParams()) -// -// return ctx, accountKeeper, bankKeeper, keeper, pk -//} -// -//// create a codec used only for testing -//func MakeTestCodec() *codec.Codec { -// var cdc = codec.New() -// -// // Register AppAccount -// cdc.RegisterInterface((*authexported.Account)(nil), nil) -// cdc.RegisterConcrete(&auth.BaseAccount{}, "test/pot/BaseAccount", nil) -// codec.RegisterCrypto(cdc) -// -// return cdc -//} diff --git a/x/register/keeper/meta_node.go b/x/register/keeper/meta_node.go index fff9fa29..0433717e 100644 --- a/x/register/keeper/meta_node.go +++ b/x/register/keeper/meta_node.go @@ -17,13 +17,13 @@ const ( votingValidityPeriodInSecond = 7 * 24 * 60 * 60 // 7 days ) -// Cache the amino decoding of meta nodes, as it can be the case that repeated slashing calls +// Cache the proto decoding of meta nodes, as it can be the case that repeated slashing calls // cause many calls to getMetaNode, which were shown to throttle the state machine in our // simulation. Note this is quite biased though, as the simulator does more slashes than a // live chain should, however we require the slashing to be fast as no one pays gas for it. type cachedMetaNode struct { metaNode types.MetaNode - marshalled string // marshalled amino bytes for the MetaNode object (not address) + marshalled string // marshalled proto bytes for the MetaNode object (not address) } func newCachedMetaNode(metaNode types.MetaNode, marshalled string) cachedMetaNode { @@ -41,14 +41,14 @@ func (k Keeper) GetMetaNode(ctx sdk.Context, p2pAddress stratos.SdsAddress) (met return metaNode, false } - // If these amino encoded bytes are in the cache, return the cached meta node + // If these proto encoded bytes are in the cache, return the cached meta node strValue := string(value) if val, ok := k.metaNodeCache[strValue]; ok { valToReturn := val.metaNode return valToReturn, true } - // amino bytes weren't found in cache, so amino unmarshal and add it to the cache + // proto bytes weren't found in cache, so unmarshal and add it to the cache metaNode = types.MustUnmarshalMetaNode(k.cdc, value) cachedVal := newCachedMetaNode(metaNode, strValue) k.metaNodeCache[strValue] = newCachedMetaNode(metaNode, strValue) @@ -72,7 +72,7 @@ func (k Keeper) SetMetaNode(ctx sdk.Context, metaNode types.MetaNode) { } // GetAllMetaNodes get the set of all meta nodes with no limits, used during genesis dump -//Iteration for all meta nodes +// Iteration for all meta nodes func (k Keeper) GetAllMetaNodes(ctx sdk.Context) (metaNodes types.MetaNodes) { store := ctx.KVStore(k.storeKey) iterator := sdk.KVStorePrefixIterator(store, types.MetaNodeKey) @@ -169,6 +169,7 @@ func (k Keeper) AddMetaNodeStake(ctx sdk.Context, metaNode types.MetaNode, token return ozoneLimitChange, nil } +// TODO: Unused parameter: metaNode func (k Keeper) RemoveTokenFromPoolWhileUnbondingMetaNode(ctx sdk.Context, metaNode types.MetaNode, tokenToSub sdk.Coin) error { bondedMetaAccountAddr := k.accountKeeper.GetModuleAddress(types.MetaNodeBondedPool) if bondedMetaAccountAddr == nil { @@ -376,24 +377,6 @@ func (k Keeper) HandleVoteForMetaNodeRegistration(ctx sdk.Context, nodeAddr stra return node.Status, nil } -func (k Keeper) GetMetaNodeRegistrationVotePool(ctx sdk.Context, nodeAddr stratos.SdsAddress) (votePool types.MetaNodeRegistrationVotePool, found bool) { - store := ctx.KVStore(k.storeKey) - bz := store.Get(types.GetMetaNodeRegistrationVotesKey(nodeAddr)) - if bz == nil { - return votePool, false - } - k.cdc.MustUnmarshalLengthPrefixed(bz, &votePool) - return votePool, true -} - -func (k Keeper) SetMetaNodeRegistrationVotePool(ctx sdk.Context, votePool types.MetaNodeRegistrationVotePool) { - nodeAddr := votePool.GetNetworkAddress() - store := ctx.KVStore(k.storeKey) - bz := k.cdc.MustMarshalLengthPrefixed(&votePool) - node, _ := stratos.SdsAddressFromBech32(nodeAddr) - store.Set(types.GetMetaNodeRegistrationVotesKey(node), bz) -} - func (k Keeper) UpdateMetaNode(ctx sdk.Context, description types.Description, networkAddr stratos.SdsAddress, ownerAddr sdk.AccAddress) error { @@ -476,17 +459,3 @@ func (k Keeper) GetMetaNodeIterator(ctx sdk.Context) sdk.Iterator { iterator := sdk.KVStorePrefixIterator(store, types.MetaNodeKey) return iterator } - -func (k Keeper) SendCoinsFromAccountToMetaNodeNotBondedPool(ctx sdk.Context, fromAcc sdk.AccAddress, amt sdk.Coin) error { - if !k.bankKeeper.HasBalance(ctx, fromAcc, amt) { - return types.ErrInsufficientBalance - } - return k.bankKeeper.SendCoinsFromAccountToModule(ctx, fromAcc, types.MetaNodeNotBondedPool, sdk.NewCoins(amt)) -} - -func (k Keeper) SendCoinsFromAccountToMetaNodeBondedPool(ctx sdk.Context, fromAcc sdk.AccAddress, amt sdk.Coin) error { - if !k.bankKeeper.HasBalance(ctx, fromAcc, amt) { - return types.ErrInsufficientBalance - } - return k.bankKeeper.SendCoinsFromAccountToModule(ctx, fromAcc, types.MetaNodeBondedPool, sdk.NewCoins(amt)) -} diff --git a/x/register/keeper/msg_server.go b/x/register/keeper/msg_server.go index ce281a77..0896d629 100644 --- a/x/register/keeper/msg_server.go +++ b/x/register/keeper/msg_server.go @@ -197,7 +197,6 @@ func (k msgServer) HandleMsgRemoveMetaNode(goCtx context.Context, msg *types.Msg return nil, sdkerrors.Wrap(types.ErrUnbondMetaNode, err.Error()) } - //completionTimeBz := amino.MustMarshalBinaryLengthPrefixed(completionTime) ctx.EventManager().EmitEvents(sdk.Events{ sdk.NewEvent( types.EventTypeUnbondingMetaNode, diff --git a/x/register/keeper/node_state_change.go b/x/register/keeper/node_state_change.go index 12a18e90..7e3e8669 100644 --- a/x/register/keeper/node_state_change.go +++ b/x/register/keeper/node_state_change.go @@ -26,7 +26,7 @@ func (k Keeper) BlockRegisteredNodesUpdates(ctx sdk.Context) []abci.ValidatorUpd sdk.NewEvent( types.EventTypeCompleteUnbondingMetaNode, sdk.NewAttribute(sdk.AttributeKeyAmount, balances.String()), - sdk.NewAttribute(types.AttributeKeyNetworkAddress, networkAddr.String()), + sdk.NewAttribute(types.AttributeKeyNetworkAddress, networkAddr), ), ) } else { @@ -34,7 +34,7 @@ func (k Keeper) BlockRegisteredNodesUpdates(ctx sdk.Context) []abci.ValidatorUpd sdk.NewEvent( types.EventTypeCompleteUnbondingResourceNode, sdk.NewAttribute(sdk.AttributeKeyAmount, balances.String()), - sdk.NewAttribute(types.AttributeKeyNetworkAddress, networkAddr.String()), + sdk.NewAttribute(types.AttributeKeyNetworkAddress, networkAddr), ), ) } @@ -53,43 +53,33 @@ func (k Keeper) bondedToUnbonding(ctx sdk.Context, node interface{}, isMetaNode if temp.GetStatus() != stakingtypes.Bonded { panic(fmt.Sprintf("bad state transition bondedToUnbonding, metaNode: %v\n", temp)) } - // decrease meta node count - //v := k.GetBondedMetaNodeCnt(ctx) - //count := v.Sub(sdk.NewInt(1)) - //k.SetBondedMetaNodeCnt(ctx, count) - return k.beginUnbondingMetaNode(ctx, &temp, &coin) default: temp := node.(types.ResourceNode) if temp.GetStatus() != stakingtypes.Bonded { panic(fmt.Sprintf("bad state transition bondedToUnbonding, resourceNode: %v\n", temp)) } - // decrease resource node count - //v := k.GetBondedResourceNodeCnt(ctx) - //count := v.Sub(sdk.NewInt(1)) - //k.SetBondedResourceNodeCnt(ctx, count) - return k.beginUnbondingResourceNode(ctx, &temp, &coin) } } -// switches a Node from unbonding state to unbonded state -func (k Keeper) unbondingToUnbonded(ctx sdk.Context, node interface{}, isMetaNode bool) interface{} { - switch isMetaNode { - case true: - temp := node.(types.MetaNode) - if temp.GetStatus() != stakingtypes.Unbonding { - panic(fmt.Sprintf("bad state transition unbondingToBonded, metaNode: %v\n", temp)) - } - return k.completeUnbondingNode(ctx, temp, isMetaNode) - default: - temp := node.(types.ResourceNode) - if temp.GetStatus() != stakingtypes.Unbonding { - panic(fmt.Sprintf("bad state transition unbondingToBonded, resourceNode: %v\n", temp)) - } - return k.completeUnbondingNode(ctx, temp, isMetaNode) - } -} +//// switches a Node from unbonding state to unbonded state +//func (k Keeper) unbondingToUnbonded(ctx sdk.Context, node interface{}, isMetaNode bool) interface{} { +// switch isMetaNode { +// case true: +// temp := node.(types.MetaNode) +// if temp.GetStatus() != stakingtypes.Unbonding { +// panic(fmt.Sprintf("bad state transition unbondingToBonded, metaNode: %v\n", temp)) +// } +// return k.completeUnbondingNode(ctx, temp, isMetaNode) +// default: +// temp := node.(types.ResourceNode) +// if temp.GetStatus() != stakingtypes.Unbonding { +// panic(fmt.Sprintf("bad state transition unbondingToBonded, resourceNode: %v\n", temp)) +// } +// return k.completeUnbondingNode(ctx, temp, isMetaNode) +// } +//} // perform all the store operations for when a Node begins unbonding func (k Keeper) beginUnbondingResourceNode(ctx sdk.Context, resourceNode *types.ResourceNode, coin *sdk.Coin) *types.ResourceNode { @@ -154,76 +144,75 @@ func (k Keeper) completeUnbondingNode(ctx sdk.Context, node interface{}, isMetaN } } -// Returns all the validator queue timeslices from time 0 until endTime -func (k Keeper) UBDNodeQueueIterator(ctx sdk.Context, endTime time.Time) sdk.Iterator { - store := ctx.KVStore(k.storeKey) - return store.Iterator(types.UBDNodeQueueKey, sdk.InclusiveEndBytes(types.GetUBDTimeKey(endTime))) -} - -// Returns a concatenated list of all the timeslices before currTime, and deletes the timeslices from the queue -func (k Keeper) GetAllMatureUBDNodeQueue(ctx sdk.Context, currTime time.Time) (matureNetworkAddrs []sdk.AccAddress) { - // gets an iterator for all timeslices from time 0 until the current Blockheader time - ubdTimesliceIterator := k.UBDNodeQueueIterator(ctx, ctx.BlockHeader().Time) - defer ubdTimesliceIterator.Close() - - for ; ubdTimesliceIterator.Valid(); ubdTimesliceIterator.Next() { - timeslice := []sdk.AccAddress{} - types.ModuleCdc.MustUnmarshalLengthPrefixed(ubdTimesliceIterator.Value(), ×lice) - matureNetworkAddrs = append(matureNetworkAddrs, timeslice...) - } - - return matureNetworkAddrs -} - -// Unbonds all the unbonding validators that have finished their unbonding period -func (k Keeper) UnbondAllMatureUBDNodeQueue(ctx sdk.Context) { - store := ctx.KVStore(k.storeKey) - nodeTimesliceIterator := k.UBDNodeQueueIterator(ctx, ctx.BlockHeader().Time) - defer nodeTimesliceIterator.Close() - - for ; nodeTimesliceIterator.Valid(); nodeTimesliceIterator.Next() { - timeslice := []stratos.SdsAddress{} - types.ModuleCdc.MustUnmarshalLengthPrefixed(nodeTimesliceIterator.Value(), ×lice) - - for _, networkAddr := range timeslice { - ubd, found := k.GetUnbondingNode(ctx, networkAddr) - ubdNetworkAddr, _ := stratos.SdsAddressFromBech32(ubd.NetworkAddr) - if !found { - panic("node in the unbonding queue was not found") - } - - if ubd.IsMetaNode { - - node, found := k.GetMetaNode(ctx, ubdNetworkAddr) - if !found { - panic("cannot find meta node " + ubd.NetworkAddr) - } - if node.GetStatus() != stakingtypes.Unbonding { - panic("unexpected node in unbonding queue; status was not unbonding") - } - k.unbondingToUnbonded(ctx, node, ubd.IsMetaNode) - k.removeMetaNode(ctx, ubdNetworkAddr) - _, found1 := k.GetMetaNode(ctx, ubdNetworkAddr) - if found1 { - ctx.Logger().Info("Removed meta node with addr " + ubd.NetworkAddr) - } - } else { - node, found := k.GetResourceNode(ctx, ubdNetworkAddr) - if !found { - panic("cannot find resource node " + ubd.NetworkAddr) - } - if node.GetStatus() != stakingtypes.Unbonding { - panic("unexpected node in unbonding queue; status was not unbonding") - } - k.unbondingToUnbonded(ctx, node, ubd.IsMetaNode) - k.removeResourceNode(ctx, ubdNetworkAddr) - _, found1 := k.GetResourceNode(ctx, ubdNetworkAddr) - if found1 { - ctx.Logger().Info("Removed resource node with addr " + ubd.NetworkAddr) - } - - } - } - store.Delete(nodeTimesliceIterator.Key()) - } -} +//// Returns a concatenated list of all the timeslices before currTime, and deletes the timeslices from the queue +//func (k Keeper) GetAllMatureUBDNodeQueue(ctx sdk.Context, currTime time.Time) (matureNetworkAddrs []string) { +// // gets an iterator for all timeslices from time 0 until the current Blockheader time +// ubdTimesliceIterator := k.UnbondingNodeQueueIterator(ctx, ctx.BlockHeader().Time) +// defer ubdTimesliceIterator.Close() +// +// for ; ubdTimesliceIterator.Valid(); ubdTimesliceIterator.Next() { +// addrValue := stratos.SdsAddresses{} +// k.cdc.MustUnmarshalLengthPrefixed(ubdTimesliceIterator.Value(), &addrValue) +// timeSlice := addrValue.GetAddresses() +// matureNetworkAddrs = append(matureNetworkAddrs, timeSlice...) +// } +// +// return matureNetworkAddrs +//} + +//// Unbonds all the unbonding validators that have finished their unbonding period +//func (k Keeper) UnbondAllMatureUBDNodeQueue(ctx sdk.Context) { +// store := ctx.KVStore(k.storeKey) +// nodeTimesliceIterator := k.UnbondingNodeQueueIterator(ctx, ctx.BlockHeader().Time) +// defer nodeTimesliceIterator.Close() +// +// for ; nodeTimesliceIterator.Valid(); nodeTimesliceIterator.Next() { +// addrValue := stratos.SdsAddresses{} +// k.cdc.MustUnmarshalLengthPrefixed(nodeTimesliceIterator.Value(), &addrValue) +// timeSlice := addrValue.GetAddresses() +// +// for _, networkAddr := range timeSlice { +// ubdNetworkAddr, err := stratos.SdsAddressFromBech32(networkAddr) +// if err != nil { +// panic("network address in the unbonding queue is invalid") +// } +// +// ubd, found := k.GetUnbondingNode(ctx, ubdNetworkAddr) +// if !found { +// panic("node in the unbonding queue was not found") +// } +// +// if ubd.IsMetaNode { +// node, found := k.GetMetaNode(ctx, ubdNetworkAddr) +// if !found { +// panic("cannot find meta node " + ubd.NetworkAddr) +// } +// if node.GetStatus() != stakingtypes.Unbonding { +// panic("unexpected node in unbonding queue; status was not unbonding") +// } +// k.unbondingToUnbonded(ctx, node, ubd.IsMetaNode) +// k.removeMetaNode(ctx, ubdNetworkAddr) +// _, found1 := k.GetMetaNode(ctx, ubdNetworkAddr) +// if found1 { +// ctx.Logger().Info("Removed meta node with addr " + ubd.NetworkAddr) +// } +// } else { +// node, found := k.GetResourceNode(ctx, ubdNetworkAddr) +// if !found { +// panic("cannot find resource node " + ubd.NetworkAddr) +// } +// if node.GetStatus() != stakingtypes.Unbonding { +// panic("unexpected node in unbonding queue; status was not unbonding") +// } +// k.unbondingToUnbonded(ctx, node, ubd.IsMetaNode) +// k.removeResourceNode(ctx, ubdNetworkAddr) +// _, found1 := k.GetResourceNode(ctx, ubdNetworkAddr) +// if found1 { +// ctx.Logger().Info("Removed resource node with addr " + ubd.NetworkAddr) +// } +// +// } +// } +// store.Delete(nodeTimesliceIterator.Key()) +// } +//} diff --git a/x/register/keeper/resource_node.go b/x/register/keeper/resource_node.go index f3c3eeec..8883e8dc 100644 --- a/x/register/keeper/resource_node.go +++ b/x/register/keeper/resource_node.go @@ -13,13 +13,13 @@ import ( const resourceNodeCacheSize = 500 -// Cache the amino decoding of resource nodes, as it can be the case that repeated slashing calls +// Cache the proto decoding of resource nodes, as it can be the case that repeated slashing calls // cause many calls to GetResourceNode, which were shown to throttle the state machine in our // simulation. Note this is quite biased though, as the simulator does more slashes than a // live chain should, however we require the slashing to be fast as no one pays gas for it. type cachedResourceNode struct { resourceNode types.ResourceNode - marshalled string // marshalled amino bytes for the ResourceNode object (not address) + marshalled string // marshalled proto bytes for the ResourceNode object (not address) } func newCachedResourceNode(resourceNode types.ResourceNode, marshalled string) cachedResourceNode { @@ -38,14 +38,14 @@ func (k Keeper) GetResourceNode(ctx sdk.Context, p2pAddress stratos.SdsAddress) return resourceNode, false } - // If these amino encoded bytes are in the cache, return the cached resource node + // If these proto encoded bytes are in the cache, return the cached resource node strValue := string(value) if val, ok := k.resourceNodeCache[strValue]; ok { valToReturn := val.resourceNode return valToReturn, true } - // amino bytes weren't found in cache, so amino unmarshal and add it to the cache + // proto bytes weren't found in cache, so proto unmarshal and add it to the cache resourceNode = types.MustUnmarshalResourceNode(k.cdc, value) cachedVal := newCachedResourceNode(resourceNode, strValue) k.resourceNodeCache[strValue] = newCachedResourceNode(resourceNode, strValue) @@ -373,17 +373,3 @@ func (k Keeper) GetResourceNodeNotBondedToken(ctx sdk.Context) (token sdk.Coin) } return k.bankKeeper.GetBalance(ctx, resourceNodeNotBondedAccAddr, k.BondDenom(ctx)) } - -func (k Keeper) SendCoinsFromAccountToResNodeNotBondedPool(ctx sdk.Context, fromAcc sdk.AccAddress, amt sdk.Coin) error { - if !k.bankKeeper.HasBalance(ctx, fromAcc, amt) { - return types.ErrInsufficientBalance - } - return k.bankKeeper.SendCoinsFromAccountToModule(ctx, fromAcc, types.ResourceNodeNotBondedPool, sdk.NewCoins(amt)) -} - -func (k Keeper) SendCoinsFromAccountToResNodeBondedPool(ctx sdk.Context, fromAcc sdk.AccAddress, amt sdk.Coin) error { - if !k.bankKeeper.HasBalance(ctx, fromAcc, amt) { - return types.ErrInsufficientBalance - } - return k.bankKeeper.SendCoinsFromAccountToModule(ctx, fromAcc, types.ResourceNodeBondedPool, sdk.NewCoins(amt)) -} diff --git a/x/register/keeper/resource_node_test.go b/x/register/keeper/resource_node_test.go deleted file mode 100644 index e5eadc8a..00000000 --- a/x/register/keeper/resource_node_test.go +++ /dev/null @@ -1,57 +0,0 @@ -package keeper - -// -//import ( -// sdk "github.com/cosmos/cosmos-sdk/types" -// "github.com/tendermint/tendermint/crypto/ed25519" -// "log" -// "testing" -//) -// -//var ( -// ppNodeOwner1 = sdk.AccAddress(ed25519.GenPrivKey().PubKey().Address()) -// ppNodeOwner2 = sdk.AccAddress(ed25519.GenPrivKey().PubKey().Address()) -// ppNodeOwner3 = sdk.AccAddress(ed25519.GenPrivKey().PubKey().Address()) -// ppNodeOwner4 = sdk.AccAddress(ed25519.GenPrivKey().PubKey().Address()) -// ppNodeOwnerNew = sdk.AccAddress(ed25519.GenPrivKey().PubKey().Address()) -// -// ppNodePubKey1 = ed25519.GenPrivKey().PubKey() -// ppNodeAddr1 = sdk.AccAddress(ppNodePubKey1.Address()) -// ppInitialStake1 = sdk.NewInt(100000000) -// -// ppNodePubKey2 = ed25519.GenPrivKey().PubKey() -// ppNodeAddr2 = sdk.AccAddress(ppNodePubKey2.Address()) -// ppInitialStake2 = sdk.NewInt(100000000) -// -// ppNodePubKey3 = ed25519.GenPrivKey().PubKey() -// ppNodeAddr3 = sdk.AccAddress(ppNodePubKey3.Address()) -// ppInitialStake3 = sdk.NewInt(100000000) -// -// ppNodePubKey4 = ed25519.GenPrivKey().PubKey() -// ppNodeAddr4 = sdk.AccAddress(ppNodePubKey4.Address()) -// ppInitialStake4 = sdk.NewInt(100000000) -// -// ppNodePubKeyNew = ed25519.GenPrivKey().PubKey() -// ppNodeAddrNew = sdk.AccAddress(ppNodePubKeyNew.Address()) -// ppNodeStakeNew = sdk.NewInt(100000000) -//) -// -//func TestOzoneLimitChange(t *testing.T) { -// ctx, _, _, k, _ := CreateTestInput(t, false) -// -// initialStakeTotal := sdk.NewInt(43000) -// k.SetInitialGenesisStakeTotal(ctx, initialStakeTotal) -// k.SetRemainingOzoneLimit(ctx, initialStakeTotal) -// -// resouceNodeTokens := make([]sdk.Int, 0) -// numSeq := 100 -// resourceNodeStake := sdk.NewInt(19000) -// for i := 0; i < numSeq; i++ { -// resouceNodeTokens = append(resouceNodeTokens, resourceNodeStake) -// } -// log.Printf("Before: remaining ozone limit is %v", k.GetRemainingOzoneLimit(ctx)) -// for i, val := range resouceNodeTokens { -// ozoneLimitChange := k.IncreaseOzoneLimitByAddStake(ctx, val) -// log.Printf("Add resourceNode #%v(stake=%v), ozone limit increases by %v, remaining ozone limit is %v", i, resourceNodeStake, ozoneLimitChange, k.GetRemainingOzoneLimit(ctx)) -// } -//} diff --git a/x/register/keeper/slashing.go b/x/register/keeper/slashing.go index 47ee4251..46676636 100644 --- a/x/register/keeper/slashing.go +++ b/x/register/keeper/slashing.go @@ -2,7 +2,6 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/stratosnet/stratos-chain/x/register/types" ) // DeductSlashing deduct slashing amount from coins, return the coins that after deduction @@ -31,35 +30,3 @@ func (k Keeper) DeductSlashing(ctx sdk.Context, walletAddress sdk.AccAddress, co k.SetSlashing(ctx, walletAddress, slashing) return } - -// Iteration for each slashing -func (k Keeper) IteratorSlashingInfo(ctx sdk.Context, handler func(walletAddress sdk.AccAddress, slashing sdk.Int) (stop bool)) { - store := ctx.KVStore(k.storeKey) - iter := sdk.KVStorePrefixIterator(store, types.SlashingPrefix) - defer iter.Close() - for ; iter.Valid(); iter.Next() { - walletAddress := sdk.AccAddress(iter.Key()[len(types.SlashingPrefix):]) - var slashing sdk.Int - types.ModuleCdc.MustUnmarshalLengthPrefixed(iter.Value(), &slashing) - if handler(walletAddress, slashing) { - break - } - } -} - -func (k Keeper) SetSlashing(ctx sdk.Context, walletAddress sdk.AccAddress, slashing sdk.Int) { - store := ctx.KVStore(k.storeKey) - storeKey := types.GetSlashingKey(walletAddress) - bz := types.ModuleCdc.MustMarshalLengthPrefixed(slashing) - store.Set(storeKey, bz) -} - -func (k Keeper) GetSlashing(ctx sdk.Context, walletAddress sdk.AccAddress) (res sdk.Int) { - store := ctx.KVStore(k.storeKey) - bz := store.Get(types.GetSlashingKey(walletAddress)) - if bz == nil { - return sdk.ZeroInt() - } - types.ModuleCdc.MustUnmarshalLengthPrefixed(bz, &res) - return -} diff --git a/x/register/keeper/store.go b/x/register/keeper/store.go new file mode 100644 index 00000000..2fcd2ad6 --- /dev/null +++ b/x/register/keeper/store.go @@ -0,0 +1,229 @@ +package keeper + +import ( + "time" + + sdk "github.com/cosmos/cosmos-sdk/types" + + stratos "github.com/stratosnet/stratos-chain/types" + "github.com/stratosnet/stratos-chain/x/register/types" +) + +func (k Keeper) SetInitialGenesisStakeTotal(ctx sdk.Context, stake sdk.Int) { + store := ctx.KVStore(k.storeKey) + b := k.cdc.MustMarshalLengthPrefixed(&stratos.Int{Value: &stake}) + store.Set(types.InitialGenesisStakeTotalKey, b) +} + +func (k Keeper) GetInitialGenesisStakeTotal(ctx sdk.Context) (stake sdk.Int) { + store := ctx.KVStore(k.storeKey) + b := store.Get(types.InitialGenesisStakeTotalKey) + if b == nil { + return sdk.ZeroInt() + } + value := stratos.Int{} + k.cdc.MustUnmarshalLengthPrefixed(b, &value) + stake = *value.Value + return +} + +func (k Keeper) SetRemainingOzoneLimit(ctx sdk.Context, value sdk.Int) { + store := ctx.KVStore(k.storeKey) + b := k.cdc.MustMarshalLengthPrefixed(&stratos.Int{Value: &value}) + store.Set(types.UpperBoundOfTotalOzoneKey, b) +} + +func (k Keeper) GetRemainingOzoneLimit(ctx sdk.Context) (value sdk.Int) { + store := ctx.KVStore(k.storeKey) + b := store.Get(types.UpperBoundOfTotalOzoneKey) + if b == nil { + return sdk.ZeroInt() + } + intVal := stratos.Int{} + k.cdc.MustUnmarshalLengthPrefixed(b, &intVal) + value = *intVal.Value + return +} + +// SetUnbondingNode sets the unbonding MetaNode +func (k Keeper) SetUnbondingNode(ctx sdk.Context, ubd types.UnbondingNode) { + store := ctx.KVStore(k.storeKey) + bz := k.cdc.MustMarshalLengthPrefixed(&ubd) + networkAddr, err := stratos.SdsAddressFromBech32(ubd.GetNetworkAddr()) + if err != nil { + return + } + key := types.GetUBDNodeKey(networkAddr) + store.Set(key, bz) +} + +// RemoveUnbondingNode removes the unbonding MetaNode object +func (k Keeper) RemoveUnbondingNode(ctx sdk.Context, networkAddr stratos.SdsAddress) { + store := ctx.KVStore(k.storeKey) + key := types.GetUBDNodeKey(networkAddr) + store.Delete(key) +} + +// GetUnbondingNode return a unbonding UnbondingMetaNode +func (k Keeper) GetUnbondingNode(ctx sdk.Context, networkAddr stratos.SdsAddress) (ubd types.UnbondingNode, found bool) { + store := ctx.KVStore(k.storeKey) + key := types.GetUBDNodeKey(networkAddr) + value := store.Get(key) + if value == nil { + return ubd, false + } + k.cdc.MustUnmarshalLengthPrefixed(value, &ubd) + return ubd, true +} + +// SetUnbondingNodeQueueTimeSlice sets a specific unbonding queue timeslice. +func (k Keeper) SetUnbondingNodeQueueTimeSlice(ctx sdk.Context, timestamp time.Time, networkAddrs []string) { + store := ctx.KVStore(k.storeKey) + bz := k.cdc.MustMarshalLengthPrefixed(&stratos.SdsAddresses{Addresses: networkAddrs}) + store.Set(types.GetUBDTimeKey(timestamp), bz) +} + +// GetUnbondingNodeQueueTimeSlice gets a specific unbonding queue timeslice. A timeslice is a slice of DVPairs +// corresponding to unbonding delegations that expire at a certain time. +func (k Keeper) GetUnbondingNodeQueueTimeSlice(ctx sdk.Context, timestamp time.Time) (networkAddrs []string) { + store := ctx.KVStore(k.storeKey) + bz := store.Get(types.GetUBDTimeKey(timestamp)) + if bz == nil { + return make([]string, 0) + } + + addrValue := stratos.SdsAddresses{} + k.cdc.MustUnmarshalLengthPrefixed(bz, &addrValue) + networkAddrs = addrValue.GetAddresses() + return networkAddrs +} + +// UnbondingNodeQueueIterator returns all the unbonding queue timeslices from time 0 until endTime +func (k Keeper) UnbondingNodeQueueIterator(ctx sdk.Context, endTime time.Time) sdk.Iterator { + store := ctx.KVStore(k.storeKey) + return store.Iterator(types.UBDNodeQueueKey, sdk.InclusiveEndBytes(types.GetUBDTimeKey(endTime))) +} + +func (k Keeper) SetBondedResourceNodeCnt(ctx sdk.Context, count sdk.Int) { + store := ctx.KVStore(k.storeKey) + bz := k.cdc.MustMarshalLengthPrefixed(&stratos.Int{Value: &count}) + store.Set(types.ResourceNodeCntKey, bz) +} + +func (k Keeper) GetBondedResourceNodeCnt(ctx sdk.Context) (balance sdk.Int) { + store := ctx.KVStore(k.storeKey) + bz := store.Get(types.ResourceNodeCntKey) + if bz == nil { + return sdk.ZeroInt() + } + intValue := stratos.Int{} + k.cdc.MustUnmarshalLengthPrefixed(bz, &intValue) + balance = *intValue.Value + return +} + +func (k Keeper) SetBondedMetaNodeCnt(ctx sdk.Context, count sdk.Int) { + store := ctx.KVStore(k.storeKey) + bz := k.cdc.MustMarshalLengthPrefixed(&stratos.Int{Value: &count}) + store.Set(types.MetaNodeCntKey, bz) +} + +func (k Keeper) GetBondedMetaNodeCnt(ctx sdk.Context) (balance sdk.Int) { + store := ctx.KVStore(k.storeKey) + bz := store.Get(types.MetaNodeCntKey) + if bz == nil { + return sdk.ZeroInt() + } + intValue := stratos.Int{} + k.cdc.MustUnmarshalLengthPrefixed(bz, &intValue) + balance = *intValue.Value + return +} + +func (k Keeper) SetMetaNodeRegistrationVotePool(ctx sdk.Context, votePool types.MetaNodeRegistrationVotePool) { + nodeAddr := votePool.GetNetworkAddress() + store := ctx.KVStore(k.storeKey) + bz := k.cdc.MustMarshalLengthPrefixed(&votePool) + node, _ := stratos.SdsAddressFromBech32(nodeAddr) + store.Set(types.GetMetaNodeRegistrationVotesKey(node), bz) +} +func (k Keeper) GetMetaNodeRegistrationVotePool(ctx sdk.Context, nodeAddr stratos.SdsAddress) (votePool types.MetaNodeRegistrationVotePool, found bool) { + store := ctx.KVStore(k.storeKey) + bz := store.Get(types.GetMetaNodeRegistrationVotesKey(nodeAddr)) + if bz == nil { + return votePool, false + } + k.cdc.MustUnmarshalLengthPrefixed(bz, &votePool) + return votePool, true +} + +func (k Keeper) SetEffectiveTotalStake(ctx sdk.Context, stake sdk.Int) { + store := ctx.KVStore(k.storeKey) + bz := k.cdc.MustMarshalLengthPrefixed(&stratos.Int{Value: &stake}) + store.Set(types.EffectiveGenesisStakeTotalKey, bz) +} + +func (k Keeper) GetEffectiveTotalStake(ctx sdk.Context) (stake sdk.Int) { + store := ctx.KVStore(k.storeKey) + bz := store.Get(types.EffectiveGenesisStakeTotalKey) + if bz == nil { + return sdk.ZeroInt() + } + intValue := stratos.Int{} + k.cdc.MustUnmarshalLengthPrefixed(bz, &intValue) + stake = *intValue.Value + return +} + +func (k Keeper) SetStakeNozRate(ctx sdk.Context, stakeNozRate sdk.Dec) { + store := ctx.KVStore(k.storeKey) + bz := k.cdc.MustMarshalLengthPrefixed(&stratos.Dec{Value: &stakeNozRate}) + store.Set(types.StakeNozRateKey, bz) +} + +func (k Keeper) GetStakeNozRate(ctx sdk.Context) (stakeNozRate sdk.Dec) { + store := ctx.KVStore(k.storeKey) + bz := store.Get(types.StakeNozRateKey) + if bz == nil { + panic("Stored stake noz rate should not be nil") + } + decValue := stratos.Dec{} + k.cdc.MustUnmarshalLengthPrefixed(bz, &decValue) + stakeNozRate = *decValue.Value + return +} + +// IteratorSlashingInfo Iteration for each slashing +func (k Keeper) IteratorSlashingInfo(ctx sdk.Context, handler func(walletAddress sdk.AccAddress, slashing sdk.Int) (stop bool)) { + store := ctx.KVStore(k.storeKey) + iter := sdk.KVStorePrefixIterator(store, types.SlashingPrefix) + defer iter.Close() + for ; iter.Valid(); iter.Next() { + walletAddress := sdk.AccAddress(iter.Key()[len(types.SlashingPrefix):]) + intValue := stratos.Int{} + k.cdc.MustUnmarshalLengthPrefixed(iter.Value(), &intValue) + slashing := *intValue.Value + if handler(walletAddress, slashing) { + break + } + } +} + +func (k Keeper) SetSlashing(ctx sdk.Context, walletAddress sdk.AccAddress, slashing sdk.Int) { + store := ctx.KVStore(k.storeKey) + storeKey := types.GetSlashingKey(walletAddress) + bz := k.cdc.MustMarshalLengthPrefixed(&stratos.Int{Value: &slashing}) + store.Set(storeKey, bz) +} + +func (k Keeper) GetSlashing(ctx sdk.Context, walletAddress sdk.AccAddress) (res sdk.Int) { + store := ctx.KVStore(k.storeKey) + bz := store.Get(types.GetSlashingKey(walletAddress)) + if bz == nil { + return sdk.ZeroInt() + } + intValue := stratos.Int{} + k.cdc.MustUnmarshalLengthPrefixed(bz, &intValue) + res = *intValue.Value + return +} diff --git a/x/register/types/codec.go b/x/register/types/codec.go index 60df4dd2..516633ea 100644 --- a/x/register/types/codec.go +++ b/x/register/types/codec.go @@ -38,24 +38,18 @@ func RegisterInterfaces(registry types.InterfaceRegistry) { ) registry.RegisterImplementations( (*authz.Authorization)(nil), - //&StakeAuthorization{}, ) msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) } -//var ( -// amino = codec.NewLegacyAmino() +// ModuleCdc references the global x/register module codec. Note, the codec should +// ONLY be used in certain instances of tests and for JSON encoding as Amino is +// still used for that purpose. // -// // ModuleCdc references the global x/register module codec. Note, the codec should -// // ONLY be used in certain instances of tests and for JSON encoding as Amino is -// // still used for that purpose. -// // -// // The actual codec used for serialization should be provided to x/register and -// // defined at the application level. -//) +// The actual codec used for serialization should be provided to x/register and +// defined at the application level. -// ModuleCdc defines the module codec var ModuleCdc *codec.LegacyAmino func init() { diff --git a/x/register/types/expected_keepers.go b/x/register/types/expected_keepers.go index d4d8cb6d..254a6f20 100644 --- a/x/register/types/expected_keepers.go +++ b/x/register/types/expected_keepers.go @@ -3,39 +3,14 @@ package types import ( sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" - paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" + stratos "github.com/stratosnet/stratos-chain/types" ) -/* -When a module wishes to interact with another module, it is good practice to define what it will use -as an interface so the module cannot use things that are not permitted. -TODO: Create interfaces of what you expect the other keepers to have to be able to use this module. -type BankKeeper interface { - SubtractCoins(ctx sdk.Context, addr sdk.AccAddress, amt sdk.Coins) (sdk.Coins, error) - SendCoins(ctx sdk.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) error -} -*/ - -// ParamSubspace defines the expected Subspace interface -type ParamSubspace interface { - WithKeyTable(table paramstypes.KeyTable) paramstypes.Subspace - Get(ctx sdk.Context, key []byte, ptr interface{}) - GetParamSet(ctx sdk.Context, ps paramstypes.ParamSet) - SetParamSet(ctx sdk.Context, ps paramstypes.ParamSet) -} - // AccountKeeper defines the expected account keeper (noalias) type AccountKeeper interface { - IterateAccounts(ctx sdk.Context, process func(authtypes.AccountI) (stop bool)) GetAccount(ctx sdk.Context, addr sdk.AccAddress) authtypes.AccountI // only used for simulation - GetModuleAddress(name string) sdk.AccAddress - GetModuleAccount(ctx sdk.Context, moduleName string) authtypes.ModuleAccountI - - // SetModuleAccount TODO remove with genesis 2-phases refactor https://github.com/cosmos/cosmos-sdk/issues/2862 - SetModuleAccount(sdk.Context, authtypes.ModuleAccountI) } // BankKeeper defines the expected interface needed to retrieve account balances. @@ -43,37 +18,20 @@ type BankKeeper interface { HasBalance(ctx sdk.Context, addr sdk.AccAddress, amt sdk.Coin) bool GetAllBalances(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin - LockedCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins - SpendableCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins - - GetSupply(ctx sdk.Context, denom string) sdk.Coin - SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error SendCoinsFromModuleToModule(ctx sdk.Context, senderPool, recipientPool string, amt sdk.Coins) error - UndelegateCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error - DelegateCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error - - MintCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error - BurnCoins(ctx sdk.Context, name string, amt sdk.Coins) error } // RegisterHooks event hooks for registered node object (noalias) type RegisterHooks interface { - AfterNodeCreated(ctx sdk.Context, networkAddr stratos.SdsAddress, isMetaNode bool) // Must be called when a node is created - BeforeNodeModified(ctx sdk.Context, networkAddr stratos.SdsAddress, isMetaNode bool) // Must be called when a node's state changes - AfterNodeRemoved(ctx sdk.Context, networkAddr stratos.SdsAddress, isMetaNode bool) // Must be called when a node is deleted - + AfterNodeCreated(ctx sdk.Context, networkAddr stratos.SdsAddress, isMetaNode bool) // Must be called when a node is created + BeforeNodeModified(ctx sdk.Context, networkAddr stratos.SdsAddress, isMetaNode bool) // Must be called when a node's state changes + AfterNodeRemoved(ctx sdk.Context, networkAddr stratos.SdsAddress, isMetaNode bool) // Must be called when a node is deleted AfterNodeBonded(ctx sdk.Context, networkAddr stratos.SdsAddress, isMetaNode bool) // Must be called when a node is bonded AfterNodeBeginUnbonding(ctx sdk.Context, networkAddr stratos.SdsAddress, isMetaNode bool) // Must be called when a node begins unbonding - - //BeforeNodeCreated(ctx sdk.Context, networkAddr sdk.AccAddress, isMetaNode bool) // Must be called when a node is created - //BeforeNodeModified(ctx sdk.Context, networkAddr sdk.AccAddress, isMetaNode bool) // Must be called when a node's shares are modified - //BeforeNodeRemoved(ctx sdk.Context, networkAddr sdk.AccAddress, isMetaNode bool) // Must be called when a node is removed - //AfterNodeModified(ctx sdk.Context, networkAddr sdk.AccAddress, isMetaNode bool) } type DistrKeeper interface { FundCommunityPool(ctx sdk.Context, amount sdk.Coins, sender sdk.AccAddress) error - GetFeePool(ctx sdk.Context) (feePool distrtypes.FeePool) } diff --git a/x/register/types/meta_node.go b/x/register/types/meta_node.go index 01452503..abdf99bd 100644 --- a/x/register/types/meta_node.go +++ b/x/register/types/meta_node.go @@ -149,7 +149,7 @@ func UnmarshalMetaNode(cdc codec.Codec, value []byte) (metaNode MetaNode, err er return metaNode, err } -//MetaNodes is a collection of meta node +// MetaNodes is a collection of meta node type MetaNodes []MetaNode func NewMetaNodes(metaNodes ...MetaNode) MetaNodes { @@ -223,32 +223,6 @@ func NewRegistrationVotePool(nodeAddress stratos.SdsAddress, approveList []strat } } -// MustMarshalMetaNodeRegistrationVotePool returns the MetaNode bytes. Panics if fails -func MustMarshalMetaNodeRegistrationVotePool(cdc codec.Codec, votePool MetaNodeRegistrationVotePool) []byte { - return cdc.MustMarshal(&votePool) -} - -// MustUnmarshalMetaNodeRegistrationVotePool unmarshal an meta node from a store value. Panics if fails -func MustUnmarshalMetaNodeRegistrationVotePool(cdc codec.Codec, value []byte) MetaNodeRegistrationVotePool { - votePool, err := UnmarshalMetaNodeRegistrationVotePool(cdc, value) - if err != nil { - panic(err) - } - return votePool -} - -// UnmarshalMetaNodeRegistrationVotePool unmarshal an Meta node from a store value -func UnmarshalMetaNodeRegistrationVotePool(cdc codec.Codec, value []byte) (votePool MetaNodeRegistrationVotePool, err error) { - err = cdc.Unmarshal(value, &votePool) - return votePool, err -} - -//func (v1 MetaNode) Equal(v2 MetaNode) bool { -// bz1 := ModuleCdc.MustMarshalLengthPrefixed(&v1) -// bz2 := ModuleCdc.MustMarshalLengthPrefixed(&v2) -// return bytes.Equal(bz1, bz2) -//} - // UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces func (v MetaNode) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { var pk cryptotypes.PubKey diff --git a/x/register/types/resource_node.go b/x/register/types/resource_node.go index 87792b22..35ef67e7 100644 --- a/x/register/types/resource_node.go +++ b/x/register/types/resource_node.go @@ -10,6 +10,7 @@ import ( cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + stratos "github.com/stratosnet/stratos-chain/types" ) @@ -196,12 +197,12 @@ func (v ResourceNode) IsUnBonding() bool { } // MustMarshalResourceNode returns the resourceNode bytes. Panics if fails -func MustMarshalResourceNode(cdc codec.BinaryCodec, resourceNode ResourceNode) []byte { +func MustMarshalResourceNode(cdc codec.Codec, resourceNode ResourceNode) []byte { return cdc.MustMarshal(&resourceNode) } // MustUnmarshalResourceNode unmarshal a resourceNode from a store value. Panics if fails -func MustUnmarshalResourceNode(cdc codec.BinaryCodec, value []byte) ResourceNode { +func MustUnmarshalResourceNode(cdc codec.Codec, value []byte) ResourceNode { resourceNode, err := UnmarshalResourceNode(cdc, value) if err != nil { panic(err) @@ -210,26 +211,11 @@ func MustUnmarshalResourceNode(cdc codec.BinaryCodec, value []byte) ResourceNode } // UnmarshalResourceNode unmarshal a resourceNode from a store value -func UnmarshalResourceNode(cdc codec.BinaryCodec, value []byte) (v ResourceNode, err error) { +func UnmarshalResourceNode(cdc codec.Codec, value []byte) (v ResourceNode, err error) { err = cdc.Unmarshal(value, &v) return v, err } -//func (v1 ResourceNode) Equal(v2 ResourceNode) bool { -// bz1 := types.ModuleCdc.MustMarshalLengthPrefixed(&v1) -// bz2 := types.ModuleCdc.MustMarshalLengthPrefixed(&v2) -// return bytes.Equal(bz1, bz2) -//} - -// GetOwnerAddr -//func (s *Staking) GetNetworkAddress() stratos.SdsAddress { -// networkAddr, err := stratos.SdsAddressFromBech32(s.NetworkAddress) -// if err != nil { -// panic(err) -// } -// return networkAddr -//} - func (s *Staking) GetOwnerAddr() sdk.AccAddress { addr, err := sdk.AccAddressFromBech32(s.OwnerAddress) if err != nil { @@ -239,12 +225,6 @@ func (s *Staking) GetOwnerAddr() sdk.AccAddress { } func (s *Staking) GetShares() sdk.Dec { return s.Value } -// String returns a human readable string representation of a node. -//func (s *Staking) String() string { -// out, _ := yaml.Marshal(s) -// return string(out) -//} - // Stakings is a collection of Staking type Stakings []Staking @@ -256,12 +236,6 @@ func (ss Stakings) String() (out string) { return strings.TrimSpace(out) } -// UnmarshalStaking returns the resource node staking -func UnmarshalStaking(cdc codec.BinaryCodec, value []byte) (staking Staking, err error) { - err = cdc.Unmarshal(value, &staking) - return staking, err -} - // UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces func (v ResourceNode) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { var pk cryptotypes.PubKey diff --git a/x/register/types/unbonding_node.go b/x/register/types/unbonding_node.go index b7055fd1..1229c874 100644 --- a/x/register/types/unbonding_node.go +++ b/x/register/types/unbonding_node.go @@ -1,16 +1,13 @@ package types import ( - "bytes" "time" - "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" + stratos "github.com/stratosnet/stratos-chain/types" ) -// ======================= - // IsMature - is the current entry mature func (e UnbondingNodeEntry) IsMature(currentTime time.Time) bool { return !e.CompletionTime.After(currentTime) @@ -29,9 +26,7 @@ func NewUnbondingNode(networkAddr stratos.SdsAddress, isMetaNode bool, creationH } // NewUnbondingNodeEntry - create a new unbonding Node object -func NewUnbondingNodeEntry(creationHeight int64, completionTime time.Time, - balance sdk.Int) UnbondingNodeEntry { - +func NewUnbondingNodeEntry(creationHeight int64, completionTime time.Time, balance sdk.Int) UnbondingNodeEntry { return UnbondingNodeEntry{ CreationHeight: creationHeight, CompletionTime: completionTime, @@ -41,9 +36,7 @@ func NewUnbondingNodeEntry(creationHeight int64, completionTime time.Time, } // AddEntry - append entry to the unbonding Node -func (un *UnbondingNode) AddEntry(creationHeight int64, - minTime time.Time, balance sdk.Int) { - +func (un *UnbondingNode) AddEntry(creationHeight int64, minTime time.Time, balance sdk.Int) { entry := NewUnbondingNodeEntry(creationHeight, minTime, balance) un.Entries = append(un.Entries, &entry) } @@ -52,42 +45,3 @@ func (un *UnbondingNode) AddEntry(creationHeight int64, func (un *UnbondingNode) RemoveEntry(i int64) { un.Entries = append(un.Entries[:i], un.Entries[i+1:]...) } - -// MustMarshalUnbondingNode return the unbonding Node -func MustMarshalUnbondingNode(cdc codec.BinaryCodec, uin UnbondingNode) []byte { - return cdc.MustMarshalLengthPrefixed(&uin) -} - -// MustUnmarshalUnbondingNode unmarshal a unbonding Node from a store value -func MustUnmarshalUnbondingNode(cdc codec.BinaryCodec, value []byte) UnbondingNode { - un, err := UnmarshalUnbondingNode(cdc, value) - if err != nil { - panic(err) - } - return un -} - -// UnmarshalUnbondingNode unmarshal a unbonding Node from a store value -func UnmarshalUnbondingNode(cdc codec.BinaryCodec, value []byte) (uin UnbondingNode, err error) { - err = cdc.UnmarshalLengthPrefixed(value, &uin) - return uin, err -} - -// Equal nolint -// inefficient but only used in testing -func (un UnbondingNode) Equal(un2 UnbondingNode) bool { - var cdc codec.BinaryCodec - bz1 := cdc.MustMarshalLengthPrefixed(&un) - bz2 := cdc.MustMarshalLengthPrefixed(&un2) - return bytes.Equal(bz1, bz2) -} - -// UnbondingNodes is a collection of UnbondingNode -//type UnbondingNodes []UnbondingNode - -//func (uns UnbondingNodes) String() (out string) { -// for _, u := range uns { -// out += u.String() + "\n" -// } -// return strings.TrimSpace(out) -//} diff --git a/x/sds/app_test.go b/x/sds/app_test.go index 32a7a185..6b64ddb7 100644 --- a/x/sds/app_test.go +++ b/x/sds/app_test.go @@ -232,13 +232,13 @@ package sds // initLt := sdk.NewInt(43000) // initPt := sdk.NewCoin(keeper.BondDenom(ctx), sdk.ZeroInt()) // -// keeper.RegisterKeeper.SetInitialGenesisStakeTotal(ctx, initS) -// keeper.RegisterKeeper.SetTotalUnissuedPrepay(ctx, initPt) -// keeper.RegisterKeeper.SetRemainingOzoneLimit(ctx, initLt) +// keeper.registerKeeper.SetInitialGenesisStakeTotal(ctx, initS) +// keeper.registerKeeper.SetTotalUnissuedPrepay(ctx, initPt) +// keeper.registerKeeper.SetRemainingOzoneLimit(ctx, initLt) // -// log.Printf("==== init stake total is %v", keeper.RegisterKeeper.GetInitialGenesisStakeTotal(ctx)) -// log.Printf("==== init prepay is %v", keeper.RegisterKeeper.GetTotalUnissuedPrepay(ctx)) -// log.Printf("==== ozone limit is %v\n\n", keeper.RegisterKeeper.GetRemainingOzoneLimit(ctx)) +// log.Printf("==== init stake total is %v", keeper.registerKeeper.GetInitialGenesisStakeTotal(ctx)) +// log.Printf("==== init prepay is %v", keeper.registerKeeper.GetTotalUnissuedPrepay(ctx)) +// log.Printf("==== ozone limit is %v\n\n", keeper.registerKeeper.GetRemainingOzoneLimit(ctx)) // // numPrepay := 5 // prepaySeq := make([]sdk.Int, 0) @@ -247,9 +247,9 @@ package sds // } // // for i, val := range prepaySeq { -// S := keeper.RegisterKeeper.GetInitialGenesisStakeTotal(ctx) -// Pt := keeper.RegisterKeeper.GetTotalUnissuedPrepay(ctx).Amount -// Lt := keeper.RegisterKeeper.GetRemainingOzoneLimit(ctx) +// S := keeper.registerKeeper.GetInitialGenesisStakeTotal(ctx) +// Pt := keeper.registerKeeper.GetTotalUnissuedPrepay(ctx).Amount +// Lt := keeper.registerKeeper.GetRemainingOzoneLimit(ctx) // // nozPriceBefore := S.ToDec().Add(Pt.ToDec()).Quo(Lt.ToDec()).TruncateInt() // @@ -264,8 +264,8 @@ package sds // // Pt = Pt.Add(val) // Lt = Lt.Sub(nozPurchased) -// keeper.RegisterKeeper.SetTotalUnissuedPrepay(ctx, sdk.NewCoin(keeper.BondDenom(ctx), Pt)) -// keeper.RegisterKeeper.SetRemainingOzoneLimit(ctx, Lt) +// keeper.registerKeeper.SetTotalUnissuedPrepay(ctx, sdk.NewCoin(keeper.BondDenom(ctx), Pt)) +// keeper.registerKeeper.SetRemainingOzoneLimit(ctx, Lt) // log.Printf("---- prepay #%v: %v wei----", i, val) // log.Printf("nozPriceBefore is %v", nozPriceBefore) // log.Printf("nozPurchased is %v", nozPurchased) @@ -312,22 +312,22 @@ package sds // blacklistedAddrs[notBondedPool.GetAddress().String()] = true // blacklistedAddrs[bondPool.GetAddress().String()] = true // -// bankKeeper := bank.NewBaseKeeper(mApp.AccountKeeper, mApp.ParamsKeeper.Subspace(bank.DefaultParamspace), blacklistedAddrs) +// bankKeeper := bank.NewBaseKeeper(mApp.accountKeeper, mApp.ParamsKeeper.Subspace(bank.DefaultParamspace), blacklistedAddrs) // maccPerms := map[string][]string{ // auth.FeeCollectorName: {"fee_collector"}, // staking.NotBondedPoolName: {supply.Burner, supply.Staking}, // staking.BondedPoolName: {supply.Burner, supply.Staking}, // } -// supplyKeeper := supply.NewKeeper(mApp.Cdc, keySupply, mApp.AccountKeeper, bankKeeper, maccPerms) +// supplyKeeper := supply.NewKeeper(mApp.Cdc, keySupply, mApp.accountKeeper, bankKeeper, maccPerms) // stakingKeeper := staking.NewKeeper(mApp.Cdc, keyStaking, supplyKeeper, mApp.ParamsKeeper.Subspace(staking.DefaultParamspace)) -// registerKeeper := register.NewKeeper(mApp.Cdc, keyRegister, mApp.ParamsKeeper.Subspace(register.DefaultParamSpace), mApp.AccountKeeper, bankKeeper) -// potKeeper := pot.NewKeeper(mApp.Cdc, keyPot, mApp.ParamsKeeper.Subspace(pot.DefaultParamSpace), auth.FeeCollectorName, bankKeeper, supplyKeeper, mApp.AccountKeeper, stakingKeeper, registerKeeper) +// registerKeeper := register.NewKeeper(mApp.Cdc, keyRegister, mApp.ParamsKeeper.Subspace(register.DefaultParamSpace), mApp.accountKeeper, bankKeeper) +// potKeeper := pot.NewKeeper(mApp.Cdc, keyPot, mApp.ParamsKeeper.Subspace(pot.DefaultParamSpace), auth.FeeCollectorName, bankKeeper, supplyKeeper, mApp.accountKeeper, stakingKeeper, registerKeeper) // keeper := NewKeeper(mApp.Cdc, keySds, mApp.ParamsKeeper.Subspace(DefaultParamSpace), bankKeeper, registerKeeper, potKeeper) // // mApp.Router().AddRoute(staking.RouterKey, staking.NewHandler(stakingKeeper)) // mApp.Router().AddRoute(RouterKey, NewHandler(keeper)) // mApp.SetEndBlocker(getEndBlocker(keeper)) -// mApp.SetInitChainer(getInitChainer(mApp, keeper, mApp.AccountKeeper, supplyKeeper, +// mApp.SetInitChainer(getInitChainer(mApp, keeper, mApp.accountKeeper, supplyKeeper, // []supplyexported.ModuleAccountI{feeCollector, notBondedPool, bondPool}, stakingKeeper, registerKeeper, potKeeper)) // // err := mApp.CompleteSetup(keySds, keyStaking, keySupply, keyRegister, keyPot) @@ -378,23 +378,23 @@ package sds // blacklistedAddrs[foundationAccount.GetAddress().String()] = true // // //accountKeeper := auth.NewAccountKeeper(mApp.Cdc, keyAcc, mApp.ParamsKeeper.Subspace(auth.DefaultParamspace), auth.ProtoBaseAccount) -// bankKeeper := bank.NewBaseKeeper(mApp.AccountKeeper, mApp.ParamsKeeper.Subspace(bank.DefaultParamspace), blacklistedAddrs) +// bankKeeper := bank.NewBaseKeeper(mApp.accountKeeper, mApp.ParamsKeeper.Subspace(bank.DefaultParamspace), blacklistedAddrs) // maccPerms := map[string][]string{ // auth.FeeCollectorName: {"fee_collector"}, // staking.NotBondedPoolName: {supply.Burner, supply.Staking}, // staking.BondedPoolName: {supply.Burner, supply.Staking}, // } -// supplyKeeper := supply.NewKeeper(mApp.Cdc, keySupply, mApp.AccountKeeper, bankKeeper, maccPerms) +// supplyKeeper := supply.NewKeeper(mApp.Cdc, keySupply, mApp.accountKeeper, bankKeeper, maccPerms) // stakingKeeper := staking.NewKeeper(mApp.Cdc, keyStaking, supplyKeeper, mApp.ParamsKeeper.Subspace(staking.DefaultParamspace)) -// registerKeeper := register.NewKeeper(mApp.Cdc, keyRegister, mApp.ParamsKeeper.Subspace(register.DefaultParamSpace), mApp.AccountKeeper, bankKeeper) -// potKeeper := pot.NewKeeper(mApp.Cdc, keyPot, mApp.ParamsKeeper.Subspace(pot.DefaultParamSpace), auth.FeeCollectorName, bankKeeper, supplyKeeper, mApp.AccountKeeper, stakingKeeper, registerKeeper) +// registerKeeper := register.NewKeeper(mApp.Cdc, keyRegister, mApp.ParamsKeeper.Subspace(register.DefaultParamSpace), mApp.accountKeeper, bankKeeper) +// potKeeper := pot.NewKeeper(mApp.Cdc, keyPot, mApp.ParamsKeeper.Subspace(pot.DefaultParamSpace), auth.FeeCollectorName, bankKeeper, supplyKeeper, mApp.accountKeeper, stakingKeeper, registerKeeper) // // keeper := NewKeeper(mApp.Cdc, keySds, mApp.ParamsKeeper.Subspace(DefaultParamSpace), bankKeeper, registerKeeper, potKeeper) // // mApp.Router().AddRoute(staking.RouterKey, staking.NewHandler(stakingKeeper)) // mApp.Router().AddRoute(RouterKey, NewHandler(keeper)) // mApp.SetEndBlocker(getEndBlocker(keeper)) -// mApp.SetInitChainer(getInitChainerTestPurchase(mApp, keeper, mApp.AccountKeeper, supplyKeeper, +// mApp.SetInitChainer(getInitChainerTestPurchase(mApp, keeper, mApp.accountKeeper, supplyKeeper, // []supplyexported.ModuleAccountI{feeCollector, notBondedPool, bondPool}, stakingKeeper, registerKeeper, potKeeper)) // // err := mApp.CompleteSetup(keySds, keyStaking, keySupply, keyRegister, keyPot) @@ -405,7 +405,7 @@ package sds // //// getInitChainer initializes the chainer of the mock app and sets the genesis //// state. It returns an empty ResponseInitChain. -//func getInitChainer(mapp *mock.App, keeper Keeper, accountKeeper auth.AccountKeeper, supplyKeeper supply.Keeper, +//func getInitChainer(mapp *mock.App, keeper Keeper, accountKeeper auth.accountKeeper, supplyKeeper supply.Keeper, // blacklistedAddrs []supplyexported.ModuleAccountI, stakingKeeper staking.Keeper, registerKeeper register.Keeper, potKeeper pot.Keeper) sdk.InitChainer { // return func(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain { // // set module accounts @@ -461,7 +461,7 @@ package sds // )) // // // init bank genesis -// keeper.BankKeeper.SetSendEnabled(ctx, true) +// keeper.bankKeeper.SetSendEnabled(ctx, true) // // InitGenesis(ctx, keeper, NewGenesisState(types.DefaultParams(), nil)) // @@ -473,7 +473,7 @@ package sds // //// getInitChainer initializes the chainer of the mock app and sets the genesis //// state. It returns an empty ResponseInitChain. -//func getInitChainerTestPurchase(mapp *mock.App, keeper Keeper, accountKeeper auth.AccountKeeper, supplyKeeper supply.Keeper, +//func getInitChainerTestPurchase(mapp *mock.App, keeper Keeper, accountKeeper auth.accountKeeper, supplyKeeper supply.Keeper, // blacklistedAddrs []supplyexported.ModuleAccountI, stakingKeeper staking.Keeper, registerKeeper register.Keeper, potKeeper pot.Keeper) sdk.InitChainer { // return func(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain { // // set module accounts @@ -529,7 +529,7 @@ package sds // // registerKeeper.SetTotalUnissuedPrepay(ctx, sdk.NewCoin(potKeeper.BondDenom(ctx), totalUnissuedPrepayTestPurchase)) // // init bank genesis -// keeper.BankKeeper.SetSendEnabled(ctx, true) +// keeper.bankKeeper.SetSendEnabled(ctx, true) // // InitGenesis(ctx, keeper, NewGenesisState(types.DefaultParams(), nil)) // @@ -542,7 +542,7 @@ package sds //// getEndBlocker returns a staking endblocker. //func getEndBlocker(keeper Keeper) sdk.EndBlocker { // return func(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock { -// validatorUpdates := keeper.PotKeeper.StakingKeeper.BlockValidatorUpdates(ctx) +// validatorUpdates := keeper.potKeeper.stakingKeeper.BlockValidatorUpdates(ctx) // // return abci.ResponseEndBlock{ // ValidatorUpdates: validatorUpdates, diff --git a/x/sds/keeper/keeper.go b/x/sds/keeper/keeper.go index a23aeefb..0440884a 100644 --- a/x/sds/keeper/keeper.go +++ b/x/sds/keeper/keeper.go @@ -4,15 +4,18 @@ import ( "encoding/hex" "fmt" + "github.com/tendermint/tendermint/libs/log" + "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" bankKeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" + potKeeper "github.com/stratosnet/stratos-chain/x/pot/keeper" registerKeeper "github.com/stratosnet/stratos-chain/x/register/keeper" + registertypes "github.com/stratosnet/stratos-chain/x/register/types" "github.com/stratosnet/stratos-chain/x/sds/types" - "github.com/tendermint/tendermint/libs/log" ) // Keeper encodes/decodes files using the go-amino (binary) @@ -22,8 +25,8 @@ type Keeper struct { cdc codec.Codec paramSpace paramtypes.Subspace bankKeeper bankKeeper.Keeper - RegisterKeeper registerKeeper.Keeper - PotKeeper potKeeper.Keeper + registerKeeper registerKeeper.Keeper + potKeeper potKeeper.Keeper } // NewKeeper returns a new sdk.NewKeeper that uses go-amino to @@ -42,8 +45,8 @@ func NewKeeper( cdc: cdc, paramSpace: paramSpace.WithKeyTable(types.ParamKeyTable()), bankKeeper: bankKeeper, - RegisterKeeper: registerKeeper, - PotKeeper: potKeeper, + registerKeeper: registerKeeper, + potKeeper: potKeeper, } } @@ -76,9 +79,9 @@ func (k Keeper) SetFileHash(ctx sdk.Context, fileHash []byte, fileInfo types.Fil // [X] is the total amount of STOS token prepaid by user at time t // the total amount of Ozone the user gets = Lt * X / (S + Pt + X) func (k Keeper) purchaseNozAndSubCoins(ctx sdk.Context, from sdk.AccAddress, amount sdk.Int) (sdk.Int, error) { - St := k.RegisterKeeper.GetEffectiveTotalStake(ctx) - Pt := k.RegisterKeeper.GetTotalUnissuedPrepay(ctx).Amount - Lt := k.RegisterKeeper.GetRemainingOzoneLimit(ctx) + St := k.registerKeeper.GetEffectiveTotalStake(ctx) + Pt := k.registerKeeper.GetTotalUnissuedPrepay(ctx).Amount + Lt := k.registerKeeper.GetRemainingOzoneLimit(ctx) purchased := Lt.ToDec(). Mul(amount.ToDec()). @@ -88,22 +91,23 @@ func (k Keeper) purchaseNozAndSubCoins(ctx sdk.Context, from sdk.AccAddress, amo TruncateInt() // send coins to total unissued prepay pool - err := k.RegisterKeeper.SendCoinsFromAccount2TotalUnissuedPrepayPool(ctx, from, sdk.NewCoin(k.BondDenom(ctx), amount)) + prepayAmt := sdk.NewCoin(k.BondDenom(ctx), amount) + err := k.bankKeeper.SendCoinsFromAccountToModule(ctx, from, registertypes.TotalUnissuedPrepay, sdk.NewCoins(prepayAmt)) if err != nil { return sdk.ZeroInt(), err } // update remaining noz limit newRemainingOzoneLimit := Lt.Sub(purchased) - k.RegisterKeeper.SetRemainingOzoneLimit(ctx, newRemainingOzoneLimit) + k.registerKeeper.SetRemainingOzoneLimit(ctx, newRemainingOzoneLimit) return purchased, nil } func (k Keeper) simulatePurchaseNoz(ctx sdk.Context, amount sdk.Int) sdk.Int { - St := k.RegisterKeeper.GetEffectiveTotalStake(ctx) - Pt := k.RegisterKeeper.GetTotalUnissuedPrepay(ctx).Amount - Lt := k.RegisterKeeper.GetRemainingOzoneLimit(ctx) + St := k.registerKeeper.GetEffectiveTotalStake(ctx) + Pt := k.registerKeeper.GetTotalUnissuedPrepay(ctx).Amount + Lt := k.registerKeeper.GetRemainingOzoneLimit(ctx) purchased := Lt.ToDec(). Mul(amount.ToDec()). Quo((St. diff --git a/x/sds/keeper/msg_server.go b/x/sds/keeper/msg_server.go index 846b2664..80213801 100644 --- a/x/sds/keeper/msg_server.go +++ b/x/sds/keeper/msg_server.go @@ -30,7 +30,7 @@ func (k msgServer) HandleMsgFileUpload(c context.Context, msg *types.MsgFileUplo return &types.MsgFileUploadResponse{}, sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, err.Error()) } - if _, found := k.RegisterKeeper.GetMetaNode(ctx, reporter); found == false { + if _, found := k.registerKeeper.GetMetaNode(ctx, reporter); found == false { return nil, sdkerrors.Wrapf(sdkerrors.ErrUnauthorized, "Reporter %s isn't an SP node", msg.GetReporter()) } height := sdk.NewInt(ctx.BlockHeight()) @@ -66,7 +66,7 @@ func (k msgServer) HandleMsgFileUpload(c context.Context, msg *types.MsgFileUplo // HandleMsgPrepay Handles MsgPrepay. func (k msgServer) HandleMsgPrepay(c context.Context, msg *types.MsgPrepay) (*types.MsgPrepayResponse, error) { ctx := sdk.UnwrapSDKContext(c) - //if k.BankKeeper.GetSendEnabled(ctx) == false { + //if k.bankKeeper.GetSendEnabled(ctx) == false { // return nil, nil //} diff --git a/x/sds/keeper/querier.go b/x/sds/keeper/querier.go index e6b54577..5776efb5 100644 --- a/x/sds/keeper/querier.go +++ b/x/sds/keeper/querier.go @@ -68,7 +68,7 @@ func querySimulatePrepay(ctx sdk.Context, req abci.RequestQuery, k Keeper, _ *co // queryCurrNozPrice fetch current noz price. func queryCurrNozPrice(ctx sdk.Context, _ abci.RequestQuery, k Keeper, _ *codec.LegacyAmino) ([]byte, error) { - nozPrice := k.RegisterKeeper.CurrNozPrice(ctx) + nozPrice := k.registerKeeper.CurrNozPrice(ctx) nozPriceByte, _ := nozPrice.MarshalJSON() return nozPriceByte, nil } @@ -80,7 +80,7 @@ func queryNozSupply(ctx sdk.Context, _ abci.RequestQuery, k Keeper, _ *codec.Leg Total sdk.Int } var nozSupply Supply - nozSupply.Remaining, nozSupply.Total = k.RegisterKeeper.NozSupply(ctx) + nozSupply.Remaining, nozSupply.Total = k.registerKeeper.NozSupply(ctx) nozSupplyByte, _ := json.Marshal(nozSupply) return nozSupplyByte, nil } diff --git a/x/sds/oz_price_test.go b/x/sds/oz_price_test.go index ce443f58..cd0b5344 100644 --- a/x/sds/oz_price_test.go +++ b/x/sds/oz_price_test.go @@ -214,6 +214,7 @@ func TestOzPriceChange(t *testing.T) { bankKeeper := stApp.GetBankKeeper() registerKeeper := stApp.GetRegisterKeeper() potKeeper := stApp.GetPotKeeper() + distrKeeper := stApp.GetDistrKeeper() /********************* foundation account deposit *********************/ header := tmproto.Header{Height: stApp.LastBlockHeight() + 1, ChainID: chainID} @@ -444,7 +445,7 @@ func TestOzPriceChange(t *testing.T) { /********************* record data before delivering tx *********************/ lastFoundationAccBalance := bankKeeper.GetAllBalances(ctx, foundationAccountAddr) lastUnissuedPrepay := registerKeeper.GetTotalUnissuedPrepay(ctx) - lastCommunityPool := sdk.NewCoins(sdk.NewCoin(potKeeper.BondDenom(ctx), potKeeper.DistrKeeper.GetFeePool(ctx).CommunityPool.AmountOf(potKeeper.BondDenom(ctx)).TruncateInt())) + lastCommunityPool := sdk.NewCoins(sdk.NewCoin(potKeeper.BondDenom(ctx), distrKeeper.GetFeePool(ctx).CommunityPool.AmountOf(potKeeper.BondDenom(ctx)).TruncateInt())) lastMatureTotalOfResNode1 := potKeeper.GetMatureTotalReward(ctx, resOwner1) /********************* deliver tx *********************/ @@ -1249,6 +1250,7 @@ func TestOzPriceChangeVolumeReport(t *testing.T) { bankKeeper := stApp.GetBankKeeper() registerKeeper := stApp.GetRegisterKeeper() potKeeper := stApp.GetPotKeeper() + distrKeeper := stApp.GetDistrKeeper() /********************* foundation account deposit *********************/ header := tmproto.Header{Height: stApp.LastBlockHeight() + 1, ChainID: chainID} @@ -1404,7 +1406,7 @@ func TestOzPriceChangeVolumeReport(t *testing.T) { /********************* record data before delivering tx *********************/ _ = bankKeeper.GetAllBalances(ctx, foundationAccountAddr) _ = registerKeeper.GetTotalUnissuedPrepay(ctx) - _ = sdk.NewCoins(sdk.NewCoin(potKeeper.BondDenom(ctx), potKeeper.DistrKeeper.GetFeePool(ctx).CommunityPool.AmountOf(potKeeper.BondDenom(ctx)).TruncateInt())) + _ = sdk.NewCoins(sdk.NewCoin(potKeeper.BondDenom(ctx), distrKeeper.GetFeePool(ctx).CommunityPool.AmountOf(potKeeper.BondDenom(ctx)).TruncateInt())) _ = potKeeper.GetMatureTotalReward(ctx, resOwner1) //lastFoundationAccBalance := bankKeeper.GetAllBalances(ctx, foundationAccountAddr) //lastUnissuedPrepay := registerKeeper.GetTotalUnissuedPrepay(ctx) From 6a1047c96e428a7b8f8deee0ee84370464dd87e9 Mon Sep 17 00:00:00 2001 From: Xiong Date: Tue, 7 Feb 2023 15:34:21 -0500 Subject: [PATCH 05/95] code optimization --- x/register/types/codec.go | 1 - x/sds/client/rest/tx.go | 4 ++-- x/sds/keeper/msg_server.go | 3 --- x/sds/types/codec.go | 7 ++++++- x/sds/types/expected_keepers.go | 10 ---------- 5 files changed, 8 insertions(+), 17 deletions(-) diff --git a/x/register/types/codec.go b/x/register/types/codec.go index 516633ea..597adfaa 100644 --- a/x/register/types/codec.go +++ b/x/register/types/codec.go @@ -49,7 +49,6 @@ func RegisterInterfaces(registry types.InterfaceRegistry) { // // The actual codec used for serialization should be provided to x/register and // defined at the application level. - var ModuleCdc *codec.LegacyAmino func init() { diff --git a/x/sds/client/rest/tx.go b/x/sds/client/rest/tx.go index 962c1158..9c09f47d 100644 --- a/x/sds/client/rest/tx.go +++ b/x/sds/client/rest/tx.go @@ -28,7 +28,7 @@ func postFileUploadHandlerFn(clientCtx client.Context) http.HandlerFunc { } var req FileUploadReq - if !rest.ReadRESTReq(w, r, types.ModuleCdc, &req) { + if !rest.ReadRESTReq(w, r, cliCtx.LegacyAmino, &req) { return } @@ -75,7 +75,7 @@ func postPrepayHandlerFn(clientCtx client.Context) http.HandlerFunc { return } var req PrepayReq - if !rest.ReadRESTReq(w, r, types.ModuleCdc, &req) { + if !rest.ReadRESTReq(w, r, cliCtx.LegacyAmino, &req) { return } diff --git a/x/sds/keeper/msg_server.go b/x/sds/keeper/msg_server.go index 80213801..d393309d 100644 --- a/x/sds/keeper/msg_server.go +++ b/x/sds/keeper/msg_server.go @@ -66,9 +66,6 @@ func (k msgServer) HandleMsgFileUpload(c context.Context, msg *types.MsgFileUplo // HandleMsgPrepay Handles MsgPrepay. func (k msgServer) HandleMsgPrepay(c context.Context, msg *types.MsgPrepay) (*types.MsgPrepayResponse, error) { ctx := sdk.UnwrapSDKContext(c) - //if k.bankKeeper.GetSendEnabled(ctx) == false { - // return nil, nil - //} if k.bankKeeper.IsSendEnabledCoin(ctx, sdk.NewCoin(types.DefaultBondDenom, sdk.OneInt())) == false { return &types.MsgPrepayResponse{}, sdkerrors.ErrInvalidCoins diff --git a/x/sds/types/codec.go b/x/sds/types/codec.go index 3d6dd153..e351aed0 100644 --- a/x/sds/types/codec.go +++ b/x/sds/types/codec.go @@ -29,7 +29,12 @@ func RegisterInterfaces(registry types.InterfaceRegistry) { msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) } -// ModuleCdc defines the module codec +// ModuleCdc references the global x/sds module codec. Note, the codec should +// ONLY be used in certain instances of tests and for JSON encoding as Amino is +// still used for that purpose. +// +// The actual codec used for serialization should be provided to x/sds and +// defined at the application level. var ModuleCdc *codec.LegacyAmino func init() { diff --git a/x/sds/types/expected_keepers.go b/x/sds/types/expected_keepers.go index 5fca4fde..ab1254f4 100644 --- a/x/sds/types/expected_keepers.go +++ b/x/sds/types/expected_keepers.go @@ -1,11 +1 @@ package types - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" -) - -// ParamSubspace defines the expected Subspace interfacace -type ParamSubspace interface { - SetUploadFile(ctx sdk.Context, key []byte, value string) - GetUploadFile(ctx sdk.Context, key []byte) MsgFileUpload -} From 8097df1698b61ede6db5017bcddf79790c97f2a4 Mon Sep 17 00:00:00 2001 From: jialbai Date: Tue, 7 Feb 2023 15:50:12 -0500 Subject: [PATCH 06/95] - qb1296: add debug logs --- x/pot/keeper/slashing.go | 3 ++- x/register/keeper/keeper.go | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/x/pot/keeper/slashing.go b/x/pot/keeper/slashing.go index da41b1ef..5abc735d 100644 --- a/x/pot/keeper/slashing.go +++ b/x/pot/keeper/slashing.go @@ -33,9 +33,10 @@ func (k Keeper) SlashingResourceNode(ctx sdk.Context, p2pAddr stratos.SdsAddress unbondingStake := k.RegisterKeeper.GetUnbondingNodeBalance(ctx, p2pAddr) logger := k.Logger(ctx) - logger.Info("------ potKeeper.SlashingResourceNode get inputs: ", + logger.Debug("------ potKeeper.SlashingResourceNode get inputs: ", "nozAmt=", nozAmt.String(), "node.Tokens=", node.Tokens.String(), + "unbondingStake=", unbondingStake.String(), "suspend=", strconv.FormatBool(suspend), "toBeUnsuspended=", strconv.FormatBool(toBeUnsuspended), "effectiveStakeAfter=", effectiveStakeAfter.String(), diff --git a/x/register/keeper/keeper.go b/x/register/keeper/keeper.go index 25c2222d..a0b4ed3b 100644 --- a/x/register/keeper/keeper.go +++ b/x/register/keeper/keeper.go @@ -140,6 +140,13 @@ func (k Keeper) IncreaseOzoneLimitByAddStake(ctx sdk.Context, stake sdk.Int) (oz limitToAdd := stake.ToDec().Quo(stakeNozRate) k.SetRemainingOzoneLimit(ctx, remainingBefore.ToDec().Add(limitToAdd).TruncateInt()) + + //ctx.Logger().Debug("----- IncreaseOzoneLimitByAddStake, ", + // "effectiveTotalStakeBefore=", effectiveTotalStakeBefore.String(), + // "effectiveTotalStakeAfter=", effectiveTotalStakeAfter.String(), + // "remainingBefore=", remainingBefore.String(), + // "remainingAfter=", k.GetRemainingOzoneLimit(ctx).String(), + //) return limitToAdd.TruncateInt() } @@ -160,6 +167,13 @@ func (k Keeper) DecreaseOzoneLimitBySubtractStake(ctx sdk.Context, stake sdk.Int } limitToSub := stake.ToDec().Quo(stakeNozRate) k.SetRemainingOzoneLimit(ctx, remainingBefore.ToDec().Sub(limitToSub).TruncateInt()) + + //ctx.Logger().Debug("----- DecreaseOzoneLimitBySubtractStake, ", + // "effectiveTotalStakeBefore=", effectiveTotalStakeBefore.String(), + // "effectiveTotalStakeAfter=", effectiveTotalStakeAfter.String(), + // "remainingBefore=", remainingBefore.String(), + // "remainingAfter=", k.GetRemainingOzoneLimit(ctx).String(), + //) return limitToSub.TruncateInt() } From 00ce2385f3a0668a6283332d0846daab3c2490f1 Mon Sep 17 00:00:00 2001 From: jialbai Date: Fri, 10 Feb 2023 20:14:28 -0500 Subject: [PATCH 07/95] - qb1269: add update_effective_stake tx --- proto/stratos/pot/v1/tx.proto | 5 - proto/stratos/register/v1/register.proto | 1 - proto/stratos/register/v1/tx.proto | 30 ++ x/pot/keeper/keeper.go | 3 +- x/pot/keeper/msg_server.go | 9 +- x/pot/keeper/slashing.go | 59 +-- x/pot/types/events.go | 21 +- x/pot/types/expected_keepers.go | 1 + x/pot/types/msg.go | 1 - x/pot/types/tx.pb.go | 189 +++---- x/register/client/rest/tx.go | 43 ++ x/register/handler.go | 3 + x/register/keeper/meta_node.go | 5 + x/register/keeper/msg_server.go | 38 ++ x/register/keeper/resource_node.go | 38 ++ x/register/types/errors.go | 4 + x/register/types/events.go | 15 +- x/register/types/msg.go | 63 +++ x/register/types/tx.pb.go | 645 ++++++++++++++++++++--- x/register/types/tx.pb.gw.go | 80 +++ 20 files changed, 976 insertions(+), 277 deletions(-) diff --git a/proto/stratos/pot/v1/tx.proto b/proto/stratos/pot/v1/tx.proto index 8493fffe..e8c324b7 100644 --- a/proto/stratos/pot/v1/tx.proto +++ b/proto/stratos/pot/v1/tx.proto @@ -144,11 +144,6 @@ message MsgSlashingResourceNode { (gogoproto.jsontag) = "suspend", (gogoproto.moretags) = "yaml:\"suspend\"" ]; - string effective_stake = 7 [ - (gogoproto.jsontag) = "effective_stake", - (gogoproto.moretags) = "yaml:\"effective_stake\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int" - ]; } // MsgSlashingResourceNodeResponse defines the Msg/MsgSlashingResourceNode response type. message MsgSlashingResourceNodeResponse {} \ No newline at end of file diff --git a/proto/stratos/register/v1/register.proto b/proto/stratos/register/v1/register.proto index e8b988cb..b048b1c7 100644 --- a/proto/stratos/register/v1/register.proto +++ b/proto/stratos/register/v1/register.proto @@ -88,7 +88,6 @@ message ResourceNode { (gogoproto.moretags) = "yaml:\"effective_tokens\"", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int" ]; - } message MetaNode { diff --git a/proto/stratos/register/v1/tx.proto b/proto/stratos/register/v1/tx.proto index fe3bb316..aea8dd08 100644 --- a/proto/stratos/register/v1/tx.proto +++ b/proto/stratos/register/v1/tx.proto @@ -27,6 +27,9 @@ service Msg { rpc HandleMsgUpdateResourceNodeStake(MsgUpdateResourceNodeStake) returns (MsgUpdateResourceNodeStakeResponse) { option (google.api.http).post = "/stratos/register/v1/update_resource_node_stake"; }; + rpc HandleMsgUpdateEffectiveStake(MsgUpdateEffectiveStake) returns (MsgUpdateEffectiveStakeResponse) { + option (google.api.http).post = "/stratos/register/v1/update_effective_stake"; + }; rpc HandleMsgCreateMetaNode(MsgCreateMetaNode) returns (MsgCreateMetaNodeResponse) { option (google.api.http).post = "/stratos/register/v1/create_meta_node"; @@ -219,6 +222,33 @@ message MsgUpdateResourceNodeStake { // MsgUpdateResourceNodeStakeResponse defines the Msg/UpdateResourceNodeStake response type. message MsgUpdateResourceNodeStakeResponse {} +// MsgUpdateEffectiveStake defines a SDK message for updating the effective stake of an existing resource node. +message MsgUpdateEffectiveStake { + option (gogoproto.goproto_getters) = false; + + repeated string reporters = 1 [ + (gogoproto.jsontag) = "reporters", + (gogoproto.moretags) = "yaml:\"reporters\"" + ]; + repeated string reporter_owner = 2 [ + (gogoproto.jsontag) = "reporter_owner", + (gogoproto.moretags) = "yaml:\"reporter_owner\"" + ]; + string network_address = 3 [ + (gogoproto.jsontag) = "network_address", + (gogoproto.moretags) = "yaml:\"network_address\"" + ]; + string effective_tokens = 4 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "effective_tokens", + (gogoproto.moretags) = "yaml:\"effective_tokens\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int" + ]; +} + +// MsgUpdateEffectiveStakeResponse defines the Msg/UpdateEffectiveStake response type. +message MsgUpdateEffectiveStakeResponse {} + // MsgUpdateMetaNodeStake defines a SDK message for updating the stake of an existing meta node. message MsgUpdateMetaNodeStake { diff --git a/x/pot/keeper/keeper.go b/x/pot/keeper/keeper.go index c43a1834..8b9ee496 100644 --- a/x/pot/keeper/keeper.go +++ b/x/pot/keeper/keeper.go @@ -70,8 +70,7 @@ func (k Keeper) VolumeReport(ctx sdk.Context, walletVolumes []*types.SingleWalle } func (k Keeper) IsSPNode(ctx sdk.Context, p2pAddr stratos.SdsAddress) (found bool) { - _, found = k.RegisterKeeper.GetMetaNode(ctx, p2pAddr) - return found + return k.RegisterKeeper.IsSPNode(ctx, p2pAddr) } func (k Keeper) FoundationDeposit(ctx sdk.Context, amount sdk.Coins, from sdk.AccAddress) (err error) { diff --git a/x/pot/keeper/msg_server.go b/x/pot/keeper/msg_server.go index a429baa6..f6457543 100644 --- a/x/pot/keeper/msg_server.go +++ b/x/pot/keeper/msg_server.go @@ -198,11 +198,7 @@ func (k msgServer) HandleMsgSlashingResourceNode(goCtx context.Context, msg *typ return &types.MsgSlashingResourceNodeResponse{}, types.ErrInvalidAmount } - effectiveStakeAmt, ok := sdk.NewIntFromString(msg.EffectiveStake.String()) - if !ok { - return &types.MsgSlashingResourceNodeResponse{}, types.ErrInvalidAmount - } - tokenAmt, nodeType, isUnsuspendedDuringSlash, err := k.SlashingResourceNode(ctx, networkAddress, walletAddress, nozAmt, msg.Suspend, effectiveStakeAmt) + tokenAmt, nodeType, err := k.SlashingResourceNode(ctx, networkAddress, walletAddress, nozAmt, msg.Suspend) if err != nil { return &types.MsgSlashingResourceNodeResponse{}, sdkerrors.Wrap(types.ErrSlashingResourceNodeFailure, err.Error()) } @@ -212,9 +208,6 @@ func (k msgServer) HandleMsgSlashingResourceNode(goCtx context.Context, msg *typ sdk.NewAttribute(types.AttributeKeyWalletAddress, msg.WalletAddress), sdk.NewAttribute(types.AttributeKeyNodeP2PAddress, msg.NetworkAddress), sdk.NewAttribute(types.AttributeKeyAmount, tokenAmt.String()), - sdk.NewAttribute(types.AttributeKeyEffectiveStake, msg.EffectiveStake.String()), - sdk.NewAttribute(types.AttributeKeyIsEffectiveStakeChanged, strconv.FormatBool(!effectiveStakeAmt.IsZero())), - sdk.NewAttribute(types.AttributeKeyIsUnsuspendedDuringSlash, strconv.FormatBool(isUnsuspendedDuringSlash)), sdk.NewAttribute(types.AttributeKeySlashingNodeType, nodeType.String()), sdk.NewAttribute(types.AttributeKeyNodeSuspended, strconv.FormatBool(msg.Suspend)), ), diff --git a/x/pot/keeper/slashing.go b/x/pot/keeper/slashing.go index 5abc735d..7c8929cd 100644 --- a/x/pot/keeper/slashing.go +++ b/x/pot/keeper/slashing.go @@ -1,8 +1,6 @@ package keeper import ( - "strconv" - sdk "github.com/cosmos/cosmos-sdk/types" stratos "github.com/stratosnet/stratos-chain/types" "github.com/stratosnet/stratos-chain/x/pot/types" @@ -18,41 +16,29 @@ Deduct slashing amount when: 3, unstaking resource node. */ func (k Keeper) SlashingResourceNode(ctx sdk.Context, p2pAddr stratos.SdsAddress, walletAddr sdk.AccAddress, - nozAmt sdk.Int, suspend bool, effectiveStakeAfter sdk.Int) (tokenAmt sdk.Int, nodeType registertypes.NodeType, unsuspended bool, err error) { + nozAmt sdk.Int, suspend bool) (tokenAmt sdk.Int, nodeType registertypes.NodeType, err error) { node, ok := k.RegisterKeeper.GetResourceNode(ctx, p2pAddr) if !ok { - return sdk.ZeroInt(), registertypes.NodeType(0), false, registertypes.ErrNoResourceNodeFound + return sdk.ZeroInt(), registertypes.NodeType(0), registertypes.ErrNoResourceNodeFound } - toBeUnsuspended := node.Suspend == true && suspend == false - effectiveStakeBefore := sdk.NewInt(0).Add(node.EffectiveTokens) - effectiveStakeChange := effectiveStakeAfter.Sub(effectiveStakeBefore) + //toBeUnsuspended := node.Suspend == true && suspend == false + toBeSuspended := node.Suspend == false && suspend == true - // before calc ozone limit change, get unbonding stake and calc effective stake to trigger ozLimit change - unbondingStake := k.RegisterKeeper.GetUnbondingNodeBalance(ctx, p2pAddr) - - logger := k.Logger(ctx) - logger.Debug("------ potKeeper.SlashingResourceNode get inputs: ", - "nozAmt=", nozAmt.String(), - "node.Tokens=", node.Tokens.String(), - "unbondingStake=", unbondingStake.String(), - "suspend=", strconv.FormatBool(suspend), - "toBeUnsuspended=", strconv.FormatBool(toBeUnsuspended), - "effectiveStakeAfter=", effectiveStakeAfter.String(), - "effectiveStakeBefore=", effectiveStakeBefore.String(), - "effectiveStakeChange=", effectiveStakeChange.String()) - // no effective stake after subtracting unbonding stake - if node.Tokens.LTE(unbondingStake) { - return sdk.ZeroInt(), registertypes.NodeType(0), toBeUnsuspended, registertypes.ErrInsufficientBalance - } - availableStake := node.Tokens.Sub(unbondingStake) - if availableStake.LT(effectiveStakeAfter) { - return sdk.ZeroInt(), registertypes.NodeType(0), toBeUnsuspended, registertypes.ErrInsufficientBalance - } + //// before calc ozone limit change, get unbonding stake and calc effective stake to trigger ozLimit change + //unbondingStake := k.RegisterKeeper.GetUnbondingNodeBalance(ctx, p2pAddr) + // + //// no effective stake after subtracting unbonding stake + //if node.Tokens.LTE(unbondingStake) { + // return sdk.ZeroInt(), registertypes.NodeType(0), toBeUnsuspended, registertypes.ErrInsufficientBalance + //} + //availableStake := node.Tokens.Sub(unbondingStake) + //if availableStake.LT(node.EffectiveTokens) { + // return sdk.ZeroInt(), registertypes.NodeType(0), toBeUnsuspended, registertypes.ErrInsufficientBalance + //} node.Suspend = suspend - node.EffectiveTokens = effectiveStakeAfter //slashing amt is equivalent to reward traffic calculation trafficList := []*types.SingleWalletVolume{{ @@ -67,14 +53,15 @@ func (k Keeper) SlashingResourceNode(ctx sdk.Context, p2pAddr stratos.SdsAddress // only slashing the reward token for now. newSlashing := oldSlashing.Add(slashTokenAmt.TruncateInt()) + // directly change oz limit while node being suspended + if toBeSuspended { + effectiveStakeChange := sdk.ZeroInt().Sub(node.EffectiveTokens) + node.EffectiveTokens = sdk.ZeroInt() + k.RegisterKeeper.DecreaseOzoneLimitBySubtractStake(ctx, effectiveStakeChange.Abs()) + } + k.RegisterKeeper.SetResourceNode(ctx, node) k.RegisterKeeper.SetSlashing(ctx, walletAddr, newSlashing) - if effectiveStakeChange.IsNegative() { - k.RegisterKeeper.DecreaseOzoneLimitBySubtractStake(ctx, effectiveStakeChange.Abs()) - } - if effectiveStakeChange.IsPositive() { - k.RegisterKeeper.IncreaseOzoneLimitByAddStake(ctx, effectiveStakeChange) - } - return slashTokenAmt.TruncateInt(), registertypes.NodeType(node.NodeType), toBeUnsuspended, nil + return slashTokenAmt.TruncateInt(), registertypes.NodeType(node.NodeType), nil } diff --git a/x/pot/types/events.go b/x/pot/types/events.go index 987cc951..5afb77e9 100644 --- a/x/pot/types/events.go +++ b/x/pot/types/events.go @@ -8,17 +8,16 @@ const ( EventTypeFoundationDeposit = "foundation_deposit" EventTypeSlashing = "slashing" - AttributeKeyEpoch = "epoch" - AttributeKeyReportReference = "report_reference" - AttributeKeyAmount = "amount" - AttributeKeyIsEffectiveStakeChanged = "is_effective_stake_changed" - AttributeKeyIsUnsuspendedDuringSlash = "is_unsuspended_during_slash" - AttributeKeyEffectiveStake = "effective_stake" - AttributeKeyWalletAddress = "wallet_address" - AttributeKeyLegacyWalletAddress = "legacy_wallet_address" - AttributeKeyNodeP2PAddress = "p2p_address" - AttributeKeySlashingNodeType = "slashing_type" - AttributeKeyNodeSuspended = "suspend" + AttributeKeyEpoch = "epoch" + AttributeKeyReportReference = "report_reference" + AttributeKeyAmount = "amount" + AttributeKeyIsEffectiveStakeChanged = "is_effective_stake_changed" + AttributeKeyEffectiveStake = "effective_stake" + AttributeKeyWalletAddress = "wallet_address" + AttributeKeyLegacyWalletAddress = "legacy_wallet_address" + AttributeKeyNodeP2PAddress = "p2p_address" + AttributeKeySlashingNodeType = "slashing_type" + AttributeKeyNodeSuspended = "suspend" AttributeValueCategory = ModuleName ) diff --git a/x/pot/types/expected_keepers.go b/x/pot/types/expected_keepers.go index 34880d69..86b76bd4 100644 --- a/x/pot/types/expected_keepers.go +++ b/x/pot/types/expected_keepers.go @@ -69,6 +69,7 @@ type RegisterKeeper interface { GetUnbondingNodeBalance(ctx sdk.Context, networkAddr stratos.SdsAddress) sdk.Int NozSupply(ctx sdk.Context) (remaining, total sdk.Int) + IsSPNode(ctx sdk.Context, p2pAddr stratos.SdsAddress) (found bool) } type StakingKeeper interface { diff --git a/x/pot/types/msg.go b/x/pot/types/msg.go index 27cb84fe..71cdf0d6 100644 --- a/x/pot/types/msg.go +++ b/x/pot/types/msg.go @@ -274,7 +274,6 @@ func NewMsgSlashingResourceNode(reporters []stratos.SdsAddress, reporterOwner [] WalletAddress: walletAddress.String(), Slashing: &slashing, Suspend: suspend, - EffectiveStake: &newEffectiveStake, } } diff --git a/x/pot/types/tx.pb.go b/x/pot/types/tx.pb.go index 770bc9f3..94df02fc 100644 --- a/x/pot/types/tx.pb.go +++ b/x/pot/types/tx.pb.go @@ -440,7 +440,6 @@ type MsgSlashingResourceNode struct { WalletAddress string `protobuf:"bytes,4,opt,name=wallet_address,json=walletAddress,proto3" json:"wallet_address" yaml:"wallet_address"` Slashing *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,5,opt,name=slashing,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"slashing" yaml:"slashing"` Suspend bool `protobuf:"varint,6,opt,name=suspend,proto3" json:"suspend" yaml:"suspend"` - EffectiveStake *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,7,opt,name=effective_stake,json=effectiveStake,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"effective_stake" yaml:"effective_stake"` } func (m *MsgSlashingResourceNode) Reset() { *m = MsgSlashingResourceNode{} } @@ -564,75 +563,73 @@ func init() { func init() { proto.RegisterFile("stratos/pot/v1/tx.proto", fileDescriptor_103c258cace119ca) } var fileDescriptor_103c258cace119ca = []byte{ - // 1077 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x56, 0xcf, 0x6f, 0x1b, 0x45, - 0x14, 0xce, 0xe6, 0x57, 0x93, 0x49, 0xed, 0xb4, 0x4b, 0x42, 0x1c, 0xb7, 0xf1, 0x24, 0x43, 0x69, - 0x53, 0x4a, 0x76, 0x95, 0x70, 0x40, 0x82, 0x03, 0xc2, 0x45, 0x88, 0x88, 0x04, 0xa4, 0xb5, 0xd4, - 0x88, 0x5e, 0xac, 0x8d, 0x3d, 0xde, 0xac, 0x62, 0xcf, 0xac, 0x76, 0xc6, 0x76, 0x73, 0x41, 0x88, - 0x13, 0xc7, 0x4a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0x8c, 0xbd, 0x89, 0x6b, 0x6e, 0xd2, 0x70, 0x4c, 0x0a, 0x2c, 0xba, 0x97, 0x0c, - 0x34, 0x3e, 0x1d, 0xe9, 0x73, 0x1b, 0xdd, 0xce, 0xfa, 0x4c, 0xaf, 0x6e, 0x35, 0xd6, 0x69, 0x55, - 0x42, 0xeb, 0xb8, 0xbc, 0xff, 0xf4, 0xbc, 0x64, 0x3d, 0x3b, 0x2f, 0x59, 0xbf, 0x9f, 0x97, 0xac, - 0xc7, 0x17, 0xa5, 0xa9, 0x67, 0x17, 0xa5, 0xa9, 0x5f, 0x2e, 0x4a, 0x53, 0x0f, 0xdd, 0xa1, 0xbb, - 0xa8, 0xb5, 0x08, 0xe6, 0xe9, 0xbf, 0x3b, 0xb5, 0x13, 0x3f, 0x24, 0xee, 0x23, 0x29, 0x2f, 0x2f, - 0xe6, 0xf1, 0xbc, 0xfc, 0x50, 0x7f, 0xe7, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0x9f, 0x88, 0x12, - 0x28, 0x41, 0x0c, 0x00, 0x00, + // 1042 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x56, 0xcf, 0x6f, 0xdc, 0x44, + 0x14, 0x8e, 0xf3, 0x8b, 0x64, 0xd2, 0x4d, 0x5a, 0x93, 0x90, 0xcd, 0xb6, 0xd9, 0x49, 0x86, 0xd2, + 0xa6, 0x94, 0xd8, 0x4a, 0x38, 0x20, 0xc1, 0x01, 0xb1, 0x45, 0x88, 0x88, 0x04, 0x24, 0x47, 0x6a, + 0x45, 0x2f, 0x2b, 0x67, 0x3d, 0x71, 0xac, 0x7a, 0x67, 0x2c, 0xcf, 0x6c, 0xb6, 0xb9, 0x70, 0xe0, + 0xc4, 0xb1, 0x12, 0x1c, 0xf9, 0x07, 0xe0, 0xce, 0x5f, 0xd0, 0x4b, 0x8f, 0x95, 0xb8, 0x20, 0x0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0x0f, 0xcc, 0xa5, 0xd2, 0x01, 0x4e, 0xab, 0x93, 0x1b, 0xd6, + 0xd6, 0x7c, 0x03, 0x66, 0x02, 0x1a, 0x2c, 0x17, 0x70, 0x49, 0xe9, 0x14, 0x08, 0xf2, 0x0c, 0x69, + 0x7f, 0x0e, 0x66, 0x70, 0x42, 0x5b, 0x27, 0xd5, 0x29, 0x99, 0x79, 0xef, 0x67, 0x01, 0x6f, 0x85, + 0x11, 0x3f, 0xe9, 0x1c, 0x39, 0x2d, 0xda, 0x76, 0x75, 0x1b, 0xd4, 0x9f, 0x6d, 0x16, 0x3c, 0x72, + 0xf9, 0x59, 0x82, 0x99, 0xb3, 0x47, 0x78, 0x26, 0xa0, 0x4a, 0xcd, 0x05, 0xbc, 0xa2, 0x0a, 0xc8, + 0x23, 0xf2, 0x14, 0x6c, 0x3f, 0x04, 0x57, 0x55, 0x99, 0x66, 0x8a, 0x8f, 0x71, 0x8a, 0x49, 0x0b, + 0x57, 0xa7, 0x65, 0x15, 0x37, 0x13, 0x70, 0x84, 0xcb, 0x05, 0x5c, 0x1d, 0xf4, 0xd9, 0x67, 0x90, + 0xb7, 0xa4, 0x20, 0xaf, 0x40, 0x6c, 0x0f, 0x2c, 0x16, 0x8f, 0xd0, 0xa4, 0x5d, 0x82, 0xd3, 0xea, + 0x8c, 0x54, 0x96, 0x7d, 0x1c, 0x66, 0xfa, 0x7d, 0x1c, 0xc6, 0x91, 0x57, 0x29, 0x80, 0xcf, 0x7a, + 0x67, 0x3b, 0x01, 0x95, 0xc6, 0xfe, 0x61, 0x93, 0x45, 0x21, 0xf1, 0x79, 0x27, 0xc5, 0xd5, 0xd9, + 0x0d, 0x6b, 0x6b, 0x61, 0x77, 0xa3, 0xfc, 0xfa, 0x1a, 0xfb, 0x87, 0x87, 0x45, 0xcc, 0x1e, 0x39, + 0xa6, 0x8d, 0x3b, 0x99, 0x80, 0x95, 0xa3, 0x98, 0xf5, 0x53, 0x73, 0x01, 0x97, 0x55, 0xcd, 0x21, + 0x18, 0x79, 0x57, 0x06, 0x93, 0xd1, 0x1a, 0x58, 0x2d, 0x0d, 0x91, 0x87, 0x59, 0x42, 0x09, 0xc3, + 0xe8, 0x87, 0x49, 0xb0, 0x70, 0xc0, 0xc2, 0x07, 0x11, 0x3f, 0x09, 0x52, 0xbf, 0x6b, 0x7f, 0x01, + 0x66, 0xfd, 0x36, 0xed, 0x10, 0xae, 0x87, 0x6a, 0xcd, 0x51, 0xef, 0xc4, 0xe9, 0x4d, 0xa8, 0xa3, + 0x27, 0xd4, 0xb9, 0x47, 0x23, 0xd2, 0xf8, 0xe4, 0x99, 0x80, 0x13, 0x99, 0x80, 0x3a, 0x21, 0x17, + 0xb0, 0xa2, 0xbc, 0xa8, 0x33, 0xfa, 0xfe, 0x17, 0xb8, 0x75, 0x89, 0x57, 0xdc, 0xd3, 0x62, 0x9e, + 0x16, 0xe9, 0x35, 0x5c, 0x8f, 0xa1, 0x1f, 0x04, 0x29, 0x66, 0x4c, 0x8f, 0xda, 0xe0, 0xe0, 0x6a, + 0x66, 0x64, 0x70, 0x35, 0x6e, 0x06, 0xf7, 0x03, 0x75, 0xee, 0x69, 0x72, 0x3f, 0x0d, 0x07, 0x34, + 0xa7, 0xfa, 0x9a, 0xc3, 0x4c, 0x5f, 0x73, 0x18, 0x47, 0x5e, 0x45, 0x01, 0x5a, 0x13, 0xad, 0x80, + 0x57, 0x07, 0xda, 0x66, 0xda, 0xf9, 0xcd, 0x24, 0xb8, 0x76, 0xc0, 0xc2, 0x7d, 0x1c, 0xfa, 0xad, + 0xb3, 0xff, 0x4c, 0x53, 0xef, 0x82, 0xe9, 0xe3, 0x94, 0xb6, 0x75, 0x2b, 0x57, 0x33, 0x01, 0xe5, + 0x39, 0x17, 0x70, 0x41, 0x89, 0xf7, 0x4e, 0xc8, 0x93, 0xe0, 0xbf, 0xd2, 0xad, 0xeb, 0x60, 0x6d, + 0xa4, 0x2b, 0xa6, 0x67, 0x4f, 0x2d, 0xb0,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+ 0xe2, 0xf9, 0x45, 0x7d, 0xe2, 0xa7, 0x8b, 0xfa, 0xc4, 0x43, 0x77, 0xe0, 0xc2, 0x6a, 0x2d, 0x82, + 0x79, 0xf1, 0xef, 0x76, 0xeb, 0xc4, 0x8f, 0x88, 0xfb, 0x58, 0xca, 0xcb, 0xdb, 0x7b, 0x34, 0x2b, + 0x7f, 0x25, 0xbf, 0xfd, 0x67, 0x00, 0x00, 0x00, 0xff, 0xff, 0x94, 0xd2, 0xe4, 0xc8, 0xbe, 0x0b, + 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1199,18 +1196,6 @@ func (m *MsgSlashingResourceNode) MarshalToSizedBuffer(dAtA []byte) (int, error) _ = i var l int _ = l - if m.EffectiveStake != nil { - { - size := m.EffectiveStake.Size() - i -= size - if _, err := m.EffectiveStake.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } if m.Suspend { i-- if m.Suspend { @@ -1471,10 +1456,6 @@ func (m *MsgSlashingResourceNode) Size() (n int) { if m.Suspend { n += 2 } - if m.EffectiveStake != nil { - l = m.EffectiveStake.Size() - n += 1 + l + sovTx(uint64(l)) - } return n } @@ -2570,42 +2551,6 @@ func (m *MsgSlashingResourceNode) Unmarshal(dAtA []byte) error { } } m.Suspend = bool(v != 0) - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EffectiveStake", 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 - } - var v github_com_cosmos_cosmos_sdk_types.Int - m.EffectiveStake = &v - if err := m.EffectiveStake.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) diff --git a/x/register/client/rest/tx.go b/x/register/client/rest/tx.go index 42da21cd..60d77b51 100644 --- a/x/register/client/rest/tx.go +++ b/x/register/client/rest/tx.go @@ -31,6 +31,10 @@ func registerTxHandlers(cliCtx client.Context, r *mux.Router) { "/register/updateResourceNodeStake", postUpdateResourceNodeStakeHandlerFn(cliCtx), ).Methods("POST") + r.HandleFunc( + "/register/updateEffectiveStake", + postUpdateEffectiveStakeHandlerFn(cliCtx), + ).Methods("POST") r.HandleFunc( "/register/createMetaNode", @@ -83,6 +87,16 @@ type ( IncrStake string `json:"incr_stake" yaml:"incr_stake"` } + UpdateEffectiveStakeRequest struct { + BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"` + Reporters []stratos.SdsAddress `json:"reporters" yaml:"reporters"` // reporter(sp node) p2p address + ReporterOwner []sdk.AccAddress `json:"reporter_owner" yaml:"reporter_owner"` // report(sp node) wallet address + NetworkAddress string `json:"network_address" yaml:"network_address"` + EffectiveTokens sdk.Int `json:"effective_tokens" yaml:"effective_tokens"` + InitialTier uint32 `json:"initial_tier" yaml:"initial_tier"` + OngoingTier uint32 `json:"ongoing_tier" yaml:"ongoing_tier"` + } + CreateMetaNodeRequest struct { BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"` NetworkAddr string `json:"network_address" yaml:"network_address"` @@ -355,6 +369,35 @@ func postUpdateResourceNodeStakeHandlerFn(cliCtx client.Context) http.HandlerFun } } +func postUpdateEffectiveStakeHandlerFn(cliCtx client.Context) http.HandlerFunc { + return func(w http.ResponseWriter, r *http.Request) { + var req UpdateEffectiveStakeRequest + + if !rest.ReadRESTReq(w, r, cliCtx.LegacyAmino, &req) { + return + } + + req.BaseReq = req.BaseReq.Sanitize() + if !req.BaseReq.ValidateBasic(w) { + return + } + + networkAddr, err := stratos.SdsAddressFromBech32(req.NetworkAddress) + if err != nil { + rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) + return + } + + msg := types.NewMsgUpdateEffectiveStake(req.Reporters, req.ReporterOwner, networkAddr, req.EffectiveTokens, req.InitialTier, req.OngoingTier) + if err := msg.ValidateBasic(); err != nil { + rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) + return + } + + tx.WriteGeneratedTxResponse(cliCtx, w, req.BaseReq, msg) + } +} + func postUpdateMetaNodeHandlerFn(cliCtx client.Context) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { var req UpdateMetaNodeRequest diff --git a/x/register/handler.go b/x/register/handler.go index 92bebf52..95367f50 100644 --- a/x/register/handler.go +++ b/x/register/handler.go @@ -28,6 +28,9 @@ func NewHandler(k keeper.Keeper) sdk.Handler { case *types.MsgUpdateResourceNodeStake: res, err := msgServer.HandleMsgUpdateResourceNodeStake(sdk.WrapSDKContext(ctx), msg) return sdk.WrapServiceResult(ctx, res, err) + case *types.MsgUpdateEffectiveStake: + res, err := msgServer.HandleMsgUpdateEffectiveStake(sdk.WrapSDKContext(ctx), msg) + return sdk.WrapServiceResult(ctx, res, err) case *types.MsgCreateMetaNode: res, err := msgServer.HandleMsgCreateMetaNode(sdk.WrapSDKContext(ctx), msg) diff --git a/x/register/keeper/meta_node.go b/x/register/keeper/meta_node.go index f059fe29..a7a76f1d 100644 --- a/x/register/keeper/meta_node.go +++ b/x/register/keeper/meta_node.go @@ -492,3 +492,8 @@ func (k Keeper) SendCoinsFromAccountToMetaNodeBondedPool(ctx sdk.Context, fromAc } return k.bankKeeper.SendCoinsFromAccountToModule(ctx, fromAcc, types.MetaNodeBondedPool, sdk.NewCoins(amt)) } + +func (k Keeper) IsSPNode(ctx sdk.Context, p2pAddr stratos.SdsAddress) (found bool) { + _, found = k.GetMetaNode(ctx, p2pAddr) + return found +} diff --git a/x/register/keeper/msg_server.go b/x/register/keeper/msg_server.go index c00f8b4e..7b31e730 100644 --- a/x/register/keeper/msg_server.go +++ b/x/register/keeper/msg_server.go @@ -346,6 +346,44 @@ func (k msgServer) HandleMsgUpdateResourceNodeStake(goCtx context.Context, msg * return &types.MsgUpdateResourceNodeStakeResponse{}, nil } +func (k msgServer) HandleMsgUpdateEffectiveStake(goCtx context.Context, msg *types.MsgUpdateEffectiveStake) (*types.MsgUpdateEffectiveStakeResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + for _, reporter := range msg.Reporters { + reporterSdsAddr, err := stratos.SdsAddressFromBech32(reporter) + if err != nil { + return &types.MsgUpdateEffectiveStakeResponse{}, sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, err.Error()) + } + if !(k.IsSPNode(ctx, reporterSdsAddr)) { + return &types.MsgUpdateEffectiveStakeResponse{}, sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "MsgUpdateEffectiveStake is not sent by a meta node") + } + } + + networkAddr, err := stratos.SdsAddressFromBech32(msg.NetworkAddress) + if err != nil { + return &types.MsgUpdateEffectiveStakeResponse{}, sdkerrors.Wrap(types.ErrInvalidNetworkAddr, err.Error()) + } + + if msg.EffectiveTokens.LTE(sdk.NewInt(0)) { + return &types.MsgUpdateEffectiveStakeResponse{}, errors.New("effective tokens should be greater than 0") + } + + _, effectiveStakeChange, isUnsuspendedDuringUpdate, err := k.UpdateEffectiveStake(ctx, networkAddr, msg.EffectiveTokens) + if err != nil { + return nil, sdkerrors.Wrap(types.ErrUpdateResourceNodeStake, err.Error()) + } + + ctx.EventManager().EmitEvents(sdk.Events{ + sdk.NewEvent( + types.EventTypeUpdateEffectiveStake, + sdk.NewAttribute(types.AttributeKeyNetworkAddress, msg.NetworkAddress), + sdk.NewAttribute(types.AttributeKeyEffectiveStakeChange, effectiveStakeChange.String()), + sdk.NewAttribute(types.AttributeKeyIsUnsuspended, strconv.FormatBool(isUnsuspendedDuringUpdate)), + ), + }) + return &types.MsgUpdateEffectiveStakeResponse{}, nil +} + func (k msgServer) HandleMsgUpdateMetaNode(goCtx context.Context, msg *types.MsgUpdateMetaNode) (*types.MsgUpdateMetaNodeResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) diff --git a/x/register/keeper/resource_node.go b/x/register/keeper/resource_node.go index a8d72f70..b9fa02d1 100644 --- a/x/register/keeper/resource_node.go +++ b/x/register/keeper/resource_node.go @@ -343,6 +343,44 @@ func (k Keeper) UpdateResourceNodeStake(ctx sdk.Context, networkAddr stratos.Sds } } +func (k Keeper) UpdateEffectiveStake(ctx sdk.Context, networkAddr stratos.SdsAddress, effectiveStakeAfter sdk.Int) ( + ozoneLimitChange, effectiveStakeChange sdk.Int, isUnsuspendedDuringUpdate bool, err error) { + + node, found := k.GetResourceNode(ctx, networkAddr) + if !found { + return sdk.ZeroInt(), sdk.ZeroInt(), false, types.ErrNoResourceNodeFound + } + + // before calc ozone limit change, get unbonding stake and calc effective stake to trigger ozLimit change + unbondingStake := k.GetUnbondingNodeBalance(ctx, networkAddr) + // no effective stake after subtracting unbonding stake + if node.Tokens.LTE(unbondingStake) { + return sdk.ZeroInt(), sdk.ZeroInt(), false, types.ErrInsufficientBalance + } + availableStake := node.Tokens.Sub(unbondingStake) + if availableStake.LT(effectiveStakeAfter) { + return sdk.ZeroInt(), sdk.ZeroInt(), false, types.ErrInsufficientBalance + } + + isUnsuspendedDuringUpdate = node.Suspend == true && effectiveStakeAfter.GT(sdk.ZeroInt()) + + effectiveStakeBefore := sdk.NewInt(0).Add(node.EffectiveTokens) + effectiveStakeChange = effectiveStakeAfter.Sub(effectiveStakeBefore) + + node.EffectiveTokens = effectiveStakeAfter + // effectiveStakeAfter > 0 means node.Suspend = false + node.Suspend = false + k.SetResourceNode(ctx, node) + + if effectiveStakeChange.IsNegative() { + ozoneLimitChange = k.DecreaseOzoneLimitBySubtractStake(ctx, effectiveStakeChange.Abs()) + } + if effectiveStakeChange.IsPositive() { + ozoneLimitChange = k.IncreaseOzoneLimitByAddStake(ctx, effectiveStakeChange) + } + return ozoneLimitChange, effectiveStakeChange, isUnsuspendedDuringUpdate, nil +} + func (k Keeper) GetResourceNodeBondedToken(ctx sdk.Context) (token sdk.Coin) { resourceNodeBondedAccAddr := k.accountKeeper.GetModuleAddress(types.ResourceNodeBondedPool) if resourceNodeBondedAccAddr == nil { diff --git a/x/register/types/errors.go b/x/register/types/errors.go index 59109041..41edced4 100644 --- a/x/register/types/errors.go +++ b/x/register/types/errors.go @@ -60,6 +60,8 @@ const ( codeErrVoteMetaNode codeErrResourceNodeRegDisabled codeErrInvalidSuspensionStatForUnbondNode + codeErrReporterAddress + codeErrInvalidAmount ) var ( @@ -118,4 +120,6 @@ var ( ErrVoteMetaNode = sdkerrors.Register(ModuleName, codeErrVoteMetaNode, "failed to vote meta node") ErrResourceNodeRegDisabled = sdkerrors.Register(ModuleName, codeErrResourceNodeRegDisabled, "resource node registration is disabled") ErrInvalidSuspensionStatForUnbondNode = sdkerrors.Register(ModuleName, codeErrInvalidSuspensionStatForUnbondNode, "cannot unbond a suspended node") + ErrReporterAddress = sdkerrors.Register(ModuleName, codeErrReporterAddress, "invalid reporter address") + ErrInvalidAmount = sdkerrors.Register(ModuleName, codeErrInvalidAmount, "invalid amount") ) diff --git a/x/register/types/events.go b/x/register/types/events.go index 89b1dca5..8e9bdec5 100644 --- a/x/register/types/events.go +++ b/x/register/types/events.go @@ -10,6 +10,7 @@ const ( EventTypeUnbondingResourceNode = "unbonding_resource_node" EventTypeUpdateResourceNode = "update_resource_node" EventTypeUpdateResourceNodeStake = "update_resource_node_stake" + EventTypeUpdateEffectiveStake = "update_effective_stake" EventTypeCreateMetaNode = "create_meta_node" EventTypeRemoveMetaNode = "remove_meta_node" EventTypeUnbondingMetaNode = "unbonding_Meta_node" @@ -28,12 +29,14 @@ const ( AttributeKeyUnbondingMatureTime = "unbonding_mature_time" - AttributeKeyOZoneLimitChanges = "ozone_limit_changes" - AttributeKeyInitialStake = "initial_stake" - AttributeKeyCurrentStake = "current_stake" - AttributeKeyStakeDelta = "stake_delta" - AttributeKeyStakeToRemove = "stake_to_remove" - AttributeKeyIncrStakeBool = "incr_stake" + AttributeKeyOZoneLimitChanges = "ozone_limit_changes" + AttributeKeyInitialStake = "initial_stake" + AttributeKeyCurrentStake = "current_stake" + AttributeKeyStakeDelta = "stake_delta" + AttributeKeyStakeToRemove = "stake_to_remove" + AttributeKeyIncrStakeBool = "incr_stake" + AttributeKeyEffectiveStakeChange = "effective_stake_change" + AttributeKeyIsUnsuspended = "is_unsuspended" AttributeValueCategory = ModuleName ) diff --git a/x/register/types/msg.go b/x/register/types/msg.go index aa5aa8c0..ba192b28 100644 --- a/x/register/types/msg.go +++ b/x/register/types/msg.go @@ -13,6 +13,7 @@ var ( _ sdk.Msg = &MsgRemoveResourceNode{} _ sdk.Msg = &MsgUpdateResourceNode{} _ sdk.Msg = &MsgUpdateResourceNodeStake{} + _ sdk.Msg = &MsgUpdateEffectiveStake{} _ sdk.Msg = &MsgCreateMetaNode{} _ sdk.Msg = &MsgRemoveMetaNode{} _ sdk.Msg = &MsgUpdateMetaNode{} @@ -27,6 +28,7 @@ const ( TypeMsgRemoveResourceNodeTx = "remove_resource_node" TypeUpdateResourceNodeTx = "update_resource_node" TypeUpdateResourceNodeStakeTx = "update_resource_node_stake" + TypeUpdateEffectiveStakeTx = "update_effective_stake" TypeCreateMetaNodeTx = "create_meta_node" TypeRemoveMetaNodeTx = "remove_meta_node" TypeUpdateMetaNodeTx = "update_meta_node" @@ -601,3 +603,64 @@ func (msg MsgMetaNodeRegistrationVote) GetSigners() []sdk.AccAddress { } return []sdk.AccAddress{addr.Bytes()} } + +func NewMsgUpdateEffectiveStake(reporters []stratos.SdsAddress, reporterOwner []sdk.AccAddress, + networkAddress stratos.SdsAddress, newEffectiveStake sdk.Int) *MsgUpdateEffectiveStake { + + reporterStrSlice := make([]string, 0) + for _, reporter := range reporters { + reporterStrSlice = append(reporterStrSlice, reporter.String()) + } + + reporterOwnerStrSlice := make([]string, 0) + for _, reporterOwner := range reporterOwner { + reporterOwnerStrSlice = append(reporterOwnerStrSlice, reporterOwner.String()) + } + return &MsgUpdateEffectiveStake{ + Reporters: reporterStrSlice, + ReporterOwner: reporterOwnerStrSlice, + NetworkAddress: networkAddress.String(), + EffectiveTokens: newEffectiveStake, + } +} + +func (m MsgUpdateEffectiveStake) Route() string { + return RouterKey +} + +func (m MsgUpdateEffectiveStake) Type() string { + return "update_effective_stake" +} + +func (m MsgUpdateEffectiveStake) ValidateBasic() error { + if len(m.NetworkAddress) == 0 { + return ErrInvalidNetworkAddr + } + for _, r := range m.Reporters { + if len(r) == 0 { + return ErrReporterAddress + } + } + + if m.EffectiveTokens.LT(sdk.ZeroInt()) { + return ErrInvalidAmount + } + return nil +} + +func (m MsgUpdateEffectiveStake) GetSignBytes() []byte { + bz := ModuleCdc.MustMarshalJSON(m) + return sdk.MustSortJSON(bz) +} + +func (m MsgUpdateEffectiveStake) GetSigners() []sdk.AccAddress { + var addrs []sdk.AccAddress + for _, owner := range m.ReporterOwner { + reporterOwner, err := sdk.AccAddressFromBech32(owner) + if err != nil { + continue + } + addrs = append(addrs, reporterOwner) + } + return addrs +} diff --git a/x/register/types/tx.pb.go b/x/register/types/tx.pb.go index 957782f6..b1dc448d 100644 --- a/x/register/types/tx.pb.go +++ b/x/register/types/tx.pb.go @@ -7,6 +7,7 @@ import ( context "context" fmt "fmt" types "github.com/cosmos/cosmos-sdk/codec/types" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types1 "github.com/cosmos/cosmos-sdk/types" _ "github.com/gogo/protobuf/gogoproto" grpc1 "github.com/gogo/protobuf/grpc" @@ -653,6 +654,84 @@ func (m *MsgUpdateResourceNodeStakeResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgUpdateResourceNodeStakeResponse proto.InternalMessageInfo +// MsgUpdateEffectiveStake defines a SDK message for updating the effective stake of an existing resource node. +type MsgUpdateEffectiveStake struct { + Reporters []string `protobuf:"bytes,1,rep,name=reporters,proto3" json:"reporters" yaml:"reporters"` + ReporterOwner []string `protobuf:"bytes,2,rep,name=reporter_owner,json=reporterOwner,proto3" json:"reporter_owner" yaml:"reporter_owner"` + NetworkAddress string `protobuf:"bytes,3,opt,name=network_address,json=networkAddress,proto3" json:"network_address" yaml:"network_address"` + EffectiveTokens github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,4,opt,name=effective_tokens,json=effectiveTokens,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"effective_tokens" yaml:"effective_tokens"` +} + +func (m *MsgUpdateEffectiveStake) Reset() { *m = MsgUpdateEffectiveStake{} } +func (m *MsgUpdateEffectiveStake) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateEffectiveStake) ProtoMessage() {} +func (*MsgUpdateEffectiveStake) Descriptor() ([]byte, []int) { + return fileDescriptor_75d4b90d7a185a31, []int{14} +} +func (m *MsgUpdateEffectiveStake) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateEffectiveStake) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateEffectiveStake.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 *MsgUpdateEffectiveStake) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateEffectiveStake.Merge(m, src) +} +func (m *MsgUpdateEffectiveStake) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateEffectiveStake) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateEffectiveStake.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateEffectiveStake proto.InternalMessageInfo + +// MsgUpdateEffectiveStakeResponse defines the Msg/UpdateEffectiveStake response type. +type MsgUpdateEffectiveStakeResponse struct { +} + +func (m *MsgUpdateEffectiveStakeResponse) Reset() { *m = MsgUpdateEffectiveStakeResponse{} } +func (m *MsgUpdateEffectiveStakeResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateEffectiveStakeResponse) ProtoMessage() {} +func (*MsgUpdateEffectiveStakeResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_75d4b90d7a185a31, []int{15} +} +func (m *MsgUpdateEffectiveStakeResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateEffectiveStakeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateEffectiveStakeResponse.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 *MsgUpdateEffectiveStakeResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateEffectiveStakeResponse.Merge(m, src) +} +func (m *MsgUpdateEffectiveStakeResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateEffectiveStakeResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateEffectiveStakeResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateEffectiveStakeResponse proto.InternalMessageInfo + // MsgUpdateMetaNodeStake defines a SDK message for updating the stake of an existing meta node. type MsgUpdateMetaNodeStake struct { NetworkAddress string `protobuf:"bytes,1,opt,name=network_address,json=networkAddress,proto3" json:"network_address" yaml:"network_address"` @@ -665,7 +744,7 @@ func (m *MsgUpdateMetaNodeStake) Reset() { *m = MsgUpdateMetaNodeStake{} func (m *MsgUpdateMetaNodeStake) String() string { return proto.CompactTextString(m) } func (*MsgUpdateMetaNodeStake) ProtoMessage() {} func (*MsgUpdateMetaNodeStake) Descriptor() ([]byte, []int) { - return fileDescriptor_75d4b90d7a185a31, []int{14} + return fileDescriptor_75d4b90d7a185a31, []int{16} } func (m *MsgUpdateMetaNodeStake) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -702,7 +781,7 @@ func (m *MsgUpdateMetaNodeStakeResponse) Reset() { *m = MsgUpdateMetaNod func (m *MsgUpdateMetaNodeStakeResponse) String() string { return proto.CompactTextString(m) } func (*MsgUpdateMetaNodeStakeResponse) ProtoMessage() {} func (*MsgUpdateMetaNodeStakeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_75d4b90d7a185a31, []int{15} + return fileDescriptor_75d4b90d7a185a31, []int{17} } func (m *MsgUpdateMetaNodeStakeResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -744,7 +823,7 @@ func (m *MsgMetaNodeRegistrationVote) Reset() { *m = MsgMetaNodeRegistra func (m *MsgMetaNodeRegistrationVote) String() string { return proto.CompactTextString(m) } func (*MsgMetaNodeRegistrationVote) ProtoMessage() {} func (*MsgMetaNodeRegistrationVote) Descriptor() ([]byte, []int) { - return fileDescriptor_75d4b90d7a185a31, []int{16} + return fileDescriptor_75d4b90d7a185a31, []int{18} } func (m *MsgMetaNodeRegistrationVote) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -781,7 +860,7 @@ func (m *MsgMetaNodeRegistrationVoteResponse) Reset() { *m = MsgMetaNode func (m *MsgMetaNodeRegistrationVoteResponse) String() string { return proto.CompactTextString(m) } func (*MsgMetaNodeRegistrationVoteResponse) ProtoMessage() {} func (*MsgMetaNodeRegistrationVoteResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_75d4b90d7a185a31, []int{17} + return fileDescriptor_75d4b90d7a185a31, []int{19} } func (m *MsgMetaNodeRegistrationVoteResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -825,6 +904,8 @@ func init() { proto.RegisterType((*MsgUpdateMetaNodeResponse)(nil), "stratos.register.v1.MsgUpdateMetaNodeResponse") proto.RegisterType((*MsgUpdateResourceNodeStake)(nil), "stratos.register.v1.MsgUpdateResourceNodeStake") proto.RegisterType((*MsgUpdateResourceNodeStakeResponse)(nil), "stratos.register.v1.MsgUpdateResourceNodeStakeResponse") + proto.RegisterType((*MsgUpdateEffectiveStake)(nil), "stratos.register.v1.MsgUpdateEffectiveStake") + proto.RegisterType((*MsgUpdateEffectiveStakeResponse)(nil), "stratos.register.v1.MsgUpdateEffectiveStakeResponse") proto.RegisterType((*MsgUpdateMetaNodeStake)(nil), "stratos.register.v1.MsgUpdateMetaNodeStake") proto.RegisterType((*MsgUpdateMetaNodeStakeResponse)(nil), "stratos.register.v1.MsgUpdateMetaNodeStakeResponse") proto.RegisterType((*MsgMetaNodeRegistrationVote)(nil), "stratos.register.v1.MsgMetaNodeRegistrationVote") @@ -834,87 +915,98 @@ func init() { func init() { proto.RegisterFile("stratos/register/v1/tx.proto", fileDescriptor_75d4b90d7a185a31) } var fileDescriptor_75d4b90d7a185a31 = []byte{ - // 1275 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0x4d, 0x6f, 0x1b, 0x45, - 0x18, 0xce, 0x3a, 0x6e, 0x49, 0x26, 0x49, 0x4b, 0x9c, 0xa4, 0x75, 0x9c, 0xc4, 0xe3, 0x4e, 0x49, - 0x48, 0x88, 0xb2, 0x5b, 0x27, 0xa0, 0x94, 0x4a, 0x20, 0xc5, 0xed, 0x01, 0x09, 0x25, 0xa0, 0x05, - 0x7a, 0x40, 0x42, 0xd6, 0xda, 0x1e, 0xdc, 0x55, 0xe2, 0x1d, 0x6b, 0x77, 0xed, 0xd6, 0x07, 0x2e, - 0x9c, 0x38, 0x22, 0x71, 0x46, 0xea, 0x0f, 0xe0, 0xd0, 0x03, 0xfc, 0x04, 0xa4, 0xc0, 0xa9, 0x52, - 0x2f, 0x20, 0xa1, 0x11, 0x4a, 0x38, 0xa0, 0xbd, 0xb1, 0xe2, 0x07, 0xa0, 0x9d, 0xd9, 0x5d, 0xef, - 0x77, 0x1c, 0xb5, 0xb9, 0xa0, 0xdc, 0x3c, 0xef, 0xc7, 0xcc, 0xf3, 0xbe, 0xcf, 0xb3, 0xf3, 0x61, - 0xb0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, 0x85, 0x3f, 0x4f, 0xca, 0xc2, 0xb7, 0xa7, - 0xe5, 0xb1, 0xe7, 0xa7, 0xe5, 0xb1, 0xdf, 0x4e, 0xcb, 0x63, 0x9f, 0xbf, 0xdd, 0x56, 0xcd, 0x47, - 0xbd, 0x86, 0xd8, 0x24, 0x1d, 0x6f, 0x56, 0x0d, 0x9b, 0xde, 0xcf, 0xad, 0xe6, 0x23, 0x45, 0xd5, - 0xa4, 0x27, 0xc3, 0x85, 0x9c, 0xc7, 0x9a, 0xd1, 0xb8, 0xca, 0xfe, 0x6e, 0xda, 0xf9, 0x2f, 0x00, - 0x00, 0xff, 0xff, 0xff, 0xc6, 0x03, 0x6c, 0x1f, 0x16, 0x00, 0x00, + // 1455 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0x4f, 0x6f, 0x1b, 0x45, + 0x14, 0xcf, 0x3a, 0x69, 0x69, 0xa6, 0x4d, 0xda, 0xb8, 0x49, 0xe3, 0xb8, 0x89, 0xc7, 0x9d, 0xd2, + 0x90, 0x12, 0xb2, 0x5b, 0x27, 0x45, 0x2d, 0x95, 0x00, 0xd5, 0x2d, 0x12, 0x08, 0x25, 0x45, 0x4b, + 0xe9, 0x01, 0xa9, 0xb2, 0xd6, 0xf6, 0xd4, 0x5d, 0x25, 0xde, 0xb1, 0x76, 0xd7, 0x6e, 0x7d, 0xe0, + 0xc2, 0xa9, 0x27, 0x84, 0xc4, 0x81, 0x13, 0x52, 0x3f, 0x00, 0x87, 0x1e, 0x40, 0xe2, 0x0b, 0x20, + 0x15, 0x4e, 0x95, 0xb8, 0x00, 0x42, 0x23, 0xd4, 0x72, 0x40, 0x7b, 0x63, 0xc5, 0x07, 0x40, 0x3b, + 0xb3, 0x3b, 0xfb, 0xc7, 0xbb, 0xdb, 0x58, 0x6d, 0x2f, 0xa8, 0x27, 0x7b, 0xde, 0x7b, 0x33, 0xf3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 0x61, 0x28, + 0x74, 0x29, 0x3c, 0xe6, 0x67, 0x2e, 0x10, 0x21, 0xf5, 0x90, 0xf7, 0xff, 0xba, 0xf7, 0x17, 0x82, + 0x95, 0x54, 0x7a, 0xa8, 0xd8, 0xea, 0x11, 0xc3, 0xc2, 0xe8, 0xb7, 0x49, 0x30, 0x27, 0x2c, 0xb6, + 0xb1, 0xad, 0xbd, 0x24, 0xcf, 0xff, 0x85, 0x3c, 0xe8, 0x24, 0x58, 0x1a, 0x49, 0xad, 0x48, 0xfc, + 0x1f, 0x12, 0xeb, 0x1c, 0x2a, 0xee, 0x92, 0x41, 0xbc, 0x73, 0x74, 0xc1, 0x82, 0xe9, 0x8f, 0x1b, + 0x8c, 0x54, 0x71, 0x0a, 0xbc, 0xe5, 0x50, 0x98, 0x6e, 0xe0, 0x52, 0xb8, 0xcc, 0x31, 0xa5, 0xaa, + 0x91, 0x7a, 0xdc, 0x8c, 0xec, 0x13, 0x04, 0x64, 0x24, 0xc0, 0x85, 0x67, 0x0a, 0xf0, 0xa5, 0xa9, + 0x7b, 0xf7, 0xe1, 0x84, 0x4f, 0xfc, 0x51, 0xef, 0x84, 0xff, 0x0f, 0x25, 0x46, 0x7c, 0x6e, 0x21, + 0x88, 0x7f, 0x13, 0xcc, 0x75, 0xb1, 0xad, 0xa5, 0xf9, 0x5d, 0x73, 0x28, 0x1c, 0x55, 0xba, 0x14, + 0x96, 0x38, 0xa8, 0x11, 0x15, 0x52, 0x8f, 0x76, 0xfd, 0x75, 0x5f, 0xac, 0xaf, 0x3c, 0xcf, 0x71, + 0x4f, 0x84, 0x9f, 0xff, 0x16, 0x58, 0x9e, 0x3f, 0xe9, 0xb5, 0x93, 0x27, 0x44, 0x37, 0xce, 0x44, + 0x69, 0x9f, 0x4c, 0x3c, 0xeb, 0x97, 0xcd, 0xb8, 0xad, 0x2c, 0xa5, 0xa7, 0x14, 0x9e, 0x47, 0x4f, + 0x19, 0x89, 0xe9, 0xe4, 0xb3, 0x15, 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x3d, 0xae, 0x48, 0x7f, 0x3e, 0xae, 0x48, 0x5f, 0x3e, 0xa9, 0x4c, 0x3c, 0x7a, 0x52, 0x99, + 0xf8, 0xf5, 0x49, 0x65, 0xe2, 0xd3, 0xf3, 0x91, 0x7b, 0xba, 0xbf, 0xaa, 0x81, 0xed, 0xe0, 0xef, + 0x46, 0xeb, 0xb6, 0xa6, 0x1b, 0xca, 0xdd, 0x70, 0x23, 0x76, 0x73, 0x6f, 0x1e, 0x64, 0x9f, 0x39, + 0xb7, 0xfe, 0x0b, 0x00, 0x00, 0xff, 0xff, 0x26, 0xa6, 0xe8, 0x99, 0x97, 0x18, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -934,6 +1026,7 @@ type MsgClient interface { HandleMsgRemoveResourceNode(ctx context.Context, in *MsgRemoveResourceNode, opts ...grpc.CallOption) (*MsgRemoveResourceNodeResponse, error) HandleMsgUpdateResourceNode(ctx context.Context, in *MsgUpdateResourceNode, opts ...grpc.CallOption) (*MsgUpdateResourceNodeResponse, error) HandleMsgUpdateResourceNodeStake(ctx context.Context, in *MsgUpdateResourceNodeStake, opts ...grpc.CallOption) (*MsgUpdateResourceNodeStakeResponse, error) + HandleMsgUpdateEffectiveStake(ctx context.Context, in *MsgUpdateEffectiveStake, opts ...grpc.CallOption) (*MsgUpdateEffectiveStakeResponse, error) HandleMsgCreateMetaNode(ctx context.Context, in *MsgCreateMetaNode, opts ...grpc.CallOption) (*MsgCreateMetaNodeResponse, error) HandleMsgRemoveMetaNode(ctx context.Context, in *MsgRemoveMetaNode, opts ...grpc.CallOption) (*MsgRemoveMetaNodeResponse, error) HandleMsgUpdateMetaNode(ctx context.Context, in *MsgUpdateMetaNode, opts ...grpc.CallOption) (*MsgUpdateMetaNodeResponse, error) @@ -985,6 +1078,15 @@ func (c *msgClient) HandleMsgUpdateResourceNodeStake(ctx context.Context, in *Ms return out, nil } +func (c *msgClient) HandleMsgUpdateEffectiveStake(ctx context.Context, in *MsgUpdateEffectiveStake, opts ...grpc.CallOption) (*MsgUpdateEffectiveStakeResponse, error) { + out := new(MsgUpdateEffectiveStakeResponse) + err := c.cc.Invoke(ctx, "/stratos.register.v1.Msg/HandleMsgUpdateEffectiveStake", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *msgClient) HandleMsgCreateMetaNode(ctx context.Context, in *MsgCreateMetaNode, opts ...grpc.CallOption) (*MsgCreateMetaNodeResponse, error) { out := new(MsgCreateMetaNodeResponse) err := c.cc.Invoke(ctx, "/stratos.register.v1.Msg/HandleMsgCreateMetaNode", in, out, opts...) @@ -1037,6 +1139,7 @@ type MsgServer interface { HandleMsgRemoveResourceNode(context.Context, *MsgRemoveResourceNode) (*MsgRemoveResourceNodeResponse, error) HandleMsgUpdateResourceNode(context.Context, *MsgUpdateResourceNode) (*MsgUpdateResourceNodeResponse, error) HandleMsgUpdateResourceNodeStake(context.Context, *MsgUpdateResourceNodeStake) (*MsgUpdateResourceNodeStakeResponse, error) + HandleMsgUpdateEffectiveStake(context.Context, *MsgUpdateEffectiveStake) (*MsgUpdateEffectiveStakeResponse, error) HandleMsgCreateMetaNode(context.Context, *MsgCreateMetaNode) (*MsgCreateMetaNodeResponse, error) HandleMsgRemoveMetaNode(context.Context, *MsgRemoveMetaNode) (*MsgRemoveMetaNodeResponse, error) HandleMsgUpdateMetaNode(context.Context, *MsgUpdateMetaNode) (*MsgUpdateMetaNodeResponse, error) @@ -1060,6 +1163,9 @@ func (*UnimplementedMsgServer) HandleMsgUpdateResourceNode(ctx context.Context, func (*UnimplementedMsgServer) HandleMsgUpdateResourceNodeStake(ctx context.Context, req *MsgUpdateResourceNodeStake) (*MsgUpdateResourceNodeStakeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method HandleMsgUpdateResourceNodeStake not implemented") } +func (*UnimplementedMsgServer) HandleMsgUpdateEffectiveStake(ctx context.Context, req *MsgUpdateEffectiveStake) (*MsgUpdateEffectiveStakeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method HandleMsgUpdateEffectiveStake not implemented") +} func (*UnimplementedMsgServer) HandleMsgCreateMetaNode(ctx context.Context, req *MsgCreateMetaNode) (*MsgCreateMetaNodeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method HandleMsgCreateMetaNode not implemented") } @@ -1152,6 +1258,24 @@ func _Msg_HandleMsgUpdateResourceNodeStake_Handler(srv interface{}, ctx context. return interceptor(ctx, in, info, handler) } +func _Msg_HandleMsgUpdateEffectiveStake_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateEffectiveStake) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).HandleMsgUpdateEffectiveStake(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/stratos.register.v1.Msg/HandleMsgUpdateEffectiveStake", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).HandleMsgUpdateEffectiveStake(ctx, req.(*MsgUpdateEffectiveStake)) + } + return interceptor(ctx, in, info, handler) +} + func _Msg_HandleMsgCreateMetaNode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgCreateMetaNode) if err := dec(in); err != nil { @@ -1262,6 +1386,10 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "HandleMsgUpdateResourceNodeStake", Handler: _Msg_HandleMsgUpdateResourceNodeStake_Handler, }, + { + MethodName: "HandleMsgUpdateEffectiveStake", + Handler: _Msg_HandleMsgUpdateEffectiveStake_Handler, + }, { MethodName: "HandleMsgCreateMetaNode", Handler: _Msg_HandleMsgCreateMetaNode_Handler, @@ -1827,6 +1955,87 @@ func (m *MsgUpdateResourceNodeStakeResponse) MarshalToSizedBuffer(dAtA []byte) ( return len(dAtA) - i, nil } +func (m *MsgUpdateEffectiveStake) 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 *MsgUpdateEffectiveStake) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateEffectiveStake) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.EffectiveTokens.Size() + i -= size + if _, err := m.EffectiveTokens.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + if len(m.NetworkAddress) > 0 { + i -= len(m.NetworkAddress) + copy(dAtA[i:], m.NetworkAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.NetworkAddress))) + i-- + dAtA[i] = 0x1a + } + if len(m.ReporterOwner) > 0 { + for iNdEx := len(m.ReporterOwner) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.ReporterOwner[iNdEx]) + copy(dAtA[i:], m.ReporterOwner[iNdEx]) + i = encodeVarintTx(dAtA, i, uint64(len(m.ReporterOwner[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.Reporters) > 0 { + for iNdEx := len(m.Reporters) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Reporters[iNdEx]) + copy(dAtA[i:], m.Reporters[iNdEx]) + i = encodeVarintTx(dAtA, i, uint64(len(m.Reporters[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateEffectiveStakeResponse) 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 *MsgUpdateEffectiveStakeResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateEffectiveStakeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + func (m *MsgUpdateMetaNodeStake) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -2223,6 +2432,42 @@ func (m *MsgUpdateResourceNodeStakeResponse) Size() (n int) { return n } +func (m *MsgUpdateEffectiveStake) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Reporters) > 0 { + for _, s := range m.Reporters { + l = len(s) + n += 1 + l + sovTx(uint64(l)) + } + } + if len(m.ReporterOwner) > 0 { + for _, s := range m.ReporterOwner { + l = len(s) + n += 1 + l + sovTx(uint64(l)) + } + } + l = len(m.NetworkAddress) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.EffectiveTokens.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgUpdateEffectiveStakeResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + func (m *MsgUpdateMetaNodeStake) Size() (n int) { if m == nil { return 0 @@ -3817,6 +4062,236 @@ func (m *MsgUpdateResourceNodeStakeResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *MsgUpdateEffectiveStake) 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: MsgUpdateEffectiveStake: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateEffectiveStake: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Reporters", 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.Reporters = append(m.Reporters, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ReporterOwner", 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.ReporterOwner = append(m.ReporterOwner, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NetworkAddress", 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.NetworkAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EffectiveTokens", 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 + } + if err := m.EffectiveTokens.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 *MsgUpdateEffectiveStakeResponse) 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: MsgUpdateEffectiveStakeResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateEffectiveStakeResponse: 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 *MsgUpdateMetaNodeStake) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/x/register/types/tx.pb.gw.go b/x/register/types/tx.pb.gw.go index 670114d1..bcaf8a51 100644 --- a/x/register/types/tx.pb.gw.go +++ b/x/register/types/tx.pb.gw.go @@ -175,6 +175,42 @@ func local_request_Msg_HandleMsgUpdateResourceNodeStake_0(ctx context.Context, m } +var ( + filter_Msg_HandleMsgUpdateEffectiveStake_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Msg_HandleMsgUpdateEffectiveStake_0(ctx context.Context, marshaler runtime.Marshaler, client MsgClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq MsgUpdateEffectiveStake + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_HandleMsgUpdateEffectiveStake_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.HandleMsgUpdateEffectiveStake(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Msg_HandleMsgUpdateEffectiveStake_0(ctx context.Context, marshaler runtime.Marshaler, server MsgServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq MsgUpdateEffectiveStake + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_HandleMsgUpdateEffectiveStake_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.HandleMsgUpdateEffectiveStake(ctx, &protoReq) + return msg, metadata, err + +} + var ( filter_Msg_HandleMsgCreateMetaNode_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) @@ -441,6 +477,26 @@ func RegisterMsgHandlerServer(ctx context.Context, mux *runtime.ServeMux, server }) + mux.Handle("POST", pattern_Msg_HandleMsgUpdateEffectiveStake_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Msg_HandleMsgUpdateEffectiveStake_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Msg_HandleMsgUpdateEffectiveStake_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("POST", pattern_Msg_HandleMsgCreateMetaNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -662,6 +718,26 @@ func RegisterMsgHandlerClient(ctx context.Context, mux *runtime.ServeMux, client }) + mux.Handle("POST", pattern_Msg_HandleMsgUpdateEffectiveStake_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Msg_HandleMsgUpdateEffectiveStake_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Msg_HandleMsgUpdateEffectiveStake_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("POST", pattern_Msg_HandleMsgCreateMetaNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -774,6 +850,8 @@ var ( pattern_Msg_HandleMsgUpdateResourceNodeStake_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"stratos", "register", "v1", "update_resource_node_stake"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Msg_HandleMsgUpdateEffectiveStake_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"stratos", "register", "v1", "update_effective_stake"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Msg_HandleMsgCreateMetaNode_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"stratos", "register", "v1", "create_meta_node"}, "", runtime.AssumeColonVerbOpt(true))) pattern_Msg_HandleMsgRemoveMetaNode_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"stratos", "register", "v1", "remove_meta_node"}, "", runtime.AssumeColonVerbOpt(true))) @@ -794,6 +872,8 @@ var ( forward_Msg_HandleMsgUpdateResourceNodeStake_0 = runtime.ForwardResponseMessage + forward_Msg_HandleMsgUpdateEffectiveStake_0 = runtime.ForwardResponseMessage + forward_Msg_HandleMsgCreateMetaNode_0 = runtime.ForwardResponseMessage forward_Msg_HandleMsgRemoveMetaNode_0 = runtime.ForwardResponseMessage From de18eda1863a543668cc5e2e5ff48a1073c98fde Mon Sep 17 00:00:00 2001 From: BoThe1K Date: Sat, 11 Feb 2023 01:26:33 +0100 Subject: [PATCH 08/95] Add EVM state breakers on new prod --- app/ante/handler_options.go | 3 +-- x/evm/keeper/state_transition.go | 12 ++---------- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/app/ante/handler_options.go b/app/ante/handler_options.go index a55f9589..d4987c71 100644 --- a/app/ante/handler_options.go +++ b/app/ante/handler_options.go @@ -48,8 +48,7 @@ func newEthAnteHandler(options HandlerOptions) sdk.AnteHandler { NewEthSetUpContextDecorator(options.EvmKeeper), // outermost AnteDecorator. SetUpContext must be called first NewEthMempoolFeeDecorator(options.EvmKeeper), // Check eth effective gas price against minimal-gas-prices NewEthValidateBasicDecorator(options.EvmKeeper), - // TODO: UNCOMMENT THIS FOR PROD!!!!!! - // NewEthTxPayloadVerificationDecorator(), + NewEthTxPayloadVerificationDecorator(), NewEthSigVerificationDecorator(options.EvmKeeper), NewEthAccountVerificationDecorator(options.AccountKeeper, options.EvmKeeper), NewEthGasConsumeDecorator(options.EvmKeeper, options.MaxTxGasWanted), diff --git a/x/evm/keeper/state_transition.go b/x/evm/keeper/state_transition.go index 92c097b8..b9dd1588 100644 --- a/x/evm/keeper/state_transition.go +++ b/x/evm/keeper/state_transition.go @@ -382,24 +382,16 @@ func (k *Keeper) ApplyMessageWithConfig(ctx sdk.Context, msg core.Message, trace // take over the nonce management from evm: // reset sender's nonce to msg.Nonce() before calling evm on msg nonce // as nonce already increased in db - // TODO: UNCOMMENT THIS FOR PROD!!!!!! - // stateDB.SetNonce(sender.Address(), msg.Nonce()) + stateDB.SetNonce(sender.Address(), msg.Nonce()) if contractCreation { // no need to increase nonce here as contract as during contract creation: // - tx.origin nonce increase automatically // - if IsEIP158 enabled, contract nonce will be set as 1 - - // NOTE: REMOVE THIS FOR PROD!!!!!!!!!!! - stateDB.SetNonce(sender.Address(), msg.Nonce()) ret, _, leftoverGas, vmErr = evm.Create(sender, msg.Data(), leftoverGas, msg.Value()) - - // NOTE: REMOVE THIS FOR PROD!!!!!!!!!!! - stateDB.SetNonce(sender.Address(), msg.Nonce()+1) } else { // should be incresed before call on nonce from msg so we make sure nonce remaining same as on init tx - // TODO: UNCOMMENT THIS FOR PROD!!!!!! - // stateDB.SetNonce(sender.Address(), msg.Nonce()+1) + stateDB.SetNonce(sender.Address(), msg.Nonce()+1) ret, leftoverGas, vmErr = evm.Call(sender, *msg.To(), msg.Data(), leftoverGas, msg.Value()) } From 142ab5ca14e4ec85b472f64acc973f2fa74b28a2 Mon Sep 17 00:00:00 2001 From: WangLiStratos Date: Mon, 13 Feb 2023 16:41:22 -0500 Subject: [PATCH 09/95] restore attribute current stake --- x/register/keeper/msg_server.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/x/register/keeper/msg_server.go b/x/register/keeper/msg_server.go index 8f7b1a06..ce281a77 100644 --- a/x/register/keeper/msg_server.go +++ b/x/register/keeper/msg_server.go @@ -321,7 +321,7 @@ func (k msgServer) HandleMsgUpdateResourceNodeStake(goCtx context.Context, msg * return &types.MsgUpdateResourceNodeStakeResponse{}, errors.New("invalid stake delta") } - ozoneLimitChange, completionTime, _, err := k.UpdateResourceNodeStake(ctx, networkAddr, ownerAddress, *msg.StakeDelta, msg.IncrStake) + ozoneLimitChange, completionTime, node, err := k.UpdateResourceNodeStake(ctx, networkAddr, ownerAddress, *msg.StakeDelta, msg.IncrStake) if err != nil { return nil, sdkerrors.Wrap(types.ErrUpdateResourceNodeStake, err.Error()) } @@ -333,6 +333,7 @@ func (k msgServer) HandleMsgUpdateResourceNodeStake(goCtx context.Context, msg * sdk.NewAttribute(types.AttributeKeyNetworkAddress, msg.NetworkAddress), sdk.NewAttribute(types.AttributeKeyIncrStakeBool, strconv.FormatBool(msg.IncrStake)), sdk.NewAttribute(types.AttributeKeyStakeDelta, msg.StakeDelta.String()), + sdk.NewAttribute(types.AttributeKeyCurrentStake, sdk.NewCoin(k.BondDenom(ctx), node.Tokens).String()), sdk.NewAttribute(types.AttributeKeyOZoneLimitChanges, ozoneLimitChange.String()), sdk.NewAttribute(types.AttributeKeyUnbondingMatureTime, completionTime.Format(time.RFC3339)), ), From d09d315f184b484084f07f9b463ebf0e5004a68c Mon Sep 17 00:00:00 2001 From: BoThe1K Date: Thu, 16 Feb 2023 14:55:58 +0100 Subject: [PATCH 10/95] Add initial pool design --- rpc/backend/backend.go | 92 ++- rpc/backend/evm_backend.go | 41 +- rpc/backend/utils.go | 2 +- rpc/namespaces/ethereum/debug/api.go | 7 +- rpc/namespaces/ethereum/eth/api.go | 80 +-- rpc/namespaces/ethereum/eth/filters/api.go | 4 +- rpc/namespaces/ethereum/net/api.go | 2 +- rpc/types/utils.go | 6 +- x/evm/context.go | 68 ++ x/evm/pool/tx_list.go | 518 +++++++++++++++ x/evm/pool/tx_noncer.go | 90 +++ x/evm/pool/tx_pool.back | 694 +++++++++++++++++++++ x/evm/pool/tx_pool.go | 605 ++++++++++++++++++ x/evm/pool/utils.go | 46 ++ 14 files changed, 2092 insertions(+), 163 deletions(-) create mode 100644 x/evm/context.go create mode 100644 x/evm/pool/tx_list.go create mode 100644 x/evm/pool/tx_noncer.go create mode 100644 x/evm/pool/tx_pool.back create mode 100644 x/evm/pool/tx_pool.go create mode 100644 x/evm/pool/utils.go diff --git a/rpc/backend/backend.go b/rpc/backend/backend.go index 1b6080a0..9d86a698 100644 --- a/rpc/backend/backend.go +++ b/rpc/backend/backend.go @@ -2,7 +2,6 @@ package backend import ( "context" - "fmt" "math/big" "time" @@ -20,6 +19,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/ethereum/go-ethereum/core" ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/params" "github.com/ethereum/go-ethereum/rpc" @@ -27,10 +27,10 @@ import ( storetypes "github.com/cosmos/cosmos-sdk/store/types" "github.com/stratosnet/stratos-chain/rpc/types" "github.com/stratosnet/stratos-chain/server/config" + evm "github.com/stratosnet/stratos-chain/x/evm" evmkeeper "github.com/stratosnet/stratos-chain/x/evm/keeper" + "github.com/stratosnet/stratos-chain/x/evm/pool" evmtypes "github.com/stratosnet/stratos-chain/x/evm/types" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - tmtypes "github.com/tendermint/tendermint/types" ) // BackendI implements the Cosmos and EVM backend. @@ -49,8 +49,7 @@ type CosmosBackend interface { // SignDirect() // SignAmino() GetEVMKeeper() *evmkeeper.Keeper - GetSdkContext() sdk.Context - GetSdkContextWithHeader(header *tmtypes.Header) (sdk.Context, error) + GetEVMContext() *evm.Context } // EVMBackend implements the functionality shared within ethereum namespaces @@ -81,7 +80,6 @@ type EVMBackend interface { SendTransaction(args evmtypes.TransactionArgs) (common.Hash, error) GetCoinbase() (sdk.AccAddress, error) GetTransactionByHash(txHash common.Hash) (*types.Transaction, error) - GetTxByHash(txHash common.Hash) (*tmrpctypes.ResultTx, error) GetTxByTxIndex(height int64, txIndex uint) (*tmrpctypes.ResultTx, error) EstimateGas(args evmtypes.TransactionArgs, blockNrOptional *types.BlockNumber) (hexutil.Uint64, error) BaseFee() (*big.Int, error) @@ -106,19 +104,22 @@ type TMBackend interface { GetMempool() mempool.Mempool GetConsensusReactor() *cs.Reactor GetSwitch() *p2p.Switch + GetTxPool() *pool.TxPool } var _ BackendI = (*Backend)(nil) // Backend implements the BackendI interface type Backend struct { - ctx context.Context - clientCtx client.Context - tmNode *node.Node // directly tendermint access, new impl - evmkeeper *evmkeeper.Keeper - ms storetypes.MultiStore - logger log.Logger - cfg config.Config + ctx context.Context + clientCtx client.Context + tmNode *node.Node // directly tendermint access, new impl + evmkeeper *evmkeeper.Keeper + evmContext *evm.Context + ms storetypes.MultiStore + logger log.Logger + cfg config.Config + txPool *pool.TxPool } // NewBackend creates a new Backend instance for cosmos and ethereum namespaces @@ -128,58 +129,35 @@ func NewBackend(ctx *server.Context, tmNode *node.Node, evmkeeper *evmkeeper.Kee panic(err) } - return &Backend{ - ctx: context.Background(), - clientCtx: clientCtx, - tmNode: tmNode, - evmkeeper: evmkeeper, - ms: ms, - logger: logger.With("module", "backend"), - cfg: appConf, + evmCtx := evm.NewContext(logger, ms, tmNode.BlockStore()) + txPool, err := pool.NewTxPool(core.DefaultTxPoolConfig, appConf, logger, clientCtx, tmNode.Mempool(), evmkeeper, evmCtx) + if err != nil { + panic(err) } -} -func (b *Backend) GetEVMKeeper() *evmkeeper.Keeper { - return b.evmkeeper -} - -func (b *Backend) copySdkContext(ms storetypes.MultiStore, header *tmtypes.Header) sdk.Context { - sdkCtx := sdk.NewContext(ms, tmproto.Header{}, true, b.logger) - if header != nil { - return sdkCtx.WithHeaderHash( - header.Hash(), - ).WithBlockHeader( - types.FormatTmHeaderToProto(header), - ).WithBlockHeight( - header.Height, - ).WithProposer( - sdk.ConsAddress(header.ProposerAddress), - ) + return &Backend{ + ctx: context.Background(), + clientCtx: clientCtx, + tmNode: tmNode, + evmkeeper: evmkeeper, + evmContext: evmCtx, + ms: ms, + logger: logger.With("module", "backend"), + cfg: appConf, + txPool: txPool, } - return sdkCtx } -func (b *Backend) GetSdkContext() sdk.Context { - return b.copySdkContext(b.ms.CacheMultiStore(), nil) +func (b *Backend) GetTxPool() *pool.TxPool { + return b.txPool } -func (b *Backend) GetSdkContextWithHeader(header *tmtypes.Header) (sdk.Context, error) { - if header == nil { - return b.GetSdkContext(), nil - } - latestHeight := b.GetBlockStore().Height() - if latestHeight == 0 { - return sdk.Context{}, fmt.Errorf("block store not loaded") - } - if latestHeight == header.Height { - return b.copySdkContext(b.ms.CacheMultiStore(), header), nil - } +func (b *Backend) GetEVMKeeper() *evmkeeper.Keeper { + return b.evmkeeper +} - cms, err := b.ms.CacheMultiStoreWithVersion(header.Height) - if err != nil { - return sdk.Context{}, err - } - return b.copySdkContext(cms, header), nil +func (b *Backend) GetEVMContext() *evm.Context { + return b.evmContext } func (b *Backend) GetNode() *node.Node { diff --git a/rpc/backend/evm_backend.go b/rpc/backend/evm_backend.go index 978284e4..9bb90f96 100644 --- a/rpc/backend/evm_backend.go +++ b/rpc/backend/evm_backend.go @@ -24,6 +24,7 @@ import ( "github.com/stratosnet/stratos-chain/rpc/types" stratos "github.com/stratosnet/stratos-chain/types" + "github.com/stratosnet/stratos-chain/x/evm/pool" evmtypes "github.com/stratosnet/stratos-chain/x/evm/types" tmrpccore "github.com/tendermint/tendermint/rpc/core" ) @@ -63,7 +64,7 @@ func (b *Backend) GetBlockByNumber(blockNum types.BlockNumber, fullTx bool) (*ty } // override dynamicly miner address - sdkCtx, err := b.GetSdkContextWithHeader(&resBlock.Block.Header) + sdkCtx, err := b.GetEVMContext().GetSdkContextWithHeader(&resBlock.Block.Header) if err != nil { b.logger.Debug("GetSdkContextWithHeader context", "height", blockNum, "error", err.Error()) return nil, err @@ -99,7 +100,7 @@ func (b *Backend) GetBlockByHash(hash common.Hash, fullTx bool) (*types.Block, e } // override dynamicly miner address - sdkCtx, err := b.GetSdkContextWithHeader(&resBlock.Block.Header) + sdkCtx, err := b.GetEVMContext().GetSdkContextWithHeader(&resBlock.Block.Header) if err != nil { b.logger.Debug("GetSdkContextWithHeader context", "hash", hash.Hex(), "error", err.Error()) return nil, err @@ -222,7 +223,7 @@ func (b *Backend) HeaderByNumber(blockNum types.BlockNumber) (*types.Header, err } // override dynamicly miner address - sdkCtx, err := b.GetSdkContextWithHeader(&resBlock.Block.Header) + sdkCtx, err := b.GetEVMContext().GetSdkContextWithHeader(&resBlock.Block.Header) if err != nil { b.logger.Debug("GetSdkContextWithHeader context", "height", blockNum, "error", err.Error()) return nil, err @@ -256,7 +257,7 @@ func (b *Backend) HeaderByHash(blockHash common.Hash) (*types.Header, error) { } // override dynamicly miner address - sdkCtx, err := b.GetSdkContextWithHeader(&resBlock.Block.Header) + sdkCtx, err := b.GetEVMContext().GetSdkContextWithHeader(&resBlock.Block.Header) if err != nil { b.logger.Debug("GetSdkContextWithHeader context", "hash", blockHash.Hex(), "error", err.Error()) return nil, err @@ -360,7 +361,7 @@ func (b *Backend) GetCoinbase() (sdk.AccAddress, error) { ConsAddress: sdk.ConsAddress(status.ValidatorInfo.Address).String(), } - ctx := b.GetSdkContext() + ctx := b.GetEVMContext().GetSdkContext() res, err := b.GetEVMKeeper().ValidatorAccount(sdk.WrapSDKContext(ctx), req) if err != nil { return nil, err @@ -372,7 +373,7 @@ func (b *Backend) GetCoinbase() (sdk.AccAddress, error) { // GetTransactionByHash returns the Ethereum format transaction identified by Ethereum transaction hash func (b *Backend) GetTransactionByHash(txHash common.Hash) (*types.Transaction, error) { - res, err := b.GetTxByHash(txHash) + res, err := pool.GetTmTxByHash(txHash) if err != nil { // TODO: Get chain id value from genesis tx, err := types.GetPendingTx(b.clientCtx.TxConfig.TxDecoder(), b.GetMempool(), txHash) @@ -402,22 +403,6 @@ func (b *Backend) GetTransactionByHash(txHash common.Hash) (*types.Transaction, ) } -func (b *Backend) GetTxByHash(hash common.Hash) (*tmrpctypes.ResultTx, error) { - resTx, err := tmrpccore.Tx(nil, hash.Bytes(), false) - if err != nil { - query := fmt.Sprintf("%s.%s='%s'", evmtypes.TypeMsgEthereumTx, evmtypes.AttributeKeyEthereumTxHash, hash.Hex()) - resTxs, err := tmrpccore.TxSearch(new(tmjsonrpctypes.Context), query, false, nil, nil, "") - if err != nil { - return nil, err - } - if len(resTxs.Txs) == 0 { - return nil, errors.Errorf("ethereum tx not found for hash %s", hash.Hex()) - } - return resTxs.Txs[0], nil - } - return resTx, nil -} - // GetTxByTxIndex uses `/tx_query` to find transaction by tx index of valid ethereum txs func (b *Backend) GetTxByTxIndex(height int64, index uint) (*tmrpctypes.ResultTx, error) { query := fmt.Sprintf("tx.height=%d AND %s.%s=%d", @@ -468,7 +453,7 @@ func (b *Backend) SendTransaction(args evmtypes.TransactionArgs) (common.Hash, e } // Query params to use the EVM denomination - sdkCtx := b.GetSdkContext() + sdkCtx := b.GetEVMContext().GetSdkContext() res, err := b.GetEVMKeeper().Params(sdk.WrapSDKContext(sdkCtx), &evmtypes.QueryParamsRequest{}) if err != nil { b.logger.Error("failed to query evm params", "error", err.Error()) @@ -543,7 +528,7 @@ func (b *Backend) EstimateGas(args evmtypes.TransactionArgs, blockNrOptional *ty // it will return an empty context and the sdk.Context will use // the latest block height for querying. - sdkCtx, err := b.GetSdkContextWithHeader(&resBlock.Block.Header) + sdkCtx, err := b.GetEVMContext().GetSdkContextWithHeader(&resBlock.Block.Header) if err != nil { return 0, err } @@ -611,7 +596,7 @@ func (b *Backend) RPCBlockRangeCap() int32 { // the node config. If set value is 0, it will default to 20. func (b *Backend) RPCMinGasPrice() int64 { - sdkCtx := b.GetSdkContext() + sdkCtx := b.GetEVMContext().GetSdkContext() evmParams, err := b.GetEVMKeeper().Params(sdk.WrapSDKContext(sdkCtx), &evmtypes.QueryParamsRequest{}) if err != nil { return stratos.DefaultGasPrice @@ -628,7 +613,7 @@ func (b *Backend) RPCMinGasPrice() int64 { // ChainConfig returns the latest ethereum chain configuration func (b *Backend) ChainConfig() *params.ChainConfig { - sdkCtx := b.GetSdkContext() + sdkCtx := b.GetEVMContext().GetSdkContext() params, err := b.GetEVMKeeper().Params(sdk.WrapSDKContext(sdkCtx), &evmtypes.QueryParamsRequest{}) if err != nil { return nil @@ -647,7 +632,7 @@ func (b *Backend) SuggestGasTipCap() (*big.Int, error) { return big.NewInt(0), nil } - sdkCtx := b.GetSdkContext() + sdkCtx := b.GetEVMContext().GetSdkContext() params, err := b.GetEVMKeeper().Params(sdk.WrapSDKContext(sdkCtx), &evmtypes.QueryParamsRequest{}) if err != nil { return nil, err @@ -685,7 +670,7 @@ func (b *Backend) BaseFee() (*big.Int, error) { return nil, nil } - sdkCtx, err := b.GetSdkContextWithHeader(&resBlock.Block.Header) + sdkCtx, err := b.GetEVMContext().GetSdkContextWithHeader(&resBlock.Block.Header) if err != nil { return nil, err } diff --git a/rpc/backend/utils.go b/rpc/backend/utils.go index 81bc8d28..cd76951b 100644 --- a/rpc/backend/utils.go +++ b/rpc/backend/utils.go @@ -196,7 +196,7 @@ func (b *Backend) getAccountNonce(address common.Address, height types.BlockNumb return 0, fmt.Errorf("failed to get block for %d height", height) } - sdkCtx, err := b.GetSdkContextWithHeader(&block.Block.Header) + sdkCtx, err := b.GetEVMContext().GetSdkContextWithHeader(&block.Block.Header) if err != nil { return 0, err } diff --git a/rpc/namespaces/ethereum/debug/api.go b/rpc/namespaces/ethereum/debug/api.go index 93c4908d..cd56213a 100644 --- a/rpc/namespaces/ethereum/debug/api.go +++ b/rpc/namespaces/ethereum/debug/api.go @@ -36,6 +36,7 @@ import ( "github.com/stratosnet/stratos-chain/rpc/backend" rpctypes "github.com/stratosnet/stratos-chain/rpc/types" + "github.com/stratosnet/stratos-chain/x/evm/pool" jstracers "github.com/stratosnet/stratos-chain/x/evm/tracers/js" nativetracers "github.com/stratosnet/stratos-chain/x/evm/tracers/native" evmtypes "github.com/stratosnet/stratos-chain/x/evm/types" @@ -108,7 +109,7 @@ func (a *API) TraceTransaction(ctx context.Context, hash common.Hash, config *tr a.logger.Debug("debug_traceTransaction", "hash", hash) // Get transaction by hash - resultTx, err := a.backend.GetTxByHash(hash) + resultTx, err := pool.GetTmTxByHash(hash) if err != nil { a.logger.Debug("debug_traceTransaction", "tx not found", "hash", hash) return nil, err @@ -172,7 +173,7 @@ func (a *API) TraceTransaction(ctx context.Context, hash common.Hash, config *tr }() defer cancel() - sdkCtx, err := a.backend.GetSdkContextWithHeader(&parentBlock.Block.Header) + sdkCtx, err := a.backend.GetEVMContext().GetSdkContextWithHeader(&parentBlock.Block.Header) if err != nil { return nil, fmt.Errorf("Failed to load state at height: %d\n", parentHeight) } @@ -278,7 +279,7 @@ func (a *API) traceBlock(height rpctypes.BlockNumber, config *evmtypes.TraceConf BlockHash: common.Bytes2Hex(block.BlockID.Hash), } - sdkCtx, err := a.backend.GetSdkContextWithHeader(&block.Block.Header) + sdkCtx, err := a.backend.GetEVMContext().GetSdkContextWithHeader(&block.Block.Header) if err != nil { return nil, err } diff --git a/rpc/namespaces/ethereum/eth/api.go b/rpc/namespaces/ethereum/eth/api.go index 05243e5e..d7ad936c 100644 --- a/rpc/namespaces/ethereum/eth/api.go +++ b/rpc/namespaces/ethereum/eth/api.go @@ -7,11 +7,9 @@ import ( "math" "math/big" - abci "github.com/tendermint/tendermint/abci/types" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - "github.com/pkg/errors" "github.com/spf13/viper" "github.com/tendermint/tendermint/libs/log" @@ -38,8 +36,8 @@ import ( "github.com/stratosnet/stratos-chain/rpc/types" rpctypes "github.com/stratosnet/stratos-chain/rpc/types" stratos "github.com/stratosnet/stratos-chain/types" + "github.com/stratosnet/stratos-chain/x/evm/pool" evmtypes "github.com/stratosnet/stratos-chain/x/evm/types" - mempl "github.com/tendermint/tendermint/mempool" tmrpccore "github.com/tendermint/tendermint/rpc/core" ) @@ -118,7 +116,7 @@ func (e *PublicAPI) ProtocolVersion() hexutil.Uint { // ChainId is the EIP-155 replay-protection chain id for the current ethereum chain config. func (e *PublicAPI) ChainId() (*hexutil.Big, error) { // nolint e.logger.Debug("eth_chainId") - ctx := e.backend.GetSdkContext() + ctx := e.backend.GetEVMContext().GetSdkContext() params := e.backend.GetEVMKeeper().GetParams(ctx) return (*hexutil.Big)(params.ChainConfig.ChainID.BigInt()), nil } @@ -262,7 +260,7 @@ func (e *PublicAPI) GetBalance(address common.Address, blockNrOrHash rpctypes.Bl return nil, nil } - sdkCtx, err := e.backend.GetSdkContextWithHeader(&resBlock.Block.Header) + sdkCtx, err := e.backend.GetEVMContext().GetSdkContextWithHeader(&resBlock.Block.Header) if err != nil { return nil, err } @@ -290,7 +288,7 @@ func (e *PublicAPI) GetStorageAt(address common.Address, key string, blockNrOrHa return nil, nil } - sdkCtx, err := e.backend.GetSdkContextWithHeader(&resBlock.Block.Header) + sdkCtx, err := e.backend.GetEVMContext().GetSdkContextWithHeader(&resBlock.Block.Header) if err != nil { return nil, err } @@ -378,7 +376,7 @@ func (e *PublicAPI) GetCode(address common.Address, blockNrOrHash rpctypes.Block return nil, nil } - sdkCtx, err := e.backend.GetSdkContextWithHeader(&resBlock.Block.Header) + sdkCtx, err := e.backend.GetEVMContext().GetSdkContextWithHeader(&resBlock.Block.Header) if err != nil { return nil, err } @@ -395,7 +393,7 @@ func (e *PublicAPI) GetTransactionLogs(txHash common.Hash) ([]*ethtypes.Log, err e.logger.Debug("eth_getTransactionLogs", "hash", txHash) hexTx := txHash.Hex() - res, err := e.backend.GetTxByHash(txHash) + res, err := pool.GetTmTxByHash(txHash) if err != nil { e.logger.Debug("tx not found", "hash", hexTx, "error", err.Error()) return nil, nil @@ -500,67 +498,13 @@ func (e *PublicAPI) SendRawTransaction(data hexutil.Bytes) (common.Hash, error) return common.Hash{}, err } - ethereumTx := &evmtypes.MsgEthereumTx{} - if err := ethereumTx.FromEthereumTx(tx); err != nil { - e.logger.Error("transaction converting failed", "error", err.Error()) - return common.Hash{}, err - } - - if err := ethereumTx.ValidateBasic(); err != nil { - e.logger.Debug("tx failed basic validation", "error", err.Error()) - return common.Hash{}, err - } - - sdkCtx := e.backend.GetSdkContext() - // Query params to use the EVM denomination - params := e.backend.GetEVMKeeper().GetParams(sdkCtx) - - cosmosTx, err := ethereumTx.BuildTx(e.clientCtx.TxConfig.NewTxBuilder(), params.EvmDenom) - if err != nil { - e.logger.Error("failed to build cosmos tx", "error", err.Error()) - return common.Hash{}, err - } - - // Encode transaction by default Tx encoder - packet, err := e.clientCtx.TxConfig.TxEncoder()(cosmosTx) + _, err := e.backend.GetTxPool().Add(tx) if err != nil { - e.logger.Error("failed to encode eth tx using default encoder", "error", err.Error()) + e.logger.Error("failed to add eth tx into tx evm pool", "error", err.Error()) return common.Hash{}, err } - ethTx := ethereumTx.AsTransaction() - if !ethTx.Protected() { - // Ensure only eip155 signed transactions are submitted. - return common.Hash{}, errors.New("legacy pre-eip-155 transactions not supported") - } - txHash := ethTx.Hash() - - mempool := e.backend.GetMempool() - if e.clientCtx.BroadcastMode == "async" { - e.logger.Info("Use async mode to propagate tx", txHash) - err = mempool.CheckTx(packet, nil, mempl.TxInfo{}) - if err != nil { - return common.Hash{}, err - } - } else { - e.logger.Info("Use sync mode to propagate tx", txHash) - resCh := make(chan *abci.Response, 1) - err = mempool.CheckTx(packet, func(res *abci.Response) { - resCh <- res - }, mempl.TxInfo{}) - if err != nil { - e.logger.Error("failed to send eth tx packet to mempool", "error", err.Error()) - return common.Hash{}, err - } - res := <-resCh - resBrodTx := res.GetCheckTx() - if resBrodTx.Code != 0 { - e.logger.Error("exec failed on check tx", "error", resBrodTx.Log) - return common.Hash{}, fmt.Errorf(resBrodTx.Log) - } - } - - return txHash, nil + return tx.Hash(), nil } // checkTxFee is an internal function used to check whether the fee of @@ -688,7 +632,7 @@ func (e *PublicAPI) doCall( return nil, nil } - sdkCtx, err := e.backend.GetSdkContextWithHeader(&resBlock.Block.Header) + sdkCtx, err := e.backend.GetEVMContext().GetSdkContextWithHeader(&resBlock.Block.Header) if err != nil { return nil, err } @@ -812,7 +756,7 @@ func (e *PublicAPI) GetTransactionByBlockNumberAndIndex(blockNum rpctypes.BlockN // GetTransactionReceipt returns the transaction receipt identified by hash. func (e *PublicAPI) GetTransactionReceipt(hash common.Hash) (*rpctypes.TransactionReceipt, error) { e.logger.Debug("eth_getTransactionReceipt", "hash", hash) - res, err := e.backend.GetTxByHash(hash) + res, err := pool.GetTmTxByHash(hash) if err != nil { return nil, nil } @@ -990,7 +934,7 @@ func (e *PublicAPI) GetProof(address common.Address, storageKeys []string, block return nil, nil } - sdkCtx, err := e.backend.GetSdkContextWithHeader(&resBlock.Block.Header) + sdkCtx, err := e.backend.GetEVMContext().GetSdkContextWithHeader(&resBlock.Block.Header) if err != nil { return nil, err } diff --git a/rpc/namespaces/ethereum/eth/filters/api.go b/rpc/namespaces/ethereum/eth/filters/api.go index ccadf761..23c1b276 100644 --- a/rpc/namespaces/ethereum/eth/filters/api.go +++ b/rpc/namespaces/ethereum/eth/filters/api.go @@ -232,7 +232,7 @@ func (api *PublicFilterAPI) NewBlockFilter() rpc.ID { return } // override dynamicly miner address - sdkCtx, err := api.backend.GetSdkContextWithHeader(&data.Header) + sdkCtx, err := api.backend.GetEVMContext().GetSdkContextWithHeader(&data.Header) if err != nil { headersSub.err <- err return @@ -296,7 +296,7 @@ func (api *PublicFilterAPI) NewHeads(ctx context.Context) (*rpc.Subscription, er return } // override dynamicly miner address - sdkCtx, err := api.backend.GetSdkContextWithHeader(&data.Header) + sdkCtx, err := api.backend.GetEVMContext().GetSdkContextWithHeader(&data.Header) if err != nil { headersSub.err <- err return diff --git a/rpc/namespaces/ethereum/net/api.go b/rpc/namespaces/ethereum/net/api.go index 6cc61677..2a51d626 100644 --- a/rpc/namespaces/ethereum/net/api.go +++ b/rpc/namespaces/ethereum/net/api.go @@ -21,7 +21,7 @@ func NewPublicAPI(backend backend.BackendI) *PublicAPI { // Version returns the current ethereum protocol version. func (s *PublicAPI) Version() (string, error) { - ctx := s.backend.GetSdkContext() + ctx := s.backend.GetEVMContext().GetSdkContext() params := s.backend.GetEVMKeeper().GetParams(ctx) return params.ChainConfig.ChainID.String(), nil } diff --git a/rpc/types/utils.go b/rpc/types/utils.go index 007686f0..dc796748 100644 --- a/rpc/types/utils.go +++ b/rpc/types/utils.go @@ -89,7 +89,7 @@ func EthHeaderFromTendermint(header tmtypes.Header) (*Header, error) { if err != nil { return nil, err } - gasLimit, err := BlockMaxGasFromConsensusParams(header.Height) + gasLimit, err := BlockMaxGasFromConsensusParams(&header.Height) if err != nil { return nil, err } @@ -175,8 +175,8 @@ func EthBlockFromTendermint(txDecoder sdk.TxDecoder, block *tmtypes.Block, fullT } // BlockMaxGasFromConsensusParams returns the gas limit for the current block from the chain consensus params. -func BlockMaxGasFromConsensusParams(blockHeight int64) (int64, error) { - resConsParams, err := tmrpccore.ConsensusParams(nil, &blockHeight) +func BlockMaxGasFromConsensusParams(blockHeight *int64) (int64, error) { + resConsParams, err := tmrpccore.ConsensusParams(nil, blockHeight) if err != nil { return int64(^uint32(0)), err } diff --git a/x/evm/context.go b/x/evm/context.go new file mode 100644 index 00000000..3cd4711c --- /dev/null +++ b/x/evm/context.go @@ -0,0 +1,68 @@ +package evm + +import ( + "fmt" + + storetypes "github.com/cosmos/cosmos-sdk/store/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/stratosnet/stratos-chain/rpc/types" + "github.com/tendermint/tendermint/libs/log" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + "github.com/tendermint/tendermint/store" + tmtypes "github.com/tendermint/tendermint/types" +) + +type Context struct { + logger log.Logger + ms storetypes.MultiStore + blockStore *store.BlockStore +} + +func NewContext(logger log.Logger, ms storetypes.MultiStore, blockStore *store.BlockStore) *Context { + return &Context{ + logger: logger, + ms: ms, + blockStore: blockStore, + } +} + +func (c *Context) copySdkContext(ms storetypes.MultiStore, header *tmtypes.Header) sdk.Context { + sdkCtx := sdk.NewContext(ms, tmproto.Header{}, true, c.logger) + if header != nil { + return sdkCtx.WithHeaderHash( + header.Hash(), + ).WithBlockHeader( + types.FormatTmHeaderToProto(header), + ).WithBlockHeight( + header.Height, + ).WithProposer( + sdk.ConsAddress(header.ProposerAddress), + ) + } + return sdkCtx +} + +func (c *Context) GetSdkContext() sdk.Context { + return c.copySdkContext(c.ms.CacheMultiStore(), nil) +} + +func (c *Context) GetSdkContextWithHeader(header *tmtypes.Header) (sdk.Context, error) { + if header == nil { + return c.GetSdkContext(), nil + } + if c.blockStore != nil { + latestHeight := c.blockStore.Height() + if latestHeight == 0 { + return sdk.Context{}, fmt.Errorf("block store not loaded") + } + if latestHeight == header.Height { + return c.copySdkContext(c.ms.CacheMultiStore(), header), nil + } + } + + cms, err := c.ms.CacheMultiStoreWithVersion(header.Height) + if err != nil { + return sdk.Context{}, err + } + return c.copySdkContext(cms, header), nil +} diff --git a/x/evm/pool/tx_list.go b/x/evm/pool/tx_list.go new file mode 100644 index 00000000..1536f4ec --- /dev/null +++ b/x/evm/pool/tx_list.go @@ -0,0 +1,518 @@ +// Copyright 2016 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package pool + +import ( + "container/heap" + "math" + "math/big" + "sort" + "sync" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" +) + +// nonceHeap is a heap.Interface implementation over 64bit unsigned integers for +// retrieving sorted transactions from the possibly gapped future queue. +type nonceHeap []uint64 + +func (h nonceHeap) Len() int { return len(h) } +func (h nonceHeap) Less(i, j int) bool { return h[i] < h[j] } +func (h nonceHeap) Swap(i, j int) { h[i], h[j] = h[j], h[i] } + +func (h *nonceHeap) Push(x interface{}) { + *h = append(*h, x.(uint64)) +} + +func (h *nonceHeap) Pop() interface{} { + old := *h + n := len(old) + x := old[n-1] + *h = old[0 : n-1] + return x +} + +// txSortedMap is a nonce->transaction hash map with a heap based index to allow +// iterating over the contents in a nonce-incrementing way. +type txSortedMap struct { + items map[uint64]*types.Transaction // Hash map storing the transaction data + index *nonceHeap // Heap of nonces of all the stored transactions (non-strict mode) + cache types.Transactions // Cache of the transactions already sorted +} + +// newTxSortedMap creates a new nonce-sorted transaction map. +func newTxSortedMap() *txSortedMap { + return &txSortedMap{ + items: make(map[uint64]*types.Transaction), + index: new(nonceHeap), + } +} + +// Get retrieves the current transactions associated with the given nonce. +func (m *txSortedMap) Get(nonce uint64) *types.Transaction { + return m.items[nonce] +} + +// Put inserts a new transaction into the map, also updating the map's nonce +// index. If a transaction already exists with the same nonce, it's overwritten. +func (m *txSortedMap) Put(tx *types.Transaction) { + nonce := tx.Nonce() + if m.items[nonce] == nil { + heap.Push(m.index, nonce) + } + m.items[nonce], m.cache = tx, nil +} + +// Forward removes all transactions from the map with a nonce lower than the +// provided threshold. Every removed transaction is returned for any post-removal +// maintenance. +func (m *txSortedMap) Forward(threshold uint64) types.Transactions { + var removed types.Transactions + + // Pop off heap items until the threshold is reached + for m.index.Len() > 0 && (*m.index)[0] < threshold { + nonce := heap.Pop(m.index).(uint64) + removed = append(removed, m.items[nonce]) + delete(m.items, nonce) + } + // If we had a cached order, shift the front + if m.cache != nil { + m.cache = m.cache[len(removed):] + } + return removed +} + +// Filter iterates over the list of transactions and removes all of them for which +// the specified function evaluates to true. +// Filter, as opposed to 'filter', re-initialises the heap after the operation is done. +// If you want to do several consecutive filterings, it's therefore better to first +// do a .filter(func1) followed by .Filter(func2) or reheap() +func (m *txSortedMap) Filter(filter func(*types.Transaction) bool) types.Transactions { + removed := m.filter(filter) + // If transactions were removed, the heap and cache are ruined + if len(removed) > 0 { + m.reheap() + } + return removed +} + +func (m *txSortedMap) reheap() { + *m.index = make([]uint64, 0, len(m.items)) + for nonce := range m.items { + *m.index = append(*m.index, nonce) + } + heap.Init(m.index) + m.cache = nil +} + +// filter is identical to Filter, but **does not** regenerate the heap. This method +// should only be used if followed immediately by a call to Filter or reheap() +func (m *txSortedMap) filter(filter func(*types.Transaction) bool) types.Transactions { + var removed types.Transactions + + // Collect all the transactions to filter out + for nonce, tx := range m.items { + if filter(tx) { + removed = append(removed, tx) + delete(m.items, nonce) + } + } + if len(removed) > 0 { + m.cache = nil + } + return removed +} + +// Cap places a hard limit on the number of items, returning all transactions +// exceeding that limit. +func (m *txSortedMap) Cap(threshold int) types.Transactions { + // Short circuit if the number of items is under the limit + if len(m.items) <= threshold { + return nil + } + // Otherwise gather and drop the highest nonce'd transactions + var drops types.Transactions + + sort.Sort(*m.index) + for size := len(m.items); size > threshold; size-- { + drops = append(drops, m.items[(*m.index)[size-1]]) + delete(m.items, (*m.index)[size-1]) + } + *m.index = (*m.index)[:threshold] + heap.Init(m.index) + + // If we had a cache, shift the back + if m.cache != nil { + m.cache = m.cache[:len(m.cache)-len(drops)] + } + return drops +} + +// Remove deletes a transaction from the maintained map, returning whether the +// transaction was found. +func (m *txSortedMap) Remove(nonce uint64) bool { + // Short circuit if no transaction is present + _, ok := m.items[nonce] + if !ok { + return false + } + // Otherwise delete the transaction and fix the heap index + for i := 0; i < m.index.Len(); i++ { + if (*m.index)[i] == nonce { + heap.Remove(m.index, i) + break + } + } + delete(m.items, nonce) + m.cache = nil + + return true +} + +// Ready retrieves a sequentially increasing list of transactions starting at the +// provided nonce that is ready for processing. The returned transactions will be +// removed from the list. +// +// Note, all transactions with nonces lower than start will also be returned to +// prevent getting into and invalid state. This is not something that should ever +// happen but better to be self correcting than failing! +func (m *txSortedMap) Ready(start uint64) types.Transactions { + // Short circuit if no transactions are available + if m.index.Len() == 0 || (*m.index)[0] > start { + return nil + } + // Otherwise start accumulating incremental transactions + var ready types.Transactions + for next := (*m.index)[0]; m.index.Len() > 0 && (*m.index)[0] == next; next++ { + ready = append(ready, m.items[next]) + delete(m.items, next) + heap.Pop(m.index) + } + m.cache = nil + + return ready +} + +// Len returns the length of the transaction map. +func (m *txSortedMap) Len() int { + return len(m.items) +} + +func (m *txSortedMap) flatten() types.Transactions { + // If the sorting was not cached yet, create and cache it + if m.cache == nil { + m.cache = make(types.Transactions, 0, len(m.items)) + for _, tx := range m.items { + m.cache = append(m.cache, tx) + } + sort.Sort(types.TxByNonce(m.cache)) + } + return m.cache +} + +// Flatten creates a nonce-sorted slice of transactions based on the loosely +// sorted internal representation. The result of the sorting is cached in case +// it's requested again before any modifications are made to the contents. +func (m *txSortedMap) Flatten() types.Transactions { + // Copy the cache to prevent accidental modifications + cache := m.flatten() + txs := make(types.Transactions, len(cache)) + copy(txs, cache) + return txs +} + +// LastElement returns the last element of a flattened list, thus, the +// transaction with the highest nonce +func (m *txSortedMap) LastElement() *types.Transaction { + cache := m.flatten() + return cache[len(cache)-1] +} + +// txList is a "list" of transactions belonging to an account, sorted by account +// nonce. The same type can be used both for storing contiguous transactions for +// the executable/pending queue; and for storing gapped transactions for the non- +// executable/future queue, with minor behavioral changes. +type txList struct { + strict bool // Whether nonces are strictly continuous or not + txs *txSortedMap // Heap indexed sorted hash map of the transactions + + costcap *big.Int // Price of the highest costing transaction (reset only if exceeds balance) + gascap uint64 // Gas limit of the highest spending transaction (reset only if exceeds block limit) +} + +// newTxList create a new transaction list for maintaining nonce-indexable fast, +// gapped, sortable transaction lists. +func newTxList(strict bool) *txList { + return &txList{ + strict: strict, + txs: newTxSortedMap(), + costcap: new(big.Int), + } +} + +// Overlaps returns whether the transaction specified has the same nonce as one +// already contained within the list. +func (l *txList) Overlaps(tx *types.Transaction) bool { + return l.txs.Get(tx.Nonce()) != nil +} + +// Add tries to insert a new transaction into the list, returning whether the +// transaction was accepted, and if yes, any previous transaction it replaced. +// +// If the new transaction is accepted into the list, the lists' cost and gas +// thresholds are also potentially updated. +func (l *txList) Add(tx *types.Transaction, priceBump uint64) (bool, *types.Transaction) { + // If there's an older better transaction, abort + old := l.txs.Get(tx.Nonce()) + if old != nil { + if old.GasFeeCapCmp(tx) >= 0 || old.GasTipCapCmp(tx) >= 0 { + return false, nil + } + // thresholdFeeCap = oldFC * (100 + priceBump) / 100 + a := big.NewInt(100 + int64(priceBump)) + aFeeCap := new(big.Int).Mul(a, old.GasFeeCap()) + aTip := a.Mul(a, old.GasTipCap()) + + // thresholdTip = oldTip * (100 + priceBump) / 100 + b := big.NewInt(100) + thresholdFeeCap := aFeeCap.Div(aFeeCap, b) + thresholdTip := aTip.Div(aTip, b) + + // We have to ensure that both the new fee cap and tip are higher than the + // old ones as well as checking the percentage threshold to ensure that + // this is accurate for low (Wei-level) gas price replacements. + if tx.GasFeeCapIntCmp(thresholdFeeCap) < 0 || tx.GasTipCapIntCmp(thresholdTip) < 0 { + return false, nil + } + } + // Otherwise overwrite the old transaction with the current one + l.txs.Put(tx) + if cost := tx.Cost(); l.costcap.Cmp(cost) < 0 { + l.costcap = cost + } + if gas := tx.Gas(); l.gascap < gas { + l.gascap = gas + } + return true, old +} + +// Forward removes all transactions from the list with a nonce lower than the +// provided threshold. Every removed transaction is returned for any post-removal +// maintenance. +func (l *txList) Forward(threshold uint64) types.Transactions { + return l.txs.Forward(threshold) +} + +// Filter removes all transactions from the list with a cost or gas limit higher +// than the provided thresholds. Every removed transaction is returned for any +// post-removal maintenance. Strict-mode invalidated transactions are also +// returned. +// +// This method uses the cached costcap and gascap to quickly decide if there's even +// a point in calculating all the costs or if the balance covers all. If the threshold +// is lower than the costgas cap, the caps will be reset to a new high after removing +// the newly invalidated transactions. +func (l *txList) Filter(costLimit *big.Int, gasLimit uint64) (types.Transactions, types.Transactions) { + // If all transactions are below the threshold, short circuit + if l.costcap.Cmp(costLimit) <= 0 && l.gascap <= gasLimit { + return nil, nil + } + l.costcap = new(big.Int).Set(costLimit) // Lower the caps to the thresholds + l.gascap = gasLimit + + // Filter out all the transactions above the account's funds + removed := l.txs.Filter(func(tx *types.Transaction) bool { + return tx.Gas() > gasLimit || tx.Cost().Cmp(costLimit) > 0 + }) + + if len(removed) == 0 { + return nil, nil + } + var invalids types.Transactions + // If the list was strict, filter anything above the lowest nonce + if l.strict { + lowest := uint64(math.MaxUint64) + for _, tx := range removed { + if nonce := tx.Nonce(); lowest > nonce { + lowest = nonce + } + } + invalids = l.txs.filter(func(tx *types.Transaction) bool { return tx.Nonce() > lowest }) + } + l.txs.reheap() + return removed, invalids +} + +// Cap places a hard limit on the number of items, returning all transactions +// exceeding that limit. +func (l *txList) Cap(threshold int) types.Transactions { + return l.txs.Cap(threshold) +} + +// Remove deletes a transaction from the maintained list, returning whether the +// transaction was found, and also returning any transaction invalidated due to +// the deletion (strict mode only). +func (l *txList) Remove(tx *types.Transaction) (bool, types.Transactions) { + // Remove the transaction from the set + nonce := tx.Nonce() + if removed := l.txs.Remove(nonce); !removed { + return false, nil + } + // In strict mode, filter out non-executable transactions + if l.strict { + return true, l.txs.Filter(func(tx *types.Transaction) bool { return tx.Nonce() > nonce }) + } + return true, nil +} + +// Ready retrieves a sequentially increasing list of transactions starting at the +// provided nonce that is ready for processing. The returned transactions will be +// removed from the list. +// +// Note, all transactions with nonces lower than start will also be returned to +// prevent getting into and invalid state. This is not something that should ever +// happen but better to be self correcting than failing! +func (l *txList) Ready(start uint64) types.Transactions { + return l.txs.Ready(start) +} + +// Len returns the length of the transaction list. +func (l *txList) Len() int { + return l.txs.Len() +} + +// Empty returns whether the list of transactions is empty or not. +func (l *txList) Empty() bool { + return l.Len() == 0 +} + +// Flatten creates a nonce-sorted slice of transactions based on the loosely +// sorted internal representation. The result of the sorting is cached in case +// it's requested again before any modifications are made to the contents. +func (l *txList) Flatten() types.Transactions { + return l.txs.Flatten() +} + +// LastElement returns the last element of a flattened list, thus, the +// transaction with the highest nonce +func (l *txList) LastElement() *types.Transaction { + return l.txs.LastElement() +} + +// txLookup is used internally by TxPool to track transactions while allowing +// lookup without mutex contention. +// +// Note, although this type is properly protected against concurrent access, it +// is **not** a type that should ever be mutated or even exposed outside of the +// transaction pool, since its internal state is tightly coupled with the pools +// internal mechanisms. The sole purpose of the type is to permit out-of-bound +// peeking into the pool in TxPool.Get without having to acquire the widely scoped +// TxPool.mu mutex. +// +// This lookup set combines the notion of "local transactions", which is useful +// to build upper-level structure. +type txLookup struct { + slots int + lock sync.RWMutex + txs map[common.Hash]*types.Transaction +} + +// newTxLookup returns a new txLookup structure. +func newTxLookup() *txLookup { + return &txLookup{ + txs: make(map[common.Hash]*types.Transaction), + } +} + +// Range calls f on each key and value present in the map. The callback passed +// should return the indicator whether the iteration needs to be continued. +// Callers need to specify which set (or both) to be iterated. +func (t *txLookup) Range(f func(hash common.Hash, tx *types.Transaction) bool) { + t.lock.RLock() + defer t.lock.RUnlock() + + for key, value := range t.txs { + if !f(key, value) { + return + } + } +} + +// Get returns a transaction if it exists in the lookup, or nil if not found. +func (t *txLookup) Get(hash common.Hash) *types.Transaction { + t.lock.RLock() + defer t.lock.RUnlock() + + return t.txs[hash] +} + +// Count returns the current number of transactions in the lookup. +func (t *txLookup) Count() int { + t.lock.RLock() + defer t.lock.RUnlock() + + return len(t.txs) +} + +// Slots returns the current number of slots used in the lookup. +func (t *txLookup) Slots() int { + t.lock.RLock() + defer t.lock.RUnlock() + + return t.slots +} + +// Add adds a transaction to the lookup. +func (t *txLookup) Add(tx *types.Transaction) { + t.lock.Lock() + defer t.lock.Unlock() + + t.slots += numSlots(tx) + t.txs[tx.Hash()] = tx +} + +// Remove removes a transaction from the lookup. +func (t *txLookup) Remove(hash common.Hash) { + t.lock.Lock() + defer t.lock.Unlock() + + tx, ok := t.txs[hash] + if !ok { + return + } + t.slots -= numSlots(tx) + + delete(t.txs, hash) +} + +// RemotesBelowTip finds all remote transactions below the given tip threshold. +func (t *txLookup) RemotesBelowTip(threshold *big.Int) types.Transactions { + found := make(types.Transactions, 0, 128) + t.Range(func(hash common.Hash, tx *types.Transaction) bool { + if tx.GasTipCapIntCmp(threshold) < 0 { + found = append(found, tx) + } + return true + }) + return found +} + +// numSlots calculates the number of slots needed for a single transaction. +func numSlots(tx *types.Transaction) int { + return int((tx.Size() + txSlotSize - 1) / txSlotSize) +} diff --git a/x/evm/pool/tx_noncer.go b/x/evm/pool/tx_noncer.go new file mode 100644 index 00000000..38c0d550 --- /dev/null +++ b/x/evm/pool/tx_noncer.go @@ -0,0 +1,90 @@ +// Copyright 2019 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package pool + +import ( + "sync" + + "github.com/ethereum/go-ethereum/common" + evm "github.com/stratosnet/stratos-chain/x/evm" + evmkeeper "github.com/stratosnet/stratos-chain/x/evm/keeper" +) + +// txNoncer is a tiny virtual state database to manage the executable nonces of +// accounts in the pool, falling back to reading from a real state database if +// an account is unknown. +type txNoncer struct { + context *evm.Context + evmkeeper *evmkeeper.Keeper + nonces map[common.Address]uint64 + lock sync.Mutex +} + +// newTxNoncer creates a new virtual state database to track the pool nonces. +func newTxNoncer(context *evm.Context, evmkeeper *evmkeeper.Keeper) *txNoncer { + return &txNoncer{ + context: context, + evmkeeper: evmkeeper, + nonces: make(map[common.Address]uint64), + } +} + +// get returns the current nonce of an account, falling back to a real state +// database if the account is unknown. +func (txn *txNoncer) get(addr common.Address) uint64 { + // We use mutex for get operation is the underlying + // state will mutate db even for read access. + txn.lock.Lock() + defer txn.lock.Unlock() + + if _, ok := txn.nonces[addr]; !ok { + txn.nonces[addr] = txn.evmkeeper.GetNonce(txn.context.GetSdkContext(), addr) + } + return txn.nonces[addr] +} + +// set inserts a new virtual nonce into the virtual state database to be returned +// whenever the pool requests it instead of reaching into the real state database. +func (txn *txNoncer) set(addr common.Address, nonce uint64) { + txn.lock.Lock() + defer txn.lock.Unlock() + + txn.nonces[addr] = nonce +} + +// setIfLower updates a new virtual nonce into the virtual state database if the +// the new one is lower. +func (txn *txNoncer) setIfLower(addr common.Address, nonce uint64) { + txn.lock.Lock() + defer txn.lock.Unlock() + + if _, ok := txn.nonces[addr]; !ok { + txn.nonces[addr] = txn.evmkeeper.GetNonce(txn.context.GetSdkContext(), addr) + } + if txn.nonces[addr] <= nonce { + return + } + txn.nonces[addr] = nonce +} + +// setAll sets the nonces for all accounts to the given map. +func (txn *txNoncer) setAll(all map[common.Address]uint64) { + txn.lock.Lock() + defer txn.lock.Unlock() + + txn.nonces = all +} diff --git a/x/evm/pool/tx_pool.back b/x/evm/pool/tx_pool.back new file mode 100644 index 00000000..36465b26 --- /dev/null +++ b/x/evm/pool/tx_pool.back @@ -0,0 +1,694 @@ +package pool + +import ( + "math/big" + "sync" + "sync/atomic" + "time" + + "github.com/cosmos/cosmos-sdk/client" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core" + "github.com/ethereum/go-ethereum/core/types" + "github.com/stratosnet/stratos-chain/server/config" + stratos "github.com/stratosnet/stratos-chain/types" + "github.com/stratosnet/stratos-chain/x/evm" + evmkeeper "github.com/stratosnet/stratos-chain/x/evm/keeper" + "github.com/tendermint/tendermint/libs/log" + mempl "github.com/tendermint/tendermint/mempool" +) + +const ( + // txSlotSize is used to calculate how many data slots a single transaction + // takes up based on its size. The slots are used as DoS protection, ensuring + // that validating a new transaction remains a constant operation (in reality + // O(maxslots), where max slots are 4 currently). + txSlotSize = 32 * 1024 + + // txMaxSize is the maximum size a single transaction can have. This field has + // non-trivial consequences: larger transactions are significantly harder and + // more expensive to propagate; larger transactions also take more resources + // to validate whether they fit into the pool or not. + txMaxSize = 4 * txSlotSize // 128KB +) + +var ( + evictionInterval = time.Minute // Time interval to check for evictable transactions + statsReportInterval = 8 * time.Second // Time interval to report transaction pool stats +) + +type txpoolResetRequest struct { + oldHead, newHead *types.Header +} + +type TxPool struct { + config core.TxPoolConfig + srvCfg config.Config + logger log.Logger + clientCtx client.Context + evmCtx *evm.Context + signer types.Signer + mempool mempl.Mempool + mu sync.RWMutex + + evmkeeper *evmkeeper.Keeper // Active keeper to get current state + pendingNonces *txNoncer // Pending state tracking virtual nonces + currentMaxGas uint64 // Current gas limit for transaction caps + + locals *accountSet // Set of local transaction to exempt from eviction rules + beats map[common.Address]time.Time // Last heartbeat from each known account + + pending map[common.Address]*txList // All currently processable transactions + queue map[common.Address]*txList // Queued but non-processable transactions + all *txLookup // All transactions to allow lookups + priced *txPricedList // All transactions sorted by price +} + +func NewTxPool(config core.TxPoolConfig, srvCfg config.Config, logger log.Logger, clientCtx client.Context, mempool mempl.Mempool, evmkeeper *evmkeeper.Keeper, evmCtx *evm.Context) (*TxPool, error) { + sdkCtx := evmCtx.GetSdkContext() + params := evmkeeper.GetParams(sdkCtx) + gasLimit, err := BlockMaxGasFromConsensusParams(nil) + if err != nil { + return nil, err + } + pool := &TxPool{ + config: config, + srvCfg: srvCfg, + logger: logger, + clientCtx: clientCtx, + evmCtx: evmCtx, + signer: types.LatestSignerForChainID(params.ChainConfig.ChainID.BigInt()), + mempool: mempool, + evmkeeper: evmkeeper, + currentMaxGas: uint64(gasLimit), + beats: make(map[common.Address]time.Time), + pending: make(map[common.Address]*txList), + queue: make(map[common.Address]*txList), + all: newTxLookup(), + } + pool.locals = newAccountSet(pool.signer) + pool.priced = newTxPricedList(pool.all) + pool.pendingNonces = newTxNoncer(pool.evmCtx, pool.evmkeeper) + go pool.eventLoop() + + return pool, nil +} + +func (pool *TxPool) eventLoop() { + var ( + curDone chan struct{} // non-nil while runReorg is active + nextDone = make(chan struct{}) + launchNextRun bool + reset *txpoolResetRequest + dirtyAccounts *accountSet + queuedEvents = make(map[common.Address]*txSortedMap) + prevPending, prevQueued, prevStales int + // Start the stats reporting and transaction eviction tickers + report = time.NewTicker(statsReportInterval) + evict = time.NewTicker(evictionInterval) + ) + defer report.Stop() + defer evict.Stop() + + for { + // Launch next background reorg if needed + if curDone == nil && launchNextRun { + // Run the background reorg and announcements + go pool.runReorg(nextDone, reset, dirtyAccounts, queuedEvents) + + // Prepare everything for the next round of reorg + curDone, nextDone = nextDone, make(chan struct{}) + launchNextRun = false + + reset, dirtyAccounts = nil, nil + queuedEvents = make(map[common.Address]*txSortedMap) + } + + select { + // Handle stats reporting ticks + case <-report.C: + pool.mu.RLock() + pending, queued := pool.stats() + pool.mu.RUnlock() + stales := int(atomic.LoadInt64(&pool.priced.stales)) + + if pending != prevPending || queued != prevQueued || stales != prevStales { + pool.logger.Debug("Transaction pool status report", "executable", pending, "queued", queued, "stales", stales) + prevPending, prevQueued, prevStales = pending, queued, stales + } + + // Handle inactive account transaction eviction + case <-evict.C: + pool.mu.Lock() + for addr := range pool.queue { + // Any non-locals old enough should be removed + if time.Since(pool.beats[addr]) > pool.config.Lifetime { + list := pool.queue[addr].Flatten() + for _, tx := range list { + pool.removeTx(tx.Hash(), true) + } + } + } + pool.mu.Unlock() + } + } +} + +// Get returns a transaction if it is contained in the pool and nil otherwise. +func (pool *TxPool) Get(hash common.Hash) *types.Transaction { + // TODO: Add tendermint fetching + return pool.all.Get(hash) +} + +// Has returns an indicator whether txpool has a transaction cached with the +// given hash. +func (pool *TxPool) Has(hash common.Hash) bool { + // checking first locals + if tx := pool.all.Get(hash); tx != nil { + return true + } + // attempt to db store + if tx, _ := GetTmTxByHash(hash); tx != nil { + return true + } + return false +} + +func (pool *TxPool) MinGasPrice() *big.Int { + sdkCtx := pool.evmCtx.GetSdkContext() + params := pool.evmkeeper.GetParams(sdkCtx) + minGasPrice := pool.srvCfg.GetMinGasPrices() + amt := minGasPrice.AmountOf(params.EvmDenom).TruncateInt64() + if amt == 0 { + return new(big.Int).SetInt64(stratos.DefaultGasPrice) + } + return new(big.Int).SetInt64(amt) +} + +// stats retrieves the current pool stats, namely the number of pending and the +// number of queued (non-executable) transactions. +func (pool *TxPool) stats() (int, int) { + pending := 0 + for _, list := range pool.pending { + pending += list.Len() + } + queued := 0 + for _, list := range pool.queue { + queued += list.Len() + } + return pending, queued +} + +// validateTx checks whether a transaction is valid according to the consensus +// rules and adheres to some heuristic limits of the local node (price and size). +func (pool *TxPool) validateTx(tx *types.Transaction) error { + sdkCtx := pool.evmCtx.GetSdkContext() + + // Accept only legacy transactions until EIP-2718/2930 activates. + if !tx.Protected() { + return core.ErrTxTypeNotSupported + } + // Reject access list transactions until EIP-2930 activates. + if tx.Type() == types.AccessListTxType { + return core.ErrTxTypeNotSupported + } + // Reject transactions over defined size to prevent DOS attacks + if uint64(tx.Size()) > txMaxSize { + return core.ErrOversizedData + } + // Transactions can't be negative. This may never happen using RLP decoded + // transactions but may occur if you create a transaction using the RPC. + if tx.Value().Sign() < 0 { + return core.ErrNegativeValue + } + // Ensure the transaction doesn't exceed the current block limit gas. + if pool.currentMaxGas < tx.Gas() { + return core.ErrGasLimit + } + // Sanity check for extremely large numbers + if tx.GasFeeCap().BitLen() > 256 { + return core.ErrFeeCapVeryHigh + } + if tx.GasTipCap().BitLen() > 256 { + return core.ErrTipVeryHigh + } + // Ensure gasFeeCap is greater than or equal to gasTipCap. + if tx.GasFeeCapIntCmp(tx.GasTipCap()) < 0 { + return core.ErrTipAboveFeeCap + } + // Make sure the transaction is signed properly. + from, err := types.Sender(pool.signer, tx) + if err != nil { + return core.ErrInvalidSender + } + // Ensure the transaction adheres to nonce ordering + if pool.evmkeeper.GetNonce(sdkCtx, from) > tx.Nonce() { + return core.ErrNonceTooLow + } + // Transactor should have enough funds to cover the costs + // cost == V + GP * GL + if pool.evmkeeper.GetBalance(sdkCtx, from).Cmp(tx.Cost()) < 0 { + return core.ErrInsufficientFunds + } + // Ensure the transaction has more gas than the basic tx fee. + intrGas, err := core.IntrinsicGas(tx.Data(), tx.AccessList(), tx.To() == nil, true, true) + if err != nil { + return err + } + if tx.Gas() < intrGas { + return core.ErrIntrinsicGas + } + return nil +} + +func (pool *TxPool) Add(tx *types.Transaction) (replaced bool, err error) { + pool.mu.Lock() + defer pool.mu.Unlock() + + hash := tx.Hash() + + if pool.Has(hash) { + pool.logger.Debug("Discarding already known transaction", "hash", hash) + return false, core.ErrAlreadyKnown + } + err = pool.validateTx(tx) + if err != nil { + return false, err + } + + // If the transaction pool is full, discard underpriced transactions + if uint64(pool.all.Slots()+numSlots(tx)) > pool.config.GlobalSlots+pool.config.GlobalQueue { + // New transaction is better than our worse ones, make room for it. + // If it's a local transaction, forcibly discard all available transactions. + // Otherwise if we can't make enough room for new one, abort the operation. + drop, _ := pool.priced.Discard(pool.all.Slots()-int(pool.config.GlobalSlots+pool.config.GlobalQueue)+numSlots(tx), true) + + // Kick out the underpriced remote transactions. + for _, tx := range drop { + pool.logger.Debug("Discarding freshly underpriced transaction", "hash", tx.Hash(), "gasTipCap", tx.GasTipCap(), "gasFeeCap", tx.GasFeeCap()) + pool.removeTx(tx.Hash(), false) + } + } + + // Try to replace an existing transaction in the pending pool + from, _ := types.Sender(pool.signer, tx) // already validated + if list := pool.pending[from]; list != nil && list.Overlaps(tx) { + // Nonce already pending, check if required price bump is met + inserted, old := list.Add(tx, pool.config.PriceBump) + if !inserted { + return false, core.ErrReplaceUnderpriced + } + // New transaction is better, replace old one + if old != nil { + pool.all.Remove(old.Hash()) + pool.priced.Removed(1) + } + pool.all.Add(tx, true) + pool.priced.Put(tx, true) + pool.logger.Debug("Pooled new executable transaction", "hash", hash, "from", from, "to", tx.To()) + + // Successful promotion, bump the heartbeat + pool.beats[from] = time.Now() + return old != nil, nil + } + + // New transaction isn't replacing a pending one, push into queue + replaced, err = pool.enqueueTx(hash, tx, true, true) + if err != nil { + return false, err + } + + // Mark local addresses and journal local transactions + if !pool.locals.contains(from) { + pool.logger.Info("Setting new local account", "address", from) + pool.locals.add(from) + } + + pool.logger.Info("Pooled new future transaction", "hash", hash, "from", from, "to", tx.To()) + return replaced, nil +} + +// enqueueTx inserts a new transaction into the non-executable transaction queue. +// +// Note, this method assumes the pool lock is held! +func (pool *TxPool) enqueueTx(hash common.Hash, tx *types.Transaction, local bool, addAll bool) (bool, error) { + // Try to insert the transaction into the future queue + from, _ := types.Sender(pool.signer, tx) // already validated + if pool.queue[from] == nil { + pool.queue[from] = newTxList(false) + } + inserted, old := pool.queue[from].Add(tx, pool.config.PriceBump) + if !inserted { + // An older transaction was better, discard this + return false, core.ErrReplaceUnderpriced + } + // Discard any previous transaction and mark this + if old != nil { + pool.all.Remove(old.Hash()) + pool.priced.Removed(1) + } + // If the transaction isn't in lookup set but it's expected to be there, + // show the error log. + if pool.all.Get(hash) == nil && !addAll { + pool.logger.Error("Missing transaction in lookup set, please report the issue", "hash", hash) + } + if addAll { + pool.all.Add(tx, local) + pool.priced.Put(tx, local) + } + // If we never record the heartbeat, do it right now. + if _, exist := pool.beats[from]; !exist { + pool.beats[from] = time.Now() + } + return old != nil, nil +} + +// removeTx removes a single transaction from the queue, moving all subsequent +// transactions back to the future queue. +func (pool *TxPool) removeTx(hash common.Hash, outofbound bool) { + // Fetch the transaction we wish to delete + tx := pool.all.Get(hash) + if tx == nil { + return + } + addr, _ := types.Sender(pool.signer, tx) // already validated during insertion + + // Remove it from the list of known transactions + pool.all.Remove(hash) + if outofbound { + pool.priced.Removed(1) + } + // Remove the transaction from the pending lists and reset the account nonce + if pending := pool.pending[addr]; pending != nil { + if removed, invalids := pending.Remove(tx); removed { + // If no more pending transactions are left, remove the list + if pending.Empty() { + delete(pool.pending, addr) + } + // Postpone any invalidated transactions + for _, tx := range invalids { + // Internal shuffle shouldn't touch the lookup set. + pool.enqueueTx(tx.Hash(), tx, false, false) + } + // Update the account nonce if needed + pool.pendingNonces.setIfLower(addr, tx.Nonce()) + return + } + } + // Transaction is in the future queue + if future := pool.queue[addr]; future != nil { + future.Remove(tx) + if future.Empty() { + delete(pool.queue, addr) + delete(pool.beats, addr) + } + } +} + +// promoteTx adds a transaction to the pending (processable) list of transactions +// and returns whether it was inserted or an older was better. +// +// Note, this method assumes the pool lock is held! +func (pool *TxPool) promoteTx(addr common.Address, hash common.Hash, tx *types.Transaction) bool { + // Try to insert the transaction into the pending queue + if pool.pending[addr] == nil { + pool.pending[addr] = newTxList(true) + } + list := pool.pending[addr] + + inserted, old := list.Add(tx, pool.config.PriceBump) + if !inserted { + // An older transaction was better, discard this + pool.all.Remove(hash) + pool.priced.Removed(1) + return false + } + // Otherwise discard any previous transaction and mark this + if old != nil { + pool.all.Remove(old.Hash()) + pool.priced.Removed(1) + } + // Set the potentially new pending nonce and notify any subsystems of the new tx + pool.pendingNonces.set(addr, tx.Nonce()+1) + + // Successful promotion, bump the heartbeat + pool.beats[addr] = time.Now() + return true +} + +// addressByHeartbeat is an account address tagged with its last activity timestamp. +type addressByHeartbeat struct { + address common.Address + heartbeat time.Time +} + +type addressesByHeartbeat []addressByHeartbeat + +func (a addressesByHeartbeat) Len() int { return len(a) } +func (a addressesByHeartbeat) Less(i, j int) bool { return a[i].heartbeat.Before(a[j].heartbeat) } +func (a addressesByHeartbeat) Swap(i, j int) { a[i], a[j] = a[j], a[i] } + +// accountSet is simply a set of addresses to check for existence, and a signer +// capable of deriving addresses from transactions. +type accountSet struct { + accounts map[common.Address]struct{} + signer types.Signer + cache *[]common.Address +} + +// newAccountSet creates a new address set with an associated signer for sender +// derivations. +func newAccountSet(signer types.Signer, addrs ...common.Address) *accountSet { + as := &accountSet{ + accounts: make(map[common.Address]struct{}), + signer: signer, + } + for _, addr := range addrs { + as.add(addr) + } + return as +} + +// contains checks if a given address is contained within the set. +func (as *accountSet) contains(addr common.Address) bool { + _, exist := as.accounts[addr] + return exist +} + +// containsTx checks if the sender of a given tx is within the set. If the sender +// cannot be derived, this method returns false. +func (as *accountSet) containsTx(tx *types.Transaction) bool { + if addr, err := types.Sender(as.signer, tx); err == nil { + return as.contains(addr) + } + return false +} + +// add inserts a new address into the set to track. +func (as *accountSet) add(addr common.Address) { + as.accounts[addr] = struct{}{} + as.cache = nil +} + +// addTx adds the sender of tx into the set. +func (as *accountSet) addTx(tx *types.Transaction) { + if addr, err := types.Sender(as.signer, tx); err == nil { + as.add(addr) + } +} + +// flatten returns the list of addresses within this set, also caching it for later +// reuse. The returned slice should not be changed! +func (as *accountSet) flatten() []common.Address { + if as.cache == nil { + accounts := make([]common.Address, 0, len(as.accounts)) + for account := range as.accounts { + accounts = append(accounts, account) + } + as.cache = &accounts + } + return *as.cache +} + +// merge adds all addresses from the 'other' set into 'as'. +func (as *accountSet) merge(other *accountSet) { + for addr := range other.accounts { + as.accounts[addr] = struct{}{} + } + as.cache = nil +} + +// txLookup is used internally by TxPool to track transactions while allowing +// lookup without mutex contention. +// +// Note, although this type is properly protected against concurrent access, it +// is **not** a type that should ever be mutated or even exposed outside of the +// transaction pool, since its internal state is tightly coupled with the pools +// internal mechanisms. The sole purpose of the type is to permit out-of-bound +// peeking into the pool in TxPool.Get without having to acquire the widely scoped +// TxPool.mu mutex. +// +// This lookup set combines the notion of "local transactions", which is useful +// to build upper-level structure. +type txLookup struct { + slots int + lock sync.RWMutex + locals map[common.Hash]*types.Transaction + remotes map[common.Hash]*types.Transaction +} + +// newTxLookup returns a new txLookup structure. +func newTxLookup() *txLookup { + return &txLookup{ + locals: make(map[common.Hash]*types.Transaction), + remotes: make(map[common.Hash]*types.Transaction), + } +} + +// Range calls f on each key and value present in the map. The callback passed +// should return the indicator whether the iteration needs to be continued. +// Callers need to specify which set (or both) to be iterated. +func (t *txLookup) Range(f func(hash common.Hash, tx *types.Transaction, local bool) bool, local bool, remote bool) { + t.lock.RLock() + defer t.lock.RUnlock() + + if local { + for key, value := range t.locals { + if !f(key, value, true) { + return + } + } + } + if remote { + for key, value := range t.remotes { + if !f(key, value, false) { + return + } + } + } +} + +// Get returns a transaction if it exists in the lookup, or nil if not found. +func (t *txLookup) Get(hash common.Hash) *types.Transaction { + t.lock.RLock() + defer t.lock.RUnlock() + + if tx := t.locals[hash]; tx != nil { + return tx + } + return t.remotes[hash] +} + +// GetLocal returns a transaction if it exists in the lookup, or nil if not found. +func (t *txLookup) GetLocal(hash common.Hash) *types.Transaction { + t.lock.RLock() + defer t.lock.RUnlock() + + return t.locals[hash] +} + +// GetRemote returns a transaction if it exists in the lookup, or nil if not found. +func (t *txLookup) GetRemote(hash common.Hash) *types.Transaction { + t.lock.RLock() + defer t.lock.RUnlock() + + return t.remotes[hash] +} + +// Count returns the current number of transactions in the lookup. +func (t *txLookup) Count() int { + t.lock.RLock() + defer t.lock.RUnlock() + + return len(t.locals) + len(t.remotes) +} + +// LocalCount returns the current number of local transactions in the lookup. +func (t *txLookup) LocalCount() int { + t.lock.RLock() + defer t.lock.RUnlock() + + return len(t.locals) +} + +// RemoteCount returns the current number of remote transactions in the lookup. +func (t *txLookup) RemoteCount() int { + t.lock.RLock() + defer t.lock.RUnlock() + + return len(t.remotes) +} + +// Slots returns the current number of slots used in the lookup. +func (t *txLookup) Slots() int { + t.lock.RLock() + defer t.lock.RUnlock() + + return t.slots +} + +// Add adds a transaction to the lookup. +func (t *txLookup) Add(tx *types.Transaction, local bool) { + t.lock.Lock() + defer t.lock.Unlock() + + t.slots += numSlots(tx) + + if local { + t.locals[tx.Hash()] = tx + } else { + t.remotes[tx.Hash()] = tx + } +} + +// Remove removes a transaction from the lookup. +func (t *txLookup) Remove(hash common.Hash) { + t.lock.Lock() + defer t.lock.Unlock() + + tx, ok := t.locals[hash] + if !ok { + tx, ok = t.remotes[hash] + } + if !ok { + return + } + t.slots -= numSlots(tx) + + delete(t.locals, hash) + delete(t.remotes, hash) +} + +// RemoteToLocals migrates the transactions belongs to the given locals to locals +// set. The assumption is held the locals set is thread-safe to be used. +func (t *txLookup) RemoteToLocals(locals *accountSet) int { + t.lock.Lock() + defer t.lock.Unlock() + + var migrated int + for hash, tx := range t.remotes { + if locals.containsTx(tx) { + t.locals[hash] = tx + delete(t.remotes, hash) + migrated += 1 + } + } + return migrated +} + +// RemotesBelowTip finds all remote transactions below the given tip threshold. +func (t *txLookup) RemotesBelowTip(threshold *big.Int) types.Transactions { + found := make(types.Transactions, 0, 128) + t.Range(func(hash common.Hash, tx *types.Transaction, local bool) bool { + if tx.GasTipCapIntCmp(threshold) < 0 { + found = append(found, tx) + } + return true + }, false, true) // Only iterate remotes + return found +} + +// numSlots calculates the number of slots needed for a single transaction. +func numSlots(tx *types.Transaction) int { + return int((tx.Size() + txSlotSize - 1) / txSlotSize) +} diff --git a/x/evm/pool/tx_pool.go b/x/evm/pool/tx_pool.go new file mode 100644 index 00000000..5d81a9a5 --- /dev/null +++ b/x/evm/pool/tx_pool.go @@ -0,0 +1,605 @@ +package pool + +import ( + "math/big" + "sync" + "time" + + "github.com/cosmos/cosmos-sdk/client" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core" + "github.com/ethereum/go-ethereum/core/types" + "github.com/stratosnet/stratos-chain/server/config" + stratos "github.com/stratosnet/stratos-chain/types" + "github.com/stratosnet/stratos-chain/x/evm" + evmkeeper "github.com/stratosnet/stratos-chain/x/evm/keeper" + evmtypes "github.com/stratosnet/stratos-chain/x/evm/types" + abci "github.com/tendermint/tendermint/abci/types" + "github.com/tendermint/tendermint/libs/log" + mempl "github.com/tendermint/tendermint/mempool" +) + +const ( + // txSlotSize is used to calculate how many data slots a single transaction + // takes up based on its size. The slots are used as DoS protection, ensuring + // that validating a new transaction remains a constant operation (in reality + // O(maxslots), where max slots are 4 currently). + txSlotSize = 32 * 1024 + + // txMaxSize is the maximum size a single transaction can have. This field has + // non-trivial consequences: larger transactions are significantly harder and + // more expensive to propagate; larger transactions also take more resources + // to validate whether they fit into the pool or not. + txMaxSize = 4 * txSlotSize // 128KB +) + +var ( + evictionInterval = time.Minute // Time interval to check for evictable transactions + statsReportInterval = 8 * time.Second // Time interval to report transaction pool stats + processQueueInterval = 5 * time.Second // Time interval to process queue transactions in case if their ready and move to pending stage + processPendingInterval = 5 * time.Second // Time interval of pending tx broadcating to a tm mempool +) + +type txpoolResetRequest struct { + oldHead, newHead *types.Header +} + +type TxPool struct { + config core.TxPoolConfig + srvCfg config.Config + logger log.Logger + clientCtx client.Context + evmCtx *evm.Context + signer types.Signer + mempool mempl.Mempool + mu sync.RWMutex + + evmkeeper *evmkeeper.Keeper // Active keeper to get current state + pendingNonces *txNoncer // Pending state tracking virtual nonces + currentMaxGas uint64 // Current gas limit for transaction caps + + beats map[common.Address]time.Time // Last heartbeat from each known account + + pending map[common.Address]*txList // All currently processable transactions + queue map[common.Address]*txList // Queued but non-processable transactions + all *txLookup // All transactions to allow lookups +} + +func NewTxPool(config core.TxPoolConfig, srvCfg config.Config, logger log.Logger, clientCtx client.Context, mempool mempl.Mempool, evmkeeper *evmkeeper.Keeper, evmCtx *evm.Context) (*TxPool, error) { + sdkCtx := evmCtx.GetSdkContext() + params := evmkeeper.GetParams(sdkCtx) + gasLimit, err := BlockMaxGasFromConsensusParams(nil) + if err != nil { + return nil, err + } + pool := &TxPool{ + config: config, + srvCfg: srvCfg, + logger: logger, + clientCtx: clientCtx, + evmCtx: evmCtx, + signer: types.LatestSignerForChainID(params.ChainConfig.ChainID.BigInt()), + mempool: mempool, + evmkeeper: evmkeeper, + currentMaxGas: uint64(gasLimit), + beats: make(map[common.Address]time.Time), + pending: make(map[common.Address]*txList), + queue: make(map[common.Address]*txList), + all: newTxLookup(), + } + pool.pendingNonces = newTxNoncer(pool.evmCtx, pool.evmkeeper) + go pool.eventLoop() + + return pool, nil +} + +func (pool *TxPool) eventLoop() { + var ( + prevPending, prevQueued int + // Start the stats reporting and transaction eviction tickers + report = time.NewTicker(statsReportInterval) + evict = time.NewTicker(evictionInterval) + processQueue = time.NewTicker(processQueueInterval) + processPending = time.NewTicker(processPendingInterval) + ) + defer report.Stop() + defer evict.Stop() + defer processQueue.Stop() + + for { + select { + // Handle stats reporting ticks + case <-report.C: + pool.mu.RLock() + pending, queued := pool.stats() + pool.mu.RUnlock() + + if pending != prevPending || queued != prevQueued { + pool.logger.Error("Transaction pool status report", "executable", pending, "queued", queued) + prevPending, prevQueued = pending, queued + } + + // Handle inactive account transaction eviction + case <-evict.C: + pool.mu.Lock() + for addr := range pool.queue { + // Any non-locals old enough should be removed + if time.Since(pool.beats[addr]) > pool.config.Lifetime { + list := pool.queue[addr].Flatten() + for _, tx := range list { + pool.removeTx(tx.Hash()) + } + } + } + pool.mu.Unlock() + + case <-processQueue.C: + pool.mu.Lock() + pool.processQueue() + pool.mu.Unlock() + + case <-processPending.C: + pool.mu.Lock() + pool.processPending() + pool.mu.Unlock() + } + } +} + +// Get returns a transaction if it is contained in the pool and nil otherwise. +func (pool *TxPool) Get(hash common.Hash) *types.Transaction { + return pool.all.Get(hash) +} + +// Has returns an indicator whether txpool has a transaction cached with the +// given hash. +func (pool *TxPool) Has(hash common.Hash) bool { + // checking first locals + if tx := pool.all.Get(hash); tx != nil { + return true + } + // attempt to db store + if tx, _ := GetTmTxByHash(hash); tx != nil { + return true + } + return false +} + +func (pool *TxPool) MinGasPrice() *big.Int { + sdkCtx := pool.evmCtx.GetSdkContext() + params := pool.evmkeeper.GetParams(sdkCtx) + minGasPrice := pool.srvCfg.GetMinGasPrices() + amt := minGasPrice.AmountOf(params.EvmDenom).TruncateInt64() + if amt == 0 { + return new(big.Int).SetInt64(stratos.DefaultGasPrice) + } + return new(big.Int).SetInt64(amt) +} + +// stats retrieves the current pool stats, namely the number of pending and the +// number of queued (non-executable) transactions. +func (pool *TxPool) stats() (int, int) { + pending := 0 + for _, list := range pool.pending { + pending += list.Len() + } + queued := 0 + for _, list := range pool.queue { + queued += list.Len() + } + return pending, queued +} + +// validateTx checks whether a transaction is valid according to the consensus +// rules and adheres to some heuristic limits of the local node (price and size). +func (pool *TxPool) validateTx(tx *types.Transaction) error { + pool.logger.Error("Validating tx", "hash", tx.Hash()) + sdkCtx := pool.evmCtx.GetSdkContext() + + // Accept only legacy transactions until EIP-2718/2930 activates. + if !tx.Protected() { + return core.ErrTxTypeNotSupported + } + // Reject access list transactions until EIP-2930 activates. + if tx.Type() == types.AccessListTxType { + return core.ErrTxTypeNotSupported + } + // Reject transactions over defined size to prevent DOS attacks + if uint64(tx.Size()) > txMaxSize { + return core.ErrOversizedData + } + // Transactions can't be negative. This may never happen using RLP decoded + // transactions but may occur if you create a transaction using the RPC. + if tx.Value().Sign() < 0 { + return core.ErrNegativeValue + } + // Ensure the transaction doesn't exceed the current block limit gas. + if pool.currentMaxGas < tx.Gas() { + return core.ErrGasLimit + } + // Sanity check for extremely large numbers + if tx.GasFeeCap().BitLen() > 256 { + return core.ErrFeeCapVeryHigh + } + if tx.GasTipCap().BitLen() > 256 { + return core.ErrTipVeryHigh + } + // Ensure gasFeeCap is greater than or equal to gasTipCap. + if tx.GasFeeCapIntCmp(tx.GasTipCap()) < 0 { + return core.ErrTipAboveFeeCap + } + // Make sure the transaction is signed properly. + from, err := types.Sender(pool.signer, tx) + if err != nil { + return core.ErrInvalidSender + } + // Ensure the transaction adheres to nonce ordering + if pool.evmkeeper.GetNonce(sdkCtx, from) > tx.Nonce() { + return core.ErrNonceTooLow + } + // Transactor should have enough funds to cover the costs + // cost == V + GP * GL + if pool.evmkeeper.GetBalance(sdkCtx, from).Cmp(tx.Cost()) < 0 { + return core.ErrInsufficientFunds + } + // Ensure the transaction has more gas than the basic tx fee. + intrGas, err := core.IntrinsicGas(tx.Data(), tx.AccessList(), tx.To() == nil, true, true) + if err != nil { + return err + } + if tx.Gas() < intrGas { + return core.ErrIntrinsicGas + } + return nil +} + +func (pool *TxPool) broadcast(tx *types.Transaction) error { + pool.logger.Error("Preparing to broadcast tx", "hash", tx.Hash()) + ethereumTx := &evmtypes.MsgEthereumTx{} + if err := ethereumTx.FromEthereumTx(tx); err != nil { + pool.logger.Error("transaction converting failed", "error", err.Error()) + return err + } + + params := pool.evmkeeper.GetParams(pool.evmCtx.GetSdkContext()) + cosmosTx, err := ethereumTx.BuildTx(pool.clientCtx.TxConfig.NewTxBuilder(), params.EvmDenom) + if err != nil { + pool.logger.Error("failed to build cosmos tx", "error", err.Error()) + return err + } + + // Encode transaction by default Tx encoder + packet, err := pool.clientCtx.TxConfig.TxEncoder()(cosmosTx) + if err != nil { + pool.logger.Error("failed to encode eth tx using default encoder", "error", err.Error()) + return err + } + + done := make(chan struct{}, 1) + err = pool.mempool.CheckTx(packet, func(res *abci.Response) { + done <- struct{}{} + }, mempl.TxInfo{}) + if err != nil { + pool.logger.Error("failed to send eth tx packet to mempool", "error", err.Error()) + return err + } + <-done // to be sure that checkTx executed, so we could clear tx from pending and all + return nil +} + +func (pool *TxPool) Add(tx *types.Transaction) (replaced bool, err error) { + pool.mu.Lock() + defer pool.mu.Unlock() + + hash := tx.Hash() + + if pool.Has(hash) { + pool.logger.Error("Discarding already known transaction", "hash", hash) + return false, core.ErrAlreadyKnown + } + err = pool.validateTx(tx) + if err != nil { + return false, err + } + from, _ := types.Sender(pool.signer, tx) // already validated + if list := pool.pending[from]; list != nil && list.Overlaps(tx) { + pool.logger.Error("Tx overlap: ", tx.Hash()) + // Nonce already pending, check if required price bump is met + inserted, old := list.Add(tx, pool.config.PriceBump) + if !inserted { + return false, core.ErrReplaceUnderpriced + } + // New transaction is better, replace old one + if old != nil { + pool.all.Remove(old.Hash()) + } + pool.all.Add(tx) + // Successful promotion, bump the heartbeat + pool.beats[from] = time.Now() + return old != nil, nil + } + + return pool.enqueueTx(tx, true) +} + +// enqueueTx inserts a new transaction into the non-executable transaction queue. +// +// Note, this method assumes the pool lock is held! +func (pool *TxPool) enqueueTx(tx *types.Transaction, addAll bool) (bool, error) { + pool.logger.Error("Tx enqeue: ", tx.Hash()) + from, _ := types.Sender(pool.signer, tx) // already validated + if pool.queue[from] == nil { + pool.queue[from] = newTxList(false) + } + inserted, old := pool.queue[from].Add(tx, pool.config.PriceBump) + if !inserted { + // An older transaction was better, discard this + return false, core.ErrReplaceUnderpriced + } + if addAll { + pool.all.Add(tx) + } + // If we never record the heartbeat, do it right now. + if _, exist := pool.beats[from]; !exist { + pool.beats[from] = time.Now() + } + + return old != nil, nil +} + +// removeTx removes a single transaction from the queue, moving all subsequent +// transactions back to the future queue. +func (pool *TxPool) removeTx(hash common.Hash) { + pool.logger.Error("Tx remove: ", hash) + // Fetch the transaction we wish to delete + tx := pool.Get(hash) + if tx == nil { + return + } + addr, _ := types.Sender(pool.signer, tx) // already validated during insertion + + // Remove it from the list of known transactions + pool.all.Remove(hash) + // Remove the transaction from the pending lists and reset the account nonce + if pending := pool.pending[addr]; pending != nil { + if removed, invalids := pending.Remove(tx); removed { + // If no more pending transactions are left, remove the list + if pending.Empty() { + delete(pool.pending, addr) + } + // Postpone any invalidated transactions + for _, tx := range invalids { + // Internal shuffle shouldn't touch the lookup set. + pool.enqueueTx(tx, false) + } + // Update the account nonce if needed + pool.pendingNonces.setIfLower(addr, tx.Nonce()) + return + } + } + // Transaction is in the future queue + if future := pool.queue[addr]; future != nil { + future.Remove(tx) + if future.Empty() { + delete(pool.queue, addr) + delete(pool.beats, addr) + } + } +} + +func (pool *TxPool) processQueue() error { + promoteAddrs := make([]common.Address, 0, len(pool.queue)) + for addr := range pool.queue { + promoteAddrs = append(promoteAddrs, addr) + } + pool.promoteExecutables(promoteAddrs) + pool.demoteUnexecutables() + + // Update all accounts to the latest known pending nonce + nonces := make(map[common.Address]uint64, len(pool.pending)) + for addr, list := range pool.pending { + highestPending := list.LastElement() + nonces[addr] = highestPending.Nonce() + 1 + } + pool.pendingNonces.setAll(nonces) + pool.truncatePending() + pool.truncateQueue() + return nil +} + +func (pool *TxPool) processPending() error { + runnerAddrs := make([]common.Address, 0, len(pool.pending)) + for addr := range pool.pending { + runnerAddrs = append(runnerAddrs, addr) + } + + for _, addr := range runnerAddrs { + list := pool.pending[addr] + if list == nil { + continue // Just in case someone calls with a non existing account + } + readies := list.Ready(pool.pendingNonces.get(addr)) + for _, tx := range readies { + if err := pool.broadcast(tx); err != nil { + pool.all.Remove(tx.Hash()) + } + } + pool.logger.Error("Processes pending transactions", "count", len(readies)) + + if list.Empty() { + delete(pool.pending, addr) + } + } + + return nil +} + +// promoteExecutables moves transactions that have become processable from the +// future queue to the set of pending transactions. During this process, all +// invalidated transactions (low nonce, low balance) are deleted. +func (pool *TxPool) promoteExecutables(accounts []common.Address) []*types.Transaction { + // Track the promoted transactions to broadcast them at once + var promoted []*types.Transaction + + sdkCtx := pool.evmCtx.GetSdkContext() + + // Iterate over all accounts and promote any executable transactions + for _, addr := range accounts { + list := pool.queue[addr] + if list == nil { + continue // Just in case someone calls with a non existing account + } + // Drop all transactions that are deemed too old (low nonce) + forwards := list.Forward(pool.evmkeeper.GetNonce(sdkCtx, addr)) + for _, tx := range forwards { + hash := tx.Hash() + pool.all.Remove(hash) + } + pool.logger.Error("Removed old queued transactions", "count", len(forwards)) + // Drop all transactions that are too costly (low balance or out of gas) + drops, _ := list.Filter(pool.evmkeeper.GetBalance(sdkCtx, addr), pool.currentMaxGas) + for _, tx := range drops { + hash := tx.Hash() + pool.all.Remove(hash) + } + pool.logger.Error("Removed unpayable queued transactions", "count", len(drops)) + + // Gather all executable transactions and promote them + readies := list.Ready(pool.pendingNonces.get(addr)) + for _, tx := range readies { + if pool.promoteTx(addr, tx) { + promoted = append(promoted, tx) + } + } + pool.logger.Error("Promoted queued transactions", "count", len(promoted)) + + // TODO: Figure out what to do with this + // // Drop all transactions over the allowed limit + // var caps types.Transactions + // if !pool.locals.contains(addr) { + // caps = list.Cap(int(pool.config.AccountQueue)) + // for _, tx := range caps { + // hash := tx.Hash() + // pool.all.Remove(hash) + // pool.logger.Error("Removed cap-exceeding queued transaction", "hash", hash) + // } + // } + // Delete the entire queue entry if it became empty. + if list.Empty() { + delete(pool.queue, addr) + delete(pool.beats, addr) + } + } + return promoted +} + +// demoteUnexecutables removes invalid and processed transactions from the pools +// executable/pending queue and any subsequent transactions that become unexecutable +// are moved back into the future queue. +// +// Note: transactions are not marked as removed in the priced list because re-heaping +// is always explicitly triggered by SetBaseFee and it would be unnecessary and wasteful +// to trigger a re-heap is this function +func (pool *TxPool) demoteUnexecutables() { + sdkCtx := pool.evmCtx.GetSdkContext() + // Iterate over all accounts and demote any non-executable transactions + for addr, list := range pool.pending { + nonce := pool.evmkeeper.GetNonce(sdkCtx, addr) + + // Drop all transactions that are deemed too old (low nonce) + olds := list.Forward(nonce) + for _, tx := range olds { + hash := tx.Hash() + pool.all.Remove(hash) + pool.logger.Error("Removed old pending transaction", "hash", hash) + } + // Drop all transactions that are too costly (low balance or out of gas), and queue any invalids back for later + drops, invalids := list.Filter(pool.evmkeeper.GetBalance(sdkCtx, addr), pool.currentMaxGas) + for _, tx := range drops { + hash := tx.Hash() + pool.logger.Error("Removed unpayable pending transaction", "hash", hash) + pool.all.Remove(hash) + } + + for _, tx := range invalids { + hash := tx.Hash() + pool.logger.Error("Demoting pending transaction", "hash", hash) + + // Internal shuffle shouldn't touch the lookup set. + pool.enqueueTx(tx, false) + } + // If there's a gap in front, alert (should never happen) and postpone all transactions + if list.Len() > 0 && list.txs.Get(nonce) == nil { + gapped := list.Cap(0) + for _, tx := range gapped { + hash := tx.Hash() + pool.logger.Error("Demoting invalidated transaction", "hash", hash) + + // Internal shuffle shouldn't touch the lookup set. + pool.enqueueTx(tx, false) + } + } + // Delete the entire pending entry if it became empty. + if list.Empty() { + delete(pool.pending, addr) + } + } +} + +// promoteTx adds a transaction to the pending (processable) list of transactions +// and returns whether it was inserted or an older was better. +// +// Note, this method assumes the pool lock is held! +func (pool *TxPool) promoteTx(addr common.Address, tx *types.Transaction) bool { + pool.logger.Error("Preparing to promote tx", "hash", tx.Hash()) + // Try to insert the transaction into the pending queue + if pool.pending[addr] == nil { + pool.pending[addr] = newTxList(true) + } + list := pool.pending[addr] + + inserted, old := list.Add(tx, pool.config.PriceBump) + if !inserted { + // An older transaction was better, discard this + pool.all.Remove(tx.Hash()) + return false + } + // Otherwise discard any previous transaction and mark this + if old != nil { + pool.all.Remove(old.Hash()) + } + // Set the potentially new pending nonce and notify any subsystems of the new tx + pool.pendingNonces.set(addr, tx.Nonce()+1) + + // Successful promotion, bump the heartbeat + pool.beats[addr] = time.Now() + return true +} + +// truncatePending removes transactions from the pending queue if the pool is above the +// pending limit. The algorithm tries to reduce transaction counts by an approximately +// equal number for all for accounts with many pending transactions. +func (pool *TxPool) truncatePending() { + pending := uint64(0) + for _, list := range pool.pending { + pending += uint64(list.Len()) + } + if pending <= pool.config.GlobalSlots { + return + } + // TODO: Add spammer check mechanics + return +} + +// truncateQueue drops the oldest transactions in the queue if the pool is above the global queue limit. +func (pool *TxPool) truncateQueue() { + queued := uint64(0) + for _, list := range pool.queue { + queued += uint64(list.Len()) + } + if queued <= pool.config.GlobalQueue { + return + } + // TODO: Implement + return +} diff --git a/x/evm/pool/utils.go b/x/evm/pool/utils.go new file mode 100644 index 00000000..8443aff8 --- /dev/null +++ b/x/evm/pool/utils.go @@ -0,0 +1,46 @@ +package pool + +import ( + "fmt" + + "github.com/ethereum/go-ethereum/common" + "github.com/pkg/errors" + "github.com/stratosnet/stratos-chain/x/evm/types" + tmrpccore "github.com/tendermint/tendermint/rpc/core" + tmrpctypes "github.com/tendermint/tendermint/rpc/core/types" + tmjsonrpctypes "github.com/tendermint/tendermint/rpc/jsonrpc/types" +) + +func GetTmTxByHash(hash common.Hash) (*tmrpctypes.ResultTx, error) { + resTx, err := tmrpccore.Tx(nil, hash.Bytes(), false) + if err != nil { + query := fmt.Sprintf("%s.%s='%s'", types.TypeMsgEthereumTx, types.AttributeKeyEthereumTxHash, hash.Hex()) + resTxs, err := tmrpccore.TxSearch(new(tmjsonrpctypes.Context), query, false, nil, nil, "") + if err != nil { + return nil, err + } + if len(resTxs.Txs) == 0 { + return nil, errors.Errorf("ethereum tx not found for hash %s", hash.Hex()) + } + return resTxs.Txs[0], nil + } + return resTx, nil +} + +// BlockMaxGasFromConsensusParams returns the gas limit for the current block from the chain consensus params. +func BlockMaxGasFromConsensusParams(blockHeight *int64) (int64, error) { + resConsParams, err := tmrpccore.ConsensusParams(nil, blockHeight) + if err != nil { + return int64(^uint32(0)), err + } + + gasLimit := resConsParams.ConsensusParams.Block.MaxGas + if gasLimit == -1 { + // Sets gas limit to max uint32 to not error with javascript dev tooling + // This -1 value indicating no block gas limit is set to max uint64 with geth hexutils + // which errors certain javascript dev tooling which only supports up to 53 bits + gasLimit = int64(^uint32(0)) + } + + return gasLimit, nil +} From 5c93abeef201153562afad8eeda7f8661902b942 Mon Sep 17 00:00:00 2001 From: xiong Date: Thu, 16 Feb 2023 09:35:40 -0800 Subject: [PATCH 11/95] Force to build with go1.19 --- cmd/stchaind/main.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cmd/stchaind/main.go b/cmd/stchaind/main.go index 220f9e2b..0cd1a5a3 100644 --- a/cmd/stchaind/main.go +++ b/cmd/stchaind/main.go @@ -1,6 +1,7 @@ package main import ( + "go/doc/comment" "os" "github.com/cosmos/cosmos-sdk/server" @@ -11,6 +12,12 @@ import ( stratos "github.com/stratosnet/stratos-chain/types" ) +var ( + // Force to build with go1.19, because sorting algorithm has been rewritten since go1.19 + // The order of sorted results will be different between go1.18 & go1.19 if the values of the compared elements are equal + doc comment.Doc +) + func main() { registerDenoms() From 6e2bf3633c6deb5868ffd8b33d52e6f3b30a0568 Mon Sep 17 00:00:00 2001 From: xiong Date: Thu, 16 Feb 2023 09:47:58 -0800 Subject: [PATCH 12/95] update go.mod --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 9d31e1cb..83dfa825 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/stratosnet/stratos-chain -go 1.18 +go 1.19 require ( github.com/btcsuite/btcd v0.23.4 From 47d122fca4fab5d794732d168c929de4fd1249a7 Mon Sep 17 00:00:00 2001 From: jialbai Date: Fri, 17 Feb 2023 13:40:37 -0500 Subject: [PATCH 13/95] - qb1269: add new tx UpdateEffectiveStake (also work for unsuspending pp) --- x/pot/types/msg.go | 3 +-- x/register/client/rest/tx.go | 2 +- x/register/keeper/msg_server.go | 4 ++-- x/register/keeper/resource_node.go | 2 +- x/register/types/events.go | 1 + 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/x/pot/types/msg.go b/x/pot/types/msg.go index 71cdf0d6..f1957636 100644 --- a/x/pot/types/msg.go +++ b/x/pot/types/msg.go @@ -255,8 +255,7 @@ func (msg MsgFoundationDeposit) ValidateBasic() error { } func NewMsgSlashingResourceNode(reporters []stratos.SdsAddress, reporterOwner []sdk.AccAddress, - networkAddress stratos.SdsAddress, walletAddress sdk.AccAddress, slashing sdk.Int, suspend bool, - newEffectiveStake sdk.Int) *MsgSlashingResourceNode { + networkAddress stratos.SdsAddress, walletAddress sdk.AccAddress, slashing sdk.Int, suspend bool) *MsgSlashingResourceNode { reporterStrSlice := make([]string, 0) for _, reporter := range reporters { diff --git a/x/register/client/rest/tx.go b/x/register/client/rest/tx.go index 60d77b51..2292a1ce 100644 --- a/x/register/client/rest/tx.go +++ b/x/register/client/rest/tx.go @@ -388,7 +388,7 @@ func postUpdateEffectiveStakeHandlerFn(cliCtx client.Context) http.HandlerFunc { return } - msg := types.NewMsgUpdateEffectiveStake(req.Reporters, req.ReporterOwner, networkAddr, req.EffectiveTokens, req.InitialTier, req.OngoingTier) + msg := types.NewMsgUpdateEffectiveStake(req.Reporters, req.ReporterOwner, networkAddr, req.EffectiveTokens) if err := msg.ValidateBasic(); err != nil { rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) return diff --git a/x/register/keeper/msg_server.go b/x/register/keeper/msg_server.go index 7b31e730..2503c59d 100644 --- a/x/register/keeper/msg_server.go +++ b/x/register/keeper/msg_server.go @@ -368,7 +368,7 @@ func (k msgServer) HandleMsgUpdateEffectiveStake(goCtx context.Context, msg *typ return &types.MsgUpdateEffectiveStakeResponse{}, errors.New("effective tokens should be greater than 0") } - _, effectiveStakeChange, isUnsuspendedDuringUpdate, err := k.UpdateEffectiveStake(ctx, networkAddr, msg.EffectiveTokens) + _, _, isUnsuspendedDuringUpdate, err := k.UpdateEffectiveStake(ctx, networkAddr, msg.EffectiveTokens) if err != nil { return nil, sdkerrors.Wrap(types.ErrUpdateResourceNodeStake, err.Error()) } @@ -377,7 +377,7 @@ func (k msgServer) HandleMsgUpdateEffectiveStake(goCtx context.Context, msg *typ sdk.NewEvent( types.EventTypeUpdateEffectiveStake, sdk.NewAttribute(types.AttributeKeyNetworkAddress, msg.NetworkAddress), - sdk.NewAttribute(types.AttributeKeyEffectiveStakeChange, effectiveStakeChange.String()), + sdk.NewAttribute(types.AttributeKeyEffectiveStakeAfter, msg.EffectiveTokens.String()), sdk.NewAttribute(types.AttributeKeyIsUnsuspended, strconv.FormatBool(isUnsuspendedDuringUpdate)), ), }) diff --git a/x/register/keeper/resource_node.go b/x/register/keeper/resource_node.go index b9fa02d1..8bd77b32 100644 --- a/x/register/keeper/resource_node.go +++ b/x/register/keeper/resource_node.go @@ -362,7 +362,7 @@ func (k Keeper) UpdateEffectiveStake(ctx sdk.Context, networkAddr stratos.SdsAdd return sdk.ZeroInt(), sdk.ZeroInt(), false, types.ErrInsufficientBalance } - isUnsuspendedDuringUpdate = node.Suspend == true && effectiveStakeAfter.GT(sdk.ZeroInt()) + isUnsuspendedDuringUpdate = node.Suspend == true && node.EffectiveTokens.Equal(sdk.ZeroInt()) && effectiveStakeAfter.GT(sdk.ZeroInt()) effectiveStakeBefore := sdk.NewInt(0).Add(node.EffectiveTokens) effectiveStakeChange = effectiveStakeAfter.Sub(effectiveStakeBefore) diff --git a/x/register/types/events.go b/x/register/types/events.go index 8e9bdec5..5b04396f 100644 --- a/x/register/types/events.go +++ b/x/register/types/events.go @@ -36,6 +36,7 @@ const ( AttributeKeyStakeToRemove = "stake_to_remove" AttributeKeyIncrStakeBool = "incr_stake" AttributeKeyEffectiveStakeChange = "effective_stake_change" + AttributeKeyEffectiveStakeAfter = "effective_stake_After" AttributeKeyIsUnsuspended = "is_unsuspended" AttributeValueCategory = ModuleName From c277133d81bc9dccb44f1597b2e644460ee18b37 Mon Sep 17 00:00:00 2001 From: jialbai Date: Mon, 20 Feb 2023 10:37:02 -0500 Subject: [PATCH 14/95] - qb1269: merge with latest dev branch and remove useless effectiveStake related logic from pot module --- x/pot/app_test.go | 2 +- x/pot/client/cli/flags.go | 8 -------- x/pot/client/cli/tx.go | 14 +------------- x/pot/client/rest/tx.go | 7 +------ x/pot/types/events.go | 18 ++++++++---------- 5 files changed, 11 insertions(+), 38 deletions(-) diff --git a/x/pot/app_test.go b/x/pot/app_test.go index 174eb8b4..894e26f5 100644 --- a/x/pot/app_test.go +++ b/x/pot/app_test.go @@ -156,7 +156,7 @@ func setupSlashingMsg() *types.MsgSlashingResourceNode { reporters = append(reporters, idxNodeNetworkId1) reportOwner := make([]sdk.AccAddress, 0) reportOwner = append(reportOwner, idxOwner1) - slashingMsg := types.NewMsgSlashingResourceNode(reporters, reportOwner, resNodeNetworkId1, resOwner1, resNodeSlashingNOZAmt1, true, resNodeSlashingEffectiveTokenAmt1) + slashingMsg := types.NewMsgSlashingResourceNode(reporters, reportOwner, resNodeNetworkId1, resOwner1, resNodeSlashingNOZAmt1, true) return slashingMsg } diff --git a/x/pot/client/cli/flags.go b/x/pot/client/cli/flags.go index 15b2b73f..d8118350 100644 --- a/x/pot/client/cli/flags.go +++ b/x/pot/client/cli/flags.go @@ -16,7 +16,6 @@ const ( FlagReporterOwner = "reporter-owner" FlagNetworkAddress = "network-address" FlagSlashing = "slashing" - FlagEffectiveStake = "effective-stake" FlagSuspend = "suspend" FlagBLSSignature = "bls-signature" ) @@ -122,10 +121,3 @@ func flagSetSuspend() *flag.FlagSet { fs.Bool(FlagSuspend, false, "if the resource node is suspend") return fs } - -// flagSetFsSlashing Returns the FlagSet for slashing amount. -func flagSetEffectiveStake() *flag.FlagSet { - fs := flag.NewFlagSet("", flag.ContinueOnError) - fs.String(FlagEffectiveStake, "", "the amount of effective stake") - return fs -} diff --git a/x/pot/client/cli/tx.go b/x/pot/client/cli/tx.go index 06a3e200..a0dc5346 100644 --- a/x/pot/client/cli/tx.go +++ b/x/pot/client/cli/tx.go @@ -2,7 +2,6 @@ package cli import ( "encoding/json" - "errors" "fmt" "strconv" @@ -380,7 +379,6 @@ func SlashingResourceNodeCmd() *cobra.Command { cmd.Flags().AddFlagSet(flagSetWalletAddress()) cmd.Flags().AddFlagSet(flagSetSlashing()) cmd.Flags().AddFlagSet(flagSetSuspend()) - cmd.Flags().AddFlagSet(flagSetEffectiveStake()) flags.AddTxFlagsToCmd(cmd) @@ -390,7 +388,6 @@ func SlashingResourceNodeCmd() *cobra.Command { _ = cmd.MarkFlagRequired(FlagWalletAddress) _ = cmd.MarkFlagRequired(FlagSlashing) _ = cmd.MarkFlagRequired(FlagSuspend) - _ = cmd.MarkFlagRequired(FlagEffectiveStake) _ = cmd.MarkFlagRequired(flags.FlagFrom) return cmd @@ -469,15 +466,6 @@ func buildSlashingResourceNodeMsg(clientCtx client.Context, txf tx.Factory, fs * return txf, nil, err } - flagEffectiveStakeStr, err := fs.GetString(FlagEffectiveStake) - if err != nil { - return txf, nil, err - } - effectiveStake, ok := sdk.NewIntFromString(flagEffectiveStakeStr) - if !ok { - return txf, nil, errors.New("invalid effective stake aount") - } - - msg := types.NewMsgSlashingResourceNode(reporters, reporterOwner, networkAddress, walletAddress, slashing, suspend, effectiveStake) + msg := types.NewMsgSlashingResourceNode(reporters, reporterOwner, networkAddress, walletAddress, slashing, suspend) return txf, msg, nil } diff --git a/x/pot/client/rest/tx.go b/x/pot/client/rest/tx.go index 1f36ada5..f3ed4493 100644 --- a/x/pot/client/rest/tx.go +++ b/x/pot/client/rest/tx.go @@ -50,7 +50,6 @@ type ( WalletAddress sdk.AccAddress `json:"wallet_address" yaml:"wallet_address"` // wallet address of the pp node Slashing int64 `json:"slashing" yaml:"slashing"` Suspend bool `json:"suspend" yaml:"suspend"` - EffectiveStake string `json:"effective_stake" yaml:"effective_stake"` } ) @@ -231,12 +230,8 @@ func slashingResourceNodeHandlerFn(cliCtx client.Context) http.HandlerFunc { } slashing := sdk.NewInt(req.Slashing) - effectiveStake, ok := sdk.NewIntFromString(req.EffectiveStake) - if !ok { - return - } - msg := types.NewMsgSlashingResourceNode(req.Reporters, req.ReporterOwner, req.NetworkAddress, req.WalletAddress, slashing, req.Suspend, effectiveStake) + msg := types.NewMsgSlashingResourceNode(req.Reporters, req.ReporterOwner, req.NetworkAddress, req.WalletAddress, slashing, req.Suspend) if err := msg.ValidateBasic(); err != nil { rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) return diff --git a/x/pot/types/events.go b/x/pot/types/events.go index 5afb77e9..db7d245e 100644 --- a/x/pot/types/events.go +++ b/x/pot/types/events.go @@ -8,16 +8,14 @@ const ( EventTypeFoundationDeposit = "foundation_deposit" EventTypeSlashing = "slashing" - AttributeKeyEpoch = "epoch" - AttributeKeyReportReference = "report_reference" - AttributeKeyAmount = "amount" - AttributeKeyIsEffectiveStakeChanged = "is_effective_stake_changed" - AttributeKeyEffectiveStake = "effective_stake" - AttributeKeyWalletAddress = "wallet_address" - AttributeKeyLegacyWalletAddress = "legacy_wallet_address" - AttributeKeyNodeP2PAddress = "p2p_address" - AttributeKeySlashingNodeType = "slashing_type" - AttributeKeyNodeSuspended = "suspend" + AttributeKeyEpoch = "epoch" + AttributeKeyReportReference = "report_reference" + AttributeKeyAmount = "amount" + AttributeKeyWalletAddress = "wallet_address" + AttributeKeyLegacyWalletAddress = "legacy_wallet_address" + AttributeKeyNodeP2PAddress = "p2p_address" + AttributeKeySlashingNodeType = "slashing_type" + AttributeKeyNodeSuspended = "suspend" AttributeValueCategory = ModuleName ) From 80f9d5159afee92f6fefd911ce6b1485a3d01478 Mon Sep 17 00:00:00 2001 From: Xiong Date: Mon, 20 Feb 2023 14:56:06 -0500 Subject: [PATCH 15/95] bech32 sds p2pPubKey correction --- types/address.go | 28 +++--------- types/address_test.go | 75 +++++++++++++++++++++++++++++++ types/bech32/legacybech32/pk.go | 73 ------------------------------ x/register/types/meta_node.go | 6 ++- x/register/types/resource_node.go | 5 ++- 5 files changed, 90 insertions(+), 97 deletions(-) delete mode 100644 types/bech32/legacybech32/pk.go diff --git a/types/address.go b/types/address.go index 0b23bcd3..f07d3128 100644 --- a/types/address.go +++ b/types/address.go @@ -8,7 +8,7 @@ import ( "fmt" "strings" - "github.com/cosmos/cosmos-sdk/codec/legacy" + "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "gopkg.in/yaml.v2" @@ -46,33 +46,17 @@ var _ yaml.Marshaler = SdsAddress{} type SdsAddress []byte -// SdsPubKeyFromBech32 returns a SdsPublicKey from a Bech32 string. +// SdsPubKeyFromBech32 returns an ed25519 SdsPublicKey from a Bech32 string. func SdsPubKeyFromBech32(pubkeyStr string) (cryptotypes.PubKey, error) { - bech32Prefix := GetConfig().GetBech32SdsNodeP2PPubPrefix() - bz, err := sdk.GetFromBech32(pubkeyStr, bech32Prefix) + _, sdsPubKeyBytes, err := bech32.DecodeAndConvert(pubkeyStr) if err != nil { return nil, err } - - pk, err := legacy.PubKeyFromBytes(bz) - if err != nil { - return nil, err - } - - return pk, nil -} - -// SdsPubKeyFromBytes returns a SdsPublicKey from a byte array. -func SdsPubKeyFromByteArr(bytes []byte) (cryptotypes.PubKey, error) { - bech32PubPrefix := GetConfig().GetBech32SdsNodeP2PPubPrefix() - pubStr, err := sdk.Bech32ifyAddressBytes(bech32PubPrefix, bytes) - if err != nil { - return nil, err - } - return SdsPubKeyFromBech32(pubStr) + pubKey := ed25519.PubKey{Key: sdsPubKeyBytes} + return &pubKey, nil } -// SdsPubKeyFromBech32 convert a SdsPublicKey to a Bech32 string. +// SdsPubKeyToBech32 convert a SdsPublicKey to a Bech32 string. func SdsPubKeyToBech32(pubkey cryptotypes.PubKey) (string, error) { bech32PubPrefix := GetConfig().GetBech32SdsNodeP2PPubPrefix() bech32Pub, err := bech32.ConvertAndEncode(bech32PubPrefix, pubkey.Bytes()) diff --git a/types/address_test.go b/types/address_test.go index ce5b1e4a..0d387946 100644 --- a/types/address_test.go +++ b/types/address_test.go @@ -1,9 +1,84 @@ package types import ( + "encoding/base64" "testing" + + "github.com/cosmos/cosmos-sdk/codec" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" + + "github.com/stratosnet/stratos-chain/app" + + "github.com/stretchr/testify/require" ) +func initCodec() codec.Codec { + encodingConfig := app.MakeTestEncodingConfig() + cdc := encodingConfig.Marshaler + return cdc +} + +// go test -v address_test.go address.go config.go coin.go -run TestSdsPubKeyToBech32 +func TestSdsPubKeyToBech32(t *testing.T) { + tests := []struct { + name string + pubkeyJson string + expectedBech32 string + wantErr bool + }{ + {"test1", "{\"@type\":\"/cosmos.crypto.ed25519.PubKey\",\"key\":\"2OAeLO0+KrBkSxuFKU1ofJqGb4RtA8GpD8XCZlMYw2A=\"}", + "stsdspub1mrsput8d8c4tqeztrwzjjntg0jdgvmuyd5pur2g0chpxv5cccdsqvayhan", false}, + } + cdc := initCodec() + cfg := GetConfig() + cfg.Seal() + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + + var pubKey cryptotypes.PubKey + err := cdc.UnmarshalInterfaceJSON([]byte(tt.pubkeyJson), &pubKey) + if (err != nil) != tt.wantErr { + t.Errorf(err.Error()) + } + + bech32Str, err := SdsPubKeyToBech32(pubKey) + if (err != nil) != tt.wantErr { + t.Errorf(err.Error()) + } + + require.Equal(t, bech32Str, tt.expectedBech32) + }) + } +} + +// go test -v address_test.go address.go config.go coin.go -run TestSdsPubKeyFromBech32 +func TestSdsPubKeyFromBech32(t *testing.T) { + tests := []struct { + name string + bech32PubKey string + expectedBase64 string + wantErr bool + }{ + {"test1", "stsdspub1mrsput8d8c4tqeztrwzjjntg0jdgvmuyd5pur2g0chpxv5cccdsqvayhan", + "2OAeLO0+KrBkSxuFKU1ofJqGb4RtA8GpD8XCZlMYw2A=", false}, + } + + cfg := GetConfig() + cfg.Seal() + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + pubKey, err := SdsPubKeyFromBech32(tt.bech32PubKey) + if (err != nil) != tt.wantErr { + t.Errorf(err.Error()) + } + base64Str := base64.StdEncoding.EncodeToString(pubKey.Bytes()) + require.Equal(t, base64Str, tt.expectedBase64) + }) + } + +} + func TestSdsAddress_Unmarshal(t *testing.T) { tests := []struct { diff --git a/types/bech32/legacybech32/pk.go b/types/bech32/legacybech32/pk.go deleted file mode 100644 index ed383029..00000000 --- a/types/bech32/legacybech32/pk.go +++ /dev/null @@ -1,73 +0,0 @@ -// Deprecated: The module provides legacy bech32 functions which will be removed in a future -// release. -package legacybech32 - -// -//import ( -// "github.com/cosmos/cosmos-sdk/codec/legacy" -// cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" -// sdk "github.com/cosmos/cosmos-sdk/types" -// "github.com/cosmos/cosmos-sdk/types/bech32" -// -// "github.com/stratosnet/stratos-chain/types" -//) -// -//// TODO: when removing this package remove: -//// + sdk:config.GetBech32AccountPubPrefix (and other related functions) -//// + Bech32PrefixAccAddr and other related constants -// -//// Deprecated: Bech32PubKeyType defines a string type alias for a Bech32 public key type. -//type Bech32PubKeyType string -// -//// Bech32 conversion constants -//const ( -// Bech32PubKeyTypeAccPub Bech32PubKeyType = "accpub" -// Bech32PubKeyTypeValPub Bech32PubKeyType = "valpub" -// Bech32PubKeyTypeConsPub Bech32PubKeyType = "conspub" -// Bech32PubKeyTypeSdsP2PPub Bech32PubKeyType = "sdsp2p" -//) -// -//// Deprecated: MarshalPubKey returns a Bech32 encoded string containing the appropriate -//// prefix based on the key type provided for a given PublicKey. -//func MarshalPubKey(pkt Bech32PubKeyType, pubkey cryptotypes.PubKey) (string, error) { -// bech32Prefix := getPrefix(pkt) -// return bech32.ConvertAndEncode(bech32Prefix, legacy.Cdc.MustMarshal(pubkey)) -//} -// -//// Deprecated: MustMarshalPubKey calls MarshalPubKey and panics on error. -//func MustMarshalPubKey(pkt Bech32PubKeyType, pubkey cryptotypes.PubKey) string { -// res, err := MarshalPubKey(pkt, pubkey) -// if err != nil { -// panic(err) -// } -// -// return res -//} -// -//func getPrefix(pkt Bech32PubKeyType) string { -// cfg := types.GetConfig() -// switch pkt { -// case Bech32PubKeyTypeAccPub: -// return cfg.GetBech32AccountPubPrefix() -// case Bech32PubKeyTypeValPub: -// return cfg.GetBech32ValidatorPubPrefix() -// case Bech32PubKeyTypeConsPub: -// return cfg.GetBech32ConsensusPubPrefix() -// case Bech32PubKeyTypeSdsP2PPub: -// return cfg.GetBech32SdsNodeP2PPubPrefix() -// } -// -// return "" -//} -// -//// Deprecated: UnmarshalPubKey returns a PublicKey from a bech32-encoded PublicKey with -//// a given key type. -//func UnmarshalPubKey(pkt Bech32PubKeyType, pubkeyStr string) (cryptotypes.PubKey, error) { -// bech32Prefix := getPrefix(pkt) -// -// bz, err := sdk.GetFromBech32(pubkeyStr, bech32Prefix) -// if err != nil { -// return nil, err -// } -// return legacy.PubKeyFromBytes(bz) -//} diff --git a/x/register/types/meta_node.go b/x/register/types/meta_node.go index abdf99bd..2eeb9675 100644 --- a/x/register/types/meta_node.go +++ b/x/register/types/meta_node.go @@ -10,6 +10,7 @@ import ( cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + stratos "github.com/stratosnet/stratos-chain/types" ) @@ -37,7 +38,10 @@ func (v MetaNode) ConvertToString() string { if err != nil { return ErrUnknownPubKey.Error() } - pubKey, err := stratos.SdsPubKeyFromBech32(pkAny.String()) + cachedPubkey := pkAny.GetCachedValue() + pk := cachedPubkey.(cryptotypes.PubKey) + + pubKey, err := stratos.SdsPubKeyToBech32(pk) if err != nil { return ErrUnknownPubKey.Error() } diff --git a/x/register/types/resource_node.go b/x/register/types/resource_node.go index 35ef67e7..25fec5d7 100644 --- a/x/register/types/resource_node.go +++ b/x/register/types/resource_node.go @@ -98,7 +98,10 @@ func (v ResourceNode) ConvertToString() string { if err != nil { return ErrUnknownPubKey.Error() } - pubKey, err := stratos.SdsPubKeyFromBech32(pkAny.String()) + cachedPubkey := pkAny.GetCachedValue() + pk := cachedPubkey.(cryptotypes.PubKey) + + pubKey, err := stratos.SdsPubKeyToBech32(pk) if err != nil { return ErrUnknownPubKey.Error() } From 626e58656ade9a4e67a20f4a5768d385b4998575 Mon Sep 17 00:00:00 2001 From: jialbai Date: Wed, 22 Feb 2023 13:53:16 -0500 Subject: [PATCH 16/95] - qb1269: fix typo --- x/register/types/events.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/register/types/events.go b/x/register/types/events.go index 5b04396f..fa6da5ec 100644 --- a/x/register/types/events.go +++ b/x/register/types/events.go @@ -36,7 +36,7 @@ const ( AttributeKeyStakeToRemove = "stake_to_remove" AttributeKeyIncrStakeBool = "incr_stake" AttributeKeyEffectiveStakeChange = "effective_stake_change" - AttributeKeyEffectiveStakeAfter = "effective_stake_After" + AttributeKeyEffectiveStakeAfter = "effective_stake_after" AttributeKeyIsUnsuspended = "is_unsuspended" AttributeValueCategory = ModuleName From 3df9c26f74f551f726a90524179782887355d321 Mon Sep 17 00:00:00 2001 From: Xiong Date: Wed, 22 Feb 2023 19:20:16 -0500 Subject: [PATCH 17/95] 1,Implement missing grpc APIs 2,Code optimization --- proto/stratos/pot/v1/genesis.proto | 45 +- proto/stratos/pot/v1/pot.proto | 140 +- proto/stratos/pot/v1/query.proto | 96 +- proto/stratos/pot/v1/tx.proto | 18 +- proto/stratos/register/v1/genesis.proto | 74 +- proto/stratos/register/v1/query.proto | 79 +- proto/stratos/register/v1/register.proto | 251 +- proto/stratos/register/v1/tx.proto | 50 +- proto/stratos/sds/v1/genesis.proto | 5 +- proto/stratos/sds/v1/query.proto | 61 +- proto/stratos/sds/v1/sds.proto | 11 +- proto/stratos/sds/v1/tx.proto | 26 +- x/pot/client/rest/query.go | 12 +- x/pot/keeper/distribute.go | 16 + x/pot/keeper/grpc_query.go | 48 +- x/pot/keeper/querier.go | 23 +- x/pot/keeper/utils.go | 22 - x/pot/module.go | 4 +- x/pot/types/genesis.pb.go | 530 +++- x/pot/types/msg.go | 42 +- x/pot/types/params.go | 2 - x/pot/types/pot.pb.go | 892 +------ x/pot/types/querier.go | 17 +- x/pot/types/query.pb.go | 1310 +++++----- x/pot/types/query.pb.gw.go | 90 +- x/pot/types/tx.pb.go | 419 +++- x/register/client/cli/tx.go | 12 +- x/register/client/rest/tx.go | 12 +- x/register/keeper/grpc_query.go | 17 +- x/register/keeper/msg_server.go | 27 +- x/register/keeper/querier.go | 11 - x/register/module.go | 4 +- x/register/types/events.go | 4 - x/register/types/genesis.pb.go | 305 ++- x/register/types/msg.go | 13 +- x/register/types/params.go | 1 - x/register/types/querier.go | 1 + x/register/types/query.pb.go | 1477 +++++++++-- x/register/types/register.pb.go | 2866 +++++----------------- x/register/types/resource_node.go | 38 +- x/register/types/tx.pb.go | 427 ++-- x/sds/client/rest/query.go | 20 +- x/sds/keeper/grpc_query.go | 31 +- x/sds/keeper/keeper.go | 4 +- x/sds/keeper/msg_server.go | 5 +- x/sds/keeper/querier.go | 4 +- x/sds/module.go | 4 +- x/sds/types/events.go | 3 +- x/sds/types/msg.go | 42 +- x/sds/types/query.pb.go | 1231 +++++++++- x/sds/types/query.pb.gw.go | 204 ++ x/sds/types/tx.pb.go | 335 +-- 52 files changed, 6307 insertions(+), 5074 deletions(-) delete mode 100644 x/pot/keeper/utils.go diff --git a/proto/stratos/pot/v1/genesis.proto b/proto/stratos/pot/v1/genesis.proto index 17473fa4..c38eee39 100644 --- a/proto/stratos/pot/v1/genesis.proto +++ b/proto/stratos/pot/v1/genesis.proto @@ -1,8 +1,6 @@ syntax = "proto3"; package stratos.pot.v1; - - import "gogoproto/gogo.proto"; import "cosmos/base/v1beta1/coin.proto"; import "stratos/pot/v1/pot.proto"; @@ -11,11 +9,42 @@ option go_package = "github.com/stratosnet/stratos-chain/x/pot/types"; // GenesisState defines the register module's genesis state. message GenesisState { - pot.v1.Params params = 1 [ (gogoproto.moretags) = "yaml:\"params\"" ]; - cosmos.base.v1beta1.Coin total_mined_token = 2 [ (gogoproto.moretags) = "yaml:\"total_mined_token\"" ]; - int64 last_reported_epoch = 3 [ (gogoproto.moretags) = "yaml:\"last_reported_epoch\"" ]; - repeated pot.v1.ImmatureTotal immature_total_info = 4 [ (gogoproto.moretags) = "yaml:\"immature_total_info\""]; - repeated pot.v1.MatureTotal mature_total_info = 5 [ (gogoproto.moretags) = "yaml:\"mature_total_info\""]; - repeated pot.v1.Reward individual_reward_info = 6 [ (gogoproto.moretags) = "yaml:\"individual_reward_info\""]; + Params params = 1 [ + (gogoproto.moretags) = "yaml:\"params\"" + ]; + cosmos.base.v1beta1.Coin total_mined_token = 2 [ + (gogoproto.moretags) = "yaml:\"total_mined_token\"" + ]; + int64 last_reported_epoch = 3 [ + (gogoproto.moretags) = "yaml:\"last_reported_epoch\"" + ]; + repeated ImmatureTotal immature_total_info = 4 [ + (gogoproto.moretags) = "yaml:\"immature_total_info\"" + ]; + repeated MatureTotal mature_total_info = 5 [ + (gogoproto.moretags) = "yaml:\"mature_total_info\"" + ]; + repeated Reward individual_reward_info = 6 [ + (gogoproto.moretags) = "yaml:\"individual_reward_info\"" + ]; } +message ImmatureTotal { + string wallet_address = 1 [ + (gogoproto.jsontag) = "wallet_address", + (gogoproto.moretags) = "yaml:\"wallet_address\"" + ]; + repeated cosmos.base.v1beta1.Coin value = 2 [ + (gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; +} + +message MatureTotal { + string wallet_address = 1 [ + (gogoproto.jsontag) = "wallet_address", + (gogoproto.moretags) = "yaml:\"wallet_address\"" + ]; + repeated cosmos.base.v1beta1.Coin value = 2 [ + (gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; +} diff --git a/proto/stratos/pot/v1/pot.proto b/proto/stratos/pot/v1/pot.proto index f194a92c..8b488b11 100644 --- a/proto/stratos/pot/v1/pot.proto +++ b/proto/stratos/pot/v1/pot.proto @@ -8,92 +8,82 @@ option go_package = "github.com/stratosnet/stratos-chain/x/pot/types"; // Params defines the PoT module parameters message Params { - string bond_denom = 1 [ - (gogoproto.jsontag) = "bond_denom", + string bond_denom = 1 [ + (gogoproto.jsontag) = "bond_denom", (gogoproto.moretags) = "yaml:\"bond_denom\"" ]; - string reward_denom = 2 [ - (gogoproto.jsontag) = "reward_denom", + string reward_denom = 2 [ + (gogoproto.jsontag) = "reward_denom", (gogoproto.moretags) = "yaml:\"reward_denom\"" ]; - int64 mature_epoch = 3 [ - (gogoproto.jsontag) = "mature_epoch", + int64 mature_epoch = 3 [ + (gogoproto.jsontag) = "mature_epoch", (gogoproto.moretags) = "yaml:\"mature_epoch\"" ]; - repeated MiningRewardParam mining_reward_params = 4 [ - (gogoproto.jsontag) = "mining_reward_params", + repeated MiningRewardParam mining_reward_params = 4 [ + (gogoproto.jsontag) = "mining_reward_params", (gogoproto.moretags) = "yaml:\"mining_reward_params\"" ]; - string community_tax = 5 [ - (gogoproto.jsontag) = "community_tax", - (gogoproto.moretags) = "yaml:\"community_tax\"", + string community_tax = 5 [ + (gogoproto.jsontag) = "community_tax", + (gogoproto.moretags) = "yaml:\"community_tax\"", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false + (gogoproto.nullable) = false ]; } message MiningRewardParam { - cosmos.base.v1beta1.Coin total_mined_valve_start = 1 [ (gogoproto.moretags) = "yaml:\"total_mined_valve_start\"" ]; - cosmos.base.v1beta1.Coin total_mined_valve_end = 2 [ (gogoproto.moretags) = "yaml:\"total_mined_valve_end\"" ]; - cosmos.base.v1beta1.Coin mining_reward = 3 [ (gogoproto.moretags) = "yaml:\"mining_reward\"" ]; - string block_chain_percentage_in_ten_thousand = 4 [ - (gogoproto.jsontag) = "block_chain_percentage_in_ten_thousand", + cosmos.base.v1beta1.Coin total_mined_valve_start = 1 [ + (gogoproto.moretags) = "yaml:\"total_mined_valve_start\"" + ]; + cosmos.base.v1beta1.Coin total_mined_valve_end = 2 [ + (gogoproto.moretags) = "yaml:\"total_mined_valve_end\"" + ]; + cosmos.base.v1beta1.Coin mining_reward = 3 [ + (gogoproto.moretags) = "yaml:\"mining_reward\"" + ]; + string block_chain_percentage_in_ten_thousand = 4 [ + (gogoproto.jsontag) = "block_chain_percentage_in_ten_thousand", (gogoproto.moretags) = "yaml:\"block_chain_percentage_in_ten_thousand\"", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int" ]; - string resource_node_percentage_in_ten_thousand = 5 [ - (gogoproto.jsontag) = "resource_node_percentage_in_ten_thousand", + string resource_node_percentage_in_ten_thousand = 5 [ + (gogoproto.jsontag) = "resource_node_percentage_in_ten_thousand", (gogoproto.moretags) = "yaml:\"resource_node_percentage_in_ten_thousand\"", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int" ]; - string meta_node_percentage_in_ten_thousand = 6 [ - (gogoproto.jsontag) = "meta_node_percentage_in_ten_thousand", + string meta_node_percentage_in_ten_thousand = 6 [ + (gogoproto.jsontag) = "meta_node_percentage_in_ten_thousand", (gogoproto.moretags) = "yaml:\"meta_node_percentage_in_ten_thousand\"", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int" ]; } -message ImmatureTotal { - string wallet_address = 1 [ - (gogoproto.jsontag) = "wallet_address", - (gogoproto.moretags) = "yaml:\"wallet_address\"" - ]; - repeated cosmos.base.v1beta1.Coin value = 2 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; -} - -message MatureTotal { - string wallet_address = 1 [ - (gogoproto.jsontag) = "wallet_address", - (gogoproto.moretags) = "yaml:\"wallet_address\"" - ]; - repeated cosmos.base.v1beta1.Coin value = 2 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; -} - message Reward { - string wallet_address = 1 [ - (gogoproto.jsontag) = "wallet_address", - (gogoproto.moretags) = "yaml:\"wallet_address\"" - ]; - repeated cosmos.base.v1beta1.Coin reward_from_mining_pool = 2 [ - (gogoproto.nullable) = false, - (gogoproto.jsontag) = "reward_from_mining_pool", - (gogoproto.moretags) = "yaml:\"reward_from_mining_pool\"", - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; - repeated cosmos.base.v1beta1.Coin reward_from_traffic_pool = 3 [ - (gogoproto.nullable) = false, - (gogoproto.jsontag) = "reward_from_traffic_pool", - (gogoproto.moretags) = "yaml:\"reward_from_traffic_pool\"", - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; + string wallet_address = 1 [ + (gogoproto.jsontag) = "wallet_address", + (gogoproto.moretags) = "yaml:\"wallet_address\"" + ]; + repeated cosmos.base.v1beta1.Coin reward_from_mining_pool = 2 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "reward_from_mining_pool", + (gogoproto.moretags) = "yaml:\"reward_from_mining_pool\"", + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; + repeated cosmos.base.v1beta1.Coin reward_from_traffic_pool = 3 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "reward_from_traffic_pool", + (gogoproto.moretags) = "yaml:\"reward_from_traffic_pool\"", + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; } message SingleWalletVolume { - string wallet_address = 1 [ - (gogoproto.jsontag) = "wallet_address", - (gogoproto.moretags) = "yaml:\"wallet_address\"" - ]; - string volume = 2 [ + string wallet_address = 1 [ + (gogoproto.jsontag) = "wallet_address", + (gogoproto.moretags) = "yaml:\"wallet_address\"" + ]; + string volume = 2 [ (gogoproto.jsontag) = "volume", (gogoproto.moretags) = "yaml:\"volume\"", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int" @@ -101,43 +91,23 @@ message SingleWalletVolume { } message WalletVolumes { - repeated SingleWalletVolume Volumes = 1 [ + repeated SingleWalletVolume volumes = 1 [ (gogoproto.jsontag) = "volumes", (gogoproto.moretags) = "yaml:\"volumes\"" ]; } message VolumeReportRecord { - string reporter = 1 [ + string reporter = 1 [ (gogoproto.jsontag) = "reporter", (gogoproto.moretags) = "yaml:\"reporter\"" ]; - string report_reference = 2 [ + string report_reference = 2 [ (gogoproto.jsontag) = "report_reference", (gogoproto.moretags) = "yaml:\"report_reference\"" ]; - string tx_hash = 3 [ - (gogoproto.jsontag) = "tx_hash", - (gogoproto.moretags) = "yaml:\"tx_hash\"" - ]; -} - -message BLSSignatureInfo { - repeated bytes pub_keys = 1 [ - (gogoproto.jsontag) = "pub_keys", - (gogoproto.moretags) = "yaml:\"pub_keys\"" - ]; - bytes signature = 2 [ - (gogoproto.jsontag) = "signature", - (gogoproto.moretags) = "yaml:\"signature\"" - ]; - bytes txData = 3 [ - (gogoproto.jsontag) = "tx_data", - (gogoproto.moretags) = "yaml:\"tx_data\"" - ]; + string tx_hash = 3 [ + (gogoproto.jsontag) = "tx_hash", + (gogoproto.moretags) = "yaml:\"tx_hash\"" + ]; } - - - - - diff --git a/proto/stratos/pot/v1/query.proto b/proto/stratos/pot/v1/query.proto index cdb7a5fa..5dbe08c8 100644 --- a/proto/stratos/pot/v1/query.proto +++ b/proto/stratos/pot/v1/query.proto @@ -5,7 +5,6 @@ import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; import "cosmos/base/v1beta1/coin.proto"; import "cosmos/base/query/v1beta1/pagination.proto"; - import "stratos/pot/v1/pot.proto"; option go_package = "github.com/stratosnet/stratos-chain/x/pot/types"; @@ -17,18 +16,18 @@ service Query { option (google.api.http).get = "/stratos/pot/v1/volume-report/{epoch}"; } - // PotRewardsByEpoch queries Pot rewards by a given epoch. - rpc PotRewardsByEpoch(QueryPotRewardsByEpochRequest) returns (QueryPotRewardsByEpochResponse) { + // RewardsByEpoch queries Pot rewards by a given epoch. + rpc RewardsByEpoch(QueryRewardsByEpochRequest) returns (QueryRewardsByEpochResponse) { option (google.api.http).get = "/stratos/pot/v1/rewards/epoch/{epoch}"; } - // PotRewardsByOwner queries Pot rewards by a given owner wallet address. - rpc PotRewardsByOwner(QueryPotRewardsByOwnerRequest) returns (QueryPotRewardsByOwnerResponse) { + // RewardsByOwner queries Pot rewards by a given owner wallet address. + rpc RewardsByOwner(QueryRewardsByOwnerRequest) returns (QueryRewardsByOwnerResponse) { option (google.api.http).get = "/stratos/pot/v1/rewards/wallet/{wallet_address}"; } - // PotSlashingByOwner queries Pot Pot slashingBy by owner wallet address. - rpc PotSlashingByOwner(QueryPotSlashingByOwnerRequest) returns (QueryPotSlashingByOwnerResponse) { + // SlashingByOwner queries Pot slashing by owner wallet address. + rpc SlashingByOwner(QuerySlashingByOwnerRequest) returns (QuerySlashingByOwnerResponse) { option (google.api.http).get = "/stratos/pot/v1/slashing/{wallet_address}"; } @@ -36,8 +35,6 @@ service Query { rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { option (google.api.http).get = "/stratos/pot/v1/params"; } - - } // QueryVolumeReportRequest is request type for the Query/VolumeReport RPC method @@ -46,22 +43,20 @@ message QueryVolumeReportRequest { int64 epoch = 1; } -message ReportInfo { - int64 epoch = 1; - string reference = 2; - string tx_hash = 3; - string reporter = 4; - -} - // QueryVolumeReportResponse is response type for the Query/ResourceNode RPC method message QueryVolumeReportResponse { // node defines the the volumeReport info. - ReportInfo report_info = 1; - int64 height = 2; + ReportInfo report_info = 1; + int64 height = 2; } +message ReportInfo { + int64 epoch = 1; + string reference = 2; + string tx_hash = 3; + string reporter = 4; +} // QueryParamsRequest is request type for the Query/Params RPC method. message QueryParamsRequest {} @@ -72,53 +67,52 @@ message QueryParamsResponse { Params params = 1; } -// QueryPotRewardsByEpochRequest is request type for the Query/PotRewardsByEpoch by a given epoch RPC method -message QueryPotRewardsByEpochRequest { - int64 epoch = 1; - string wallet_address = 2; +// QueryRewardsByEpochRequest is request type for the Query/RewardsByEpoch by a given epoch RPC method +message QueryRewardsByEpochRequest { + int64 epoch = 1; + string wallet_address = 2; cosmos.base.query.v1beta1.PageRequest pagination = 3; } -// QueryVolumeReportResponse is response type for the Query/PotRewardsByEpoch RPC method -message QueryPotRewardsByEpochResponse { - repeated Reward rewards = 1; - int64 height = 2; - cosmos.base.query.v1beta1.PageResponse pagination = 3; -} - -message PotRewardByOwner { - string wallet_address = 1; - repeated cosmos.base.v1beta1.Coin MatureTotalReward = 2 - [(gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; - - repeated cosmos.base.v1beta1.Coin ImmatureTotalReward = 3 -[(gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; +// QueryRewardsByEpochResponse is response type for the Query/RewardsByEpoch RPC method +message QueryRewardsByEpochResponse { + repeated Reward rewards = 1; + int64 height = 2; + cosmos.base.query.v1beta1.PageResponse pagination = 3; } - -// QueryPotRewardsByOwnerRequest is request type for the Query/PotRewardsByOwner by a given owner RPC method -message QueryPotRewardsByOwnerRequest { +// QueryRewardsByOwnerRequest is request type for the Query/RewardsByOwner by a given owner RPC method +message QueryRewardsByOwnerRequest { string wallet_address = 1; } -// QueryPotRewardsByOwnerResponse is response type for the Query/PotRewardsByOwner RPC method -message QueryPotRewardsByOwnerResponse { - PotRewardByOwner rewards = 1; - int64 height = 2; +// QueryRewardsByOwnerResponse is response type for the Query/RewardsByOwner RPC method +message QueryRewardsByOwnerResponse { + RewardByOwner rewards = 1; + int64 height = 2; } +message RewardByOwner { + string wallet_address = 1; + repeated cosmos.base.v1beta1.Coin MatureTotalReward = 2 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; + repeated cosmos.base.v1beta1.Coin ImmatureTotalReward = 3 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; +} -// QueryPotSlashingByOwnerRequest is request type for the Query/Slashing by a given owner RPC method -message QueryPotSlashingByOwnerRequest { +// QuerySlashingByOwnerRequest is request type for the Query/Slashing by a given owner RPC method +message QuerySlashingByOwnerRequest { string wallet_address = 1; } -// QueryPotSlashingByOwnerResponse is response type for the Query/Slashing RPC method -message QueryPotSlashingByOwnerResponse { +// QuerySlashingByOwnerResponse is response type for the Query/Slashing RPC method +message QuerySlashingByOwnerResponse { string slashing = 1; - int64 height = 2; + int64 height = 2; } diff --git a/proto/stratos/pot/v1/tx.proto b/proto/stratos/pot/v1/tx.proto index e8c324b7..e50368ea 100644 --- a/proto/stratos/pot/v1/tx.proto +++ b/proto/stratos/pot/v1/tx.proto @@ -146,4 +146,20 @@ message MsgSlashingResourceNode { ]; } // MsgSlashingResourceNodeResponse defines the Msg/MsgSlashingResourceNode response type. -message MsgSlashingResourceNodeResponse {} \ No newline at end of file +message MsgSlashingResourceNodeResponse {} + +message BLSSignatureInfo { + repeated bytes pub_keys = 1 [ + (gogoproto.jsontag) = "pub_keys", + (gogoproto.moretags) = "yaml:\"pub_keys\"" + ]; + bytes signature = 2 [ + (gogoproto.jsontag) = "signature", + (gogoproto.moretags) = "yaml:\"signature\"" + ]; + bytes txData = 3 [ + (gogoproto.jsontag) = "tx_data", + (gogoproto.moretags) = "yaml:\"tx_data\"" + ]; +} + diff --git a/proto/stratos/register/v1/genesis.proto b/proto/stratos/register/v1/genesis.proto index f955d0fb..4c23c325 100644 --- a/proto/stratos/register/v1/genesis.proto +++ b/proto/stratos/register/v1/genesis.proto @@ -1,59 +1,77 @@ syntax = "proto3"; package stratos.register.v1; - - import "google/protobuf/any.proto"; import "gogoproto/gogo.proto"; - import "cosmos_proto/cosmos.proto"; import "cosmos/staking/v1beta1/staking.proto"; - import "stratos/register/v1/register.proto"; option go_package = "github.com/stratosnet/stratos-chain/x/register/types"; // GenesisState defines the register module's genesis state. message GenesisState { - register.v1.Params params = 1 [ (gogoproto.moretags) = "yaml:\"params\"" ]; - - repeated register.v1.ResourceNode resource_nodes = 2 [ - (gogoproto.nullable) = false, + Params params = 1 [ + (gogoproto.moretags) = "yaml:\"params\"" + ]; + repeated ResourceNode resource_nodes = 2 [ + (gogoproto.nullable) = false, (gogoproto.castrepeated) = "ResourceNodes", -// (gogoproto.castrepeated) = "github.com/stratosnet/stratos-chain/x/register/types.ResourceNodes", - (gogoproto.moretags) = "yaml:\"resource_nodes\"" + (gogoproto.moretags) = "yaml:\"resource_nodes\"" ]; - repeated register.v1.MetaNode meta_nodes = 3 [ - (gogoproto.nullable) = false, + repeated MetaNode meta_nodes = 3 [ + (gogoproto.nullable) = false, (gogoproto.castrepeated) = "MetaNodes", -// (gogoproto.castrepeated) = "github.com/stratosnet/stratos-chain/x/register/types.MetaNodes", - (gogoproto.moretags) = "yaml:\"meta_nodes\"" - ]; - string remaining_noz_limit = 4 [ - (gogoproto.nullable) = false, - (gogoproto.jsontag) = "remaining_noz_limit", - (gogoproto.moretags) = "yaml:\"remaining_noz_limit\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int" + (gogoproto.moretags) = "yaml:\"meta_nodes\"" + ]; + string remaining_noz_limit = 4 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "remaining_noz_limit", + (gogoproto.moretags) = "yaml:\"remaining_noz_limit\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int" ]; // remaining noz limit - repeated register.v1.Slashing slashing = 5 [ (gogoproto.moretags) = "yaml:\"slashing_info\"" ]; - string stake_noz_rate = 6 [ + repeated Slashing slashing = 5 [ + (gogoproto.moretags) = "yaml:\"slashing_info\"" + ]; + string stake_noz_rate = 6 [ (gogoproto.moretags) = "yaml:\"stake_noz_rate\"", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false + (gogoproto.nullable) = false ]; //fixed rate of stake over noz } message GenesisMetaNode { - string network_address = 1 [ (gogoproto.moretags) = "yaml:\"network_address\"" ]; // network address of the meta node + string network_address = 1 [ + (gogoproto.moretags) = "yaml:\"network_address\"" + ]; // network address of the meta node google.protobuf.Any pubkey = 2 [ (cosmos_proto.accepts_interface) = "cosmos.crypto.PubKey", (gogoproto.moretags) = "yaml:\"pubkey\"" ]; // the consensus public key of the meta node; bech encoded in JSON - bool suspend = 3 [ (gogoproto.moretags) = "yaml:\"suspend\"" ]; // has the meta node been suspended from bonded status? - cosmos.staking.v1beta1.BondStatus status = 4 [ (gogoproto.moretags) = "yaml:\"status\""]; // meta node status (Unspecified/Bonded/Unbonding/Unbonded) + bool suspend = 3 [ + (gogoproto.moretags) = "yaml:\"suspend\"" + ]; // has the meta node been suspended from bonded status? + cosmos.staking.v1beta1.BondStatus status = 4 [ + (gogoproto.moretags) = "yaml:\"status\"" + ]; // meta node status (Unspecified/Bonded/Unbonding/Unbonded) string tokens = 5 [ (gogoproto.moretags) = "yaml:\"token\"" ]; // delegated tokens - string owner_address = 6 [ (gogoproto.moretags) = "yaml:\"owner_address\"" ]; // owner address of the meta node - register.v1.Description description = 7 [ (gogoproto.moretags) = "yaml:\"description\",omitempty" ]; // description terms for the meta node + string owner_address = 6 [ + (gogoproto.moretags) = "yaml:\"owner_address\"" + ]; // owner address of the meta node + Description description = 7 [ + (gogoproto.moretags) = "yaml:\"description\",omitempty" + ]; // description terms for the meta node +} + +message Slashing { + string wallet_address = 1 [ + (gogoproto.jsontag) = "wallet_address", + (gogoproto.moretags) = "yaml:\"wallet_address\"" + ]; + int64 value = 2 [ + (gogoproto.jsontag) = "value", + (gogoproto.moretags) = "yaml:\"value\"" + ]; } diff --git a/proto/stratos/register/v1/query.proto b/proto/stratos/register/v1/query.proto index 8679090a..76e1ae0f 100644 --- a/proto/stratos/register/v1/query.proto +++ b/proto/stratos/register/v1/query.proto @@ -1,8 +1,14 @@ syntax = "proto3"; package stratos.register.v1; +import "gogoproto/gogo.proto"; +import "google/protobuf/any.proto"; +import "google/protobuf/timestamp.proto"; import "google/api/annotations.proto"; +import "cosmos_proto/cosmos.proto"; import "cosmos/base/query/v1beta1/pagination.proto"; +import "cosmos/base/v1beta1/coin.proto"; +import "cosmos/staking/v1beta1/staking.proto"; import "stratos/register/v1/register.proto"; @@ -80,26 +86,18 @@ message QueryStakeByNodeRequest { // network_addr defines the node network address to query for. string network_addr = 1; uint32 query_type = 2; - // pagination defines an optional pagination for the request. -// cosmos.base.query.v1beta1.PageRequest pagination = 3; } // QueryStakeByNodeResponse is response type for the Query/StakeByNode RPC method message QueryStakeByNodeResponse { // staking_info defines the the staking_info info of the node. StakingInfo staking_info = 1; - // pagination defines an optional pagination for the request. -// cosmos.base.query.v1beta1.PageResponse pagination = 2; } // QueryStakeByOwnerRequest is request type for the Query/StakeByOwner RPC method message QueryStakeByOwnerRequest { // owner_addr defines the owner address to query for. -// string network_addr = 1; -// string moniker = 2; string owner_addr = 1; -// int64 page = 2; -// int64 limit = 3; // pagination defines an optional pagination for the request. cosmos.base.query.v1beta1.PageRequest pagination = 2; } @@ -148,6 +146,67 @@ message QueryBondedMetaNodeCountResponse { uint64 number = 1; } +message TotalStakesResponse { + cosmos.base.v1beta1.Coin resource_nodes_total_stake = 1; + cosmos.base.v1beta1.Coin meta_nodes_total_stake = 2; + cosmos.base.v1beta1.Coin total_bonded_stake = 3; + cosmos.base.v1beta1.Coin total_unbonded_stake = 4; + cosmos.base.v1beta1.Coin total_unbonding_stake = 5; +} - - +message StakingInfo { + string network_address = 1 [ + (gogoproto.jsontag) = "network_address", + (gogoproto.moretags) = "yaml:\"network_address\"" + ]; + google.protobuf.Any pubkey = 2 [ + (cosmos_proto.accepts_interface) = "cosmos.crypto.PubKey", + (gogoproto.jsontag) = "pubkey", + (gogoproto.moretags) = "yaml:\"pubkey\"" + ]; + bool suspend = 3 [ + (gogoproto.jsontag) = "suspend", + (gogoproto.moretags) = "yaml:\"suspend\"" + ]; + cosmos.staking.v1beta1.BondStatus status = 4 [ + (gogoproto.jsontag) = "status", + (gogoproto.moretags) = "yaml:\"status\""]; + string tokens = 5 [ + (gogoproto.jsontag) = "tokens", + (gogoproto.moretags) = "yaml:\"tokens\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int" + ]; + string owner_address = 6 [ + (gogoproto.jsontag) = "owner_address", + (gogoproto.moretags) = "yaml:\"owner_address\"" + ]; + Description description = 7 [ + (gogoproto.jsontag) = "description", + (gogoproto.moretags) = "yaml:\"description\"" + ]; + google.protobuf.Timestamp creation_time = 8 [ + (gogoproto.nullable) = false, + (gogoproto.stdtime) = true, + (gogoproto.jsontag) = "creation_time", + (gogoproto.moretags) = "yaml:\"creation_time\"" + ]; + uint32 node_type = 9 [ + (gogoproto.jsontag) = "node_type", + (gogoproto.moretags) = "yaml:\"node_type\"" + ]; + cosmos.base.v1beta1.Coin bonded_stake = 10 [ + (gogoproto.nullable) = true, + (gogoproto.jsontag) = "bonded_stake", + (gogoproto.moretags) = "yaml:\"bonded_stake\"" + ]; + cosmos.base.v1beta1.Coin un_bonding_stake = 11 [ + (gogoproto.nullable) = true, + (gogoproto.jsontag) = "un_bonding_stake", + (gogoproto.moretags) = "yaml:\"un_bonding_stake\"" + ]; + cosmos.base.v1beta1.Coin un_bonded_stake = 12 [ + (gogoproto.nullable) = true, + (gogoproto.jsontag) = "un_bonded_stake", + (gogoproto.moretags) = "yaml:\"un_bonded_stake\"" + ]; +} diff --git a/proto/stratos/register/v1/register.proto b/proto/stratos/register/v1/register.proto index 0a29ea10..283ed06d 100644 --- a/proto/stratos/register/v1/register.proto +++ b/proto/stratos/register/v1/register.proto @@ -5,81 +5,80 @@ import "gogoproto/gogo.proto"; import "google/protobuf/any.proto"; import "google/protobuf/timestamp.proto"; import "google/protobuf/duration.proto"; - import "cosmos_proto/cosmos.proto"; -import "cosmos/base/v1beta1/coin.proto"; import "cosmos/staking/v1beta1/staking.proto"; - option go_package = "github.com/stratosnet/stratos-chain/x/register/types"; // Params defines the Register module parameters message Params { - string bond_denom = 1 [ - (gogoproto.jsontag) = "bond_denom", + string bond_denom = 1 [ + (gogoproto.jsontag) = "bond_denom", (gogoproto.moretags) = "yaml:\"bond_denom\"" ]; google.protobuf.Duration unbonding_threashold_time = 2 [ (gogoproto.nullable) = false, (gogoproto.stdduration) = true, - (gogoproto.jsontag) = "unbonding_threashold_time", + (gogoproto.jsontag) = "unbonding_threashold_time", (gogoproto.moretags) = "yaml:\"unbonding_threashold_time\"" ]; google.protobuf.Duration unbonding_completion_time = 3 [ (gogoproto.nullable) = false, (gogoproto.stdduration) = true, - (gogoproto.jsontag) = "unbonding_completion_time", + (gogoproto.jsontag) = "unbonding_completion_time", (gogoproto.moretags) = "yaml:\"unbonding_completion_time\"" ]; - uint32 max_entries = 4 [ - (gogoproto.jsontag) = "max_entries", + uint32 max_entries = 4 [ + (gogoproto.jsontag) = "max_entries", (gogoproto.moretags) = "yaml:\"max_entries\",omitempty" ]; - bool resource_node_reg_enabled = 5 [(gogoproto.moretags) = "yaml:\"resource_node_reg_enabled\""]; + bool resource_node_reg_enabled = 5 [ + (gogoproto.moretags) = "yaml:\"resource_node_reg_enabled\"" + ]; } message ResourceNode { option (gogoproto.equal) = true; option (gogoproto.goproto_stringer) = true; - string network_address = 1 [ - (gogoproto.jsontag) = "network_address", + string network_address = 1 [ + (gogoproto.jsontag) = "network_address", (gogoproto.moretags) = "yaml:\"network_address\"" ]; - google.protobuf.Any pubkey = 2 [ + google.protobuf.Any pubkey = 2 [ (cosmos_proto.accepts_interface) = "cosmos.crypto.PubKey", - (gogoproto.jsontag) = "pubkey", + (gogoproto.jsontag) = "pubkey", (gogoproto.moretags) = "yaml:\"pubkey\"" ]; - bool suspend = 3 [ - (gogoproto.jsontag) = "suspend", + bool suspend = 3 [ + (gogoproto.jsontag) = "suspend", (gogoproto.moretags) = "yaml:\"suspend\"" ]; - cosmos.staking.v1beta1.BondStatus status = 4 [ - (gogoproto.jsontag) = "status", - (gogoproto.moretags) = "yaml:\"status\"" ]; - string tokens = 5 [ + cosmos.staking.v1beta1.BondStatus status = 4 [ + (gogoproto.jsontag) = "status", + (gogoproto.moretags) = "yaml:\"status\""]; + string tokens = 5 [ (gogoproto.nullable) = false, - (gogoproto.jsontag) = "tokens", + (gogoproto.jsontag) = "tokens", (gogoproto.moretags) = "yaml:\"tokens\"", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int" ]; - string owner_address = 6 [ - (gogoproto.jsontag) = "owner_address", + string owner_address = 6 [ + (gogoproto.jsontag) = "owner_address", (gogoproto.moretags) = "yaml:\"owner_address\"" ]; - Description description = 7 [ - (gogoproto.jsontag) = "description", + Description description = 7 [ + (gogoproto.jsontag) = "description", (gogoproto.moretags) = "yaml:\"description\"" ]; google.protobuf.Timestamp creation_time = 8 [ (gogoproto.nullable) = false, (gogoproto.stdtime) = true, - (gogoproto.jsontag) = "creation_time", + (gogoproto.jsontag) = "creation_time", (gogoproto.moretags) = "yaml:\"creation_time\"" ]; - uint32 node_type = 9 [ - (gogoproto.jsontag) = "node_type", + uint32 node_type = 9 [ + (gogoproto.jsontag) = "node_type", (gogoproto.moretags) = "yaml:\"node_type\"" ]; @@ -89,61 +88,61 @@ message MetaNode { option (gogoproto.equal) = true; option (gogoproto.goproto_stringer) = true; - string network_address = 1 [ - (gogoproto.jsontag) = "network_address", + string network_address = 1 [ + (gogoproto.jsontag) = "network_address", (gogoproto.moretags) = "yaml:\"network_address\"" ]; - google.protobuf.Any pubkey = 2 [ + google.protobuf.Any pubkey = 2 [ (cosmos_proto.accepts_interface) = "cosmos.crypto.PubKey", - (gogoproto.jsontag) = "pubkey", + (gogoproto.jsontag) = "pubkey", (gogoproto.moretags) = "yaml:\"pubkey\"" ]; - bool suspend = 3 [ - (gogoproto.jsontag) = "suspend", + bool suspend = 3 [ + (gogoproto.jsontag) = "suspend", (gogoproto.moretags) = "yaml:\"suspend\"" ]; - cosmos.staking.v1beta1.BondStatus status = 4 [ - (gogoproto.jsontag) = "status", - (gogoproto.moretags) = "yaml:\"status\"" ]; - string tokens = 5 [ + cosmos.staking.v1beta1.BondStatus status = 4 [ + (gogoproto.jsontag) = "status", + (gogoproto.moretags) = "yaml:\"status\""]; + string tokens = 5 [ (gogoproto.nullable) = false, - (gogoproto.jsontag) = "tokens", + (gogoproto.jsontag) = "tokens", (gogoproto.moretags) = "yaml:\"tokens\"", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int" ]; - string owner_address = 6 [ - (gogoproto.jsontag) = "owner_address", + string owner_address = 6 [ + (gogoproto.jsontag) = "owner_address", (gogoproto.moretags) = "yaml:\"owner_address\"" ]; - Description description = 7 [ - (gogoproto.jsontag) = "description", + Description description = 7 [ + (gogoproto.jsontag) = "description", (gogoproto.moretags) = "yaml:\"description\"" ]; google.protobuf.Timestamp creation_time = 8 [ (gogoproto.nullable) = false, (gogoproto.stdtime) = true, - (gogoproto.jsontag) = "creation_time", + (gogoproto.jsontag) = "creation_time", (gogoproto.moretags) = "yaml:\"creation_time\"" ]; } message MetaNodeRegistrationVotePool { - string network_address = 1 [ - (gogoproto.jsontag) = "network_address", + string network_address = 1 [ + (gogoproto.jsontag) = "network_address", (gogoproto.moretags) = "yaml:\"network_address\"" ]; - repeated string approve_list = 2 [ - (gogoproto.jsontag) = "approve_list", + repeated string approve_list = 2 [ + (gogoproto.jsontag) = "approve_list", (gogoproto.moretags) = "yaml:\"approve_list\"" ]; - repeated string reject_list = 3 [ - (gogoproto.jsontag) = "reject_list", + repeated string reject_list = 3 [ + (gogoproto.jsontag) = "reject_list", (gogoproto.moretags) = "yaml:\"reject_list\"" ]; google.protobuf.Timestamp expire_time = 4 [ (gogoproto.nullable) = false, (gogoproto.stdtime) = true, - (gogoproto.jsontag) = "expire_time", + (gogoproto.jsontag) = "expire_time", (gogoproto.moretags) = "yaml:\"expire_time\"" ]; } @@ -152,124 +151,39 @@ message Description { option (gogoproto.equal) = true; option (gogoproto.goproto_stringer) = true; - string moniker = 1 [ - (gogoproto.jsontag) = "moniker", + string moniker = 1 [ + (gogoproto.jsontag) = "moniker", (gogoproto.moretags) = "yaml:\"moniker\"" ]; - string identity = 2 [ - (gogoproto.jsontag) = "identity", + string identity = 2 [ + (gogoproto.jsontag) = "identity", (gogoproto.moretags) = "yaml:\"identity\",omitempty" ]; - string website = 3 [ - (gogoproto.jsontag) = "website", + string website = 3 [ + (gogoproto.jsontag) = "website", (gogoproto.moretags) = "yaml:\"website\",omitempty" ]; string security_contact = 4 [ - (gogoproto.jsontag) = "security_contact", - (gogoproto.moretags) = "yaml:\"security_contact\",omitempty" ]; - string details = 5 [ - (gogoproto.jsontag) = "details", - (gogoproto.moretags) = "yaml:\"details\",omitempty" ]; -} - -message Slashing { - string wallet_address = 1 [ - (gogoproto.jsontag) = "wallet_address", - (gogoproto.moretags) = "yaml:\"wallet_address\"" - ]; - int64 value = 2 [ - (gogoproto.jsontag) = "value", - (gogoproto.moretags) = "yaml:\"value\"" - ]; -} - -//message ResourceNodes { -// repeated ResourceNode resource_nodes = 1; -//} -// -//message MetaNodes { -// repeated MetaNode meta_nodes = 1; -//} - -message TotalStakesResponse { - cosmos.base.v1beta1.Coin resource_nodes_total_stake = 1; - cosmos.base.v1beta1.Coin meta_nodes_total_stake = 2; - cosmos.base.v1beta1.Coin total_bonded_stake = 3; - cosmos.base.v1beta1.Coin total_unbonded_stake = 4; - cosmos.base.v1beta1.Coin total_unbonding_stake = 5; -} - -message StakingInfo { - string network_address = 1 [ - (gogoproto.jsontag) = "network_address", - (gogoproto.moretags) = "yaml:\"network_address\"" - ]; - google.protobuf.Any pubkey = 2 [ - (cosmos_proto.accepts_interface) = "cosmos.crypto.PubKey", - (gogoproto.jsontag) = "pubkey", - (gogoproto.moretags) = "yaml:\"pubkey\"" - ]; - bool suspend = 3 [ - (gogoproto.jsontag) = "suspend", - (gogoproto.moretags) = "yaml:\"suspend\"" - ]; - cosmos.staking.v1beta1.BondStatus status = 4 [ - (gogoproto.jsontag) = "status", - (gogoproto.moretags) = "yaml:\"status\"" ]; - string tokens = 5 [ - (gogoproto.jsontag) = "tokens", - (gogoproto.moretags) = "yaml:\"tokens\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int" - ]; - string owner_address = 6 [ - (gogoproto.jsontag) = "owner_address", - (gogoproto.moretags) = "yaml:\"owner_address\"" - ]; - Description description = 7 [ - (gogoproto.jsontag) = "description", - (gogoproto.moretags) = "yaml:\"description\"" - ]; - google.protobuf.Timestamp creation_time = 8 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true, - (gogoproto.jsontag) = "creation_time", - (gogoproto.moretags) = "yaml:\"creation_time\"" - ]; - uint32 node_type = 9 [ - (gogoproto.jsontag) = "node_type", - (gogoproto.moretags) = "yaml:\"node_type\"" - ]; - cosmos.base.v1beta1.Coin bonded_stake = 10 [ - (gogoproto.nullable) = true, - (gogoproto.jsontag) = "bonded_stake", - (gogoproto.moretags) = "yaml:\"bonded_stake\"" - ]; - cosmos.base.v1beta1.Coin un_bonding_stake = 11 [ - (gogoproto.nullable) = true, - (gogoproto.jsontag) = "un_bonding_stake", - (gogoproto.moretags) = "yaml:\"un_bonding_stake\"" - ]; - cosmos.base.v1beta1.Coin un_bonded_stake = 12 [ - (gogoproto.nullable) = true, - (gogoproto.jsontag) = "un_bonded_stake", - (gogoproto.moretags) = "yaml:\"un_bonded_stake\"" - ]; - + (gogoproto.jsontag) = "security_contact", + (gogoproto.moretags) = "yaml:\"security_contact\",omitempty"]; + string details = 5 [ + (gogoproto.jsontag) = "details", + (gogoproto.moretags) = "yaml:\"details\",omitempty"]; } // UnbondingNode stores all of a single delegator's unbonding bonds // for a single unbonding node in a time-ordered list message UnbondingNode { - string network_addr = 1 [ - (gogoproto.jsontag) = "network_addr", + string network_addr = 1 [ + (gogoproto.jsontag) = "network_addr", (gogoproto.moretags) = "yaml:\"network_addr\"" ]; bool is_meta_node = 2 [ - (gogoproto.jsontag) = "is_meta_node", + (gogoproto.jsontag) = "is_meta_node", (gogoproto.moretags) = "yaml:\"is_meta_node\"" ]; - repeated UnbondingNodeEntry entries = 3 [ - (gogoproto.jsontag) = "entries", + repeated UnbondingNodeEntry entries = 3 [ + (gogoproto.jsontag) = "entries", (gogoproto.moretags) = "yaml:\"entries\"" ]; @@ -283,43 +197,20 @@ message UnbondingNodeEntry { google.protobuf.Timestamp completion_time = 2 [ (gogoproto.nullable) = false, (gogoproto.stdtime) = true, - (gogoproto.jsontag) = "creation_time", + (gogoproto.jsontag) = "creation_time", (gogoproto.moretags) = "yaml:\"creation_time\"" ]; - string initial_balance = 3 [ - (gogoproto.jsontag) = "initial_balance", + string initial_balance = 3 [ + (gogoproto.jsontag) = "initial_balance", (gogoproto.moretags) = "yaml:\"initial_balance\"", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int" ]; - string balance = 4 [ - (gogoproto.jsontag) = "balance", + string balance = 4 [ + (gogoproto.jsontag) = "balance", (gogoproto.moretags) = "yaml:\"balance\"", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int" ]; } -message Staking { -// option (gogoproto.equal) = false; -// option (gogoproto.goproto_getters) = false; -// option (gogoproto.goproto_stringer) = false; - - // network_address is the bech32-encoded address of the node. - string network_address = 1 [ - (gogoproto.jsontag) = "network_address", - (gogoproto.moretags) = "yaml:\"network_address\"" - ]; - // owner_address is the bech32-encoded address of owner of the node. - string owner_address = 2 [ - (gogoproto.jsontag) = "owner_address", - (gogoproto.moretags) = "yaml:\"owner_address\"" - ]; - // shares define the delegation shares received. - string value = 3 [ - (gogoproto.jsontag) = "value", - (gogoproto.moretags) = "yaml:\"value\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; -} diff --git a/proto/stratos/register/v1/tx.proto b/proto/stratos/register/v1/tx.proto index fe3bb316..329f6102 100644 --- a/proto/stratos/register/v1/tx.proto +++ b/proto/stratos/register/v1/tx.proto @@ -48,16 +48,16 @@ service Msg { // MsgCreateResourceNode encapsulates an MsgCreateResourceNodeTx transaction as an SDK message. message MsgCreateResourceNode { - string network_address = 1 [ + string network_address = 1 [ (gogoproto.jsontag) = "network_address", (gogoproto.moretags) = "yaml:\"network_address\"" ]; - google.protobuf.Any pubkey = 2 [ + google.protobuf.Any pubkey = 2 [ (cosmos_proto.accepts_interface) = "cosmos.crypto.PubKey", (gogoproto.jsontag) = "pubkey", (gogoproto.moretags) = "yaml:\"pubkey\"" ]; - cosmos.base.v1beta1.Coin value = 3 [ + cosmos.base.v1beta1.DecCoin value = 3 [ (gogoproto.nullable) = false, (gogoproto.jsontag) = "value", (gogoproto.moretags) = "yaml:\"value\"" @@ -81,16 +81,16 @@ message MsgCreateResourceNodeResponse {} // MsgCreateMetaNode encapsulates an MsgCreateMetaNodeTx transaction as an SDK message. message MsgCreateMetaNode { - string network_address = 1 [ + string network_address = 1 [ (gogoproto.jsontag) = "network_address", (gogoproto.moretags) = "yaml:\"network_address\"" ]; - google.protobuf.Any pubkey = 2 [ + google.protobuf.Any pubkey = 2 [ (cosmos_proto.accepts_interface) = "cosmos.crypto.PubKey", (gogoproto.jsontag) = "pubkey", (gogoproto.moretags) = "yaml:\"pubkey\"" ]; - cosmos.base.v1beta1.Coin value = 3 [ + cosmos.base.v1beta1.DecCoin value = 3 [ (gogoproto.nullable) = false, (gogoproto.jsontag) = "value", (gogoproto.moretags) = "yaml:\"value\"" @@ -111,8 +111,6 @@ message MsgCreateMetaNodeResponse {} // MsgRemoveResourceNode - encapsulates an RemoveResourceNode transaction as an SDK message message MsgRemoveResourceNode { - option (gogoproto.goproto_getters) = false; - string resource_node_address = 1 [ (gogoproto.jsontag) = "resource_node_address", (gogoproto.moretags) = "yaml:\"resource_node_address\"" @@ -128,8 +126,6 @@ message MsgRemoveResourceNodeResponse {} // MsgRemoveMetaNode - encapsulates an MsgRemoveMetaNode transaction as an SDK message message MsgRemoveMetaNode { - option (gogoproto.goproto_getters) = false; - string meta_node_address = 1 [ (gogoproto.jsontag) = "meta_node_address", (gogoproto.moretags) = "yaml:\"meta_node_address\"" @@ -146,8 +142,6 @@ message MsgRemoveMetaNodeResponse {} // MsgUpdateResourceNode defines a SDK message for updating an existing resource node. message MsgUpdateResourceNode { - option (gogoproto.goproto_getters) = false; - Description description = 1 [ (gogoproto.nullable) = false, (gogoproto.jsontag) = "description", @@ -157,11 +151,11 @@ message MsgUpdateResourceNode { (gogoproto.jsontag) = "network_address", (gogoproto.moretags) = "yaml:\"network_address\"" ]; - string owner_address = 3 [ + string owner_address = 3 [ (gogoproto.jsontag) = "owner_address", (gogoproto.moretags) = "yaml:\"owner_address\"" ]; - uint32 node_type = 4 [ + uint32 node_type = 4 [ (gogoproto.jsontag) = "node_type", (gogoproto.moretags) = "yaml:\"node_type\"" ]; @@ -173,8 +167,6 @@ message MsgUpdateResourceNodeResponse {} // MsgUpdateMetaNode defines a SDK message for updating an existing meta node. message MsgUpdateMetaNode { - option (gogoproto.goproto_getters) = false; - Description description = 1 [ (gogoproto.nullable) = false, (gogoproto.jsontag) = "description", @@ -196,21 +188,20 @@ message MsgUpdateMetaNodeResponse {} // MsgUpdateResourceNodeStake defines a SDK message for updating the stake of an existing resource node. message MsgUpdateResourceNodeStake { - option (gogoproto.goproto_getters) = false; - - string network_address = 1 [ + string network_address = 1 [ (gogoproto.jsontag) = "network_address", (gogoproto.moretags) = "yaml:\"network_address\"" ]; - string owner_address = 2 [ + string owner_address = 2 [ (gogoproto.jsontag) = "owner_address", (gogoproto.moretags) = "yaml:\"owner_address\"" ]; - bool incr_stake = 3 [ + bool incr_stake = 3 [ (gogoproto.jsontag) = "incr_stake", (gogoproto.moretags) = "yaml:\"incr_stake\"" ]; - cosmos.base.v1beta1.Coin stake_delta = 4 [ + cosmos.base.v1beta1.DecCoin stake_delta = 4 [ + (gogoproto.nullable) = false, (gogoproto.jsontag) = "stake_delta", (gogoproto.moretags) = "yaml:\"stake_delta\"" ]; @@ -222,22 +213,20 @@ message MsgUpdateResourceNodeStakeResponse {} // MsgUpdateMetaNodeStake defines a SDK message for updating the stake of an existing meta node. message MsgUpdateMetaNodeStake { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string network_address = 1 [ + string network_address = 1 [ (gogoproto.jsontag) = "network_address", (gogoproto.moretags) = "yaml:\"network_address\"" ]; - string owner_address = 2 [ + string owner_address = 2 [ (gogoproto.jsontag) = "owner_address", (gogoproto.moretags) = "yaml:\"owner_address\"" ]; - bool incr_stake = 3 [ + bool incr_stake = 3 [ (gogoproto.jsontag) = "incr_stake", (gogoproto.moretags) = "yaml:\"incr_stake\"" ]; - cosmos.base.v1beta1.Coin stake_delta = 4 [ + cosmos.base.v1beta1.DecCoin stake_delta = 4 [ + (gogoproto.nullable) = false, (gogoproto.jsontag) = "stake_delta", (gogoproto.moretags) = "yaml:\"stake_delta\"" ]; @@ -248,9 +237,6 @@ message MsgUpdateMetaNodeStakeResponse {} // MsgMetaNodeRegistrationVote defines a SDK message for registration vote of an existing meta node. message MsgMetaNodeRegistrationVote { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - string candidate_network_address = 1 [ (gogoproto.jsontag) = "candidate_network_address", (gogoproto.moretags) = "yaml:\"candidate_network_address\"" diff --git a/proto/stratos/sds/v1/genesis.proto b/proto/stratos/sds/v1/genesis.proto index c8de77a7..2f89aacf 100644 --- a/proto/stratos/sds/v1/genesis.proto +++ b/proto/stratos/sds/v1/genesis.proto @@ -2,7 +2,6 @@ syntax = "proto3"; package stratos.sds.v1; import "gogoproto/gogo.proto"; - import "stratos/sds/v1/sds.proto"; option go_package = "github.com/stratosnet/stratos-chain/x/sds/types"; @@ -10,11 +9,11 @@ option go_package = "github.com/stratosnet/stratos-chain/x/sds/types"; // GenesisState defines the register module's genesis state. message GenesisState { Params params = 1 [ - (gogoproto.jsontag) = "params", + (gogoproto.jsontag) = "params", (gogoproto.moretags) = "yaml:\"params\"" ]; repeated FileUpload file_uploads = 2 [ - (gogoproto.jsontag) = "file_uploads", + (gogoproto.jsontag) = "file_uploads", (gogoproto.moretags) = "yaml:\"file_uploads\"" ]; } diff --git a/proto/stratos/sds/v1/query.proto b/proto/stratos/sds/v1/query.proto index 9e4ee12e..cb7b0181 100644 --- a/proto/stratos/sds/v1/query.proto +++ b/proto/stratos/sds/v1/query.proto @@ -1,7 +1,9 @@ syntax = "proto3"; package stratos.sds.v1; +import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; +import "cosmos/base/v1beta1/coin.proto"; import "stratos/sds/v1/sds.proto"; option go_package = "github.com/stratosnet/stratos-chain/x/sds/types"; @@ -13,13 +15,24 @@ service Query { option (google.api.http).get = "/stratos/sds/v1/file_upload/{file_hash}"; } + rpc SimPrepay(QuerySimPrepayRequest) returns (QuerySimPrepayResponse){ + option (google.api.http).get = "/stratos/sds/v1/sim_prepay"; + } + + rpc NozPrice(QueryNozPriceRequest) returns (QueryNozPriceResponse) { + option (google.api.http).get = "/stratos/sds/v1/noz_price"; + } + + rpc NozSupply(QueryNozSupplyRequest) returns (QueryNozSupplyResponse) { + option (google.api.http).get = "/stratos/sds/v1/noz_supply"; + } + // Params queries SDS module Params info. rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { option (google.api.http).get = "/stratos/sds/v1/params"; } } - // QueryFileuploadRequest is request type for the Query/Fileupload RPC method message QueryFileUploadRequest { // network_addr defines the node network address to query for. @@ -31,6 +44,52 @@ message QueryFileUploadResponse { FileInfo file_info = 1; } +message QuerySimPrepayRequest { + repeated cosmos.base.v1beta1.DecCoin amount = 1 [ + (gogoproto.jsontag) = "amount", + (gogoproto.moretags) = "yaml:\"amount\"", + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins" + ]; +} + +message QuerySimPrepayResponse { + string noz = 1 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "noz", + (gogoproto.moretags) = "yaml:\"noz\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int" + ]; +} + +message QueryNozPriceRequest {} + +message QueryNozPriceResponse { + string price = 1 [ + (gogoproto.jsontag) = "price", + (gogoproto.moretags) = "yaml:\"price\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; +} + +message QueryNozSupplyRequest {} + +message QueryNozSupplyResponse { + string remaining = 1 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "remaining", + (gogoproto.moretags) = "yaml:\"remaining\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int" + ]; + string total = 2 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "total", + (gogoproto.moretags) = "yaml:\"total\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int" + ]; +} + // QueryParamsRequest is request type for the Query/Params RPC method. message QueryParamsRequest {} diff --git a/proto/stratos/sds/v1/sds.proto b/proto/stratos/sds/v1/sds.proto index a1d3971b..65e405c8 100644 --- a/proto/stratos/sds/v1/sds.proto +++ b/proto/stratos/sds/v1/sds.proto @@ -7,20 +7,21 @@ option go_package = "github.com/stratosnet/stratos-chain/x/sds/types"; // Params defines the Register module parameters message Params { - string bond_denom = 1 [ - (gogoproto.jsontag) = "bond_denom", + string bond_denom = 1 [ + (gogoproto.jsontag) = "bond_denom", (gogoproto.moretags) = "yaml:\"bond_denom\"" ]; } message FileUpload { string file_hash = 1 [ - (gogoproto.jsontag) = "file_hash", + (gogoproto.jsontag) = "file_hash", (gogoproto.moretags) = "yaml:\"file_hash\"" ]; FileInfo file_info = 2 [ - (gogoproto.jsontag) = "file_info", - (gogoproto.moretags) = "yaml:\"file_info\"" ]; + (gogoproto.jsontag) = "file_info", + (gogoproto.moretags) = "yaml:\"file_info\"" + ]; } message FileInfo { diff --git a/proto/stratos/sds/v1/tx.proto b/proto/stratos/sds/v1/tx.proto index 442b08f5..18e60aab 100644 --- a/proto/stratos/sds/v1/tx.proto +++ b/proto/stratos/sds/v1/tx.proto @@ -3,10 +3,8 @@ package stratos.sds.v1; import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; - import "cosmos/base/v1beta1/coin.proto"; - option go_package = "github.com/stratosnet/stratos-chain/x/sds/types"; // Msg defines the sds module Msg service. @@ -20,39 +18,39 @@ service Msg { }; } - message MsgFileUpload { string file_hash = 1 [ - (gogoproto.jsontag) = "file_hash", + (gogoproto.jsontag) = "file_hash", (gogoproto.moretags) = "yaml:\"file_hash\"" ]; string from = 2 [ - (gogoproto.jsontag) = "from", + (gogoproto.jsontag) = "from", (gogoproto.moretags) = "yaml:\"from\"" ]; string reporter = 3 [ - (gogoproto.jsontag) = "reporter", + (gogoproto.jsontag) = "reporter", (gogoproto.moretags) = "yaml:\"reporter\"" ]; string uploader = 4 [ - (gogoproto.jsontag) = "uploader", + (gogoproto.jsontag) = "uploader", (gogoproto.moretags) = "yaml:\"uploader\"" ]; } +message MsgFileUploadResponse {} + message MsgPrepay { - string sender = 1 [ - (gogoproto.jsontag) = "sender", + string sender = 1 [ + (gogoproto.jsontag) = "sender", (gogoproto.moretags) = "yaml:\"sender\"" ]; - repeated cosmos.base.v1beta1.Coin coins = 2 [ - (gogoproto.jsontag) = "coins", - (gogoproto.moretags) = "yaml:\"coins\"", + repeated cosmos.base.v1beta1.DecCoin amount = 2 [ + (gogoproto.jsontag) = "amount", + (gogoproto.moretags) = "yaml:\"amount\"", (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins" ]; } -message MsgFileUploadResponse {} message MsgPrepayResponse {} \ No newline at end of file diff --git a/x/pot/client/rest/query.go b/x/pot/client/rest/query.go index 7cfe3e7c..47876524 100644 --- a/x/pot/client/rest/query.go +++ b/x/pot/client/rest/query.go @@ -9,17 +9,15 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/rest" "github.com/gorilla/mux" - "github.com/stratosnet/stratos-chain/x/pot/keeper" "github.com/stratosnet/stratos-chain/x/pot/types" ) func registerQueryRoutes(clientCtx client.Context, r *mux.Router) { - r.HandleFunc("/pot/report/epoch/{epoch}", getVolumeReportHandlerFn(clientCtx, keeper.QueryVolumeReport)).Methods("GET") - r.HandleFunc("/pot/rewards/epoch/{epoch}", getIndividualRewardsByEpochHandlerFn(clientCtx, keeper.QueryIndividualRewardsByReportEpoch)).Methods("GET") - r.HandleFunc("/pot/rewards/wallet/{walletAddress}", getRewardsByWalletAddrHandlerFn(clientCtx, keeper.QueryRewardsByWalletAddr)).Methods("GET") - r.HandleFunc("/pot/slashing/{walletAddress}", getSlashingByWalletAddressHandlerFn(clientCtx, keeper.QuerySlashingByWalletAddr)).Methods("GET") - r.HandleFunc("/pot/params", potParamsHandlerFn(clientCtx, keeper.QueryPotParams)).Methods("GET") - + r.HandleFunc("/pot/report/epoch/{epoch}", getVolumeReportHandlerFn(clientCtx, types.QueryVolumeReport)).Methods("GET") + r.HandleFunc("/pot/rewards/epoch/{epoch}", getIndividualRewardsByEpochHandlerFn(clientCtx, types.QueryIndividualRewardsByReportEpoch)).Methods("GET") + r.HandleFunc("/pot/rewards/wallet/{walletAddress}", getRewardsByWalletAddrHandlerFn(clientCtx, types.QueryRewardsByWalletAddr)).Methods("GET") + r.HandleFunc("/pot/slashing/{walletAddress}", getSlashingByWalletAddressHandlerFn(clientCtx, types.QuerySlashingByWalletAddr)).Methods("GET") + r.HandleFunc("/pot/params", potParamsHandlerFn(clientCtx, types.QueryPotParams)).Methods("GET") } // GET request handler to query params of POT module diff --git a/x/pot/keeper/distribute.go b/x/pot/keeper/distribute.go index ea7e72ad..215e7734 100644 --- a/x/pot/keeper/distribute.go +++ b/x/pot/keeper/distribute.go @@ -2,6 +2,7 @@ package keeper import ( "errors" + "sort" sdk "github.com/cosmos/cosmos-sdk/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" @@ -485,6 +486,21 @@ func (k Keeper) transferTokens(ctx sdk.Context, totalSlashed sdk.Coins) error { return nil } +// Iteration for sorting map to slice +func sortDetailMapToSlice(rewardDetailMap map[string]types.Reward) (rewardDetailList []types.Reward) { + keys := make([]string, 0, len(rewardDetailMap)) + for key := range rewardDetailMap { + keys = append(keys, key) + } + sort.Strings(keys) + + for _, key := range keys { + reward := rewardDetailMap[key] + rewardDetailList = append(rewardDetailList, reward) + } + return rewardDetailList +} + func (k Keeper) InitVariable(ctx sdk.Context) { foundationToFeeCollector = sdk.NewCoin(k.RewardDenom(ctx), sdk.ZeroInt()) unissuedPrepayToFeeCollector = sdk.NewCoin(k.BondDenom(ctx), sdk.ZeroInt()) diff --git a/x/pot/keeper/grpc_query.go b/x/pot/keeper/grpc_query.go index 20e788e9..cb361c1a 100644 --- a/x/pot/keeper/grpc_query.go +++ b/x/pot/keeper/grpc_query.go @@ -3,19 +3,21 @@ package keeper import ( "context" "fmt" - //"github.com/cosmos/cosmos-sdk/client" - //"github.com/cosmos/cosmos-sdk/client" + + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + + db "github.com/tendermint/tm-db" + "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/store/prefix" storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" pagiquery "github.com/cosmos/cosmos-sdk/types/query" + "github.com/stratosnet/stratos-chain/x/pot/types" registerkeeper "github.com/stratosnet/stratos-chain/x/register/keeper" registertypes "github.com/stratosnet/stratos-chain/x/register/types" - db "github.com/tendermint/tm-db" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" ) // Querier is used as Keeper will have duplicate methods if used directly, and gRPC names take precedence over keeper @@ -60,20 +62,20 @@ func (q Querier) VolumeReport(c context.Context, req *types.QueryVolumeReportReq }, nil } -func (q Querier) PotRewardsByEpoch(c context.Context, req *types.QueryPotRewardsByEpochRequest) (*types.QueryPotRewardsByEpochResponse, error) { +func (q Querier) RewardsByEpoch(c context.Context, req *types.QueryRewardsByEpochRequest) (*types.QueryRewardsByEpochResponse, error) { if req == nil { - return &types.QueryPotRewardsByEpochResponse{}, status.Errorf(codes.InvalidArgument, "empty request") + return &types.QueryRewardsByEpochResponse{}, status.Errorf(codes.InvalidArgument, "empty request") } queryEpoch := sdk.NewInt(req.GetEpoch()) if queryEpoch.LTE(sdk.ZeroInt()) { - return &types.QueryPotRewardsByEpochResponse{}, status.Error(codes.InvalidArgument, "epoch cannot be equal to or lower than 0") + return &types.QueryRewardsByEpochResponse{}, status.Error(codes.InvalidArgument, "epoch cannot be equal to or lower than 0") } walletAddr, err := sdk.AccAddressFromBech32(req.GetWalletAddress()) if err != nil { - return &types.QueryPotRewardsByEpochResponse{}, status.Error(codes.Internal, err.Error()) + return &types.QueryRewardsByEpochResponse{}, status.Error(codes.Internal, err.Error()) } ctx := sdk.UnwrapSDKContext(c) @@ -98,14 +100,14 @@ func (q Querier) PotRewardsByEpoch(c context.Context, req *types.QueryPotRewards return true, nil }) if err != nil { - return &types.QueryPotRewardsByEpochResponse{}, status.Error(codes.Internal, err.Error()) + return &types.QueryRewardsByEpochResponse{}, status.Error(codes.Internal, err.Error()) } height := ctx.BlockHeight() //var rewards []*types.Reward //for i, v := range res { // rewards[i] = &v //} - return &types.QueryPotRewardsByEpochResponse{Rewards: res, Height: height, Pagination: rewardsPageRes}, nil + return &types.QueryRewardsByEpochResponse{Rewards: res, Height: height, Pagination: rewardsPageRes}, nil } func UnmarshalIndividualReward(cdc codec.Codec, value []byte) (v types.Reward, err error) { @@ -231,47 +233,47 @@ func FilteredPaginate(cdc codec.Codec, return res, nil } -func (q Querier) PotRewardsByOwner(c context.Context, req *types.QueryPotRewardsByOwnerRequest) (*types.QueryPotRewardsByOwnerResponse, error) { +func (q Querier) RewardsByOwner(c context.Context, req *types.QueryRewardsByOwnerRequest) (*types.QueryRewardsByOwnerResponse, error) { if req == nil { - return &types.QueryPotRewardsByOwnerResponse{}, status.Errorf(codes.InvalidArgument, "empty request") + return &types.QueryRewardsByOwnerResponse{}, status.Errorf(codes.InvalidArgument, "empty request") } if req.GetWalletAddress() == "" { - return &types.QueryPotRewardsByOwnerResponse{}, status.Error(codes.InvalidArgument, "wallet address cannot be empty") + return &types.QueryRewardsByOwnerResponse{}, status.Error(codes.InvalidArgument, "wallet address cannot be empty") } ctx := sdk.UnwrapSDKContext(c) height := ctx.BlockHeight() walletAddr, err := sdk.AccAddressFromBech32(req.GetWalletAddress()) if err != nil { - return &types.QueryPotRewardsByOwnerResponse{}, err + return &types.QueryRewardsByOwnerResponse{}, err } immatureTotalReward := q.GetImmatureTotalReward(ctx, walletAddr) matureTotalReward := q.GetMatureTotalReward(ctx, walletAddr) - reward := types.NewPotRewardInfo(walletAddr, matureTotalReward, immatureTotalReward) - return &types.QueryPotRewardsByOwnerResponse{Rewards: &reward, Height: height}, nil + reward := types.NewRewardInfo(walletAddr, matureTotalReward, immatureTotalReward) + return &types.QueryRewardsByOwnerResponse{Rewards: &reward, Height: height}, nil } -func (q Querier) PotSlashingByOwner(c context.Context, req *types.QueryPotSlashingByOwnerRequest) (*types.QueryPotSlashingByOwnerResponse, error) { +func (q Querier) SlashingByOwner(c context.Context, req *types.QuerySlashingByOwnerRequest) (*types.QuerySlashingByOwnerResponse, error) { if req == nil { - return &types.QueryPotSlashingByOwnerResponse{}, status.Errorf(codes.InvalidArgument, "empty request") + return &types.QuerySlashingByOwnerResponse{}, status.Errorf(codes.InvalidArgument, "empty request") } if req.GetWalletAddress() == "" { - return &types.QueryPotSlashingByOwnerResponse{}, status.Error(codes.InvalidArgument, "wallet address cannot be empty") + return &types.QuerySlashingByOwnerResponse{}, status.Error(codes.InvalidArgument, "wallet address cannot be empty") } ctx := sdk.UnwrapSDKContext(c) height := ctx.BlockHeight() walletAddr, err := sdk.AccAddressFromBech32(req.GetWalletAddress()) if err != nil { - return &types.QueryPotSlashingByOwnerResponse{}, err + return &types.QuerySlashingByOwnerResponse{}, err } slashing := q.registerKeeper.GetSlashing(ctx, walletAddr).String() - return &types.QueryPotSlashingByOwnerResponse{Slashing: slashing, Height: height}, nil + return &types.QuerySlashingByOwnerResponse{Slashing: slashing, Height: height}, nil } @@ -297,7 +299,7 @@ func Paginate( } if limit == 0 { - limit = QueryDefaultLimit + limit = types.QueryDefaultLimit // count total results when the limit is zero/not supplied countTotal = true diff --git a/x/pot/keeper/querier.go b/x/pot/keeper/querier.go index e44882b7..3b4d66f8 100644 --- a/x/pot/keeper/querier.go +++ b/x/pot/keeper/querier.go @@ -14,28 +14,19 @@ import ( "github.com/stratosnet/stratos-chain/x/pot/types" ) -const ( - QueryVolumeReport = "query_volume_report" - QueryIndividualRewardsByReportEpoch = "query_pot_individual_rewards_by_report_epoch" - QueryRewardsByWalletAddr = "query_pot_rewards_by_wallet_address" - QuerySlashingByWalletAddr = "query_pot_slashing_by_wallet_address" - QueryPotParams = "query_pot_params" - QueryDefaultLimit = 100 -) - // NewQuerier creates a new querier for pot clients. func NewQuerier(k Keeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier { return func(ctx sdk.Context, path []string, req abci.RequestQuery) ([]byte, error) { switch path[0] { - case QueryVolumeReport: + case types.QueryVolumeReport: return queryVolumeReport(ctx, req, k, legacyQuerierCdc) - case QueryIndividualRewardsByReportEpoch: + case types.QueryIndividualRewardsByReportEpoch: return queryIndividualRewardsByReportEpoch(ctx, req, k, legacyQuerierCdc) - case QueryRewardsByWalletAddr: + case types.QueryRewardsByWalletAddr: return queryRewardsByWalletAddress(ctx, req, k, legacyQuerierCdc) - case QuerySlashingByWalletAddr: + case types.QuerySlashingByWalletAddr: return querySlashingByWalletAddress(ctx, req, k, legacyQuerierCdc) - case QueryPotParams: + case types.QueryPotParams: return getPotParams(ctx, req, k, legacyQuerierCdc) default: return nil, sdkerrors.Wrap(sdkerrors.ErrUnknownRequest, "unknown pot query endpoint") @@ -96,7 +87,7 @@ func queryIndividualRewardsByReportEpoch(ctx sdk.Context, req abci.RequestQuery, func (k Keeper) getIndividualRewardsByReportEpoch(ctx sdk.Context, params types.QueryIndividualRewardsByReportEpochParams) (res []types.Reward) { matureEpoch := params.Epoch.Add(sdk.NewInt(k.MatureEpoch(ctx))) - start, end := client.Paginate(params.Page, params.Limit, QueryDefaultLimit) + start, end := client.Paginate(params.Page, params.Limit, types.QueryDefaultLimit) if start < 0 || end < 0 { return nil } @@ -147,7 +138,7 @@ func queryRewardsByWalletAddress(ctx sdk.Context, req abci.RequestQuery, k Keepe // param epoch not exists immatureTotalReward := k.GetImmatureTotalReward(ctx, params.WalletAddr) matureTotalReward := k.GetMatureTotalReward(ctx, params.WalletAddr) - reward := types.NewPotRewardInfo(params.WalletAddr, matureTotalReward, immatureTotalReward) + reward := types.NewRewardInfo(params.WalletAddr, matureTotalReward, immatureTotalReward) bz, err := codec.MarshalJSONIndent(legacyQuerierCdc, reward) if err != nil { diff --git a/x/pot/keeper/utils.go b/x/pot/keeper/utils.go deleted file mode 100644 index dd2af44f..00000000 --- a/x/pot/keeper/utils.go +++ /dev/null @@ -1,22 +0,0 @@ -package keeper - -import ( - "sort" - - "github.com/stratosnet/stratos-chain/x/pot/types" -) - -// Iteration for sorting map to slice -func sortDetailMapToSlice(rewardDetailMap map[string]types.Reward) (rewardDetailList []types.Reward) { - keys := make([]string, 0, len(rewardDetailMap)) - for key := range rewardDetailMap { - keys = append(keys, key) - } - sort.Strings(keys) - - for _, key := range keys { - reward := rewardDetailMap[key] - rewardDetailList = append(rewardDetailList, reward) - } - return rewardDetailList -} diff --git a/x/pot/module.go b/x/pot/module.go index 7c0c8839..1749c188 100644 --- a/x/pot/module.go +++ b/x/pot/module.go @@ -66,7 +66,9 @@ func (AppModuleBasic) RegisterRESTRoutes(ctx client.Context, rtr *mux.Router) { // RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the pot module. func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { - types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)) + if err := types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)); err != nil { + panic(err) + } } // GetTxCmd returns the root tx command for the register module. diff --git a/x/pot/types/genesis.pb.go b/x/pot/types/genesis.pb.go index aba2d487..eaafb2e3 100644 --- a/x/pot/types/genesis.pb.go +++ b/x/pot/types/genesis.pb.go @@ -5,6 +5,7 @@ package types import ( fmt "fmt" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" @@ -109,42 +110,155 @@ func (m *GenesisState) GetIndividualRewardInfo() []*Reward { return nil } +type ImmatureTotal struct { + WalletAddress string `protobuf:"bytes,1,opt,name=wallet_address,json=walletAddress,proto3" json:"wallet_address" yaml:"wallet_address"` + Value github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=value,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"value"` +} + +func (m *ImmatureTotal) Reset() { *m = ImmatureTotal{} } +func (m *ImmatureTotal) String() string { return proto.CompactTextString(m) } +func (*ImmatureTotal) ProtoMessage() {} +func (*ImmatureTotal) Descriptor() ([]byte, []int) { + return fileDescriptor_abdde08c2564316a, []int{1} +} +func (m *ImmatureTotal) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ImmatureTotal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ImmatureTotal.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 *ImmatureTotal) XXX_Merge(src proto.Message) { + xxx_messageInfo_ImmatureTotal.Merge(m, src) +} +func (m *ImmatureTotal) XXX_Size() int { + return m.Size() +} +func (m *ImmatureTotal) XXX_DiscardUnknown() { + xxx_messageInfo_ImmatureTotal.DiscardUnknown(m) +} + +var xxx_messageInfo_ImmatureTotal proto.InternalMessageInfo + +func (m *ImmatureTotal) GetWalletAddress() string { + if m != nil { + return m.WalletAddress + } + return "" +} + +func (m *ImmatureTotal) GetValue() github_com_cosmos_cosmos_sdk_types.Coins { + if m != nil { + return m.Value + } + return nil +} + +type MatureTotal struct { + WalletAddress string `protobuf:"bytes,1,opt,name=wallet_address,json=walletAddress,proto3" json:"wallet_address" yaml:"wallet_address"` + Value github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=value,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"value"` +} + +func (m *MatureTotal) Reset() { *m = MatureTotal{} } +func (m *MatureTotal) String() string { return proto.CompactTextString(m) } +func (*MatureTotal) ProtoMessage() {} +func (*MatureTotal) Descriptor() ([]byte, []int) { + return fileDescriptor_abdde08c2564316a, []int{2} +} +func (m *MatureTotal) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MatureTotal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MatureTotal.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 *MatureTotal) XXX_Merge(src proto.Message) { + xxx_messageInfo_MatureTotal.Merge(m, src) +} +func (m *MatureTotal) XXX_Size() int { + return m.Size() +} +func (m *MatureTotal) XXX_DiscardUnknown() { + xxx_messageInfo_MatureTotal.DiscardUnknown(m) +} + +var xxx_messageInfo_MatureTotal proto.InternalMessageInfo + +func (m *MatureTotal) GetWalletAddress() string { + if m != nil { + return m.WalletAddress + } + return "" +} + +func (m *MatureTotal) GetValue() github_com_cosmos_cosmos_sdk_types.Coins { + if m != nil { + return m.Value + } + return nil +} + func init() { proto.RegisterType((*GenesisState)(nil), "stratos.pot.v1.GenesisState") + proto.RegisterType((*ImmatureTotal)(nil), "stratos.pot.v1.ImmatureTotal") + proto.RegisterType((*MatureTotal)(nil), "stratos.pot.v1.MatureTotal") } func init() { proto.RegisterFile("stratos/pot/v1/genesis.proto", fileDescriptor_abdde08c2564316a) } var fileDescriptor_abdde08c2564316a = []byte{ - // 447 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x92, 0xcd, 0x6e, 0xd3, 0x40, - 0x14, 0x85, 0x63, 0x52, 0xb2, 0x70, 0x81, 0xca, 0x6e, 0x55, 0x99, 0xd0, 0x3a, 0xc1, 0xab, 0x6c, - 0x98, 0x51, 0xca, 0x8e, 0x1d, 0x46, 0x08, 0x65, 0x51, 0x84, 0x4c, 0x57, 0x6c, 0xac, 0x89, 0x3d, - 0x4d, 0x46, 0xc4, 0x73, 0x2d, 0xcf, 0x4d, 0xa0, 0x6f, 0xc1, 0x63, 0xb1, 0x41, 0xea, 0x92, 0x55, - 0x84, 0x92, 0x37, 0xc8, 0x13, 0xa0, 0xf9, 0x41, 0xa4, 0x49, 0x76, 0xa3, 0x73, 0xce, 0x3d, 0xdf, - 0xf5, 0x78, 0xfc, 0x0b, 0x85, 0x0d, 0x43, 0x50, 0xb4, 0x06, 0xa4, 0x8b, 0x21, 0x9d, 0x70, 0xc9, - 0x95, 0x50, 0xa4, 0x6e, 0x00, 0x21, 0x7c, 0xe6, 0x5c, 0x52, 0x03, 0x92, 0xc5, 0xb0, 0x7b, 0x36, - 0x81, 0x09, 0x18, 0x8b, 0xea, 0x93, 0x4d, 0x75, 0xe3, 0x02, 0x54, 0x05, 0x8a, 0x8e, 0x99, 0xe2, - 0x74, 0x31, 0x1c, 0x73, 0x64, 0x43, 0x5a, 0x80, 0x90, 0xce, 0x8f, 0x76, 0x18, 0xba, 0xcc, 0x38, - 0xc9, 0xaf, 0x23, 0xff, 0xc9, 0x07, 0x4b, 0xfc, 0x8c, 0x0c, 0x79, 0xf8, 0xd6, 0xef, 0xd4, 0xac, - 0x61, 0x95, 0x8a, 0xbc, 0xbe, 0x37, 0x38, 0xbe, 0x3a, 0x27, 0x0f, 0x37, 0x20, 0x9f, 0x8c, 0x9b, - 0x06, 0x9b, 0x65, 0xef, 0xe9, 0x1d, 0xab, 0x66, 0x6f, 0x12, 0x9b, 0x4f, 0x32, 0x37, 0x18, 0x16, - 0x7e, 0x80, 0x80, 0x6c, 0x96, 0x57, 0x42, 0xf2, 0x32, 0x47, 0xf8, 0xca, 0x65, 0xf4, 0xc8, 0xb4, - 0x3d, 0x27, 0x76, 0x53, 0xa2, 0x37, 0x25, 0x6e, 0x53, 0xf2, 0x0e, 0x84, 0x4c, 0x2f, 0x36, 0xcb, - 0x5e, 0x64, 0x0b, 0xf7, 0xa6, 0x93, 0xec, 0xc4, 0x68, 0xd7, 0x5a, 0xba, 0xd1, 0x4a, 0xf8, 0xd1, - 0x3f, 0x9d, 0x31, 0x85, 0x79, 0xc3, 0x6b, 0x68, 0x90, 0x97, 0x39, 0xaf, 0xa1, 0x98, 0x46, 0xed, - 0xbe, 0x37, 0x68, 0xa7, 0xf1, 0x66, 0xd9, 0xeb, 0xda, 0xae, 0x03, 0xa1, 0x24, 0x0b, 0xb4, 0x9a, - 0x39, 0xf1, 0xbd, 0xd6, 0xc2, 0xca, 0x3f, 0x15, 0x55, 0xc5, 0x70, 0xde, 0xf0, 0xdc, 0xf2, 0x85, - 0xbc, 0x85, 0xe8, 0xa8, 0xdf, 0x1e, 0x1c, 0x5f, 0x5d, 0xee, 0x5e, 0xc2, 0xc8, 0x45, 0x6f, 0x74, - 0x72, 0x1b, 0x77, 0xa0, 0x23, 0xc9, 0x02, 0xb1, 0x1d, 0x1f, 0xc9, 0x5b, 0x08, 0xb9, 0x1f, 0xec, - 0xc3, 0x1e, 0x1b, 0xd8, 0x8b, 0x5d, 0xd8, 0xf5, 0x16, 0x6a, 0xeb, 0x96, 0x0e, 0x80, 0x4e, 0x76, - 0x31, 0xe0, 0x9f, 0x0b, 0x59, 0x8a, 0x85, 0x28, 0xe7, 0x6c, 0x96, 0x37, 0xfc, 0x1b, 0x6b, 0x4a, - 0xcb, 0xea, 0x18, 0xd6, 0xde, 0xdf, 0xcd, 0x4c, 0x24, 0x7d, 0xb9, 0x59, 0xf6, 0x2e, 0xdd, 0x17, - 0x1d, 0x9c, 0x4f, 0xb2, 0xb3, 0xff, 0x86, 0x1d, 0xd2, 0xc0, 0x74, 0xf4, 0x73, 0x15, 0x7b, 0xf7, - 0xab, 0xd8, 0xfb, 0xb3, 0x8a, 0xbd, 0x1f, 0xeb, 0xb8, 0x75, 0xbf, 0x8e, 0x5b, 0xbf, 0xd7, 0x71, - 0xeb, 0x0b, 0x9d, 0x08, 0x9c, 0xce, 0xc7, 0xa4, 0x80, 0x8a, 0x3a, 0xa8, 0xe4, 0xf8, 0xef, 0xf8, - 0xaa, 0x98, 0x32, 0x21, 0xe9, 0x77, 0xf3, 0x42, 0xf1, 0xae, 0xe6, 0x6a, 0xdc, 0x31, 0x2f, 0xf4, - 0xf5, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x0e, 0x3b, 0x1f, 0xdb, 0x21, 0x03, 0x00, 0x00, + // 546 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x94, 0xc1, 0x6e, 0xd3, 0x30, + 0x18, 0xc7, 0x9b, 0x75, 0xab, 0x84, 0x4b, 0x37, 0x35, 0x1b, 0x53, 0x28, 0x5b, 0x52, 0x72, 0xaa, + 0x84, 0x16, 0xd3, 0x71, 0xe3, 0xb6, 0x20, 0x84, 0x7a, 0x28, 0x42, 0x66, 0x27, 0x2e, 0x91, 0x9b, + 0x78, 0xad, 0xb5, 0xc4, 0x8e, 0x62, 0xb7, 0x63, 0x6f, 0xc1, 0x73, 0xf0, 0x1c, 0x08, 0xed, 0x82, + 0xb4, 0x23, 0xa7, 0x80, 0xda, 0x1b, 0xc7, 0x3e, 0x01, 0x8a, 0x1d, 0x44, 0x9b, 0x56, 0xdc, 0x39, + 0xd5, 0xfd, 0x7f, 0xff, 0xef, 0xff, 0xfb, 0xec, 0xba, 0x06, 0x27, 0x42, 0x66, 0x58, 0x72, 0x01, + 0x53, 0x2e, 0xe1, 0xac, 0x0f, 0xc7, 0x84, 0x11, 0x41, 0x85, 0x97, 0x66, 0x5c, 0x72, 0x73, 0xbf, + 0xac, 0x7a, 0x29, 0x97, 0xde, 0xac, 0xdf, 0x39, 0x1a, 0xf3, 0x31, 0x57, 0x25, 0x58, 0xac, 0xb4, + 0xab, 0x63, 0x87, 0x5c, 0x24, 0x5c, 0xc0, 0x11, 0x16, 0x04, 0xce, 0xfa, 0x23, 0x22, 0x71, 0x1f, + 0x86, 0x9c, 0xb2, 0xb2, 0x6e, 0x55, 0x18, 0x45, 0x98, 0xaa, 0xb8, 0xdf, 0x76, 0xc1, 0xc3, 0x37, + 0x9a, 0xf8, 0x5e, 0x62, 0x49, 0xcc, 0x0b, 0xd0, 0x48, 0x71, 0x86, 0x13, 0x61, 0x19, 0x5d, 0xa3, + 0xd7, 0x3c, 0x3f, 0xf6, 0xd6, 0x27, 0xf0, 0xde, 0xa9, 0xaa, 0xdf, 0x5e, 0xe6, 0x4e, 0xeb, 0x16, + 0x27, 0xf1, 0x4b, 0x57, 0xfb, 0x5d, 0x54, 0x36, 0x9a, 0x21, 0x68, 0x4b, 0x2e, 0x71, 0x1c, 0x24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0x68, 0xad, 0x1d, 0x8e, 0x89, 0xc0, 0xfe, 0x0d, 0x8e, + 0x63, 0x22, 0x03, 0x1c, 0x45, 0x19, 0x11, 0xfa, 0x62, 0x3d, 0xf0, 0x9f, 0xfd, 0xca, 0x9d, 0x4a, + 0x65, 0x99, 0x3b, 0x8f, 0x34, 0x74, 0x5d, 0x77, 0x51, 0x4b, 0x0b, 0x17, 0xfa, 0xbb, 0x89, 0xc1, + 0xde, 0x0c, 0xc7, 0x53, 0x62, 0xed, 0xa8, 0x5d, 0xfc, 0xe3, 0x56, 0x3d, 0xbf, 0xcb, 0x9d, 0xda, + 0xe7, 0x1f, 0x4e, 0x6f, 0x4c, 0xe5, 0x64, 0x3a, 0xf2, 0x42, 0x9e, 0xc0, 0xf2, 0xcf, 0xa2, 0x3f, + 0xce, 0x44, 0x74, 0x0d, 0xe5, 0x6d, 0x4a, 0x84, 0x6a, 0x10, 0x48, 0x27, 0xbb, 0x5f, 0x0c, 0xd0, + 0x1c, 0xfe, 0xf7, 0xdb, 0xf0, 0x07, 0x77, 0x73, 0xdb, 0xb8, 0x9f, 0xdb, 0xc6, 0xcf, 0xb9, 0x6d, + 0x7c, 0x5a, 0xd8, 0xb5, 0xfb, 0x85, 0x5d, 0xfb, 0xbe, 0xb0, 0x6b, 0x1f, 0xe0, 0x4a, 0x54, 0x79, + 0x09, 0x18, 0x91, 0x7f, 0x96, 0x67, 0xe1, 0x04, 0x53, 0x06, 0x3f, 0xaa, 0x17, 0x43, 0xe5, 0x8e, + 0x1a, 0xea, 0xc5, 0x78, 0xf1, 0x3b, 0x00, 0x00, 0xff, 0xff, 0x7f, 0x54, 0xa4, 0x8b, 0xb1, 0x04, + 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -241,6 +355,94 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *ImmatureTotal) 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 *ImmatureTotal) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ImmatureTotal) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Value) > 0 { + for iNdEx := len(m.Value) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Value[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.WalletAddress) > 0 { + i -= len(m.WalletAddress) + copy(dAtA[i:], m.WalletAddress) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.WalletAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MatureTotal) 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 *MatureTotal) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MatureTotal) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Value) > 0 { + for iNdEx := len(m.Value) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Value[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.WalletAddress) > 0 { + i -= len(m.WalletAddress) + copy(dAtA[i:], m.WalletAddress) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.WalletAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { offset -= sovGenesis(v) base := offset @@ -290,6 +492,44 @@ func (m *GenesisState) Size() (n int) { return n } +func (m *ImmatureTotal) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.WalletAddress) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + if len(m.Value) > 0 { + for _, e := range m.Value { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + return n +} + +func (m *MatureTotal) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.WalletAddress) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + if len(m.Value) > 0 { + for _, e := range m.Value { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + return n +} + func sovGenesis(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -539,6 +779,238 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { } return nil } +func (m *ImmatureTotal) 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 ErrIntOverflowGenesis + } + 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: ImmatureTotal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ImmatureTotal: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field WalletAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + 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 ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.WalletAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = append(m.Value, types.Coin{}) + if err := m.Value[len(m.Value)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MatureTotal) 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 ErrIntOverflowGenesis + } + 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: MatureTotal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MatureTotal: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field WalletAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + 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 ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.WalletAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = append(m.Value, types.Coin{}) + if err := m.Value[len(m.Value)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipGenesis(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/pot/types/msg.go b/x/pot/types/msg.go index f1957636..9c59cfa9 100644 --- a/x/pot/types/msg.go +++ b/x/pot/types/msg.go @@ -2,14 +2,8 @@ package types import ( sdk "github.com/cosmos/cosmos-sdk/types" - stratos "github.com/stratosnet/stratos-chain/types" -) -const ( - VolumeReportMsgType = "volume_report" - WithdrawMsgType = "withdraw" - LegacyWithdrawMsgType = "legacy_withdraw" - FoundationDepositMsgType = "foundation_deposit" + stratos "github.com/stratosnet/stratos-chain/types" ) // verify interface at compile time @@ -21,6 +15,14 @@ var ( _ sdk.Msg = &MsgSlashingResourceNode{} ) +const ( + TypeMsgVolumeReport = "volume_report" + TypeMsgWithdraw = "withdraw" + TypeMsgLegacyWithdraw = "legacy_withdraw" + TypeMsgFoundationDeposit = "foundation_deposit" + TypeMsgSlashingResourceNode = "slashing_resource_node" +) + // NewMsgVolumeReport creates a new MsgVolumeReport instance func NewMsgVolumeReport( walletVolumes []*SingleWalletVolume, @@ -40,22 +42,6 @@ func NewMsgVolumeReport( } } -type QueryVolumeReportRecord struct { - Reporter sdk.AccAddress - ReportReference string - TxHash string - walletVolumes []SingleWalletVolume -} - -func NewQueryVolumeReportRecord(reporter sdk.AccAddress, reportReference string, txHash string, walletVolumes []SingleWalletVolume) QueryVolumeReportRecord { - return QueryVolumeReportRecord{ - Reporter: reporter, - ReportReference: reportReference, - TxHash: txHash, - walletVolumes: walletVolumes, - } -} - // Route Implement func (msg MsgVolumeReport) Route() string { return RouterKey } @@ -71,7 +57,7 @@ func (msg MsgVolumeReport) GetSigners() []sdk.AccAddress { } // Type Implement -func (msg MsgVolumeReport) Type() string { return VolumeReportMsgType } +func (msg MsgVolumeReport) Type() string { return TypeMsgVolumeReport } // GetSignBytes gets the bytes for the message signer to sign on func (msg MsgVolumeReport) GetSignBytes() []byte { @@ -146,7 +132,7 @@ func (msg MsgWithdraw) GetSigners() []sdk.AccAddress { } // Type Implement -func (msg MsgWithdraw) Type() string { return WithdrawMsgType } +func (msg MsgWithdraw) Type() string { return TypeMsgWithdraw } // GetSignBytes gets the bytes for the message signer to sign on func (msg MsgWithdraw) GetSignBytes() []byte { @@ -191,7 +177,7 @@ func (msg MsgLegacyWithdraw) GetSigners() []sdk.AccAddress { } // Type Implement -func (msg MsgLegacyWithdraw) Type() string { return LegacyWithdrawMsgType } +func (msg MsgLegacyWithdraw) Type() string { return TypeMsgLegacyWithdraw } // GetSignBytes gets the bytes for the message signer to sign on func (msg MsgLegacyWithdraw) GetSignBytes() []byte { @@ -235,7 +221,7 @@ func (msg MsgFoundationDeposit) GetSigners() []sdk.AccAddress { } // Type Implement -func (msg MsgFoundationDeposit) Type() string { return FoundationDepositMsgType } +func (msg MsgFoundationDeposit) Type() string { return TypeMsgFoundationDeposit } // GetSignBytes gets the bytes for the message signer to sign on func (msg MsgFoundationDeposit) GetSignBytes() []byte { @@ -281,7 +267,7 @@ func (m MsgSlashingResourceNode) Route() string { } func (m MsgSlashingResourceNode) Type() string { - return "slashing_resource_node" + return TypeMsgSlashingResourceNode } func (m MsgSlashingResourceNode) ValidateBasic() error { diff --git a/x/pot/types/params.go b/x/pot/types/params.go index f1ad21cd..5e1e9834 100644 --- a/x/pot/types/params.go +++ b/x/pot/types/params.go @@ -30,8 +30,6 @@ var ( DefaultCommunityTax = sdk.NewDecWithPrec(2, 2) // 2% ) -//var _ subspace.ParamSet = &Params{} - // ParamKeyTable for pot module func ParamKeyTable() paramtypes.KeyTable { return paramtypes.NewKeyTable().RegisterParamSet(&Params{}) diff --git a/x/pot/types/pot.pb.go b/x/pot/types/pot.pb.go index bfdc7d95..a3f91768 100644 --- a/x/pot/types/pot.pb.go +++ b/x/pot/types/pot.pb.go @@ -158,110 +158,6 @@ func (m *MiningRewardParam) GetMiningReward() *types.Coin { return nil } -type ImmatureTotal struct { - WalletAddress string `protobuf:"bytes,1,opt,name=wallet_address,json=walletAddress,proto3" json:"wallet_address" yaml:"wallet_address"` - Value github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=value,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"value"` -} - -func (m *ImmatureTotal) Reset() { *m = ImmatureTotal{} } -func (m *ImmatureTotal) String() string { return proto.CompactTextString(m) } -func (*ImmatureTotal) ProtoMessage() {} -func (*ImmatureTotal) Descriptor() ([]byte, []int) { - return fileDescriptor_a05930b44d981057, []int{2} -} -func (m *ImmatureTotal) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ImmatureTotal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ImmatureTotal.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 *ImmatureTotal) XXX_Merge(src proto.Message) { - xxx_messageInfo_ImmatureTotal.Merge(m, src) -} -func (m *ImmatureTotal) XXX_Size() int { - return m.Size() -} -func (m *ImmatureTotal) XXX_DiscardUnknown() { - xxx_messageInfo_ImmatureTotal.DiscardUnknown(m) -} - -var xxx_messageInfo_ImmatureTotal proto.InternalMessageInfo - -func (m *ImmatureTotal) GetWalletAddress() string { - if m != nil { - return m.WalletAddress - } - return "" -} - -func (m *ImmatureTotal) GetValue() github_com_cosmos_cosmos_sdk_types.Coins { - if m != nil { - return m.Value - } - return nil -} - -type MatureTotal struct { - WalletAddress string `protobuf:"bytes,1,opt,name=wallet_address,json=walletAddress,proto3" json:"wallet_address" yaml:"wallet_address"` - Value github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=value,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"value"` -} - -func (m *MatureTotal) Reset() { *m = MatureTotal{} } -func (m *MatureTotal) String() string { return proto.CompactTextString(m) } -func (*MatureTotal) ProtoMessage() {} -func (*MatureTotal) Descriptor() ([]byte, []int) { - return fileDescriptor_a05930b44d981057, []int{3} -} -func (m *MatureTotal) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MatureTotal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MatureTotal.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 *MatureTotal) XXX_Merge(src proto.Message) { - xxx_messageInfo_MatureTotal.Merge(m, src) -} -func (m *MatureTotal) XXX_Size() int { - return m.Size() -} -func (m *MatureTotal) XXX_DiscardUnknown() { - xxx_messageInfo_MatureTotal.DiscardUnknown(m) -} - -var xxx_messageInfo_MatureTotal proto.InternalMessageInfo - -func (m *MatureTotal) GetWalletAddress() string { - if m != nil { - return m.WalletAddress - } - return "" -} - -func (m *MatureTotal) GetValue() github_com_cosmos_cosmos_sdk_types.Coins { - if m != nil { - return m.Value - } - return nil -} - type Reward struct { WalletAddress string `protobuf:"bytes,1,opt,name=wallet_address,json=walletAddress,proto3" json:"wallet_address" yaml:"wallet_address"` RewardFromMiningPool github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=reward_from_mining_pool,json=rewardFromMiningPool,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"reward_from_mining_pool" yaml:"reward_from_mining_pool"` @@ -272,7 +168,7 @@ func (m *Reward) Reset() { *m = Reward{} } func (m *Reward) String() string { return proto.CompactTextString(m) } func (*Reward) ProtoMessage() {} func (*Reward) Descriptor() ([]byte, []int) { - return fileDescriptor_a05930b44d981057, []int{4} + return fileDescriptor_a05930b44d981057, []int{2} } func (m *Reward) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -331,7 +227,7 @@ func (m *SingleWalletVolume) Reset() { *m = SingleWalletVolume{} } func (m *SingleWalletVolume) String() string { return proto.CompactTextString(m) } func (*SingleWalletVolume) ProtoMessage() {} func (*SingleWalletVolume) Descriptor() ([]byte, []int) { - return fileDescriptor_a05930b44d981057, []int{5} + return fileDescriptor_a05930b44d981057, []int{3} } func (m *SingleWalletVolume) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -368,14 +264,14 @@ func (m *SingleWalletVolume) GetWalletAddress() string { } type WalletVolumes struct { - Volumes []*SingleWalletVolume `protobuf:"bytes,1,rep,name=Volumes,proto3" json:"volumes" yaml:"volumes"` + Volumes []*SingleWalletVolume `protobuf:"bytes,1,rep,name=volumes,proto3" json:"volumes" yaml:"volumes"` } func (m *WalletVolumes) Reset() { *m = WalletVolumes{} } func (m *WalletVolumes) String() string { return proto.CompactTextString(m) } func (*WalletVolumes) ProtoMessage() {} func (*WalletVolumes) Descriptor() ([]byte, []int) { - return fileDescriptor_a05930b44d981057, []int{6} + return fileDescriptor_a05930b44d981057, []int{4} } func (m *WalletVolumes) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -421,7 +317,7 @@ func (m *VolumeReportRecord) Reset() { *m = VolumeReportRecord{} } func (m *VolumeReportRecord) String() string { return proto.CompactTextString(m) } func (*VolumeReportRecord) ProtoMessage() {} func (*VolumeReportRecord) Descriptor() ([]byte, []int) { - return fileDescriptor_a05930b44d981057, []int{7} + return fileDescriptor_a05930b44d981057, []int{5} } func (m *VolumeReportRecord) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -471,154 +367,83 @@ func (m *VolumeReportRecord) GetTxHash() string { return "" } -type BLSSignatureInfo struct { - PubKeys [][]byte `protobuf:"bytes,1,rep,name=pub_keys,json=pubKeys,proto3" json:"pub_keys" yaml:"pub_keys"` - Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature" yaml:"signature"` - TxData []byte `protobuf:"bytes,3,opt,name=txData,proto3" json:"tx_data" yaml:"tx_data"` -} - -func (m *BLSSignatureInfo) Reset() { *m = BLSSignatureInfo{} } -func (m *BLSSignatureInfo) String() string { return proto.CompactTextString(m) } -func (*BLSSignatureInfo) ProtoMessage() {} -func (*BLSSignatureInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_a05930b44d981057, []int{8} -} -func (m *BLSSignatureInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BLSSignatureInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BLSSignatureInfo.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 *BLSSignatureInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_BLSSignatureInfo.Merge(m, src) -} -func (m *BLSSignatureInfo) XXX_Size() int { - return m.Size() -} -func (m *BLSSignatureInfo) XXX_DiscardUnknown() { - xxx_messageInfo_BLSSignatureInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_BLSSignatureInfo proto.InternalMessageInfo - -func (m *BLSSignatureInfo) GetPubKeys() [][]byte { - if m != nil { - return m.PubKeys - } - return nil -} - -func (m *BLSSignatureInfo) GetSignature() []byte { - if m != nil { - return m.Signature - } - return nil -} - -func (m *BLSSignatureInfo) GetTxData() []byte { - if m != nil { - return m.TxData - } - return nil -} - func init() { proto.RegisterType((*Params)(nil), "stratos.pot.v1.Params") proto.RegisterType((*MiningRewardParam)(nil), "stratos.pot.v1.MiningRewardParam") - proto.RegisterType((*ImmatureTotal)(nil), "stratos.pot.v1.ImmatureTotal") - proto.RegisterType((*MatureTotal)(nil), "stratos.pot.v1.MatureTotal") proto.RegisterType((*Reward)(nil), "stratos.pot.v1.Reward") proto.RegisterType((*SingleWalletVolume)(nil), "stratos.pot.v1.SingleWalletVolume") proto.RegisterType((*WalletVolumes)(nil), "stratos.pot.v1.WalletVolumes") proto.RegisterType((*VolumeReportRecord)(nil), "stratos.pot.v1.VolumeReportRecord") - proto.RegisterType((*BLSSignatureInfo)(nil), "stratos.pot.v1.BLSSignatureInfo") } func init() { proto.RegisterFile("stratos/pot/v1/pot.proto", fileDescriptor_a05930b44d981057) } var fileDescriptor_a05930b44d981057 = []byte{ - // 1142 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x57, 0x4f, 0x6f, 0x1b, 0x45, - 0x14, 0xcf, 0xd6, 0xad, 0xd3, 0x4c, 0xec, 0xfe, 0x19, 0x52, 0xd5, 0x14, 0xf0, 0xa4, 0x53, 0x54, - 0x22, 0x55, 0xf5, 0x92, 0x22, 0x40, 0x2a, 0x07, 0x84, 0x9b, 0x20, 0x02, 0x04, 0x45, 0x93, 0xa8, - 0x45, 0x45, 0x68, 0x35, 0xde, 0x9d, 0x38, 0xab, 0xec, 0xce, 0x58, 0xbb, 0x63, 0xd7, 0x91, 0xb8, - 0x70, 0xe0, 0x80, 0xc4, 0x81, 0xcf, 0xc1, 0x97, 0xe0, 0x00, 0x2a, 0x3d, 0x96, 0x1b, 0x70, 0x18, - 0x20, 0x01, 0x21, 0xf9, 0xc6, 0x7e, 0x02, 0xb4, 0x33, 0xe3, 0x7f, 0x49, 0x9d, 0x38, 0x87, 0x1e, - 0x38, 0x79, 0xe6, 0xf7, 0xde, 0xfc, 0xde, 0xfe, 0xde, 0x7b, 0xfb, 0x3c, 0x0b, 0x2a, 0xa9, 0x4c, - 0xa8, 0x14, 0xa9, 0xdb, 0x12, 0xd2, 0xed, 0x2c, 0xe7, 0x3f, 0xb5, 0x56, 0x22, 0xa4, 0x80, 0x17, - 0xac, 0xa5, 0x96, 0x43, 0x9d, 0xe5, 0x6b, 0x0b, 0x4d, 0xd1, 0x14, 0xda, 0xe4, 0xe6, 0x2b, 0xe3, - 0x75, 0xad, 0xea, 0x8b, 0x34, 0x16, 0xa9, 0xdb, 0xa0, 0x29, 0x73, 0x3b, 0xcb, 0x0d, 0x26, 0xe9, - 0xb2, 0xeb, 0x8b, 0x90, 0x1b, 0x3b, 0xfe, 0xb7, 0x00, 0x8a, 0x1b, 0x34, 0xa1, 0x71, 0x0a, 0xeb, - 0x00, 0x34, 0x04, 0x0f, 0xbc, 0x80, 0x71, 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3, 0xe2, 0x79, 0x28, 0xf8, 0xde, 0x01, - 0x57, 0xed, 0xbf, 0xcf, 0x76, 0x22, 0x62, 0xcf, 0xce, 0xab, 0x96, 0x10, 0xd1, 0xc9, 0xa2, 0xe2, - 0x5c, 0x54, 0x4f, 0xa1, 0x49, 0x0c, 0xc3, 0x11, 0x3f, 0xc1, 0x01, 0x9f, 0x2a, 0x23, 0x0b, 0x86, - 0xe5, 0xfd, 0x44, 0xc4, 0xe6, 0xbf, 0x68, 0x43, 0x88, 0x08, 0xfe, 0xe0, 0x80, 0xca, 0x28, 0xbd, - 0x4c, 0xe8, 0xf6, 0x76, 0xe8, 0x1b, 0x09, 0x85, 0x93, 0x24, 0x08, 0x2b, 0x61, 0x22, 0x45, 0xa6, - 0x10, 0x3a, 0xaa, 0x61, 0xd4, 0xe3, 0x74, 0x22, 0xae, 0x0c, 0x45, 0x6c, 0x19, 0x92, 0x5c, 0x05, - 0xfe, 0xc9, 0x01, 0x70, 0x33, 0xe4, 0xcd, 0x88, 0x3d, 0xd0, 0xf5, 0xb9, 0x2f, 0xa2, 0x76, 0xcc, - 0x9e, 0x4b, 0xc9, 0x3f, 0x07, 0xc5, 0x8e, 0x66, 0xb7, 0x57, 0xad, 0xd5, 0x53, 0x4d, 0x25, 0x7b, - 0x36, 0x53, 0xa8, 0x6c, 0xa2, 0x99, 0x3d, 0x26, 0xd6, 0x80, 0x23, 0x50, 0x1e, 0x95, 0x90, 0xc2, - 0xcf, 0xc0, 0xac, 0x5d, 0x56, 0x1c, 0x5d, 0x0e, 0x7c, 0xf8, 0xea, 0x74, 0x54, 0x78, 0xfd, 0x95, - 0x9e, 0x42, 0xb3, 0x86, 0x31, 0x57, 0x76, 0x61, 0x34, 0x56, 0x8a, 0x49, 0x9f, 0x11, 0xff, 0xed, - 0x00, 0x68, 0xd6, 0x84, 0xb5, 0x44, 0x22, 0x09, 0xf3, 0x45, 0x12, 0xc0, 0x77, 0xc0, 0xf9, 0x44, - 0xef, 0x59, 0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0xce, 0xfc, 0x72, 0x50, 0x9d, 0x79, 0xe8, - 0x8e, 0xf4, 0xa0, 0x6d, 0x10, 0xce, 0x64, 0x7f, 0x79, 0x5b, 0xdf, 0x4a, 0xdc, 0xae, 0xfe, 0xaa, - 0xd1, 0x0d, 0xd9, 0x28, 0xea, 0xef, 0x91, 0x37, 0xfe, 0x0b, 0x00, 0x00, 0xff, 0xff, 0x12, 0x11, - 0x26, 0x8b, 0xf1, 0x0c, 0x00, 0x00, + // 1009 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x4f, 0x6f, 0x1b, 0x45, + 0x14, 0xcf, 0xd6, 0xc5, 0x21, 0x93, 0x3f, 0xa5, 0x43, 0xa2, 0x98, 0x02, 0x9e, 0x74, 0x8a, 0x4a, + 0xa4, 0x2a, 0x5e, 0xa5, 0x48, 0x20, 0xc1, 0x09, 0xb7, 0x41, 0x04, 0xa9, 0x28, 0x9a, 0x46, 0x2d, + 0x2a, 0x42, 0xab, 0xf1, 0xee, 0xc4, 0x5e, 0x75, 0x77, 0xc6, 0x9a, 0x1d, 0xbb, 0x89, 0xc4, 0x85, + 0x03, 0x07, 0x24, 0x0e, 0x7c, 0x0e, 0xbe, 0x04, 0x07, 0x0e, 0xf4, 0x58, 0x6e, 0xc0, 0x61, 0x80, + 0x04, 0x84, 0xe4, 0x1b, 0xfb, 0x09, 0xd0, 0xce, 0x8c, 0xe3, 0x75, 0x52, 0xbb, 0xce, 0x81, 0xd3, + 0xee, 0xfb, 0xbd, 0x37, 0xbf, 0x37, 0xbf, 0x79, 0x6f, 0xde, 0x2e, 0xa8, 0x65, 0x4a, 0x52, 0x25, + 0x32, 0xbf, 0x2b, 0x94, 0xdf, 0xdf, 0x2e, 0x1e, 0x8d, 0xae, 0x14, 0x4a, 0xc0, 0x15, 0xe7, 0x69, + 0x14, 0x50, 0x7f, 0xfb, 0xda, 0x6a, 0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 0x6e, 0xda, 0x1d, 0x48, 0x91, 0x06, + 0xee, 0x7e, 0x74, 0x85, 0x48, 0x6a, 0x97, 0xcc, 0x60, 0x9d, 0x72, 0xaf, 0xd2, 0x62, 0xd8, 0x0d, + 0x34, 0x9a, 0xc4, 0x30, 0x1a, 0x29, 0x13, 0x02, 0xf0, 0xf7, 0xbf, 0xa3, 0xcd, 0x19, 0x0a, 0x50, + 0x64, 0xcb, 0xc8, 0xaa, 0x65, 0xf9, 0x48, 0x8a, 0xd4, 0xce, 0xbe, 0x3d, 0x21, 0x12, 0xf8, 0xa3, + 0x07, 0x6a, 0x65, 0x7a, 0x25, 0xe9, 0xc1, 0x41, 0x1c, 0x5a, 0x09, 0x95, 0x17, 0x49, 0x10, 0x4e, + 0xc2, 0x44, 0x8a, 0x5c, 0x23, 0x74, 0x5e, 0x43, 0x39, 0xe2, 0x62, 0x22, 0xd6, 0x46, 0x22, 0xf6, + 0x2d, 0x49, 0xa1, 0x02, 0xff, 0xe4, 0x01, 0x78, 0x3f, 0xe6, 0xed, 0x84, 0x3d, 0x34, 0xf5, 0x79, + 0x20, 0x92, 0x5e, 0xca, 0xfe, 0x97, 0x92, 0x7f, 0x01, 0xaa, 0x7d, 0xc3, 0xee, 0x3e, 0xed, 0x3b, + 0x17, 0xba, 0x05, 0x6e, 0x6d, 0xae, 0xd1, 0xb2, 0xcd, 0x66, 0x6d, 0x4c, 0x9c, 0x03, 0x27, 0x60, + 0xb9, 0x2c, 0x21, 0x83, 0x9f, 0x83, 0x79, 0xeb, 0x2a, 0x36, 0x5f, 0x94, 0x03, 0x9f, 0xfd, 0x54, + 0x9f, 0x17, 0xde, 0x7c, 0x73, 0xa0, 0xd1, 0x70, 0x59, 0xae, 0xd1, 0x4a, 0x39, 0x57, 0x86, 0xc9, + 0xd0, 0x85, 0xff, 0xf6, 0x00, 0xb4, 0x4b, 0x08, 0xeb, 0x0a, 0xa9, 0x08, 0x0b, 0x85, 0x8c, 0xe0, + 0x07, 0xe0, 0x65, 0x69, 0x6c, 0x26, 0xdd, 0x89, 0xa1, 0x81, 0x46, 0xa7, 0x58, 0xae, 0xd1, 0x95, + 0x61, 0x51, 0x2d, 0x82, 0xc9, 0xa9, 0x13, 0x3e, 0x02, 0xaf, 0xd8, 0xf7, 0x40, 0xb2, 0x03, 0x26, + 0x19, 0x0f, 0x87, 0x47, 0xe5, 0x0f, 0x34, 0x3a, 0xe7, 0xcb, 0x35, 0x5a, 0x2f, 0x93, 0x8d, 0x3c, + 0x98, 0x5c, 0x91, 0x6e, 0x57, 0x0e, 0x81, 0xef, 0x82, 0x79, 0x75, 0x18, 0x74, 0x68, 0x66, 0x7f, + 0x86, 0x16, 0xac, 0x50, 0x07, 0x8d, 0x84, 0x3a, 0x00, 0x93, 0xaa, 0x3a, 0xfc, 0x98, 0x66, 0x9d, + 0xe6, 0xee, 0xd3, 0xe3, 0xba, 0xf7, 0xec, 0xb8, 0xee, 0xfd, 0x71, 0x5c, 0xf7, 0xbe, 0x3b, 0xa9, + 0xcf, 0x3d, 0x3b, 0xa9, 0xcf, 0xfd, 0x72, 0x52, 0x9f, 0x7b, 0xe4, 0x97, 0x4a, 0xe7, 0xce, 0x95, + 0x33, 0x35, 0x7c, 0xdd, 0x32, 0x1f, 0x0f, 0xff, 0xd0, 0xfc, 0x7c, 0x9a, 0x3a, 0xb6, 0xaa, 0xe6, + 0xb7, 0xf1, 0x9d, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0x29, 0xed, 0x79, 0xc6, 0x98, 0x0a, 0x00, + 0x00, } func (m *Params) Marshal() (dAtA []byte, err error) { @@ -782,94 +607,6 @@ func (m *MiningRewardParam) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *ImmatureTotal) 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 *ImmatureTotal) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ImmatureTotal) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Value) > 0 { - for iNdEx := len(m.Value) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Value[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintPot(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if len(m.WalletAddress) > 0 { - i -= len(m.WalletAddress) - copy(dAtA[i:], m.WalletAddress) - i = encodeVarintPot(dAtA, i, uint64(len(m.WalletAddress))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MatureTotal) 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 *MatureTotal) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MatureTotal) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Value) > 0 { - for iNdEx := len(m.Value) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Value[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintPot(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if len(m.WalletAddress) > 0 { - i -= len(m.WalletAddress) - copy(dAtA[i:], m.WalletAddress) - i = encodeVarintPot(dAtA, i, uint64(len(m.WalletAddress))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - func (m *Reward) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1051,52 +788,6 @@ func (m *VolumeReportRecord) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *BLSSignatureInfo) 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 *BLSSignatureInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BLSSignatureInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.TxData) > 0 { - i -= len(m.TxData) - copy(dAtA[i:], m.TxData) - i = encodeVarintPot(dAtA, i, uint64(len(m.TxData))) - i-- - dAtA[i] = 0x1a - } - if len(m.Signature) > 0 { - i -= len(m.Signature) - copy(dAtA[i:], m.Signature) - i = encodeVarintPot(dAtA, i, uint64(len(m.Signature))) - i-- - dAtA[i] = 0x12 - } - if len(m.PubKeys) > 0 { - for iNdEx := len(m.PubKeys) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.PubKeys[iNdEx]) - copy(dAtA[i:], m.PubKeys[iNdEx]) - i = encodeVarintPot(dAtA, i, uint64(len(m.PubKeys[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - func encodeVarintPot(dAtA []byte, offset int, v uint64) int { offset -= sovPot(v) base := offset @@ -1169,44 +860,6 @@ func (m *MiningRewardParam) Size() (n int) { return n } -func (m *ImmatureTotal) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.WalletAddress) - if l > 0 { - n += 1 + l + sovPot(uint64(l)) - } - if len(m.Value) > 0 { - for _, e := range m.Value { - l = e.Size() - n += 1 + l + sovPot(uint64(l)) - } - } - return n -} - -func (m *MatureTotal) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.WalletAddress) - if l > 0 { - n += 1 + l + sovPot(uint64(l)) - } - if len(m.Value) > 0 { - for _, e := range m.Value { - l = e.Size() - n += 1 + l + sovPot(uint64(l)) - } - } - return n -} - func (m *Reward) Size() (n int) { if m == nil { return 0 @@ -1285,29 +938,6 @@ func (m *VolumeReportRecord) Size() (n int) { return n } -func (m *BLSSignatureInfo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.PubKeys) > 0 { - for _, b := range m.PubKeys { - l = len(b) - n += 1 + l + sovPot(uint64(l)) - } - } - l = len(m.Signature) - if l > 0 { - n += 1 + l + sovPot(uint64(l)) - } - l = len(m.TxData) - if l > 0 { - n += 1 + l + sovPot(uint64(l)) - } - return n -} - func sovPot(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -1781,238 +1411,6 @@ func (m *MiningRewardParam) Unmarshal(dAtA []byte) error { } return nil } -func (m *ImmatureTotal) 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 ErrIntOverflowPot - } - 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: ImmatureTotal: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ImmatureTotal: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field WalletAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPot - } - 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 ErrInvalidLengthPot - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPot - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.WalletAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPot - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthPot - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthPot - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Value = append(m.Value, types.Coin{}) - if err := m.Value[len(m.Value)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipPot(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthPot - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MatureTotal) 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 ErrIntOverflowPot - } - 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: MatureTotal: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MatureTotal: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field WalletAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPot - } - 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 ErrInvalidLengthPot - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthPot - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.WalletAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPot - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthPot - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthPot - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Value = append(m.Value, types.Coin{}) - if err := m.Value[len(m.Value)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipPot(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthPot - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *Reward) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2511,156 +1909,6 @@ func (m *VolumeReportRecord) Unmarshal(dAtA []byte) error { } return nil } -func (m *BLSSignatureInfo) 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 ErrIntOverflowPot - } - 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: BLSSignatureInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BLSSignatureInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PubKeys", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPot - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthPot - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthPot - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PubKeys = append(m.PubKeys, make([]byte, postIndex-iNdEx)) - copy(m.PubKeys[len(m.PubKeys)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPot - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthPot - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthPot - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) - if m.Signature == nil { - m.Signature = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TxData", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPot - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthPot - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthPot - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TxData = append(m.TxData[:0], dAtA[iNdEx:postIndex]...) - if m.TxData == nil { - m.TxData = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipPot(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthPot - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func skipPot(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/pot/types/querier.go b/x/pot/types/querier.go index 292cf6a9..8ccd7757 100644 --- a/x/pot/types/querier.go +++ b/x/pot/types/querier.go @@ -4,13 +4,22 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" ) -// NewPotRewardInfo creates a new instance of PotRewardInfo -func NewPotRewardInfo( +const ( + QueryVolumeReport = "query_volume_report" + QueryIndividualRewardsByReportEpoch = "query_pot_individual_rewards_by_report_epoch" + QueryRewardsByWalletAddr = "query_pot_rewards_by_wallet_address" + QuerySlashingByWalletAddr = "query_pot_slashing_by_wallet_address" + QueryPotParams = "query_pot_params" + QueryDefaultLimit = 100 +) + +// NewRewardInfo creates a new instance of PotRewardInfo +func NewRewardInfo( walletAddress sdk.AccAddress, matureTotal sdk.Coins, immatureTotal sdk.Coins, -) PotRewardByOwner { - return PotRewardByOwner{ +) RewardByOwner { + return RewardByOwner{ WalletAddress: walletAddress.String(), MatureTotalReward: matureTotal, ImmatureTotalReward: immatureTotal, diff --git a/x/pot/types/query.pb.go b/x/pot/types/query.pb.go index 4f7f4d98..1ec194dc 100644 --- a/x/pot/types/query.pb.go +++ b/x/pot/types/query.pb.go @@ -78,6 +78,60 @@ func (m *QueryVolumeReportRequest) GetEpoch() int64 { return 0 } +// QueryVolumeReportResponse is response type for the Query/ResourceNode RPC method +type QueryVolumeReportResponse struct { + // node defines the the volumeReport info. + ReportInfo *ReportInfo `protobuf:"bytes,1,opt,name=report_info,json=reportInfo,proto3" json:"report_info,omitempty"` + Height int64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"` +} + +func (m *QueryVolumeReportResponse) Reset() { *m = QueryVolumeReportResponse{} } +func (m *QueryVolumeReportResponse) String() string { return proto.CompactTextString(m) } +func (*QueryVolumeReportResponse) ProtoMessage() {} +func (*QueryVolumeReportResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_c09bd09df76a68e0, []int{1} +} +func (m *QueryVolumeReportResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryVolumeReportResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryVolumeReportResponse.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 *QueryVolumeReportResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryVolumeReportResponse.Merge(m, src) +} +func (m *QueryVolumeReportResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryVolumeReportResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryVolumeReportResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryVolumeReportResponse proto.InternalMessageInfo + +func (m *QueryVolumeReportResponse) GetReportInfo() *ReportInfo { + if m != nil { + return m.ReportInfo + } + return nil +} + +func (m *QueryVolumeReportResponse) GetHeight() int64 { + if m != nil { + return m.Height + } + return 0 +} + type ReportInfo struct { Epoch int64 `protobuf:"varint,1,opt,name=epoch,proto3" json:"epoch,omitempty"` Reference string `protobuf:"bytes,2,opt,name=reference,proto3" json:"reference,omitempty"` @@ -89,7 +143,7 @@ func (m *ReportInfo) Reset() { *m = ReportInfo{} } func (m *ReportInfo) String() string { return proto.CompactTextString(m) } func (*ReportInfo) ProtoMessage() {} func (*ReportInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_c09bd09df76a68e0, []int{1} + return fileDescriptor_c09bd09df76a68e0, []int{2} } func (m *ReportInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -146,60 +200,6 @@ func (m *ReportInfo) GetReporter() string { return "" } -// QueryVolumeReportResponse is response type for the Query/ResourceNode RPC method -type QueryVolumeReportResponse struct { - // node defines the the volumeReport info. - ReportInfo *ReportInfo `protobuf:"bytes,1,opt,name=report_info,json=reportInfo,proto3" json:"report_info,omitempty"` - Height int64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"` -} - -func (m *QueryVolumeReportResponse) Reset() { *m = QueryVolumeReportResponse{} } -func (m *QueryVolumeReportResponse) String() string { return proto.CompactTextString(m) } -func (*QueryVolumeReportResponse) ProtoMessage() {} -func (*QueryVolumeReportResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c09bd09df76a68e0, []int{2} -} -func (m *QueryVolumeReportResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryVolumeReportResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryVolumeReportResponse.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 *QueryVolumeReportResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryVolumeReportResponse.Merge(m, src) -} -func (m *QueryVolumeReportResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryVolumeReportResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryVolumeReportResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryVolumeReportResponse proto.InternalMessageInfo - -func (m *QueryVolumeReportResponse) GetReportInfo() *ReportInfo { - if m != nil { - return m.ReportInfo - } - return nil -} - -func (m *QueryVolumeReportResponse) GetHeight() int64 { - if m != nil { - return m.Height - } - return 0 -} - // QueryParamsRequest is request type for the Query/Params RPC method. type QueryParamsRequest struct { } @@ -283,25 +283,25 @@ func (m *QueryParamsResponse) GetParams() *Params { return nil } -// QueryPotRewardsByEpochRequest is request type for the Query/PotRewardsByEpoch by a given epoch RPC method -type QueryPotRewardsByEpochRequest struct { +// QueryRewardsByEpochRequest is request type for the Query/RewardsByEpoch by a given epoch RPC method +type QueryRewardsByEpochRequest struct { Epoch int64 `protobuf:"varint,1,opt,name=epoch,proto3" json:"epoch,omitempty"` WalletAddress string `protobuf:"bytes,2,opt,name=wallet_address,json=walletAddress,proto3" json:"wallet_address,omitempty"` Pagination *query.PageRequest `protobuf:"bytes,3,opt,name=pagination,proto3" json:"pagination,omitempty"` } -func (m *QueryPotRewardsByEpochRequest) Reset() { *m = QueryPotRewardsByEpochRequest{} } -func (m *QueryPotRewardsByEpochRequest) String() string { return proto.CompactTextString(m) } -func (*QueryPotRewardsByEpochRequest) ProtoMessage() {} -func (*QueryPotRewardsByEpochRequest) Descriptor() ([]byte, []int) { +func (m *QueryRewardsByEpochRequest) Reset() { *m = QueryRewardsByEpochRequest{} } +func (m *QueryRewardsByEpochRequest) String() string { return proto.CompactTextString(m) } +func (*QueryRewardsByEpochRequest) ProtoMessage() {} +func (*QueryRewardsByEpochRequest) Descriptor() ([]byte, []int) { return fileDescriptor_c09bd09df76a68e0, []int{5} } -func (m *QueryPotRewardsByEpochRequest) XXX_Unmarshal(b []byte) error { +func (m *QueryRewardsByEpochRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryPotRewardsByEpochRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryRewardsByEpochRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryPotRewardsByEpochRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryRewardsByEpochRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -311,58 +311,58 @@ func (m *QueryPotRewardsByEpochRequest) XXX_Marshal(b []byte, deterministic bool return b[:n], nil } } -func (m *QueryPotRewardsByEpochRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryPotRewardsByEpochRequest.Merge(m, src) +func (m *QueryRewardsByEpochRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryRewardsByEpochRequest.Merge(m, src) } -func (m *QueryPotRewardsByEpochRequest) XXX_Size() int { +func (m *QueryRewardsByEpochRequest) XXX_Size() int { return m.Size() } -func (m *QueryPotRewardsByEpochRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryPotRewardsByEpochRequest.DiscardUnknown(m) +func (m *QueryRewardsByEpochRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryRewardsByEpochRequest.DiscardUnknown(m) } -var xxx_messageInfo_QueryPotRewardsByEpochRequest proto.InternalMessageInfo +var xxx_messageInfo_QueryRewardsByEpochRequest proto.InternalMessageInfo -func (m *QueryPotRewardsByEpochRequest) GetEpoch() int64 { +func (m *QueryRewardsByEpochRequest) GetEpoch() int64 { if m != nil { return m.Epoch } return 0 } -func (m *QueryPotRewardsByEpochRequest) GetWalletAddress() string { +func (m *QueryRewardsByEpochRequest) GetWalletAddress() string { if m != nil { return m.WalletAddress } return "" } -func (m *QueryPotRewardsByEpochRequest) GetPagination() *query.PageRequest { +func (m *QueryRewardsByEpochRequest) GetPagination() *query.PageRequest { if m != nil { return m.Pagination } return nil } -// QueryVolumeReportResponse is response type for the Query/PotRewardsByEpoch RPC method -type QueryPotRewardsByEpochResponse struct { +// QueryRewardsByEpochResponse is response type for the Query/RewardsByEpoch RPC method +type QueryRewardsByEpochResponse struct { Rewards []*Reward `protobuf:"bytes,1,rep,name=rewards,proto3" json:"rewards,omitempty"` Height int64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"` Pagination *query.PageResponse `protobuf:"bytes,3,opt,name=pagination,proto3" json:"pagination,omitempty"` } -func (m *QueryPotRewardsByEpochResponse) Reset() { *m = QueryPotRewardsByEpochResponse{} } -func (m *QueryPotRewardsByEpochResponse) String() string { return proto.CompactTextString(m) } -func (*QueryPotRewardsByEpochResponse) ProtoMessage() {} -func (*QueryPotRewardsByEpochResponse) Descriptor() ([]byte, []int) { +func (m *QueryRewardsByEpochResponse) Reset() { *m = QueryRewardsByEpochResponse{} } +func (m *QueryRewardsByEpochResponse) String() string { return proto.CompactTextString(m) } +func (*QueryRewardsByEpochResponse) ProtoMessage() {} +func (*QueryRewardsByEpochResponse) Descriptor() ([]byte, []int) { return fileDescriptor_c09bd09df76a68e0, []int{6} } -func (m *QueryPotRewardsByEpochResponse) XXX_Unmarshal(b []byte) error { +func (m *QueryRewardsByEpochResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryPotRewardsByEpochResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryRewardsByEpochResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryPotRewardsByEpochResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryRewardsByEpochResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -372,57 +372,56 @@ func (m *QueryPotRewardsByEpochResponse) XXX_Marshal(b []byte, deterministic boo return b[:n], nil } } -func (m *QueryPotRewardsByEpochResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryPotRewardsByEpochResponse.Merge(m, src) +func (m *QueryRewardsByEpochResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryRewardsByEpochResponse.Merge(m, src) } -func (m *QueryPotRewardsByEpochResponse) XXX_Size() int { +func (m *QueryRewardsByEpochResponse) XXX_Size() int { return m.Size() } -func (m *QueryPotRewardsByEpochResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryPotRewardsByEpochResponse.DiscardUnknown(m) +func (m *QueryRewardsByEpochResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryRewardsByEpochResponse.DiscardUnknown(m) } -var xxx_messageInfo_QueryPotRewardsByEpochResponse proto.InternalMessageInfo +var xxx_messageInfo_QueryRewardsByEpochResponse proto.InternalMessageInfo -func (m *QueryPotRewardsByEpochResponse) GetRewards() []*Reward { +func (m *QueryRewardsByEpochResponse) GetRewards() []*Reward { if m != nil { return m.Rewards } return nil } -func (m *QueryPotRewardsByEpochResponse) GetHeight() int64 { +func (m *QueryRewardsByEpochResponse) GetHeight() int64 { if m != nil { return m.Height } return 0 } -func (m *QueryPotRewardsByEpochResponse) GetPagination() *query.PageResponse { +func (m *QueryRewardsByEpochResponse) GetPagination() *query.PageResponse { if m != nil { return m.Pagination } return nil } -type PotRewardByOwner struct { - WalletAddress string `protobuf:"bytes,1,opt,name=wallet_address,json=walletAddress,proto3" json:"wallet_address,omitempty"` - MatureTotalReward github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=MatureTotalReward,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"MatureTotalReward"` - ImmatureTotalReward github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=ImmatureTotalReward,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"ImmatureTotalReward"` +// QueryRewardsByOwnerRequest is request type for the Query/RewardsByOwner by a given owner RPC method +type QueryRewardsByOwnerRequest struct { + WalletAddress string `protobuf:"bytes,1,opt,name=wallet_address,json=walletAddress,proto3" json:"wallet_address,omitempty"` } -func (m *PotRewardByOwner) Reset() { *m = PotRewardByOwner{} } -func (m *PotRewardByOwner) String() string { return proto.CompactTextString(m) } -func (*PotRewardByOwner) ProtoMessage() {} -func (*PotRewardByOwner) Descriptor() ([]byte, []int) { +func (m *QueryRewardsByOwnerRequest) Reset() { *m = QueryRewardsByOwnerRequest{} } +func (m *QueryRewardsByOwnerRequest) String() string { return proto.CompactTextString(m) } +func (*QueryRewardsByOwnerRequest) ProtoMessage() {} +func (*QueryRewardsByOwnerRequest) Descriptor() ([]byte, []int) { return fileDescriptor_c09bd09df76a68e0, []int{7} } -func (m *PotRewardByOwner) XXX_Unmarshal(b []byte) error { +func (m *QueryRewardsByOwnerRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *PotRewardByOwner) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryRewardsByOwnerRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_PotRewardByOwner.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryRewardsByOwnerRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -432,56 +431,43 @@ func (m *PotRewardByOwner) XXX_Marshal(b []byte, deterministic bool) ([]byte, er return b[:n], nil } } -func (m *PotRewardByOwner) XXX_Merge(src proto.Message) { - xxx_messageInfo_PotRewardByOwner.Merge(m, src) +func (m *QueryRewardsByOwnerRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryRewardsByOwnerRequest.Merge(m, src) } -func (m *PotRewardByOwner) XXX_Size() int { +func (m *QueryRewardsByOwnerRequest) XXX_Size() int { return m.Size() } -func (m *PotRewardByOwner) XXX_DiscardUnknown() { - xxx_messageInfo_PotRewardByOwner.DiscardUnknown(m) +func (m *QueryRewardsByOwnerRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryRewardsByOwnerRequest.DiscardUnknown(m) } -var xxx_messageInfo_PotRewardByOwner proto.InternalMessageInfo +var xxx_messageInfo_QueryRewardsByOwnerRequest proto.InternalMessageInfo -func (m *PotRewardByOwner) GetWalletAddress() string { +func (m *QueryRewardsByOwnerRequest) GetWalletAddress() string { if m != nil { return m.WalletAddress } return "" } -func (m *PotRewardByOwner) GetMatureTotalReward() github_com_cosmos_cosmos_sdk_types.Coins { - if m != nil { - return m.MatureTotalReward - } - return nil -} - -func (m *PotRewardByOwner) GetImmatureTotalReward() github_com_cosmos_cosmos_sdk_types.Coins { - if m != nil { - return m.ImmatureTotalReward - } - return nil +// QueryRewardsByOwnerResponse is response type for the Query/RewardsByOwner RPC method +type QueryRewardsByOwnerResponse struct { + Rewards *RewardByOwner `protobuf:"bytes,1,opt,name=rewards,proto3" json:"rewards,omitempty"` + Height int64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"` } -// QueryPotRewardsByOwnerRequest is request type for the Query/PotRewardsByOwner by a given owner RPC method -type QueryPotRewardsByOwnerRequest struct { - WalletAddress string `protobuf:"bytes,1,opt,name=wallet_address,json=walletAddress,proto3" json:"wallet_address,omitempty"` -} - -func (m *QueryPotRewardsByOwnerRequest) Reset() { *m = QueryPotRewardsByOwnerRequest{} } -func (m *QueryPotRewardsByOwnerRequest) String() string { return proto.CompactTextString(m) } -func (*QueryPotRewardsByOwnerRequest) ProtoMessage() {} -func (*QueryPotRewardsByOwnerRequest) Descriptor() ([]byte, []int) { +func (m *QueryRewardsByOwnerResponse) Reset() { *m = QueryRewardsByOwnerResponse{} } +func (m *QueryRewardsByOwnerResponse) String() string { return proto.CompactTextString(m) } +func (*QueryRewardsByOwnerResponse) ProtoMessage() {} +func (*QueryRewardsByOwnerResponse) Descriptor() ([]byte, []int) { return fileDescriptor_c09bd09df76a68e0, []int{8} } -func (m *QueryPotRewardsByOwnerRequest) XXX_Unmarshal(b []byte) error { +func (m *QueryRewardsByOwnerResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryPotRewardsByOwnerRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryRewardsByOwnerResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryPotRewardsByOwnerRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryRewardsByOwnerResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -491,43 +477,50 @@ func (m *QueryPotRewardsByOwnerRequest) XXX_Marshal(b []byte, deterministic bool return b[:n], nil } } -func (m *QueryPotRewardsByOwnerRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryPotRewardsByOwnerRequest.Merge(m, src) +func (m *QueryRewardsByOwnerResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryRewardsByOwnerResponse.Merge(m, src) } -func (m *QueryPotRewardsByOwnerRequest) XXX_Size() int { +func (m *QueryRewardsByOwnerResponse) XXX_Size() int { return m.Size() } -func (m *QueryPotRewardsByOwnerRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryPotRewardsByOwnerRequest.DiscardUnknown(m) +func (m *QueryRewardsByOwnerResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryRewardsByOwnerResponse.DiscardUnknown(m) } -var xxx_messageInfo_QueryPotRewardsByOwnerRequest proto.InternalMessageInfo +var xxx_messageInfo_QueryRewardsByOwnerResponse proto.InternalMessageInfo -func (m *QueryPotRewardsByOwnerRequest) GetWalletAddress() string { +func (m *QueryRewardsByOwnerResponse) GetRewards() *RewardByOwner { if m != nil { - return m.WalletAddress + return m.Rewards } - return "" + return nil +} + +func (m *QueryRewardsByOwnerResponse) GetHeight() int64 { + if m != nil { + return m.Height + } + return 0 } -// QueryPotRewardsByOwnerResponse is response type for the Query/PotRewardsByOwner RPC method -type QueryPotRewardsByOwnerResponse struct { - Rewards *PotRewardByOwner `protobuf:"bytes,1,opt,name=rewards,proto3" json:"rewards,omitempty"` - Height int64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"` +type RewardByOwner struct { + WalletAddress string `protobuf:"bytes,1,opt,name=wallet_address,json=walletAddress,proto3" json:"wallet_address,omitempty"` + MatureTotalReward github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=MatureTotalReward,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"MatureTotalReward"` + ImmatureTotalReward github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=ImmatureTotalReward,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"ImmatureTotalReward"` } -func (m *QueryPotRewardsByOwnerResponse) Reset() { *m = QueryPotRewardsByOwnerResponse{} } -func (m *QueryPotRewardsByOwnerResponse) String() string { return proto.CompactTextString(m) } -func (*QueryPotRewardsByOwnerResponse) ProtoMessage() {} -func (*QueryPotRewardsByOwnerResponse) Descriptor() ([]byte, []int) { +func (m *RewardByOwner) Reset() { *m = RewardByOwner{} } +func (m *RewardByOwner) String() string { return proto.CompactTextString(m) } +func (*RewardByOwner) ProtoMessage() {} +func (*RewardByOwner) Descriptor() ([]byte, []int) { return fileDescriptor_c09bd09df76a68e0, []int{9} } -func (m *QueryPotRewardsByOwnerResponse) XXX_Unmarshal(b []byte) error { +func (m *RewardByOwner) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryPotRewardsByOwnerResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *RewardByOwner) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryPotRewardsByOwnerResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_RewardByOwner.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -537,49 +530,56 @@ func (m *QueryPotRewardsByOwnerResponse) XXX_Marshal(b []byte, deterministic boo return b[:n], nil } } -func (m *QueryPotRewardsByOwnerResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryPotRewardsByOwnerResponse.Merge(m, src) +func (m *RewardByOwner) XXX_Merge(src proto.Message) { + xxx_messageInfo_RewardByOwner.Merge(m, src) } -func (m *QueryPotRewardsByOwnerResponse) XXX_Size() int { +func (m *RewardByOwner) XXX_Size() int { return m.Size() } -func (m *QueryPotRewardsByOwnerResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryPotRewardsByOwnerResponse.DiscardUnknown(m) +func (m *RewardByOwner) XXX_DiscardUnknown() { + xxx_messageInfo_RewardByOwner.DiscardUnknown(m) } -var xxx_messageInfo_QueryPotRewardsByOwnerResponse proto.InternalMessageInfo +var xxx_messageInfo_RewardByOwner proto.InternalMessageInfo -func (m *QueryPotRewardsByOwnerResponse) GetRewards() *PotRewardByOwner { +func (m *RewardByOwner) GetWalletAddress() string { if m != nil { - return m.Rewards + return m.WalletAddress + } + return "" +} + +func (m *RewardByOwner) GetMatureTotalReward() github_com_cosmos_cosmos_sdk_types.Coins { + if m != nil { + return m.MatureTotalReward } return nil } -func (m *QueryPotRewardsByOwnerResponse) GetHeight() int64 { +func (m *RewardByOwner) GetImmatureTotalReward() github_com_cosmos_cosmos_sdk_types.Coins { if m != nil { - return m.Height + return m.ImmatureTotalReward } - return 0 + return nil } -// QueryPotSlashingByOwnerRequest is request type for the Query/Slashing by a given owner RPC method -type QueryPotSlashingByOwnerRequest struct { +// QuerySlashingByOwnerRequest is request type for the Query/Slashing by a given owner RPC method +type QuerySlashingByOwnerRequest struct { WalletAddress string `protobuf:"bytes,1,opt,name=wallet_address,json=walletAddress,proto3" json:"wallet_address,omitempty"` } -func (m *QueryPotSlashingByOwnerRequest) Reset() { *m = QueryPotSlashingByOwnerRequest{} } -func (m *QueryPotSlashingByOwnerRequest) String() string { return proto.CompactTextString(m) } -func (*QueryPotSlashingByOwnerRequest) ProtoMessage() {} -func (*QueryPotSlashingByOwnerRequest) Descriptor() ([]byte, []int) { +func (m *QuerySlashingByOwnerRequest) Reset() { *m = QuerySlashingByOwnerRequest{} } +func (m *QuerySlashingByOwnerRequest) String() string { return proto.CompactTextString(m) } +func (*QuerySlashingByOwnerRequest) ProtoMessage() {} +func (*QuerySlashingByOwnerRequest) Descriptor() ([]byte, []int) { return fileDescriptor_c09bd09df76a68e0, []int{10} } -func (m *QueryPotSlashingByOwnerRequest) XXX_Unmarshal(b []byte) error { +func (m *QuerySlashingByOwnerRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryPotSlashingByOwnerRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QuerySlashingByOwnerRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryPotSlashingByOwnerRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_QuerySlashingByOwnerRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -589,43 +589,43 @@ func (m *QueryPotSlashingByOwnerRequest) XXX_Marshal(b []byte, deterministic boo return b[:n], nil } } -func (m *QueryPotSlashingByOwnerRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryPotSlashingByOwnerRequest.Merge(m, src) +func (m *QuerySlashingByOwnerRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySlashingByOwnerRequest.Merge(m, src) } -func (m *QueryPotSlashingByOwnerRequest) XXX_Size() int { +func (m *QuerySlashingByOwnerRequest) XXX_Size() int { return m.Size() } -func (m *QueryPotSlashingByOwnerRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryPotSlashingByOwnerRequest.DiscardUnknown(m) +func (m *QuerySlashingByOwnerRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySlashingByOwnerRequest.DiscardUnknown(m) } -var xxx_messageInfo_QueryPotSlashingByOwnerRequest proto.InternalMessageInfo +var xxx_messageInfo_QuerySlashingByOwnerRequest proto.InternalMessageInfo -func (m *QueryPotSlashingByOwnerRequest) GetWalletAddress() string { +func (m *QuerySlashingByOwnerRequest) GetWalletAddress() string { if m != nil { return m.WalletAddress } return "" } -// QueryPotSlashingByOwnerResponse is response type for the Query/Slashing RPC method -type QueryPotSlashingByOwnerResponse struct { +// QuerySlashingByOwnerResponse is response type for the Query/Slashing RPC method +type QuerySlashingByOwnerResponse struct { Slashing string `protobuf:"bytes,1,opt,name=slashing,proto3" json:"slashing,omitempty"` Height int64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"` } -func (m *QueryPotSlashingByOwnerResponse) Reset() { *m = QueryPotSlashingByOwnerResponse{} } -func (m *QueryPotSlashingByOwnerResponse) String() string { return proto.CompactTextString(m) } -func (*QueryPotSlashingByOwnerResponse) ProtoMessage() {} -func (*QueryPotSlashingByOwnerResponse) Descriptor() ([]byte, []int) { +func (m *QuerySlashingByOwnerResponse) Reset() { *m = QuerySlashingByOwnerResponse{} } +func (m *QuerySlashingByOwnerResponse) String() string { return proto.CompactTextString(m) } +func (*QuerySlashingByOwnerResponse) ProtoMessage() {} +func (*QuerySlashingByOwnerResponse) Descriptor() ([]byte, []int) { return fileDescriptor_c09bd09df76a68e0, []int{11} } -func (m *QueryPotSlashingByOwnerResponse) XXX_Unmarshal(b []byte) error { +func (m *QuerySlashingByOwnerResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryPotSlashingByOwnerResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QuerySlashingByOwnerResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryPotSlashingByOwnerResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_QuerySlashingByOwnerResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -635,26 +635,26 @@ func (m *QueryPotSlashingByOwnerResponse) XXX_Marshal(b []byte, deterministic bo return b[:n], nil } } -func (m *QueryPotSlashingByOwnerResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryPotSlashingByOwnerResponse.Merge(m, src) +func (m *QuerySlashingByOwnerResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySlashingByOwnerResponse.Merge(m, src) } -func (m *QueryPotSlashingByOwnerResponse) XXX_Size() int { +func (m *QuerySlashingByOwnerResponse) XXX_Size() int { return m.Size() } -func (m *QueryPotSlashingByOwnerResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryPotSlashingByOwnerResponse.DiscardUnknown(m) +func (m *QuerySlashingByOwnerResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySlashingByOwnerResponse.DiscardUnknown(m) } -var xxx_messageInfo_QueryPotSlashingByOwnerResponse proto.InternalMessageInfo +var xxx_messageInfo_QuerySlashingByOwnerResponse proto.InternalMessageInfo -func (m *QueryPotSlashingByOwnerResponse) GetSlashing() string { +func (m *QuerySlashingByOwnerResponse) GetSlashing() string { if m != nil { return m.Slashing } return "" } -func (m *QueryPotSlashingByOwnerResponse) GetHeight() int64 { +func (m *QuerySlashingByOwnerResponse) GetHeight() int64 { if m != nil { return m.Height } @@ -663,76 +663,76 @@ func (m *QueryPotSlashingByOwnerResponse) GetHeight() int64 { func init() { proto.RegisterType((*QueryVolumeReportRequest)(nil), "stratos.pot.v1.QueryVolumeReportRequest") - proto.RegisterType((*ReportInfo)(nil), "stratos.pot.v1.ReportInfo") proto.RegisterType((*QueryVolumeReportResponse)(nil), "stratos.pot.v1.QueryVolumeReportResponse") + proto.RegisterType((*ReportInfo)(nil), "stratos.pot.v1.ReportInfo") proto.RegisterType((*QueryParamsRequest)(nil), "stratos.pot.v1.QueryParamsRequest") proto.RegisterType((*QueryParamsResponse)(nil), "stratos.pot.v1.QueryParamsResponse") - proto.RegisterType((*QueryPotRewardsByEpochRequest)(nil), "stratos.pot.v1.QueryPotRewardsByEpochRequest") - proto.RegisterType((*QueryPotRewardsByEpochResponse)(nil), "stratos.pot.v1.QueryPotRewardsByEpochResponse") - proto.RegisterType((*PotRewardByOwner)(nil), "stratos.pot.v1.PotRewardByOwner") - proto.RegisterType((*QueryPotRewardsByOwnerRequest)(nil), "stratos.pot.v1.QueryPotRewardsByOwnerRequest") - proto.RegisterType((*QueryPotRewardsByOwnerResponse)(nil), "stratos.pot.v1.QueryPotRewardsByOwnerResponse") - proto.RegisterType((*QueryPotSlashingByOwnerRequest)(nil), "stratos.pot.v1.QueryPotSlashingByOwnerRequest") - proto.RegisterType((*QueryPotSlashingByOwnerResponse)(nil), "stratos.pot.v1.QueryPotSlashingByOwnerResponse") + proto.RegisterType((*QueryRewardsByEpochRequest)(nil), "stratos.pot.v1.QueryRewardsByEpochRequest") + proto.RegisterType((*QueryRewardsByEpochResponse)(nil), "stratos.pot.v1.QueryRewardsByEpochResponse") + proto.RegisterType((*QueryRewardsByOwnerRequest)(nil), "stratos.pot.v1.QueryRewardsByOwnerRequest") + proto.RegisterType((*QueryRewardsByOwnerResponse)(nil), "stratos.pot.v1.QueryRewardsByOwnerResponse") + proto.RegisterType((*RewardByOwner)(nil), "stratos.pot.v1.RewardByOwner") + proto.RegisterType((*QuerySlashingByOwnerRequest)(nil), "stratos.pot.v1.QuerySlashingByOwnerRequest") + proto.RegisterType((*QuerySlashingByOwnerResponse)(nil), "stratos.pot.v1.QuerySlashingByOwnerResponse") } func init() { proto.RegisterFile("stratos/pot/v1/query.proto", fileDescriptor_c09bd09df76a68e0) } var fileDescriptor_c09bd09df76a68e0 = []byte{ - // 847 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x96, 0xcf, 0x4f, 0x1b, 0x47, - 0x14, 0xc7, 0xbd, 0x76, 0x31, 0x30, 0xb4, 0xa8, 0x0c, 0x88, 0x2e, 0x2b, 0xba, 0x58, 0x5b, 0x51, - 0x4c, 0x2b, 0xef, 0x60, 0x7a, 0xa8, 0xd4, 0x9e, 0xea, 0x0a, 0x28, 0x87, 0xaa, 0x74, 0xfb, 0xe3, - 0x90, 0x0b, 0x1a, 0xdb, 0xc3, 0xee, 0x2a, 0xf6, 0xce, 0xb2, 0x33, 0x36, 0x58, 0x88, 0x4b, 0xce, - 0x39, 0x44, 0xc9, 0x5f, 0x10, 0x29, 0x87, 0x28, 0x39, 0xe6, 0x9f, 0xe0, 0x88, 0x94, 0x4b, 0x4e, - 0x49, 0x04, 0xf9, 0x43, 0x22, 0xcf, 0x8c, 0x7f, 0xad, 0x77, 0xb1, 0x15, 0xe5, 0xe4, 0x9d, 0x79, - 0x6f, 0xde, 0xfb, 0xcc, 0x9b, 0xef, 0xbc, 0x31, 0x30, 0x18, 0x8f, 0x30, 0xa7, 0x0c, 0x85, 0x94, - 0xa3, 0x76, 0x19, 0x9d, 0xb6, 0x48, 0xd4, 0xb1, 0xc3, 0x88, 0x72, 0x0a, 0x17, 0x95, 0xcd, 0x0e, - 0x29, 0xb7, 0xdb, 0x65, 0x63, 0xc5, 0xa5, 0x2e, 0x15, 0x26, 0xd4, 0xfd, 0x92, 0x5e, 0xc6, 0xba, - 0x4b, 0xa9, 0xdb, 0x20, 0x08, 0x87, 0x3e, 0xc2, 0x41, 0x40, 0x39, 0xe6, 0x3e, 0x0d, 0x98, 0xb2, - 0x9a, 0x35, 0xca, 0x9a, 0x94, 0xa1, 0x2a, 0x66, 0x04, 0xb5, 0xcb, 0x55, 0xc2, 0x71, 0x19, 0xd5, - 0xa8, 0x1f, 0x28, 0xfb, 0x0f, 0xc3, 0x76, 0x91, 0xbc, 0xef, 0x15, 0x62, 0xd7, 0x0f, 0x44, 0x30, - 0xe5, 0xab, 0xc7, 0x58, 0xbb, 0x58, 0xc2, 0x62, 0xed, 0x00, 0xfd, 0xef, 0xee, 0xda, 0xff, 0x69, - 0xa3, 0xd5, 0x24, 0x0e, 0x09, 0x69, 0xc4, 0x1d, 0x72, 0xda, 0x22, 0x8c, 0xc3, 0x15, 0x30, 0x43, - 0x42, 0x5a, 0xf3, 0x74, 0xad, 0xa0, 0x15, 0x73, 0x8e, 0x1c, 0x58, 0x2d, 0x00, 0xa4, 0xdb, 0x61, - 0x70, 0x42, 0x93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, 0x7d, 0x63, 0x6a, 0xef, 0x6f, 0x4c, 0xed, 0xd1, 0xad, 0x99, 0xb9, - 0xbe, 0x35, 0x33, 0x6f, 0x6e, 0xcd, 0xcc, 0x3d, 0x34, 0xd4, 0xc5, 0xd4, 0xda, 0x80, 0xf0, 0xde, - 0x67, 0xa9, 0xe6, 0x61, 0x3f, 0x40, 0xe7, 0x22, 0x9c, 0x68, 0x69, 0xd5, 0xbc, 0xf8, 0x27, 0xf3, - 0xd3, 0xc7, 0x00, 0x00, 0x00, 0xff, 0xff, 0x2a, 0x93, 0x51, 0x62, 0x91, 0x09, 0x00, 0x00, + // 840 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x96, 0xcd, 0x4e, 0xdb, 0x48, + 0x1c, 0xc0, 0xe3, 0x64, 0x09, 0x30, 0x2c, 0xac, 0x76, 0x40, 0xac, 0xf1, 0xb2, 0x06, 0x79, 0xc5, + 0xf2, 0xb5, 0xf1, 0x10, 0xf6, 0xc0, 0x61, 0x4f, 0x0b, 0xcb, 0x6e, 0x39, 0x54, 0xa5, 0x6e, 0xd5, + 0x43, 0x2f, 0x68, 0x92, 0x0c, 0xb6, 0xd5, 0xc4, 0x63, 0x3c, 0x93, 0x40, 0x84, 0xb8, 0xf4, 0x09, + 0xaa, 0xf6, 0xd2, 0x5b, 0xd5, 0x1e, 0x7b, 0xe2, 0x31, 0x38, 0x22, 0xf5, 0xd2, 0x53, 0x5b, 0x41, + 0x5f, 0xa0, 0x6f, 0x50, 0x65, 0x66, 0x12, 0x62, 0xc7, 0x21, 0x51, 0xd5, 0x53, 0xec, 0xf9, 0x7f, + 0xfd, 0xfe, 0x1f, 0xf3, 0x77, 0x80, 0xc1, 0x78, 0x84, 0x39, 0x65, 0x28, 0xa4, 0x1c, 0x35, 0x8a, + 0xe8, 0xa8, 0x4e, 0xa2, 0xa6, 0x1d, 0x46, 0x94, 0x53, 0x38, 0xa5, 0x64, 0x76, 0x48, 0xb9, 0xdd, + 0x28, 0x1a, 0x33, 0x2e, 0x75, 0xa9, 0x10, 0xa1, 0xd6, 0x93, 0xd4, 0x32, 0xe6, 0x5d, 0x4a, 0xdd, + 0x2a, 0x41, 0x38, 0xf4, 0x11, 0x0e, 0x02, 0xca, 0x31, 0xf7, 0x69, 0xc0, 0x94, 0xd4, 0x2c, 0x53, + 0x56, 0xa3, 0x0c, 0x95, 0x30, 0x23, 0xa8, 0x51, 0x2c, 0x11, 0x8e, 0x8b, 0xa8, 0x4c, 0xfd, 0x40, + 0xc9, 0xd7, 0xba, 0xe5, 0x22, 0x78, 0x47, 0x2b, 0xc4, 0xae, 0x1f, 0x08, 0x67, 0x4a, 0x57, 0x4f, + 0xb0, 0xb6, 0xb0, 0x84, 0xc4, 0xda, 0x00, 0xfa, 0xfd, 0x96, 0xed, 0x23, 0x5a, 0xad, 0xd7, 0x88, + 0x43, 0x42, 0x1a, 0x71, 0x87, 0x1c, 0xd5, 0x09, 0xe3, 0x70, 0x06, 0x8c, 0x90, 0x90, 0x96, 0x3d, + 0x5d, 0x5b, 0xd4, 0x56, 0x72, 0x8e, 0x7c, 0xb1, 0x42, 0x30, 0x97, 0x62, 0xc1, 0x42, 0x1a, 0x30, + 0x02, 0xff, 0x06, 0x13, 0x91, 0x38, 0x39, 0xf0, 0x83, 0x43, 0x2a, 0x0c, 0x27, 0x36, 0x0d, 0x3b, + 0x5e, 0x0e, 0x5b, 0x1a, 0xed, 0x05, 0x87, 0xd4, 0x01, 0x51, 0xe7, 0x19, 0xce, 0x82, 0xbc, 0x47, + 0x7c, 0xd7, 0xe3, 0x7a, 0x56, 0x04, 0x54, 0x6f, 0x56, 0x1d, 0x80, 0x1b, 0x8b, 0x74, 0x2a, 0x38, + 0x0f, 0xc6, 0x23, 0x72, 0x48, 0x22, 0x12, 0x94, 0x89, 0x30, 0x1f, 0x77, 0x6e, 0x0e, 0xe0, 0x2f, + 0x60, 0x94, 0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0x9d, 0xe1, 0x5a, 0x6a, 0xb0, 0xd4, 0xbd, 0x64, 0xac, 0x0f, 0xa5, 0x3b, 0x08, 0x4d, 0x5d, 0x08, + 0x24, 0x98, 0x3a, 0x68, 0x6f, 0xba, 0xd1, 0xe4, 0x3d, 0x18, 0x80, 0xd6, 0xdd, 0xf3, 0x41, 0x68, + 0xb1, 0xce, 0x5a, 0x5b, 0x02, 0xad, 0x08, 0x51, 0x3f, 0x34, 0x39, 0x28, 0xe8, 0x34, 0x3e, 0x46, + 0x67, 0xf0, 0x95, 0x06, 0x7e, 0x4a, 0x8c, 0x0b, 0x4c, 0x8f, 0x9c, 0x3e, 0x9a, 0xc6, 0x9f, 0xc3, + 0x29, 0x2b, 0xce, 0xa2, 0xe0, 0x5c, 0x87, 0xab, 0x49, 0xce, 0xf6, 0x1c, 0xf6, 0x12, 0x1e, 0x81, + 0xbc, 0xfc, 0xd6, 0x40, 0x2b, 0x35, 0x54, 0xec, 0x73, 0x66, 0xfc, 0x7e, 0xab, 0x8e, 0xa2, 0x30, + 0x05, 0x85, 0x0e, 0x67, 0x93, 0x14, 0xf2, 0x63, 0xb6, 0xbd, 0x77, 0x71, 0x65, 0x6a, 0x97, 0x57, + 0xa6, 0xf6, 0xe9, 0xca, 0xd4, 0x9e, 0x5d, 0x9b, 0x99, 0xcb, 0x6b, 0x33, 0xf3, 0xfe, 0xda, 0xcc, + 0x3c, 0x46, 0x5d, 0xd7, 0x5c, 0xd9, 0x06, 0x84, 0xb7, 0x1f, 0x0b, 0x65, 0x0f, 0xfb, 0x01, 0x3a, + 0x11, 0xee, 0xc4, 0x9d, 0x2f, 0xe5, 0xc5, 0xdf, 0x92, 0xbf, 0xbe, 0x06, 0x00, 0x00, 0xff, 0xff, + 0x53, 0x30, 0x78, 0x78, 0x5e, 0x09, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -749,12 +749,12 @@ const _ = grpc.SupportPackageIsVersion4 type QueryClient interface { // VolumeReport queries VolumeReport info for given epoch. VolumeReport(ctx context.Context, in *QueryVolumeReportRequest, opts ...grpc.CallOption) (*QueryVolumeReportResponse, error) - // PotRewardsByEpoch queries Pot rewards by a given epoch. - PotRewardsByEpoch(ctx context.Context, in *QueryPotRewardsByEpochRequest, opts ...grpc.CallOption) (*QueryPotRewardsByEpochResponse, error) - // PotRewardsByOwner queries Pot rewards by a given owner wallet address. - PotRewardsByOwner(ctx context.Context, in *QueryPotRewardsByOwnerRequest, opts ...grpc.CallOption) (*QueryPotRewardsByOwnerResponse, error) - // PotSlashingByOwner queries Pot Pot slashingBy by owner wallet address. - PotSlashingByOwner(ctx context.Context, in *QueryPotSlashingByOwnerRequest, opts ...grpc.CallOption) (*QueryPotSlashingByOwnerResponse, error) + // RewardsByEpoch queries Pot rewards by a given epoch. + RewardsByEpoch(ctx context.Context, in *QueryRewardsByEpochRequest, opts ...grpc.CallOption) (*QueryRewardsByEpochResponse, error) + // RewardsByOwner queries Pot rewards by a given owner wallet address. + RewardsByOwner(ctx context.Context, in *QueryRewardsByOwnerRequest, opts ...grpc.CallOption) (*QueryRewardsByOwnerResponse, error) + // SlashingByOwner queries Pot slashing by owner wallet address. + SlashingByOwner(ctx context.Context, in *QuerySlashingByOwnerRequest, opts ...grpc.CallOption) (*QuerySlashingByOwnerResponse, error) // Params queries POT module Params info. Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) } @@ -776,27 +776,27 @@ func (c *queryClient) VolumeReport(ctx context.Context, in *QueryVolumeReportReq return out, nil } -func (c *queryClient) PotRewardsByEpoch(ctx context.Context, in *QueryPotRewardsByEpochRequest, opts ...grpc.CallOption) (*QueryPotRewardsByEpochResponse, error) { - out := new(QueryPotRewardsByEpochResponse) - err := c.cc.Invoke(ctx, "/stratos.pot.v1.Query/PotRewardsByEpoch", in, out, opts...) +func (c *queryClient) RewardsByEpoch(ctx context.Context, in *QueryRewardsByEpochRequest, opts ...grpc.CallOption) (*QueryRewardsByEpochResponse, error) { + out := new(QueryRewardsByEpochResponse) + err := c.cc.Invoke(ctx, "/stratos.pot.v1.Query/RewardsByEpoch", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *queryClient) PotRewardsByOwner(ctx context.Context, in *QueryPotRewardsByOwnerRequest, opts ...grpc.CallOption) (*QueryPotRewardsByOwnerResponse, error) { - out := new(QueryPotRewardsByOwnerResponse) - err := c.cc.Invoke(ctx, "/stratos.pot.v1.Query/PotRewardsByOwner", in, out, opts...) +func (c *queryClient) RewardsByOwner(ctx context.Context, in *QueryRewardsByOwnerRequest, opts ...grpc.CallOption) (*QueryRewardsByOwnerResponse, error) { + out := new(QueryRewardsByOwnerResponse) + err := c.cc.Invoke(ctx, "/stratos.pot.v1.Query/RewardsByOwner", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *queryClient) PotSlashingByOwner(ctx context.Context, in *QueryPotSlashingByOwnerRequest, opts ...grpc.CallOption) (*QueryPotSlashingByOwnerResponse, error) { - out := new(QueryPotSlashingByOwnerResponse) - err := c.cc.Invoke(ctx, "/stratos.pot.v1.Query/PotSlashingByOwner", in, out, opts...) +func (c *queryClient) SlashingByOwner(ctx context.Context, in *QuerySlashingByOwnerRequest, opts ...grpc.CallOption) (*QuerySlashingByOwnerResponse, error) { + out := new(QuerySlashingByOwnerResponse) + err := c.cc.Invoke(ctx, "/stratos.pot.v1.Query/SlashingByOwner", in, out, opts...) if err != nil { return nil, err } @@ -816,12 +816,12 @@ func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts . type QueryServer interface { // VolumeReport queries VolumeReport info for given epoch. VolumeReport(context.Context, *QueryVolumeReportRequest) (*QueryVolumeReportResponse, error) - // PotRewardsByEpoch queries Pot rewards by a given epoch. - PotRewardsByEpoch(context.Context, *QueryPotRewardsByEpochRequest) (*QueryPotRewardsByEpochResponse, error) - // PotRewardsByOwner queries Pot rewards by a given owner wallet address. - PotRewardsByOwner(context.Context, *QueryPotRewardsByOwnerRequest) (*QueryPotRewardsByOwnerResponse, error) - // PotSlashingByOwner queries Pot Pot slashingBy by owner wallet address. - PotSlashingByOwner(context.Context, *QueryPotSlashingByOwnerRequest) (*QueryPotSlashingByOwnerResponse, error) + // RewardsByEpoch queries Pot rewards by a given epoch. + RewardsByEpoch(context.Context, *QueryRewardsByEpochRequest) (*QueryRewardsByEpochResponse, error) + // RewardsByOwner queries Pot rewards by a given owner wallet address. + RewardsByOwner(context.Context, *QueryRewardsByOwnerRequest) (*QueryRewardsByOwnerResponse, error) + // SlashingByOwner queries Pot slashing by owner wallet address. + SlashingByOwner(context.Context, *QuerySlashingByOwnerRequest) (*QuerySlashingByOwnerResponse, error) // Params queries POT module Params info. Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) } @@ -833,14 +833,14 @@ type UnimplementedQueryServer struct { func (*UnimplementedQueryServer) VolumeReport(ctx context.Context, req *QueryVolumeReportRequest) (*QueryVolumeReportResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method VolumeReport not implemented") } -func (*UnimplementedQueryServer) PotRewardsByEpoch(ctx context.Context, req *QueryPotRewardsByEpochRequest) (*QueryPotRewardsByEpochResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method PotRewardsByEpoch not implemented") +func (*UnimplementedQueryServer) RewardsByEpoch(ctx context.Context, req *QueryRewardsByEpochRequest) (*QueryRewardsByEpochResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RewardsByEpoch not implemented") } -func (*UnimplementedQueryServer) PotRewardsByOwner(ctx context.Context, req *QueryPotRewardsByOwnerRequest) (*QueryPotRewardsByOwnerResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method PotRewardsByOwner not implemented") +func (*UnimplementedQueryServer) RewardsByOwner(ctx context.Context, req *QueryRewardsByOwnerRequest) (*QueryRewardsByOwnerResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RewardsByOwner not implemented") } -func (*UnimplementedQueryServer) PotSlashingByOwner(ctx context.Context, req *QueryPotSlashingByOwnerRequest) (*QueryPotSlashingByOwnerResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method PotSlashingByOwner not implemented") +func (*UnimplementedQueryServer) SlashingByOwner(ctx context.Context, req *QuerySlashingByOwnerRequest) (*QuerySlashingByOwnerResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SlashingByOwner not implemented") } func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") @@ -868,56 +868,56 @@ func _Query_VolumeReport_Handler(srv interface{}, ctx context.Context, dec func( return interceptor(ctx, in, info, handler) } -func _Query_PotRewardsByEpoch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryPotRewardsByEpochRequest) +func _Query_RewardsByEpoch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryRewardsByEpochRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(QueryServer).PotRewardsByEpoch(ctx, in) + return srv.(QueryServer).RewardsByEpoch(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/stratos.pot.v1.Query/PotRewardsByEpoch", + FullMethod: "/stratos.pot.v1.Query/RewardsByEpoch", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).PotRewardsByEpoch(ctx, req.(*QueryPotRewardsByEpochRequest)) + return srv.(QueryServer).RewardsByEpoch(ctx, req.(*QueryRewardsByEpochRequest)) } return interceptor(ctx, in, info, handler) } -func _Query_PotRewardsByOwner_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryPotRewardsByOwnerRequest) +func _Query_RewardsByOwner_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryRewardsByOwnerRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(QueryServer).PotRewardsByOwner(ctx, in) + return srv.(QueryServer).RewardsByOwner(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/stratos.pot.v1.Query/PotRewardsByOwner", + FullMethod: "/stratos.pot.v1.Query/RewardsByOwner", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).PotRewardsByOwner(ctx, req.(*QueryPotRewardsByOwnerRequest)) + return srv.(QueryServer).RewardsByOwner(ctx, req.(*QueryRewardsByOwnerRequest)) } return interceptor(ctx, in, info, handler) } -func _Query_PotSlashingByOwner_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryPotSlashingByOwnerRequest) +func _Query_SlashingByOwner_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QuerySlashingByOwnerRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(QueryServer).PotSlashingByOwner(ctx, in) + return srv.(QueryServer).SlashingByOwner(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/stratos.pot.v1.Query/PotSlashingByOwner", + FullMethod: "/stratos.pot.v1.Query/SlashingByOwner", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).PotSlashingByOwner(ctx, req.(*QueryPotSlashingByOwnerRequest)) + return srv.(QueryServer).SlashingByOwner(ctx, req.(*QuerySlashingByOwnerRequest)) } return interceptor(ctx, in, info, handler) } @@ -949,16 +949,16 @@ var _Query_serviceDesc = grpc.ServiceDesc{ Handler: _Query_VolumeReport_Handler, }, { - MethodName: "PotRewardsByEpoch", - Handler: _Query_PotRewardsByEpoch_Handler, + MethodName: "RewardsByEpoch", + Handler: _Query_RewardsByEpoch_Handler, }, { - MethodName: "PotRewardsByOwner", - Handler: _Query_PotRewardsByOwner_Handler, + MethodName: "RewardsByOwner", + Handler: _Query_RewardsByOwner_Handler, }, { - MethodName: "PotSlashingByOwner", - Handler: _Query_PotSlashingByOwner_Handler, + MethodName: "SlashingByOwner", + Handler: _Query_SlashingByOwner_Handler, }, { MethodName: "Params", @@ -997,6 +997,46 @@ func (m *QueryVolumeReportRequest) MarshalToSizedBuffer(dAtA []byte) (int, error return len(dAtA) - i, nil } +func (m *QueryVolumeReportResponse) 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 *QueryVolumeReportResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryVolumeReportResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Height != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.Height)) + i-- + dAtA[i] = 0x10 + } + if m.ReportInfo != nil { + { + size, err := m.ReportInfo.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *ReportInfo) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1046,46 +1086,6 @@ func (m *ReportInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *QueryVolumeReportResponse) 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 *QueryVolumeReportResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryVolumeReportResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Height != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x10 - } - if m.ReportInfo != nil { - { - size, err := m.ReportInfo.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1144,7 +1144,7 @@ func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *QueryPotRewardsByEpochRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryRewardsByEpochRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1154,12 +1154,12 @@ func (m *QueryPotRewardsByEpochRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryPotRewardsByEpochRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryRewardsByEpochRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryPotRewardsByEpochRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryRewardsByEpochRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1191,7 +1191,7 @@ func (m *QueryPotRewardsByEpochRequest) MarshalToSizedBuffer(dAtA []byte) (int, return len(dAtA) - i, nil } -func (m *QueryPotRewardsByEpochResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryRewardsByEpochResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1201,12 +1201,12 @@ func (m *QueryPotRewardsByEpochResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryPotRewardsByEpochResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryRewardsByEpochResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryPotRewardsByEpochResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryRewardsByEpochResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1245,7 +1245,7 @@ func (m *QueryPotRewardsByEpochResponse) MarshalToSizedBuffer(dAtA []byte) (int, return len(dAtA) - i, nil } -func (m *PotRewardByOwner) Marshal() (dAtA []byte, err error) { +func (m *QueryRewardsByOwnerRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1255,55 +1255,27 @@ func (m *PotRewardByOwner) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *PotRewardByOwner) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryRewardsByOwnerRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *PotRewardByOwner) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryRewardsByOwnerRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.ImmatureTotalReward) > 0 { - for iNdEx := len(m.ImmatureTotalReward) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ImmatureTotalReward[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if len(m.MatureTotalReward) > 0 { - for iNdEx := len(m.MatureTotalReward) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.MatureTotalReward[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if len(m.WalletAddress) > 0 { - i -= len(m.WalletAddress) - copy(dAtA[i:], m.WalletAddress) - i = encodeVarintQuery(dAtA, i, uint64(len(m.WalletAddress))) - i-- - dAtA[i] = 0xa + if len(m.WalletAddress) > 0 { + i -= len(m.WalletAddress) + copy(dAtA[i:], m.WalletAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.WalletAddress))) + i-- + dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *QueryPotRewardsByOwnerRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryRewardsByOwnerResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1313,27 +1285,37 @@ func (m *QueryPotRewardsByOwnerRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryPotRewardsByOwnerRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryRewardsByOwnerResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryPotRewardsByOwnerRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryRewardsByOwnerResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.WalletAddress) > 0 { - i -= len(m.WalletAddress) - copy(dAtA[i:], m.WalletAddress) - i = encodeVarintQuery(dAtA, i, uint64(len(m.WalletAddress))) + if m.Height != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.Height)) + i-- + dAtA[i] = 0x10 + } + if m.Rewards != nil { + { + size, err := m.Rewards.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *QueryPotRewardsByOwnerResponse) Marshal() (dAtA []byte, err error) { +func (m *RewardByOwner) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1343,37 +1325,55 @@ func (m *QueryPotRewardsByOwnerResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryPotRewardsByOwnerResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *RewardByOwner) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryPotRewardsByOwnerResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *RewardByOwner) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.Height != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x10 + if len(m.ImmatureTotalReward) > 0 { + for iNdEx := len(m.ImmatureTotalReward) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ImmatureTotalReward[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } } - if m.Rewards != nil { - { - size, err := m.Rewards.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if len(m.MatureTotalReward) > 0 { + for iNdEx := len(m.MatureTotalReward) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.MatureTotalReward[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 } + } + if len(m.WalletAddress) > 0 { + i -= len(m.WalletAddress) + copy(dAtA[i:], m.WalletAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.WalletAddress))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *QueryPotSlashingByOwnerRequest) Marshal() (dAtA []byte, err error) { +func (m *QuerySlashingByOwnerRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1383,12 +1383,12 @@ func (m *QueryPotSlashingByOwnerRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryPotSlashingByOwnerRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QuerySlashingByOwnerRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryPotSlashingByOwnerRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QuerySlashingByOwnerRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1403,7 +1403,7 @@ func (m *QueryPotSlashingByOwnerRequest) MarshalToSizedBuffer(dAtA []byte) (int, return len(dAtA) - i, nil } -func (m *QueryPotSlashingByOwnerResponse) Marshal() (dAtA []byte, err error) { +func (m *QuerySlashingByOwnerResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1413,12 +1413,12 @@ func (m *QueryPotSlashingByOwnerResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryPotSlashingByOwnerResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QuerySlashingByOwnerResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryPotSlashingByOwnerResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QuerySlashingByOwnerResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1461,6 +1461,22 @@ func (m *QueryVolumeReportRequest) Size() (n int) { return n } +func (m *QueryVolumeReportResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ReportInfo != nil { + l = m.ReportInfo.Size() + n += 1 + l + sovQuery(uint64(l)) + } + if m.Height != 0 { + n += 1 + sovQuery(uint64(m.Height)) + } + return n +} + func (m *ReportInfo) Size() (n int) { if m == nil { return 0 @@ -1485,22 +1501,6 @@ func (m *ReportInfo) Size() (n int) { return n } -func (m *QueryVolumeReportResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ReportInfo != nil { - l = m.ReportInfo.Size() - n += 1 + l + sovQuery(uint64(l)) - } - if m.Height != 0 { - n += 1 + sovQuery(uint64(m.Height)) - } - return n -} - func (m *QueryParamsRequest) Size() (n int) { if m == nil { return 0 @@ -1523,7 +1523,7 @@ func (m *QueryParamsResponse) Size() (n int) { return n } -func (m *QueryPotRewardsByEpochRequest) Size() (n int) { +func (m *QueryRewardsByEpochRequest) Size() (n int) { if m == nil { return 0 } @@ -1543,7 +1543,7 @@ func (m *QueryPotRewardsByEpochRequest) Size() (n int) { return n } -func (m *QueryPotRewardsByEpochResponse) Size() (n int) { +func (m *QueryRewardsByEpochResponse) Size() (n int) { if m == nil { return 0 } @@ -1565,7 +1565,7 @@ func (m *QueryPotRewardsByEpochResponse) Size() (n int) { return n } -func (m *PotRewardByOwner) Size() (n int) { +func (m *QueryRewardsByOwnerRequest) Size() (n int) { if m == nil { return 0 } @@ -1575,51 +1575,51 @@ func (m *PotRewardByOwner) Size() (n int) { if l > 0 { n += 1 + l + sovQuery(uint64(l)) } - if len(m.MatureTotalReward) > 0 { - for _, e := range m.MatureTotalReward { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - if len(m.ImmatureTotalReward) > 0 { - for _, e := range m.ImmatureTotalReward { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } return n } -func (m *QueryPotRewardsByOwnerRequest) Size() (n int) { +func (m *QueryRewardsByOwnerResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.WalletAddress) - if l > 0 { + if m.Rewards != nil { + l = m.Rewards.Size() n += 1 + l + sovQuery(uint64(l)) } + if m.Height != 0 { + n += 1 + sovQuery(uint64(m.Height)) + } return n } -func (m *QueryPotRewardsByOwnerResponse) Size() (n int) { +func (m *RewardByOwner) Size() (n int) { if m == nil { return 0 } var l int _ = l - if m.Rewards != nil { - l = m.Rewards.Size() + l = len(m.WalletAddress) + if l > 0 { n += 1 + l + sovQuery(uint64(l)) } - if m.Height != 0 { - n += 1 + sovQuery(uint64(m.Height)) + if len(m.MatureTotalReward) > 0 { + for _, e := range m.MatureTotalReward { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if len(m.ImmatureTotalReward) > 0 { + for _, e := range m.ImmatureTotalReward { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } } return n } -func (m *QueryPotSlashingByOwnerRequest) Size() (n int) { +func (m *QuerySlashingByOwnerRequest) Size() (n int) { if m == nil { return 0 } @@ -1632,7 +1632,7 @@ func (m *QueryPotSlashingByOwnerRequest) Size() (n int) { return n } -func (m *QueryPotSlashingByOwnerResponse) Size() (n int) { +func (m *QuerySlashingByOwnerResponse) Size() (n int) { if m == nil { return 0 } @@ -1723,7 +1723,7 @@ func (m *QueryVolumeReportRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *ReportInfo) Unmarshal(dAtA []byte) error { +func (m *QueryVolumeReportResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1746,36 +1746,17 @@ func (m *ReportInfo) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ReportInfo: wiretype end group for non-group") + return fmt.Errorf("proto: QueryVolumeReportResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ReportInfo: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryVolumeReportResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Epoch", wireType) - } - m.Epoch = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Epoch |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Reference", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ReportInfo", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -1785,61 +1766,33 @@ func (m *ReportInfo) 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 ErrInvalidLengthQuery } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.Reference = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TxHash", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery + if m.ReportInfo == nil { + m.ReportInfo = &ReportInfo{} } - if postIndex > l { - return io.ErrUnexpectedEOF + if err := m.ReportInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - m.TxHash = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Reporter", wireType) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) } - var stringLen uint64 + m.Height = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -1849,24 +1802,11 @@ func (m *ReportInfo) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.Height |= int64(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Reporter = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -1888,7 +1828,7 @@ func (m *ReportInfo) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryVolumeReportResponse) Unmarshal(dAtA []byte) error { +func (m *ReportInfo) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1911,17 +1851,36 @@ func (m *QueryVolumeReportResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryVolumeReportResponse: wiretype end group for non-group") + return fmt.Errorf("proto: ReportInfo: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryVolumeReportResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ReportInfo: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Epoch", wireType) + } + m.Epoch = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Epoch |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ReportInfo", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Reference", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -1931,33 +1890,61 @@ func (m *QueryVolumeReportResponse) 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 ErrInvalidLengthQuery } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - if m.ReportInfo == nil { - m.ReportInfo = &ReportInfo{} + m.Reference = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TxHash", wireType) } - if err := m.ReportInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TxHash = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Reporter", wireType) } - m.Height = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -1967,11 +1954,24 @@ func (m *QueryVolumeReportResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Height |= int64(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Reporter = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -2129,7 +2129,7 @@ func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryPotRewardsByEpochRequest) Unmarshal(dAtA []byte) error { +func (m *QueryRewardsByEpochRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2152,10 +2152,10 @@ func (m *QueryPotRewardsByEpochRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryPotRewardsByEpochRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryRewardsByEpochRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryPotRewardsByEpochRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryRewardsByEpochRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -2266,7 +2266,7 @@ func (m *QueryPotRewardsByEpochRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryPotRewardsByEpochResponse) Unmarshal(dAtA []byte) error { +func (m *QueryRewardsByEpochResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2289,10 +2289,10 @@ func (m *QueryPotRewardsByEpochResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryPotRewardsByEpochResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryRewardsByEpochResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryPotRewardsByEpochResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryRewardsByEpochResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -2405,7 +2405,7 @@ func (m *QueryPotRewardsByEpochResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *PotRewardByOwner) Unmarshal(dAtA []byte) error { +func (m *QueryRewardsByOwnerRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2428,10 +2428,10 @@ func (m *PotRewardByOwner) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: PotRewardByOwner: wiretype end group for non-group") + return fmt.Errorf("proto: QueryRewardsByOwnerRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: PotRewardByOwner: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryRewardsByOwnerRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -2466,9 +2466,59 @@ func (m *PotRewardByOwner) Unmarshal(dAtA []byte) error { } m.WalletAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryRewardsByOwnerResponse) 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 ErrIntOverflowQuery + } + 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: QueryRewardsByOwnerResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryRewardsByOwnerResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MatureTotalReward", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Rewards", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2495,16 +2545,18 @@ func (m *PotRewardByOwner) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.MatureTotalReward = append(m.MatureTotalReward, types.Coin{}) - if err := m.MatureTotalReward[len(m.MatureTotalReward)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.Rewards == nil { + m.Rewards = &RewardByOwner{} + } + if err := m.Rewards.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ImmatureTotalReward", wireType) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) } - var msglen int + m.Height = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -2514,26 +2566,11 @@ func (m *PotRewardByOwner) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.Height |= int64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ImmatureTotalReward = append(m.ImmatureTotalReward, types.Coin{}) - if err := m.ImmatureTotalReward[len(m.ImmatureTotalReward)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -2555,7 +2592,7 @@ func (m *PotRewardByOwner) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryPotRewardsByOwnerRequest) Unmarshal(dAtA []byte) error { +func (m *RewardByOwner) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2578,10 +2615,10 @@ func (m *QueryPotRewardsByOwnerRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryPotRewardsByOwnerRequest: wiretype end group for non-group") + return fmt.Errorf("proto: RewardByOwner: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryPotRewardsByOwnerRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: RewardByOwner: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -2616,59 +2653,9 @@ func (m *QueryPotRewardsByOwnerRequest) Unmarshal(dAtA []byte) error { } m.WalletAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryPotRewardsByOwnerResponse) 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 ErrIntOverflowQuery - } - 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: QueryPotRewardsByOwnerResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryPotRewardsByOwnerResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Rewards", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field MatureTotalReward", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2695,18 +2682,16 @@ func (m *QueryPotRewardsByOwnerResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Rewards == nil { - m.Rewards = &PotRewardByOwner{} - } - if err := m.Rewards.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.MatureTotalReward = append(m.MatureTotalReward, types.Coin{}) + if err := m.MatureTotalReward[len(m.MatureTotalReward)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ImmatureTotalReward", wireType) } - m.Height = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -2716,11 +2701,26 @@ func (m *QueryPotRewardsByOwnerResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Height |= int64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ImmatureTotalReward = append(m.ImmatureTotalReward, types.Coin{}) + if err := m.ImmatureTotalReward[len(m.ImmatureTotalReward)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -2742,7 +2742,7 @@ func (m *QueryPotRewardsByOwnerResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryPotSlashingByOwnerRequest) Unmarshal(dAtA []byte) error { +func (m *QuerySlashingByOwnerRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2765,10 +2765,10 @@ func (m *QueryPotSlashingByOwnerRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryPotSlashingByOwnerRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QuerySlashingByOwnerRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryPotSlashingByOwnerRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QuerySlashingByOwnerRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -2824,7 +2824,7 @@ func (m *QueryPotSlashingByOwnerRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryPotSlashingByOwnerResponse) Unmarshal(dAtA []byte) error { +func (m *QuerySlashingByOwnerResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2847,10 +2847,10 @@ func (m *QueryPotSlashingByOwnerResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryPotSlashingByOwnerResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QuerySlashingByOwnerResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryPotSlashingByOwnerResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QuerySlashingByOwnerResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: diff --git a/x/pot/types/query.pb.gw.go b/x/pot/types/query.pb.gw.go index b027c44c..9593f114 100644 --- a/x/pot/types/query.pb.gw.go +++ b/x/pot/types/query.pb.gw.go @@ -86,11 +86,11 @@ func local_request_Query_VolumeReport_0(ctx context.Context, marshaler runtime.M } var ( - filter_Query_PotRewardsByEpoch_0 = &utilities.DoubleArray{Encoding: map[string]int{"epoch": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} + filter_Query_RewardsByEpoch_0 = &utilities.DoubleArray{Encoding: map[string]int{"epoch": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} ) -func request_Query_PotRewardsByEpoch_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryPotRewardsByEpochRequest +func request_Query_RewardsByEpoch_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryRewardsByEpochRequest var metadata runtime.ServerMetadata var ( @@ -114,17 +114,17 @@ func request_Query_PotRewardsByEpoch_0(ctx context.Context, marshaler runtime.Ma if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_PotRewardsByEpoch_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_RewardsByEpoch_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.PotRewardsByEpoch(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.RewardsByEpoch(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_Query_PotRewardsByEpoch_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryPotRewardsByEpochRequest +func local_request_Query_RewardsByEpoch_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryRewardsByEpochRequest var metadata runtime.ServerMetadata var ( @@ -148,17 +148,17 @@ func local_request_Query_PotRewardsByEpoch_0(ctx context.Context, marshaler runt if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_PotRewardsByEpoch_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_RewardsByEpoch_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.PotRewardsByEpoch(ctx, &protoReq) + msg, err := server.RewardsByEpoch(ctx, &protoReq) return msg, metadata, err } -func request_Query_PotRewardsByOwner_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryPotRewardsByOwnerRequest +func request_Query_RewardsByOwner_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryRewardsByOwnerRequest var metadata runtime.ServerMetadata var ( @@ -179,13 +179,13 @@ func request_Query_PotRewardsByOwner_0(ctx context.Context, marshaler runtime.Ma return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "wallet_address", err) } - msg, err := client.PotRewardsByOwner(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.RewardsByOwner(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_Query_PotRewardsByOwner_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryPotRewardsByOwnerRequest +func local_request_Query_RewardsByOwner_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryRewardsByOwnerRequest var metadata runtime.ServerMetadata var ( @@ -206,13 +206,13 @@ func local_request_Query_PotRewardsByOwner_0(ctx context.Context, marshaler runt return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "wallet_address", err) } - msg, err := server.PotRewardsByOwner(ctx, &protoReq) + msg, err := server.RewardsByOwner(ctx, &protoReq) return msg, metadata, err } -func request_Query_PotSlashingByOwner_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryPotSlashingByOwnerRequest +func request_Query_SlashingByOwner_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QuerySlashingByOwnerRequest var metadata runtime.ServerMetadata var ( @@ -233,13 +233,13 @@ func request_Query_PotSlashingByOwner_0(ctx context.Context, marshaler runtime.M return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "wallet_address", err) } - msg, err := client.PotSlashingByOwner(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.SlashingByOwner(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_Query_PotSlashingByOwner_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryPotSlashingByOwnerRequest +func local_request_Query_SlashingByOwner_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QuerySlashingByOwnerRequest var metadata runtime.ServerMetadata var ( @@ -260,7 +260,7 @@ func local_request_Query_PotSlashingByOwner_0(ctx context.Context, marshaler run return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "wallet_address", err) } - msg, err := server.PotSlashingByOwner(ctx, &protoReq) + msg, err := server.SlashingByOwner(ctx, &protoReq) return msg, metadata, err } @@ -309,7 +309,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) - mux.Handle("GET", pattern_Query_PotRewardsByEpoch_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_RewardsByEpoch_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -318,18 +318,18 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_PotRewardsByEpoch_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_RewardsByEpoch_0(rctx, inboundMarshaler, server, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Query_PotRewardsByEpoch_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_RewardsByEpoch_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_Query_PotRewardsByOwner_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_RewardsByOwner_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -338,18 +338,18 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_PotRewardsByOwner_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_RewardsByOwner_0(rctx, inboundMarshaler, server, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Query_PotRewardsByOwner_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_RewardsByOwner_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_Query_PotSlashingByOwner_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_SlashingByOwner_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -358,14 +358,14 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_PotSlashingByOwner_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_SlashingByOwner_0(rctx, inboundMarshaler, server, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Query_PotSlashingByOwner_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_SlashingByOwner_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -450,7 +450,7 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) - mux.Handle("GET", pattern_Query_PotRewardsByEpoch_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_RewardsByEpoch_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -459,18 +459,18 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_PotRewardsByEpoch_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Query_RewardsByEpoch_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Query_PotRewardsByEpoch_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_RewardsByEpoch_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_Query_PotRewardsByOwner_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_RewardsByOwner_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -479,18 +479,18 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_PotRewardsByOwner_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Query_RewardsByOwner_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Query_PotRewardsByOwner_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_RewardsByOwner_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_Query_PotSlashingByOwner_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_SlashingByOwner_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -499,14 +499,14 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_PotSlashingByOwner_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Query_SlashingByOwner_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Query_PotSlashingByOwner_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_SlashingByOwner_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -536,11 +536,11 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie var ( pattern_Query_VolumeReport_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"stratos", "pot", "v1", "volume-report", "epoch"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Query_PotRewardsByEpoch_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 4}, []string{"stratos", "pot", "v1", "rewards", "epoch"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_RewardsByEpoch_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 4}, []string{"stratos", "pot", "v1", "rewards", "epoch"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Query_PotRewardsByOwner_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"stratos", "pot", "v1", "rewards", "wallet", "wallet_address"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_RewardsByOwner_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"stratos", "pot", "v1", "rewards", "wallet", "wallet_address"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Query_PotSlashingByOwner_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"stratos", "pot", "v1", "slashing", "wallet_address"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_SlashingByOwner_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"stratos", "pot", "v1", "slashing", "wallet_address"}, "", runtime.AssumeColonVerbOpt(true))) pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"stratos", "pot", "v1", "params"}, "", runtime.AssumeColonVerbOpt(true))) ) @@ -548,11 +548,11 @@ var ( var ( forward_Query_VolumeReport_0 = runtime.ForwardResponseMessage - forward_Query_PotRewardsByEpoch_0 = runtime.ForwardResponseMessage + forward_Query_RewardsByEpoch_0 = runtime.ForwardResponseMessage - forward_Query_PotRewardsByOwner_0 = runtime.ForwardResponseMessage + forward_Query_RewardsByOwner_0 = runtime.ForwardResponseMessage - forward_Query_PotSlashingByOwner_0 = runtime.ForwardResponseMessage + forward_Query_SlashingByOwner_0 = runtime.ForwardResponseMessage forward_Query_Params_0 = runtime.ForwardResponseMessage ) diff --git a/x/pot/types/tx.pb.go b/x/pot/types/tx.pb.go index 94df02fc..c35ba573 100644 --- a/x/pot/types/tx.pb.go +++ b/x/pot/types/tx.pb.go @@ -547,6 +547,66 @@ func (m *MsgSlashingResourceNodeResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgSlashingResourceNodeResponse proto.InternalMessageInfo +type BLSSignatureInfo struct { + PubKeys [][]byte `protobuf:"bytes,1,rep,name=pub_keys,json=pubKeys,proto3" json:"pub_keys" yaml:"pub_keys"` + Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature" yaml:"signature"` + TxData []byte `protobuf:"bytes,3,opt,name=txData,proto3" json:"tx_data" yaml:"tx_data"` +} + +func (m *BLSSignatureInfo) Reset() { *m = BLSSignatureInfo{} } +func (m *BLSSignatureInfo) String() string { return proto.CompactTextString(m) } +func (*BLSSignatureInfo) ProtoMessage() {} +func (*BLSSignatureInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_103c258cace119ca, []int{10} +} +func (m *BLSSignatureInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *BLSSignatureInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_BLSSignatureInfo.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 *BLSSignatureInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_BLSSignatureInfo.Merge(m, src) +} +func (m *BLSSignatureInfo) XXX_Size() int { + return m.Size() +} +func (m *BLSSignatureInfo) XXX_DiscardUnknown() { + xxx_messageInfo_BLSSignatureInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_BLSSignatureInfo proto.InternalMessageInfo + +func (m *BLSSignatureInfo) GetPubKeys() [][]byte { + if m != nil { + return m.PubKeys + } + return nil +} + +func (m *BLSSignatureInfo) GetSignature() []byte { + if m != nil { + return m.Signature + } + return nil +} + +func (m *BLSSignatureInfo) GetTxData() []byte { + if m != nil { + return m.TxData + } + return nil +} + func init() { proto.RegisterType((*MsgVolumeReport)(nil), "stratos.pot.v1.MsgVolumeReport") proto.RegisterType((*MsgVolumeReportResponse)(nil), "stratos.pot.v1.MsgVolumeReportResponse") @@ -558,78 +618,84 @@ func init() { proto.RegisterType((*MsgFoundationDepositResponse)(nil), "stratos.pot.v1.MsgFoundationDepositResponse") proto.RegisterType((*MsgSlashingResourceNode)(nil), "stratos.pot.v1.MsgSlashingResourceNode") proto.RegisterType((*MsgSlashingResourceNodeResponse)(nil), "stratos.pot.v1.MsgSlashingResourceNodeResponse") + proto.RegisterType((*BLSSignatureInfo)(nil), "stratos.pot.v1.BLSSignatureInfo") } func init() { proto.RegisterFile("stratos/pot/v1/tx.proto", fileDescriptor_103c258cace119ca) } var fileDescriptor_103c258cace119ca = []byte{ - // 1042 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x56, 0xcf, 0x6f, 0xdc, 0x44, - 0x14, 0x8e, 0xf3, 0x8b, 0x64, 0xd2, 0x4d, 0x5a, 0x93, 0x90, 0xcd, 0xb6, 0xd9, 0x49, 0x86, 0xd2, - 0xa6, 0x94, 0xd8, 0x4a, 0x38, 0x20, 0xc1, 0x01, 0xb1, 0x45, 0x88, 0x88, 0x04, 0x24, 0x47, 0x6a, - 0x45, 0x2f, 0x2b, 0x67, 0x3d, 0x71, 0xac, 0x7a, 0x67, 0x2c, 0xcf, 0x6c, 0xb6, 0xb9, 0x70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45, 0xcc, 0x1e, 0x39, - 0xa6, 0x8d, 0x3b, 0x99, 0x80, 0x95, 0xa3, 0x98, 0xf5, 0x53, 0x73, 0x01, 0x97, 0x55, 0xcd, 0x21, - 0x18, 0x79, 0x57, 0x06, 0x93, 0xd1, 0x1a, 0x58, 0x2d, 0x0d, 0x91, 0x87, 0x59, 0x42, 0x09, 0xc3, - 0xe8, 0x87, 0x49, 0xb0, 0x70, 0xc0, 0xc2, 0x07, 0x11, 0x3f, 0x09, 0x52, 0xbf, 0x6b, 0x7f, 0x01, - 0x66, 0xfd, 0x36, 0xed, 0x10, 0xae, 0x87, 0x6a, 0xcd, 0x51, 0xef, 0xc4, 0xe9, 0x4d, 0xa8, 0xa3, - 0x27, 0xd4, 0xb9, 0x47, 0x23, 0xd2, 0xf8, 0xe4, 0x99, 0x80, 0x13, 0x99, 0x80, 0x3a, 0x21, 0x17, - 0xb0, 0xa2, 0xbc, 0xa8, 0x33, 0xfa, 0xfe, 0x17, 0xb8, 0x75, 0x89, 0x57, 0xdc, 0xd3, 0x62, 0x9e, - 0x16, 0xe9, 0x35, 0x5c, 0x8f, 0xa1, 0x1f, 0x04, 0x29, 0x66, 0x4c, 0x8f, 0xda, 0xe0, 0xe0, 0x6a, - 0x66, 0x64, 0x70, 0x35, 0x6e, 0x06, 0xf7, 0x03, 0x75, 0xee, 0x69, 0x72, 0x3f, 0x0d, 0x07, 0x34, - 0xa7, 0xfa, 0x9a, 0xc3, 0x4c, 0x5f, 0x73, 0x18, 0x47, 0x5e, 0x45, 0x01, 0x5a, 0x13, 0xad, 0x80, - 0x57, 0x07, 0xda, 0x66, 0xda, 0xf9, 0xcd, 0x24, 0xb8, 0x76, 0xc0, 0xc2, 0x7d, 0x1c, 0xfa, 0xad, - 0xb3, 0xff, 0x4c, 0x53, 0xef, 0x82, 0xe9, 0xe3, 0x94, 0xb6, 0x75, 0x2b, 0x57, 0x33, 0x01, 0xe5, - 0x39, 0x17, 0x70, 0x41, 0x89, 0xf7, 0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6e, - 0xec, 0x3d, 0x3b, 0xaf, 0x5b, 0xcf, 0xcf, 0xeb, 0xd6, 0xaf, 0xe7, 0x75, 0xeb, 0xc9, 0x45, 0x7d, - 0xe2, 0xf9, 0x45, 0x7d, 0xe2, 0xa7, 0x8b, 0xfa, 0xc4, 0x43, 0x77, 0xe0, 0xc2, 0x6a, 0x2d, 0x82, - 0x79, 0xf1, 0xef, 0x76, 0xeb, 0xc4, 0x8f, 0x88, 0xfb, 0x58, 0xca, 0xcb, 0xdb, 0x7b, 0x34, 0x2b, - 0x7f, 0x25, 0xbf, 0xfd, 0x67, 0x00, 0x00, 0x00, 0xff, 0xff, 0x94, 0xd2, 0xe4, 0xc8, 0xbe, 0x0b, - 0x00, 0x00, + // 1123 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x56, 0xcf, 0x6f, 0x1b, 0x45, + 0x14, 0xce, 0x26, 0x69, 0x9a, 0x4e, 0xe2, 0xa4, 0x5d, 0x12, 0xe2, 0xb8, 0x8d, 0x27, 0x19, 0x4a, + 0x9b, 0x52, 0xb2, 0xab, 0x04, 0x21, 0xa4, 0x72, 0x40, 0xb8, 0x15, 0x22, 0x6a, 0x02, 0xd2, 0x46, + 0x6a, 0x45, 0x2f, 0xab, 0xb5, 0x77, 0xb2, 0x59, 0xc5, 0x9e, 0x59, 0xed, 0x8c, 0xe3, 0xe4, 0xc2, + 0x81, 0x13, 0xc7, 0x4a, 0x70, 0xe4, 0x1f, 0x80, 0x3b, 0x7f, 0x41, 0x25, 0xd4, 0x63, 0x25, 0x2e, + 0x88, 0xc3, 0x80, 0x12, 0x24, 0x24, 0x1f, 0x7d, 0xe4, 0x84, 0x3c, 0x33, 0x3b, 0x6b, 0x6f, 0x0c, + 0x0d, 0xaa, 0x90, 0xe0, 0x64, 0xcf, 0xf7, 0xbd, 0x5f, 0xf3, 0xe6, 0xdb, 0x37, 0x03, 0x96, 0x18, + 0x4f, 0x03, 0x4e, 0x99, 0x9b, 0x50, 0xee, 0x1e, 0x6d, 0xba, 0xfc, 0xd8, 0x49, 0x52, 0xca, 0xa9, + 0x3d, 0xa7, 0x09, 0x27, 0xa1, 0xdc, 0x39, 0xda, 0xac, 0x2c, 0x44, 0x34, 0xa2, 0x92, 0x72, 0xfb, + 0xff, 0x94, 0x55, 0xe5, 0x46, 0x44, 0x69, 0xd4, 0xc4, 0x6e, 0x90, 0xc4, 0x6e, 0x40, 0x08, 0xe5, + 0x01, 0x8f, 0x29, 0x61, 0x9a, 0x2d, 0x17, 0x82, 0xf7, 0x43, 0x29, 0xa6, 0xda, 0xa0, 0xac, 0x45, + 0x99, 0x5b, 0x0f, 0x18, 0x76, 0x8f, 0x36, 0xeb, 0x98, 0x07, 0x9b, 0x6e, 0x83, 0xc6, 0x44, 0xf1, + 0xe8, 0xd9, 0x24, 0x98, 0xdf, 0x65, 0xd1, 0x23, 0xda, 0x6c, 0xb7, 0xb0, 0x87, 0x13, 0x9a, 0x72, + 0xfb, 0x08, 0xcc, 0x75, 0x82, 0x66, 0x13, 0x73, 0xff, 0x48, 0xc2, 0xac, 0x6c, 0xad, 0x4e, 0xac, + 0xcf, 0x6c, 0x21, 0x67, 0xb8, 0x54, 0x67, 0x2f, 0x26, 0x51, 0x13, 0x3f, 0x96, 0xb6, 0x2a, 0x42, + 0xed, 0x6e, 0x57, 0xc0, 0x82, 0x77, 0x4f, 0xc0, 0xc5, 0x93, 0xa0, 0xd5, 0xbc, 0x87, 0x86, 0x71, + 0xe4, 0x95, 0x3a, 0x03, 0xae, 0xcc, 0x7e, 0x1f, 0x4c, 0xa7, 0xb2, 0x02, 0x9c, 0x96, 0xc7, 0x57, + 0xad, 0xf5, 0x2b, 0x35, 0xd8, 0x15, 0xd0, 0x60, 0x3d, 0x01, 0xe7, 0x55, 0x9c, 0x0c, 0x41, 0x9e, + 0x21, 0xed, 0xcf, 0xc0, 0x25, 0x9c, 0xd0, 0xc6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0b, + 0xac, 0x98, 0xf2, 0x46, 0x0e, 0xcb, 0x51, 0xe2, 0x18, 0x65, 0x58, 0x71, 0x2f, 0x68, 0x68, 0xea, + 0x74, 0x64, 0x9d, 0xeb, 0xe8, 0x56, 0xb1, 0xce, 0x6c, 0x00, 0xf8, 0xa9, 0x76, 0xf3, 0x09, 0x0d, + 0x71, 0x6d, 0xfb, 0xf9, 0x69, 0xd5, 0x7a, 0x71, 0x5a, 0xb5, 0x7e, 0x3d, 0xad, 0x5a, 0x4f, 0xcf, + 0xaa, 0x63, 0x2f, 0xce, 0xaa, 0x63, 0x3f, 0x9d, 0x55, 0xc7, 0x9e, 0xb8, 0x03, 0x93, 0x47, 0xc7, + 0x22, 0x98, 0x67, 0x7f, 0x37, 0x1a, 0x07, 0x41, 0x4c, 0xdc, 0x63, 0x19, 0x5e, 0x8e, 0xa1, 0xfa, + 0x94, 0x7c, 0xee, 0xbf, 0xf3, 0x67, 0x00, 0x00, 0x00, 0xff, 0xff, 0xea, 0x54, 0xc3, 0x06, 0x87, + 0x0c, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1276,6 +1342,52 @@ func (m *MsgSlashingResourceNodeResponse) MarshalToSizedBuffer(dAtA []byte) (int return len(dAtA) - i, nil } +func (m *BLSSignatureInfo) 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 *BLSSignatureInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BLSSignatureInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.TxData) > 0 { + i -= len(m.TxData) + copy(dAtA[i:], m.TxData) + i = encodeVarintTx(dAtA, i, uint64(len(m.TxData))) + i-- + dAtA[i] = 0x1a + } + if len(m.Signature) > 0 { + i -= len(m.Signature) + copy(dAtA[i:], m.Signature) + i = encodeVarintTx(dAtA, i, uint64(len(m.Signature))) + i-- + dAtA[i] = 0x12 + } + if len(m.PubKeys) > 0 { + for iNdEx := len(m.PubKeys) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.PubKeys[iNdEx]) + copy(dAtA[i:], m.PubKeys[iNdEx]) + i = encodeVarintTx(dAtA, i, uint64(len(m.PubKeys[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + func encodeVarintTx(dAtA []byte, offset int, v uint64) int { offset -= sovTx(v) base := offset @@ -1468,6 +1580,29 @@ func (m *MsgSlashingResourceNodeResponse) Size() (n int) { return n } +func (m *BLSSignatureInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.PubKeys) > 0 { + for _, b := range m.PubKeys { + l = len(b) + n += 1 + l + sovTx(uint64(l)) + } + } + l = len(m.Signature) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.TxData) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + func sovTx(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -2622,6 +2757,156 @@ func (m *MsgSlashingResourceNodeResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *BLSSignatureInfo) 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: BLSSignatureInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BLSSignatureInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PubKeys", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PubKeys = append(m.PubKeys, make([]byte, postIndex-iNdEx)) + copy(m.PubKeys[len(m.PubKeys)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) + if m.Signature == nil { + m.Signature = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TxData", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TxData = append(m.TxData[:0], dAtA[iNdEx:postIndex]...) + if m.TxData == nil { + m.TxData = []byte{} + } + 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 skipTx(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/register/client/cli/tx.go b/x/register/client/cli/tx.go index 06340d85..ab6c2072 100644 --- a/x/register/client/cli/tx.go +++ b/x/register/client/cli/tx.go @@ -358,6 +358,7 @@ func newBuildCreateResourceNodeMsg(clientCtx client.Context, txf tx.Factory, fs if err != nil { return txf, nil, err } + decAmount := sdk.NewDecCoinFromCoin(amount) flagNetworkAddrStr, err := fs.GetString(FlagNetworkAddress) if err != nil { @@ -403,7 +404,7 @@ func newBuildCreateResourceNodeMsg(clientCtx client.Context, txf tx.Factory, fs if t := nodeType.Type(); t == "UNKNOWN" { return txf, nil, types.ErrNodeType } - msg, er := types.NewMsgCreateResourceNode(networkAddr, pubKey, amount, ownerAddr, description, nodeTypeVal) + msg, er := types.NewMsgCreateResourceNode(networkAddr, pubKey, decAmount, ownerAddr, description, nodeTypeVal) if er != nil { return txf, nil, err } @@ -420,6 +421,7 @@ func newBuildCreateMetaNodeMsg(clientCtx client.Context, txf tx.Factory, fs *fla if err != nil { return txf, nil, err } + decAmount := sdk.NewDecCoinFromCoin(amount) flagNetworkAddrStr, err := fs.GetString(FlagNetworkAddress) if err != nil { @@ -453,7 +455,7 @@ func newBuildCreateMetaNodeMsg(clientCtx client.Context, txf tx.Factory, fs *fla security, details, ) - msg, er := types.NewMsgCreateMetaNode(networkAddr, pubKey, amount, ownerAddr, description) + msg, er := types.NewMsgCreateMetaNode(networkAddr, pubKey, decAmount, ownerAddr, description) if er != nil { return txf, nil, err } @@ -540,6 +542,7 @@ func newBuildUpdateResourceNodeStakeMsg(clientCtx client.Context, txf tx.Factory if err != nil { return txf, nil, err } + decStakeDelta := sdk.NewDecCoinFromCoin(stakeDelta) incrStakeStr, err := fs.GetString(FlagIncrStake) if err != nil { @@ -558,7 +561,7 @@ func newBuildUpdateResourceNodeStakeMsg(clientCtx client.Context, txf tx.Factory ownerAddr := clientCtx.GetFromAddress() - msg := types.NewMsgUpdateResourceNodeStake(networkAddr, ownerAddr, &stakeDelta, incrStake) + msg := types.NewMsgUpdateResourceNodeStake(networkAddr, ownerAddr, decStakeDelta, incrStake) return txf, msg, nil } @@ -572,6 +575,7 @@ func newBuildUpdateMetaNodeStakeMsg(clientCtx client.Context, txf tx.Factory, fs if err != nil { return txf, nil, err } + decStakeDelta := sdk.NewDecCoinFromCoin(stakeDelta) incrStakeStr, err := fs.GetString(FlagIncrStake) if err != nil { @@ -590,7 +594,7 @@ func newBuildUpdateMetaNodeStakeMsg(clientCtx client.Context, txf tx.Factory, fs ownerAddr := clientCtx.GetFromAddress() - msg := types.NewMsgUpdateMetaNodeStake(networkAddr, ownerAddr, &stakeDelta, incrStake) + msg := types.NewMsgUpdateMetaNodeStake(networkAddr, ownerAddr, decStakeDelta, incrStake) return txf, msg, nil } diff --git a/x/register/client/rest/tx.go b/x/register/client/rest/tx.go index 42da21cd..9f34280e 100644 --- a/x/register/client/rest/tx.go +++ b/x/register/client/rest/tx.go @@ -59,7 +59,7 @@ type ( BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"` NetworkAddr string `json:"network_address" yaml:"network_address"` PubKey string `json:"pubkey" yaml:"pubkey"` // in bech32 - Amount sdk.Coin `json:"amount" yaml:"amount"` + Amount sdk.DecCoin `json:"amount" yaml:"amount"` Description types.Description `json:"description" yaml:"description"` NodeType uint32 `json:"node_type" yaml:"node_type"` } @@ -79,7 +79,7 @@ type ( UpdateResourceNodeStakeRequest struct { BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"` NetworkAddress string `json:"network_address" yaml:"network_address"` - StakeDelta sdk.Coin `json:"stake_delta" yaml:"stake_delta"` + StakeDelta sdk.DecCoin `json:"stake_delta" yaml:"stake_delta"` IncrStake string `json:"incr_stake" yaml:"incr_stake"` } @@ -87,7 +87,7 @@ type ( BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"` NetworkAddr string `json:"network_address" yaml:"network_address"` PubKey string `json:"pubkey" yaml:"pubkey"` // in bech32 - Amount sdk.Coin `json:"amount" yaml:"amount"` + Amount sdk.DecCoin `json:"amount" yaml:"amount"` Description types.Description `json:"description" yaml:"description"` } @@ -105,7 +105,7 @@ type ( UpdateMetaNodeStakeRequest struct { BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"` NetworkAddress string `json:"network_address" yaml:"network_address"` - StakeDelta sdk.Coin `json:"stake_delta" yaml:"stake_delta"` + StakeDelta sdk.DecCoin `json:"stake_delta" yaml:"stake_delta"` IncrStake string `json:"incr_stake" yaml:"incr_stake"` } @@ -345,7 +345,7 @@ func postUpdateResourceNodeStakeHandlerFn(cliCtx client.Context) http.HandlerFun rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) return } - msg := types.NewMsgUpdateResourceNodeStake(networkAddr, ownerAddr, &req.StakeDelta, incrStake) + msg := types.NewMsgUpdateResourceNodeStake(networkAddr, ownerAddr, req.StakeDelta, incrStake) if err := msg.ValidateBasic(); err != nil { rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) return @@ -420,7 +420,7 @@ func postUpdateMetaNodeStakeHandlerFn(cliCtx client.Context) http.HandlerFunc { rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) return } - msg := types.NewMsgUpdateMetaNodeStake(networkAddr, ownerAddr, &req.StakeDelta, incrStake) + msg := types.NewMsgUpdateMetaNodeStake(networkAddr, ownerAddr, req.StakeDelta, incrStake) if err := msg.ValidateBasic(); err != nil { rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) return diff --git a/x/register/keeper/grpc_query.go b/x/register/keeper/grpc_query.go index fa7a9fd5..6cd67c10 100644 --- a/x/register/keeper/grpc_query.go +++ b/x/register/keeper/grpc_query.go @@ -3,13 +3,15 @@ package keeper import ( "context" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + "github.com/cosmos/cosmos-sdk/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/query" + stratos "github.com/stratosnet/stratos-chain/types" "github.com/stratosnet/stratos-chain/x/register/types" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" ) // Querier is used as Keeper will have duplicate methods if used directly, and gRPC names take precedence over keeper @@ -258,18 +260,7 @@ func (q Querier) StakeTotal(c context.Context, _ *types.QueryTotalStakeRequest) totalUnbondedStakeOfResourceNodes := q.GetResourceNodeNotBondedToken(ctx).Amount totalUnbondedStakeOfMetaNodes := q.GetMetaNodeNotBondedToken(ctx).Amount - //resourceNodeList := q.GetAllResourceNodes(ctx) - //totalStakeOfResourceNodes := sdk.ZeroInt() - //for _, node := range resourceNodeList { - // totalStakeOfResourceNodes = totalStakeOfResourceNodes.Add(node.Tokens) - //} totalStakeOfResourceNodes := totalBondedStakeOfResourceNodes.Add(totalUnbondedStakeOfResourceNodes) - - //metaNodeList := q.GetAllMetaNodes(ctx) - //totalStakeOfMetaNodes := sdk.ZeroInt() - //for _, node := range metaNodeList { - // totalStakeOfMetaNodes = totalStakeOfMetaNodes.Add(node.Tokens) - //} totalStakeOfMetaNodes := totalBondedStakeOfMetaNodes.Add(totalUnbondedStakeOfMetaNodes) totalBondedStake := totalBondedStakeOfResourceNodes.Add(totalBondedStakeOfMetaNodes) diff --git a/x/register/keeper/msg_server.go b/x/register/keeper/msg_server.go index 0896d629..a9ba6cbf 100644 --- a/x/register/keeper/msg_server.go +++ b/x/register/keeper/msg_server.go @@ -3,7 +3,6 @@ package keeper import ( "context" "encoding/hex" - "errors" "strconv" "time" @@ -53,11 +52,13 @@ func (k msgServer) HandleMsgCreateResourceNode(goCtx context.Context, msg *types ctx.Logger().Error("Resource node already exist") return nil, types.ErrResourceNodePubKeyExists } - if msg.Value.Denom != k.BondDenom(ctx) { + + stake, _ := sdk.NormalizeDecCoin(msg.GetValue()).TruncateDecimal() + if stake.Denom != k.BondDenom(ctx) { return nil, types.ErrBadDenom } - ozoneLimitChange, err := k.RegisterResourceNode(ctx, networkAddr, pk, ownerAddress, *msg.Description, types.NodeType(msg.NodeType), msg.Value) + ozoneLimitChange, err := k.RegisterResourceNode(ctx, networkAddr, pk, ownerAddress, *msg.Description, types.NodeType(msg.NodeType), stake) if err != nil { return nil, sdkerrors.Wrap(types.ErrRegisterResourceNode, err.Error()) } @@ -97,7 +98,9 @@ func (k msgServer) HandleMsgCreateMetaNode(goCtx context.Context, msg *types.Msg ctx.Logger().Error("Meta node already exist") return nil, types.ErrMetaNodePubKeyExists } - if msg.Value.Denom != k.BondDenom(ctx) { + + stake, _ := sdk.NormalizeDecCoin(msg.GetValue()).TruncateDecimal() + if stake.Denom != k.BondDenom(ctx) { return nil, types.ErrBadDenom } @@ -106,7 +109,7 @@ func (k msgServer) HandleMsgCreateMetaNode(goCtx context.Context, msg *types.Msg return &types.MsgCreateMetaNodeResponse{}, sdkerrors.Wrap(types.ErrInvalidOwnerAddr, err.Error()) } - ozoneLimitChange, err := k.RegisterMetaNode(ctx, networkAddr, pk, ownerAddress, *msg.Description, msg.Value) + ozoneLimitChange, err := k.RegisterMetaNode(ctx, networkAddr, pk, ownerAddress, *msg.Description, stake) if err != nil { return nil, sdkerrors.Wrap(types.ErrRegisterMetaNode, err.Error()) } @@ -316,11 +319,12 @@ func (k msgServer) HandleMsgUpdateResourceNodeStake(goCtx context.Context, msg * return &types.MsgUpdateResourceNodeStakeResponse{}, sdkerrors.Wrap(types.ErrInvalidOwnerAddr, err.Error()) } - if msg.StakeDelta.Amount.LT(sdk.NewInt(0)) { - return &types.MsgUpdateResourceNodeStakeResponse{}, errors.New("invalid stake delta") + stakeDelta, _ := sdk.NormalizeDecCoin(msg.GetStakeDelta()).TruncateDecimal() + if stakeDelta.Denom != k.BondDenom(ctx) { + return nil, types.ErrBadDenom } - ozoneLimitChange, completionTime, node, err := k.UpdateResourceNodeStake(ctx, networkAddr, ownerAddress, *msg.StakeDelta, msg.IncrStake) + ozoneLimitChange, completionTime, node, err := k.UpdateResourceNodeStake(ctx, networkAddr, ownerAddress, stakeDelta, msg.IncrStake) if err != nil { return nil, sdkerrors.Wrap(types.ErrUpdateResourceNodeStake, err.Error()) } @@ -390,11 +394,12 @@ func (k msgServer) HandleMsgUpdateMetaNodeStake(goCtx context.Context, msg *type return &types.MsgUpdateMetaNodeStakeResponse{}, sdkerrors.Wrap(types.ErrInvalidOwnerAddr, err.Error()) } - if msg.StakeDelta.Amount.LT(sdk.NewInt(0)) { - return &types.MsgUpdateMetaNodeStakeResponse{}, errors.New("invalid stake delta") + stakeDelta, _ := sdk.NormalizeDecCoin(msg.GetStakeDelta()).TruncateDecimal() + if stakeDelta.Denom != k.BondDenom(ctx) { + return nil, types.ErrBadDenom } - ozoneLimitChange, completionTime, err := k.UpdateMetaNodeStake(ctx, networkAddr, ownerAddress, *msg.StakeDelta, msg.IncrStake) + ozoneLimitChange, completionTime, err := k.UpdateMetaNodeStake(ctx, networkAddr, ownerAddress, stakeDelta, msg.IncrStake) if err != nil { return nil, sdkerrors.Wrap(types.ErrUpdateMetaNodeStake, err.Error()) } diff --git a/x/register/keeper/querier.go b/x/register/keeper/querier.go index 24ab0023..3305cf51 100644 --- a/x/register/keeper/querier.go +++ b/x/register/keeper/querier.go @@ -148,18 +148,7 @@ func getNodesStakingInfo(ctx sdk.Context, _ abci.RequestQuery, k Keeper, legacyQ totalUnbondedStakeOfResourceNodes := k.GetResourceNodeNotBondedToken(ctx).Amount totalUnbondedStakeOfMetaNodes := k.GetMetaNodeNotBondedToken(ctx).Amount - //resourceNodeList := k.GetAllResourceNodes(ctx) - //totalStakeOfResourceNodes := sdk.ZeroInt() - //for _, node := range resourceNodeList { - // totalStakeOfResourceNodes = totalStakeOfResourceNodes.Add(node.Tokens) - //} totalStakeOfResourceNodes := totalBondedStakeOfResourceNodes.Add(totalUnbondedStakeOfResourceNodes) - - //metaNodeList := k.GetAllMetaNodes(ctx) - //totalStakeOfMetaNodes := sdk.ZeroInt() - //for _, node := range metaNodeList { - // totalStakeOfMetaNodes = totalStakeOfMetaNodes.Add(node.Tokens) - //} totalStakeOfMetaNodes := totalBondedStakeOfMetaNodes.Add(totalUnbondedStakeOfMetaNodes) totalBondedStake := totalBondedStakeOfResourceNodes.Add(totalBondedStakeOfMetaNodes) diff --git a/x/register/module.go b/x/register/module.go index 33340d10..4d2ac356 100644 --- a/x/register/module.go +++ b/x/register/module.go @@ -74,7 +74,9 @@ func (AppModuleBasic) RegisterRESTRoutes(ctx client.Context, rtr *mux.Router) { // RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the register module. func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { - types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)) + if err := types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)); err != nil { + panic(err) + } } // GetTxCmd returns the root tx command for the register module. diff --git a/x/register/types/events.go b/x/register/types/events.go index 89b1dca5..d5f5da06 100644 --- a/x/register/types/events.go +++ b/x/register/types/events.go @@ -3,15 +3,12 @@ package types const ( EventTypeCompleteUnbondingResourceNode = "complete_unbonding_resource_node" EventTypeCompleteUnbondingMetaNode = "complete_unbonding_meta_node" - EventTypeUnbondNode = "unbond_node" EventTypeCreateResourceNode = "create_resource_node" - EventTypeRemoveResourceNode = "remove_resource_node" EventTypeUnbondingResourceNode = "unbonding_resource_node" EventTypeUpdateResourceNode = "update_resource_node" EventTypeUpdateResourceNodeStake = "update_resource_node_stake" EventTypeCreateMetaNode = "create_meta_node" - EventTypeRemoveMetaNode = "remove_meta_node" EventTypeUnbondingMetaNode = "unbonding_Meta_node" EventTypeUpdateMetaNode = "update_meta_node" EventTypeUpdateMetaNodeStake = "update_meta_node_stake" @@ -24,7 +21,6 @@ const ( AttributeKeyCandidateNetworkAddress = "candidate_network_address" AttributeKeyVoterNetworkAddress = "voter_network_address" AttributeKeyCandidateStatus = "candidate_status" - AttributeKeyIsMetaNode = "is_meta_node" AttributeKeyUnbondingMatureTime = "unbonding_mature_time" diff --git a/x/register/types/genesis.pb.go b/x/register/types/genesis.pb.go index 10d65ddc..d5e45c6f 100644 --- a/x/register/types/genesis.pb.go +++ b/x/register/types/genesis.pb.go @@ -190,62 +190,119 @@ func (m *GenesisMetaNode) GetDescription() *Description { return nil } +type Slashing struct { + WalletAddress string `protobuf:"bytes,1,opt,name=wallet_address,json=walletAddress,proto3" json:"wallet_address" yaml:"wallet_address"` + Value int64 `protobuf:"varint,2,opt,name=value,proto3" json:"value" yaml:"value"` +} + +func (m *Slashing) Reset() { *m = Slashing{} } +func (m *Slashing) String() string { return proto.CompactTextString(m) } +func (*Slashing) ProtoMessage() {} +func (*Slashing) Descriptor() ([]byte, []int) { + return fileDescriptor_5bdab54ebea9e48e, []int{2} +} +func (m *Slashing) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Slashing) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Slashing.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 *Slashing) XXX_Merge(src proto.Message) { + xxx_messageInfo_Slashing.Merge(m, src) +} +func (m *Slashing) XXX_Size() int { + return m.Size() +} +func (m *Slashing) XXX_DiscardUnknown() { + xxx_messageInfo_Slashing.DiscardUnknown(m) +} + +var xxx_messageInfo_Slashing proto.InternalMessageInfo + +func (m *Slashing) GetWalletAddress() string { + if m != nil { + return m.WalletAddress + } + return "" +} + +func (m *Slashing) GetValue() int64 { + if m != nil { + return m.Value + } + return 0 +} + func init() { proto.RegisterType((*GenesisState)(nil), "stratos.register.v1.GenesisState") proto.RegisterType((*GenesisMetaNode)(nil), "stratos.register.v1.GenesisMetaNode") + proto.RegisterType((*Slashing)(nil), "stratos.register.v1.Slashing") } func init() { proto.RegisterFile("stratos/register/v1/genesis.proto", fileDescriptor_5bdab54ebea9e48e) } var fileDescriptor_5bdab54ebea9e48e = []byte{ - // 748 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0xc1, 0x6f, 0xfb, 0x34, - 0x14, 0x6e, 0x56, 0xd6, 0xad, 0x5e, 0xdb, 0xb1, 0xac, 0xa0, 0xac, 0x40, 0xd3, 0x59, 0x68, 0x2a, - 0xd2, 0x96, 0xa8, 0x83, 0x13, 0x12, 0x87, 0x85, 0x89, 0x09, 0xc1, 0xaa, 0x29, 0x3d, 0x20, 0x71, - 0xa9, 0xdc, 0xc4, 0xcb, 0xa2, 0x36, 0x76, 0x14, 0xbb, 0xdb, 0xb2, 0xbf, 0x62, 0x12, 0xff, 0x05, - 0x67, 0xfe, 0x88, 0x89, 0xd3, 0x8e, 0x88, 0x43, 0x40, 0xdb, 0x8d, 0x63, 0xae, 0x5c, 0x50, 0x6d, - 0xa7, 0xcd, 0xa0, 0x42, 0xfa, 0x9d, 0xea, 0xf7, 0xde, 0xf7, 0xbe, 0x2f, 0x7e, 0xfe, 0x5e, 0xc1, - 0x21, 0xe3, 0x09, 0xe2, 0x94, 0xd9, 0x09, 0x0e, 0x42, 0xc6, 0x71, 0x62, 0xdf, 0x0e, 0xec, 0x00, - 0x13, 0xcc, 0x42, 0x66, 0xc5, 0x09, 0xe5, 0x54, 0xdf, 0x57, 0x10, 0xab, 0x80, 0x58, 0xb7, 0x83, - 0xce, 0x41, 0x40, 0x69, 0x30, 0xc3, 0xb6, 0x80, 0x4c, 0xe6, 0xd7, 0x36, 0x22, 0xa9, 0xc4, 0x77, - 0xda, 0x01, 0x0d, 0xa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xda, 0xe3, 0x6b, 0xb7, 0xf2, 0xfc, 0xda, 0xad, 0xfc, - 0xf6, 0xda, 0xad, 0xfc, 0xf8, 0x45, 0xc9, 0x66, 0x4a, 0x94, 0x60, 0x5e, 0x1c, 0x4f, 0xbc, 0x1b, - 0x14, 0x12, 0xfb, 0x7e, 0xf5, 0x67, 0x27, 0x8c, 0x37, 0xa9, 0x89, 0xc7, 0xfd, 0xfc, 0x9f, 0x00, - 0x00, 0x00, 0xff, 0xff, 0xe6, 0xa3, 0xcc, 0x8a, 0xb7, 0x05, 0x00, 0x00, + // 806 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0x41, 0x8f, 0xdb, 0x44, + 0x14, 0x5e, 0x37, 0x6c, 0xba, 0x3b, 0x9b, 0xa4, 0xac, 0x1b, 0x90, 0x37, 0x40, 0x9c, 0x8e, 0x50, + 0x15, 0x44, 0xd7, 0x56, 0x16, 0x4e, 0x48, 0x1c, 0x6a, 0x2a, 0x2a, 0x04, 0x8d, 0xaa, 0xc9, 0x01, + 0x89, 0x4b, 0x34, 0xb1, 0xa7, 0x5e, 0x2b, 0xf1, 0x8c, 0xe5, 0x19, 0x67, 0xeb, 0xfd, 0x13, 0x54, + 0xe2, 0x5f, 0x70, 0xe6, 0x47, 0x54, 0x9c, 0xf6, 0x88, 0x38, 0x18, 0xb4, 0x7b, 0xdb, 0xa3, 0xaf, + 0x5c, 0x50, 0x66, 0xc6, 0x89, 0xb3, 0x44, 0x48, 0x3d, 0x65, 0xde, 0xf7, 0xbe, 0xf9, 0x9e, 0xdf, + 0x9b, 0xef, 0x05, 0x3c, 0xe2, 0x22, 0xc5, 0x82, 0x71, 0x37, 0x25, 0x61, 0xc4, 0x05, 0x49, 0xdd, + 0xe5, 0xc8, 0x0d, 0x09, 0x25, 0x3c, 0xe2, 0x4e, 0x92, 0x32, 0xc1, 0xcc, 0x87, 0x9a, 0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0xf6, + 0xc7, 0x4a, 0xbe, 0x76, 0x1d, 0x3e, 0x61, 0x71, 0x24, 0x48, 0x9c, 0x88, 0x1c, 0xd5, 0x65, 0xe1, + 0xcf, 0x06, 0x38, 0xa8, 0xdc, 0x69, 0x22, 0xd0, 0xb9, 0xc0, 0x8b, 0x05, 0x11, 0x77, 0x5e, 0xfd, + 0xf3, 0xdb, 0xc2, 0xbe, 0x93, 0xd9, 0xb8, 0x6b, 0x1b, 0x87, 0xa8, 0xad, 0x80, 0xaa, 0x0d, 0x17, + 0xec, 0x2f, 0xf1, 0x22, 0x23, 0xd2, 0x04, 0x0d, 0xef, 0xe4, 0xb6, 0xb0, 0x15, 0xb0, 0x99, 0x9b, + 0x0c, 0x21, 0x52, 0xb0, 0x37, 0x7e, 0x7b, 0xdd, 0x37, 0xae, 0xae, 0xfb, 0xc6, 0xdf, 0xd7, 0x7d, + 0xe3, 0xcd, 0x4d, 0x7f, 0xef, 0xea, 0xa6, 0xbf, 0xf7, 0xc7, 0x4d, 0x7f, 0xef, 0xa7, 0x2f, 0x6b, + 0xc6, 0xd7, 0x63, 0xa0, 0x44, 0x54, 0xc7, 0x53, 0xff, 0x1c, 0x47, 0xd4, 0x7d, 0xbd, 0xf9, 0xfb, + 0x95, 0xab, 0x30, 0x6b, 0x4a, 0xbb, 0x7d, 0xf1, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xeb, 0x7a, + 0xca, 0x16, 0x49, 0x06, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -428,6 +485,41 @@ func (m *GenesisMetaNode) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *Slashing) 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 *Slashing) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Slashing) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Value != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.Value)) + i-- + dAtA[i] = 0x10 + } + if len(m.WalletAddress) > 0 { + i -= len(m.WalletAddress) + copy(dAtA[i:], m.WalletAddress) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.WalletAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { offset -= sovGenesis(v) base := offset @@ -509,6 +601,22 @@ func (m *GenesisMetaNode) Size() (n int) { return n } +func (m *Slashing) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.WalletAddress) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + if m.Value != 0 { + n += 1 + sovGenesis(uint64(m.Value)) + } + return n +} + func sovGenesis(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -1028,6 +1136,107 @@ func (m *GenesisMetaNode) Unmarshal(dAtA []byte) error { } return nil } +func (m *Slashing) 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 ErrIntOverflowGenesis + } + 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: Slashing: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Slashing: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field WalletAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + 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 ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.WalletAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + m.Value = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Value |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipGenesis(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/register/types/msg.go b/x/register/types/msg.go index aa5aa8c0..12f05db6 100644 --- a/x/register/types/msg.go +++ b/x/register/types/msg.go @@ -22,7 +22,6 @@ var ( // message type and route constants const ( - // TypeMsgCreateResourceNodeTx defines the type string of an CreateResourceNodeTx transaction TypeMsgCreateResourceNodeTx = "create_resource_node" TypeMsgRemoveResourceNodeTx = "remove_resource_node" TypeUpdateResourceNodeTx = "update_resource_node" @@ -36,7 +35,7 @@ const ( // NewMsgCreateResourceNode NewMsg creates a new Msg instance func NewMsgCreateResourceNode(networkAddr stratos.SdsAddress, pubKey cryptotypes.PubKey, //nolint:interfacer - value sdk.Coin, ownerAddr sdk.AccAddress, description *Description, nodeType uint32, + value sdk.DecCoin, ownerAddr sdk.AccAddress, description *Description, nodeType uint32, ) (*MsgCreateResourceNode, error) { var pkAny *codectypes.Any if pubKey != nil { @@ -126,7 +125,7 @@ func (msg MsgCreateResourceNode) UnpackInterfaces(unpacker codectypes.AnyUnpacke // NewMsgCreateMetaNode creates a new Msg instance func NewMsgCreateMetaNode(networkAddr stratos.SdsAddress, pubKey cryptotypes.PubKey, //nolint:interfacer - value sdk.Coin, ownerAddr sdk.AccAddress, description *Description, + value sdk.DecCoin, ownerAddr sdk.AccAddress, description *Description, ) (*MsgCreateMetaNode, error) { var pkAny *codectypes.Any if pubKey != nil { @@ -369,7 +368,7 @@ func (msg MsgUpdateResourceNode) ValidateBasic() error { } func NewMsgUpdateResourceNodeStake(networkAddress stratos.SdsAddress, ownerAddress sdk.AccAddress, - stakeDelta *sdk.Coin, incrStake bool) *MsgUpdateResourceNodeStake { + stakeDelta sdk.DecCoin, incrStake bool) *MsgUpdateResourceNodeStake { return &MsgUpdateResourceNodeStake{ NetworkAddress: networkAddress.String(), OwnerAddress: ownerAddress.String(), @@ -417,7 +416,7 @@ func (msg MsgUpdateResourceNodeStake) ValidateBasic() error { return ErrEmptyOwnerAddr } - if msg.StakeDelta.Amount.LTE(sdk.ZeroInt()) { + if msg.StakeDelta.Amount.LTE(sdk.ZeroDec()) { return ErrInvalidStakeChange } return nil @@ -480,7 +479,7 @@ func (msg MsgUpdateMetaNode) ValidateBasic() error { } func NewMsgUpdateMetaNodeStake(networkAddress stratos.SdsAddress, ownerAddress sdk.AccAddress, - stakeDelta *sdk.Coin, incrStake bool) *MsgUpdateMetaNodeStake { + stakeDelta sdk.DecCoin, incrStake bool) *MsgUpdateMetaNodeStake { return &MsgUpdateMetaNodeStake{ NetworkAddress: networkAddress.String(), OwnerAddress: ownerAddress.String(), @@ -528,7 +527,7 @@ func (msg MsgUpdateMetaNodeStake) ValidateBasic() error { return ErrEmptyOwnerAddr } - if msg.StakeDelta.Amount.LTE(sdk.ZeroInt()) { + if msg.StakeDelta.Amount.LTE(sdk.ZeroDec()) { return ErrInvalidStakeChange } return nil diff --git a/x/register/types/params.go b/x/register/types/params.go index 01415663..a706d077 100644 --- a/x/register/types/params.go +++ b/x/register/types/params.go @@ -33,7 +33,6 @@ var ( DefaultUnbondingCompletionTime = 14 * 24 * time.Hour // lead time to complete unbonding - by default 14 days DefaultStakeNozRate = sdk.NewDec(1000000) // 0.001gwei -> 1noz = 1000000wei -> 1noz DefaultRemainingNozLimit = sdk.NewInt(0) - //DefaultNozPrice = sdk.NewDec(1000000) // 0.001gwei -> 1noz = 1000000wei -> 1noz ) // ParamKeyTable returns the parameter key table. diff --git a/x/register/types/querier.go b/x/register/types/querier.go index 70d13f09..f20c6c7d 100644 --- a/x/register/types/querier.go +++ b/x/register/types/querier.go @@ -5,6 +5,7 @@ import ( cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" pagiquery "github.com/cosmos/cosmos-sdk/types/query" + stratos "github.com/stratosnet/stratos-chain/types" ) diff --git a/x/register/types/query.pb.go b/x/register/types/query.pb.go index 14a1cf9e..31c7b0b7 100644 --- a/x/register/types/query.pb.go +++ b/x/register/types/query.pb.go @@ -6,22 +6,32 @@ package types import ( context "context" fmt "fmt" + types1 "github.com/cosmos/cosmos-sdk/codec/types" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + types "github.com/cosmos/cosmos-sdk/types" query "github.com/cosmos/cosmos-sdk/types/query" + types2 "github.com/cosmos/cosmos-sdk/x/staking/types" + _ "github.com/gogo/protobuf/gogoproto" grpc1 "github.com/gogo/protobuf/grpc" proto "github.com/gogo/protobuf/proto" + github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" + _ "github.com/regen-network/cosmos-proto" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" + _ "google.golang.org/protobuf/types/known/timestamppb" io "io" math "math" math_bits "math/bits" + time "time" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf +var _ = time.Kitchen // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. @@ -316,11 +326,7 @@ func (m *QueryStakeByNodeResponse) GetStakingInfo() *StakingInfo { // QueryStakeByOwnerRequest is request type for the Query/StakeByOwner RPC method type QueryStakeByOwnerRequest struct { // owner_addr defines the owner address to query for. - // string network_addr = 1; - // string moniker = 2; OwnerAddr string `protobuf:"bytes,1,opt,name=owner_addr,json=ownerAddr,proto3" json:"owner_addr,omitempty"` - // int64 page = 2; - // int64 limit = 3; // pagination defines an optional pagination for the request. Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } @@ -759,6 +765,207 @@ func (m *QueryBondedMetaNodeCountResponse) GetNumber() uint64 { return 0 } +type TotalStakesResponse struct { + ResourceNodesTotalStake *types.Coin `protobuf:"bytes,1,opt,name=resource_nodes_total_stake,json=resourceNodesTotalStake,proto3" json:"resource_nodes_total_stake,omitempty"` + MetaNodesTotalStake *types.Coin `protobuf:"bytes,2,opt,name=meta_nodes_total_stake,json=metaNodesTotalStake,proto3" json:"meta_nodes_total_stake,omitempty"` + TotalBondedStake *types.Coin `protobuf:"bytes,3,opt,name=total_bonded_stake,json=totalBondedStake,proto3" json:"total_bonded_stake,omitempty"` + TotalUnbondedStake *types.Coin `protobuf:"bytes,4,opt,name=total_unbonded_stake,json=totalUnbondedStake,proto3" json:"total_unbonded_stake,omitempty"` + TotalUnbondingStake *types.Coin `protobuf:"bytes,5,opt,name=total_unbonding_stake,json=totalUnbondingStake,proto3" json:"total_unbonding_stake,omitempty"` +} + +func (m *TotalStakesResponse) Reset() { *m = TotalStakesResponse{} } +func (m *TotalStakesResponse) String() string { return proto.CompactTextString(m) } +func (*TotalStakesResponse) ProtoMessage() {} +func (*TotalStakesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_59a612d1da8c0670, []int{16} +} +func (m *TotalStakesResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TotalStakesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TotalStakesResponse.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 *TotalStakesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_TotalStakesResponse.Merge(m, src) +} +func (m *TotalStakesResponse) XXX_Size() int { + return m.Size() +} +func (m *TotalStakesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_TotalStakesResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_TotalStakesResponse proto.InternalMessageInfo + +func (m *TotalStakesResponse) GetResourceNodesTotalStake() *types.Coin { + if m != nil { + return m.ResourceNodesTotalStake + } + return nil +} + +func (m *TotalStakesResponse) GetMetaNodesTotalStake() *types.Coin { + if m != nil { + return m.MetaNodesTotalStake + } + return nil +} + +func (m *TotalStakesResponse) GetTotalBondedStake() *types.Coin { + if m != nil { + return m.TotalBondedStake + } + return nil +} + +func (m *TotalStakesResponse) GetTotalUnbondedStake() *types.Coin { + if m != nil { + return m.TotalUnbondedStake + } + return nil +} + +func (m *TotalStakesResponse) GetTotalUnbondingStake() *types.Coin { + if m != nil { + return m.TotalUnbondingStake + } + return nil +} + +type StakingInfo struct { + NetworkAddress string `protobuf:"bytes,1,opt,name=network_address,json=networkAddress,proto3" json:"network_address" yaml:"network_address"` + Pubkey *types1.Any `protobuf:"bytes,2,opt,name=pubkey,proto3" json:"pubkey" yaml:"pubkey"` + Suspend bool `protobuf:"varint,3,opt,name=suspend,proto3" json:"suspend" yaml:"suspend"` + Status types2.BondStatus `protobuf:"varint,4,opt,name=status,proto3,enum=cosmos.staking.v1beta1.BondStatus" json:"status" yaml:"status"` + Tokens *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,5,opt,name=tokens,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"tokens" yaml:"tokens"` + OwnerAddress string `protobuf:"bytes,6,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address" yaml:"owner_address"` + Description *Description `protobuf:"bytes,7,opt,name=description,proto3" json:"description" yaml:"description"` + CreationTime time.Time `protobuf:"bytes,8,opt,name=creation_time,json=creationTime,proto3,stdtime" json:"creation_time" yaml:"creation_time"` + NodeType uint32 `protobuf:"varint,9,opt,name=node_type,json=nodeType,proto3" json:"node_type" yaml:"node_type"` + BondedStake *types.Coin `protobuf:"bytes,10,opt,name=bonded_stake,json=bondedStake,proto3" json:"bonded_stake" yaml:"bonded_stake"` + UnBondingStake *types.Coin `protobuf:"bytes,11,opt,name=un_bonding_stake,json=unBondingStake,proto3" json:"un_bonding_stake" yaml:"un_bonding_stake"` + UnBondedStake *types.Coin `protobuf:"bytes,12,opt,name=un_bonded_stake,json=unBondedStake,proto3" json:"un_bonded_stake" yaml:"un_bonded_stake"` +} + +func (m *StakingInfo) Reset() { *m = StakingInfo{} } +func (m *StakingInfo) String() string { return proto.CompactTextString(m) } +func (*StakingInfo) ProtoMessage() {} +func (*StakingInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_59a612d1da8c0670, []int{17} +} +func (m *StakingInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *StakingInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_StakingInfo.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 *StakingInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_StakingInfo.Merge(m, src) +} +func (m *StakingInfo) XXX_Size() int { + return m.Size() +} +func (m *StakingInfo) XXX_DiscardUnknown() { + xxx_messageInfo_StakingInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_StakingInfo proto.InternalMessageInfo + +func (m *StakingInfo) GetNetworkAddress() string { + if m != nil { + return m.NetworkAddress + } + return "" +} + +func (m *StakingInfo) GetPubkey() *types1.Any { + if m != nil { + return m.Pubkey + } + return nil +} + +func (m *StakingInfo) GetSuspend() bool { + if m != nil { + return m.Suspend + } + return false +} + +func (m *StakingInfo) GetStatus() types2.BondStatus { + if m != nil { + return m.Status + } + return types2.Unspecified +} + +func (m *StakingInfo) GetOwnerAddress() string { + if m != nil { + return m.OwnerAddress + } + return "" +} + +func (m *StakingInfo) GetDescription() *Description { + if m != nil { + return m.Description + } + return nil +} + +func (m *StakingInfo) GetCreationTime() time.Time { + if m != nil { + return m.CreationTime + } + return time.Time{} +} + +func (m *StakingInfo) GetNodeType() uint32 { + if m != nil { + return m.NodeType + } + return 0 +} + +func (m *StakingInfo) GetBondedStake() *types.Coin { + if m != nil { + return m.BondedStake + } + return nil +} + +func (m *StakingInfo) GetUnBondingStake() *types.Coin { + if m != nil { + return m.UnBondingStake + } + return nil +} + +func (m *StakingInfo) GetUnBondedStake() *types.Coin { + if m != nil { + return m.UnBondedStake + } + return nil +} + func init() { proto.RegisterType((*QueryResourceNodeRequest)(nil), "stratos.register.v1.QueryResourceNodeRequest") proto.RegisterType((*QueryResourceNodeResponse)(nil), "stratos.register.v1.QueryResourceNodeResponse") @@ -776,68 +983,108 @@ func init() { proto.RegisterType((*QueryBondedResourceNodeCountResponse)(nil), "stratos.register.v1.QueryBondedResourceNodeCountResponse") proto.RegisterType((*QueryBondedMetaNodeCountRequest)(nil), "stratos.register.v1.QueryBondedMetaNodeCountRequest") proto.RegisterType((*QueryBondedMetaNodeCountResponse)(nil), "stratos.register.v1.QueryBondedMetaNodeCountResponse") + proto.RegisterType((*TotalStakesResponse)(nil), "stratos.register.v1.TotalStakesResponse") + proto.RegisterType((*StakingInfo)(nil), "stratos.register.v1.StakingInfo") } func init() { proto.RegisterFile("stratos/register/v1/query.proto", fileDescriptor_59a612d1da8c0670) } var fileDescriptor_59a612d1da8c0670 = []byte{ - // 883 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x96, 0x4f, 0x6f, 0x1b, 0x45, - 0x18, 0xc6, 0x33, 0xa5, 0x58, 0xe4, 0xb5, 0x7b, 0x99, 0x94, 0xd6, 0x6c, 0xb1, 0x6b, 0x6f, 0xa0, - 0x75, 0x4b, 0xbd, 0x8b, 0xdd, 0x14, 0xd1, 0x0a, 0x2a, 0x91, 0xf2, 0x47, 0x14, 0x51, 0xca, 0xb6, - 0x27, 0x38, 0x58, 0x63, 0xef, 0xc4, 0x59, 0x25, 0x9e, 0xd9, 0xec, 0x8c, 0x13, 0xac, 0x28, 0x12, - 0xf0, 0x09, 0x10, 0x9c, 0xf8, 0x00, 0x48, 0xfc, 0xb9, 0x70, 0xe2, 0x33, 0x70, 0x8c, 0xc4, 0x85, - 0x23, 0x4a, 0xf8, 0x20, 0x68, 0x67, 0x67, 0xe3, 0xdd, 0x64, 0xd6, 0x76, 0xb8, 0x65, 0x27, 0xcf, - 0xfb, 0x3e, 0xbf, 0x77, 0xf6, 0xdd, 0x47, 0x86, 0xeb, 0x42, 0x46, 0x44, 0x72, 0xe1, 0x46, 0x74, - 0x18, 0x08, 0x49, 0x23, 0x77, 0xb7, 0xe3, 0xee, 0x8c, 0x69, 0x34, 0x71, 0xc2, 0x88, 0x4b, 0x8e, - 0x57, 0xb4, 0xc0, 0x49, 0x05, 0xce, 0x6e, 0xc7, 0x7a, 0x75, 0xc8, 0xf9, 0x70, 0x9b, 0xba, 0x24, - 0x0c, 0x5c, 0xc2, 0x18, 0x97, 0x44, 0x06, 0x9c, 0x89, 0xa4, 0xc4, 0xba, 0x3d, 0xe0, 0x62, 0xc4, - 0x85, 0xdb, 0x27, 0x82, 0x26, 0xbd, 0xdc, 0xdd, 0x4e, 0x9f, 0x4a, 0xd2, 0x71, 0x43, 0x32, 0x0c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xb7, - 0xab, 0xa9, 0x55, 0x8c, 0xbb, 0xfb, 0xd3, 0x7c, 0x3f, 0xc0, 0xdf, 0x23, 0x00, 0xd5, 0x50, 0x25, - 0x10, 0x7e, 0xa3, 0xd8, 0xf6, 0x4c, 0xf6, 0x59, 0x77, 0x16, 0x13, 0x6b, 0xc2, 0x5b, 0x8a, 0x70, - 0x15, 0x37, 0x8d, 0x84, 0xd9, 0xa4, 0xc4, 0x7f, 0x20, 0xb8, 0x5a, 0x90, 0x2f, 0xf8, 0xed, 0x62, - 0xd3, 0xd9, 0xc9, 0x65, 0xdd, 0xff, 0x1f, 0x95, 0x9a, 0xfd, 0x86, 0x62, 0x6f, 0xe0, 0xba, 0x79, - 0x4b, 0xc3, 0x5e, 0x92, 0x3e, 0xf8, 0x57, 0x04, 0x2b, 0x86, 0xd4, 0xc2, 0x6b, 0xf3, 0xac, 0x4d, - 0x39, 0x68, 0xdd, 0x3b, 0x67, 0xd5, 0x42, 0xb0, 0x22, 0x85, 0x5d, 0x7f, 0xf2, 0xe7, 0x51, 0x1d, - 0x1d, 0x1e, 0xd5, 0xd1, 0x3f, 0x47, 0x75, 0xf4, 0xdd, 0x71, 0x7d, 0xe9, 0xf0, 0xb8, 0xbe, 0xf4, - 0xf7, 0x71, 0x7d, 0xe9, 0x8b, 0xb5, 0x61, 0x20, 0x37, 0xc7, 0x7d, 0x67, 0xc0, 0x47, 0x69, 0x0f, - 0x46, 0x65, 0xfa, 0x67, 0x7b, 0xb0, 0x49, 0x02, 0xe6, 0x7e, 0x35, 0x6d, 0x1b, 0xaf, 0xbc, 0xe8, - 0x97, 0xd4, 0xaf, 0xc6, 0xbb, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0x5d, 0x50, 0x35, 0xdb, 0xdb, - 0x0a, 0x00, 0x00, + // 1501 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0x5d, 0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x01, 0xc4, 0x19, 0x57, 0x79, 0xb7, 0x4d, + 0x67, 0x76, 0xcd, 0x69, 0x0b, 0x63, 0x76, 0x5e, 0x58, 0xee, 0x76, 0xdb, 0xd4, 0xa8, 0xe2, 0xb6, + 0xa7, 0xc0, 0x91, 0xeb, 0x65, 0x28, 0xe2, 0x39, 0x56, 0x5d, 0x6f, 0xcd, 0x47, 0xce, 0x73, 0x99, + 0x9c, 0xef, 0x48, 0xc7, 0xeb, 0xde, 0x9a, 0x6f, 0x17, 0x58, 0xf2, 0x61, 0x7c, 0xa6, 0xa5, 0x33, + 0xbc, 0xf7, 0xd8, 0xa3, 0x41, 0xcc, 0x7f, 0x16, 0xc0, 0x8f, 0xbe, 0x55, 0xf6, 0x79, 0x61, 0x11, + 0xdc, 0xdf, 0x05, 0x48, 0x3a, 0x52, 0x70, 0x2f, 0x2c, 0x1f, 0x37, 0xb1, 0x99, 0xa3, 0x96, 0x34, + 0xe5, 0xbd, 0xc3, 0xae, 0x33, 0x6f, 0x3b, 0xcd, 0x78, 0x6b, 0x6c, 0x25, 0xd2, 0xf8, 0x51, 0xc3, + 0xee, 0x48, 0x73, 0xc0, 0x32, 0xaf, 0xc2, 0x98, 0x5a, 0x26, 0x9b, 0xd1, 0xe6, 0x76, 0xef, 0xa8, + 0xce, 0xa2, 0x52, 0x27, 0x23, 0xd7, 0x32, 0xc8, 0x9e, 0x18, 0x4a, 0x56, 0x72, 0x48, 0xb1, 0x9d, + 0x81, 0x29, 0x41, 0xf6, 0xae, 0xcf, 0x9d, 0x07, 0x82, 0x31, 0xd6, 0x64, 0xac, 0x61, 0x27, 0xa8, + 0x2b, 0x58, 0xc4, 0x4d, 0x28, 0xf2, 0xc8, 0x5a, 0x8d, 0x38, 0x51, 0x86, 0x67, 0xb5, 0x90, 0x59, + 0x43, 0x12, 0xce, 0x36, 0x09, 0x14, 0x78, 0x62, 0x34, 0x26, 0x81, 0x88, 0x3c, 0xb7, 0x9d, 0xc0, + 0x69, 0xb1,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 0x3b, 0xae, 0x67, 0x3d, 0x49, 0x60, 0x85, 0xd6, 0xa8, 0xe5, 0xc4, 0xa8, 0x5d, 0xf9, + 0x27, 0x00, 0x00, 0xff, 0xff, 0xa5, 0x0d, 0xbf, 0x9b, 0xb9, 0x11, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1697,102 +1944,322 @@ func (m *QueryBondedMetaNodeCountResponse) MarshalToSizedBuffer(dAtA []byte) (in return len(dAtA) - i, nil } -func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { - offset -= sovQuery(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ +func (m *TotalStakesResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - dAtA[offset] = uint8(v) - return base + return dAtA[:n], nil } -func (m *QueryResourceNodeRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.NetworkAddr) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n + +func (m *TotalStakesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryResourceNodeResponse) Size() (n int) { - if m == nil { - return 0 - } +func (m *TotalStakesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if m.Node != nil { - l = m.Node.Size() - n += 1 + l + sovQuery(uint64(l)) + if m.TotalUnbondingStake != nil { + { + size, err := m.TotalUnbondingStake.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a } - return n -} - -func (m *QueryMetaNodeRequest) Size() (n int) { - if m == nil { - return 0 + if m.TotalUnbondedStake != nil { + { + size, err := m.TotalUnbondedStake.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 } - var l int - _ = l - l = len(m.NetworkAddr) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) + if m.TotalBondedStake != nil { + { + size, err := m.TotalBondedStake.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a } - return n -} - -func (m *QueryMetaNodeResponse) Size() (n int) { - if m == nil { - return 0 + if m.MetaNodesTotalStake != nil { + { + size, err := m.MetaNodesTotalStake.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 } - var l int - _ = l - if m.Node != nil { - l = m.Node.Size() - n += 1 + l + sovQuery(uint64(l)) + if m.ResourceNodesTotalStake != nil { + { + size, err := m.ResourceNodesTotalStake.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa } - return n + return len(dAtA) - i, nil } -func (m *QueryStakeByNodeRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.NetworkAddr) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - if m.QueryType != 0 { - n += 1 + sovQuery(uint64(m.QueryType)) +func (m *StakingInfo) 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 n + return dAtA[:n], nil } -func (m *QueryStakeByNodeResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.StakingInfo != nil { - l = m.StakingInfo.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n +func (m *StakingInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryStakeByOwnerRequest) Size() (n int) { - if m == nil { - return 0 - } +func (m *StakingInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.UnBondedStake != nil { + { + size, err := m.UnBondedStake.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x62 + } + if m.UnBondingStake != nil { + { + size, err := m.UnBondingStake.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x5a + } + if m.BondedStake != nil { + { + size, err := m.BondedStake.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x52 + } + if m.NodeType != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.NodeType)) + i-- + dAtA[i] = 0x48 + } + n16, err16 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.CreationTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.CreationTime):]) + if err16 != nil { + return 0, err16 + } + i -= n16 + i = encodeVarintQuery(dAtA, i, uint64(n16)) + i-- + dAtA[i] = 0x42 + if m.Description != nil { + { + size, err := m.Description.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + } + if len(m.OwnerAddress) > 0 { + i -= len(m.OwnerAddress) + copy(dAtA[i:], m.OwnerAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.OwnerAddress))) + i-- + dAtA[i] = 0x32 + } + if m.Tokens != nil { + { + size := m.Tokens.Size() + i -= size + if _, err := m.Tokens.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + if m.Status != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.Status)) + i-- + dAtA[i] = 0x20 + } + if m.Suspend { + i-- + if m.Suspend { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 + } + if m.Pubkey != nil { + { + size, err := m.Pubkey.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.NetworkAddress) > 0 { + i -= len(m.NetworkAddress) + copy(dAtA[i:], m.NetworkAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.NetworkAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { + offset -= sovQuery(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *QueryResourceNodeRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.NetworkAddr) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryResourceNodeResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Node != nil { + l = m.Node.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryMetaNodeRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.NetworkAddr) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryMetaNodeResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Node != nil { + l = m.Node.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryStakeByNodeRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.NetworkAddr) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.QueryType != 0 { + n += 1 + sovQuery(uint64(m.QueryType)) + } + return n +} + +func (m *QueryStakeByNodeResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.StakingInfo != nil { + l = m.StakingInfo.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryStakeByOwnerRequest) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.OwnerAddr) @@ -1911,6 +2378,87 @@ func (m *QueryBondedMetaNodeCountResponse) Size() (n int) { return n } +func (m *TotalStakesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ResourceNodesTotalStake != nil { + l = m.ResourceNodesTotalStake.Size() + n += 1 + l + sovQuery(uint64(l)) + } + if m.MetaNodesTotalStake != nil { + l = m.MetaNodesTotalStake.Size() + n += 1 + l + sovQuery(uint64(l)) + } + if m.TotalBondedStake != nil { + l = m.TotalBondedStake.Size() + n += 1 + l + sovQuery(uint64(l)) + } + if m.TotalUnbondedStake != nil { + l = m.TotalUnbondedStake.Size() + n += 1 + l + sovQuery(uint64(l)) + } + if m.TotalUnbondingStake != nil { + l = m.TotalUnbondingStake.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *StakingInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.NetworkAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.Pubkey != nil { + l = m.Pubkey.Size() + n += 1 + l + sovQuery(uint64(l)) + } + if m.Suspend { + n += 2 + } + if m.Status != 0 { + n += 1 + sovQuery(uint64(m.Status)) + } + if m.Tokens != nil { + l = m.Tokens.Size() + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.OwnerAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.Description != nil { + l = m.Description.Size() + n += 1 + l + sovQuery(uint64(l)) + } + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.CreationTime) + n += 1 + l + sovQuery(uint64(l)) + if m.NodeType != 0 { + n += 1 + sovQuery(uint64(m.NodeType)) + } + if m.BondedStake != nil { + l = m.BondedStake.Size() + n += 1 + l + sovQuery(uint64(l)) + } + if m.UnBondingStake != nil { + l = m.UnBondingStake.Size() + n += 1 + l + sovQuery(uint64(l)) + } + if m.UnBondedStake != nil { + l = m.UnBondedStake.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + func sovQuery(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -3188,6 +3736,657 @@ func (m *QueryBondedMetaNodeCountResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *TotalStakesResponse) 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 ErrIntOverflowQuery + } + 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: TotalStakesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TotalStakesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResourceNodesTotalStake", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ResourceNodesTotalStake == nil { + m.ResourceNodesTotalStake = &types.Coin{} + } + if err := m.ResourceNodesTotalStake.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MetaNodesTotalStake", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MetaNodesTotalStake == nil { + m.MetaNodesTotalStake = &types.Coin{} + } + if err := m.MetaNodesTotalStake.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TotalBondedStake", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.TotalBondedStake == nil { + m.TotalBondedStake = &types.Coin{} + } + if err := m.TotalBondedStake.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TotalUnbondedStake", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.TotalUnbondedStake == nil { + m.TotalUnbondedStake = &types.Coin{} + } + if err := m.TotalUnbondedStake.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TotalUnbondingStake", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.TotalUnbondingStake == nil { + m.TotalUnbondingStake = &types.Coin{} + } + if err := m.TotalUnbondingStake.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StakingInfo) 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 ErrIntOverflowQuery + } + 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: StakingInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StakingInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NetworkAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NetworkAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pubkey", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pubkey == nil { + m.Pubkey = &types1.Any{} + } + if err := m.Pubkey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Suspend", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Suspend = bool(v != 0) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + m.Status = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Status |= types2.BondStatus(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Tokens", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_cosmos_cosmos_sdk_types.Int + m.Tokens = &v + if err := m.Tokens.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OwnerAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Description == nil { + m.Description = &Description{} + } + if err := m.Description.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CreationTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.CreationTime, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NodeType", wireType) + } + m.NodeType = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NodeType |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BondedStake", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.BondedStake == nil { + m.BondedStake = &types.Coin{} + } + if err := m.BondedStake.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UnBondingStake", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.UnBondingStake == nil { + m.UnBondingStake = &types.Coin{} + } + if err := m.UnBondingStake.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UnBondedStake", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.UnBondedStake == nil { + m.UnBondedStake = &types.Coin{} + } + if err := m.UnBondedStake.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipQuery(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/register/types/register.pb.go b/x/register/types/register.pb.go index 7c4e1e0d..f347e158 100644 --- a/x/register/types/register.pb.go +++ b/x/register/types/register.pb.go @@ -7,7 +7,6 @@ import ( fmt "fmt" types "github.com/cosmos/cosmos-sdk/codec/types" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" - types2 "github.com/cosmos/cosmos-sdk/types" types1 "github.com/cosmos/cosmos-sdk/x/staking/types" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" @@ -448,259 +447,6 @@ func (m *Description) GetDetails() string { return "" } -type Slashing struct { - WalletAddress string `protobuf:"bytes,1,opt,name=wallet_address,json=walletAddress,proto3" json:"wallet_address" yaml:"wallet_address"` - Value int64 `protobuf:"varint,2,opt,name=value,proto3" json:"value" yaml:"value"` -} - -func (m *Slashing) Reset() { *m = Slashing{} } -func (m *Slashing) String() string { return proto.CompactTextString(m) } -func (*Slashing) ProtoMessage() {} -func (*Slashing) Descriptor() ([]byte, []int) { - return fileDescriptor_fef1e3aeec8499d6, []int{5} -} -func (m *Slashing) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Slashing) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Slashing.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 *Slashing) XXX_Merge(src proto.Message) { - xxx_messageInfo_Slashing.Merge(m, src) -} -func (m *Slashing) XXX_Size() int { - return m.Size() -} -func (m *Slashing) XXX_DiscardUnknown() { - xxx_messageInfo_Slashing.DiscardUnknown(m) -} - -var xxx_messageInfo_Slashing proto.InternalMessageInfo - -func (m *Slashing) GetWalletAddress() string { - if m != nil { - return m.WalletAddress - } - return "" -} - -func (m *Slashing) GetValue() int64 { - if m != nil { - return m.Value - } - return 0 -} - -type TotalStakesResponse struct { - ResourceNodesTotalStake *types2.Coin `protobuf:"bytes,1,opt,name=resource_nodes_total_stake,json=resourceNodesTotalStake,proto3" json:"resource_nodes_total_stake,omitempty"` - MetaNodesTotalStake *types2.Coin `protobuf:"bytes,2,opt,name=meta_nodes_total_stake,json=metaNodesTotalStake,proto3" json:"meta_nodes_total_stake,omitempty"` - TotalBondedStake *types2.Coin `protobuf:"bytes,3,opt,name=total_bonded_stake,json=totalBondedStake,proto3" json:"total_bonded_stake,omitempty"` - TotalUnbondedStake *types2.Coin `protobuf:"bytes,4,opt,name=total_unbonded_stake,json=totalUnbondedStake,proto3" json:"total_unbonded_stake,omitempty"` - TotalUnbondingStake *types2.Coin `protobuf:"bytes,5,opt,name=total_unbonding_stake,json=totalUnbondingStake,proto3" json:"total_unbonding_stake,omitempty"` -} - -func (m *TotalStakesResponse) Reset() { *m = TotalStakesResponse{} } -func (m *TotalStakesResponse) String() string { return proto.CompactTextString(m) } -func (*TotalStakesResponse) ProtoMessage() {} -func (*TotalStakesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_fef1e3aeec8499d6, []int{6} -} -func (m *TotalStakesResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TotalStakesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TotalStakesResponse.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 *TotalStakesResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_TotalStakesResponse.Merge(m, src) -} -func (m *TotalStakesResponse) XXX_Size() int { - return m.Size() -} -func (m *TotalStakesResponse) XXX_DiscardUnknown() { - xxx_messageInfo_TotalStakesResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_TotalStakesResponse proto.InternalMessageInfo - -func (m *TotalStakesResponse) GetResourceNodesTotalStake() *types2.Coin { - if m != nil { - return m.ResourceNodesTotalStake - } - return nil -} - -func (m *TotalStakesResponse) GetMetaNodesTotalStake() *types2.Coin { - if m != nil { - return m.MetaNodesTotalStake - } - return nil -} - -func (m *TotalStakesResponse) GetTotalBondedStake() *types2.Coin { - if m != nil { - return m.TotalBondedStake - } - return nil -} - -func (m *TotalStakesResponse) GetTotalUnbondedStake() *types2.Coin { - if m != nil { - return m.TotalUnbondedStake - } - return nil -} - -func (m *TotalStakesResponse) GetTotalUnbondingStake() *types2.Coin { - if m != nil { - return m.TotalUnbondingStake - } - return nil -} - -type StakingInfo struct { - NetworkAddress string `protobuf:"bytes,1,opt,name=network_address,json=networkAddress,proto3" json:"network_address" yaml:"network_address"` - Pubkey *types.Any `protobuf:"bytes,2,opt,name=pubkey,proto3" json:"pubkey" yaml:"pubkey"` - Suspend bool `protobuf:"varint,3,opt,name=suspend,proto3" json:"suspend" yaml:"suspend"` - Status types1.BondStatus `protobuf:"varint,4,opt,name=status,proto3,enum=cosmos.staking.v1beta1.BondStatus" json:"status" yaml:"status"` - Tokens *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,5,opt,name=tokens,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"tokens" yaml:"tokens"` - OwnerAddress string `protobuf:"bytes,6,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address" yaml:"owner_address"` - Description *Description `protobuf:"bytes,7,opt,name=description,proto3" json:"description" yaml:"description"` - CreationTime time.Time `protobuf:"bytes,8,opt,name=creation_time,json=creationTime,proto3,stdtime" json:"creation_time" yaml:"creation_time"` - NodeType uint32 `protobuf:"varint,9,opt,name=node_type,json=nodeType,proto3" json:"node_type" yaml:"node_type"` - BondedStake *types2.Coin `protobuf:"bytes,10,opt,name=bonded_stake,json=bondedStake,proto3" json:"bonded_stake" yaml:"bonded_stake"` - UnBondingStake *types2.Coin `protobuf:"bytes,11,opt,name=un_bonding_stake,json=unBondingStake,proto3" json:"un_bonding_stake" yaml:"un_bonding_stake"` - UnBondedStake *types2.Coin `protobuf:"bytes,12,opt,name=un_bonded_stake,json=unBondedStake,proto3" json:"un_bonded_stake" yaml:"un_bonded_stake"` -} - -func (m *StakingInfo) Reset() { *m = StakingInfo{} } -func (m *StakingInfo) String() string { return proto.CompactTextString(m) } -func (*StakingInfo) ProtoMessage() {} -func (*StakingInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_fef1e3aeec8499d6, []int{7} -} -func (m *StakingInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StakingInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_StakingInfo.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 *StakingInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_StakingInfo.Merge(m, src) -} -func (m *StakingInfo) XXX_Size() int { - return m.Size() -} -func (m *StakingInfo) XXX_DiscardUnknown() { - xxx_messageInfo_StakingInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_StakingInfo proto.InternalMessageInfo - -func (m *StakingInfo) GetNetworkAddress() string { - if m != nil { - return m.NetworkAddress - } - return "" -} - -func (m *StakingInfo) GetPubkey() *types.Any { - if m != nil { - return m.Pubkey - } - return nil -} - -func (m *StakingInfo) GetSuspend() bool { - if m != nil { - return m.Suspend - } - return false -} - -func (m *StakingInfo) GetStatus() types1.BondStatus { - if m != nil { - return m.Status - } - return types1.Unspecified -} - -func (m *StakingInfo) GetOwnerAddress() string { - if m != nil { - return m.OwnerAddress - } - return "" -} - -func (m *StakingInfo) GetDescription() *Description { - if m != nil { - return m.Description - } - return nil -} - -func (m *StakingInfo) GetCreationTime() time.Time { - if m != nil { - return m.CreationTime - } - return time.Time{} -} - -func (m *StakingInfo) GetNodeType() uint32 { - if m != nil { - return m.NodeType - } - return 0 -} - -func (m *StakingInfo) GetBondedStake() *types2.Coin { - if m != nil { - return m.BondedStake - } - return nil -} - -func (m *StakingInfo) GetUnBondingStake() *types2.Coin { - if m != nil { - return m.UnBondingStake - } - return nil -} - -func (m *StakingInfo) GetUnBondedStake() *types2.Coin { - if m != nil { - return m.UnBondedStake - } - return nil -} - // UnbondingNode stores all of a single delegator's unbonding bonds // for a single unbonding node in a time-ordered list type UnbondingNode struct { @@ -713,7 +459,7 @@ func (m *UnbondingNode) Reset() { *m = UnbondingNode{} } func (m *UnbondingNode) String() string { return proto.CompactTextString(m) } func (*UnbondingNode) ProtoMessage() {} func (*UnbondingNode) Descriptor() ([]byte, []int) { - return fileDescriptor_fef1e3aeec8499d6, []int{8} + return fileDescriptor_fef1e3aeec8499d6, []int{5} } func (m *UnbondingNode) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -774,7 +520,7 @@ func (m *UnbondingNodeEntry) Reset() { *m = UnbondingNodeEntry{} } func (m *UnbondingNodeEntry) String() string { return proto.CompactTextString(m) } func (*UnbondingNodeEntry) ProtoMessage() {} func (*UnbondingNodeEntry) Descriptor() ([]byte, []int) { - return fileDescriptor_fef1e3aeec8499d6, []int{9} + return fileDescriptor_fef1e3aeec8499d6, []int{6} } func (m *UnbondingNodeEntry) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -817,74 +563,14 @@ func (m *UnbondingNodeEntry) GetCompletionTime() time.Time { return time.Time{} } -type Staking struct { - // network_address is the bech32-encoded address of the node. - NetworkAddress string `protobuf:"bytes,1,opt,name=network_address,json=networkAddress,proto3" json:"network_address" yaml:"network_address"` - // owner_address is the bech32-encoded address of owner of the node. - OwnerAddress string `protobuf:"bytes,2,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address" yaml:"owner_address"` - // shares define the delegation shares received. - Value github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=value,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"value" yaml:"value"` -} - -func (m *Staking) Reset() { *m = Staking{} } -func (m *Staking) String() string { return proto.CompactTextString(m) } -func (*Staking) ProtoMessage() {} -func (*Staking) Descriptor() ([]byte, []int) { - return fileDescriptor_fef1e3aeec8499d6, []int{10} -} -func (m *Staking) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Staking) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Staking.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 *Staking) XXX_Merge(src proto.Message) { - xxx_messageInfo_Staking.Merge(m, src) -} -func (m *Staking) XXX_Size() int { - return m.Size() -} -func (m *Staking) XXX_DiscardUnknown() { - xxx_messageInfo_Staking.DiscardUnknown(m) -} - -var xxx_messageInfo_Staking proto.InternalMessageInfo - -func (m *Staking) GetNetworkAddress() string { - if m != nil { - return m.NetworkAddress - } - return "" -} - -func (m *Staking) GetOwnerAddress() string { - if m != nil { - return m.OwnerAddress - } - return "" -} - func init() { proto.RegisterType((*Params)(nil), "stratos.register.v1.Params") proto.RegisterType((*ResourceNode)(nil), "stratos.register.v1.ResourceNode") proto.RegisterType((*MetaNode)(nil), "stratos.register.v1.MetaNode") proto.RegisterType((*MetaNodeRegistrationVotePool)(nil), "stratos.register.v1.MetaNodeRegistrationVotePool") proto.RegisterType((*Description)(nil), "stratos.register.v1.Description") - proto.RegisterType((*Slashing)(nil), "stratos.register.v1.Slashing") - proto.RegisterType((*TotalStakesResponse)(nil), "stratos.register.v1.TotalStakesResponse") - proto.RegisterType((*StakingInfo)(nil), "stratos.register.v1.StakingInfo") proto.RegisterType((*UnbondingNode)(nil), "stratos.register.v1.UnbondingNode") proto.RegisterType((*UnbondingNodeEntry)(nil), "stratos.register.v1.UnbondingNodeEntry") - proto.RegisterType((*Staking)(nil), "stratos.register.v1.Staking") } func init() { @@ -892,111 +578,89 @@ func init() { } var fileDescriptor_fef1e3aeec8499d6 = []byte{ - // 1658 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0x4f, 0x6f, 0x1b, 0xc7, - 0x15, 0x37, 0x49, 0x5b, 0x22, 0x87, 0x14, 0xe5, 0xae, 0x15, 0x9b, 0x72, 0x53, 0x8d, 0x32, 0x4d, - 0x1b, 0x15, 0xa9, 0x48, 0xc8, 0x2e, 0x50, 0x34, 0x87, 0x02, 0x5e, 0x5b, 0x75, 0x9d, 0x34, 0x86, - 0xb1, 0x52, 0x13, 0xa0, 0x40, 0xb0, 0x1d, 0xee, 0x4e, 0xa8, 0x89, 0xb8, 0x33, 0xc4, 0xce, 0x50, - 0x12, 0x6f, 0x05, 0x72, 0xe9, 0xad, 0x3e, 0xe6, 0x68, 0xf4, 0x33, 0x14, 0xe8, 0x27, 0x28, 0x60, - 0xe4, 0x94, 0x63, 0xd1, 0xc3, 0xb6, 0xb0, 0x2f, 0x05, 0x8f, 0x5b, 0xa0, 0xe7, 0x62, 0x67, 0x66, - 0x77, 0x87, 0x2b, 0x19, 0x84, 0xdb, 0xfa, 0xd0, 0x42, 0x27, 0x72, 0x7e, 0xef, 0xbd, 0xdf, 0x9b, - 0xd9, 0xf7, 0x67, 0xde, 0x2e, 0x40, 0x42, 0xc6, 0x58, 0x72, 0x31, 0x88, 0xc9, 0x88, 0x0a, 0x49, - 0xe2, 0xc1, 0xc9, 0x5e, 0xf1, 0xbf, 0x3f, 0x89, 0xb9, 0xe4, 0xce, 0x0d, 0xa3, 0xd3, 0x2f, 0xf0, - 0x93, 0xbd, 0xdb, 0x1b, 0x23, 0x3e, 0xe2, 0x4a, 0x3e, 0xc8, 0xfe, 0x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, 0xf2, 0xe7, 0x97, 0x5b, - 0x57, 0x7e, 0xf5, 0x23, 0xcb, 0x83, 0x29, 0x2a, 0x46, 0x64, 0xfe, 0x77, 0x37, 0x38, 0xc2, 0x94, - 0x0d, 0xce, 0xca, 0x4f, 0xec, 0xca, 0xe7, 0x70, 0x45, 0xe5, 0xe7, 0xdd, 0x7f, 0x05, 0x00, 0x00, - 0xff, 0xff, 0x87, 0x6a, 0x97, 0x10, 0x83, 0x17, 0x00, 0x00, + // 1298 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x57, 0xcf, 0x6f, 0x1b, 0xc5, + 0x17, 0x8f, 0x93, 0x36, 0xb1, 0xc7, 0xf9, 0xd1, 0xef, 0x36, 0xea, 0xd7, 0x29, 0xc5, 0xe3, 0x0e, + 0x85, 0x06, 0x89, 0xd8, 0x4a, 0x8b, 0x84, 0xe8, 0x01, 0xa9, 0xdb, 0x16, 0x68, 0x81, 0x2a, 0x5a, + 0x42, 0x2b, 0x71, 0x59, 0xc6, 0xbb, 0x83, 0x33, 0x8d, 0x77, 0x67, 0xb5, 0x33, 0x4e, 0xe3, 0x1b, + 0x12, 0x17, 0x8e, 0x3d, 0xf6, 0xd8, 0x3f, 0x02, 0x89, 0xbf, 0x00, 0xa9, 0xea, 0xa9, 0x47, 0xc4, + 0x61, 0x41, 0xed, 0x05, 0xf9, 0xb8, 0x48, 0x9c, 0xd1, 0xce, 0x0f, 0xef, 0x78, 0xd3, 0x08, 0x15, + 0xa9, 0x17, 0xd4, 0x53, 0xe6, 0x7d, 0x3e, 0x6f, 0xde, 0x7b, 0xb3, 0xef, 0xf3, 0xc6, 0x13, 0x80, + 0xb8, 0x48, 0xb1, 0x60, 0xbc, 0x97, 0x92, 0x01, 0xe5, 0x82, 0xa4, 0xbd, 0x83, 0xed, 0xe9, 0xba, + 0x9b, 0xa4, 0x4c, 0x30, 0xe7, 0xb4, 0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3, 0xdf, 0x60, + 0xcd, 0xfb, 0xff, 0x94, 0xdf, 0x9d, 0xd2, 0xbb, 0x34, 0x22, 0x95, 0x12, 0x03, 0x16, 0x25, 0x43, + 0x52, 0x24, 0x57, 0x25, 0x2e, 0xfc, 0x8b, 0x12, 0x2b, 0x31, 0x5e, 0x54, 0x62, 0xc5, 0xa5, 0x5a, + 0xe2, 0xb5, 0x29, 0x2d, 0x4b, 0xdc, 0x01, 0xcd, 0x08, 0x1f, 0xfa, 0x24, 0x16, 0x29, 0x25, 0xbc, + 0x75, 0xa2, 0x53, 0xdb, 0x5c, 0x71, 0x7b, 0x93, 0x0c, 0xda, 0x70, 0x9e, 0xc1, 0x73, 0x2a, 0x8d, + 0x05, 0xa2, 0xf7, 0x58, 0x44, 0x05, 0x89, 0x12, 0x31, 0xf6, 0x40, 0x84, 0x0f, 0x6f, 0x28, 0xd8, + 0xf1, 0xc1, 0x46, 0x4a, 0x38, 0x1b, 0xa5, 0x01, 0xf1, 0x63, 0x16, 0x12, 0x3f, 0x25, 0x03, 0x9f, + 0xc4, 0xb8, 0x3f, 0x24, 0x61, 0xeb, 0x64, 0xa7, 0xb6, 0x59, 0x77, 0x2f, 0x94, 0x75, 0x1f, 0xeb, + 0x8a, 0xbc, 0x33, 0x86, 0xbb, 0xcd, 0x42, 0xe2, 0x91, 0xc1, 0x0d, 0x4d, 0xfc, 0xb4, 0x08, 0x96, + 0x3d, 0x8b, 0x72, 0xee, 0x80, 0xb5, 0x98, 0x88, 0xfb, 0x2c, 0xdd, 0xf7, 0x71, 0x18, 0xa6, 0x84, + 0x73, 0x2d, 0xa9, 0xad, 0x49, 0x06, 0xab, 0x54, 0x9e, 0xc1, 0x33, 0x2a, 0x75, 0x85, 0x40, 0xde, + 0xaa, 0x46, 0xae, 0x2a, 0xc0, 0xc1, 0x60, 0x31, 0x19, 0xf5, 0xf7, 0xc9, 0x58, 0xab, 0x69, 0xfd, + 0x48, 0xab, 0xae, 0xc6, 0x63, 0xf7, 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+ 0xdb, 0x8f, 0x9f, 0xb5, 0x6b, 0x4f, 0x9f, 0xb5, 0x6b, 0xbf, 0x3f, 0x6b, 0xd7, 0x1e, 0x3c, 0x6f, + 0xcf, 0x3d, 0x7d, 0xde, 0x9e, 0xfb, 0xe5, 0x79, 0x7b, 0xee, 0xeb, 0xf7, 0xad, 0x3c, 0x5a, 0x41, + 0x31, 0x11, 0x66, 0xb9, 0x15, 0xec, 0x61, 0x1a, 0xf7, 0x0e, 0xcb, 0x7f, 0xb9, 0x65, 0xe6, 0xfe, + 0xa2, 0x6c, 0xc6, 0xe5, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, 0x13, 0xb4, 0x80, 0x35, 0x93, 0x0f, + 0x00, 0x00, } func (this *ResourceNode) Equal(that interface{}) bool { @@ -1496,7 +1160,7 @@ func (m *Description) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *Slashing) Marshal() (dAtA []byte, err error) { +func (m *UnbondingNode) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1506,32 +1170,51 @@ func (m *Slashing) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Slashing) MarshalTo(dAtA []byte) (int, error) { +func (m *UnbondingNode) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *Slashing) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *UnbondingNode) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.Value != 0 { - i = encodeVarintRegister(dAtA, i, uint64(m.Value)) + if len(m.Entries) > 0 { + for iNdEx := len(m.Entries) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Entries[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRegister(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if m.IsMetaNode { + i-- + if m.IsMetaNode { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } i-- dAtA[i] = 0x10 } - if len(m.WalletAddress) > 0 { - i -= len(m.WalletAddress) - copy(dAtA[i:], m.WalletAddress) - i = encodeVarintRegister(dAtA, i, uint64(len(m.WalletAddress))) + if len(m.NetworkAddr) > 0 { + i -= len(m.NetworkAddr) + copy(dAtA[i:], m.NetworkAddr) + i = encodeVarintRegister(dAtA, i, uint64(len(m.NetworkAddr))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *TotalStakesResponse) Marshal() (dAtA []byte, err error) { +func (m *UnbondingNodeEntry) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1541,505 +1224,184 @@ func (m *TotalStakesResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *TotalStakesResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *UnbondingNodeEntry) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *TotalStakesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *UnbondingNodeEntry) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.TotalUnbondingStake != nil { + if m.Balance != nil { { - size, err := m.TotalUnbondingStake.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } + size := m.Balance.Size() i -= size - i = encodeVarintRegister(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - if m.TotalUnbondedStake != nil { - { - size, err := m.TotalUnbondedStake.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { + if _, err := m.Balance.MarshalTo(dAtA[i:]); err != nil { return 0, err } - i -= size i = encodeVarintRegister(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x22 } - if m.TotalBondedStake != nil { + if m.InitialBalance != nil { { - size, err := m.TotalBondedStake.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { + size := m.InitialBalance.Size() + i -= size + if _, err := m.InitialBalance.MarshalTo(dAtA[i:]); err != nil { return 0, err } - i -= size i = encodeVarintRegister(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x1a } - if m.MetaNodesTotalStake != nil { - { - size, err := m.MetaNodesTotalStake.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRegister(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 + n10, err10 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.CompletionTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.CompletionTime):]) + if err10 != nil { + return 0, err10 } - if m.ResourceNodesTotalStake != nil { - { - size, err := m.ResourceNodesTotalStake.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRegister(dAtA, i, uint64(size)) - } + i -= n10 + i = encodeVarintRegister(dAtA, i, uint64(n10)) + i-- + dAtA[i] = 0x12 + if m.CreationHeight != 0 { + i = encodeVarintRegister(dAtA, i, uint64(m.CreationHeight)) i-- - dAtA[i] = 0xa + dAtA[i] = 0x8 } return len(dAtA) - i, nil } -func (m *StakingInfo) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func encodeVarintRegister(dAtA []byte, offset int, v uint64) int { + offset -= sovRegister(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ } - return dAtA[:n], nil + dAtA[offset] = uint8(v) + return base } - -func (m *StakingInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (m *Params) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.BondDenom) + if l > 0 { + n += 1 + l + sovRegister(uint64(l)) + } + l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.UnbondingThreasholdTime) + n += 1 + l + sovRegister(uint64(l)) + l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.UnbondingCompletionTime) + n += 1 + l + sovRegister(uint64(l)) + if m.MaxEntries != 0 { + n += 1 + sovRegister(uint64(m.MaxEntries)) + } + if m.ResourceNodeRegEnabled { + n += 2 + } + return n } -func (m *StakingInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i +func (m *ResourceNode) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l - if m.UnBondedStake != nil { - { - size, err := m.UnBondedStake.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRegister(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x62 + l = len(m.NetworkAddress) + if l > 0 { + n += 1 + l + sovRegister(uint64(l)) } - if m.UnBondingStake != nil { - { - size, err := m.UnBondingStake.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRegister(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x5a + if m.Pubkey != nil { + l = m.Pubkey.Size() + n += 1 + l + sovRegister(uint64(l)) } - if m.BondedStake != nil { - { - size, err := m.BondedStake.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRegister(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x52 + if m.Suspend { + n += 2 } - if m.NodeType != 0 { - i = encodeVarintRegister(dAtA, i, uint64(m.NodeType)) - i-- - dAtA[i] = 0x48 + if m.Status != 0 { + n += 1 + sovRegister(uint64(m.Status)) } - n18, err18 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.CreationTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.CreationTime):]) - if err18 != nil { - return 0, err18 + l = m.Tokens.Size() + n += 1 + l + sovRegister(uint64(l)) + l = len(m.OwnerAddress) + if l > 0 { + n += 1 + l + sovRegister(uint64(l)) } - i -= n18 - i = encodeVarintRegister(dAtA, i, uint64(n18)) - i-- - dAtA[i] = 0x42 if m.Description != nil { - { - size, err := m.Description.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRegister(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a + l = m.Description.Size() + n += 1 + l + sovRegister(uint64(l)) } - if len(m.OwnerAddress) > 0 { - i -= len(m.OwnerAddress) - copy(dAtA[i:], m.OwnerAddress) - i = encodeVarintRegister(dAtA, i, uint64(len(m.OwnerAddress))) - i-- - dAtA[i] = 0x32 + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.CreationTime) + n += 1 + l + sovRegister(uint64(l)) + if m.NodeType != 0 { + n += 1 + sovRegister(uint64(m.NodeType)) } - if m.Tokens != nil { - { - size := m.Tokens.Size() - i -= size - if _, err := m.Tokens.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintRegister(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a + return n +} + +func (m *MetaNode) Size() (n int) { + if m == nil { + return 0 } - if m.Status != 0 { - i = encodeVarintRegister(dAtA, i, uint64(m.Status)) - i-- - dAtA[i] = 0x20 + var l int + _ = l + l = len(m.NetworkAddress) + if l > 0 { + n += 1 + l + sovRegister(uint64(l)) + } + if m.Pubkey != nil { + l = m.Pubkey.Size() + n += 1 + l + sovRegister(uint64(l)) } if m.Suspend { - i-- - if m.Suspend { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 + n += 2 } - if m.Pubkey != nil { - { - size, err := m.Pubkey.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRegister(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 + if m.Status != 0 { + n += 1 + sovRegister(uint64(m.Status)) } - if len(m.NetworkAddress) > 0 { - i -= len(m.NetworkAddress) - copy(dAtA[i:], m.NetworkAddress) - i = encodeVarintRegister(dAtA, i, uint64(len(m.NetworkAddress))) - i-- - dAtA[i] = 0xa + l = m.Tokens.Size() + n += 1 + l + sovRegister(uint64(l)) + l = len(m.OwnerAddress) + if l > 0 { + n += 1 + l + sovRegister(uint64(l)) } - return len(dAtA) - i, nil -} - -func (m *UnbondingNode) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err + if m.Description != nil { + l = m.Description.Size() + n += 1 + l + sovRegister(uint64(l)) } - return dAtA[:n], nil -} - -func (m *UnbondingNode) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.CreationTime) + n += 1 + l + sovRegister(uint64(l)) + return n } -func (m *UnbondingNode) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i +func (m *MetaNodeRegistrationVotePool) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l - if len(m.Entries) > 0 { - for iNdEx := len(m.Entries) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Entries[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRegister(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } + l = len(m.NetworkAddress) + if l > 0 { + n += 1 + l + sovRegister(uint64(l)) } - if m.IsMetaNode { - i-- - if m.IsMetaNode { - dAtA[i] = 1 - } else { - dAtA[i] = 0 + if len(m.ApproveList) > 0 { + for _, s := range m.ApproveList { + l = len(s) + n += 1 + l + sovRegister(uint64(l)) } - i-- - dAtA[i] = 0x10 } - if len(m.NetworkAddr) > 0 { - i -= len(m.NetworkAddr) - copy(dAtA[i:], m.NetworkAddr) - i = encodeVarintRegister(dAtA, i, uint64(len(m.NetworkAddr))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *UnbondingNodeEntry) 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 *UnbondingNodeEntry) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *UnbondingNodeEntry) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Balance != nil { - { - size := m.Balance.Size() - i -= size - if _, err := m.Balance.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintRegister(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.InitialBalance != nil { - { - size := m.InitialBalance.Size() - i -= size - if _, err := m.InitialBalance.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintRegister(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - n21, err21 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.CompletionTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.CompletionTime):]) - if err21 != nil { - return 0, err21 - } - i -= n21 - i = encodeVarintRegister(dAtA, i, uint64(n21)) - i-- - dAtA[i] = 0x12 - if m.CreationHeight != 0 { - i = encodeVarintRegister(dAtA, i, uint64(m.CreationHeight)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *Staking) 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 *Staking) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Staking) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size := m.Value.Size() - i -= size - if _, err := m.Value.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintRegister(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - if len(m.OwnerAddress) > 0 { - i -= len(m.OwnerAddress) - copy(dAtA[i:], m.OwnerAddress) - i = encodeVarintRegister(dAtA, i, uint64(len(m.OwnerAddress))) - i-- - dAtA[i] = 0x12 - } - if len(m.NetworkAddress) > 0 { - i -= len(m.NetworkAddress) - copy(dAtA[i:], m.NetworkAddress) - i = encodeVarintRegister(dAtA, i, uint64(len(m.NetworkAddress))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintRegister(dAtA []byte, offset int, v uint64) int { - offset -= sovRegister(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *Params) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.BondDenom) - if l > 0 { - n += 1 + l + sovRegister(uint64(l)) - } - l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.UnbondingThreasholdTime) - n += 1 + l + sovRegister(uint64(l)) - l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.UnbondingCompletionTime) - n += 1 + l + sovRegister(uint64(l)) - if m.MaxEntries != 0 { - n += 1 + sovRegister(uint64(m.MaxEntries)) - } - if m.ResourceNodeRegEnabled { - n += 2 - } - return n -} - -func (m *ResourceNode) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.NetworkAddress) - if l > 0 { - n += 1 + l + sovRegister(uint64(l)) - } - if m.Pubkey != nil { - l = m.Pubkey.Size() - n += 1 + l + sovRegister(uint64(l)) - } - if m.Suspend { - n += 2 - } - if m.Status != 0 { - n += 1 + sovRegister(uint64(m.Status)) - } - l = m.Tokens.Size() - n += 1 + l + sovRegister(uint64(l)) - l = len(m.OwnerAddress) - if l > 0 { - n += 1 + l + sovRegister(uint64(l)) - } - if m.Description != nil { - l = m.Description.Size() - n += 1 + l + sovRegister(uint64(l)) - } - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.CreationTime) - n += 1 + l + sovRegister(uint64(l)) - if m.NodeType != 0 { - n += 1 + sovRegister(uint64(m.NodeType)) - } - return n -} - -func (m *MetaNode) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.NetworkAddress) - if l > 0 { - n += 1 + l + sovRegister(uint64(l)) - } - if m.Pubkey != nil { - l = m.Pubkey.Size() - n += 1 + l + sovRegister(uint64(l)) - } - if m.Suspend { - n += 2 - } - if m.Status != 0 { - n += 1 + sovRegister(uint64(m.Status)) - } - l = m.Tokens.Size() - n += 1 + l + sovRegister(uint64(l)) - l = len(m.OwnerAddress) - if l > 0 { - n += 1 + l + sovRegister(uint64(l)) - } - if m.Description != nil { - l = m.Description.Size() - n += 1 + l + sovRegister(uint64(l)) - } - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.CreationTime) - n += 1 + l + sovRegister(uint64(l)) - return n -} - -func (m *MetaNodeRegistrationVotePool) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.NetworkAddress) - if l > 0 { - n += 1 + l + sovRegister(uint64(l)) - } - if len(m.ApproveList) > 0 { - for _, s := range m.ApproveList { - l = len(s) - n += 1 + l + sovRegister(uint64(l)) - } - } - if len(m.RejectList) > 0 { - for _, s := range m.RejectList { - l = len(s) - n += 1 + l + sovRegister(uint64(l)) - } + if len(m.RejectList) > 0 { + for _, s := range m.RejectList { + l = len(s) + n += 1 + l + sovRegister(uint64(l)) + } } l = github_com_gogo_protobuf_types.SizeOfStdTime(m.ExpireTime) n += 1 + l + sovRegister(uint64(l)) @@ -2075,115 +1437,18 @@ func (m *Description) Size() (n int) { return n } -func (m *Slashing) Size() (n int) { +func (m *UnbondingNode) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.WalletAddress) + l = len(m.NetworkAddr) if l > 0 { n += 1 + l + sovRegister(uint64(l)) } - if m.Value != 0 { - n += 1 + sovRegister(uint64(m.Value)) - } - return n -} - -func (m *TotalStakesResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ResourceNodesTotalStake != nil { - l = m.ResourceNodesTotalStake.Size() - n += 1 + l + sovRegister(uint64(l)) - } - if m.MetaNodesTotalStake != nil { - l = m.MetaNodesTotalStake.Size() - n += 1 + l + sovRegister(uint64(l)) - } - if m.TotalBondedStake != nil { - l = m.TotalBondedStake.Size() - n += 1 + l + sovRegister(uint64(l)) - } - if m.TotalUnbondedStake != nil { - l = m.TotalUnbondedStake.Size() - n += 1 + l + sovRegister(uint64(l)) - } - if m.TotalUnbondingStake != nil { - l = m.TotalUnbondingStake.Size() - n += 1 + l + sovRegister(uint64(l)) - } - return n -} - -func (m *StakingInfo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.NetworkAddress) - if l > 0 { - n += 1 + l + sovRegister(uint64(l)) - } - if m.Pubkey != nil { - l = m.Pubkey.Size() - n += 1 + l + sovRegister(uint64(l)) - } - if m.Suspend { - n += 2 - } - if m.Status != 0 { - n += 1 + sovRegister(uint64(m.Status)) - } - if m.Tokens != nil { - l = m.Tokens.Size() - n += 1 + l + sovRegister(uint64(l)) - } - l = len(m.OwnerAddress) - if l > 0 { - n += 1 + l + sovRegister(uint64(l)) - } - if m.Description != nil { - l = m.Description.Size() - n += 1 + l + sovRegister(uint64(l)) - } - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.CreationTime) - n += 1 + l + sovRegister(uint64(l)) - if m.NodeType != 0 { - n += 1 + sovRegister(uint64(m.NodeType)) - } - if m.BondedStake != nil { - l = m.BondedStake.Size() - n += 1 + l + sovRegister(uint64(l)) - } - if m.UnBondingStake != nil { - l = m.UnBondingStake.Size() - n += 1 + l + sovRegister(uint64(l)) - } - if m.UnBondedStake != nil { - l = m.UnBondedStake.Size() - n += 1 + l + sovRegister(uint64(l)) - } - return n -} - -func (m *UnbondingNode) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.NetworkAddr) - if l > 0 { - n += 1 + l + sovRegister(uint64(l)) - } - if m.IsMetaNode { - n += 2 + if m.IsMetaNode { + n += 2 } if len(m.Entries) > 0 { for _, e := range m.Entries { @@ -2191,847 +1456,38 @@ func (m *UnbondingNode) Size() (n int) { n += 1 + l + sovRegister(uint64(l)) } } - return n -} - -func (m *UnbondingNodeEntry) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.CreationHeight != 0 { - n += 1 + sovRegister(uint64(m.CreationHeight)) - } - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.CompletionTime) - n += 1 + l + sovRegister(uint64(l)) - if m.InitialBalance != nil { - l = m.InitialBalance.Size() - n += 1 + l + sovRegister(uint64(l)) - } - if m.Balance != nil { - l = m.Balance.Size() - n += 1 + l + sovRegister(uint64(l)) - } - return n -} - -func (m *Staking) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.NetworkAddress) - if l > 0 { - n += 1 + l + sovRegister(uint64(l)) - } - l = len(m.OwnerAddress) - if l > 0 { - n += 1 + l + sovRegister(uint64(l)) - } - l = m.Value.Size() - n += 1 + l + sovRegister(uint64(l)) - return n -} - -func sovRegister(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozRegister(x uint64) (n int) { - return sovRegister(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Params) 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 ErrIntOverflowRegister - } - 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: Params: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BondDenom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRegister - } - 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 ErrInvalidLengthRegister - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRegister - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BondDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UnbondingThreasholdTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRegister - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRegister - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRegister - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.UnbondingThreasholdTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UnbondingCompletionTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRegister - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRegister - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRegister - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.UnbondingCompletionTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxEntries", wireType) - } - m.MaxEntries = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRegister - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MaxEntries |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceNodeRegEnabled", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRegister - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.ResourceNodeRegEnabled = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipRegister(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRegister - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ResourceNode) 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 ErrIntOverflowRegister - } - 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: ResourceNode: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceNode: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NetworkAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRegister - } - 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 ErrInvalidLengthRegister - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRegister - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NetworkAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pubkey", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRegister - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRegister - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRegister - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pubkey == nil { - m.Pubkey = &types.Any{} - } - if err := m.Pubkey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Suspend", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRegister - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Suspend = bool(v != 0) - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - m.Status = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRegister - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Status |= types1.BondStatus(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Tokens", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRegister - } - 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 ErrInvalidLengthRegister - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRegister - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Tokens.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OwnerAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRegister - } - 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 ErrInvalidLengthRegister - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRegister - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OwnerAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRegister - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRegister - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRegister - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Description == nil { - m.Description = &Description{} - } - if err := m.Description.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CreationTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRegister - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRegister - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRegister - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.CreationTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NodeType", wireType) - } - m.NodeType = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRegister - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.NodeType |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipRegister(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRegister - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MetaNode) 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 ErrIntOverflowRegister - } - 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: MetaNode: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MetaNode: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NetworkAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRegister - } - 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 ErrInvalidLengthRegister - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRegister - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NetworkAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pubkey", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRegister - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRegister - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRegister - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pubkey == nil { - m.Pubkey = &types.Any{} - } - if err := m.Pubkey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Suspend", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRegister - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Suspend = bool(v != 0) - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - m.Status = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRegister - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Status |= types1.BondStatus(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Tokens", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRegister - } - 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 ErrInvalidLengthRegister - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRegister - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Tokens.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OwnerAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRegister - } - 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 ErrInvalidLengthRegister - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRegister - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OwnerAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRegister - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRegister - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRegister - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Description == nil { - m.Description = &Description{} - } - if err := m.Description.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CreationTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRegister - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRegister - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRegister - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.CreationTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRegister(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRegister - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } + return n +} - if iNdEx > l { - return io.ErrUnexpectedEOF +func (m *UnbondingNodeEntry) Size() (n int) { + if m == nil { + return 0 } - return nil + var l int + _ = l + if m.CreationHeight != 0 { + n += 1 + sovRegister(uint64(m.CreationHeight)) + } + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.CompletionTime) + n += 1 + l + sovRegister(uint64(l)) + if m.InitialBalance != nil { + l = m.InitialBalance.Size() + n += 1 + l + sovRegister(uint64(l)) + } + if m.Balance != nil { + l = m.Balance.Size() + n += 1 + l + sovRegister(uint64(l)) + } + return n } -func (m *MetaNodeRegistrationVotePool) Unmarshal(dAtA []byte) error { + +func sovRegister(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozRegister(x uint64) (n int) { + return sovRegister(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Params) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3054,15 +1510,15 @@ func (m *MetaNodeRegistrationVotePool) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MetaNodeRegistrationVotePool: wiretype end group for non-group") + return fmt.Errorf("proto: Params: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MetaNodeRegistrationVotePool: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NetworkAddress", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field BondDenom", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3090,13 +1546,13 @@ func (m *MetaNodeRegistrationVotePool) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.NetworkAddress = string(dAtA[iNdEx:postIndex]) + m.BondDenom = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ApproveList", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field UnbondingThreasholdTime", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowRegister @@ -3106,29 +1562,30 @@ func (m *MetaNodeRegistrationVotePool) 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 ErrInvalidLengthRegister } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthRegister } if postIndex > l { return io.ErrUnexpectedEOF } - m.ApproveList = append(m.ApproveList, string(dAtA[iNdEx:postIndex])) + if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.UnbondingThreasholdTime, dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RejectList", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field UnbondingCompletionTime", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowRegister @@ -3138,29 +1595,30 @@ func (m *MetaNodeRegistrationVotePool) 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 ErrInvalidLengthRegister } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthRegister } if postIndex > l { return io.ErrUnexpectedEOF } - m.RejectList = append(m.RejectList, string(dAtA[iNdEx:postIndex])) + if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.UnbondingCompletionTime, dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExpireTime", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxEntries", wireType) } - var msglen int + m.MaxEntries = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowRegister @@ -3170,25 +1628,31 @@ func (m *MetaNodeRegistrationVotePool) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.MaxEntries |= uint32(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return ErrInvalidLengthRegister - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRegister - } - if postIndex > l { - return io.ErrUnexpectedEOF + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ResourceNodeRegEnabled", wireType) } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.ExpireTime, dAtA[iNdEx:postIndex]); err != nil { - return err + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRegister + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } } - iNdEx = postIndex + m.ResourceNodeRegEnabled = bool(v != 0) default: iNdEx = preIndex skippy, err := skipRegister(dAtA[iNdEx:]) @@ -3210,7 +1674,7 @@ func (m *MetaNodeRegistrationVotePool) Unmarshal(dAtA []byte) error { } return nil } -func (m *Description) Unmarshal(dAtA []byte) error { +func (m *ResourceNode) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3233,15 +1697,15 @@ func (m *Description) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Description: wiretype end group for non-group") + return fmt.Errorf("proto: ResourceNode: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Description: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ResourceNode: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Moniker", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field NetworkAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3269,13 +1733,13 @@ func (m *Description) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Moniker = string(dAtA[iNdEx:postIndex]) + m.NetworkAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Identity", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Pubkey", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowRegister @@ -3285,27 +1749,70 @@ func (m *Description) 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 ErrInvalidLengthRegister } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthRegister } if postIndex > l { return io.ErrUnexpectedEOF } - m.Identity = string(dAtA[iNdEx:postIndex]) + if m.Pubkey == nil { + m.Pubkey = &types.Any{} + } + if err := m.Pubkey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Suspend", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRegister + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Suspend = bool(v != 0) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + m.Status = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRegister + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Status |= types1.BondStatus(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Website", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Tokens", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3333,11 +1840,13 @@ func (m *Description) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Website = string(dAtA[iNdEx:postIndex]) + if err := m.Tokens.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 4: + case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SecurityContact", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field OwnerAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3365,13 +1874,13 @@ func (m *Description) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.SecurityContact = string(dAtA[iNdEx:postIndex]) + m.OwnerAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 5: + case 7: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Details", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowRegister @@ -3381,79 +1890,33 @@ func (m *Description) 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 ErrInvalidLengthRegister } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthRegister } if postIndex > l { return io.ErrUnexpectedEOF } - m.Details = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRegister(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRegister - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Slashing) 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 ErrIntOverflowRegister - } - if iNdEx >= l { - return io.ErrUnexpectedEOF + if m.Description == nil { + m.Description = &Description{} } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + if err := m.Description.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Slashing: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Slashing: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + iNdEx = postIndex + case 8: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field WalletAddress", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field CreationTime", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowRegister @@ -3463,29 +1926,30 @@ func (m *Slashing) 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 ErrInvalidLengthRegister } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthRegister } if postIndex > l { return io.ErrUnexpectedEOF } - m.WalletAddress = string(dAtA[iNdEx:postIndex]) + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.CreationTime, dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 2: + case 9: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field NodeType", wireType) } - m.Value = 0 + m.NodeType = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowRegister @@ -3495,7 +1959,7 @@ func (m *Slashing) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Value |= int64(b&0x7F) << shift + m.NodeType |= uint32(b&0x7F) << shift if b < 0x80 { break } @@ -3521,7 +1985,7 @@ func (m *Slashing) Unmarshal(dAtA []byte) error { } return nil } -func (m *TotalStakesResponse) Unmarshal(dAtA []byte) error { +func (m *MetaNode) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3544,17 +2008,17 @@ func (m *TotalStakesResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: TotalStakesResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MetaNode: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: TotalStakesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MetaNode: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceNodesTotalStake", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field NetworkAddress", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowRegister @@ -3564,31 +2028,27 @@ func (m *TotalStakesResponse) 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 ErrInvalidLengthRegister } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthRegister } if postIndex > l { return io.ErrUnexpectedEOF } - if m.ResourceNodesTotalStake == nil { - m.ResourceNodesTotalStake = &types2.Coin{} - } - if err := m.ResourceNodesTotalStake.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.NetworkAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MetaNodesTotalStake", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Pubkey", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3615,18 +2075,57 @@ func (m *TotalStakesResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.MetaNodesTotalStake == nil { - m.MetaNodesTotalStake = &types2.Coin{} + if m.Pubkey == nil { + m.Pubkey = &types.Any{} } - if err := m.MetaNodesTotalStake.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Pubkey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Suspend", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRegister + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Suspend = bool(v != 0) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + m.Status = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRegister + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Status |= types1.BondStatus(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TotalBondedStake", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Tokens", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowRegister @@ -3636,31 +2135,61 @@ func (m *TotalStakesResponse) 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 ErrInvalidLengthRegister } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthRegister } if postIndex > l { return io.ErrUnexpectedEOF } - if m.TotalBondedStake == nil { - m.TotalBondedStake = &types2.Coin{} - } - if err := m.TotalBondedStake.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Tokens.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 4: + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRegister + } + 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 ErrInvalidLengthRegister + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRegister + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OwnerAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TotalUnbondedStake", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3687,16 +2216,16 @@ func (m *TotalStakesResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.TotalUnbondedStake == nil { - m.TotalUnbondedStake = &types2.Coin{} + if m.Description == nil { + m.Description = &Description{} } - if err := m.TotalUnbondedStake.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Description.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 5: + case 8: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TotalUnbondingStake", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field CreationTime", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3723,10 +2252,7 @@ func (m *TotalStakesResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.TotalUnbondingStake == nil { - m.TotalUnbondingStake = &types2.Coin{} - } - if err := m.TotalUnbondingStake.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.CreationTime, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -3751,7 +2277,7 @@ func (m *TotalStakesResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *StakingInfo) Unmarshal(dAtA []byte) error { +func (m *MetaNodeRegistrationVotePool) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3774,10 +2300,10 @@ func (m *StakingInfo) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: StakingInfo: wiretype end group for non-group") + return fmt.Errorf("proto: MetaNodeRegistrationVotePool: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: StakingInfo: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MetaNodeRegistrationVotePool: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3814,9 +2340,9 @@ func (m *StakingInfo) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pubkey", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ApproveList", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowRegister @@ -3826,70 +2352,27 @@ func (m *StakingInfo) 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 ErrInvalidLengthRegister } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthRegister } if postIndex > l { return io.ErrUnexpectedEOF } - if m.Pubkey == nil { - m.Pubkey = &types.Any{} - } - if err := m.Pubkey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.ApproveList = append(m.ApproveList, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Suspend", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRegister - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Suspend = bool(v != 0) - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - m.Status = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRegister - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Status |= types1.BondStatus(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Tokens", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field RejectList", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3917,17 +2400,13 @@ func (m *StakingInfo) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_cosmos_cosmos_sdk_types.Int - m.Tokens = &v - if err := m.Tokens.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.RejectList = append(m.RejectList, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex - case 6: + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OwnerAddress", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ExpireTime", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowRegister @@ -3937,29 +2416,80 @@ func (m *StakingInfo) 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 ErrInvalidLengthRegister } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthRegister } if postIndex > l { return io.ErrUnexpectedEOF } - m.OwnerAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.ExpireTime, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRegister(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthRegister + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Description) 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 ErrIntOverflowRegister + } + 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: Description: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Description: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Moniker", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowRegister @@ -3969,33 +2499,29 @@ func (m *StakingInfo) 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 ErrInvalidLengthRegister } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthRegister } if postIndex > l { return io.ErrUnexpectedEOF } - if m.Description == nil { - m.Description = &Description{} - } - if err := m.Description.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Moniker = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 8: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CreationTime", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Identity", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowRegister @@ -4005,49 +2531,29 @@ func (m *StakingInfo) 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 ErrInvalidLengthRegister } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthRegister } if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.CreationTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Identity = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NodeType", wireType) - } - m.NodeType = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRegister - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.NodeType |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 10: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BondedStake", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Website", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowRegister @@ -4057,33 +2563,29 @@ func (m *StakingInfo) 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 ErrInvalidLengthRegister } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthRegister } if postIndex > l { return io.ErrUnexpectedEOF } - if m.BondedStake == nil { - m.BondedStake = &types2.Coin{} - } - if err := m.BondedStake.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Website = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 11: + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UnBondingStake", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SecurityContact", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowRegister @@ -4093,33 +2595,29 @@ func (m *StakingInfo) 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 ErrInvalidLengthRegister } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthRegister } if postIndex > l { return io.ErrUnexpectedEOF } - if m.UnBondingStake == nil { - m.UnBondingStake = &types2.Coin{} - } - if err := m.UnBondingStake.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.SecurityContact = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 12: + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UnBondedStake", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Details", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowRegister @@ -4129,27 +2627,23 @@ func (m *StakingInfo) 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 ErrInvalidLengthRegister } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthRegister } if postIndex > l { return io.ErrUnexpectedEOF } - if m.UnBondedStake == nil { - m.UnBondedStake = &types2.Coin{} - } - if err := m.UnBondedStake.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Details = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -4482,154 +2976,6 @@ func (m *UnbondingNodeEntry) Unmarshal(dAtA []byte) error { } return nil } -func (m *Staking) 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 ErrIntOverflowRegister - } - 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: Staking: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Staking: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NetworkAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRegister - } - 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 ErrInvalidLengthRegister - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRegister - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NetworkAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OwnerAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRegister - } - 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 ErrInvalidLengthRegister - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRegister - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OwnerAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRegister - } - 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 ErrInvalidLengthRegister - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRegister - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRegister(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRegister - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func skipRegister(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/register/types/resource_node.go b/x/register/types/resource_node.go index 25fec5d7..ef19d1df 100644 --- a/x/register/types/resource_node.go +++ b/x/register/types/resource_node.go @@ -219,25 +219,25 @@ func UnmarshalResourceNode(cdc codec.Codec, value []byte) (v ResourceNode, err e return v, err } -func (s *Staking) GetOwnerAddr() sdk.AccAddress { - addr, err := sdk.AccAddressFromBech32(s.OwnerAddress) - if err != nil { - panic(err) - } - return addr -} -func (s *Staking) GetShares() sdk.Dec { return s.Value } - -// Stakings is a collection of Staking -type Stakings []Staking - -func (ss Stakings) String() (out string) { - for _, staking := range ss { - out += staking.String() + "\n" - } - - return strings.TrimSpace(out) -} +//func (s *Staking) GetOwnerAddr() sdk.AccAddress { +// addr, err := sdk.AccAddressFromBech32(s.OwnerAddress) +// if err != nil { +// panic(err) +// } +// return addr +//} +//func (s *Staking) GetShares() sdk.Dec { return s.Value } +// +//// Stakings is a collection of Staking +//type Stakings []Staking +// +//func (ss Stakings) String() (out string) { +// for _, staking := range ss { +// out += staking.String() + "\n" +// } +// +// return strings.TrimSpace(out) +//} // UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces func (v ResourceNode) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { diff --git a/x/register/types/tx.pb.go b/x/register/types/tx.pb.go index 957782f6..0f7e051f 100644 --- a/x/register/types/tx.pb.go +++ b/x/register/types/tx.pb.go @@ -34,12 +34,12 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // MsgCreateResourceNode encapsulates an MsgCreateResourceNodeTx transaction as an SDK message. type MsgCreateResourceNode struct { - NetworkAddress string `protobuf:"bytes,1,opt,name=network_address,json=networkAddress,proto3" json:"network_address" yaml:"network_address"` - Pubkey *types.Any `protobuf:"bytes,2,opt,name=pubkey,proto3" json:"pubkey" yaml:"pubkey"` - Value types1.Coin `protobuf:"bytes,3,opt,name=value,proto3" json:"value" yaml:"value"` - OwnerAddress string `protobuf:"bytes,4,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address" yaml:"owner_address"` - Description *Description `protobuf:"bytes,5,opt,name=description,proto3" json:"description" yaml:"description"` - NodeType uint32 `protobuf:"varint,6,opt,name=node_type,json=nodeType,proto3" json:"node_type" yaml:"node_type"` + NetworkAddress string `protobuf:"bytes,1,opt,name=network_address,json=networkAddress,proto3" json:"network_address" yaml:"network_address"` + Pubkey *types.Any `protobuf:"bytes,2,opt,name=pubkey,proto3" json:"pubkey" yaml:"pubkey"` + Value types1.DecCoin `protobuf:"bytes,3,opt,name=value,proto3" json:"value" yaml:"value"` + OwnerAddress string `protobuf:"bytes,4,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address" yaml:"owner_address"` + Description *Description `protobuf:"bytes,5,opt,name=description,proto3" json:"description" yaml:"description"` + NodeType uint32 `protobuf:"varint,6,opt,name=node_type,json=nodeType,proto3" json:"node_type" yaml:"node_type"` } func (m *MsgCreateResourceNode) Reset() { *m = MsgCreateResourceNode{} } @@ -89,11 +89,11 @@ func (m *MsgCreateResourceNode) GetPubkey() *types.Any { return nil } -func (m *MsgCreateResourceNode) GetValue() types1.Coin { +func (m *MsgCreateResourceNode) GetValue() types1.DecCoin { if m != nil { return m.Value } - return types1.Coin{} + return types1.DecCoin{} } func (m *MsgCreateResourceNode) GetOwnerAddress() string { @@ -156,11 +156,11 @@ var xxx_messageInfo_MsgCreateResourceNodeResponse proto.InternalMessageInfo // MsgCreateMetaNode encapsulates an MsgCreateMetaNodeTx transaction as an SDK message. type MsgCreateMetaNode struct { - NetworkAddress string `protobuf:"bytes,1,opt,name=network_address,json=networkAddress,proto3" json:"network_address" yaml:"network_address"` - Pubkey *types.Any `protobuf:"bytes,2,opt,name=pubkey,proto3" json:"pubkey" yaml:"pubkey"` - Value types1.Coin `protobuf:"bytes,3,opt,name=value,proto3" json:"value" yaml:"value"` - OwnerAddress string `protobuf:"bytes,4,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address" yaml:"owner_address"` - Description *Description `protobuf:"bytes,5,opt,name=description,proto3" json:"description" yaml:"description"` + NetworkAddress string `protobuf:"bytes,1,opt,name=network_address,json=networkAddress,proto3" json:"network_address" yaml:"network_address"` + Pubkey *types.Any `protobuf:"bytes,2,opt,name=pubkey,proto3" json:"pubkey" yaml:"pubkey"` + Value types1.DecCoin `protobuf:"bytes,3,opt,name=value,proto3" json:"value" yaml:"value"` + OwnerAddress string `protobuf:"bytes,4,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address" yaml:"owner_address"` + Description *Description `protobuf:"bytes,5,opt,name=description,proto3" json:"description" yaml:"description"` } func (m *MsgCreateMetaNode) Reset() { *m = MsgCreateMetaNode{} } @@ -210,11 +210,11 @@ func (m *MsgCreateMetaNode) GetPubkey() *types.Any { return nil } -func (m *MsgCreateMetaNode) GetValue() types1.Coin { +func (m *MsgCreateMetaNode) GetValue() types1.DecCoin { if m != nil { return m.Value } - return types1.Coin{} + return types1.DecCoin{} } func (m *MsgCreateMetaNode) GetOwnerAddress() string { @@ -307,6 +307,20 @@ func (m *MsgRemoveResourceNode) XXX_DiscardUnknown() { var xxx_messageInfo_MsgRemoveResourceNode proto.InternalMessageInfo +func (m *MsgRemoveResourceNode) GetResourceNodeAddress() string { + if m != nil { + return m.ResourceNodeAddress + } + return "" +} + +func (m *MsgRemoveResourceNode) GetOwnerAddress() string { + if m != nil { + return m.OwnerAddress + } + return "" +} + // MsgRemoveResourceNodeResponse defines the Msg/RemoveResourceNode response type. type MsgRemoveResourceNodeResponse struct { } @@ -383,6 +397,20 @@ func (m *MsgRemoveMetaNode) XXX_DiscardUnknown() { var xxx_messageInfo_MsgRemoveMetaNode proto.InternalMessageInfo +func (m *MsgRemoveMetaNode) GetMetaNodeAddress() string { + if m != nil { + return m.MetaNodeAddress + } + return "" +} + +func (m *MsgRemoveMetaNode) GetOwnerAddress() string { + if m != nil { + return m.OwnerAddress + } + return "" +} + // MsgRemoveMetaNodeResponse defines the Msg/RemoveMetaNode response type. type MsgRemoveMetaNodeResponse struct { } @@ -461,6 +489,34 @@ func (m *MsgUpdateResourceNode) XXX_DiscardUnknown() { var xxx_messageInfo_MsgUpdateResourceNode proto.InternalMessageInfo +func (m *MsgUpdateResourceNode) GetDescription() Description { + if m != nil { + return m.Description + } + return Description{} +} + +func (m *MsgUpdateResourceNode) GetNetworkAddress() string { + if m != nil { + return m.NetworkAddress + } + return "" +} + +func (m *MsgUpdateResourceNode) GetOwnerAddress() string { + if m != nil { + return m.OwnerAddress + } + return "" +} + +func (m *MsgUpdateResourceNode) GetNodeType() uint32 { + if m != nil { + return m.NodeType + } + return 0 +} + // MsgUpdateResourceNodeResponse defines the Msg/UpdateResourceNode response type. type MsgUpdateResourceNodeResponse struct { } @@ -538,6 +594,27 @@ func (m *MsgUpdateMetaNode) XXX_DiscardUnknown() { var xxx_messageInfo_MsgUpdateMetaNode proto.InternalMessageInfo +func (m *MsgUpdateMetaNode) GetDescription() Description { + if m != nil { + return m.Description + } + return Description{} +} + +func (m *MsgUpdateMetaNode) GetNetworkAddress() string { + if m != nil { + return m.NetworkAddress + } + return "" +} + +func (m *MsgUpdateMetaNode) GetOwnerAddress() string { + if m != nil { + return m.OwnerAddress + } + return "" +} + // MsgUpdateMetaNodeResponse defines the Msg/UpdateMetaNode response type. type MsgUpdateMetaNodeResponse struct { } @@ -577,10 +654,10 @@ var xxx_messageInfo_MsgUpdateMetaNodeResponse proto.InternalMessageInfo // MsgUpdateResourceNodeStake defines a SDK message for updating the stake of an existing resource node. type MsgUpdateResourceNodeStake struct { - NetworkAddress string `protobuf:"bytes,1,opt,name=network_address,json=networkAddress,proto3" json:"network_address" yaml:"network_address"` - OwnerAddress string `protobuf:"bytes,2,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address" yaml:"owner_address"` - IncrStake bool `protobuf:"varint,3,opt,name=incr_stake,json=incrStake,proto3" json:"incr_stake" yaml:"incr_stake"` - StakeDelta *types1.Coin `protobuf:"bytes,4,opt,name=stake_delta,json=stakeDelta,proto3" json:"stake_delta" yaml:"stake_delta"` + NetworkAddress string `protobuf:"bytes,1,opt,name=network_address,json=networkAddress,proto3" json:"network_address" yaml:"network_address"` + OwnerAddress string `protobuf:"bytes,2,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address" yaml:"owner_address"` + IncrStake bool `protobuf:"varint,3,opt,name=incr_stake,json=incrStake,proto3" json:"incr_stake" yaml:"incr_stake"` + StakeDelta types1.DecCoin `protobuf:"bytes,4,opt,name=stake_delta,json=stakeDelta,proto3" json:"stake_delta" yaml:"stake_delta"` } func (m *MsgUpdateResourceNodeStake) Reset() { *m = MsgUpdateResourceNodeStake{} } @@ -616,6 +693,34 @@ func (m *MsgUpdateResourceNodeStake) XXX_DiscardUnknown() { var xxx_messageInfo_MsgUpdateResourceNodeStake proto.InternalMessageInfo +func (m *MsgUpdateResourceNodeStake) GetNetworkAddress() string { + if m != nil { + return m.NetworkAddress + } + return "" +} + +func (m *MsgUpdateResourceNodeStake) GetOwnerAddress() string { + if m != nil { + return m.OwnerAddress + } + return "" +} + +func (m *MsgUpdateResourceNodeStake) GetIncrStake() bool { + if m != nil { + return m.IncrStake + } + return false +} + +func (m *MsgUpdateResourceNodeStake) GetStakeDelta() types1.DecCoin { + if m != nil { + return m.StakeDelta + } + return types1.DecCoin{} +} + // MsgUpdateResourceNodeStakeResponse defines the Msg/UpdateResourceNodeStake response type. type MsgUpdateResourceNodeStakeResponse struct { } @@ -655,10 +760,10 @@ var xxx_messageInfo_MsgUpdateResourceNodeStakeResponse proto.InternalMessageInfo // MsgUpdateMetaNodeStake defines a SDK message for updating the stake of an existing meta node. type MsgUpdateMetaNodeStake struct { - NetworkAddress string `protobuf:"bytes,1,opt,name=network_address,json=networkAddress,proto3" json:"network_address" yaml:"network_address"` - OwnerAddress string `protobuf:"bytes,2,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address" yaml:"owner_address"` - IncrStake bool `protobuf:"varint,3,opt,name=incr_stake,json=incrStake,proto3" json:"incr_stake" yaml:"incr_stake"` - StakeDelta *types1.Coin `protobuf:"bytes,4,opt,name=stake_delta,json=stakeDelta,proto3" json:"stake_delta" yaml:"stake_delta"` + NetworkAddress string `protobuf:"bytes,1,opt,name=network_address,json=networkAddress,proto3" json:"network_address" yaml:"network_address"` + OwnerAddress string `protobuf:"bytes,2,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address" yaml:"owner_address"` + IncrStake bool `protobuf:"varint,3,opt,name=incr_stake,json=incrStake,proto3" json:"incr_stake" yaml:"incr_stake"` + StakeDelta types1.DecCoin `protobuf:"bytes,4,opt,name=stake_delta,json=stakeDelta,proto3" json:"stake_delta" yaml:"stake_delta"` } func (m *MsgUpdateMetaNodeStake) Reset() { *m = MsgUpdateMetaNodeStake{} } @@ -694,6 +799,34 @@ func (m *MsgUpdateMetaNodeStake) XXX_DiscardUnknown() { var xxx_messageInfo_MsgUpdateMetaNodeStake proto.InternalMessageInfo +func (m *MsgUpdateMetaNodeStake) GetNetworkAddress() string { + if m != nil { + return m.NetworkAddress + } + return "" +} + +func (m *MsgUpdateMetaNodeStake) GetOwnerAddress() string { + if m != nil { + return m.OwnerAddress + } + return "" +} + +func (m *MsgUpdateMetaNodeStake) GetIncrStake() bool { + if m != nil { + return m.IncrStake + } + return false +} + +func (m *MsgUpdateMetaNodeStake) GetStakeDelta() types1.DecCoin { + if m != nil { + return m.StakeDelta + } + return types1.DecCoin{} +} + // MsgUpdateResourceNodeStakeResponse defines the Msg/UpdateResourceNodeStake response type. type MsgUpdateMetaNodeStakeResponse struct { } @@ -773,6 +906,41 @@ func (m *MsgMetaNodeRegistrationVote) XXX_DiscardUnknown() { var xxx_messageInfo_MsgMetaNodeRegistrationVote proto.InternalMessageInfo +func (m *MsgMetaNodeRegistrationVote) GetCandidateNetworkAddress() string { + if m != nil { + return m.CandidateNetworkAddress + } + return "" +} + +func (m *MsgMetaNodeRegistrationVote) GetCandidateOwnerAddress() string { + if m != nil { + return m.CandidateOwnerAddress + } + return "" +} + +func (m *MsgMetaNodeRegistrationVote) GetOpinion() bool { + if m != nil { + return m.Opinion + } + return false +} + +func (m *MsgMetaNodeRegistrationVote) GetVoterNetworkAddress() string { + if m != nil { + return m.VoterNetworkAddress + } + return "" +} + +func (m *MsgMetaNodeRegistrationVote) GetVoterOwnerAddress() string { + if m != nil { + return m.VoterOwnerAddress + } + return "" +} + // MsgUpdateResourceNodeStakeResponse defines the Msg/MetaNodeRegistrationVote response type. type MsgMetaNodeRegistrationVoteResponse struct { } @@ -834,87 +1002,86 @@ func init() { func init() { proto.RegisterFile("stratos/register/v1/tx.proto", fileDescriptor_75d4b90d7a185a31) } var fileDescriptor_75d4b90d7a185a31 = []byte{ - // 1275 bytes of a gzipped FileDescriptorProto + // 1262 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec,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6, 0x70, 0x9a, 0xaf, 0xc4, 0x86, 0x48, 0xe6, 0xe6, - 0xc2, 0x01, 0x98, 0x21, 0x8f, 0x35, 0xac, 0xfb, 0x8d, 0xc8, 0xb3, 0x46, 0x6c, 0x58, 0x14, 0x86, - 0x1d, 0x36, 0x85, 0xf3, 0x7c, 0x82, 0x90, 0x19, 0xc9, 0xd3, 0x6c, 0xec, 0xb5, 0x40, 0x05, 0x53, - 0x2d, 0x6c, 0x34, 0x75, 0xb5, 0xeb, 0x30, 0x5d, 0xbc, 0xc2, 0x50, 0x56, 0xc4, 0x04, 0x35, 0x89, - 0x0f, 0x86, 0x71, 0xb5, 0x55, 0x8b, 0xc2, 0x60, 0xa2, 0x4d, 0x61, 0x81, 0xaf, 0x16, 0x30, 0x22, - 0x39, 0x18, 0x52, 0x78, 0x1f, 0x4c, 0x6a, 0xa4, 0x85, 0xeb, 0xe6, 0xa0, 0x8b, 0x8b, 0x57, 0x2b, - 0xc2, 0xfa, 0x4c, 0xed, 0x96, 0x45, 0xe1, 0xd0, 0x68, 0x53, 0xf8, 0xba, 0xcb, 0x9c, 0x67, 0x42, - 0xf2, 0x84, 0xf3, 0xfb, 0x53, 0xe7, 0x27, 0x04, 0x2b, 0x89, 0xf2, 0x90, 0xb1, 0xd1, 0x25, 0x9a, - 0x81, 0xd1, 0xef, 0xe3, 0x60, 0xd6, 0x8f, 0xd8, 0xc7, 0xa6, 0x72, 0x29, 0x9e, 0xff, 0x8b, 0x78, - 0xd0, 0x12, 0x58, 0x8c, 0x51, 0xeb, 0x13, 0xff, 0x87, 0xc0, 0x76, 0x0e, 0x19, 0x77, 0x48, 0x3f, - 0xbc, 0x73, 0x74, 0xc0, 0x82, 0xee, 0x8e, 0xeb, 0x4c, 0x54, 0x61, 0x09, 0xbc, 0x6b, 0x51, 0x98, - 0x1c, 0x60, 0x53, 0xb8, 0xcc, 0x31, 0x25, 0xba, 0x91, 0x3c, 0xa7, 0x07, 0xd6, 0xf1, 0x1a, 0x12,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 0xe3, 0x4e, 0x49, + 0x48, 0x88, 0xb2, 0x5b, 0x27, 0xa0, 0x14, 0x24, 0x90, 0xe2, 0xe6, 0x80, 0x84, 0x12, 0x60, 0x81, + 0x1e, 0x90, 0x90, 0xb5, 0xb6, 0x07, 0x67, 0x95, 0x78, 0xc7, 0xda, 0x5d, 0xbb, 0xf5, 0x81, 0x0b, + 0xbf, 0x00, 0x89, 0x3f, 0x50, 0x71, 0xe4, 0xc4, 0x01, 0xfe, 0x00, 0x12, 0x52, 0xe1, 0x54, 0xa9, + 0x12, 0xe2, 0x80, 0x46, 0x28, 0xe1, 0xb4, 0x07, 0x0e, 0xfb, 0x0b, 0xd0, 0xce, 0xec, 0x8e, 0x77, + 0xd7, 0xbb, 0x1b, 0x87, 0x36, 0x17, 0x94, 0x9b, 0xe7, 0xfd, 0x98, 0x79, 0xde, 0xe7, 0x7d, 0x76, + 0x3e, 0x0c, 0x96, 0x2c, 0xdb, 0xd4, 0x6c, 0x62, 0x29, 0x26, 0x6e, 0xe9, 0x96, 0x8d, 0x4d, 0xa5, + 0x57, 0x51, 0xec, 0xc7, 0x72, 0xc7, 0x24, 0x36, 0xc9, 0xcf, 0xfa, 0x5e, 0x39, 0xf0, 0xca, 0xbd, + 0x4a, 0x71, 0xae, 0x45, 0x5a, 0x84, 0xf9, 0x15, 0xef, 0x17, 0x0f, 0x2d, 0x2e, 0xb4, 0x08, 0x69, + 0x1d, 0x63, 0x85, 0x8d, 0xea, 0xdd, 0x2f, 0x15, 0xcd, 0xe8, 0xfb, 0xae, 0x25, 0xdf, 0xa5, 0x75, + 0x74, 0x45, 0x33, 0x0c, 0x62, 0x6b, 0xb6, 0x4e, 0x0c, 0x2b, 0x48, 0x6c, 0x10, 0xab, 0x4d, 0xac, + 0x1a, 0x9f, 0x91, 0x0f, 0x7c, 0x17, 0x4a, 0x02, 0x27, 0xa0, 0xf0, 0x98, 0x12, 0xcf, 0x50, 0xea, + 0x9a, 0x85, 0x95, 0x5e, 0xa5,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0x2c, 0xa5, 0x40, 0xe4, 0x62, 0xdd, 0x18, 0x6d, 0x7d, 0x2e, 0xd4, + 0xed, 0x73, 0x04, 0x0b, 0xc4, 0xdb, 0x0c, 0xf1, 0x26, 0xda, 0x18, 0x09, 0xb1, 0x2f, 0xd0, 0x5f, + 0x25, 0x70, 0x47, 0xe0, 0x4e, 0x3d, 0xdb, 0xef, 0xa5, 0xe1, 0x49, 0xcb, 0x28, 0xde, 0x3f, 0x6f, + 0x86, 0x28, 0xe3, 0x3e, 0x2b, 0x63, 0x0b, 0xdd, 0x4b, 0x2c, 0x63, 0x80, 0xdf, 0x0c, 0x4d, 0x50, + 0xf3, 0x4e, 0xa2, 0xea, 0xc1, 0xd3, 0x93, 0x92, 0xf4, 0xec, 0xa4, 0x24, 0xfd, 0x75, 0x52, 0x92, + 0xbe, 0x39, 0x2d, 0x8d, 0x3d, 0x3b, 0x2d, 0x8d, 0xfd, 0x71, 0x5a, 0x1a, 0xfb, 0xfc, 0xcd, 0x96, + 0x6e, 0x1f, 0x76, 0xeb, 0x72, 0x83, 0xb4, 0x83, 0x59, 0x0d, 0x6c, 0x07, 0x3f, 0x37, 0x1b, 0x87, + 0x9a, 0x6e, 0x28, 0x8f, 0x07, 0x0b, 0x79, 0x8f, 0x32, 0xab, 0x7e, 0x95, 0xfd, 0x9b, 0xb4, 0xfd, + 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x3b, 0x0c, 0xa0, 0x05, 0x01, 0x16, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1765,18 +1932,16 @@ func (m *MsgUpdateResourceNodeStake) MarshalToSizedBuffer(dAtA []byte) (int, err _ = i var l int _ = l - if m.StakeDelta != nil { - { - size, err := m.StakeDelta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) + { + size, err := m.StakeDelta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x22 + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x22 if m.IncrStake { i-- if m.IncrStake { @@ -1847,18 +2012,16 @@ func (m *MsgUpdateMetaNodeStake) MarshalToSizedBuffer(dAtA []byte) (int, error) _ = i var l int _ = l - if m.StakeDelta != nil { - { - size, err := m.StakeDelta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) + { + size, err := m.StakeDelta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x22 + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x22 if m.IncrStake { i-- if m.IncrStake { @@ -2207,10 +2370,8 @@ func (m *MsgUpdateResourceNodeStake) Size() (n int) { if m.IncrStake { n += 2 } - if m.StakeDelta != nil { - l = m.StakeDelta.Size() - n += 1 + l + sovTx(uint64(l)) - } + l = m.StakeDelta.Size() + n += 1 + l + sovTx(uint64(l)) return n } @@ -2240,10 +2401,8 @@ func (m *MsgUpdateMetaNodeStake) Size() (n int) { if m.IncrStake { n += 2 } - if m.StakeDelta != nil { - l = m.StakeDelta.Size() - n += 1 + l + sovTx(uint64(l)) - } + l = m.StakeDelta.Size() + n += 1 + l + sovTx(uint64(l)) return n } @@ -3739,9 +3898,6 @@ func (m *MsgUpdateResourceNodeStake) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.StakeDelta == nil { - m.StakeDelta = &types1.Coin{} - } if err := m.StakeDelta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -3959,9 +4115,6 @@ func (m *MsgUpdateMetaNodeStake) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.StakeDelta == nil { - m.StakeDelta = &types1.Coin{} - } if err := m.StakeDelta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } diff --git a/x/sds/client/rest/query.go b/x/sds/client/rest/query.go index f5aecdf6..9aef3f81 100644 --- a/x/sds/client/rest/query.go +++ b/x/sds/client/rest/query.go @@ -15,22 +15,10 @@ import ( ) func sdsQueryRoutes(clientCtx client.Context, r *mux.Router) { - r.HandleFunc( - "/sds/simulatePrepay/{amtToPrepay}", - SimulatePrepayHandlerFn(clientCtx), - ).Methods("GET") - r.HandleFunc( - "/sds/nozPrice", - NozPriceHandlerFn(clientCtx), - ).Methods("GET") - r.HandleFunc( - "/sds/nozSupply", - NozSupplyHandlerFn(clientCtx), - ).Methods("GET") - r.HandleFunc("/sds/params", - sdsParamsHandlerFn(clientCtx, types.QueryParams), - ).Methods("GET") - + r.HandleFunc("/sds/simulatePrepay/{amtToPrepay}", SimulatePrepayHandlerFn(clientCtx)).Methods("GET") + r.HandleFunc("/sds/nozPrice", NozPriceHandlerFn(clientCtx)).Methods("GET") + r.HandleFunc("/sds/nozSupply", NozSupplyHandlerFn(clientCtx)).Methods("GET") + r.HandleFunc("/sds/params", sdsParamsHandlerFn(clientCtx, types.QueryParams)).Methods("GET") } // GET request handler to query params of POT module diff --git a/x/sds/keeper/grpc_query.go b/x/sds/keeper/grpc_query.go index ce2e20a8..37fa044f 100644 --- a/x/sds/keeper/grpc_query.go +++ b/x/sds/keeper/grpc_query.go @@ -11,6 +11,8 @@ import ( "google.golang.org/grpc/status" ) +var _ types.QueryServer = Querier{} + // Querier is used as Keeper will have duplicate methods if used directly, and gRPC names take precedence over keeper type Querier struct { Keeper @@ -43,10 +45,33 @@ func (q Querier) Fileupload(c context.Context, req *types.QueryFileUploadRequest return &types.QueryFileUploadResponse{FileInfo: &fileInfo}, nil } -func (q Querier) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error) { +func (q Querier) SimPrepay(c context.Context, request *types.QuerySimPrepayRequest) (*types.QuerySimPrepayResponse, error) { + if request == nil { + return &types.QuerySimPrepayResponse{}, status.Error(codes.InvalidArgument, "empty request") + } + if request.GetAmount() == nil { + return &types.QuerySimPrepayResponse{}, status.Error(codes.InvalidArgument, "Amount cannot be empty") + } + ctx := sdk.UnwrapSDKContext(c) + amount := sdk.NormalizeCoins(request.GetAmount()) + noz := q.simulatePurchaseNoz(ctx, amount) + return &types.QuerySimPrepayResponse{Noz: noz}, nil +} + +func (q Querier) NozPrice(c context.Context, _ *types.QueryNozPriceRequest) (*types.QueryNozPriceResponse, error) { + ctx := sdk.UnwrapSDKContext(c) + nozPrice := q.registerKeeper.CurrNozPrice(ctx) + return &types.QueryNozPriceResponse{Price: nozPrice}, nil +} + +func (q Querier) NozSupply(c context.Context, request *types.QueryNozSupplyRequest) (*types.QueryNozSupplyResponse, error) { + ctx := sdk.UnwrapSDKContext(c) + remaining, total := q.registerKeeper.NozSupply(ctx) + return &types.QueryNozSupplyResponse{Remaining: remaining, Total: total}, nil +} + +func (q Querier) Params(c context.Context, _ *types.QueryParamsRequest) (*types.QueryParamsResponse, error) { ctx := sdk.UnwrapSDKContext(c) params := q.GetParams(ctx) return &types.QueryParamsResponse{Params: ¶ms}, nil } - -var _ types.QueryServer = Querier{} diff --git a/x/sds/keeper/keeper.go b/x/sds/keeper/keeper.go index 0440884a..30a9087e 100644 --- a/x/sds/keeper/keeper.go +++ b/x/sds/keeper/keeper.go @@ -104,7 +104,9 @@ func (k Keeper) purchaseNozAndSubCoins(ctx sdk.Context, from sdk.AccAddress, amo return purchased, nil } -func (k Keeper) simulatePurchaseNoz(ctx sdk.Context, amount sdk.Int) sdk.Int { +func (k Keeper) simulatePurchaseNoz(ctx sdk.Context, coins sdk.Coins) sdk.Int { + amount := coins.AmountOf(k.BondDenom(ctx)) + St := k.registerKeeper.GetEffectiveTotalStake(ctx) Pt := k.registerKeeper.GetTotalUnissuedPrepay(ctx).Amount Lt := k.registerKeeper.GetRemainingOzoneLimit(ctx) diff --git a/x/sds/keeper/msg_server.go b/x/sds/keeper/msg_server.go index d393309d..4d766c23 100644 --- a/x/sds/keeper/msg_server.go +++ b/x/sds/keeper/msg_server.go @@ -76,7 +76,8 @@ func (k msgServer) HandleMsgPrepay(c context.Context, msg *types.MsgPrepay) (*ty return &types.MsgPrepayResponse{}, sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, err.Error()) } - purchased, err := k.Prepay(ctx, sender, msg.Coins) + amount := sdk.NormalizeCoins(msg.GetAmount()) + purchased, err := k.Prepay(ctx, sender, amount) if err != nil { return nil, sdkerrors.Wrap(types.ErrPrepayFailure, err.Error()) } @@ -85,7 +86,7 @@ func (k msgServer) HandleMsgPrepay(c context.Context, msg *types.MsgPrepay) (*ty sdk.NewEvent( types.EventTypePrepay, sdk.NewAttribute(sdk.AttributeKeySender, msg.GetSender()), - sdk.NewAttribute(types.AttributeKeyCoins, msg.Coins.String()), + sdk.NewAttribute(types.AttributeKeyAmount, amount.String()), sdk.NewAttribute(types.AttributeKeyPurchasedNoz, purchased.String()), ), sdk.NewEvent( diff --git a/x/sds/keeper/querier.go b/x/sds/keeper/querier.go index 5776efb5..e819ef75 100644 --- a/x/sds/keeper/querier.go +++ b/x/sds/keeper/querier.go @@ -61,7 +61,9 @@ func querySimulatePrepay(ctx sdk.Context, req abci.RequestQuery, k Keeper, _ *co if err != nil { return []byte{}, sdkerrors.Wrap(sdkerrors.ErrJSONMarshal, err.Error()) } - nozAmt := k.simulatePurchaseNoz(ctx, amtToPrepay) + // temporary solution, avoid to modify Rest api. After upgrade to cosmos sdk v0.46.x, legacy Rest API will be removed + coins := sdk.NewCoins(sdk.NewCoin(k.BondDenom(ctx), amtToPrepay)) + nozAmt := k.simulatePurchaseNoz(ctx, coins) nozAmtByte, _ := nozAmt.MarshalJSON() return nozAmtByte, nil } diff --git a/x/sds/module.go b/x/sds/module.go index b0839f17..384bfffa 100644 --- a/x/sds/module.go +++ b/x/sds/module.go @@ -76,7 +76,9 @@ func (AppModuleBasic) RegisterRESTRoutes(ctx client.Context, rtr *mux.Router) { // RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the sds module. func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { - types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)) + if err := types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)); err != nil { + panic(err) + } } // GetTxCmd returns the root tx command for the sds module. diff --git a/x/sds/types/events.go b/x/sds/types/events.go index c8952d9f..ad43e6b0 100644 --- a/x/sds/types/events.go +++ b/x/sds/types/events.go @@ -9,8 +9,7 @@ const ( AttributeKeyFileHash = "file_hash" AttributeKeyUploader = "uploader" - AttributeKeyRecipient = "recipient" - AttributeKeyCoins = "coins" + AttributeKeyAmount = "amount" AttributeKeyPurchasedNoz = "purchased" AttributeValueCategory = ModuleName diff --git a/x/sds/types/msg.go b/x/sds/types/msg.go index 7cd2c30e..a1643af8 100644 --- a/x/sds/types/msg.go +++ b/x/sds/types/msg.go @@ -1,19 +1,24 @@ package types import ( + "github.com/ipfs/go-cid" + sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/ipfs/go-cid" + stratos "github.com/stratosnet/stratos-chain/types" ) -const ( - ConstFileUpload = "FileUploadTx" - ConstSdsPrepay = "SdsPrepayTx" +// verify interface at compile time +var ( + _ sdk.Msg = &MsgFileUpload{} + _ sdk.Msg = &MsgPrepay{} ) -// verify interface at compile time -var _ sdk.Msg = &MsgFileUpload{} +const ( + TypeMsgFileUpload = "FileUploadTx" + TypeMsgPrepay = "SdsPrepayTx" +) // NewMsgUpload creates a new Msg instance func NewMsgUpload(fileHash string, from, reporter, uploader string) *MsgFileUpload { @@ -26,8 +31,14 @@ func NewMsgUpload(fileHash string, from, reporter, uploader string) *MsgFileUplo } // nolint -func (msg MsgFileUpload) Route() string { return RouterKey } -func (msg MsgFileUpload) Type() string { return ConstFileUpload } +func (msg MsgFileUpload) Route() string { + return RouterKey +} + +func (msg MsgFileUpload) Type() string { + return TypeMsgFileUpload +} + func (msg MsgFileUpload) GetSigners() []sdk.AccAddress { accAddr, err := sdk.AccAddressFromBech32(msg.GetFrom()) if err != nil { @@ -71,21 +82,22 @@ func (msg MsgFileUpload) ValidateBasic() error { return nil } -// verify interface at compile time -var _ sdk.Msg = &MsgPrepay{} - // NewMsgPrepay NewMsg creates a new Msg instance func NewMsgPrepay(sender string, coins sdk.Coins) *MsgPrepay { - return &MsgPrepay{ Sender: sender, Coins: coins, } } -// nolint -func (msg MsgPrepay) Route() string { return RouterKey } -func (msg MsgPrepay) Type() string { return ConstSdsPrepay } +func (msg MsgPrepay) Route() string { + return RouterKey +} + +func (msg MsgPrepay) Type() string { + return TypeMsgPrepay +} + func (msg MsgPrepay) GetSigners() []sdk.AccAddress { sender, err := sdk.AccAddressFromBech32(msg.GetSender()) if err != nil { diff --git a/x/sds/types/query.pb.go b/x/sds/types/query.pb.go index f29f5d8b..8b2dc17b 100644 --- a/x/sds/types/query.pb.go +++ b/x/sds/types/query.pb.go @@ -6,6 +6,9 @@ package types import ( context "context" fmt "fmt" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/gogo/protobuf/gogoproto" grpc1 "github.com/gogo/protobuf/grpc" proto "github.com/gogo/protobuf/proto" _ "google.golang.org/genproto/googleapis/api/annotations" @@ -119,6 +122,234 @@ func (m *QueryFileUploadResponse) GetFileInfo() *FileInfo { return nil } +type QuerySimPrepayRequest struct { + Amount github_com_cosmos_cosmos_sdk_types.DecCoins `protobuf:"bytes,1,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.DecCoins" json:"amount" yaml:"amount"` +} + +func (m *QuerySimPrepayRequest) Reset() { *m = QuerySimPrepayRequest{} } +func (m *QuerySimPrepayRequest) String() string { return proto.CompactTextString(m) } +func (*QuerySimPrepayRequest) ProtoMessage() {} +func (*QuerySimPrepayRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_5b213ac8f144321e, []int{2} +} +func (m *QuerySimPrepayRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySimPrepayRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySimPrepayRequest.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 *QuerySimPrepayRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySimPrepayRequest.Merge(m, src) +} +func (m *QuerySimPrepayRequest) XXX_Size() int { + return m.Size() +} +func (m *QuerySimPrepayRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySimPrepayRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QuerySimPrepayRequest proto.InternalMessageInfo + +func (m *QuerySimPrepayRequest) GetAmount() github_com_cosmos_cosmos_sdk_types.DecCoins { + if m != nil { + return m.Amount + } + return nil +} + +type QuerySimPrepayResponse struct { + Noz github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,1,opt,name=noz,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"noz" yaml:"noz"` +} + +func (m *QuerySimPrepayResponse) Reset() { *m = QuerySimPrepayResponse{} } +func (m *QuerySimPrepayResponse) String() string { return proto.CompactTextString(m) } +func (*QuerySimPrepayResponse) ProtoMessage() {} +func (*QuerySimPrepayResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5b213ac8f144321e, []int{3} +} +func (m *QuerySimPrepayResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySimPrepayResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySimPrepayResponse.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 *QuerySimPrepayResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySimPrepayResponse.Merge(m, src) +} +func (m *QuerySimPrepayResponse) XXX_Size() int { + return m.Size() +} +func (m *QuerySimPrepayResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySimPrepayResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QuerySimPrepayResponse proto.InternalMessageInfo + +type QueryNozPriceRequest struct { +} + +func (m *QueryNozPriceRequest) Reset() { *m = QueryNozPriceRequest{} } +func (m *QueryNozPriceRequest) String() string { return proto.CompactTextString(m) } +func (*QueryNozPriceRequest) ProtoMessage() {} +func (*QueryNozPriceRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_5b213ac8f144321e, []int{4} +} +func (m *QueryNozPriceRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryNozPriceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryNozPriceRequest.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 *QueryNozPriceRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryNozPriceRequest.Merge(m, src) +} +func (m *QueryNozPriceRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryNozPriceRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryNozPriceRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryNozPriceRequest proto.InternalMessageInfo + +type QueryNozPriceResponse struct { + Price github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,1,opt,name=price,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"price" yaml:"price"` +} + +func (m *QueryNozPriceResponse) Reset() { *m = QueryNozPriceResponse{} } +func (m *QueryNozPriceResponse) String() string { return proto.CompactTextString(m) } +func (*QueryNozPriceResponse) ProtoMessage() {} +func (*QueryNozPriceResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5b213ac8f144321e, []int{5} +} +func (m *QueryNozPriceResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryNozPriceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryNozPriceResponse.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 *QueryNozPriceResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryNozPriceResponse.Merge(m, src) +} +func (m *QueryNozPriceResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryNozPriceResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryNozPriceResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryNozPriceResponse proto.InternalMessageInfo + +type QueryNozSupplyRequest struct { +} + +func (m *QueryNozSupplyRequest) Reset() { *m = QueryNozSupplyRequest{} } +func (m *QueryNozSupplyRequest) String() string { return proto.CompactTextString(m) } +func (*QueryNozSupplyRequest) ProtoMessage() {} +func (*QueryNozSupplyRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_5b213ac8f144321e, []int{6} +} +func (m *QueryNozSupplyRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryNozSupplyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryNozSupplyRequest.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 *QueryNozSupplyRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryNozSupplyRequest.Merge(m, src) +} +func (m *QueryNozSupplyRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryNozSupplyRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryNozSupplyRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryNozSupplyRequest proto.InternalMessageInfo + +type QueryNozSupplyResponse struct { + Remaining github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,1,opt,name=remaining,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"remaining" yaml:"remaining"` + Total github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=total,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"total" yaml:"total"` +} + +func (m *QueryNozSupplyResponse) Reset() { *m = QueryNozSupplyResponse{} } +func (m *QueryNozSupplyResponse) String() string { return proto.CompactTextString(m) } +func (*QueryNozSupplyResponse) ProtoMessage() {} +func (*QueryNozSupplyResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5b213ac8f144321e, []int{7} +} +func (m *QueryNozSupplyResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryNozSupplyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryNozSupplyResponse.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 *QueryNozSupplyResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryNozSupplyResponse.Merge(m, src) +} +func (m *QueryNozSupplyResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryNozSupplyResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryNozSupplyResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryNozSupplyResponse proto.InternalMessageInfo + // QueryParamsRequest is request type for the Query/Params RPC method. type QueryParamsRequest struct { } @@ -127,7 +358,7 @@ func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } func (*QueryParamsRequest) ProtoMessage() {} func (*QueryParamsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_5b213ac8f144321e, []int{2} + return fileDescriptor_5b213ac8f144321e, []int{8} } func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -166,7 +397,7 @@ func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } func (*QueryParamsResponse) ProtoMessage() {} func (*QueryParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_5b213ac8f144321e, []int{3} + return fileDescriptor_5b213ac8f144321e, []int{9} } func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -205,6 +436,12 @@ func (m *QueryParamsResponse) GetParams() *Params { func init() { proto.RegisterType((*QueryFileUploadRequest)(nil), "stratos.sds.v1.QueryFileUploadRequest") proto.RegisterType((*QueryFileUploadResponse)(nil), "stratos.sds.v1.QueryFileUploadResponse") + proto.RegisterType((*QuerySimPrepayRequest)(nil), "stratos.sds.v1.QuerySimPrepayRequest") + proto.RegisterType((*QuerySimPrepayResponse)(nil), "stratos.sds.v1.QuerySimPrepayResponse") + proto.RegisterType((*QueryNozPriceRequest)(nil), "stratos.sds.v1.QueryNozPriceRequest") + proto.RegisterType((*QueryNozPriceResponse)(nil), "stratos.sds.v1.QueryNozPriceResponse") + proto.RegisterType((*QueryNozSupplyRequest)(nil), "stratos.sds.v1.QueryNozSupplyRequest") + proto.RegisterType((*QueryNozSupplyResponse)(nil), "stratos.sds.v1.QueryNozSupplyResponse") proto.RegisterType((*QueryParamsRequest)(nil), "stratos.sds.v1.QueryParamsRequest") proto.RegisterType((*QueryParamsResponse)(nil), "stratos.sds.v1.QueryParamsResponse") } @@ -212,30 +449,54 @@ func init() { func init() { proto.RegisterFile("stratos/sds/v1/query.proto", fileDescriptor_5b213ac8f144321e) } var fileDescriptor_5b213ac8f144321e = []byte{ - // 366 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0x4f, 0x4b, 0xc3, 0x30, - 0x18, 0x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xe5, 0x6d, 0x23, 0xac, 0x13, 0x5b, 0x34, 0xa6, - 0x43, 0x30, 0x10, 0xde, 0x39, 0xda, 0x5a, 0xba, 0x9a, 0x0e, 0x1f, 0x95, 0x22, 0x7d, 0x31, 0x05, - 0x95, 0x7c, 0x81, 0xd1, 0x1b, 0x55, 0xfd, 0xa9, 0x88, 0xd6, 0x74, 0x0e, 0x7e, 0xb6, 0x10, 0x4a, - 0xdb, 0x13, 0x0d, 0x8d, 0x0f, 0xf3, 0xc6, 0xd5, 0x63, 0x38, 0xd5, 0x7f, 0x75, 0x19, 0x99, 0x47, - 0x1e, 0xdf, 0xbf, 0x5e, 0x8b, 0xc7, 0xb8, 0x4a, 0x72, 0x93, 0xeb, 0x4d, 0xb2, 0x56, 0x72, 0xff, - 0x33, 0xec, 0x03, 0x1e, 0xa1, 0x52, 0x06, 0x8b, 0xbd, 0x95, 0x1d, 0x4b, 0x7b, 0x38, 0x07, 0x7f, - 0x6a, 0x0c, 0x83, 0xab, 0x19, 0x6c, 0x5c, 0xc9, 0x33, 0x64, 0x6b, 0x9c, 0x35, 0xdf, 0x66, 0xae, - 0x35, 0x9d, 0xb9, 0xd6, 0xe7, 0xcc, 0xb5, 0x5e, 0xe6, 0x6e, 0x61, 0x3a, 0x77, 0x0b, 0x1f, 0x73, - 0xb7, 0x70, 0x43, 0x06, 0x5c, 0x05, 0x49, 0xc7, 0xef, 0xca, 0xe1, 0xc2, 0x2b, 0x98, 0x5a, 0x7c, - 0x9e, 0x74, 0x03, 0xca, 0x05, 0xb9, 0xd3, 0x71, 0x6a, 0x12, 0x31, 0xe8, 0x94, 0xf4, 0x5f, 0x74, - 0xfa, 0x1d, 0x00, 0x00, 0xff, 0xff, 0xe1, 0x2e, 0x36, 0xb0, 0xab, 0x02, 0x00, 0x00, + // 750 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0x4d, 0x4f, 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, 0xff, 0xff, 0xe1, 0xf2, 0x67, 0x69, 0x01, 0x07, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -252,6 +513,9 @@ const _ = grpc.SupportPackageIsVersion4 type QueryClient interface { // Query uploaded file info by hash Fileupload(ctx context.Context, in *QueryFileUploadRequest, opts ...grpc.CallOption) (*QueryFileUploadResponse, error) + SimPrepay(ctx context.Context, in *QuerySimPrepayRequest, opts ...grpc.CallOption) (*QuerySimPrepayResponse, error) + NozPrice(ctx context.Context, in *QueryNozPriceRequest, opts ...grpc.CallOption) (*QueryNozPriceResponse, error) + NozSupply(ctx context.Context, in *QueryNozSupplyRequest, opts ...grpc.CallOption) (*QueryNozSupplyResponse, error) // Params queries SDS module Params info. Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) } @@ -273,6 +537,33 @@ func (c *queryClient) Fileupload(ctx context.Context, in *QueryFileUploadRequest return out, nil } +func (c *queryClient) SimPrepay(ctx context.Context, in *QuerySimPrepayRequest, opts ...grpc.CallOption) (*QuerySimPrepayResponse, error) { + out := new(QuerySimPrepayResponse) + err := c.cc.Invoke(ctx, "/stratos.sds.v1.Query/SimPrepay", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) NozPrice(ctx context.Context, in *QueryNozPriceRequest, opts ...grpc.CallOption) (*QueryNozPriceResponse, error) { + out := new(QueryNozPriceResponse) + err := c.cc.Invoke(ctx, "/stratos.sds.v1.Query/NozPrice", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) NozSupply(ctx context.Context, in *QueryNozSupplyRequest, opts ...grpc.CallOption) (*QueryNozSupplyResponse, error) { + out := new(QueryNozSupplyResponse) + err := c.cc.Invoke(ctx, "/stratos.sds.v1.Query/NozSupply", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { out := new(QueryParamsResponse) err := c.cc.Invoke(ctx, "/stratos.sds.v1.Query/Params", in, out, opts...) @@ -286,6 +577,9 @@ func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts . type QueryServer interface { // Query uploaded file info by hash Fileupload(context.Context, *QueryFileUploadRequest) (*QueryFileUploadResponse, error) + SimPrepay(context.Context, *QuerySimPrepayRequest) (*QuerySimPrepayResponse, error) + NozPrice(context.Context, *QueryNozPriceRequest) (*QueryNozPriceResponse, error) + NozSupply(context.Context, *QueryNozSupplyRequest) (*QueryNozSupplyResponse, error) // Params queries SDS module Params info. Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) } @@ -297,6 +591,15 @@ type UnimplementedQueryServer struct { func (*UnimplementedQueryServer) Fileupload(ctx context.Context, req *QueryFileUploadRequest) (*QueryFileUploadResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Fileupload not implemented") } +func (*UnimplementedQueryServer) SimPrepay(ctx context.Context, req *QuerySimPrepayRequest) (*QuerySimPrepayResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SimPrepay not implemented") +} +func (*UnimplementedQueryServer) NozPrice(ctx context.Context, req *QueryNozPriceRequest) (*QueryNozPriceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method NozPrice not implemented") +} +func (*UnimplementedQueryServer) NozSupply(ctx context.Context, req *QueryNozSupplyRequest) (*QueryNozSupplyResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method NozSupply not implemented") +} func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") } @@ -323,6 +626,60 @@ func _Query_Fileupload_Handler(srv interface{}, ctx context.Context, dec func(in return interceptor(ctx, in, info, handler) } +func _Query_SimPrepay_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QuerySimPrepayRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).SimPrepay(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/stratos.sds.v1.Query/SimPrepay", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).SimPrepay(ctx, req.(*QuerySimPrepayRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_NozPrice_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryNozPriceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).NozPrice(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/stratos.sds.v1.Query/NozPrice", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).NozPrice(ctx, req.(*QueryNozPriceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_NozSupply_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryNozSupplyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).NozSupply(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/stratos.sds.v1.Query/NozSupply", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).NozSupply(ctx, req.(*QueryNozSupplyRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryParamsRequest) if err := dec(in); err != nil { @@ -349,6 +706,18 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "Fileupload", Handler: _Query_Fileupload_Handler, }, + { + MethodName: "SimPrepay", + Handler: _Query_SimPrepay_Handler, + }, + { + MethodName: "NozPrice", + Handler: _Query_NozPrice_Handler, + }, + { + MethodName: "NozSupply", + Handler: _Query_NozSupply_Handler, + }, { MethodName: "Params", Handler: _Query_Params_Handler, @@ -423,7 +792,7 @@ func (m *QueryFileUploadResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } -func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) { +func (m *QuerySimPrepayRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -433,20 +802,34 @@ func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QuerySimPrepayRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QuerySimPrepayRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l + if len(m.Amount) > 0 { + for iNdEx := len(m.Amount) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Amount[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } return len(dAtA) - i, nil } -func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error) { +func (m *QuerySimPrepayResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -456,59 +839,237 @@ func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QuerySimPrepayResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QuerySimPrepayResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.Params != nil { - { - size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) + { + size := m.Noz.Size() + i -= size + if _, err := m.Noz.MarshalTo(dAtA[i:]); err != nil { + return 0, err } - i-- - dAtA[i] = 0xa + i = encodeVarintQuery(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0xa return len(dAtA) - i, nil } -func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { - offset -= sovQuery(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ +func (m *QueryNozPriceRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - dAtA[offset] = uint8(v) - return base + return dAtA[:n], nil } -func (m *QueryFileUploadRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.FileHash) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n + +func (m *QueryNozPriceRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryFileUploadResponse) Size() (n int) { - if m == nil { - return 0 - } +func (m *QueryNozPriceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryNozPriceResponse) 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 *QueryNozPriceResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryNozPriceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.Price.Size() + i -= size + if _, err := m.Price.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *QueryNozSupplyRequest) 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 *QueryNozSupplyRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryNozSupplyRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryNozSupplyResponse) 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 *QueryNozSupplyResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryNozSupplyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.Total.Size() + i -= size + if _, err := m.Total.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size := m.Remaining.Size() + i -= size + if _, err := m.Remaining.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *QueryParamsRequest) 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 *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryParamsResponse) 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 *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Params != nil { + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { + offset -= sovQuery(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *QueryFileUploadRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.FileHash) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryFileUploadResponse) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.FileInfo != nil { @@ -518,6 +1079,74 @@ func (m *QueryFileUploadResponse) Size() (n int) { return n } +func (m *QuerySimPrepayRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Amount) > 0 { + for _, e := range m.Amount { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QuerySimPrepayResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Noz.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryNozPriceRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryNozPriceResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Price.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryNozSupplyRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryNozSupplyResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Remaining.Size() + n += 1 + l + sovQuery(uint64(l)) + l = m.Total.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + func (m *QueryParamsRequest) Size() (n int) { if m == nil { return 0 @@ -714,6 +1343,476 @@ func (m *QueryFileUploadResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *QuerySimPrepayRequest) 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 ErrIntOverflowQuery + } + 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: QuerySimPrepayRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuerySimPrepayRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Amount = append(m.Amount, types.DecCoin{}) + if err := m.Amount[len(m.Amount)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QuerySimPrepayResponse) 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 ErrIntOverflowQuery + } + 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: QuerySimPrepayResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuerySimPrepayResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Noz", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Noz.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryNozPriceRequest) 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 ErrIntOverflowQuery + } + 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: QueryNozPriceRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryNozPriceRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryNozPriceResponse) 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 ErrIntOverflowQuery + } + 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: QueryNozPriceResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryNozPriceResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Price", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Price.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryNozSupplyRequest) 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 ErrIntOverflowQuery + } + 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: QueryNozSupplyRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryNozSupplyRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryNozSupplyResponse) 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 ErrIntOverflowQuery + } + 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: QueryNozSupplyResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryNozSupplyResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Remaining", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Remaining.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Total.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/x/sds/types/query.pb.gw.go b/x/sds/types/query.pb.gw.go index 38a0dac1..e8b40c84 100644 --- a/x/sds/types/query.pb.gw.go +++ b/x/sds/types/query.pb.gw.go @@ -85,6 +85,78 @@ func local_request_Query_Fileupload_0(ctx context.Context, marshaler runtime.Mar } +var ( + filter_Query_SimPrepay_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_SimPrepay_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QuerySimPrepayRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_SimPrepay_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.SimPrepay(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_SimPrepay_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QuerySimPrepayRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_SimPrepay_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.SimPrepay(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_NozPrice_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryNozPriceRequest + var metadata runtime.ServerMetadata + + msg, err := client.NozPrice(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_NozPrice_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryNozPriceRequest + var metadata runtime.ServerMetadata + + msg, err := server.NozPrice(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_NozSupply_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryNozSupplyRequest + var metadata runtime.ServerMetadata + + msg, err := client.NozSupply(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_NozSupply_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryNozSupplyRequest + var metadata runtime.ServerMetadata + + msg, err := server.NozSupply(ctx, &protoReq) + return msg, metadata, err + +} + func request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryParamsRequest var metadata runtime.ServerMetadata @@ -129,6 +201,66 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_SimPrepay_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_SimPrepay_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_SimPrepay_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_NozPrice_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_NozPrice_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_NozPrice_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_NozSupply_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_NozSupply_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_NozSupply_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -210,6 +342,66 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_SimPrepay_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_SimPrepay_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_SimPrepay_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_NozPrice_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_NozPrice_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_NozPrice_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_NozSupply_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_NozSupply_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_NozSupply_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -236,11 +428,23 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie var ( pattern_Query_Fileupload_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"stratos", "sds", "v1", "file_upload", "file_hash"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_SimPrepay_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"stratos", "sds", "v1", "sim_prepay"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Query_NozPrice_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"stratos", "sds", "v1", "noz_price"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Query_NozSupply_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"stratos", "sds", "v1", "noz_supply"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"stratos", "sds", "v1", "params"}, "", runtime.AssumeColonVerbOpt(true))) ) var ( forward_Query_Fileupload_0 = runtime.ForwardResponseMessage + forward_Query_SimPrepay_0 = runtime.ForwardResponseMessage + + forward_Query_NozPrice_0 = runtime.ForwardResponseMessage + + forward_Query_NozSupply_0 = runtime.ForwardResponseMessage + forward_Query_Params_0 = runtime.ForwardResponseMessage ) diff --git a/x/sds/types/tx.pb.go b/x/sds/types/tx.pb.go index bce93bc9..200dec7f 100644 --- a/x/sds/types/tx.pb.go +++ b/x/sds/types/tx.pb.go @@ -99,16 +99,52 @@ func (m *MsgFileUpload) GetUploader() string { return "" } +type MsgFileUploadResponse struct { +} + +func (m *MsgFileUploadResponse) Reset() { *m = MsgFileUploadResponse{} } +func (m *MsgFileUploadResponse) String() string { return proto.CompactTextString(m) } +func (*MsgFileUploadResponse) ProtoMessage() {} +func (*MsgFileUploadResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_a5a216e2f9435b27, []int{1} +} +func (m *MsgFileUploadResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgFileUploadResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgFileUploadResponse.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 *MsgFileUploadResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgFileUploadResponse.Merge(m, src) +} +func (m *MsgFileUploadResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgFileUploadResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgFileUploadResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgFileUploadResponse proto.InternalMessageInfo + type MsgPrepay struct { - Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender" yaml:"sender"` - Coins github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=coins,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"coins" yaml:"coins"` + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender" yaml:"sender"` + Amount github_com_cosmos_cosmos_sdk_types.DecCoins `protobuf:"bytes,2,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.DecCoins" json:"amount" yaml:"amount"` } func (m *MsgPrepay) Reset() { *m = MsgPrepay{} } func (m *MsgPrepay) String() string { return proto.CompactTextString(m) } func (*MsgPrepay) ProtoMessage() {} func (*MsgPrepay) Descriptor() ([]byte, []int) { - return fileDescriptor_a5a216e2f9435b27, []int{1} + return fileDescriptor_a5a216e2f9435b27, []int{2} } func (m *MsgPrepay) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -144,49 +180,13 @@ func (m *MsgPrepay) GetSender() string { return "" } -func (m *MsgPrepay) GetCoins() github_com_cosmos_cosmos_sdk_types.Coins { +func (m *MsgPrepay) GetAmount() github_com_cosmos_cosmos_sdk_types.DecCoins { if m != nil { - return m.Coins + return m.Amount } return nil } -type MsgFileUploadResponse struct { -} - -func (m *MsgFileUploadResponse) Reset() { *m = MsgFileUploadResponse{} } -func (m *MsgFileUploadResponse) String() string { return proto.CompactTextString(m) } -func (*MsgFileUploadResponse) ProtoMessage() {} -func (*MsgFileUploadResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_a5a216e2f9435b27, []int{2} -} -func (m *MsgFileUploadResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgFileUploadResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgFileUploadResponse.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 *MsgFileUploadResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgFileUploadResponse.Merge(m, src) -} -func (m *MsgFileUploadResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgFileUploadResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgFileUploadResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgFileUploadResponse proto.InternalMessageInfo - type MsgPrepayResponse struct { } @@ -225,49 +225,50 @@ var xxx_messageInfo_MsgPrepayResponse proto.InternalMessageInfo func init() { proto.RegisterType((*MsgFileUpload)(nil), "stratos.sds.v1.MsgFileUpload") - proto.RegisterType((*MsgPrepay)(nil), "stratos.sds.v1.MsgPrepay") proto.RegisterType((*MsgFileUploadResponse)(nil), "stratos.sds.v1.MsgFileUploadResponse") + proto.RegisterType((*MsgPrepay)(nil), "stratos.sds.v1.MsgPrepay") proto.RegisterType((*MsgPrepayResponse)(nil), "stratos.sds.v1.MsgPrepayResponse") } func init() { proto.RegisterFile("stratos/sds/v1/tx.proto", fileDescriptor_a5a216e2f9435b27) } var fileDescriptor_a5a216e2f9435b27 = []byte{ - // 544 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x53, 0x41, 0x6f, 0xd3, 0x30, - 0x18, 0x6d, 0xda, 0x31, 0xad, 0x1e, 0x63, 0x90, 0x01, 0xcd, 0x3a, 0x16, 0x6f, 0x46, 0x48, 0x95, - 0xd0, 0x62, 0x75, 0xbb, 0x81, 0xc4, 0xa1, 0x48, 0x68, 0x3b, 0x54, 0x42, 0x91, 0xb8, 0x70, 0x41, - 0x6e, 0xeb, 0xa5, 0x11, 0x69, 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- 0x0b, 0x6d, 0x1d, 0xb3, 0xb8, 0x17, 0xf1, 0xe5, 0x9e, 0xef, 0x7a, 0xcb, 0xa3, 0xe6, 0x2d, 0xd1, - 0xf5, 0x47, 0xd7, 0xd2, 0x45, 0xe9, 0x87, 0x1f, 0xbe, 0xfe, 0xfc, 0x54, 0xde, 0x25, 0x3b, 0xf4, - 0xca, 0x44, 0xeb, 0x39, 0x31, 0xc9, 0xdb, 0x02, 0x6d, 0x16, 0x37, 0xc8, 0xc3, 0xdf, 0xfe, 0x87, - 0xbd, 0xa1, 0xea, 0xfb, 0xff, 0xa5, 0x8a, 0xaa, 0xae, 0xae, 0xea, 0x90, 0xfb, 0x57, 0xab, 0x26, - 0xfa, 0x5c, 0xeb, 0xe4, 0x62, 0xec, 0x5a, 0x97, 0x63, 0xd7, 0xfa, 0x31, 0x76, 0xad, 0x8f, 0x13, - 0xb7, 0x74, 0x39, 0x71, 0x4b, 0xdf, 0x26, 0x6e, 0xe9, 0x35, 0xfd, 0x2b, 0xf4, 0x5c, 0x1b, 0x73, - 0x39, 0x5f, 0x1e, 0x74, 0xfb, 0x2c, 0x8c, 0xe9, 0xb9, 0xb6, 0xd3, 0x1d, 0xe8, 0xac, 0xea, 0x7f, - 0xe6, 0xe8, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x52, 0x47, 0x08, 0xfe, 0xb2, 0x03, 0x00, 0x00, + // 547 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x53, 0xc1, 0x6f, 0xd3, 0x3e, + 0x18, 0x6d, 0xda, 0xa9, 0x5a, 0x3d, 0xed, 0xb7, 0x1f, 0x19, 0xd0, 0xd0, 0x6d, 0xc9, 0x66, 0x84, + 0x34, 0x69, 0x5a, 0xac, 0x6e, 0x37, 0x90, 0x38, 0x14, 0x84, 0xc6, 0xa1, 0x08, 0x45, 0xe2, 0xc2, + 0x05, 0xb9, 0xad, 0x97, 0x46, 0x24, 0x76, 0x94, 0xcf, 0xad, 0xd6, 0x1b, 0x42, 0xfc, 0x01, 0x48, + 0xfc, 0x17, 0xfc, 0x23, 0xec, 0x38, 0x89, 0x0b, 0xa7, 0x80, 0x5a, 0x4e, 0x3d, 0xf6, 0x80, 0xc4, + 0x0d, 0xc5, 0x4e, 0x52, 0x3a, 0x01, 0xa7, 0xd8, 0xef, 0xf9, 0xbd, 0xcf, 0xfe, 0xde, 0x17, 0xd4, + 0x04, 0x99, 0x50, 0x29, 0x80, 0xc0, 0x00, 0xc8, 0xb8, 0x4d, 0xe4, 0x85, 0x1b, 0x27, 0x42, 0x0a, + 0xf3, 0xbf, 0x9c, 0x70, 0x61, 0x00, 0xee, 0xb8, 0xdd, 0xba, 0xe9, 0x0b, 0x5f, 0x28, 0x8a, 0x64, + 0x2b, 0x7d, 0xaa, 0xb5, 0xeb, 0x0b, 0xe1, 0x87, 0x8c, 0xd0, 0x38, 0x20, 0x94, 0x73, 0x21, 0xa9, + 0x0c, 0x04, 0x87, 0x9c, 0xb5, 0xfb, 0x02, 0x22, 0x01, 0xa4, 0x47, 0x81, 0x91, 0x71, 0xbb, 0xc7, + 0x24, 0x6d, 0x93, 0xbe, 0x08, 0xb8, 0xe6, 0xf1, 0x0f, 0x03, 0x6d, 0x76, 0xc1, 0x7f, 0x12, 0x84, + 0xec, 0x45, 0x1c, 0x0a, 0x3a, 0x30, 0x1f, 0xa2, 0xc6, 0x79, 0x10, 0xb2, 0x57, 0x43, 0x0a, 0x43, + 0xcb, 0xd8, 0x37, 0x0e, 0x1b, 0x9d, 0x83, 0x79, 0xea, 0x2c, 0xc1, 0x45, 0xea, 0xfc, 0x3f, 0xa1, + 0x51, 0x78, 0x1f, 0x97, 0x10, 0xf6, 0xd6, 0xb3, 0xf5, 0x19, 0x85, 0xa1, 0x79, 0x84, 0xd6, 0xce, + 0x13, 0x11, 0x59, 0x55, 0x25, 0x6d, 0xce, 0x53, 0x47, 0xed, 0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0xf3, 0x8d, 0x81, 0xb6, 0xcf, 0x28, 0x1f, 0x84, 0x6c, 0x35, 0xfe, 0x3d, 0x77, 0x75, 0xea, + 0xdc, 0x15, 0xba, 0x75, 0xef, 0x9f, 0x74, 0xd9, 0xc4, 0xbb, 0x6f, 0x3f, 0x7f, 0xff, 0x50, 0xdd, + 0xc3, 0x3b, 0xe4, 0xda, 0x70, 0xab, 0x91, 0xd1, 0x21, 0x98, 0x02, 0x6d, 0x95, 0x37, 0xc8, 0xdb, + 0x7d, 0xe7, 0x0f, 0xf6, 0x9a, 0x6a, 0x1d, 0xfc, 0x95, 0x2a, 0xab, 0xda, 0xaa, 0xaa, 0x85, 0x6f, + 0x5f, 0xaf, 0x1a, 0xab, 0x73, 0x9d, 0xa7, 0x97, 0x53, 0xdb, 0xb8, 0x9a, 0xda, 0xc6, 0xb7, 0xa9, + 0x6d, 0xbc, 0x9f, 0xd9, 0x95, 0xab, 0x99, 0x5d, 0xf9, 0x32, 0xb3, 0x2b, 0x2f, 0xc9, 0x6f, 0xfd, + 0xcd, 0xb5, 0x9c, 0xc9, 0x62, 0x79, 0xdc, 0x1f, 0xd2, 0x80, 0x93, 0x0b, 0x65, 0xa7, 0x9a, 0xdd, + 0xab, 0xab, 0xdf, 0xe7, 0xf4, 0x57, 0x00, 0x00, 0x00, 0xff, 0xff, 0x99, 0xd0, 0xe7, 0xee, 0xbd, + 0x03, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -439,6 +440,29 @@ func (m *MsgFileUpload) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *MsgFileUploadResponse) 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 *MsgFileUploadResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgFileUploadResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + func (m *MsgPrepay) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -459,10 +483,10 @@ func (m *MsgPrepay) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.Coins) > 0 { - for iNdEx := len(m.Coins) - 1; iNdEx >= 0; iNdEx-- { + if len(m.Amount) > 0 { + for iNdEx := len(m.Amount) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.Coins[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Amount[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -483,29 +507,6 @@ func (m *MsgPrepay) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *MsgFileUploadResponse) 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 *MsgFileUploadResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgFileUploadResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - func (m *MsgPrepayResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -565,6 +566,15 @@ func (m *MsgFileUpload) Size() (n int) { return n } +func (m *MsgFileUploadResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + func (m *MsgPrepay) Size() (n int) { if m == nil { return 0 @@ -575,8 +585,8 @@ func (m *MsgPrepay) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - if len(m.Coins) > 0 { - for _, e := range m.Coins { + if len(m.Amount) > 0 { + for _, e := range m.Amount { l = e.Size() n += 1 + l + sovTx(uint64(l)) } @@ -584,15 +594,6 @@ func (m *MsgPrepay) Size() (n int) { return n } -func (m *MsgFileUploadResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - func (m *MsgPrepayResponse) Size() (n int) { if m == nil { return 0 @@ -786,6 +787,56 @@ func (m *MsgFileUpload) Unmarshal(dAtA []byte) error { } return nil } +func (m *MsgFileUploadResponse) 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: MsgFileUploadResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgFileUploadResponse: 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 *MsgPrepay) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -849,7 +900,7 @@ func (m *MsgPrepay) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Coins", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -876,8 +927,8 @@ func (m *MsgPrepay) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Coins = append(m.Coins, types.Coin{}) - if err := m.Coins[len(m.Coins)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Amount = append(m.Amount, types.DecCoin{}) + if err := m.Amount[len(m.Amount)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -902,56 +953,6 @@ func (m *MsgPrepay) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgFileUploadResponse) 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: MsgFileUploadResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgFileUploadResponse: 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 *MsgPrepayResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 From ba14e574b651ed5d3ab6f3f98d29b11799d5612e Mon Sep 17 00:00:00 2001 From: Xiong Date: Wed, 22 Feb 2023 19:37:15 -0500 Subject: [PATCH 18/95] bug fix --- x/sds/client/cli/tx.go | 5 +++-- x/sds/client/rest/rest.go | 2 +- x/sds/client/rest/rest_test.go | 38 ---------------------------------- x/sds/types/msg.go | 8 +++---- 4 files changed, 8 insertions(+), 45 deletions(-) delete mode 100644 x/sds/client/rest/rest_test.go diff --git a/x/sds/client/cli/tx.go b/x/sds/client/cli/tx.go index 88451ade..53a5470d 100644 --- a/x/sds/client/cli/tx.go +++ b/x/sds/client/cli/tx.go @@ -143,13 +143,14 @@ func newBuildFileuploadMsg(clientCtx client.Context, txf tx.Factory, fs *flag.Fl // makes a new newBuildPrepayMsg func newBuildPrepayMsg(clientCtx client.Context, txf tx.Factory, fs *flag.FlagSet) (tx.Factory, *types.MsgPrepay, error) { - coin, err := sdk.ParseCoinNormalized(fs.Arg(1)) + amount, err := sdk.ParseCoinNormalized(fs.Arg(1)) if err != nil { return txf, nil, err } + decAmount := sdk.NewDecCoinFromCoin(amount) // build and sign the transaction, then broadcast to Tendermint - msg := types.NewMsgPrepay(clientCtx.GetFromAddress().String(), sdk.NewCoins(coin)) + msg := types.NewMsgPrepay(clientCtx.GetFromAddress().String(), sdk.NewDecCoins(decAmount)) return txf, msg, nil } diff --git a/x/sds/client/rest/rest.go b/x/sds/client/rest/rest.go index 58efe667..c401aaba 100644 --- a/x/sds/client/rest/rest.go +++ b/x/sds/client/rest/rest.go @@ -26,5 +26,5 @@ type FileUploadReq struct { // PrepayReq defines the properties of a prepay request's body. type PrepayReq struct { BaseReq sdktrest.BaseReq `json:"base_req" yaml:"base_req"` - Amount sdk.Coins `json:"amount" yaml:"amount"` + Amount sdk.DecCoins `json:"amount" yaml:"amount"` } diff --git a/x/sds/client/rest/rest_test.go b/x/sds/client/rest/rest_test.go deleted file mode 100644 index 1eddcdc1..00000000 --- a/x/sds/client/rest/rest_test.go +++ /dev/null @@ -1,38 +0,0 @@ -package rest - -//import ( -// "bytes" -// "fmt" -// sdk "github.com/cosmos/cosmos-sdk/types" -// "github.com/tendermint/tendermint/libs/bech32" -// "testing" -//) -// -//func TestAccAddrPrefix(t *testing.T) { -// -// hexStr := "c03661732294feb49caf6dc16c7cbb2534986d73" -// acc, err := sdk.AccAddressFromHex(hexStr) -// -// bech, err := bech32.ConvertAndEncode("st", acc.Bytes()) -// -// if err != nil { -// t.Error(err) -// } -// -// // accAddr in bech32 is in form of "st1cqmxzuezjnltf890dhqkcl9my56fsmtnunn4z4", -// // where "st" is the hrp (human-reading prefix) and the last 4 digits work as checksum -// fmt.Println(bech) -// hrp, data, err := bech32.DecodeAndConvert(bech) -// -// if err != nil { -// t.Error(err) -// } -// if hrp != "st" { -// t.Error("Invalid hrp") -// } -// if !bytes.Equal(data, acc.Bytes()) { -// t.Error("Invalid decode") -// } -// fmt.Println(hrp) -// fmt.Println(data) -//} diff --git a/x/sds/types/msg.go b/x/sds/types/msg.go index a1643af8..ea32472e 100644 --- a/x/sds/types/msg.go +++ b/x/sds/types/msg.go @@ -83,10 +83,10 @@ func (msg MsgFileUpload) ValidateBasic() error { } // NewMsgPrepay NewMsg creates a new Msg instance -func NewMsgPrepay(sender string, coins sdk.Coins) *MsgPrepay { +func NewMsgPrepay(sender string, amount sdk.DecCoins) *MsgPrepay { return &MsgPrepay{ Sender: sender, - Coins: coins, + Amount: amount, } } @@ -123,8 +123,8 @@ func (msg MsgPrepay) ValidateBasic() error { if sender.Empty() { return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "missing sender address") } - if msg.Coins.Empty() { - return sdkerrors.Wrap(sdkerrors.ErrInvalidCoins, "missing coins to send") + if msg.Amount.Empty() { + return sdkerrors.Wrap(sdkerrors.ErrInvalidCoins, "missing amount to send") } return nil } From 41050bd6b0921a1ca45f36c418540fee38a62abf Mon Sep 17 00:00:00 2001 From: jialbai Date: Thu, 23 Feb 2023 19:01:07 -0500 Subject: [PATCH 19/95] - qb1269: add availableStake(allStake-unbondingStake) alignment with SP --- x/register/keeper/keeper.go | 28 +++++++----------- x/register/keeper/msg_server.go | 7 +++-- x/register/keeper/resource_node.go | 46 ++++++++++++++++-------------- x/register/types/events.go | 2 ++ 4 files changed, 42 insertions(+), 41 deletions(-) diff --git a/x/register/keeper/keeper.go b/x/register/keeper/keeper.go index 8bc4e083..a69c7a03 100644 --- a/x/register/keeper/keeper.go +++ b/x/register/keeper/keeper.go @@ -271,27 +271,27 @@ func (k Keeper) subtractUBDNodeStake(ctx sdk.Context, ubd types.UnbondingNode, t } func (k Keeper) UnbondResourceNode(ctx sdk.Context, resourceNode types.ResourceNode, amt sdk.Int, -) (ozoneLimitChange sdk.Int, unbondingMatureTime time.Time, err error) { +) (ozoneLimitChange, availableTokenAmtBefore, availableTokenAmtAfter sdk.Int, unbondingMatureTime time.Time, err error) { params := k.GetParams(ctx) ctx.Logger().Info("Params of register module: " + params.String()) // transfer the node tokens to the not bonded pool networkAddr, err := stratos.SdsAddressFromBech32(resourceNode.GetNetworkAddress()) if err != nil { - return sdk.ZeroInt(), time.Now(), errors.New("invalid network address") + return sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroInt(), time.Now(), errors.New("invalid network address") } ownerAddr, err := sdk.AccAddressFromBech32(resourceNode.GetOwnerAddress()) if err != nil { - return sdk.ZeroInt(), time.Now(), errors.New("invalid wallet address") + return sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroInt(), time.Now(), errors.New("invalid wallet address") } ownerAcc := k.accountKeeper.GetAccount(ctx, ownerAddr) if ownerAcc == nil { - return sdk.ZeroInt(), time.Time{}, types.ErrNoOwnerAccountFound + return sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroInt(), time.Time{}, types.ErrNoOwnerAccountFound } // suspended node cannot be unbonded (avoid dup stake decrease with node suspension) if resourceNode.Suspend { - return sdk.ZeroInt(), time.Time{}, types.ErrInvalidSuspensionStatForUnbondNode + return sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroInt(), time.Time{}, types.ErrInvalidSuspensionStatForUnbondNode } // check if node_token - unbonding_token > amt_to_unbond @@ -299,20 +299,12 @@ func (k Keeper) UnbondResourceNode(ctx sdk.Context, resourceNode types.ResourceN availableStake := resourceNode.Tokens.Sub(unbondingStake) if availableStake.LT(amt) { - return sdk.ZeroInt(), time.Time{}, types.ErrInsufficientBalance + return sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroInt(), time.Time{}, types.ErrInsufficientBalance } - - // check if 0 < (node_token - unbonding_token - amt_to_unbond) < effective_token, - // if true, tier downgrade needs to be triggered - // if availableStakeAfterUnbond == effectiveTokens, no tier change will happened - // if availableStakeAfterUnbond == 0, node will be removed - //effectiveTokens := resourceNode.EffectiveTokens - //availableStakeAfterUnbond := resourceNode.Tokens.Sub(unbondingStake).Sub(amt) - //needUpdateTier := availableStakeAfterUnbond.LT(effectiveTokens) && - // availableStakeAfterUnbond.GT(sdk.ZeroInt()) + availableTokenAmtBefore = availableStake if k.HasMaxUnbondingNodeEntries(ctx, networkAddr) { - return sdk.ZeroInt(), time.Time{}, types.ErrMaxUnbondingNodeEntries + return sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroInt(), time.Time{}, types.ErrMaxUnbondingNodeEntries } unbondingMatureTime = calcUnbondingMatureTime(ctx, resourceNode.Status, resourceNode.CreationTime, k.UnbondingThreasholdTime(ctx), k.UnbondingCompletionTime(ctx)) @@ -345,8 +337,8 @@ func (k Keeper) UnbondResourceNode(ctx sdk.Context, resourceNode types.ResourceN // Add to unbonding node queue k.InsertUnbondingNodeQueue(ctx, unbondingNode, unbondingMatureTime) ctx.Logger().Info("Unbonding resource node " + unbondingNode.String() + "\n after mature time" + unbondingMatureTime.String()) - - return ozoneLimitChange, unbondingMatureTime, nil + availableTokenAmtAfter = availableTokenAmtBefore.Sub(amt) + return ozoneLimitChange, availableTokenAmtBefore, availableTokenAmtAfter, unbondingMatureTime, nil } func (k Keeper) UnbondMetaNode(ctx sdk.Context, metaNode types.MetaNode, amt sdk.Int, diff --git a/x/register/keeper/msg_server.go b/x/register/keeper/msg_server.go index 4cad8631..06dba796 100644 --- a/x/register/keeper/msg_server.go +++ b/x/register/keeper/msg_server.go @@ -147,7 +147,7 @@ func (k msgServer) HandleMsgRemoveResourceNode(goCtx context.Context, msg *types return nil, types.ErrInsufficientBalance } - ozoneLimitChange, completionTime, err := k.UnbondResourceNode(ctx, resourceNode, availableStake) + ozoneLimitChange, _, _, completionTime, err := k.UnbondResourceNode(ctx, resourceNode, availableStake) if err != nil { return nil, sdkerrors.Wrap(types.ErrUnbondResourceNode, err.Error()) } @@ -320,7 +320,8 @@ func (k msgServer) HandleMsgUpdateResourceNodeStake(goCtx context.Context, msg * return &types.MsgUpdateResourceNodeStakeResponse{}, errors.New("invalid stake delta") } - ozoneLimitChange, completionTime, node, err := k.UpdateResourceNodeStake(ctx, networkAddr, ownerAddress, *msg.StakeDelta, msg.IncrStake) + ozoneLimitChange, availableTokenAmtBefore, availableTokenAmtAfter, completionTime, node, err := + k.UpdateResourceNodeStake(ctx, networkAddr, ownerAddress, *msg.StakeDelta, msg.IncrStake) if err != nil { return nil, sdkerrors.Wrap(types.ErrUpdateResourceNodeStake, err.Error()) } @@ -333,6 +334,8 @@ func (k msgServer) HandleMsgUpdateResourceNodeStake(goCtx context.Context, msg * sdk.NewAttribute(types.AttributeKeyIncrStakeBool, strconv.FormatBool(msg.IncrStake)), sdk.NewAttribute(types.AttributeKeyStakeDelta, msg.StakeDelta.String()), sdk.NewAttribute(types.AttributeKeyCurrentStake, sdk.NewCoin(k.BondDenom(ctx), node.Tokens).String()), + sdk.NewAttribute(types.AttributeKeyAvailableTokenBefore, sdk.NewCoin(k.BondDenom(ctx), availableTokenAmtBefore).String()), + sdk.NewAttribute(types.AttributeKeyAvailableTokenAfter, sdk.NewCoin(k.BondDenom(ctx), availableTokenAmtAfter).String()), sdk.NewAttribute(types.AttributeKeyOZoneLimitChanges, ozoneLimitChange.String()), sdk.NewAttribute(types.AttributeKeyUnbondingMatureTime, completionTime.Format(time.RFC3339)), ), diff --git a/x/register/keeper/resource_node.go b/x/register/keeper/resource_node.go index c4480b80..dcee57da 100644 --- a/x/register/keeper/resource_node.go +++ b/x/register/keeper/resource_node.go @@ -91,29 +91,31 @@ func (k Keeper) GetResourceNodeIterator(ctx sdk.Context) sdk.Iterator { // AddResourceNodeStake Update the tokens of an existing resource node func (k Keeper) AddResourceNodeStake(ctx sdk.Context, resourceNode types.ResourceNode, tokenToAdd sdk.Coin, -) (ozoneLimitChange sdk.Int, err error) { +) (ozoneLimitChange, availableTokenAmtBefore, availableTokenAmtAfter sdk.Int, err error) { needAddCount := true networkAddr, err := stratos.SdsAddressFromBech32(resourceNode.GetNetworkAddress()) if err != nil { - return sdk.ZeroInt(), types.ErrInvalidNetworkAddr + return sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroInt(), types.ErrInvalidNetworkAddr } nodeStored, found := k.GetResourceNode(ctx, networkAddr) if found && nodeStored.IsBonded() { needAddCount = false } + unbondingStake := k.GetUnbondingNodeBalance(ctx, networkAddr) + availableTokenAmtBefore = resourceNode.Tokens.Sub(unbondingStake) coins := sdk.NewCoins(tokenToAdd) ownerAddr, err := sdk.AccAddressFromBech32(resourceNode.GetOwnerAddress()) if err != nil { - return sdk.ZeroInt(), types.ErrInvalidOwnerAddr + return sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroInt(), types.ErrInvalidOwnerAddr } // sub coins from owner's wallet hasCoin := k.bankKeeper.HasBalance(ctx, ownerAddr, tokenToAdd) if !hasCoin { - return sdk.ZeroInt(), types.ErrInsufficientBalance + return sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroInt(), types.ErrInsufficientBalance } targetModuleAccName := "" @@ -124,13 +126,13 @@ func (k Keeper) AddResourceNodeStake(ctx sdk.Context, resourceNode types.Resourc case stakingtypes.Bonded: targetModuleAccName = types.ResourceNodeBondedPool case stakingtypes.Unbonding: - return sdk.ZeroInt(), types.ErrUnbondingNode + return sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroInt(), types.ErrUnbondingNode } if len(targetModuleAccName) > 0 { err = k.bankKeeper.SendCoinsFromAccountToModule(ctx, ownerAddr, targetModuleAccName, coins) if err != nil { - return sdk.ZeroInt(), err + return sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroInt(), err } } @@ -146,17 +148,17 @@ func (k Keeper) AddResourceNodeStake(ctx sdk.Context, resourceNode types.Resourc nBondedResourceAccountAddr := k.accountKeeper.GetModuleAddress(types.ResourceNodeNotBondedPool) if nBondedResourceAccountAddr == nil { ctx.Logger().Error("not bonded account address for resource nodes does not exist.") - return sdk.ZeroInt(), types.ErrUnknownAccountAddress + return sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroInt(), types.ErrUnknownAccountAddress } hasCoin := k.bankKeeper.HasBalance(ctx, nBondedResourceAccountAddr, tokenToTrasfer) if !hasCoin { - return sdk.ZeroInt(), types.ErrInsufficientBalance + return sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroInt(), types.ErrInsufficientBalance } err := k.bankKeeper.SendCoinsFromModuleToModule(ctx, types.ResourceNodeNotBondedPool, types.ResourceNodeBondedPool, sdk.NewCoins(tokenToTrasfer)) if err != nil { - return sdk.ZeroInt(), types.ErrInsufficientBalance + return sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroInt(), types.ErrInsufficientBalance } } @@ -169,7 +171,8 @@ func (k Keeper) AddResourceNodeStake(ctx sdk.Context, resourceNode types.Resourc k.SetBondedResourceNodeCnt(ctx, count) } - return sdk.ZeroInt(), nil + availableTokenAmtAfter = availableTokenAmtBefore.Add(tokenToAdd.Amount) + return sdk.ZeroInt(), availableTokenAmtBefore, availableTokenAmtAfter, nil } func (k Keeper) RemoveTokenFromPoolWhileUnbondingResourceNode(ctx sdk.Context, resourceNode types.ResourceNode, tokenToSub sdk.Coin) error { @@ -282,7 +285,7 @@ func (k Keeper) RegisterResourceNode(ctx sdk.Context, networkAddr stratos.SdsAdd if err != nil { return ozoneLimitChange, err } - ozoneLimitChange, err = k.AddResourceNodeStake(ctx, resourceNode, stake) + ozoneLimitChange, _, _, err = k.AddResourceNodeStake(ctx, resourceNode, stake) return ozoneLimitChange, err } @@ -310,36 +313,37 @@ func (k Keeper) UpdateResourceNode(ctx sdk.Context, description types.Descriptio } func (k Keeper) UpdateResourceNodeStake(ctx sdk.Context, networkAddr stratos.SdsAddress, ownerAddr sdk.AccAddress, - stakeDelta sdk.Coin, incrStake bool) (ozoneLimitChange sdk.Int, unbondingMatureTime time.Time, resourcenode types.ResourceNode, err error) { + stakeDelta sdk.Coin, incrStake bool) (ozoneLimitChange, availableTokenAmtBefore, availableTokenAmtAfter sdk.Int, + unbondingMatureTime time.Time, resourcenode types.ResourceNode, err error) { blockTime := ctx.BlockHeader().Time node, found := k.GetResourceNode(ctx, networkAddr) if !found { - return sdk.ZeroInt(), blockTime, node, types.ErrNoResourceNodeFound + return sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroInt(), blockTime, node, types.ErrNoResourceNodeFound } ownerAddrNode, _ := sdk.AccAddressFromBech32(node.GetOwnerAddress()) if !bytes.Equal(ownerAddrNode, ownerAddr) { - return sdk.ZeroInt(), blockTime, node, types.ErrInvalidOwnerAddr + return sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroInt(), blockTime, node, types.ErrInvalidOwnerAddr } if incrStake { - ozoneLimitChange, err := k.AddResourceNodeStake(ctx, node, stakeDelta) + ozoneLimitChange, availableTokenAmtBefore, availableTokenAmtAfter, err := k.AddResourceNodeStake(ctx, node, stakeDelta) if err != nil { - return sdk.ZeroInt(), blockTime, node, err + return sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroInt(), blockTime, node, err } - return ozoneLimitChange, blockTime, node, nil + return ozoneLimitChange, availableTokenAmtBefore, availableTokenAmtAfter, blockTime, node, nil } else { // if !incrStake if node.GetStatus() == stakingtypes.Unbonding { - return sdk.ZeroInt(), blockTime, node, types.ErrUnbondingNode + return sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroInt(), blockTime, node, types.ErrUnbondingNode } - ozoneLimitChange, completionTime, err := k.UnbondResourceNode(ctx, node, stakeDelta.Amount) + ozoneLimitChange, availableTokenAmtBefore, availableTokenAmtAfter, completionTime, err := k.UnbondResourceNode(ctx, node, stakeDelta.Amount) if err != nil { - return sdk.ZeroInt(), blockTime, node, err + return sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroInt(), blockTime, node, err } - return ozoneLimitChange, completionTime, node, nil + return ozoneLimitChange, availableTokenAmtBefore, availableTokenAmtAfter, completionTime, node, nil } } diff --git a/x/register/types/events.go b/x/register/types/events.go index fa6da5ec..76b4c1bd 100644 --- a/x/register/types/events.go +++ b/x/register/types/events.go @@ -32,6 +32,8 @@ const ( AttributeKeyOZoneLimitChanges = "ozone_limit_changes" AttributeKeyInitialStake = "initial_stake" AttributeKeyCurrentStake = "current_stake" + AttributeKeyAvailableTokenBefore = "available_token_before" + AttributeKeyAvailableTokenAfter = "available_token_after" AttributeKeyStakeDelta = "stake_delta" AttributeKeyStakeToRemove = "stake_to_remove" AttributeKeyIncrStakeBool = "incr_stake" From 7cff28e420b746e0a512731d8f458e6fc31a2b93 Mon Sep 17 00:00:00 2001 From: jialbai Date: Fri, 24 Feb 2023 09:55:51 -0500 Subject: [PATCH 20/95] - qb1269: rename method from IsSpNode to IsMetaNode --- x/pot/keeper/keeper.go | 4 ++-- x/pot/keeper/msg_server.go | 4 ++-- x/pot/types/expected_keepers.go | 2 +- x/register/keeper/meta_node.go | 4 ++-- x/register/keeper/msg_server.go | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/x/pot/keeper/keeper.go b/x/pot/keeper/keeper.go index d79538f2..3504a18d 100644 --- a/x/pot/keeper/keeper.go +++ b/x/pot/keeper/keeper.go @@ -69,8 +69,8 @@ func (k Keeper) VolumeReport(ctx sdk.Context, walletVolumes types.WalletVolumes, return nil } -func (k Keeper) IsSPNode(ctx sdk.Context, p2pAddr stratos.SdsAddress) (found bool) { - return k.registerKeeper.IsSPNode(ctx, p2pAddr) +func (k Keeper) IsMetaNode(ctx sdk.Context, p2pAddr stratos.SdsAddress) (found bool) { + return k.registerKeeper.IsMetaNode(ctx, p2pAddr) } func (k Keeper) FoundationDeposit(ctx sdk.Context, amount sdk.Coins, from sdk.AccAddress) (err error) { diff --git a/x/pot/keeper/msg_server.go b/x/pot/keeper/msg_server.go index edda6464..e7dbafa8 100644 --- a/x/pot/keeper/msg_server.go +++ b/x/pot/keeper/msg_server.go @@ -33,7 +33,7 @@ func (k msgServer) HandleMsgVolumeReport(goCtx context.Context, msg *types.MsgVo if err != nil { return &types.MsgVolumeReportResponse{}, sdkerrors.Wrap(types.ErrInvalidAddress, err.Error()) } - if !(k.IsSPNode(ctx, reporter)) { + if !(k.IsMetaNode(ctx, reporter)) { return &types.MsgVolumeReportResponse{}, sdkerrors.Wrap(types.ErrInvalidAddress, "Volume report is not sent by a superior peer") } @@ -183,7 +183,7 @@ func (k msgServer) HandleMsgSlashingResourceNode(goCtx context.Context, msg *typ if err != nil { return &types.MsgSlashingResourceNodeResponse{}, sdkerrors.Wrap(types.ErrInvalidAddress, err.Error()) } - if !(k.IsSPNode(ctx, reporterSdsAddr)) { + if !(k.IsMetaNode(ctx, reporterSdsAddr)) { return &types.MsgSlashingResourceNodeResponse{}, sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "Slashing msg is not sent by a meta node") } } diff --git a/x/pot/types/expected_keepers.go b/x/pot/types/expected_keepers.go index e8e786d8..c939b8c8 100644 --- a/x/pot/types/expected_keepers.go +++ b/x/pot/types/expected_keepers.go @@ -48,7 +48,7 @@ type RegisterKeeper interface { GetUnbondingNodeBalance(ctx sdk.Context, networkAddr stratos.SdsAddress) sdk.Int NozSupply(ctx sdk.Context) (remaining, total sdk.Int) - IsSPNode(ctx sdk.Context, p2pAddr stratos.SdsAddress) (found bool) + IsMetaNode(ctx sdk.Context, p2pAddr stratos.SdsAddress) (found bool) } type StakingKeeper interface { diff --git a/x/register/keeper/meta_node.go b/x/register/keeper/meta_node.go index a04627f5..04736193 100644 --- a/x/register/keeper/meta_node.go +++ b/x/register/keeper/meta_node.go @@ -462,7 +462,7 @@ func (k Keeper) GetMetaNodeIterator(ctx sdk.Context) sdk.Iterator { return iterator } -func (k Keeper) IsSPNode(ctx sdk.Context, p2pAddr stratos.SdsAddress) (found bool) { +func (k Keeper) IsMetaNode(ctx sdk.Context, p2pAddr stratos.SdsAddress) (found bool) { _, found = k.GetMetaNode(ctx, p2pAddr) return found -} \ No newline at end of file +} diff --git a/x/register/keeper/msg_server.go b/x/register/keeper/msg_server.go index 06dba796..bf51819b 100644 --- a/x/register/keeper/msg_server.go +++ b/x/register/keeper/msg_server.go @@ -356,7 +356,7 @@ func (k msgServer) HandleMsgUpdateEffectiveStake(goCtx context.Context, msg *typ if err != nil { return &types.MsgUpdateEffectiveStakeResponse{}, sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, err.Error()) } - if !(k.IsSPNode(ctx, reporterSdsAddr)) { + if !(k.IsMetaNode(ctx, reporterSdsAddr)) { return &types.MsgUpdateEffectiveStakeResponse{}, sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "MsgUpdateEffectiveStake is not sent by a meta node") } } From 28c48e7e201efcf31a0254821c797f883eb8fc74 Mon Sep 17 00:00:00 2001 From: jialbai Date: Fri, 24 Feb 2023 11:07:17 -0500 Subject: [PATCH 21/95] - qb1269: GetSigners() method of message won't tolerant for error any more, validateBasics() should take care all possible errors prior to GetSigners() - qb1269: tiny fix to unittest --- x/pot/types/msg.go | 34 +++++++++++++++++++++++++++++----- x/register/types/msg.go | 11 +++++++++-- x/sds/oz_price_test.go | 6 +++--- x/sds/types/msg.go | 10 +++++++++- 4 files changed, 50 insertions(+), 11 deletions(-) diff --git a/x/pot/types/msg.go b/x/pot/types/msg.go index f1957636..0dc47d1d 100644 --- a/x/pot/types/msg.go +++ b/x/pot/types/msg.go @@ -64,7 +64,7 @@ func (msg MsgVolumeReport) GetSigners() []sdk.AccAddress { var addrs []sdk.AccAddress reporterOwner, err := sdk.AccAddressFromBech32(msg.ReporterOwner) if err != nil { - return addrs + panic(err) } addrs = append(addrs, reporterOwner) return addrs @@ -99,6 +99,11 @@ func (msg MsgVolumeReport) ValidateBasic() error { return ErrEmptyReporterOwnerAddr } + _, err := sdk.AccAddressFromBech32(msg.GetReporterOwner()) + if err != nil { + return ErrReporterAddress + } + for _, item := range msg.WalletVolumes { if item.Volume.IsNegative() { return ErrNegativeVolume @@ -139,7 +144,7 @@ func (msg MsgWithdraw) GetSigners() []sdk.AccAddress { var addrs []sdk.AccAddress walletAddress, err := sdk.AccAddressFromBech32(msg.WalletAddress) if err != nil { - return addrs + panic(err) } addrs = append(addrs, walletAddress) return addrs @@ -165,6 +170,10 @@ func (msg MsgWithdraw) ValidateBasic() error { if len(msg.TargetAddress) == 0 { return ErrMissingTargetAddress } + _, err := sdk.AccAddressFromBech32(msg.GetWalletAddress()) + if err != nil { + return ErrInvalidAddress + } return nil } @@ -184,7 +193,7 @@ func (msg MsgLegacyWithdraw) GetSigners() []sdk.AccAddress { var addrs []sdk.AccAddress from, err := sdk.AccAddressFromBech32(msg.From) if err != nil { - return addrs + panic(err) } addrs = append(addrs, from) return addrs @@ -210,6 +219,10 @@ func (msg MsgLegacyWithdraw) ValidateBasic() error { if len(msg.TargetAddress) == 0 { return ErrMissingTargetAddress } + _, err := sdk.AccAddressFromBech32(msg.GetFrom()) + if err != nil { + return ErrInvalidAddress + } return nil } @@ -228,7 +241,7 @@ func (msg MsgFoundationDeposit) GetSigners() []sdk.AccAddress { var addrs []sdk.AccAddress from, err := sdk.AccAddressFromBech32(msg.From) if err != nil { - return addrs + panic(err) } addrs = append(addrs, from) return addrs @@ -251,6 +264,10 @@ func (msg MsgFoundationDeposit) ValidateBasic() error { if len(msg.From) == 0 { return ErrEmptyFromAddr } + _, err := sdk.AccAddressFromBech32(msg.GetFrom()) + if err != nil { + return ErrInvalidAddress + } return nil } @@ -297,6 +314,13 @@ func (m MsgSlashingResourceNode) ValidateBasic() error { } } + for _, owner := range m.ReporterOwner { + _, err := sdk.AccAddressFromBech32(owner) + if err != nil { + return ErrInvalidAddress + } + } + if m.Slashing.LT(sdk.ZeroInt()) { return ErrInvalidAmount } @@ -313,7 +337,7 @@ func (m MsgSlashingResourceNode) GetSigners() []sdk.AccAddress { for _, owner := range m.ReporterOwner { reporterOwner, err := sdk.AccAddressFromBech32(owner) if err != nil { - continue + panic(err) } addrs = append(addrs, reporterOwner) } diff --git a/x/register/types/msg.go b/x/register/types/msg.go index ba192b28..c4a51c60 100644 --- a/x/register/types/msg.go +++ b/x/register/types/msg.go @@ -199,7 +199,7 @@ func (msg MsgCreateMetaNode) GetSigners() []sdk.AccAddress { // Owner pays the tx fees addr, err := sdk.AccAddressFromBech32(msg.GetOwnerAddress()) if err != nil { - return []sdk.AccAddress{} + panic(err) } return []sdk.AccAddress{addr.Bytes()} @@ -642,6 +642,13 @@ func (m MsgUpdateEffectiveStake) ValidateBasic() error { } } + for _, owner := range m.ReporterOwner { + _, err := sdk.AccAddressFromBech32(owner) + if err != nil { + return ErrInvalidOwnerAddr + } + } + if m.EffectiveTokens.LT(sdk.ZeroInt()) { return ErrInvalidAmount } @@ -658,7 +665,7 @@ func (m MsgUpdateEffectiveStake) GetSigners() []sdk.AccAddress { for _, owner := range m.ReporterOwner { reporterOwner, err := sdk.AccAddressFromBech32(owner) if err != nil { - continue + panic(err) } addrs = append(addrs, reporterOwner) } diff --git a/x/sds/oz_price_test.go b/x/sds/oz_price_test.go index 931d6677..c3393c22 100644 --- a/x/sds/oz_price_test.go +++ b/x/sds/oz_price_test.go @@ -602,7 +602,7 @@ func setupSlashingMsg() *pottypes.MsgSlashingResourceNode { reporters = append(reporters, idxNodeNetworkId1) reportOwner := make([]sdk.AccAddress, 0) reportOwner = append(reportOwner, idxOwner1) - slashingMsg := pottypes.NewMsgSlashingResourceNode(reporters, reportOwner, resNodeNetworkId1, resOwner1, resNodeSlashingNOZAmt1, true, resNodeSlashingEffectiveTokenAmt1) + slashingMsg := pottypes.NewMsgSlashingResourceNode(reporters, reportOwner, resNodeNetworkId1, resOwner1, resNodeSlashingNOZAmt1, true) return slashingMsg } @@ -611,7 +611,7 @@ func setupSuspendMsgByIndex(i int, resNodeNetworkId stratos.SdsAddress, resNodeP reporters = append(reporters, idxNodeNetworkId1) reportOwner := make([]sdk.AccAddress, 0) reportOwner = append(reportOwner, idxOwner1) - slashingMsg := pottypes.NewMsgSlashingResourceNode(reporters, reportOwner, resNodeNetworkId, resOwner, resNodeSlashingNOZAmt1, true, resNodeSlashingEffectiveTokenAmt1) + slashingMsg := pottypes.NewMsgSlashingResourceNode(reporters, reportOwner, resNodeNetworkId, resOwner, resNodeSlashingNOZAmt1, true) return slashingMsg } @@ -620,7 +620,7 @@ func setupUnsuspendMsg() *pottypes.MsgSlashingResourceNode { reporters = append(reporters, idxNodeNetworkId1) reportOwner := make([]sdk.AccAddress, 0) reportOwner = append(reportOwner, idxOwner1) - slashingMsg := pottypes.NewMsgSlashingResourceNode(reporters, reportOwner, resNodeNetworkId1, resOwner1, sdk.ZeroInt(), false, resNodeSlashingEffectiveTokenAmt1) + slashingMsg := pottypes.NewMsgSlashingResourceNode(reporters, reportOwner, resNodeNetworkId1, resOwner1, sdk.ZeroInt(), false) return slashingMsg } func setupPrepayMsg() *sdstypes.MsgPrepay { diff --git a/x/sds/types/msg.go b/x/sds/types/msg.go index 7cd2c30e..c461b94f 100644 --- a/x/sds/types/msg.go +++ b/x/sds/types/msg.go @@ -31,7 +31,7 @@ func (msg MsgFileUpload) Type() string { return ConstFileUpload } func (msg MsgFileUpload) GetSigners() []sdk.AccAddress { accAddr, err := sdk.AccAddressFromBech32(msg.GetFrom()) if err != nil { - return []sdk.AccAddress{} + panic(err) } return []sdk.AccAddress{accAddr.Bytes()} } @@ -49,6 +49,11 @@ func (msg MsgFileUpload) ValidateBasic() error { return sdkerrors.Wrap(ErrInvalidFileHash, "failed to validate file hash") } + from, err := sdk.AccAddressFromBech32(msg.GetFrom()) + if err != nil { + return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "failed to validate from address") + } + reporter, err := stratos.SdsAddressFromBech32(msg.GetReporter()) if err != nil { return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "failed to parse reporter address") @@ -59,6 +64,9 @@ func (msg MsgFileUpload) ValidateBasic() error { return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "failed to parse uploader address") } + if from.Empty() { + return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "missing address of tx from") + } if reporter.Empty() { return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "missing address of tx reporter") } From 657ea6fdd380d55c786f556c34651385501ad97e Mon Sep 17 00:00:00 2001 From: Xiong Date: Fri, 24 Feb 2023 12:11:45 -0500 Subject: [PATCH 22/95] "in_ten_thousand" rename to "in_bp" --- proto/stratos/pot/v1/pot.proto | 18 +-- x/pot/keeper/distribute.go | 12 +- x/pot/types/pot.pb.go | 188 +++++++++++++++--------------- x/pot/types/types.go | 14 +-- x/register/types/resource_node.go | 20 ---- 5 files changed, 115 insertions(+), 137 deletions(-) diff --git a/proto/stratos/pot/v1/pot.proto b/proto/stratos/pot/v1/pot.proto index 8b488b11..5498517e 100644 --- a/proto/stratos/pot/v1/pot.proto +++ b/proto/stratos/pot/v1/pot.proto @@ -42,19 +42,19 @@ message MiningRewardParam { cosmos.base.v1beta1.Coin mining_reward = 3 [ (gogoproto.moretags) = "yaml:\"mining_reward\"" ]; - string block_chain_percentage_in_ten_thousand = 4 [ - (gogoproto.jsontag) = "block_chain_percentage_in_ten_thousand", - (gogoproto.moretags) = "yaml:\"block_chain_percentage_in_ten_thousand\"", + string block_chain_percentage_in_bp = 4 [ + (gogoproto.jsontag) = "block_chain_percentage_in_bp", + (gogoproto.moretags) = "yaml:\"block_chain_percentage_in_bp\"", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int" ]; - string resource_node_percentage_in_ten_thousand = 5 [ - (gogoproto.jsontag) = "resource_node_percentage_in_ten_thousand", - (gogoproto.moretags) = "yaml:\"resource_node_percentage_in_ten_thousand\"", + string resource_node_percentage_in_bp = 5 [ + (gogoproto.jsontag) = "resource_node_percentage_in_bp", + (gogoproto.moretags) = "yaml:\"resource_node_percentage_in_bp\"", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int" ]; - string meta_node_percentage_in_ten_thousand = 6 [ - (gogoproto.jsontag) = "meta_node_percentage_in_ten_thousand", - (gogoproto.moretags) = "yaml:\"meta_node_percentage_in_ten_thousand\"", + string meta_node_percentage_in_bp = 6 [ + (gogoproto.jsontag) = "meta_node_percentage_in_bp", + (gogoproto.moretags) = "yaml:\"meta_node_percentage_in_bp\"", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int" ]; } diff --git a/x/pot/keeper/distribute.go b/x/pot/keeper/distribute.go index 215e7734..ea93c2f7 100644 --- a/x/pot/keeper/distribute.go +++ b/x/pot/keeper/distribute.go @@ -91,13 +91,13 @@ func (k Keeper) CalcTrafficRewardInTotal( return distributeGoal, err } stakeTrafficReward := totalTrafficReward. - Mul(miningParam.BlockChainPercentageInTenThousand.ToDec()). + Mul(miningParam.BlockChainPercentageInBp.ToDec()). Quo(sdk.NewDec(10000)).TruncateInt() trafficRewardToResourceNodes := totalTrafficReward. - Mul(miningParam.ResourceNodePercentageInTenThousand.ToDec()). + Mul(miningParam.ResourceNodePercentageInBp.ToDec()). Quo(sdk.NewDec(10000)).TruncateInt() trafficRewardToMetaNodes := totalTrafficReward. - Mul(miningParam.MetaNodePercentageInTenThousand.ToDec()). + Mul(miningParam.MetaNodePercentageInBp.ToDec()). Quo(sdk.NewDec(10000)).TruncateInt() stakeRewardToValidators, stakeRewardToResourceNodes, stakeRewardToMetaNodes := k.splitRewardByStake(ctx, stakeTrafficReward) @@ -150,13 +150,13 @@ func (k Keeper) CalcMiningRewardInTotal(ctx sdk.Context, distributeGoal types.Di return distributeGoal, err } stakeMiningReward := totalMiningReward.Amount.ToDec(). - Mul(miningParam.BlockChainPercentageInTenThousand.ToDec()). + Mul(miningParam.BlockChainPercentageInBp.ToDec()). Quo(sdk.NewDec(10000)).TruncateInt() miningRewardToResourceNodes := totalMiningReward.Amount.ToDec(). - Mul(miningParam.ResourceNodePercentageInTenThousand.ToDec()). + Mul(miningParam.ResourceNodePercentageInBp.ToDec()). Quo(sdk.NewDec(10000)).TruncateInt() miningRewardToMetaNodes := totalMiningReward.Amount.ToDec(). - Mul(miningParam.MetaNodePercentageInTenThousand.ToDec()). + Mul(miningParam.MetaNodePercentageInBp.ToDec()). Quo(sdk.NewDec(10000)).TruncateInt() stakeRewardToValidators, stakeRewardToResourceNodes, stakeRewardToMetaNodes := k.splitRewardByStake(ctx, stakeMiningReward) diff --git a/x/pot/types/pot.pb.go b/x/pot/types/pot.pb.go index a3f91768..206c4460 100644 --- a/x/pot/types/pot.pb.go +++ b/x/pot/types/pot.pb.go @@ -96,12 +96,12 @@ func (m *Params) GetMiningRewardParams() []*MiningRewardParam { } type MiningRewardParam struct { - TotalMinedValveStart *types.Coin `protobuf:"bytes,1,opt,name=total_mined_valve_start,json=totalMinedValveStart,proto3" json:"total_mined_valve_start,omitempty" yaml:"total_mined_valve_start"` - TotalMinedValveEnd *types.Coin `protobuf:"bytes,2,opt,name=total_mined_valve_end,json=totalMinedValveEnd,proto3" json:"total_mined_valve_end,omitempty" yaml:"total_mined_valve_end"` - MiningReward *types.Coin `protobuf:"bytes,3,opt,name=mining_reward,json=miningReward,proto3" json:"mining_reward,omitempty" yaml:"mining_reward"` - BlockChainPercentageInTenThousand *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,4,opt,name=block_chain_percentage_in_ten_thousand,json=blockChainPercentageInTenThousand,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"block_chain_percentage_in_ten_thousand" yaml:"block_chain_percentage_in_ten_thousand"` - ResourceNodePercentageInTenThousand *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,5,opt,name=resource_node_percentage_in_ten_thousand,json=resourceNodePercentageInTenThousand,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"resource_node_percentage_in_ten_thousand" yaml:"resource_node_percentage_in_ten_thousand"` - MetaNodePercentageInTenThousand *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,6,opt,name=meta_node_percentage_in_ten_thousand,json=metaNodePercentageInTenThousand,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"meta_node_percentage_in_ten_thousand" yaml:"meta_node_percentage_in_ten_thousand"` + TotalMinedValveStart *types.Coin `protobuf:"bytes,1,opt,name=total_mined_valve_start,json=totalMinedValveStart,proto3" json:"total_mined_valve_start,omitempty" yaml:"total_mined_valve_start"` + TotalMinedValveEnd *types.Coin `protobuf:"bytes,2,opt,name=total_mined_valve_end,json=totalMinedValveEnd,proto3" json:"total_mined_valve_end,omitempty" yaml:"total_mined_valve_end"` + MiningReward *types.Coin `protobuf:"bytes,3,opt,name=mining_reward,json=miningReward,proto3" json:"mining_reward,omitempty" yaml:"mining_reward"` + BlockChainPercentageInBp *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,4,opt,name=block_chain_percentage_in_bp,json=blockChainPercentageInBp,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"block_chain_percentage_in_bp" yaml:"block_chain_percentage_in_bp"` + ResourceNodePercentageInBp *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,5,opt,name=resource_node_percentage_in_bp,json=resourceNodePercentageInBp,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"resource_node_percentage_in_bp" yaml:"resource_node_percentage_in_bp"` + MetaNodePercentageInBp *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,6,opt,name=meta_node_percentage_in_bp,json=metaNodePercentageInBp,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"meta_node_percentage_in_bp" yaml:"meta_node_percentage_in_bp"` } func (m *MiningRewardParam) Reset() { *m = MiningRewardParam{} } @@ -379,71 +379,69 @@ func init() { func init() { proto.RegisterFile("stratos/pot/v1/pot.proto", fileDescriptor_a05930b44d981057) } var fileDescriptor_a05930b44d981057 = []byte{ - // 1009 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 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 0x1c, - 0x68, 0x34, 0x4e, 0x93, 0x6b, 0xb4, 0x6a, 0xb7, 0x32, 0x06, 0x63, 0xb2, 0x74, 0x6a, 0xef, 0xd3, - 0x43, 0xfc, 0xcf, 0x3c, 0xb8, 0x7a, 0x4e, 0x20, 0x54, 0x60, 0x5d, 0x09, 0x45, 0x93, 0x20, 0x8d, - 0x39, 0x8b, 0x82, 0x3e, 0x4d, 0xfa, 0x2c, 0xc8, 0x14, 0x95, 0xca, 0xf4, 0xc2, 0xe2, 0xed, 0xd7, - 0x1a, 0x76, 0x13, 0x8d, 0xa2, 0x97, 0x1a, 0xae, 0x97, 0x1a, 0x77, 0x44, 0xcc, 0x9b, 0x38, 0xd7, - 0xa8, 0x6e, 0x33, 0x4f, 0xe0, 0xc0, 0x64, 0xd5, 0x78, 0xee, 0x15, 0x8e, 0x07, 0x05, 0x7e, 0xbf, - 0x80, 0x21, 0x07, 0x6b, 0xe7, 0x57, 0x30, 0x1e, 0x99, 0xce, 0x99, 0x9a, 0x73, 0x23, 0xd7, 0xe8, - 0x8d, 0x49, 0x39, 0x19, 0x8f, 0x30, 0x81, 0x67, 0x32, 0xee, 0xf0, 0x08, 0x7e, 0x06, 0x96, 0xc7, - 0xca, 0x64, 0xba, 0x6a, 0x6a, 0x9e, 0xda, 0xe8, 0x54, 0xc7, 0x56, 0x62, 0xb2, 0x54, 0xae, 0x2c, - 0xfc, 0xd5, 0x03, 0x37, 0x5b, 0x89, 0x08, 0x1f, 0x07, 0x61, 0x87, 0xc6, 0x3c, 0xe8, 0x32, 0x19, - 0x32, 0xae, 0x68, 0x9b, 0x05, 0x31, 0x0f, 0x14, 0xe3, 0x81, 0xea, 0x88, 0x5e, 0x46, 0x79, 0x54, - 0xbb, 0x6c, 0xaa, 0xfd, 0xb5, 0x37, 0x63, 0xa9, 0x77, 0xb9, 0x1a, 0x68, 0x34, 0x23, 0x79, 0xae, - 0xd1, 0x96, 0xbb, 0xa2, 0x33, 0xc5, 0x63, 0x72, 0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xf8, 0xa3, - 0x07, 0x6a, 0x65, 0x7a, 0x25, 0xe9, 0xc1, 0x41, 0x1c, 0x5a, 0x09, 0x95, 0x17, 0x49, 0x10, 0x4e, - 0xc2, 0x44, 0x8a, 0x5c, 0x23, 0x74, 0x5e, 0x43, 0x39, 0xe2, 0x62, 0x22, 0xd6, 0x46, 0x22, 0xf6, - 0x2d, 0x49, 0xa1, 0x02, 0xff, 0xe4, 0x01, 0x78, 0x3f, 0xe6, 0xed, 0x84, 0x3d, 0x34, 0xf5, 0x79, - 0x20, 0x92, 0x5e, 0xca, 0xfe, 0x97, 0x92, 0x7f, 0x01, 0xaa, 0x7d, 0xc3, 0xee, 0x3e, 0xed, 0x3b, - 0x17, 0xba, 0x05, 0x6e, 0x6d, 0xae, 0xd1, 0xb2, 0xcd, 0x66, 0x6d, 0x4c, 0x9c, 0x03, 0x27, 0x60, - 0xb9, 0x2c, 0x21, 0x83, 0x9f, 0x83, 0x79, 0xeb, 0x2a, 0x36, 0x5f, 0x94, 0x03, 0x9f, 0xfd, 0x54, - 0x9f, 0x17, 0xde, 0x7c, 0x73, 0xa0, 0xd1, 0x70, 0x59, 0xae, 0xd1, 0x4a, 0x39, 0x57, 0x86, 0xc9, - 0xd0, 0x85, 0xff, 0xf6, 0x00, 0xb4, 0x4b, 0x08, 0xeb, 0x0a, 0xa9, 0x08, 0x0b, 0x85, 0x8c, 0xe0, - 0x07, 0xe0, 0x65, 0x69, 0x6c, 0x26, 0xdd, 0x89, 0xa1, 0x81, 0x46, 0xa7, 0x58, 0xae, 0xd1, 0x95, - 0x61, 0x51, 0x2d, 0x82, 0xc9, 0xa9, 0x13, 0x3e, 0x02, 0xaf, 0xd8, 0xf7, 0x40, 0xb2, 0x03, 0x26, - 0x19, 0x0f, 0x87, 0x47, 0xe5, 0x0f, 0x34, 0x3a, 0xe7, 0xcb, 0x35, 0x5a, 0x2f, 0x93, 0x8d, 0x3c, - 0x98, 0x5c, 0x91, 0x6e, 0x57, 0x0e, 0x81, 0xef, 0x82, 0x79, 0x75, 0x18, 0x74, 0x68, 0x66, 0x7f, - 0x86, 0x16, 0xac, 0x50, 0x07, 0x8d, 0x84, 0x3a, 0x00, 0x93, 0xaa, 0x3a, 0xfc, 0x98, 0x66, 0x9d, - 0xe6, 0xee, 0xd3, 0xe3, 0xba, 0xf7, 0xec, 0xb8, 0xee, 0xfd, 0x71, 0x5c, 0xf7, 0xbe, 0x3b, 0xa9, - 0xcf, 0x3d, 0x3b, 0xa9, 0xcf, 0xfd, 0x72, 0x52, 0x9f, 0x7b, 0xe4, 0x97, 0x4a, 0xe7, 0xce, 0x95, - 0x33, 0x35, 0x7c, 0xdd, 0x32, 0x1f, 0x0f, 0xff, 0xd0, 0xfc, 0x7c, 0x9a, 0x3a, 0xb6, 0xaa, 0xe6, - 0xb7, 0xf1, 0x9d, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0x29, 0xed, 0x79, 0xc6, 0x98, 0x0a, 0x00, - 0x00, + // 992 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x4d, 0x6f, 0x1b, 0x45, + 0x18, 0xce, 0xd6, 0xc5, 0x25, 0x93, 0x8f, 0xd2, 0x21, 0x21, 0x26, 0x14, 0x4f, 0x3a, 0x15, 0x10, + 0x09, 0xd5, 0xab, 0x14, 0x09, 0x24, 0x38, 0xe1, 0x36, 0x88, 0x20, 0x15, 0x45, 0xd3, 0xaa, 0x45, + 0x45, 0x68, 0x35, 0xde, 0x9d, 0x38, 0xab, 0xee, 0xce, 0x98, 0xd9, 0xb1, 0x9b, 0x48, 0xfc, 0x04, + 0x0e, 0xfc, 0x0d, 0xb8, 0x71, 0xe4, 0xc4, 0x81, 0x03, 0x3d, 0xf6, 0x88, 0x38, 0x0c, 0x28, 0x81, + 0xcb, 0x5e, 0x10, 0xfb, 0x0b, 0xd0, 0xce, 0x8c, 0xe3, 0xb5, 0x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68, 0x78, 0xac, 0xd0, 0x68, 0xb5, 0x1a, 0x2b, 0xc3, 0x64, + 0x48, 0xe1, 0xbf, 0x3d, 0x00, 0xed, 0x11, 0xc2, 0x7a, 0x42, 0x2a, 0xc2, 0x42, 0x21, 0x23, 0xf8, + 0x11, 0x78, 0x59, 0x1a, 0x9b, 0x49, 0xd7, 0x31, 0x94, 0x6b, 0x74, 0x86, 0x15, 0x1a, 0x5d, 0x1e, + 0x0e, 0xd5, 0x22, 0x98, 0x9c, 0x91, 0xf0, 0x21, 0x78, 0xc5, 0x3e, 0x07, 0x92, 0x1d, 0x30, 0xc9, + 0x78, 0x38, 0x6c, 0x95, 0x9f, 0x6b, 0x34, 0xc5, 0x15, 0x1a, 0x6d, 0x54, 0xc5, 0x46, 0x0c, 0x26, + 0x97, 0xa5, 0xcb, 0xca, 0x21, 0xf0, 0x7d, 0x70, 0x49, 0x1d, 0x05, 0x87, 0x34, 0xb3, 0x1f, 0x25, + 0x8b, 0xb6, 0x50, 0x07, 0x8d, 0x0a, 0x75, 0x00, 0x26, 0x75, 0x75, 0xf4, 0x29, 0xcd, 0x0e, 0xdb, + 0x7b, 0x4f, 0x4e, 0x9a, 0xde, 0xd3, 0x93, 0xa6, 0xf7, 0xe7, 0x49, 0xd3, 0xfb, 0xee, 0xb4, 0xb9, + 0xf0, 0xf4, 0xb4, 0xb9, 0xf0, 0xdb, 0x69, 0x73, 0xe1, 0xa1, 0x5f, 0x19, 0x9d, 0xeb, 0x2b, 0x67, + 0x6a, 0xf8, 0x78, 0xc3, 0xdc, 0xec, 0xfe, 0x91, 0xf9, 0x08, 0x34, 0x73, 0xec, 0xd4, 0xcd, 0xe7, + 0xdb, 0x7b, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0x92, 0x97, 0x7e, 0x6c, 0x20, 0x0a, 0x00, 0x00, } func (m *Params) Marshal() (dAtA []byte, err error) { @@ -532,11 +530,11 @@ func (m *MiningRewardParam) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.MetaNodePercentageInTenThousand != nil { + if m.MetaNodePercentageInBp != nil { { - size := m.MetaNodePercentageInTenThousand.Size() + size := m.MetaNodePercentageInBp.Size() i -= size - if _, err := m.MetaNodePercentageInTenThousand.MarshalTo(dAtA[i:]); err != nil { + if _, err := m.MetaNodePercentageInBp.MarshalTo(dAtA[i:]); err != nil { return 0, err } i = encodeVarintPot(dAtA, i, uint64(size)) @@ -544,11 +542,11 @@ func (m *MiningRewardParam) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x32 } - if m.ResourceNodePercentageInTenThousand != nil { + if m.ResourceNodePercentageInBp != nil { { - size := m.ResourceNodePercentageInTenThousand.Size() + size := m.ResourceNodePercentageInBp.Size() i -= size - if _, err := m.ResourceNodePercentageInTenThousand.MarshalTo(dAtA[i:]); err != nil { + if _, err := m.ResourceNodePercentageInBp.MarshalTo(dAtA[i:]); err != nil { return 0, err } i = encodeVarintPot(dAtA, i, uint64(size)) @@ -556,11 +554,11 @@ func (m *MiningRewardParam) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x2a } - if m.BlockChainPercentageInTenThousand != nil { + if m.BlockChainPercentageInBp != nil { { - size := m.BlockChainPercentageInTenThousand.Size() + size := m.BlockChainPercentageInBp.Size() i -= size - if _, err := m.BlockChainPercentageInTenThousand.MarshalTo(dAtA[i:]); err != nil { + if _, err := m.BlockChainPercentageInBp.MarshalTo(dAtA[i:]); err != nil { return 0, err } i = encodeVarintPot(dAtA, i, uint64(size)) @@ -845,16 +843,16 @@ func (m *MiningRewardParam) Size() (n int) { l = m.MiningReward.Size() n += 1 + l + sovPot(uint64(l)) } - if m.BlockChainPercentageInTenThousand != nil { - l = m.BlockChainPercentageInTenThousand.Size() + if m.BlockChainPercentageInBp != nil { + l = m.BlockChainPercentageInBp.Size() n += 1 + l + sovPot(uint64(l)) } - if m.ResourceNodePercentageInTenThousand != nil { - l = m.ResourceNodePercentageInTenThousand.Size() + if m.ResourceNodePercentageInBp != nil { + l = m.ResourceNodePercentageInBp.Size() n += 1 + l + sovPot(uint64(l)) } - if m.MetaNodePercentageInTenThousand != nil { - l = m.MetaNodePercentageInTenThousand.Size() + if m.MetaNodePercentageInBp != nil { + l = m.MetaNodePercentageInBp.Size() n += 1 + l + sovPot(uint64(l)) } return n @@ -1284,7 +1282,7 @@ func (m *MiningRewardParam) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockChainPercentageInTenThousand", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field BlockChainPercentageInBp", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1313,14 +1311,14 @@ func (m *MiningRewardParam) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } var v github_com_cosmos_cosmos_sdk_types.Int - m.BlockChainPercentageInTenThousand = &v - if err := m.BlockChainPercentageInTenThousand.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.BlockChainPercentageInBp = &v + if err := m.BlockChainPercentageInBp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceNodePercentageInTenThousand", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ResourceNodePercentageInBp", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1349,14 +1347,14 @@ func (m *MiningRewardParam) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } var v github_com_cosmos_cosmos_sdk_types.Int - m.ResourceNodePercentageInTenThousand = &v - if err := m.ResourceNodePercentageInTenThousand.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.ResourceNodePercentageInBp = &v + if err := m.ResourceNodePercentageInBp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MetaNodePercentageInTenThousand", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field MetaNodePercentageInBp", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1385,8 +1383,8 @@ func (m *MiningRewardParam) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } var v github_com_cosmos_cosmos_sdk_types.Int - m.MetaNodePercentageInTenThousand = &v - if err := m.MetaNodePercentageInTenThousand.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.MetaNodePercentageInBp = &v + if err := m.MetaNodePercentageInBp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/x/pot/types/types.go b/x/pot/types/types.go index e640687f..7c8c88c7 100644 --- a/x/pot/types/types.go +++ b/x/pot/types/types.go @@ -17,14 +17,14 @@ func NewSingleWalletVolume( } func NewMiningRewardParam(totalMinedValveStart sdk.Coin, totalMinedValveEnd sdk.Coin, miningReward sdk.Coin, - resourceNodePercentageInTenThousand sdk.Int, metaNodePercentageInTenThousand sdk.Int, blockChainPercentageInTenThousand sdk.Int) *MiningRewardParam { + resourceNodePercentageInBp sdk.Int, metaNodePercentageInBp sdk.Int, blockChainPercentageInBp sdk.Int) *MiningRewardParam { return &MiningRewardParam{ - TotalMinedValveStart: &totalMinedValveStart, - TotalMinedValveEnd: &totalMinedValveEnd, - MiningReward: &miningReward, - BlockChainPercentageInTenThousand: &blockChainPercentageInTenThousand, - ResourceNodePercentageInTenThousand: &resourceNodePercentageInTenThousand, - MetaNodePercentageInTenThousand: &metaNodePercentageInTenThousand, + TotalMinedValveStart: &totalMinedValveStart, + TotalMinedValveEnd: &totalMinedValveEnd, + MiningReward: &miningReward, + BlockChainPercentageInBp: &blockChainPercentageInBp, + ResourceNodePercentageInBp: &resourceNodePercentageInBp, + MetaNodePercentageInBp: &metaNodePercentageInBp, } } diff --git a/x/register/types/resource_node.go b/x/register/types/resource_node.go index ef19d1df..b3689b24 100644 --- a/x/register/types/resource_node.go +++ b/x/register/types/resource_node.go @@ -219,26 +219,6 @@ func UnmarshalResourceNode(cdc codec.Codec, value []byte) (v ResourceNode, err e return v, err } -//func (s *Staking) GetOwnerAddr() sdk.AccAddress { -// addr, err := sdk.AccAddressFromBech32(s.OwnerAddress) -// if err != nil { -// panic(err) -// } -// return addr -//} -//func (s *Staking) GetShares() sdk.Dec { return s.Value } -// -//// Stakings is a collection of Staking -//type Stakings []Staking -// -//func (ss Stakings) String() (out string) { -// for _, staking := range ss { -// out += staking.String() + "\n" -// } -// -// return strings.TrimSpace(out) -//} - // UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces func (v ResourceNode) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { var pk cryptotypes.PubKey From 63402f8cb956ef5362aa33310cc61757ff2d1680 Mon Sep 17 00:00:00 2001 From: BoThe1K Date: Mon, 20 Feb 2023 23:11:57 +0100 Subject: [PATCH 23/95] Improve initial design --- rpc/backend/backend.go | 14 +- rpc/backend/evm_backend.go | 3 +- rpc/backend/utils.go | 17 +- rpc/namespaces/ethereum/debug/api.go | 3 +- rpc/namespaces/ethereum/eth/api.go | 5 +- rpc/namespaces/ethereum/eth/filters/api.go | 5 - .../ethereum/eth/filters/filter_system.go | 8 - rpc/types/utils.go | 20 +- x/evm/pool/tx_pool.back | 694 ------------------ x/evm/pool/tx_pool.go | 216 +++--- x/evm/pool/utils.go | 46 -- x/evm/types/utils.go | 40 + 12 files changed, 177 insertions(+), 894 deletions(-) delete mode 100644 x/evm/pool/tx_pool.back delete mode 100644 x/evm/pool/utils.go diff --git a/rpc/backend/backend.go b/rpc/backend/backend.go index 9d86a698..14bde7b1 100644 --- a/rpc/backend/backend.go +++ b/rpc/backend/backend.go @@ -122,20 +122,23 @@ type Backend struct { txPool *pool.TxPool } +var backend *Backend + // NewBackend creates a new Backend instance for cosmos and ethereum namespaces func NewBackend(ctx *server.Context, tmNode *node.Node, evmkeeper *evmkeeper.Keeper, ms storetypes.MultiStore, logger log.Logger, clientCtx client.Context) *Backend { + // NOTE: As NewBackend called 6 times, we are caching for the first load + if backend != nil { + return backend + } appConf, err := config.GetConfig(ctx.Viper) if err != nil { panic(err) } evmCtx := evm.NewContext(logger, ms, tmNode.BlockStore()) - txPool, err := pool.NewTxPool(core.DefaultTxPoolConfig, appConf, logger, clientCtx, tmNode.Mempool(), evmkeeper, evmCtx) - if err != nil { - panic(err) - } + txPool := pool.NewTxPool(core.DefaultTxPoolConfig, appConf, clientCtx, tmNode.Mempool(), evmkeeper, evmCtx) - return &Backend{ + backend = &Backend{ ctx: context.Background(), clientCtx: clientCtx, tmNode: tmNode, @@ -146,6 +149,7 @@ func NewBackend(ctx *server.Context, tmNode *node.Node, evmkeeper *evmkeeper.Kee cfg: appConf, txPool: txPool, } + return backend } func (b *Backend) GetTxPool() *pool.TxPool { diff --git a/rpc/backend/evm_backend.go b/rpc/backend/evm_backend.go index 9bb90f96..80693518 100644 --- a/rpc/backend/evm_backend.go +++ b/rpc/backend/evm_backend.go @@ -24,7 +24,6 @@ import ( "github.com/stratosnet/stratos-chain/rpc/types" stratos "github.com/stratosnet/stratos-chain/types" - "github.com/stratosnet/stratos-chain/x/evm/pool" evmtypes "github.com/stratosnet/stratos-chain/x/evm/types" tmrpccore "github.com/tendermint/tendermint/rpc/core" ) @@ -373,7 +372,7 @@ func (b *Backend) GetCoinbase() (sdk.AccAddress, error) { // GetTransactionByHash returns the Ethereum format transaction identified by Ethereum transaction hash func (b *Backend) GetTransactionByHash(txHash common.Hash) (*types.Transaction, error) { - res, err := pool.GetTmTxByHash(txHash) + res, err := evmtypes.GetTmTxByHash(txHash) if err != nil { // TODO: Get chain id value from genesis tx, err := types.GetPendingTx(b.clientCtx.TxConfig.TxDecoder(), b.GetMempool(), txHash) diff --git a/rpc/backend/utils.go b/rpc/backend/utils.go index cd76951b..22467d68 100644 --- a/rpc/backend/utils.go +++ b/rpc/backend/utils.go @@ -15,7 +15,6 @@ import ( abci "github.com/tendermint/tendermint/abci/types" tmrpctypes "github.com/tendermint/tendermint/rpc/core/types" - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stratosnet/stratos-chain/rpc/types" evmtypes "github.com/stratosnet/stratos-chain/x/evm/types" ) @@ -177,16 +176,9 @@ func (b *Backend) SetTxDefaults(args evmtypes.TransactionArgs) (evmtypes.Transac // txs in order to compute and return the pending tx sequence. // Todo: include the ability to specify a blockNumber func (b *Backend) getAccountNonce(address common.Address, height types.BlockNumber) (uint64, error) { - var ( - pendingNonce uint64 - ) if height == types.EthPendingBlockNumber { - pendingNonce = types.GetPendingTxCountByAddress(b.clientCtx.TxConfig.TxDecoder(), b.GetMempool(), address) + return b.GetTxPool().Nonce(address), nil } - req := evmtypes.QueryCosmosAccountRequest{ - Address: address.Hex(), - } - block, err := b.GetTendermintBlockByNumber(height) if err != nil { return 0, err @@ -195,16 +187,11 @@ func (b *Backend) getAccountNonce(address common.Address, height types.BlockNumb if block.Block == nil { return 0, fmt.Errorf("failed to get block for %d height", height) } - sdkCtx, err := b.GetEVMContext().GetSdkContextWithHeader(&block.Block.Header) if err != nil { return 0, err } - acc, err := b.GetEVMKeeper().CosmosAccount(sdk.WrapSDKContext(sdkCtx), &req) - if err != nil { - return pendingNonce, err - } - return acc.GetSequence() + pendingNonce, nil + return b.GetEVMKeeper().GetNonce(sdkCtx, address), nil } // output: targetOneFeeHistory diff --git a/rpc/namespaces/ethereum/debug/api.go b/rpc/namespaces/ethereum/debug/api.go index cd56213a..6ec028d4 100644 --- a/rpc/namespaces/ethereum/debug/api.go +++ b/rpc/namespaces/ethereum/debug/api.go @@ -36,7 +36,6 @@ import ( "github.com/stratosnet/stratos-chain/rpc/backend" rpctypes "github.com/stratosnet/stratos-chain/rpc/types" - "github.com/stratosnet/stratos-chain/x/evm/pool" jstracers "github.com/stratosnet/stratos-chain/x/evm/tracers/js" nativetracers "github.com/stratosnet/stratos-chain/x/evm/tracers/native" evmtypes "github.com/stratosnet/stratos-chain/x/evm/types" @@ -109,7 +108,7 @@ func (a *API) TraceTransaction(ctx context.Context, hash common.Hash, config *tr a.logger.Debug("debug_traceTransaction", "hash", hash) // Get transaction by hash - resultTx, err := pool.GetTmTxByHash(hash) + resultTx, err := evmtypes.GetTmTxByHash(hash) if err != nil { a.logger.Debug("debug_traceTransaction", "tx not found", "hash", hash) return nil, err diff --git a/rpc/namespaces/ethereum/eth/api.go b/rpc/namespaces/ethereum/eth/api.go index d7ad936c..047e2fb8 100644 --- a/rpc/namespaces/ethereum/eth/api.go +++ b/rpc/namespaces/ethereum/eth/api.go @@ -36,7 +36,6 @@ import ( "github.com/stratosnet/stratos-chain/rpc/types" rpctypes "github.com/stratosnet/stratos-chain/rpc/types" stratos "github.com/stratosnet/stratos-chain/types" - "github.com/stratosnet/stratos-chain/x/evm/pool" evmtypes "github.com/stratosnet/stratos-chain/x/evm/types" tmrpccore "github.com/tendermint/tendermint/rpc/core" ) @@ -393,7 +392,7 @@ func (e *PublicAPI) GetTransactionLogs(txHash common.Hash) ([]*ethtypes.Log, err e.logger.Debug("eth_getTransactionLogs", "hash", txHash) hexTx := txHash.Hex() - res, err := pool.GetTmTxByHash(txHash) + res, err := evmtypes.GetTmTxByHash(txHash) if err != nil { e.logger.Debug("tx not found", "hash", hexTx, "error", err.Error()) return nil, nil @@ -756,7 +755,7 @@ func (e *PublicAPI) GetTransactionByBlockNumberAndIndex(blockNum rpctypes.BlockN // GetTransactionReceipt returns the transaction receipt identified by hash. func (e *PublicAPI) GetTransactionReceipt(hash common.Hash) (*rpctypes.TransactionReceipt, error) { e.logger.Debug("eth_getTransactionReceipt", "hash", hash) - res, err := pool.GetTmTxByHash(hash) + res, err := evmtypes.GetTmTxByHash(hash) if err != nil { return nil, nil } diff --git a/rpc/namespaces/ethereum/eth/filters/api.go b/rpc/namespaces/ethereum/eth/filters/api.go index 23c1b276..0edbde03 100644 --- a/rpc/namespaces/ethereum/eth/filters/api.go +++ b/rpc/namespaces/ethereum/eth/filters/api.go @@ -349,7 +349,6 @@ func (api *PublicFilterAPI) Logs(ctx context.Context, crit filters.FilterCriteri select { case ev := <-logsCh: _, isMsgEthereumTx := ev.Events[fmt.Sprintf("%s.%s", evmtypes.EventTypeEthereumTx, evmtypes.AttributeKeyEthereumTxHash)] - api.logger.Debug("\x1b[32m------ logs tx type is evm from sub: %t\x1b[0m\n", isMsgEthereumTx) if !isMsgEthereumTx { continue } @@ -361,18 +360,14 @@ func (api *PublicFilterAPI) Logs(ctx context.Context, crit filters.FilterCriteri logsSub.err <- err return } - api.logger.Debug("\x1b[32m------ logs tx dataTx: %+v\x1b[0m\n", dataTx) txResponse, err := evmtypes.DecodeTxResponse(dataTx.TxResult.Result.Data) if err != nil { logsSub.err <- err return } - api.logger.Debug("\x1b[32m------ logs tx response: %+v\x1b[0m\n", txResponse) - api.logger.Debug("\x1b[32m------ logs crit: %+v\x1b[0m\n", crit) matchedLogs := FilterLogs(evmtypes.LogsToEthereum(txResponse.Logs), crit.FromBlock, crit.ToBlock, crit.Addresses, crit.Topics) - api.logger.Debug("\x1b[32m------ logs matchedLogs: %+v\x1b[0m\n", matchedLogs) for _, log := range matchedLogs { err = notifier.Notify(rpcSub.ID, log) if err != nil { diff --git a/rpc/namespaces/ethereum/eth/filters/filter_system.go b/rpc/namespaces/ethereum/eth/filters/filter_system.go index 6cb8e06c..45ffa1f0 100644 --- a/rpc/namespaces/ethereum/eth/filters/filter_system.go +++ b/rpc/namespaces/ethereum/eth/filters/filter_system.go @@ -225,7 +225,6 @@ func (es *EventSystem) resubscribe(subscriber string, q tmpubsub.Query) tmtypes. // block is "latest". If the fromBlock > toBlock an error is returned. func (es *EventSystem) SubscribeLogs(crit filters.FilterCriteria) (*Subscription, context.CancelFunc, error) { var from, to rpc.BlockNumber - es.logger.Debug("\x1b[32m------ SubscribeLogs crit: %+v\x1b[0m\n", crit) if crit.FromBlock == nil { from = rpc.LatestBlockNumber } else { @@ -286,7 +285,6 @@ func (es *EventSystem) subscribeLogs(crit filters.FilterCriteria) (*Subscription installed: make(chan struct{}, 1), err: make(chan error, 1), } - es.logger.Debug("\x1b[32m------ logs subscribe: %+v\x1b[0m\n", sub) return es.subscribe(sub) } @@ -338,8 +336,6 @@ type filterIndex map[filters.Type]map[rpc.ID]*Subscription func (es *EventSystem) handleLogs(ev coretypes.ResultEvent) { data, _ := ev.Data.(tmtypes.EventDataTx) - es.logger.Debug("\x1b[32m------ logs data: %+v\x1b[0m\n", data) - // logReceipt := onetypes.GetTxEthLogs(&data.TxResult.Result, data.Index) resultData, err := evmtypes.DecodeTransactionLogs(data.TxResult.Result.Data) if err != nil { return @@ -428,16 +424,12 @@ func (es *EventSystem) eventLoop() { for { select { case txEvent := <-es.txsSub.eventCh: - es.logger.Debug("\x1b[32m------ tx event trigger from event loop: %+v\x1b[0m\n", txEvent) es.handleTxsEvent(txEvent) case headerEv := <-es.chainSub.eventCh: - es.logger.Debug("\x1b[32m------ header event trigger from event loop: %+v\x1b[0m\n", headerEv) es.handleChainEvent(headerEv) case logsEv := <-es.logsSub.eventCh: - es.logger.Debug("\x1b[32m------ logs event trigger from event loop: %+v\x1b[0m\n", logsEv) es.handleLogs(logsEv) case logsEv := <-es.pendingLogsSub.eventCh: - es.logger.Debug("\x1b[32m------ pending logs event trigger from event loop: %+v\x1b[0m\n", logsEv) es.handleLogs(logsEv) case f := <-es.install: diff --git a/rpc/types/utils.go b/rpc/types/utils.go index dc796748..737c0cdf 100644 --- a/rpc/types/utils.go +++ b/rpc/types/utils.go @@ -89,7 +89,7 @@ func EthHeaderFromTendermint(header tmtypes.Header) (*Header, error) { if err != nil { return nil, err } - gasLimit, err := BlockMaxGasFromConsensusParams(&header.Height) + gasLimit, err := evmtypes.BlockMaxGasFromConsensusParams(&header.Height) if err != nil { return nil, err } @@ -174,24 +174,6 @@ func EthBlockFromTendermint(txDecoder sdk.TxDecoder, block *tmtypes.Block, fullT }, nil } -// BlockMaxGasFromConsensusParams returns the gas limit for the current block from the chain consensus params. -func BlockMaxGasFromConsensusParams(blockHeight *int64) (int64, error) { - resConsParams, err := tmrpccore.ConsensusParams(nil, blockHeight) - if err != nil { - return int64(^uint32(0)), err - } - - gasLimit := resConsParams.ConsensusParams.Block.MaxGas - if gasLimit == -1 { - // Sets gas limit to max uint32 to not error with javascript dev tooling - // This -1 value indicating no block gas limit is set to max uint64 with geth hexutils - // which errors certain javascript dev tooling which only supports up to 53 bits - gasLimit = int64(^uint32(0)) - } - - return gasLimit, nil -} - type DataError interface { Error() string // returns the message ErrorData() interface{} // returns the error data diff --git a/x/evm/pool/tx_pool.back b/x/evm/pool/tx_pool.back deleted file mode 100644 index 36465b26..00000000 --- a/x/evm/pool/tx_pool.back +++ /dev/null @@ -1,694 +0,0 @@ -package pool - -import ( - "math/big" - "sync" - "sync/atomic" - "time" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core" - "github.com/ethereum/go-ethereum/core/types" - "github.com/stratosnet/stratos-chain/server/config" - stratos "github.com/stratosnet/stratos-chain/types" - "github.com/stratosnet/stratos-chain/x/evm" - evmkeeper "github.com/stratosnet/stratos-chain/x/evm/keeper" - "github.com/tendermint/tendermint/libs/log" - mempl "github.com/tendermint/tendermint/mempool" -) - -const ( - // txSlotSize is used to calculate how many data slots a single transaction - // takes up based on its size. The slots are used as DoS protection, ensuring - // that validating a new transaction remains a constant operation (in reality - // O(maxslots), where max slots are 4 currently). - txSlotSize = 32 * 1024 - - // txMaxSize is the maximum size a single transaction can have. This field has - // non-trivial consequences: larger transactions are significantly harder and - // more expensive to propagate; larger transactions also take more resources - // to validate whether they fit into the pool or not. - txMaxSize = 4 * txSlotSize // 128KB -) - -var ( - evictionInterval = time.Minute // Time interval to check for evictable transactions - statsReportInterval = 8 * time.Second // Time interval to report transaction pool stats -) - -type txpoolResetRequest struct { - oldHead, newHead *types.Header -} - -type TxPool struct { - config core.TxPoolConfig - srvCfg config.Config - logger log.Logger - clientCtx client.Context - evmCtx *evm.Context - signer types.Signer - mempool mempl.Mempool - mu sync.RWMutex - - evmkeeper *evmkeeper.Keeper // Active keeper to get current state - pendingNonces *txNoncer // Pending state tracking virtual nonces - currentMaxGas uint64 // Current gas limit for transaction caps - - locals *accountSet // Set of local transaction to exempt from eviction rules - beats map[common.Address]time.Time // Last heartbeat from each known account - - pending map[common.Address]*txList // All currently processable transactions - queue map[common.Address]*txList // Queued but non-processable transactions - all *txLookup // All transactions to allow lookups - priced *txPricedList // All transactions sorted by price -} - -func NewTxPool(config core.TxPoolConfig, srvCfg config.Config, logger log.Logger, clientCtx client.Context, mempool mempl.Mempool, evmkeeper *evmkeeper.Keeper, evmCtx *evm.Context) (*TxPool, error) { - sdkCtx := evmCtx.GetSdkContext() - params := evmkeeper.GetParams(sdkCtx) - gasLimit, err := BlockMaxGasFromConsensusParams(nil) - if err != nil { - return nil, err - } - pool := &TxPool{ - config: config, - srvCfg: srvCfg, - logger: logger, - clientCtx: clientCtx, - evmCtx: evmCtx, - signer: types.LatestSignerForChainID(params.ChainConfig.ChainID.BigInt()), - mempool: mempool, - evmkeeper: evmkeeper, - currentMaxGas: uint64(gasLimit), - beats: make(map[common.Address]time.Time), - pending: make(map[common.Address]*txList), - queue: make(map[common.Address]*txList), - all: newTxLookup(), - } - pool.locals = newAccountSet(pool.signer) - pool.priced = newTxPricedList(pool.all) - pool.pendingNonces = newTxNoncer(pool.evmCtx, pool.evmkeeper) - go pool.eventLoop() - - return pool, nil -} - -func (pool *TxPool) eventLoop() { - var ( - curDone chan struct{} // non-nil while runReorg is active - nextDone = make(chan struct{}) - launchNextRun bool - reset *txpoolResetRequest - dirtyAccounts *accountSet - queuedEvents = make(map[common.Address]*txSortedMap) - prevPending, prevQueued, prevStales int - // Start the stats reporting and transaction eviction tickers - report = time.NewTicker(statsReportInterval) - evict = time.NewTicker(evictionInterval) - ) - defer report.Stop() - defer evict.Stop() - - for { - // Launch next background reorg if needed - if curDone == nil && launchNextRun { - // Run the background reorg and announcements - go pool.runReorg(nextDone, reset, dirtyAccounts, queuedEvents) - - // Prepare everything for the next round of reorg - curDone, nextDone = nextDone, make(chan struct{}) - launchNextRun = false - - reset, dirtyAccounts = nil, nil - queuedEvents = make(map[common.Address]*txSortedMap) - } - - select { - // Handle stats reporting ticks - case <-report.C: - pool.mu.RLock() - pending, queued := pool.stats() - pool.mu.RUnlock() - stales := int(atomic.LoadInt64(&pool.priced.stales)) - - if pending != prevPending || queued != prevQueued || stales != prevStales { - pool.logger.Debug("Transaction pool status report", "executable", pending, "queued", queued, "stales", stales) - prevPending, prevQueued, prevStales = pending, queued, stales - } - - // Handle inactive account transaction eviction - case <-evict.C: - pool.mu.Lock() - for addr := range pool.queue { - // Any non-locals old enough should be removed - if time.Since(pool.beats[addr]) > pool.config.Lifetime { - list := pool.queue[addr].Flatten() - for _, tx := range list { - pool.removeTx(tx.Hash(), true) - } - } - } - pool.mu.Unlock() - } - } -} - -// Get returns a transaction if it is contained in the pool and nil otherwise. -func (pool *TxPool) Get(hash common.Hash) *types.Transaction { - // TODO: Add tendermint fetching - return pool.all.Get(hash) -} - -// Has returns an indicator whether txpool has a transaction cached with the -// given hash. -func (pool *TxPool) Has(hash common.Hash) bool { - // checking first locals - if tx := pool.all.Get(hash); tx != nil { - return true - } - // attempt to db store - if tx, _ := GetTmTxByHash(hash); tx != nil { - return true - } - return false -} - -func (pool *TxPool) MinGasPrice() *big.Int { - sdkCtx := pool.evmCtx.GetSdkContext() - params := pool.evmkeeper.GetParams(sdkCtx) - minGasPrice := pool.srvCfg.GetMinGasPrices() - amt := minGasPrice.AmountOf(params.EvmDenom).TruncateInt64() - if amt == 0 { - return new(big.Int).SetInt64(stratos.DefaultGasPrice) - } - return new(big.Int).SetInt64(amt) -} - -// stats retrieves the current pool stats, namely the number of pending and the -// number of queued (non-executable) transactions. -func (pool *TxPool) stats() (int, int) { - pending := 0 - for _, list := range pool.pending { - pending += list.Len() - } - queued := 0 - for _, list := range pool.queue { - queued += list.Len() - } - return pending, queued -} - -// validateTx checks whether a transaction is valid according to the consensus -// rules and adheres to some heuristic limits of the local node (price and size). -func (pool *TxPool) validateTx(tx *types.Transaction) error { - sdkCtx := pool.evmCtx.GetSdkContext() - - // Accept only legacy transactions until EIP-2718/2930 activates. - if !tx.Protected() { - return core.ErrTxTypeNotSupported - } - // Reject access list transactions until EIP-2930 activates. - if tx.Type() == types.AccessListTxType { - return core.ErrTxTypeNotSupported - } - // Reject transactions over defined size to prevent DOS attacks - if uint64(tx.Size()) > txMaxSize { - return core.ErrOversizedData - } - // Transactions can't be negative. This may never happen using RLP decoded - // transactions but may occur if you create a transaction using the RPC. - if tx.Value().Sign() < 0 { - return core.ErrNegativeValue - } - // Ensure the transaction doesn't exceed the current block limit gas. - if pool.currentMaxGas < tx.Gas() { - return core.ErrGasLimit - } - // Sanity check for extremely large numbers - if tx.GasFeeCap().BitLen() > 256 { - return core.ErrFeeCapVeryHigh - } - if tx.GasTipCap().BitLen() > 256 { - return core.ErrTipVeryHigh - } - // Ensure gasFeeCap is greater than or equal to gasTipCap. - if tx.GasFeeCapIntCmp(tx.GasTipCap()) < 0 { - return core.ErrTipAboveFeeCap - } - // Make sure the transaction is signed properly. - from, err := types.Sender(pool.signer, tx) - if err != nil { - return core.ErrInvalidSender - } - // Ensure the transaction adheres to nonce ordering - if pool.evmkeeper.GetNonce(sdkCtx, from) > tx.Nonce() { - return core.ErrNonceTooLow - } - // Transactor should have enough funds to cover the costs - // cost == V + GP * GL - if pool.evmkeeper.GetBalance(sdkCtx, from).Cmp(tx.Cost()) < 0 { - return core.ErrInsufficientFunds - } - // Ensure the transaction has more gas than the basic tx fee. - intrGas, err := core.IntrinsicGas(tx.Data(), tx.AccessList(), tx.To() == nil, true, true) - if err != nil { - return err - } - if tx.Gas() < intrGas { - return core.ErrIntrinsicGas - } - return nil -} - -func (pool *TxPool) Add(tx *types.Transaction) (replaced bool, err error) { - pool.mu.Lock() - defer pool.mu.Unlock() - - hash := tx.Hash() - - if pool.Has(hash) { - pool.logger.Debug("Discarding already known transaction", "hash", hash) - return false, core.ErrAlreadyKnown - } - err = pool.validateTx(tx) - if err != nil { - return false, err - } - - // If the transaction pool is full, discard underpriced transactions - if uint64(pool.all.Slots()+numSlots(tx)) > pool.config.GlobalSlots+pool.config.GlobalQueue { - // New transaction is better than our worse ones, make room for it. - // If it's a local transaction, forcibly discard all available transactions. - // Otherwise if we can't make enough room for new one, abort the operation. - drop, _ := pool.priced.Discard(pool.all.Slots()-int(pool.config.GlobalSlots+pool.config.GlobalQueue)+numSlots(tx), true) - - // Kick out the underpriced remote transactions. - for _, tx := range drop { - pool.logger.Debug("Discarding freshly underpriced transaction", "hash", tx.Hash(), "gasTipCap", tx.GasTipCap(), "gasFeeCap", tx.GasFeeCap()) - pool.removeTx(tx.Hash(), false) - } - } - - // Try to replace an existing transaction in the pending pool - from, _ := types.Sender(pool.signer, tx) // already validated - if list := pool.pending[from]; list != nil && list.Overlaps(tx) { - // Nonce already pending, check if required price bump is met - inserted, old := list.Add(tx, pool.config.PriceBump) - if !inserted { - return false, core.ErrReplaceUnderpriced - } - // New transaction is better, replace old one - if old != nil { - pool.all.Remove(old.Hash()) - pool.priced.Removed(1) - } - pool.all.Add(tx, true) - pool.priced.Put(tx, true) - pool.logger.Debug("Pooled new executable transaction", "hash", hash, "from", from, "to", tx.To()) - - // Successful promotion, bump the heartbeat - pool.beats[from] = time.Now() - return old != nil, nil - } - - // New transaction isn't replacing a pending one, push into queue - replaced, err = pool.enqueueTx(hash, tx, true, true) - if err != nil { - return false, err - } - - // Mark local addresses and journal local transactions - if !pool.locals.contains(from) { - pool.logger.Info("Setting new local account", "address", from) - pool.locals.add(from) - } - - pool.logger.Info("Pooled new future transaction", "hash", hash, "from", from, "to", tx.To()) - return replaced, nil -} - -// enqueueTx inserts a new transaction into the non-executable transaction queue. -// -// Note, this method assumes the pool lock is held! -func (pool *TxPool) enqueueTx(hash common.Hash, tx *types.Transaction, local bool, addAll bool) (bool, error) { - // Try to insert the transaction into the future queue - from, _ := types.Sender(pool.signer, tx) // already validated - if pool.queue[from] == nil { - pool.queue[from] = newTxList(false) - } - inserted, old := pool.queue[from].Add(tx, pool.config.PriceBump) - if !inserted { - // An older transaction was better, discard this - return false, core.ErrReplaceUnderpriced - } - // Discard any previous transaction and mark this - if old != nil { - pool.all.Remove(old.Hash()) - pool.priced.Removed(1) - } - // If the transaction isn't in lookup set but it's expected to be there, - // show the error log. - if pool.all.Get(hash) == nil && !addAll { - pool.logger.Error("Missing transaction in lookup set, please report the issue", "hash", hash) - } - if addAll { - pool.all.Add(tx, local) - pool.priced.Put(tx, local) - } - // If we never record the heartbeat, do it right now. - if _, exist := pool.beats[from]; !exist { - pool.beats[from] = time.Now() - } - return old != nil, nil -} - -// removeTx removes a single transaction from the queue, moving all subsequent -// transactions back to the future queue. -func (pool *TxPool) removeTx(hash common.Hash, outofbound bool) { - // Fetch the transaction we wish to delete - tx := pool.all.Get(hash) - if tx == nil { - return - } - addr, _ := types.Sender(pool.signer, tx) // already validated during insertion - - // Remove it from the list of known transactions - pool.all.Remove(hash) - if outofbound { - pool.priced.Removed(1) - } - // Remove the transaction from the pending lists and reset the account nonce - if pending := pool.pending[addr]; pending != nil { - if removed, invalids := pending.Remove(tx); removed { - // If no more pending transactions are left, remove the list - if pending.Empty() { - delete(pool.pending, addr) - } - // Postpone any invalidated transactions - for _, tx := range invalids { - // Internal shuffle shouldn't touch the lookup set. - pool.enqueueTx(tx.Hash(), tx, false, false) - } - // Update the account nonce if needed - pool.pendingNonces.setIfLower(addr, tx.Nonce()) - return - } - } - // Transaction is in the future queue - if future := pool.queue[addr]; future != nil { - future.Remove(tx) - if future.Empty() { - delete(pool.queue, addr) - delete(pool.beats, addr) - } - } -} - -// promoteTx adds a transaction to the pending (processable) list of transactions -// and returns whether it was inserted or an older was better. -// -// Note, this method assumes the pool lock is held! -func (pool *TxPool) promoteTx(addr common.Address, hash common.Hash, tx *types.Transaction) bool { - // Try to insert the transaction into the pending queue - if pool.pending[addr] == nil { - pool.pending[addr] = newTxList(true) - } - list := pool.pending[addr] - - inserted, old := list.Add(tx, pool.config.PriceBump) - if !inserted { - // An older transaction was better, discard this - pool.all.Remove(hash) - pool.priced.Removed(1) - return false - } - // Otherwise discard any previous transaction and mark this - if old != nil { - pool.all.Remove(old.Hash()) - pool.priced.Removed(1) - } - // Set the potentially new pending nonce and notify any subsystems of the new tx - pool.pendingNonces.set(addr, tx.Nonce()+1) - - // Successful promotion, bump the heartbeat - pool.beats[addr] = time.Now() - return true -} - -// addressByHeartbeat is an account address tagged with its last activity timestamp. -type addressByHeartbeat struct { - address common.Address - heartbeat time.Time -} - -type addressesByHeartbeat []addressByHeartbeat - -func (a addressesByHeartbeat) Len() int { return len(a) } -func (a addressesByHeartbeat) Less(i, j int) bool { return a[i].heartbeat.Before(a[j].heartbeat) } -func (a addressesByHeartbeat) Swap(i, j int) { a[i], a[j] = a[j], a[i] } - -// accountSet is simply a set of addresses to check for existence, and a signer -// capable of deriving addresses from transactions. -type accountSet struct { - accounts map[common.Address]struct{} - signer types.Signer - cache *[]common.Address -} - -// newAccountSet creates a new address set with an associated signer for sender -// derivations. -func newAccountSet(signer types.Signer, addrs ...common.Address) *accountSet { - as := &accountSet{ - accounts: make(map[common.Address]struct{}), - signer: signer, - } - for _, addr := range addrs { - as.add(addr) - } - return as -} - -// contains checks if a given address is contained within the set. -func (as *accountSet) contains(addr common.Address) bool { - _, exist := as.accounts[addr] - return exist -} - -// containsTx checks if the sender of a given tx is within the set. If the sender -// cannot be derived, this method returns false. -func (as *accountSet) containsTx(tx *types.Transaction) bool { - if addr, err := types.Sender(as.signer, tx); err == nil { - return as.contains(addr) - } - return false -} - -// add inserts a new address into the set to track. -func (as *accountSet) add(addr common.Address) { - as.accounts[addr] = struct{}{} - as.cache = nil -} - -// addTx adds the sender of tx into the set. -func (as *accountSet) addTx(tx *types.Transaction) { - if addr, err := types.Sender(as.signer, tx); err == nil { - as.add(addr) - } -} - -// flatten returns the list of addresses within this set, also caching it for later -// reuse. The returned slice should not be changed! -func (as *accountSet) flatten() []common.Address { - if as.cache == nil { - accounts := make([]common.Address, 0, len(as.accounts)) - for account := range as.accounts { - accounts = append(accounts, account) - } - as.cache = &accounts - } - return *as.cache -} - -// merge adds all addresses from the 'other' set into 'as'. -func (as *accountSet) merge(other *accountSet) { - for addr := range other.accounts { - as.accounts[addr] = struct{}{} - } - as.cache = nil -} - -// txLookup is used internally by TxPool to track transactions while allowing -// lookup without mutex contention. -// -// Note, although this type is properly protected against concurrent access, it -// is **not** a type that should ever be mutated or even exposed outside of the -// transaction pool, since its internal state is tightly coupled with the pools -// internal mechanisms. The sole purpose of the type is to permit out-of-bound -// peeking into the pool in TxPool.Get without having to acquire the widely scoped -// TxPool.mu mutex. -// -// This lookup set combines the notion of "local transactions", which is useful -// to build upper-level structure. -type txLookup struct { - slots int - lock sync.RWMutex - locals map[common.Hash]*types.Transaction - remotes map[common.Hash]*types.Transaction -} - -// newTxLookup returns a new txLookup structure. -func newTxLookup() *txLookup { - return &txLookup{ - locals: make(map[common.Hash]*types.Transaction), - remotes: make(map[common.Hash]*types.Transaction), - } -} - -// Range calls f on each key and value present in the map. The callback passed -// should return the indicator whether the iteration needs to be continued. -// Callers need to specify which set (or both) to be iterated. -func (t *txLookup) Range(f func(hash common.Hash, tx *types.Transaction, local bool) bool, local bool, remote bool) { - t.lock.RLock() - defer t.lock.RUnlock() - - if local { - for key, value := range t.locals { - if !f(key, value, true) { - return - } - } - } - if remote { - for key, value := range t.remotes { - if !f(key, value, false) { - return - } - } - } -} - -// Get returns a transaction if it exists in the lookup, or nil if not found. -func (t *txLookup) Get(hash common.Hash) *types.Transaction { - t.lock.RLock() - defer t.lock.RUnlock() - - if tx := t.locals[hash]; tx != nil { - return tx - } - return t.remotes[hash] -} - -// GetLocal returns a transaction if it exists in the lookup, or nil if not found. -func (t *txLookup) GetLocal(hash common.Hash) *types.Transaction { - t.lock.RLock() - defer t.lock.RUnlock() - - return t.locals[hash] -} - -// GetRemote returns a transaction if it exists in the lookup, or nil if not found. -func (t *txLookup) GetRemote(hash common.Hash) *types.Transaction { - t.lock.RLock() - defer t.lock.RUnlock() - - return t.remotes[hash] -} - -// Count returns the current number of transactions in the lookup. -func (t *txLookup) Count() int { - t.lock.RLock() - defer t.lock.RUnlock() - - return len(t.locals) + len(t.remotes) -} - -// LocalCount returns the current number of local transactions in the lookup. -func (t *txLookup) LocalCount() int { - t.lock.RLock() - defer t.lock.RUnlock() - - return len(t.locals) -} - -// RemoteCount returns the current number of remote transactions in the lookup. -func (t *txLookup) RemoteCount() int { - t.lock.RLock() - defer t.lock.RUnlock() - - return len(t.remotes) -} - -// Slots returns the current number of slots used in the lookup. -func (t *txLookup) Slots() int { - t.lock.RLock() - defer t.lock.RUnlock() - - return t.slots -} - -// Add adds a transaction to the lookup. -func (t *txLookup) Add(tx *types.Transaction, local bool) { - t.lock.Lock() - defer t.lock.Unlock() - - t.slots += numSlots(tx) - - if local { - t.locals[tx.Hash()] = tx - } else { - t.remotes[tx.Hash()] = tx - } -} - -// Remove removes a transaction from the lookup. -func (t *txLookup) Remove(hash common.Hash) { - t.lock.Lock() - defer t.lock.Unlock() - - tx, ok := t.locals[hash] - if !ok { - tx, ok = t.remotes[hash] - } - if !ok { - return - } - t.slots -= numSlots(tx) - - delete(t.locals, hash) - delete(t.remotes, hash) -} - -// RemoteToLocals migrates the transactions belongs to the given locals to locals -// set. The assumption is held the locals set is thread-safe to be used. -func (t *txLookup) RemoteToLocals(locals *accountSet) int { - t.lock.Lock() - defer t.lock.Unlock() - - var migrated int - for hash, tx := range t.remotes { - if locals.containsTx(tx) { - t.locals[hash] = tx - delete(t.remotes, hash) - migrated += 1 - } - } - return migrated -} - -// RemotesBelowTip finds all remote transactions below the given tip threshold. -func (t *txLookup) RemotesBelowTip(threshold *big.Int) types.Transactions { - found := make(types.Transactions, 0, 128) - t.Range(func(hash common.Hash, tx *types.Transaction, local bool) bool { - if tx.GasTipCapIntCmp(threshold) < 0 { - found = append(found, tx) - } - return true - }, false, true) // Only iterate remotes - return found -} - -// numSlots calculates the number of slots needed for a single transaction. -func numSlots(tx *types.Transaction) int { - return int((tx.Size() + txSlotSize - 1) / txSlotSize) -} diff --git a/x/evm/pool/tx_pool.go b/x/evm/pool/tx_pool.go index 5d81a9a5..7bbe900d 100644 --- a/x/evm/pool/tx_pool.go +++ b/x/evm/pool/tx_pool.go @@ -1,6 +1,7 @@ package pool import ( + "fmt" "math/big" "sync" "time" @@ -9,13 +10,12 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/log" "github.com/stratosnet/stratos-chain/server/config" stratos "github.com/stratosnet/stratos-chain/types" - "github.com/stratosnet/stratos-chain/x/evm" + evm "github.com/stratosnet/stratos-chain/x/evm" evmkeeper "github.com/stratosnet/stratos-chain/x/evm/keeper" evmtypes "github.com/stratosnet/stratos-chain/x/evm/types" - abci "github.com/tendermint/tendermint/abci/types" - "github.com/tendermint/tendermint/libs/log" mempl "github.com/tendermint/tendermint/mempool" ) @@ -34,6 +34,7 @@ const ( ) var ( + initInterval = 5 * time.Second // Time interval to prepare some after tendermint initializations evictionInterval = time.Minute // Time interval to check for evictable transactions statsReportInterval = 8 * time.Second // Time interval to report transaction pool stats processQueueInterval = 5 * time.Second // Time interval to process queue transactions in case if their ready and move to pending stage @@ -44,6 +45,9 @@ type txpoolResetRequest struct { oldHead, newHead *types.Header } +// TxPool contains all currently known transactions. Transactions +// enter the pool when they are received from the local network or submitted +// locally. They exit the pool when they are included in the blockchain. type TxPool struct { config core.TxPoolConfig srvCfg config.Config @@ -53,6 +57,7 @@ type TxPool struct { signer types.Signer mempool mempl.Mempool mu sync.RWMutex + isReady bool // show the status for workload of the pool evmkeeper *evmkeeper.Keeper // Active keeper to get current state pendingNonces *txNoncer // Pending state tracking virtual nonces @@ -65,34 +70,65 @@ type TxPool struct { all *txLookup // All transactions to allow lookups } -func NewTxPool(config core.TxPoolConfig, srvCfg config.Config, logger log.Logger, clientCtx client.Context, mempool mempl.Mempool, evmkeeper *evmkeeper.Keeper, evmCtx *evm.Context) (*TxPool, error) { +// NewTxPool creates a new transaction pool to gather, sort and filter inbound +// transactions from the network. +func NewTxPool(config core.TxPoolConfig, srvCfg config.Config, clientCtx client.Context, mempool mempl.Mempool, evmkeeper *evmkeeper.Keeper, evmCtx *evm.Context) *TxPool { sdkCtx := evmCtx.GetSdkContext() params := evmkeeper.GetParams(sdkCtx) - gasLimit, err := BlockMaxGasFromConsensusParams(nil) - if err != nil { - return nil, err - } pool := &TxPool{ - config: config, - srvCfg: srvCfg, - logger: logger, - clientCtx: clientCtx, - evmCtx: evmCtx, - signer: types.LatestSignerForChainID(params.ChainConfig.ChainID.BigInt()), - mempool: mempool, - evmkeeper: evmkeeper, - currentMaxGas: uint64(gasLimit), - beats: make(map[common.Address]time.Time), - pending: make(map[common.Address]*txList), - queue: make(map[common.Address]*txList), - all: newTxLookup(), + config: config, + srvCfg: srvCfg, + clientCtx: clientCtx, + evmCtx: evmCtx, + signer: types.LatestSignerForChainID(params.ChainConfig.ChainID.BigInt()), + mempool: mempool, + evmkeeper: evmkeeper, + beats: make(map[common.Address]time.Time), + pending: make(map[common.Address]*txList), + queue: make(map[common.Address]*txList), + all: newTxLookup(), } pool.pendingNonces = newTxNoncer(pool.evmCtx, pool.evmkeeper) + go pool.prepare() go pool.eventLoop() - return pool, nil + return pool } +// prepare executed only once and only for some dynamic initializations +func (pool *TxPool) prepare() { + if pool.isReady { + return + } + + var ( + init = time.NewTicker(initInterval) + result = make(chan int64, 1) + ) + defer init.Stop() + + for { + select { + case gasLimit := <-result: + // setting pool dynamic vars + pool.currentMaxGas = uint64(gasLimit) + pool.isReady = true + log.Debug("Tx pool ready") + return + + // Handle init prepare + case <-init.C: + gasLimit, err := evmtypes.BlockMaxGasFromConsensusParams(nil) + if err != nil { + log.Error(err.Error()) + break + } + result <- gasLimit + } + } +} + +// eventLoop starting a main logic of tx pool, orchaestrator of queues func (pool *TxPool) eventLoop() { var ( prevPending, prevQueued int @@ -105,17 +141,22 @@ func (pool *TxPool) eventLoop() { defer report.Stop() defer evict.Stop() defer processQueue.Stop() + defer processPending.Stop() for { select { // Handle stats reporting ticks + // NOTE: Took some example from go ethereum, however it could be enabled only during for debuging, + // so performance should be better without, but let's keep at least for now in order to watch how it will + // work with tm pool case <-report.C: pool.mu.RLock() pending, queued := pool.stats() + total := pool.all.Count() pool.mu.RUnlock() if pending != prevPending || queued != prevQueued { - pool.logger.Error("Transaction pool status report", "executable", pending, "queued", queued) + log.Debug("Transaction pool status report", "executable", pending, "queued", queued, "total", total) prevPending, prevQueued = pending, queued } @@ -133,11 +174,13 @@ func (pool *TxPool) eventLoop() { } pool.mu.Unlock() + // Handle queue processing and moving to a next step case <-processQueue.C: pool.mu.Lock() pool.processQueue() pool.mu.Unlock() + // Handle pending queue as a last process step before tm mempool execution case <-processPending.C: pool.mu.Lock() pool.processPending() @@ -159,7 +202,7 @@ func (pool *TxPool) Has(hash common.Hash) bool { return true } // attempt to db store - if tx, _ := GetTmTxByHash(hash); tx != nil { + if tx, _ := evmtypes.GetTmTxByHash(hash); tx != nil { return true } return false @@ -176,6 +219,15 @@ func (pool *TxPool) MinGasPrice() *big.Int { return new(big.Int).SetInt64(amt) } +// Nonce returns the next nonce of an account, with all transactions executable +// by the pool already applied on top. +func (pool *TxPool) Nonce(addr common.Address) uint64 { + pool.mu.RLock() + defer pool.mu.RUnlock() + + return pool.pendingNonces.get(addr) +} + // stats retrieves the current pool stats, namely the number of pending and the // number of queued (non-executable) transactions. func (pool *TxPool) stats() (int, int) { @@ -193,7 +245,7 @@ func (pool *TxPool) stats() (int, int) { // validateTx checks whether a transaction is valid according to the consensus // rules and adheres to some heuristic limits of the local node (price and size). func (pool *TxPool) validateTx(tx *types.Transaction) error { - pool.logger.Error("Validating tx", "hash", tx.Hash()) + log.Trace("Validating tx", "hash", tx.Hash()) sdkCtx := pool.evmCtx.GetSdkContext() // Accept only legacy transactions until EIP-2718/2930 activates. @@ -253,57 +305,64 @@ func (pool *TxPool) validateTx(tx *types.Transaction) error { return nil } -func (pool *TxPool) broadcast(tx *types.Transaction) error { - pool.logger.Error("Preparing to broadcast tx", "hash", tx.Hash()) +// broadcastTx inserts a new transaction into the tendermint mempool and propagate +// +// Note, this method assumes the pool lock is held! +func (pool *TxPool) broadcastTx(tx *types.Transaction) error { + log.Trace("Preparing to broadcast tx", "hash", tx.Hash()) ethereumTx := &evmtypes.MsgEthereumTx{} if err := ethereumTx.FromEthereumTx(tx); err != nil { - pool.logger.Error("transaction converting failed", "error", err.Error()) + log.Trace("transaction converting failed", "error", err.Error()) return err } params := pool.evmkeeper.GetParams(pool.evmCtx.GetSdkContext()) cosmosTx, err := ethereumTx.BuildTx(pool.clientCtx.TxConfig.NewTxBuilder(), params.EvmDenom) if err != nil { - pool.logger.Error("failed to build cosmos tx", "error", err.Error()) + log.Trace("failed to build cosmos tx", "error", err.Error()) return err } // Encode transaction by default Tx encoder packet, err := pool.clientCtx.TxConfig.TxEncoder()(cosmosTx) if err != nil { - pool.logger.Error("failed to encode eth tx using default encoder", "error", err.Error()) + log.Trace("failed to encode eth tx using default encoder", "error", err.Error()) return err } - done := make(chan struct{}, 1) - err = pool.mempool.CheckTx(packet, func(res *abci.Response) { - done <- struct{}{} - }, mempl.TxInfo{}) + err = pool.mempool.CheckTx(packet, nil, mempl.TxInfo{}) if err != nil { - pool.logger.Error("failed to send eth tx packet to mempool", "error", err.Error()) + log.Trace("failed to send eth tx packet to mempool", "error", err.Error()) return err } - <-done // to be sure that checkTx executed, so we could clear tx from pending and all return nil } +// Add validates a transaction and inserts it into the non-executable queue for later +// pending promotion and execution. If the transaction is a replacement for an already +// pending or queued one, it overwrites the previous transaction if its price is higher. func (pool *TxPool) Add(tx *types.Transaction) (replaced bool, err error) { + if !pool.isReady { + return false, fmt.Errorf("Tx pool is not loaded yet") + } + pool.mu.Lock() defer pool.mu.Unlock() hash := tx.Hash() if pool.Has(hash) { - pool.logger.Error("Discarding already known transaction", "hash", hash) + log.Trace("Discarding already known transaction", "hash", hash) return false, core.ErrAlreadyKnown } err = pool.validateTx(tx) if err != nil { return false, err } + // Try to replace an existing transaction in the pending pool from, _ := types.Sender(pool.signer, tx) // already validated if list := pool.pending[from]; list != nil && list.Overlaps(tx) { - pool.logger.Error("Tx overlap: ", tx.Hash()) + log.Trace("Tx overlap", "hash", tx.Hash()) // Nonce already pending, check if required price bump is met inserted, old := list.Add(tx, pool.config.PriceBump) if !inserted { @@ -326,7 +385,7 @@ func (pool *TxPool) Add(tx *types.Transaction) (replaced bool, err error) { // // Note, this method assumes the pool lock is held! func (pool *TxPool) enqueueTx(tx *types.Transaction, addAll bool) (bool, error) { - pool.logger.Error("Tx enqeue: ", tx.Hash()) + log.Trace("Tx enqeue", "hash", tx.Hash()) from, _ := types.Sender(pool.signer, tx) // already validated if pool.queue[from] == nil { pool.queue[from] = newTxList(false) @@ -344,16 +403,22 @@ func (pool *TxPool) enqueueTx(tx *types.Transaction, addAll bool) (bool, error) pool.beats[from] = time.Now() } + // Set the potentially new pending nonce and notify any subsystems of the new tx + pool.pendingNonces.set(from, tx.Nonce()+1) + return old != nil, nil } // removeTx removes a single transaction from the queue, moving all subsequent // transactions back to the future queue. +// +// Note, this method assumes the pool lock is held! func (pool *TxPool) removeTx(hash common.Hash) { - pool.logger.Error("Tx remove: ", hash) + log.Error("Tx remove", "hash", hash) // Fetch the transaction we wish to delete tx := pool.Get(hash) if tx == nil { + log.Error("Tx not found during removal", "hash", hash) return } addr, _ := types.Sender(pool.signer, tx) // already validated during insertion @@ -380,7 +445,9 @@ func (pool *TxPool) removeTx(hash common.Hash) { // Transaction is in the future queue if future := pool.queue[addr]; future != nil { future.Remove(tx) + log.Error("Removing tx from future list", "hash", hash, "addr", addr, "future", future) if future.Empty() { + log.Error("Futures empty, cleaning", "hash", hash, "addr", addr) delete(pool.queue, addr) delete(pool.beats, addr) } @@ -402,8 +469,6 @@ func (pool *TxPool) processQueue() error { nonces[addr] = highestPending.Nonce() + 1 } pool.pendingNonces.setAll(nonces) - pool.truncatePending() - pool.truncateQueue() return nil } @@ -420,11 +485,13 @@ func (pool *TxPool) processPending() error { } readies := list.Ready(pool.pendingNonces.get(addr)) for _, tx := range readies { - if err := pool.broadcast(tx); err != nil { - pool.all.Remove(tx.Hash()) + err := pool.broadcastTx(tx) + if err != nil { + pool.logger.Error("Broadcast failed", "error", err) } + pool.all.Remove(tx.Hash()) } - pool.logger.Error("Processes pending transactions", "count", len(readies)) + log.Trace("Processed pending transactions", "count", len(readies)) if list.Empty() { delete(pool.pending, addr) @@ -455,14 +522,14 @@ func (pool *TxPool) promoteExecutables(accounts []common.Address) []*types.Trans hash := tx.Hash() pool.all.Remove(hash) } - pool.logger.Error("Removed old queued transactions", "count", len(forwards)) + log.Trace("Removed old queued transactions", "count", len(forwards)) // Drop all transactions that are too costly (low balance or out of gas) drops, _ := list.Filter(pool.evmkeeper.GetBalance(sdkCtx, addr), pool.currentMaxGas) for _, tx := range drops { hash := tx.Hash() pool.all.Remove(hash) } - pool.logger.Error("Removed unpayable queued transactions", "count", len(drops)) + log.Trace("Removed unpayable queued transactions", "count", len(drops)) // Gather all executable transactions and promote them readies := list.Ready(pool.pendingNonces.get(addr)) @@ -471,19 +538,8 @@ func (pool *TxPool) promoteExecutables(accounts []common.Address) []*types.Trans promoted = append(promoted, tx) } } - pool.logger.Error("Promoted queued transactions", "count", len(promoted)) - - // TODO: Figure out what to do with this - // // Drop all transactions over the allowed limit - // var caps types.Transactions - // if !pool.locals.contains(addr) { - // caps = list.Cap(int(pool.config.AccountQueue)) - // for _, tx := range caps { - // hash := tx.Hash() - // pool.all.Remove(hash) - // pool.logger.Error("Removed cap-exceeding queued transaction", "hash", hash) - // } - // } + log.Trace("Promoted queued transactions", "count", len(promoted)) + // Delete the entire queue entry if it became empty. if list.Empty() { delete(pool.queue, addr) @@ -511,19 +567,19 @@ func (pool *TxPool) demoteUnexecutables() { for _, tx := range olds { hash := tx.Hash() pool.all.Remove(hash) - pool.logger.Error("Removed old pending transaction", "hash", hash) + log.Trace("Removed old pending transaction", "hash", hash) } // Drop all transactions that are too costly (low balance or out of gas), and queue any invalids back for later drops, invalids := list.Filter(pool.evmkeeper.GetBalance(sdkCtx, addr), pool.currentMaxGas) for _, tx := range drops { hash := tx.Hash() - pool.logger.Error("Removed unpayable pending transaction", "hash", hash) + log.Trace("Removed unpayable pending transaction", "hash", hash) pool.all.Remove(hash) } for _, tx := range invalids { hash := tx.Hash() - pool.logger.Error("Demoting pending transaction", "hash", hash) + log.Trace("Demoting pending transaction", "hash", hash) // Internal shuffle shouldn't touch the lookup set. pool.enqueueTx(tx, false) @@ -533,7 +589,7 @@ func (pool *TxPool) demoteUnexecutables() { gapped := list.Cap(0) for _, tx := range gapped { hash := tx.Hash() - pool.logger.Error("Demoting invalidated transaction", "hash", hash) + log.Trace("Demoting invalidated transaction", "hash", hash) // Internal shuffle shouldn't touch the lookup set. pool.enqueueTx(tx, false) @@ -551,7 +607,7 @@ func (pool *TxPool) demoteUnexecutables() { // // Note, this method assumes the pool lock is held! func (pool *TxPool) promoteTx(addr common.Address, tx *types.Transaction) bool { - pool.logger.Error("Preparing to promote tx", "hash", tx.Hash()) + log.Trace("Preparing to promote tx", "hash", tx.Hash()) // Try to insert the transaction into the pending queue if pool.pending[addr] == nil { pool.pending[addr] = newTxList(true) @@ -568,38 +624,8 @@ func (pool *TxPool) promoteTx(addr common.Address, tx *types.Transaction) bool { if old != nil { pool.all.Remove(old.Hash()) } - // Set the potentially new pending nonce and notify any subsystems of the new tx - pool.pendingNonces.set(addr, tx.Nonce()+1) // Successful promotion, bump the heartbeat pool.beats[addr] = time.Now() return true } - -// truncatePending removes transactions from the pending queue if the pool is above the -// pending limit. The algorithm tries to reduce transaction counts by an approximately -// equal number for all for accounts with many pending transactions. -func (pool *TxPool) truncatePending() { - pending := uint64(0) - for _, list := range pool.pending { - pending += uint64(list.Len()) - } - if pending <= pool.config.GlobalSlots { - return - } - // TODO: Add spammer check mechanics - return -} - -// truncateQueue drops the oldest transactions in the queue if the pool is above the global queue limit. -func (pool *TxPool) truncateQueue() { - queued := uint64(0) - for _, list := range pool.queue { - queued += uint64(list.Len()) - } - if queued <= pool.config.GlobalQueue { - return - } - // TODO: Implement - return -} diff --git a/x/evm/pool/utils.go b/x/evm/pool/utils.go deleted file mode 100644 index 8443aff8..00000000 --- a/x/evm/pool/utils.go +++ /dev/null @@ -1,46 +0,0 @@ -package pool - -import ( - "fmt" - - "github.com/ethereum/go-ethereum/common" - "github.com/pkg/errors" - "github.com/stratosnet/stratos-chain/x/evm/types" - tmrpccore "github.com/tendermint/tendermint/rpc/core" - tmrpctypes "github.com/tendermint/tendermint/rpc/core/types" - tmjsonrpctypes "github.com/tendermint/tendermint/rpc/jsonrpc/types" -) - -func GetTmTxByHash(hash common.Hash) (*tmrpctypes.ResultTx, error) { - resTx, err := tmrpccore.Tx(nil, hash.Bytes(), false) - if err != nil { - query := fmt.Sprintf("%s.%s='%s'", types.TypeMsgEthereumTx, types.AttributeKeyEthereumTxHash, hash.Hex()) - resTxs, err := tmrpccore.TxSearch(new(tmjsonrpctypes.Context), query, false, nil, nil, "") - if err != nil { - return nil, err - } - if len(resTxs.Txs) == 0 { - return nil, errors.Errorf("ethereum tx not found for hash %s", hash.Hex()) - } - return resTxs.Txs[0], nil - } - return resTx, nil -} - -// BlockMaxGasFromConsensusParams returns the gas limit for the current block from the chain consensus params. -func BlockMaxGasFromConsensusParams(blockHeight *int64) (int64, error) { - resConsParams, err := tmrpccore.ConsensusParams(nil, blockHeight) - if err != nil { - return int64(^uint32(0)), err - } - - gasLimit := resConsParams.ConsensusParams.Block.MaxGas - if gasLimit == -1 { - // Sets gas limit to max uint32 to not error with javascript dev tooling - // This -1 value indicating no block gas limit is set to max uint64 with geth hexutils - // which errors certain javascript dev tooling which only supports up to 53 bits - gasLimit = int64(^uint32(0)) - } - - return gasLimit, nil -} diff --git a/x/evm/types/utils.go b/x/evm/types/utils.go index 16b1c780..9c47f5de 100644 --- a/x/evm/types/utils.go +++ b/x/evm/types/utils.go @@ -11,6 +11,11 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" + + "github.com/pkg/errors" + tmrpccore "github.com/tendermint/tendermint/rpc/core" + tmrpctypes "github.com/tendermint/tendermint/rpc/core/types" + tmjsonrpctypes "github.com/tendermint/tendermint/rpc/jsonrpc/types" ) const maxBitLen = 256 @@ -105,3 +110,38 @@ func SafeNewIntFromBigInt(i *big.Int) (sdk.Int, error) { func IsValidInt256(i *big.Int) bool { return i == nil || i.BitLen() <= maxBitLen } + +// GetTmTxByHash return result tx in according of dynamic tx searching +func GetTmTxByHash(hash common.Hash) (*tmrpctypes.ResultTx, error) { + resTx, err := tmrpccore.Tx(nil, hash.Bytes(), false) + if err != nil { + query := fmt.Sprintf("%s.%s='%s'", TypeMsgEthereumTx, AttributeKeyEthereumTxHash, hash.Hex()) + resTxs, err := tmrpccore.TxSearch(new(tmjsonrpctypes.Context), query, false, nil, nil, "") + if err != nil { + return nil, err + } + if len(resTxs.Txs) == 0 { + return nil, errors.Errorf("ethereum tx not found for hash %s", hash.Hex()) + } + return resTxs.Txs[0], nil + } + return resTx, nil +} + +// BlockMaxGasFromConsensusParams returns the gas limit for the current block from the chain consensus params. +func BlockMaxGasFromConsensusParams(blockHeight *int64) (int64, error) { + resConsParams, err := tmrpccore.ConsensusParams(nil, blockHeight) + if err != nil { + return int64(^uint32(0)), err + } + + gasLimit := resConsParams.ConsensusParams.Block.MaxGas + if gasLimit == -1 { + // Sets gas limit to max uint32 to not error with javascript dev tooling + // This -1 value indicating no block gas limit is set to max uint64 with geth hexutils + // which errors certain javascript dev tooling which only supports up to 53 bits + gasLimit = int64(^uint32(0)) + } + + return gasLimit, nil +} From 86eb58143d8cfb240767a16a6d30e045f5265fed Mon Sep 17 00:00:00 2001 From: Xiong Date: Fri, 24 Feb 2023 13:56:14 -0500 Subject: [PATCH 24/95] add param validation --- x/pot/types/params.go | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/x/pot/types/params.go b/x/pot/types/params.go index 5e1e9834..86af629c 100644 --- a/x/pot/types/params.go +++ b/x/pot/types/params.go @@ -35,7 +35,6 @@ func ParamKeyTable() paramtypes.KeyTable { return paramtypes.NewKeyTable().RegisterParamSet(&Params{}) } -// // NewParams creates a new Params object func NewParams(bondDenom string, rewardDenom string, matureEpoch int64, miningRewardParams []*MiningRewardParam, communityTax sdk.Dec) Params { return Params{ @@ -156,6 +155,17 @@ func validateMatureEpoch(i interface{}) error { } func validateMiningRewardParams(i interface{}) error { + v, ok := i.([]MiningRewardParam) + if !ok { + return fmt.Errorf("invalid parameter type: %T", i) + } + + for _, p := range v { + sumOfPercentage := p.BlockChainPercentageInBp.Int64() + p.MetaNodePercentageInBp.Int64() + p.ResourceNodePercentageInBp.Int64() + if sumOfPercentage != 10000 { + return fmt.Errorf("sum of block_chain_percentage_in_bp, resource_node_percentage_in_bp, meta_node_percentage_in_bp must be 10000: %v", sumOfPercentage) + } + } return nil } @@ -188,6 +198,9 @@ func (p Params) ValidateBasic() error { if err := validateMatureEpoch(p.MatureEpoch); err != nil { return sdkerrors.Wrap(ErrMatureEpoch, "failed to validate mature epoch") } + if err := validateMiningRewardParams(p.MiningRewardParams); err != nil { + return sdkerrors.Wrap(ErrMatureEpoch, "failed to validate mining reward params") + } if err := validateCommunityTax(p.CommunityTax); err != nil { return sdkerrors.Wrap(ErrMatureEpoch, "failed to validate community tax") } From 201f2ee25f125083c3ae011b6a8b3e410482e4d1 Mon Sep 17 00:00:00 2001 From: Xiong Date: Fri, 24 Feb 2023 14:06:31 -0500 Subject: [PATCH 25/95] conflict solve --- proto/stratos/register/v1/genesis.proto | 4 +- proto/stratos/register/v1/register.proto | 4 +- proto/stratos/register/v1/tx.proto | 10 +- x/register/keeper/msg_server.go | 1 + x/register/types/register.pb.go | 236 +++++---- x/register/types/tx.pb.go | 644 ++++++++++++++++++++--- 6 files changed, 714 insertions(+), 185 deletions(-) diff --git a/proto/stratos/register/v1/genesis.proto b/proto/stratos/register/v1/genesis.proto index 4c23c325..ac43efc2 100644 --- a/proto/stratos/register/v1/genesis.proto +++ b/proto/stratos/register/v1/genesis.proto @@ -41,10 +41,10 @@ message GenesisState { } message GenesisMetaNode { - string network_address = 1 [ + string network_address = 1 [ (gogoproto.moretags) = "yaml:\"network_address\"" ]; // network address of the meta node - google.protobuf.Any pubkey = 2 [ + google.protobuf.Any pubkey = 2 [ (cosmos_proto.accepts_interface) = "cosmos.crypto.PubKey", (gogoproto.moretags) = "yaml:\"pubkey\"" ]; // the consensus public key of the meta node; bech encoded in JSON diff --git a/proto/stratos/register/v1/register.proto b/proto/stratos/register/v1/register.proto index 99996797..8c892e2e 100644 --- a/proto/stratos/register/v1/register.proto +++ b/proto/stratos/register/v1/register.proto @@ -81,9 +81,9 @@ message ResourceNode { (gogoproto.jsontag) = "node_type", (gogoproto.moretags) = "yaml:\"node_type\"" ]; - string effective_tokens = 10 [ + string effective_tokens = 10 [ (gogoproto.nullable) = false, - (gogoproto.jsontag) = "effective_tokens", + (gogoproto.jsontag) = "effective_tokens", (gogoproto.moretags) = "yaml:\"effective_tokens\"", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int" ]; diff --git a/proto/stratos/register/v1/tx.proto b/proto/stratos/register/v1/tx.proto index 6126c6de..93e816e3 100644 --- a/proto/stratos/register/v1/tx.proto +++ b/proto/stratos/register/v1/tx.proto @@ -217,21 +217,21 @@ message MsgUpdateResourceNodeStakeResponse {} message MsgUpdateEffectiveStake { option (gogoproto.goproto_getters) = false; - repeated string reporters = 1 [ + repeated string reporters = 1 [ (gogoproto.jsontag) = "reporters", (gogoproto.moretags) = "yaml:\"reporters\"" ]; - repeated string reporter_owner = 2 [ + repeated string reporter_owner = 2 [ (gogoproto.jsontag) = "reporter_owner", (gogoproto.moretags) = "yaml:\"reporter_owner\"" ]; - string network_address = 3 [ + string network_address = 3 [ (gogoproto.jsontag) = "network_address", (gogoproto.moretags) = "yaml:\"network_address\"" ]; - string effective_tokens = 4 [ + string effective_tokens = 4 [ (gogoproto.nullable) = false, - (gogoproto.jsontag) = "effective_tokens", + (gogoproto.jsontag) = "effective_tokens", (gogoproto.moretags) = "yaml:\"effective_tokens\"", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int" ]; diff --git a/x/register/keeper/msg_server.go b/x/register/keeper/msg_server.go index 7eebf2b1..6e4e5a8e 100644 --- a/x/register/keeper/msg_server.go +++ b/x/register/keeper/msg_server.go @@ -3,6 +3,7 @@ package keeper import ( "context" "encoding/hex" + "errors" "strconv" "time" diff --git a/x/register/types/register.pb.go b/x/register/types/register.pb.go index f347e158..4e034bfd 100644 --- a/x/register/types/register.pb.go +++ b/x/register/types/register.pb.go @@ -110,15 +110,16 @@ func (m *Params) GetResourceNodeRegEnabled() bool { } type ResourceNode struct { - NetworkAddress string `protobuf:"bytes,1,opt,name=network_address,json=networkAddress,proto3" json:"network_address" yaml:"network_address"` - Pubkey *types.Any `protobuf:"bytes,2,opt,name=pubkey,proto3" json:"pubkey" yaml:"pubkey"` - Suspend bool `protobuf:"varint,3,opt,name=suspend,proto3" json:"suspend" yaml:"suspend"` - Status types1.BondStatus `protobuf:"varint,4,opt,name=status,proto3,enum=cosmos.staking.v1beta1.BondStatus" json:"status" yaml:"status"` - Tokens github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,5,opt,name=tokens,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"tokens" yaml:"tokens"` - OwnerAddress string `protobuf:"bytes,6,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address" yaml:"owner_address"` - Description *Description `protobuf:"bytes,7,opt,name=description,proto3" json:"description" yaml:"description"` - CreationTime time.Time `protobuf:"bytes,8,opt,name=creation_time,json=creationTime,proto3,stdtime" json:"creation_time" yaml:"creation_time"` - NodeType uint32 `protobuf:"varint,9,opt,name=node_type,json=nodeType,proto3" json:"node_type" yaml:"node_type"` + NetworkAddress string `protobuf:"bytes,1,opt,name=network_address,json=networkAddress,proto3" json:"network_address" yaml:"network_address"` + Pubkey *types.Any `protobuf:"bytes,2,opt,name=pubkey,proto3" json:"pubkey" yaml:"pubkey"` + Suspend bool `protobuf:"varint,3,opt,name=suspend,proto3" json:"suspend" yaml:"suspend"` + Status types1.BondStatus `protobuf:"varint,4,opt,name=status,proto3,enum=cosmos.staking.v1beta1.BondStatus" json:"status" yaml:"status"` + Tokens github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,5,opt,name=tokens,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"tokens" yaml:"tokens"` + OwnerAddress string `protobuf:"bytes,6,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address" yaml:"owner_address"` + Description *Description `protobuf:"bytes,7,opt,name=description,proto3" json:"description" yaml:"description"` + CreationTime time.Time `protobuf:"bytes,8,opt,name=creation_time,json=creationTime,proto3,stdtime" json:"creation_time" yaml:"creation_time"` + NodeType uint32 `protobuf:"varint,9,opt,name=node_type,json=nodeType,proto3" json:"node_type" yaml:"node_type"` + EffectiveTokens github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,10,opt,name=effective_tokens,json=effectiveTokens,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"effective_tokens" yaml:"effective_tokens"` } func (m *ResourceNode) Reset() { *m = ResourceNode{} } @@ -578,89 +579,91 @@ func init() { } var fileDescriptor_fef1e3aeec8499d6 = []byte{ - // 1298 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x57, 0xcf, 0x6f, 0x1b, 0xc5, - 0x17, 0x8f, 0x93, 0x36, 0xb1, 0xc7, 0xf9, 0xd1, 0xef, 0x36, 0xea, 0xd7, 0x29, 0xc5, 0xe3, 0x0e, - 0x85, 0x06, 0x89, 0xd8, 0x4a, 0x8b, 0x84, 0xe8, 0x01, 0xa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1, 0x63, 0x16, 0x12, 0x3f, 0x25, 0x03, 0x9f, - 0xc4, 0xb8, 0x3f, 0x24, 0x61, 0xeb, 0x64, 0xa7, 0xb6, 0x59, 0x77, 0x2f, 0x94, 0x75, 0x1f, 0xeb, - 0x8a, 0xbc, 0x33, 0x86, 0xbb, 0xcd, 0x42, 0xe2, 0x91, 0xc1, 0x0d, 0x4d, 0xfc, 0xb4, 0x08, 0x96, - 0x3d, 0x8b, 0x72, 0xee, 0x80, 0xb5, 0x98, 0x88, 0xfb, 0x2c, 0xdd, 0xf7, 0x71, 0x18, 0xa6, 0x84, - 0x73, 0x2d, 0xa9, 0xad, 0x49, 0x06, 0xab, 0x54, 0x9e, 0xc1, 0x33, 0x2a, 0x75, 0x85, 0x40, 0xde, - 0xaa, 0x46, 0xae, 0x2a, 0xc0, 0xc1, 0x60, 0x31, 0x19, 0xf5, 0xf7, 0xc9, 0x58, 0xab, 0x69, 0xfd, - 0x48, 0xab, 0xae, 0xc6, 0x63, 0xf7, 0xf2, 0x24, 0x83, 0xda, 0x2f, 0xcf, 0xe0, 0x8a, 0x8a, 0xad, - 0x6c, 0xf4, 0xe4, 0xc7, 0xad, 0x75, 0x3d, 0x29, 0x41, 0x3a, 0x4e, 0x04, 0xeb, 0xee, 0x8c, 0xfa, - 0x9f, 0x91, 0xb1, 0xa7, 0x37, 0x38, 0x1f, 0x80, 0x25, 0x3e, 0xe2, 0x09, 0x89, 0x43, 0x29, 0x87, - 0xba, 0xfb, 0xe6, 0x24, 0x83, 0x06, 0xca, 0x33, 0xb8, 0xaa, 0xc2, 0x69, 0x00, 0x79, 0x86, 0x72, - 0xee, 0x82, 0x45, 0x2e, 0xb0, 0x18, 0xa9, 0x96, 0xad, 0x5e, 0x42, 0x5d, 0x9d, 0xc7, 0xcc, 0x9c, - 0x9e, 0xc1, 0xae, 0xcb, 0xe2, 0xf0, 0x4b, 0xe9, 0xe9, 0xbe, 0x51, 0x54, 0xaa, 0x76, 0x95, 0x95, - 0x2a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xf9, 0x9f, 0x5e, 0x27, 0x7b, 0x84, 0x0e, 0xf6, 0x84, 0xfc, 0x24, 0x0b, 0x6a, - 0xfe, 0x2b, 0x54, 0x39, 0xff, 0x15, 0x02, 0x79, 0xab, 0x06, 0xf9, 0x54, 0x02, 0xce, 0x01, 0x58, - 0xab, 0xbe, 0xf9, 0xe7, 0x5f, 0xc5, 0xc5, 0xb7, 0x1a, 0xcc, 0xbe, 0xe9, 0xbf, 0xab, 0x81, 0x35, - 0x1a, 0x53, 0x41, 0xf1, 0xd0, 0xef, 0xe3, 0x21, 0x8e, 0x03, 0x23, 0xf8, 0xbb, 0x2f, 0xf5, 0x93, - 0x54, 0x0d, 0x52, 0x1e, 0xbd, 0x42, 0x20, 0x6f, 0x55, 0x23, 0xae, 0x02, 0x1c, 0x0c, 0x96, 0x4c, - 0x66, 0x35, 0x1e, 0x9f, 0xbc, 0x54, 0xe6, 0xa5, 0x32, 0xa3, 0x6e, 0xe6, 0x34, 0x93, 0xa1, 0xdc, - 0xdb, 0x8f, 0x9f, 0xb5, 0x6b, 0x4f, 0x9f, 0xb5, 0x6b, 0xbf, 0x3f, 0x6b, 0xd7, 0x1e, 0x3c, 0x6f, - 0xcf, 0x3d, 0x7d, 0xde, 0x9e, 0xfb, 0xe5, 0x79, 0x7b, 0xee, 0xeb, 0xf7, 0xad, 0x3c, 0x5a, 0x41, - 0x31, 0x11, 0x66, 0xb9, 0x15, 0xec, 0x61, 0x1a, 0xf7, 0x0e, 0xcb, 0x7f, 0xb9, 0x65, 0xe6, 0xfe, - 0xa2, 0x6c, 0xc6, 0xe5, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, 0x13, 0xb4, 0x80, 0x35, 0x93, 0x0f, - 0x00, 0x00, + // 1336 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x57, 0xcf, 0x8f, 0xd3, 0xc6, + 0x17, 0x5f, 0xef,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 0x4a, 0x20, 0x7a, 0x9f, 0x85, 0x54, 0x90, 0x30, 0x16, 0x63, 0x17, 0x84, 0xf8, 0xe0, 0xba, 0x82, + 0x6d, 0x0f, 0xac, 0x27, 0x84, 0xb3, 0x51, 0xe2, 0x13, 0x2f, 0x62, 0x01, 0xf1, 0x12, 0x32, 0xf0, + 0x48, 0x84, 0xfb, 0x43, 0x12, 0xb4, 0x8e, 0x77, 0xac, 0x8d, 0xba, 0x73, 0xbe, 0xa8, 0xfb, 0x95, + 0xae, 0xc8, 0x3d, 0x65, 0xb8, 0x5b, 0x2c, 0x20, 0x2e, 0x19, 0x5c, 0xd7, 0xc4, 0x4f, 0x35, 0xb0, + 0xe4, 0x96, 0x28, 0xfb, 0x36, 0x58, 0x8d, 0x88, 0xb8, 0xcf, 0x92, 0x3d, 0x0f, 0x07, 0x41, 0x42, + 0x38, 0xd7, 0x92, 0xda, 0x9c, 0xa4, 0xb0, 0x4a, 0x65, 0x29, 0x3c, 0xa5, 0x52, 0x57, 0x08, 0xe4, + 0xae, 0x68, 0xe4, 0x8a, 0x02, 0x6c, 0x0c, 0x16, 0xe3, 0x51, 0x7f, 0x8f, 0x8c, 0xb5, 0x9a, 0xd6, + 0x0e, 0xb5, 0xea, 0x4a, 0x34, 0x76, 0x2e, 0x4d, 0x52, 0xa8, 0xfd, 0xb2, 0x14, 0x2e, 0xab, 0xd8, + 0xca, 0x46, 0x4f, 0x7f, 0xdc, 0x5c, 0xd3, 0x93, 0xe2, 0x27, 0xe3, 0x58, 0xb0, 0xee, 0xf6, 0xa8, + 0xff, 0x39, 0x19, 0xbb, 0x7a, 0x81, 0xfd, 0x21, 0xa8, 0xf1, 0x11, 0x8f, 0x49, 0x14, 0x48, 0x39, + 0xd4, 0x9d, 0xb7, 0x26, 0x29, 0x34, 0x50, 0x96, 0xc2, 0x15, 0x15, 0x4e, 0x03, 0xc8, 0x35, 0x94, + 0x7d, 0x07, 0x2c, 0x72, 0x81, 0xc5, 0x48, 0xb5, 0x6c, 0xe5, 0x22, 0xea, 0xea, 0x3c, 0x66, 0xe6, + 0xf4, 0x0c, 0x76, 0x1d, 0x16, 0x05, 0x5f, 0x49, 0x4f, 0xe7, 0xff, 0x79, 0xa5, 0x6a, 0x55, 0x51, + 0xa9, 0xb2, 0x91, 0xab, 0x89, 0x7c, 0xd3, 0x82, 0xed, 0x91, 0x88, 0xcb, 0x5e, 0x35, 0x94, 0x08, + 0x7f, 0x4d, 0xe1, 0xbb, 0x03, 0x2a, 0x76, 0x47, 0xfd, 0xae, 0xcf, 0x42, 0x3d, 0xfc, 0xfa, 0x67, + 0x93, 0x07, 0x7b, 0x3d, 0x31, 0x8e, 0x09, 0xef, 0xde, 0x88, 0x44, 0x9e, 0x42, 0xad, 0x2f, 0x52, + 0x28, 0x1b, 0xb9, 0x9a, 0xb0, 0x6f, 0x81, 0x65, 0x76, 0x3f, 0x22, 0xc9, 0xb4, 0x5b, 0x8b, 0x32, + 0xd3, 0x7b, 0x93, 0x14, 0xce, 0x12, 0x59, 0x0a, 0xd7, 0x54, 0x88, 0x19, 0x18, 0xb9, 0x4b, 0xd2, + 0x36, 0x7d, 0xa2, 0xa0, 0x19, 0x10, 0xee, 0x27, 0x34, 0xce, 0x65, 0xdd, 0xaa, 0xc9, 0x66, 0x75, + 0xba, 0x2f, 0x39, 0x36, 0xbb, 0xd7, 0x0a, 0x3f, 0xe7, 0x9d, 0x5c, 0xe5, 0xa5, 0x85, 0x59, 0x0a, + 0x6d, 0x95, 0xad, 0x04, 0x22, 0xb7, 0xec, 0x62, 0x27, 0x60, 0xd9, 0x4f, 0x08, 0x2e, 0x86, 0xb8, + 0x2e, 0x93, 0x9d, 0x39, 0xa4, 0x8c, 0x1d, 0x73, 0xba, 0x3a, 0x5b, 0x7a, 0x8a, 0x67, 0x17, 0x16, + 0x5b, 0x9b, 0x81, 0xd1, 0xc3, 0x7c, 0x5a, 0x97, 0x0c, 0x26, 0x47, 0xf4, 0x63, 0xd0, 0x90, 0xc3, + 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0x36, 0x62, 0x53, 0x37, 0xa2, 0xbc, 0xac, 0xc8, 0x53, + 0x02, 0x55, 0x13, 0x80, 0x42, 0xf2, 0xf5, 0xe8, 0x87, 0x05, 0xd0, 0x2c, 0x49, 0x27, 0x1f, 0xdb, + 0x90, 0x45, 0x74, 0x8f, 0x24, 0xfa, 0xfd, 0xca, 0xb1, 0xd5, 0x50, 0x31, 0xb6, 0x1a, 0x40, 0xae, + 0xa1, 0xec, 0xeb, 0xa0, 0x4e, 0x03, 0x12, 0x09, 0x2a, 0xd4, 0xa1, 0xa2, 0x54, 0x3f, 0xc5, 0xb2, + 0x14, 0xae, 0xab, 0xa5, 0x06, 0x29, 0x5f, 0x93, 0xa6, 0x6e, 0xf6, 0x15, 0x50, 0xbb, 0x4f, 0xfa, + 0x9c, 0x0a, 0x75, 0x0d, 0x54, 0xad, 0x30, 0x50, 0x96, 0xc2, 0x96, 0x0a, 0xa2, 0x81, 0x72, 0x0c, + 0xe3, 0x64, 0x07, 0xe0, 0x04, 0x27, 0xfe, 0x28, 0xa1, 0x62, 0xec, 0xf9, 0x2c, 0x12, 0xd8, 0x17, + 0xf2, 0x1d, 0x36, 0x9c, 0x8f, 0xf2, 0x73, 0xba, 0xca, 0x65, 0x29, 0x3c, 0xa7, 0x0f, 0x8c, 0x0a, + 0x53, 0x8e, 0xbe, 0x6a, 0xc8, 0xab, 0x8a, 0xcb, 0x0b, 0x0d, 0x88, 0xc0, 0x74, 0x68, 0x8e, 0x13, + 0x59, 0xa8, 0x86, 0x8a, 0x42, 0x35, 0x30, 0x53, 0xa8, 0xc6, 0x4a, 0xf2, 0x7f, 0x30, 0x0f, 0x96, + 0xbf, 0x36, 0x17, 0x51, 0x79, 0xf2, 0xdf, 0x04, 0x4b, 0x65, 0xed, 0xea, 0x66, 0x48, 0x5d, 0x96, + 0xf1, 0x42, 0x97, 0x65, 0x14, 0xb9, 0xcd, 0x92, 0xcc, 0xed, 0x1b, 0x60, 0x89, 0x72, 0x2f, 0x24,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0x41, 0x11, 0x11, 0xe6, 0x71, 0xd3, 0xdf, 0xc5, 0x34, 0xea, 0x1d, + 0x14, 0x5f, 0xff, 0x32, 0x73, 0x7f, 0x51, 0x36, 0xe3, 0xd2, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, + 0xc3, 0x9a, 0xa6, 0xfc, 0x1e, 0x10, 0x00, 0x00, } func (this *ResourceNode) Equal(that interface{}) bool { @@ -709,6 +712,9 @@ func (this *ResourceNode) Equal(that interface{}) bool { if this.NodeType != that1.NodeType { return false } + if !this.EffectiveTokens.Equal(that1.EffectiveTokens) { + return false + } return true } func (this *MetaNode) Equal(that interface{}) bool { @@ -873,6 +879,16 @@ func (m *ResourceNode) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + { + size := m.EffectiveTokens.Size() + i -= size + if _, err := m.EffectiveTokens.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintRegister(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x52 if m.NodeType != 0 { i = encodeVarintRegister(dAtA, i, uint64(m.NodeType)) i-- @@ -1343,6 +1359,8 @@ func (m *ResourceNode) Size() (n int) { if m.NodeType != 0 { n += 1 + sovRegister(uint64(m.NodeType)) } + l = m.EffectiveTokens.Size() + n += 1 + l + sovRegister(uint64(l)) return n } @@ -1964,6 +1982,40 @@ func (m *ResourceNode) Unmarshal(dAtA []byte) error { break } } + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EffectiveTokens", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRegister + } + 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 ErrInvalidLengthRegister + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRegister + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.EffectiveTokens.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipRegister(dAtA[iNdEx:]) diff --git a/x/register/types/tx.pb.go b/x/register/types/tx.pb.go index 0f7e051f..08731588 100644 --- a/x/register/types/tx.pb.go +++ b/x/register/types/tx.pb.go @@ -7,6 +7,7 @@ import ( context "context" fmt "fmt" types "github.com/cosmos/cosmos-sdk/codec/types" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types1 "github.com/cosmos/cosmos-sdk/types" _ "github.com/gogo/protobuf/gogoproto" grpc1 "github.com/gogo/protobuf/grpc" @@ -758,6 +759,84 @@ func (m *MsgUpdateResourceNodeStakeResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgUpdateResourceNodeStakeResponse proto.InternalMessageInfo +// MsgUpdateEffectiveStake defines a SDK message for updating the effective stake of an existing resource node. +type MsgUpdateEffectiveStake struct { + Reporters []string `protobuf:"bytes,1,rep,name=reporters,proto3" json:"reporters" yaml:"reporters"` + ReporterOwner []string `protobuf:"bytes,2,rep,name=reporter_owner,json=reporterOwner,proto3" json:"reporter_owner" yaml:"reporter_owner"` + NetworkAddress string `protobuf:"bytes,3,opt,name=network_address,json=networkAddress,proto3" json:"network_address" yaml:"network_address"` + EffectiveTokens github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,4,opt,name=effective_tokens,json=effectiveTokens,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"effective_tokens" yaml:"effective_tokens"` +} + +func (m *MsgUpdateEffectiveStake) Reset() { *m = MsgUpdateEffectiveStake{} } +func (m *MsgUpdateEffectiveStake) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateEffectiveStake) ProtoMessage() {} +func (*MsgUpdateEffectiveStake) Descriptor() ([]byte, []int) { + return fileDescriptor_75d4b90d7a185a31, []int{14} +} +func (m *MsgUpdateEffectiveStake) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateEffectiveStake) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateEffectiveStake.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 *MsgUpdateEffectiveStake) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateEffectiveStake.Merge(m, src) +} +func (m *MsgUpdateEffectiveStake) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateEffectiveStake) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateEffectiveStake.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateEffectiveStake proto.InternalMessageInfo + +// MsgUpdateEffectiveStakeResponse defines the Msg/UpdateEffectiveStake response type. +type MsgUpdateEffectiveStakeResponse struct { +} + +func (m *MsgUpdateEffectiveStakeResponse) Reset() { *m = MsgUpdateEffectiveStakeResponse{} } +func (m *MsgUpdateEffectiveStakeResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateEffectiveStakeResponse) ProtoMessage() {} +func (*MsgUpdateEffectiveStakeResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_75d4b90d7a185a31, []int{15} +} +func (m *MsgUpdateEffectiveStakeResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateEffectiveStakeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateEffectiveStakeResponse.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 *MsgUpdateEffectiveStakeResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateEffectiveStakeResponse.Merge(m, src) +} +func (m *MsgUpdateEffectiveStakeResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateEffectiveStakeResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateEffectiveStakeResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateEffectiveStakeResponse proto.InternalMessageInfo + // MsgUpdateMetaNodeStake defines a SDK message for updating the stake of an existing meta node. type MsgUpdateMetaNodeStake struct { NetworkAddress string `protobuf:"bytes,1,opt,name=network_address,json=networkAddress,proto3" json:"network_address" yaml:"network_address"` @@ -770,7 +849,7 @@ func (m *MsgUpdateMetaNodeStake) Reset() { *m = MsgUpdateMetaNodeStake{} func (m *MsgUpdateMetaNodeStake) String() string { return proto.CompactTextString(m) } func (*MsgUpdateMetaNodeStake) ProtoMessage() {} func (*MsgUpdateMetaNodeStake) Descriptor() ([]byte, []int) { - return fileDescriptor_75d4b90d7a185a31, []int{14} + return fileDescriptor_75d4b90d7a185a31, []int{16} } func (m *MsgUpdateMetaNodeStake) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -835,7 +914,7 @@ func (m *MsgUpdateMetaNodeStakeResponse) Reset() { *m = MsgUpdateMetaNod func (m *MsgUpdateMetaNodeStakeResponse) String() string { return proto.CompactTextString(m) } func (*MsgUpdateMetaNodeStakeResponse) ProtoMessage() {} func (*MsgUpdateMetaNodeStakeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_75d4b90d7a185a31, []int{15} + return fileDescriptor_75d4b90d7a185a31, []int{17} } func (m *MsgUpdateMetaNodeStakeResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -877,7 +956,7 @@ func (m *MsgMetaNodeRegistrationVote) Reset() { *m = MsgMetaNodeRegistra func (m *MsgMetaNodeRegistrationVote) String() string { return proto.CompactTextString(m) } func (*MsgMetaNodeRegistrationVote) ProtoMessage() {} func (*MsgMetaNodeRegistrationVote) Descriptor() ([]byte, []int) { - return fileDescriptor_75d4b90d7a185a31, []int{16} + return fileDescriptor_75d4b90d7a185a31, []int{18} } func (m *MsgMetaNodeRegistrationVote) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -949,7 +1028,7 @@ func (m *MsgMetaNodeRegistrationVoteResponse) Reset() { *m = MsgMetaNode func (m *MsgMetaNodeRegistrationVoteResponse) String() string { return proto.CompactTextString(m) } func (*MsgMetaNodeRegistrationVoteResponse) ProtoMessage() {} func (*MsgMetaNodeRegistrationVoteResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_75d4b90d7a185a31, []int{17} + return fileDescriptor_75d4b90d7a185a31, []int{19} } func (m *MsgMetaNodeRegistrationVoteResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -993,6 +1072,8 @@ func init() { proto.RegisterType((*MsgUpdateMetaNodeResponse)(nil), "stratos.register.v1.MsgUpdateMetaNodeResponse") proto.RegisterType((*MsgUpdateResourceNodeStake)(nil), "stratos.register.v1.MsgUpdateResourceNodeStake") proto.RegisterType((*MsgUpdateResourceNodeStakeResponse)(nil), "stratos.register.v1.MsgUpdateResourceNodeStakeResponse") + proto.RegisterType((*MsgUpdateEffectiveStake)(nil), "stratos.register.v1.MsgUpdateEffectiveStake") + proto.RegisterType((*MsgUpdateEffectiveStakeResponse)(nil), "stratos.register.v1.MsgUpdateEffectiveStakeResponse") proto.RegisterType((*MsgUpdateMetaNodeStake)(nil), "stratos.register.v1.MsgUpdateMetaNodeStake") proto.RegisterType((*MsgUpdateMetaNodeStakeResponse)(nil), "stratos.register.v1.MsgUpdateMetaNodeStakeResponse") proto.RegisterType((*MsgMetaNodeRegistrationVote)(nil), "stratos.register.v1.MsgMetaNodeRegistrationVote") @@ -1002,86 +1083,98 @@ func init() { func init() { proto.RegisterFile("stratos/register/v1/tx.proto", fileDescriptor_75d4b90d7a185a31) } var fileDescriptor_75d4b90d7a185a31 = []byte{ - // 1262 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0x4d, 0x6f, 0x1b, 0x45, - 0x18, 0xce, 0x3a, 0x69, 0x69, 0x27, 0x49, 0x4b, 0x9c, 0xa4, 0x75, 0x9c, 0xc4, 0xe3, 0x4e, 0x49, - 0x48, 0x88, 0xb2, 0x5b, 0x27, 0xa0, 0x14, 0x24, 0x90, 0xe2, 0xe6, 0x80, 0x84, 0x12, 0x60, 0x81, - 0x1e, 0x90, 0x90, 0xb5, 0xb6, 0x07, 0x67, 0x95, 0x78, 0xc7, 0xda, 0x5d, 0xbb, 0xf5, 0x81, 0x0b, - 0xbf, 0x00, 0x89, 0x3f, 0x50, 0x71, 0xe4, 0xc4, 0x01, 0xfe, 0x00, 0x12, 0x52, 0xe1, 0x54, 0xa9, - 0x12, 0xe2, 0x80, 0x46, 0x28, 0xe1, 0xb4, 0x07, 0x0e, 0xfb, 0x0b, 0xd0, 0xce, 0xec, 0x8e, 0x77, - 0xd7, 0xbb, 0x1b, 0x87, 0x36, 0x17, 0x94, 0x9b, 0xe7, 0xfd, 0x98, 0x79, 0xde, 0xe7, 0x7d, 0x76, - 0x3e, 0x0c, 0x96, 0x2c, 0xdb, 0xd4, 0x6c, 0x62, 0x29, 0x26, 0x6e, 0xe9, 0x96, 0x8d, 0x4d, 0xa5, - 0x57, 0x51, 0xec, 0xc7, 0x72, 0xc7, 0x24, 0x36, 0xc9, 0xcf, 0xfa, 0x5e, 0x39, 0xf0, 0xca, 0xbd, - 0x4a, 0x71, 0xae, 0x45, 0x5a, 0x84, 0xf9, 0x15, 0xef, 0x17, 0x0f, 0x2d, 0x2e, 0xb4, 0x08, 0x69, - 0x1d, 0x63, 0x85, 0x8d, 0xea, 0xdd, 0x2f, 0x15, 0xcd, 0xe8, 0xfb, 0xae, 0x25, 0xdf, 0xa5, 0x75, - 0x74, 0x45, 0x33, 0x0c, 0x62, 0x6b, 0xb6, 0x4e, 0x0c, 0x2b, 0x48, 0x6c, 0x10, 0xab, 0x4d, 0xac, - 0x1a, 0x9f, 0x91, 0x0f, 0x7c, 0x17, 0x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f, 0xcf, 0x86, 0x98, 0x72, 0x39, 0xcc, 0x86, 0xe8, 0xb7, - 0x7c, 0x00, 0xf1, 0x27, 0x09, 0x2c, 0xa5, 0x40, 0xe4, 0x62, 0xdd, 0x18, 0x6d, 0x7d, 0x2e, 0xd4, - 0xed, 0x73, 0x04, 0x0b, 0xc4, 0xdb, 0x0c, 0xf1, 0x26, 0xda, 0x18, 0x09, 0xb1, 0x2f, 0xd0, 0x5f, - 0x25, 0x70, 0x47, 0xe0, 0x4e, 0x3d, 0xdb, 0xef, 0xa5, 0xe1, 0x49, 0xcb, 0x28, 0xde, 0x3f, 0x6f, - 0x86, 0x28, 0xe3, 0x3e, 0x2b, 0x63, 0x0b, 0xdd, 0x4b, 0x2c, 0x63, 0x80, 0xdf, 0x0c, 0x4d, 0x50, - 0xf3, 0x4e, 0xa2, 0xea, 0xc1, 0xd3, 0x93, 0x92, 0xf4, 0xec, 0xa4, 0x24, 0xfd, 0x75, 0x52, 0x92, - 0xbe, 0x39, 0x2d, 0x8d, 0x3d, 0x3b, 0x2d, 0x8d, 0xfd, 0x71, 0x5a, 0x1a, 0xfb, 0xfc, 0xcd, 0x96, - 0x6e, 0x1f, 0x76, 0xeb, 0x72, 0x83, 0xb4, 0x83, 0x59, 0x0d, 0x6c, 0x07, 0x3f, 0x37, 0x1b, 0x87, - 0x9a, 0x6e, 0x28, 0x8f, 0x07, 0x0b, 0x79, 0x8f, 0x32, 0xab, 0x7e, 0x95, 0xfd, 0x9b, 0xb4, 0xfd, - 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x3b, 0x0c, 0xa0, 0x05, 0x01, 0x16, 0x00, 0x00, + // 1442 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0xcd, 0x6f, 0x1b, 0x45, + 0x14, 0xcf, 0xda, 0x69, 0x69, 0xa6, 0x4d, 0xda, 0xb8, 0x49, 0xe3, 0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78, 0x94, 0xe4, 0x43, 0xf4, 0xcb, 0x1d, 0x42, + 0xfc, 0x5e, 0x02, 0x8b, 0x19, 0x10, 0x39, 0x45, 0x57, 0x77, 0xb7, 0x3e, 0x67, 0xe8, 0xc6, 0x1e, + 0x8c, 0xf7, 0x46, 0xd0, 0xf0, 0xc3, 0x06, 0x27, 0xe8, 0xcf, 0x12, 0x38, 0x2d, 0x70, 0x67, 0x5e, + 0x4b, 0xce, 0x67, 0xe1, 0xc9, 0xf2, 0xa8, 0x5c, 0xda, 0xab, 0x87, 0x08, 0xe3, 0x12, 0x0b, 0x63, + 0x1d, 0x9d, 0x4f, 0x0d, 0x23, 0xc4, 0x6f, 0x46, 0x26, 0x68, 0x7a, 0x87, 0x68, 0x63, 0xeb, 0xe1, + 0xe3, 0xaa, 0xf4, 0xe8, 0x71, 0x55, 0xfa, 0xeb, 0x71, 0x55, 0xfa, 0xe2, 0x49, 0x75, 0xe2, 0xd1, + 0x93, 0xea, 0xc4, 0xef, 0x4f, 0xaa, 0x13, 0x9f, 0x5c, 0x88, 0x5c, 0xcd, 0xfd, 0x59, 0x0d, 0x6c, + 0x07, 0x7f, 0xd7, 0xda, 0x77, 0x34, 0xdd, 0x50, 0xee, 0x85, 0x0b, 0xb1, 0xcb, 0x7a, 0xeb, 0x20, + 0xfb, 0x8a, 0xb9, 0xf1, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x50, 0x5f, 0xac, 0xad, 0x79, 0x18, + 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1101,6 +1194,7 @@ type MsgClient interface { HandleMsgRemoveResourceNode(ctx context.Context, in *MsgRemoveResourceNode, opts ...grpc.CallOption) (*MsgRemoveResourceNodeResponse, error) HandleMsgUpdateResourceNode(ctx context.Context, in *MsgUpdateResourceNode, opts ...grpc.CallOption) (*MsgUpdateResourceNodeResponse, error) HandleMsgUpdateResourceNodeStake(ctx context.Context, in *MsgUpdateResourceNodeStake, opts ...grpc.CallOption) (*MsgUpdateResourceNodeStakeResponse, error) + HandleMsgUpdateEffectiveStake(ctx context.Context, in *MsgUpdateEffectiveStake, opts ...grpc.CallOption) (*MsgUpdateEffectiveStakeResponse, error) HandleMsgCreateMetaNode(ctx context.Context, in *MsgCreateMetaNode, opts ...grpc.CallOption) (*MsgCreateMetaNodeResponse, error) HandleMsgRemoveMetaNode(ctx context.Context, in *MsgRemoveMetaNode, opts ...grpc.CallOption) (*MsgRemoveMetaNodeResponse, error) HandleMsgUpdateMetaNode(ctx context.Context, in *MsgUpdateMetaNode, opts ...grpc.CallOption) (*MsgUpdateMetaNodeResponse, error) @@ -1152,6 +1246,15 @@ func (c *msgClient) HandleMsgUpdateResourceNodeStake(ctx context.Context, in *Ms return out, nil } +func (c *msgClient) HandleMsgUpdateEffectiveStake(ctx context.Context, in *MsgUpdateEffectiveStake, opts ...grpc.CallOption) (*MsgUpdateEffectiveStakeResponse, error) { + out := new(MsgUpdateEffectiveStakeResponse) + err := c.cc.Invoke(ctx, "/stratos.register.v1.Msg/HandleMsgUpdateEffectiveStake", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *msgClient) HandleMsgCreateMetaNode(ctx context.Context, in *MsgCreateMetaNode, opts ...grpc.CallOption) (*MsgCreateMetaNodeResponse, error) { out := new(MsgCreateMetaNodeResponse) err := c.cc.Invoke(ctx, "/stratos.register.v1.Msg/HandleMsgCreateMetaNode", in, out, opts...) @@ -1204,6 +1307,7 @@ type MsgServer interface { HandleMsgRemoveResourceNode(context.Context, *MsgRemoveResourceNode) (*MsgRemoveResourceNodeResponse, error) HandleMsgUpdateResourceNode(context.Context, *MsgUpdateResourceNode) (*MsgUpdateResourceNodeResponse, error) HandleMsgUpdateResourceNodeStake(context.Context, *MsgUpdateResourceNodeStake) (*MsgUpdateResourceNodeStakeResponse, error) + HandleMsgUpdateEffectiveStake(context.Context, *MsgUpdateEffectiveStake) (*MsgUpdateEffectiveStakeResponse, error) HandleMsgCreateMetaNode(context.Context, *MsgCreateMetaNode) (*MsgCreateMetaNodeResponse, error) HandleMsgRemoveMetaNode(context.Context, *MsgRemoveMetaNode) (*MsgRemoveMetaNodeResponse, error) HandleMsgUpdateMetaNode(context.Context, *MsgUpdateMetaNode) (*MsgUpdateMetaNodeResponse, error) @@ -1227,6 +1331,9 @@ func (*UnimplementedMsgServer) HandleMsgUpdateResourceNode(ctx context.Context, func (*UnimplementedMsgServer) HandleMsgUpdateResourceNodeStake(ctx context.Context, req *MsgUpdateResourceNodeStake) (*MsgUpdateResourceNodeStakeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method HandleMsgUpdateResourceNodeStake not implemented") } +func (*UnimplementedMsgServer) HandleMsgUpdateEffectiveStake(ctx context.Context, req *MsgUpdateEffectiveStake) (*MsgUpdateEffectiveStakeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method HandleMsgUpdateEffectiveStake not implemented") +} func (*UnimplementedMsgServer) HandleMsgCreateMetaNode(ctx context.Context, req *MsgCreateMetaNode) (*MsgCreateMetaNodeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method HandleMsgCreateMetaNode not implemented") } @@ -1319,6 +1426,24 @@ func _Msg_HandleMsgUpdateResourceNodeStake_Handler(srv interface{}, ctx context. return interceptor(ctx, in, info, handler) } +func _Msg_HandleMsgUpdateEffectiveStake_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateEffectiveStake) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).HandleMsgUpdateEffectiveStake(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/stratos.register.v1.Msg/HandleMsgUpdateEffectiveStake", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).HandleMsgUpdateEffectiveStake(ctx, req.(*MsgUpdateEffectiveStake)) + } + return interceptor(ctx, in, info, handler) +} + func _Msg_HandleMsgCreateMetaNode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgCreateMetaNode) if err := dec(in); err != nil { @@ -1429,6 +1554,10 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "HandleMsgUpdateResourceNodeStake", Handler: _Msg_HandleMsgUpdateResourceNodeStake_Handler, }, + { + MethodName: "HandleMsgUpdateEffectiveStake", + Handler: _Msg_HandleMsgUpdateEffectiveStake_Handler, + }, { MethodName: "HandleMsgCreateMetaNode", Handler: _Msg_HandleMsgCreateMetaNode_Handler, @@ -1992,6 +2121,87 @@ func (m *MsgUpdateResourceNodeStakeResponse) MarshalToSizedBuffer(dAtA []byte) ( return len(dAtA) - i, nil } +func (m *MsgUpdateEffectiveStake) 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 *MsgUpdateEffectiveStake) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateEffectiveStake) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.EffectiveTokens.Size() + i -= size + if _, err := m.EffectiveTokens.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + if len(m.NetworkAddress) > 0 { + i -= len(m.NetworkAddress) + copy(dAtA[i:], m.NetworkAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.NetworkAddress))) + i-- + dAtA[i] = 0x1a + } + if len(m.ReporterOwner) > 0 { + for iNdEx := len(m.ReporterOwner) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.ReporterOwner[iNdEx]) + copy(dAtA[i:], m.ReporterOwner[iNdEx]) + i = encodeVarintTx(dAtA, i, uint64(len(m.ReporterOwner[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.Reporters) > 0 { + for iNdEx := len(m.Reporters) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Reporters[iNdEx]) + copy(dAtA[i:], m.Reporters[iNdEx]) + i = encodeVarintTx(dAtA, i, uint64(len(m.Reporters[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateEffectiveStakeResponse) 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 *MsgUpdateEffectiveStakeResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateEffectiveStakeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + func (m *MsgUpdateMetaNodeStake) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -2384,6 +2594,42 @@ func (m *MsgUpdateResourceNodeStakeResponse) Size() (n int) { return n } +func (m *MsgUpdateEffectiveStake) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Reporters) > 0 { + for _, s := range m.Reporters { + l = len(s) + n += 1 + l + sovTx(uint64(l)) + } + } + if len(m.ReporterOwner) > 0 { + for _, s := range m.ReporterOwner { + l = len(s) + n += 1 + l + sovTx(uint64(l)) + } + } + l = len(m.NetworkAddress) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.EffectiveTokens.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgUpdateEffectiveStakeResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + func (m *MsgUpdateMetaNodeStake) Size() (n int) { if m == nil { return 0 @@ -3973,6 +4219,236 @@ func (m *MsgUpdateResourceNodeStakeResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *MsgUpdateEffectiveStake) 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: MsgUpdateEffectiveStake: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateEffectiveStake: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Reporters", 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.Reporters = append(m.Reporters, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ReporterOwner", 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.ReporterOwner = append(m.ReporterOwner, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NetworkAddress", 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.NetworkAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EffectiveTokens", 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 + } + if err := m.EffectiveTokens.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 *MsgUpdateEffectiveStakeResponse) 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: MsgUpdateEffectiveStakeResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateEffectiveStakeResponse: 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 *MsgUpdateMetaNodeStake) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 From 7a29ffa6c2f37df24b4981cbadb4d964a20a4dd3 Mon Sep 17 00:00:00 2001 From: Xiong Date: Fri, 24 Feb 2023 14:19:34 -0500 Subject: [PATCH 26/95] bug fix --- x/pot/types/params.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/pot/types/params.go b/x/pot/types/params.go index 86af629c..cb8f1f0d 100644 --- a/x/pot/types/params.go +++ b/x/pot/types/params.go @@ -155,7 +155,7 @@ func validateMatureEpoch(i interface{}) error { } func validateMiningRewardParams(i interface{}) error { - v, ok := i.([]MiningRewardParam) + v, ok := i.([]*MiningRewardParam) if !ok { return fmt.Errorf("invalid parameter type: %T", i) } From 40ec7436e40a137c0a642b4b052b5ad4a30f478e Mon Sep 17 00:00:00 2001 From: Xiong Date: Fri, 24 Feb 2023 16:03:23 -0500 Subject: [PATCH 27/95] remove coin normalization from msg handler level --- proto/stratos/register/v1/tx.proto | 8 +- proto/stratos/sds/v1/query.proto | 4 +- proto/stratos/sds/v1/tx.proto | 4 +- x/register/client/cli/tx.go | 12 +- x/register/client/rest/tx.go | 8 +- x/register/keeper/msg_server.go | 20 +-- x/register/types/msg.go | 12 +- x/register/types/tx.pb.go | 238 ++++++++++++++--------------- x/sds/client/cli/tx.go | 3 +- x/sds/client/rest/rest.go | 2 +- x/sds/keeper/grpc_query.go | 3 +- x/sds/keeper/msg_server.go | 5 +- x/sds/types/msg.go | 2 +- x/sds/types/query.pb.go | 102 ++++++------- x/sds/types/tx.pb.go | 79 +++++----- 15 files changed, 245 insertions(+), 257 deletions(-) diff --git a/proto/stratos/register/v1/tx.proto b/proto/stratos/register/v1/tx.proto index 93e816e3..64b789e7 100644 --- a/proto/stratos/register/v1/tx.proto +++ b/proto/stratos/register/v1/tx.proto @@ -60,7 +60,7 @@ message MsgCreateResourceNode { (gogoproto.jsontag) = "pubkey", (gogoproto.moretags) = "yaml:\"pubkey\"" ]; - cosmos.base.v1beta1.DecCoin value = 3 [ + cosmos.base.v1beta1.Coin value = 3 [ (gogoproto.nullable) = false, (gogoproto.jsontag) = "value", (gogoproto.moretags) = "yaml:\"value\"" @@ -93,7 +93,7 @@ message MsgCreateMetaNode { (gogoproto.jsontag) = "pubkey", (gogoproto.moretags) = "yaml:\"pubkey\"" ]; - cosmos.base.v1beta1.DecCoin value = 3 [ + cosmos.base.v1beta1.Coin value = 3 [ (gogoproto.nullable) = false, (gogoproto.jsontag) = "value", (gogoproto.moretags) = "yaml:\"value\"" @@ -203,7 +203,7 @@ message MsgUpdateResourceNodeStake { (gogoproto.jsontag) = "incr_stake", (gogoproto.moretags) = "yaml:\"incr_stake\"" ]; - cosmos.base.v1beta1.DecCoin stake_delta = 4 [ + cosmos.base.v1beta1.Coin stake_delta = 4 [ (gogoproto.nullable) = false, (gogoproto.jsontag) = "stake_delta", (gogoproto.moretags) = "yaml:\"stake_delta\"" @@ -255,7 +255,7 @@ message MsgUpdateMetaNodeStake { (gogoproto.jsontag) = "incr_stake", (gogoproto.moretags) = "yaml:\"incr_stake\"" ]; - cosmos.base.v1beta1.DecCoin stake_delta = 4 [ + cosmos.base.v1beta1.Coin stake_delta = 4 [ (gogoproto.nullable) = false, (gogoproto.jsontag) = "stake_delta", (gogoproto.moretags) = "yaml:\"stake_delta\"" diff --git a/proto/stratos/sds/v1/query.proto b/proto/stratos/sds/v1/query.proto index cb7b0181..d7104f3b 100644 --- a/proto/stratos/sds/v1/query.proto +++ b/proto/stratos/sds/v1/query.proto @@ -45,11 +45,11 @@ message QueryFileUploadResponse { } message QuerySimPrepayRequest { - repeated cosmos.base.v1beta1.DecCoin amount = 1 [ + repeated cosmos.base.v1beta1.Coin amount = 1 [ (gogoproto.jsontag) = "amount", (gogoproto.moretags) = "yaml:\"amount\"", (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins" + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" ]; } diff --git a/proto/stratos/sds/v1/tx.proto b/proto/stratos/sds/v1/tx.proto index 18e60aab..665d2bbf 100644 --- a/proto/stratos/sds/v1/tx.proto +++ b/proto/stratos/sds/v1/tx.proto @@ -45,11 +45,11 @@ message MsgPrepay { (gogoproto.moretags) = "yaml:\"sender\"" ]; - repeated cosmos.base.v1beta1.DecCoin amount = 2 [ + repeated cosmos.base.v1beta1.Coin amount = 2 [ (gogoproto.jsontag) = "amount", (gogoproto.moretags) = "yaml:\"amount\"", (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins" + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" ]; } diff --git a/x/register/client/cli/tx.go b/x/register/client/cli/tx.go index ab6c2072..52176471 100644 --- a/x/register/client/cli/tx.go +++ b/x/register/client/cli/tx.go @@ -358,7 +358,6 @@ func newBuildCreateResourceNodeMsg(clientCtx client.Context, txf tx.Factory, fs if err != nil { return txf, nil, err } - decAmount := sdk.NewDecCoinFromCoin(amount) flagNetworkAddrStr, err := fs.GetString(FlagNetworkAddress) if err != nil { @@ -404,7 +403,7 @@ func newBuildCreateResourceNodeMsg(clientCtx client.Context, txf tx.Factory, fs if t := nodeType.Type(); t == "UNKNOWN" { return txf, nil, types.ErrNodeType } - msg, er := types.NewMsgCreateResourceNode(networkAddr, pubKey, decAmount, ownerAddr, description, nodeTypeVal) + msg, er := types.NewMsgCreateResourceNode(networkAddr, pubKey, amount, ownerAddr, description, nodeTypeVal) if er != nil { return txf, nil, err } @@ -421,7 +420,6 @@ func newBuildCreateMetaNodeMsg(clientCtx client.Context, txf tx.Factory, fs *fla if err != nil { return txf, nil, err } - decAmount := sdk.NewDecCoinFromCoin(amount) flagNetworkAddrStr, err := fs.GetString(FlagNetworkAddress) if err != nil { @@ -455,7 +453,7 @@ func newBuildCreateMetaNodeMsg(clientCtx client.Context, txf tx.Factory, fs *fla security, details, ) - msg, er := types.NewMsgCreateMetaNode(networkAddr, pubKey, decAmount, ownerAddr, description) + msg, er := types.NewMsgCreateMetaNode(networkAddr, pubKey, amount, ownerAddr, description) if er != nil { return txf, nil, err } @@ -542,7 +540,6 @@ func newBuildUpdateResourceNodeStakeMsg(clientCtx client.Context, txf tx.Factory if err != nil { return txf, nil, err } - decStakeDelta := sdk.NewDecCoinFromCoin(stakeDelta) incrStakeStr, err := fs.GetString(FlagIncrStake) if err != nil { @@ -561,7 +558,7 @@ func newBuildUpdateResourceNodeStakeMsg(clientCtx client.Context, txf tx.Factory ownerAddr := clientCtx.GetFromAddress() - msg := types.NewMsgUpdateResourceNodeStake(networkAddr, ownerAddr, decStakeDelta, incrStake) + msg := types.NewMsgUpdateResourceNodeStake(networkAddr, ownerAddr, stakeDelta, incrStake) return txf, msg, nil } @@ -575,7 +572,6 @@ func newBuildUpdateMetaNodeStakeMsg(clientCtx client.Context, txf tx.Factory, fs if err != nil { return txf, nil, err } - decStakeDelta := sdk.NewDecCoinFromCoin(stakeDelta) incrStakeStr, err := fs.GetString(FlagIncrStake) if err != nil { @@ -594,7 +590,7 @@ func newBuildUpdateMetaNodeStakeMsg(clientCtx client.Context, txf tx.Factory, fs ownerAddr := clientCtx.GetFromAddress() - msg := types.NewMsgUpdateMetaNodeStake(networkAddr, ownerAddr, decStakeDelta, incrStake) + msg := types.NewMsgUpdateMetaNodeStake(networkAddr, ownerAddr, stakeDelta, incrStake) return txf, msg, nil } diff --git a/x/register/client/rest/tx.go b/x/register/client/rest/tx.go index 476b76db..81cb683b 100644 --- a/x/register/client/rest/tx.go +++ b/x/register/client/rest/tx.go @@ -63,7 +63,7 @@ type ( BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"` NetworkAddr string `json:"network_address" yaml:"network_address"` PubKey string `json:"pubkey" yaml:"pubkey"` // in bech32 - Amount sdk.DecCoin `json:"amount" yaml:"amount"` + Amount sdk.Coin `json:"amount" yaml:"amount"` Description types.Description `json:"description" yaml:"description"` NodeType uint32 `json:"node_type" yaml:"node_type"` } @@ -83,7 +83,7 @@ type ( UpdateResourceNodeStakeRequest struct { BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"` NetworkAddress string `json:"network_address" yaml:"network_address"` - StakeDelta sdk.DecCoin `json:"stake_delta" yaml:"stake_delta"` + StakeDelta sdk.Coin `json:"stake_delta" yaml:"stake_delta"` IncrStake string `json:"incr_stake" yaml:"incr_stake"` } @@ -101,7 +101,7 @@ type ( BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"` NetworkAddr string `json:"network_address" yaml:"network_address"` PubKey string `json:"pubkey" yaml:"pubkey"` // in bech32 - Amount sdk.DecCoin `json:"amount" yaml:"amount"` + Amount sdk.Coin `json:"amount" yaml:"amount"` Description types.Description `json:"description" yaml:"description"` } @@ -119,7 +119,7 @@ type ( UpdateMetaNodeStakeRequest struct { BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"` NetworkAddress string `json:"network_address" yaml:"network_address"` - StakeDelta sdk.DecCoin `json:"stake_delta" yaml:"stake_delta"` + StakeDelta sdk.Coin `json:"stake_delta" yaml:"stake_delta"` IncrStake string `json:"incr_stake" yaml:"incr_stake"` } diff --git a/x/register/keeper/msg_server.go b/x/register/keeper/msg_server.go index 6e4e5a8e..20dc76ee 100644 --- a/x/register/keeper/msg_server.go +++ b/x/register/keeper/msg_server.go @@ -54,12 +54,11 @@ func (k msgServer) HandleMsgCreateResourceNode(goCtx context.Context, msg *types return nil, types.ErrResourceNodePubKeyExists } - stake, _ := sdk.NormalizeDecCoin(msg.GetValue()).TruncateDecimal() - if stake.Denom != k.BondDenom(ctx) { + if msg.GetValue().Denom != k.BondDenom(ctx) { return nil, types.ErrBadDenom } - ozoneLimitChange, err := k.RegisterResourceNode(ctx, networkAddr, pk, ownerAddress, *msg.Description, types.NodeType(msg.NodeType), stake) + ozoneLimitChange, err := k.RegisterResourceNode(ctx, networkAddr, pk, ownerAddress, *msg.Description, types.NodeType(msg.NodeType), msg.GetValue()) if err != nil { return nil, sdkerrors.Wrap(types.ErrRegisterResourceNode, err.Error()) } @@ -100,8 +99,7 @@ func (k msgServer) HandleMsgCreateMetaNode(goCtx context.Context, msg *types.Msg return nil, types.ErrMetaNodePubKeyExists } - stake, _ := sdk.NormalizeDecCoin(msg.GetValue()).TruncateDecimal() - if stake.Denom != k.BondDenom(ctx) { + if msg.GetValue().Denom != k.BondDenom(ctx) { return nil, types.ErrBadDenom } @@ -110,7 +108,7 @@ func (k msgServer) HandleMsgCreateMetaNode(goCtx context.Context, msg *types.Msg return &types.MsgCreateMetaNodeResponse{}, sdkerrors.Wrap(types.ErrInvalidOwnerAddr, err.Error()) } - ozoneLimitChange, err := k.RegisterMetaNode(ctx, networkAddr, pk, ownerAddress, *msg.Description, stake) + ozoneLimitChange, err := k.RegisterMetaNode(ctx, networkAddr, pk, ownerAddress, *msg.Description, msg.GetValue()) if err != nil { return nil, sdkerrors.Wrap(types.ErrRegisterMetaNode, err.Error()) } @@ -320,13 +318,12 @@ func (k msgServer) HandleMsgUpdateResourceNodeStake(goCtx context.Context, msg * return &types.MsgUpdateResourceNodeStakeResponse{}, sdkerrors.Wrap(types.ErrInvalidOwnerAddr, err.Error()) } - stakeDelta, _ := sdk.NormalizeDecCoin(msg.GetStakeDelta()).TruncateDecimal() - if stakeDelta.Denom != k.BondDenom(ctx) { + if msg.GetStakeDelta().Denom != k.BondDenom(ctx) { return nil, types.ErrBadDenom } ozoneLimitChange, availableTokenAmtBefore, availableTokenAmtAfter, completionTime, node, err := - k.UpdateResourceNodeStake(ctx, networkAddr, ownerAddress, stakeDelta, msg.IncrStake) + k.UpdateResourceNodeStake(ctx, networkAddr, ownerAddress, msg.GetStakeDelta(), msg.IncrStake) if err != nil { return nil, sdkerrors.Wrap(types.ErrUpdateResourceNodeStake, err.Error()) } @@ -436,12 +433,11 @@ func (k msgServer) HandleMsgUpdateMetaNodeStake(goCtx context.Context, msg *type return &types.MsgUpdateMetaNodeStakeResponse{}, sdkerrors.Wrap(types.ErrInvalidOwnerAddr, err.Error()) } - stakeDelta, _ := sdk.NormalizeDecCoin(msg.GetStakeDelta()).TruncateDecimal() - if stakeDelta.Denom != k.BondDenom(ctx) { + if msg.GetStakeDelta().Denom != k.BondDenom(ctx) { return nil, types.ErrBadDenom } - ozoneLimitChange, completionTime, err := k.UpdateMetaNodeStake(ctx, networkAddr, ownerAddress, stakeDelta, msg.IncrStake) + ozoneLimitChange, completionTime, err := k.UpdateMetaNodeStake(ctx, networkAddr, ownerAddress, msg.GetStakeDelta(), msg.IncrStake) if err != nil { return nil, sdkerrors.Wrap(types.ErrUpdateMetaNodeStake, err.Error()) } diff --git a/x/register/types/msg.go b/x/register/types/msg.go index 50712d2a..645c4911 100644 --- a/x/register/types/msg.go +++ b/x/register/types/msg.go @@ -37,7 +37,7 @@ const ( // NewMsgCreateResourceNode NewMsg creates a new Msg instance func NewMsgCreateResourceNode(networkAddr stratos.SdsAddress, pubKey cryptotypes.PubKey, //nolint:interfacer - value sdk.DecCoin, ownerAddr sdk.AccAddress, description *Description, nodeType uint32, + value sdk.Coin, ownerAddr sdk.AccAddress, description *Description, nodeType uint32, ) (*MsgCreateResourceNode, error) { var pkAny *codectypes.Any if pubKey != nil { @@ -127,7 +127,7 @@ func (msg MsgCreateResourceNode) UnpackInterfaces(unpacker codectypes.AnyUnpacke // NewMsgCreateMetaNode creates a new Msg instance func NewMsgCreateMetaNode(networkAddr stratos.SdsAddress, pubKey cryptotypes.PubKey, //nolint:interfacer - value sdk.DecCoin, ownerAddr sdk.AccAddress, description *Description, + value sdk.Coin, ownerAddr sdk.AccAddress, description *Description, ) (*MsgCreateMetaNode, error) { var pkAny *codectypes.Any if pubKey != nil { @@ -370,7 +370,7 @@ func (msg MsgUpdateResourceNode) ValidateBasic() error { } func NewMsgUpdateResourceNodeStake(networkAddress stratos.SdsAddress, ownerAddress sdk.AccAddress, - stakeDelta sdk.DecCoin, incrStake bool) *MsgUpdateResourceNodeStake { + stakeDelta sdk.Coin, incrStake bool) *MsgUpdateResourceNodeStake { return &MsgUpdateResourceNodeStake{ NetworkAddress: networkAddress.String(), OwnerAddress: ownerAddress.String(), @@ -418,7 +418,7 @@ func (msg MsgUpdateResourceNodeStake) ValidateBasic() error { return ErrEmptyOwnerAddr } - if msg.StakeDelta.Amount.LTE(sdk.ZeroDec()) { + if msg.StakeDelta.Amount.LTE(sdk.ZeroInt()) { return ErrInvalidStakeChange } return nil @@ -481,7 +481,7 @@ func (msg MsgUpdateMetaNode) ValidateBasic() error { } func NewMsgUpdateMetaNodeStake(networkAddress stratos.SdsAddress, ownerAddress sdk.AccAddress, - stakeDelta sdk.DecCoin, incrStake bool) *MsgUpdateMetaNodeStake { + stakeDelta sdk.Coin, incrStake bool) *MsgUpdateMetaNodeStake { return &MsgUpdateMetaNodeStake{ NetworkAddress: networkAddress.String(), OwnerAddress: ownerAddress.String(), @@ -529,7 +529,7 @@ func (msg MsgUpdateMetaNodeStake) ValidateBasic() error { return ErrEmptyOwnerAddr } - if msg.StakeDelta.Amount.LTE(sdk.ZeroDec()) { + if msg.StakeDelta.Amount.LTE(sdk.ZeroInt()) { return ErrInvalidStakeChange } return nil diff --git a/x/register/types/tx.pb.go b/x/register/types/tx.pb.go index 08731588..0dfb9260 100644 --- a/x/register/types/tx.pb.go +++ b/x/register/types/tx.pb.go @@ -35,12 +35,12 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // MsgCreateResourceNode encapsulates an MsgCreateResourceNodeTx transaction as an SDK message. type MsgCreateResourceNode struct { - NetworkAddress string `protobuf:"bytes,1,opt,name=network_address,json=networkAddress,proto3" json:"network_address" yaml:"network_address"` - Pubkey *types.Any `protobuf:"bytes,2,opt,name=pubkey,proto3" json:"pubkey" yaml:"pubkey"` - Value types1.DecCoin `protobuf:"bytes,3,opt,name=value,proto3" json:"value" yaml:"value"` - OwnerAddress string `protobuf:"bytes,4,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address" yaml:"owner_address"` - Description *Description `protobuf:"bytes,5,opt,name=description,proto3" json:"description" yaml:"description"` - NodeType uint32 `protobuf:"varint,6,opt,name=node_type,json=nodeType,proto3" json:"node_type" yaml:"node_type"` + NetworkAddress string `protobuf:"bytes,1,opt,name=network_address,json=networkAddress,proto3" json:"network_address" yaml:"network_address"` + Pubkey *types.Any `protobuf:"bytes,2,opt,name=pubkey,proto3" json:"pubkey" yaml:"pubkey"` + Value types1.Coin `protobuf:"bytes,3,opt,name=value,proto3" json:"value" yaml:"value"` + OwnerAddress string `protobuf:"bytes,4,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address" yaml:"owner_address"` + Description *Description `protobuf:"bytes,5,opt,name=description,proto3" json:"description" yaml:"description"` + NodeType uint32 `protobuf:"varint,6,opt,name=node_type,json=nodeType,proto3" json:"node_type" yaml:"node_type"` } func (m *MsgCreateResourceNode) Reset() { *m = MsgCreateResourceNode{} } @@ -90,11 +90,11 @@ func (m *MsgCreateResourceNode) GetPubkey() *types.Any { return nil } -func (m *MsgCreateResourceNode) GetValue() types1.DecCoin { +func (m *MsgCreateResourceNode) GetValue() types1.Coin { if m != nil { return m.Value } - return types1.DecCoin{} + return types1.Coin{} } func (m *MsgCreateResourceNode) GetOwnerAddress() string { @@ -157,11 +157,11 @@ var xxx_messageInfo_MsgCreateResourceNodeResponse proto.InternalMessageInfo // MsgCreateMetaNode encapsulates an MsgCreateMetaNodeTx transaction as an SDK message. type MsgCreateMetaNode struct { - NetworkAddress string `protobuf:"bytes,1,opt,name=network_address,json=networkAddress,proto3" json:"network_address" yaml:"network_address"` - Pubkey *types.Any `protobuf:"bytes,2,opt,name=pubkey,proto3" json:"pubkey" yaml:"pubkey"` - Value types1.DecCoin `protobuf:"bytes,3,opt,name=value,proto3" json:"value" yaml:"value"` - OwnerAddress string `protobuf:"bytes,4,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address" yaml:"owner_address"` - Description *Description `protobuf:"bytes,5,opt,name=description,proto3" json:"description" yaml:"description"` + NetworkAddress string `protobuf:"bytes,1,opt,name=network_address,json=networkAddress,proto3" json:"network_address" yaml:"network_address"` + Pubkey *types.Any `protobuf:"bytes,2,opt,name=pubkey,proto3" json:"pubkey" yaml:"pubkey"` + Value types1.Coin `protobuf:"bytes,3,opt,name=value,proto3" json:"value" yaml:"value"` + OwnerAddress string `protobuf:"bytes,4,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address" yaml:"owner_address"` + Description *Description `protobuf:"bytes,5,opt,name=description,proto3" json:"description" yaml:"description"` } func (m *MsgCreateMetaNode) Reset() { *m = MsgCreateMetaNode{} } @@ -211,11 +211,11 @@ func (m *MsgCreateMetaNode) GetPubkey() *types.Any { return nil } -func (m *MsgCreateMetaNode) GetValue() types1.DecCoin { +func (m *MsgCreateMetaNode) GetValue() types1.Coin { if m != nil { return m.Value } - return types1.DecCoin{} + return types1.Coin{} } func (m *MsgCreateMetaNode) GetOwnerAddress() string { @@ -655,10 +655,10 @@ var xxx_messageInfo_MsgUpdateMetaNodeResponse proto.InternalMessageInfo // MsgUpdateResourceNodeStake defines a SDK message for updating the stake of an existing resource node. type MsgUpdateResourceNodeStake struct { - NetworkAddress string `protobuf:"bytes,1,opt,name=network_address,json=networkAddress,proto3" json:"network_address" yaml:"network_address"` - OwnerAddress string `protobuf:"bytes,2,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address" yaml:"owner_address"` - IncrStake bool `protobuf:"varint,3,opt,name=incr_stake,json=incrStake,proto3" json:"incr_stake" yaml:"incr_stake"` - StakeDelta types1.DecCoin `protobuf:"bytes,4,opt,name=stake_delta,json=stakeDelta,proto3" json:"stake_delta" yaml:"stake_delta"` + NetworkAddress string `protobuf:"bytes,1,opt,name=network_address,json=networkAddress,proto3" json:"network_address" yaml:"network_address"` + OwnerAddress string `protobuf:"bytes,2,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address" yaml:"owner_address"` + IncrStake bool `protobuf:"varint,3,opt,name=incr_stake,json=incrStake,proto3" json:"incr_stake" yaml:"incr_stake"` + StakeDelta types1.Coin `protobuf:"bytes,4,opt,name=stake_delta,json=stakeDelta,proto3" json:"stake_delta" yaml:"stake_delta"` } func (m *MsgUpdateResourceNodeStake) Reset() { *m = MsgUpdateResourceNodeStake{} } @@ -715,11 +715,11 @@ func (m *MsgUpdateResourceNodeStake) GetIncrStake() bool { return false } -func (m *MsgUpdateResourceNodeStake) GetStakeDelta() types1.DecCoin { +func (m *MsgUpdateResourceNodeStake) GetStakeDelta() types1.Coin { if m != nil { return m.StakeDelta } - return types1.DecCoin{} + return types1.Coin{} } // MsgUpdateResourceNodeStakeResponse defines the Msg/UpdateResourceNodeStake response type. @@ -839,10 +839,10 @@ var xxx_messageInfo_MsgUpdateEffectiveStakeResponse proto.InternalMessageInfo // MsgUpdateMetaNodeStake defines a SDK message for updating the stake of an existing meta node. type MsgUpdateMetaNodeStake struct { - NetworkAddress string `protobuf:"bytes,1,opt,name=network_address,json=networkAddress,proto3" json:"network_address" yaml:"network_address"` - OwnerAddress string `protobuf:"bytes,2,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address" yaml:"owner_address"` - IncrStake bool `protobuf:"varint,3,opt,name=incr_stake,json=incrStake,proto3" json:"incr_stake" yaml:"incr_stake"` - StakeDelta types1.DecCoin `protobuf:"bytes,4,opt,name=stake_delta,json=stakeDelta,proto3" json:"stake_delta" yaml:"stake_delta"` + NetworkAddress string `protobuf:"bytes,1,opt,name=network_address,json=networkAddress,proto3" json:"network_address" yaml:"network_address"` + OwnerAddress string `protobuf:"bytes,2,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address" yaml:"owner_address"` + IncrStake bool `protobuf:"varint,3,opt,name=incr_stake,json=incrStake,proto3" json:"incr_stake" yaml:"incr_stake"` + StakeDelta types1.Coin `protobuf:"bytes,4,opt,name=stake_delta,json=stakeDelta,proto3" json:"stake_delta" yaml:"stake_delta"` } func (m *MsgUpdateMetaNodeStake) Reset() { *m = MsgUpdateMetaNodeStake{} } @@ -899,11 +899,11 @@ func (m *MsgUpdateMetaNodeStake) GetIncrStake() bool { return false } -func (m *MsgUpdateMetaNodeStake) GetStakeDelta() types1.DecCoin { +func (m *MsgUpdateMetaNodeStake) GetStakeDelta() types1.Coin { if m != nil { return m.StakeDelta } - return types1.DecCoin{} + return types1.Coin{} } // MsgUpdateResourceNodeStakeResponse defines the Msg/UpdateResourceNodeStake response type. @@ -1083,98 +1083,98 @@ func init() { func init() { proto.RegisterFile("stratos/register/v1/tx.proto", fileDescriptor_75d4b90d7a185a31) } var fileDescriptor_75d4b90d7a185a31 = []byte{ - // 1442 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0xcd, 0x6f, 0x1b, 0x45, - 0x14, 0xcf, 0xda, 0x69, 0x69, 0xa6, 0x4d, 0xda, 0xb8, 0x49, 0xe3, 0xba, 0x89, 0xc7, 0x9d, 0xd2, - 0x90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0x1d, 0x42, - 0xfc, 0x5e, 0x02, 0x8b, 0x19, 0x10, 0x39, 0x45, 0x57, 0x77, 0xb7, 0x3e, 0x67, 0xe8, 0xc6, 0x1e, - 0x8c, 0xf7, 0x46, 0xd0, 0xf0, 0xc3, 0x06, 0x27, 0xe8, 0xcf, 0x12, 0x38, 0x2d, 0x70, 0x67, 0x5e, - 0x4b, 0xce, 0x67, 0xe1, 0xc9, 0xf2, 0xa8, 0x5c, 0xda, 0xab, 0x87, 0x08, 0xe3, 0x12, 0x0b, 0x63, - 0x1d, 0x9d, 0x4f, 0x0d, 0x23, 0xc4, 0x6f, 0x46, 0x26, 0x68, 0x7a, 0x87, 0x68, 0x63, 0xeb, 0xe1, - 0xe3, 0xaa, 0xf4, 0xe8, 0x71, 0x55, 0xfa, 0xeb, 0x71, 0x55, 0xfa, 0xe2, 0x49, 0x75, 0xe2, 0xd1, - 0x93, 0xea, 0xc4, 0xef, 0x4f, 0xaa, 0x13, 0x9f, 0x5c, 0x88, 0x5c, 0xcd, 0xfd, 0x59, 0x0d, 0x6c, - 0x07, 0x7f, 0xd7, 0xda, 0x77, 0x34, 0xdd, 0x50, 0xee, 0x85, 0x0b, 0xb1, 0xcb, 0x7a, 0xeb, 0x20, - 0xfb, 0x8a, 0xb9, 0xf1, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x50, 0x5f, 0xac, 0xad, 0x79, 0x18, - 0x00, 0x00, + // 1443 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0xcf, 0x6f, 0x1b, 0x45, + 0x14, 0xce, 0xda, 0x69, 0x69, 0xa6, 0x4d, 0xda, 0xb8, 0x49, 0xe3, 0xb8, 0x89, 0xc7, 0x9d, 0xd2, + 0x90, 0x12, 0xb2, 0x5b, 0x27, 0x45, 0x2d, 0x95, 0x00, 0xd5, 0x2d, 0x12, 0x08, 0x25, 0x45, 0x4b, +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 0xf7, 0x8b, 0xf2, 0x26, 0x98, 0x32, + 0x71, 0x97, 0x98, 0x36, 0x36, 0xbd, 0x72, 0xe4, 0x57, 0xa7, 0xf8, 0xf2, 0x12, 0xc6, 0x70, 0x79, + 0x09, 0x13, 0x52, 0x43, 0x77, 0x41, 0x05, 0x33, 0x41, 0xa3, 0xce, 0xd2, 0x58, 0xcc, 0xb1, 0x51, + 0xd6, 0x1c, 0x0a, 0x63, 0x1e, 0x97, 0xc2, 0xf9, 0xe8, 0x50, 0xdc, 0x8e, 0xd4, 0xe9, 0xc0, 0x70, + 0xcd, 0x6b, 0x27, 0x29, 0x25, 0xff, 0x2c, 0x94, 0x72, 0x4f, 0x02, 0xc7, 0x70, 0x10, 0x7f, 0xdd, + 0x26, 0x3b, 0xd8, 0x08, 0x2e, 0x0d, 0x37, 0xbd, 0x02, 0xfc, 0x4e, 0xe1, 0x4a, 0x5b, 0xb7, 0x6f, + 0xf7, 0x1a, 0x72, 0x93, 0x74, 0xfc, 0x27, 0x81, 0xff, 0xb3, 0x6e, 0xb5, 0x76, 0x14, 0x6f, 0x73, + 0xb1, 0xe4, 0x77, 0x0c, 0xdb, 0xa1, 0x70, 0x64, 0x24, 0x97, 0xc2, 0x05, 0x4e, 0x24, 0xee, 0x41, + 0xea, 0x51, 0x61, 0xba, 0xce, 0x2c, 0x97, 0x26, 0xef, 0xdd, 0x87, 0x13, 0xe8, 0x14, 0x80, 0x29, + 0x85, 0x11, 0xc5, 0xfb, 0x2b, 0x07, 0x4e, 0x8c, 0x2c, 0xb9, 0xfd, 0x05, 0xf5, 0x9c, 0x16, 0x54, + 0x05, 0x94, 0x93, 0x93, 0x2d, 0xea, 0xf1, 0xe5, 0x24, 0x38, 0xb9, 0x65, 0xb5, 0xc3, 0xcd, 0xcf, + 0x3b, 0x08, 0x4c, 0xf6, 0xb0, 0xbc, 0x41, 0x6c, 0x5c, 0xf8, 0x08, 0x2c, 0x36, 0x35, 0xa3, 0xa5, + 0x7b, 0x23, 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, 0x44, 0x29, 0x27, 0xbc, 0x54, 0x52, 0x29, 0x8f, + 0x62, 0xd3, 0x29, 0x67, 0xbc, 0x14, 0xb2, 0x29, 0x9b, 0xac, 0x63, 0x16, 0xe5, 0x84, 0x0b, 0x78, + 0x2a, 0xe5, 0x51, 0x6c, 0x3a, 0xe5, 0x8c, 0x8b, 0x66, 0x36, 0xe5, 0x1e, 0xeb, 0x18, 0xa3, 0xfc, + 0x83, 0x04, 0x2a, 0x19, 0x94, 0xf9, 0xd6, 0xa8, 0xec, 0x9d, 0x0b, 0xeb, 0x50, 0xba, 0x30, 0x66, + 0x07, 0x11, 0xc1, 0x05, 0x16, 0x41, 0x15, 0x29, 0x7b, 0x8e, 0x80, 0xef, 0xe4, 0x85, 0xef, 0x24, + 0xb0, 0x1c, 0x8b, 0x23, 0x76, 0x0f, 0x79, 0x25, 0x9b, 0x53, 0x14, 0x5d, 0x3a, 0x3f, 0x0e, 0x5a, + 0xd0, 0xdf, 0x64, 0xf4, 0xd7, 0xd1, 0x5a, 0x16, 0xfd, 0xf0, 0xec, 0xe6, 0xd4, 0xef, 0x4b, 0x60, + 0x21, 0xb6, 0x36, 0xc5, 0x23, 0x61, 0x25, 0x7b, 0xad, 0x05, 0xb8, 0x92, 0xbc, 0x37, 0x9c, 0x20, + 0xba, 0xce, 0x88, 0xbe, 0x84, 0xce, 0x64, 0xad, 0x47, 0xf1, 0xb4, 0x8d, 0x52, 0x8c, 0xbd, 0x9d, + 0x57, 0xb2, 0xd7, 0xd6, 0x93, 0x29, 0xa6, 0xbc, 0x63, 0xb3, 0x29, 0xfa, 0xeb, 0x2f, 0x85, 0x62, + 0xec, 0xa9, 0xb5, 0x92, 0x5d, 0xcc, 0x27, 0x53, 0x4c, 0x79, 0x8e, 0x64, 0x53, 0xf4, 0xcb, 0x1d, + 0x52, 0xfc, 0x56, 0x02, 0x4b, 0x29, 0x14, 0xb9, 0x44, 0xd7, 0xf6, 0x36, 0x3f, 0x57, 0xe8, 0xe6, + 0x18, 0xe0, 0xf1, 0x04, 0x1a, 0x7e, 0xd2, 0xe0, 0x02, 0xfd, 0x51, 0x02, 0xa7, 0x04, 0xef, 0xd4, + 0x6b, 0xc9, 0xb9, 0x34, 0x3e, 0x69, 0x3d, 0x4a, 0x17, 0xc7, 0xed, 0x21, 0xc2, 0xb8, 0xc8, 0xc2, + 0xd8, 0x40, 0xe7, 0x12, 0xc3, 0x08, 0xf9, 0x9b, 0x43, 0x03, 0xd4, 0xbd, 0x43, 0xb4, 0xb6, 0xfd, + 0xe0, 0x51, 0x59, 0x7a, 0xf8, 0xa8, 0x2c, 0xfd, 0xf1, 0xa8, 0x2c, 0x7d, 0xfa, 0xb8, 0x3c, 0xf1, + 0xf0, 0x71, 0x79, 0xe2, 0xd7, 0xc7, 0xe5, 0x89, 0x0f, 0xcf, 0x0f, 0xdd, 0xcb, 0xfd, 0x51, 0x0d, + 0x6c, 0x07, 0x7f, 0xd7, 0x9b, 0xb7, 0x35, 0xdd, 0x50, 0xee, 0x86, 0x13, 0xb1, 0x9b, 0x7a, 0xe3, + 0x20, 0xfb, 0x78, 0xb9, 0xf9, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x4d, 0xa3, 0x3f, 0x63, 0x6d, + 0x18, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/sds/client/cli/tx.go b/x/sds/client/cli/tx.go index 53a5470d..baa379b9 100644 --- a/x/sds/client/cli/tx.go +++ b/x/sds/client/cli/tx.go @@ -148,9 +148,8 @@ func newBuildPrepayMsg(clientCtx client.Context, txf tx.Factory, fs *flag.FlagSe return txf, nil, err } - decAmount := sdk.NewDecCoinFromCoin(amount) // build and sign the transaction, then broadcast to Tendermint - msg := types.NewMsgPrepay(clientCtx.GetFromAddress().String(), sdk.NewDecCoins(decAmount)) + msg := types.NewMsgPrepay(clientCtx.GetFromAddress().String(), sdk.NewCoins(amount)) return txf, msg, nil } diff --git a/x/sds/client/rest/rest.go b/x/sds/client/rest/rest.go index c401aaba..58efe667 100644 --- a/x/sds/client/rest/rest.go +++ b/x/sds/client/rest/rest.go @@ -26,5 +26,5 @@ type FileUploadReq struct { // PrepayReq defines the properties of a prepay request's body. type PrepayReq struct { BaseReq sdktrest.BaseReq `json:"base_req" yaml:"base_req"` - Amount sdk.DecCoins `json:"amount" yaml:"amount"` + Amount sdk.Coins `json:"amount" yaml:"amount"` } diff --git a/x/sds/keeper/grpc_query.go b/x/sds/keeper/grpc_query.go index 37fa044f..3b70c574 100644 --- a/x/sds/keeper/grpc_query.go +++ b/x/sds/keeper/grpc_query.go @@ -53,8 +53,7 @@ func (q Querier) SimPrepay(c context.Context, request *types.QuerySimPrepayReque return &types.QuerySimPrepayResponse{}, status.Error(codes.InvalidArgument, "Amount cannot be empty") } ctx := sdk.UnwrapSDKContext(c) - amount := sdk.NormalizeCoins(request.GetAmount()) - noz := q.simulatePurchaseNoz(ctx, amount) + noz := q.simulatePurchaseNoz(ctx, request.GetAmount()) return &types.QuerySimPrepayResponse{Noz: noz}, nil } diff --git a/x/sds/keeper/msg_server.go b/x/sds/keeper/msg_server.go index 4d766c23..2d92bcdf 100644 --- a/x/sds/keeper/msg_server.go +++ b/x/sds/keeper/msg_server.go @@ -76,8 +76,7 @@ func (k msgServer) HandleMsgPrepay(c context.Context, msg *types.MsgPrepay) (*ty return &types.MsgPrepayResponse{}, sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, err.Error()) } - amount := sdk.NormalizeCoins(msg.GetAmount()) - purchased, err := k.Prepay(ctx, sender, amount) + purchased, err := k.Prepay(ctx, sender, msg.GetAmount()) if err != nil { return nil, sdkerrors.Wrap(types.ErrPrepayFailure, err.Error()) } @@ -86,7 +85,7 @@ func (k msgServer) HandleMsgPrepay(c context.Context, msg *types.MsgPrepay) (*ty sdk.NewEvent( types.EventTypePrepay, sdk.NewAttribute(sdk.AttributeKeySender, msg.GetSender()), - sdk.NewAttribute(types.AttributeKeyAmount, amount.String()), + sdk.NewAttribute(types.AttributeKeyAmount, msg.GetAmount().String()), sdk.NewAttribute(types.AttributeKeyPurchasedNoz, purchased.String()), ), sdk.NewEvent( diff --git a/x/sds/types/msg.go b/x/sds/types/msg.go index b87d739a..f4c1f65a 100644 --- a/x/sds/types/msg.go +++ b/x/sds/types/msg.go @@ -91,7 +91,7 @@ func (msg MsgFileUpload) ValidateBasic() error { } // NewMsgPrepay NewMsg creates a new Msg instance -func NewMsgPrepay(sender string, amount sdk.DecCoins) *MsgPrepay { +func NewMsgPrepay(sender string, amount sdk.Coins) *MsgPrepay { return &MsgPrepay{ Sender: sender, Amount: amount, diff --git a/x/sds/types/query.pb.go b/x/sds/types/query.pb.go index 8b2dc17b..91328d2b 100644 --- a/x/sds/types/query.pb.go +++ b/x/sds/types/query.pb.go @@ -123,7 +123,7 @@ func (m *QueryFileUploadResponse) GetFileInfo() *FileInfo { } type QuerySimPrepayRequest struct { - Amount github_com_cosmos_cosmos_sdk_types.DecCoins `protobuf:"bytes,1,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.DecCoins" json:"amount" yaml:"amount"` + Amount github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount" yaml:"amount"` } func (m *QuerySimPrepayRequest) Reset() { *m = QuerySimPrepayRequest{} } @@ -159,7 +159,7 @@ func (m *QuerySimPrepayRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QuerySimPrepayRequest proto.InternalMessageInfo -func (m *QuerySimPrepayRequest) GetAmount() github_com_cosmos_cosmos_sdk_types.DecCoins { +func (m *QuerySimPrepayRequest) GetAmount() github_com_cosmos_cosmos_sdk_types.Coins { if m != nil { return m.Amount } @@ -449,54 +449,54 @@ func init() { func init() { proto.RegisterFile("stratos/sds/v1/query.proto", fileDescriptor_5b213ac8f144321e) } var fileDescriptor_5b213ac8f144321e = []byte{ - // 750 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0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94, 0xab, 0x4a, 0x69, 0xf5, 0x2f, 0x73, 0xe7, - 0x57, 0x00, 0x00, 0x00, 0xff, 0xff, 0xe1, 0xf2, 0x67, 0x69, 0x01, 0x07, 0x00, 0x00, + // 745 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0xcd, 0x4f, 0x13, 0x4d, + 0x1c, 0xee, 0x42, 0x68, 0xe8, 0xf0, 0xbe, 0x6f, 0xde, 0x8c, 0x58, 0xca, 0x42, 0x76, 0x71, 0x94, + 0x0f, 0x0f, 0xec, 0xa4, 0x18, 0x2e, 0x1e, 0xc1, 0x2f, 0x62, 0xa2, 0xb5, 0x84, 0x8b, 0x89, 0x21, + 0xd3, 0x76, 0x68, 0x37, 0x76, 0x67, 0x96, 0xce, 0xb6, 0xb1, 0x35, 0x72, 0xf0, 0xe2, 0xcd, 0x98, + 0x78, 0xf0, 0x7f, 0xf0, 0x2f, 0xe1, 0x48, 0xe2, 0xc5, 0x78, 0x58, 0x0d, 0x18, 0x0f, 0x1c, 0xfb, + 0x17, 0x98, 0xf9, 0x68, 0x4b, 0x97, 0x22, 0x72, 0xea, 0xee, 0xef, 0xeb, 0x79, 0x9e, 0x5f, 0x7f, + 0x4f, 0x0b, 0x6c, 0x11, 0x35, 0x48, 0xc4, 0x05, 0x16, 0x15, 0x81, 0x5b, 0x79, 0xbc, 0xdf, 0xa4, + 0x8d, 0xb6, 0x17, 0x36, 0x78, 0xc4, 0xe1, 0x7f, 0x26, 0xe7, 0x89, 0x8a, 0xf0, 0x5a, 0x79, 0x7b, + 0xba, 0xca, 0xab, 0x5c, 0xa5, 0xb0, 0x7c, 0xd2, 0x55, 0xf6, 0x7c, 0x95, 0xf3, 0x6a, 0x9d, 0x62, + 0x12, 0xfa, 0x98, 0x30, 0xc6, 0x23, 0x12, 0xf9, 0x9c, 0x09, 0x93, 0x75, 0xca, 0x5c, 0x04, 0x5c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a, 0x8e, 0xcf, 0x18, 0xc9, 0xf4, 0x32, 0x1a, 0xf5, 0x1e, 0x57, 0xcb, 0x35, 0xe2, 0x33, + 0xfc, 0x4a, 0x8d, 0x53, 0xae, 0x2a, 0xa5, 0xd5, 0xdf, 0xcb, 0x9d, 0xdf, 0x01, 0x00, 0x00, 0xff, + 0xff, 0x57, 0x56, 0x3b, 0xbc, 0xfa, 0x06, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1401,7 +1401,7 @@ func (m *QuerySimPrepayRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Amount = append(m.Amount, types.DecCoin{}) + m.Amount = append(m.Amount, types.Coin{}) if err := m.Amount[len(m.Amount)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } diff --git a/x/sds/types/tx.pb.go b/x/sds/types/tx.pb.go index 200dec7f..e2987424 100644 --- a/x/sds/types/tx.pb.go +++ b/x/sds/types/tx.pb.go @@ -136,8 +136,8 @@ func (m *MsgFileUploadResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgFileUploadResponse proto.InternalMessageInfo type MsgPrepay struct { - Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender" yaml:"sender"` - Amount github_com_cosmos_cosmos_sdk_types.DecCoins `protobuf:"bytes,2,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.DecCoins" json:"amount" yaml:"amount"` + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender" yaml:"sender"` + Amount github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount" yaml:"amount"` } func (m *MsgPrepay) Reset() { *m = MsgPrepay{} } @@ -180,7 +180,7 @@ func (m *MsgPrepay) GetSender() string { return "" } -func (m *MsgPrepay) GetAmount() github_com_cosmos_cosmos_sdk_types.DecCoins { +func (m *MsgPrepay) GetAmount() github_com_cosmos_cosmos_sdk_types.Coins { if m != nil { return m.Amount } @@ -233,42 +233,41 @@ func init() { func init() { proto.RegisterFile("stratos/sds/v1/tx.proto", fileDescriptor_a5a216e2f9435b27) } var fileDescriptor_a5a216e2f9435b27 = []byte{ - // 547 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x53, 0xc1, 0x6f, 0xd3, 0x3e, - 0x18, 0x6d, 0xda, 0xa9, 0x5a, 0x3d, 0xed, 0xb7, 0x1f, 0x19, 0xd0, 0xd0, 0x6d, 0xc9, 0x66, 0x84, - 0x34, 0x69, 0x5a, 0xac, 0x6e, 0x37, 0x90, 0x38, 0x14, 0x84, 0xc6, 0xa1, 0x08, 0x45, 0xe2, 0xc2, - 0x05, 0xb9, 0xad, 0x97, 0x46, 0x24, 0x76, 0x94, 0xcf, 0xad, 0xd6, 0x1b, 0x42, 0xfc, 0x01, 0x48, - 0xfc, 0x17, 0xfc, 0x23, 0xec, 0x38, 0x89, 0x0b, 0xa7, 0x80, 0x5a, 0x4e, 0x3d, 0xf6, 0x80, 0xc4, - 0x0d, 0xc5, 0x4e, 0x52, 0x3a, 0x01, 0xa7, 0xd8, 0xef, 0xf9, 0xbd, 0xcf, 0xfe, 0xde, 0x17, 0xd4, - 0x04, 0x99, 0x50, 0x29, 0x80, 0xc0, 0x00, 0xc8, 0xb8, 0x4d, 0xe4, 0x85, 0x1b, 0x27, 0x42, 0x0a, - 0xf3, 0xbf, 0x9c, 0x70, 0x61, 0x00, 0xee, 0xb8, 0xdd, 0xba, 0xe9, 0x0b, 0x5f, 0x28, 0x8a, 0x64, - 0x2b, 0x7d, 0xaa, 0xb5, 0xeb, 0x0b, 0xe1, 0x87, 0x8c, 0xd0, 0x38, 0x20, 0x94, 0x73, 0x21, 0xa9, - 0x0c, 0x04, 0x87, 0x9c, 0xb5, 0xfb, 0x02, 0x22, 0x01, 0xa4, 0x47, 0x81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2, 0x80, 0x93, 0x0b, 0x65, 0xa7, 0x9a, 0xdd, - 0xab, 0xab, 0xdf, 0xe7, 0xf4, 0x57, 0x00, 0x00, 0x00, 0xff, 0xff, 0x99, 0xd0, 0xe7, 0xee, 0xbd, - 0x03, 0x00, 0x00, + // 544 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x53, 0xc1, 0x6b, 0x13, 0x4f, + 0x18, 0xcd, 0xb6, 0x25, 0x34, 0x53, 0xfa, 0xeb, 0xcf, 0xad, 0x9a, 0x6d, 0x6a, 0x77, 0xda, 0x11, + 0x21, 0x20, 0xdd, 0x21, 0xed, 0x4d, 0xc1, 0x43, 0x04, 0xa9, 0x48, 0x40, 0x16, 0xbc, 0x78, 0x91, + 0x49, 0x32, 0xdd, 0x2c, 0xee, 0xce, 0x2c, 0xfb, 0x4d, 0x42, 0x73, 0x11, 0xf1, 0x2f, 0x10, 0xfc, + 0x2f, 0xfc, 0x2b, 0x3c, 0xf6, 0x58, 0xf0, 0xe2, 0x69, 0x95, 0xc4, 0x53, 0x8e, 0x39, 0x08, 0xde, + 0x64, 0x67, 0x36, 0x1b, 0x53, 0xd4, 0xd3, 0xce, 0xbc, 0x37, 0xef, 0x7d, 0x33, 0xef, 0xfb, 0x16, + 0xd5, 0x41, 0xa5, 0x4c, 0x49, 0xa0, 0xd0, 0x07, 0x3a, 0x6a, 0x51, 0x75, 0xe1, 0x25, 0xa9, 0x54, + 0xd2, 0xfe, 0xaf, 0x20, 0x3c, 0xe8, 0x83, 0x37, 0x6a, 0x35, 0x6e, 0x06, 0x32, 0x90, 0x9a, 0xa2, + 0xf9, 0xca, 0x9c, 0x6a, 0xdc, 0x09, 0xa4, 0x0c, 0x22, 0x4e, 0x59, 0x12, 0x52, 0x26, 0x84, 0x54, + 0x4c, 0x85, 0x52, 0x40, 0xc1, 0xba, 0x3d, 0x09, 0xb1, 0x04, 0xda, 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xa0, 0x17, 0xda, 0x4e, 0x27, 0xdd, 0xad, 0xea, 0xff, + 0xe6, 0xf4, 0x57, 0x00, 0x00, 0x00, 0xff, 0xff, 0x64, 0xe5, 0x8e, 0x05, 0xb6, 0x03, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -927,7 +926,7 @@ func (m *MsgPrepay) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Amount = append(m.Amount, types.DecCoin{}) + m.Amount = append(m.Amount, types.Coin{}) if err := m.Amount[len(m.Amount)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } From ff4ee11c184e45071df8f50ec9d182000f830aa9 Mon Sep 17 00:00:00 2001 From: alexstratos Date: Fri, 24 Feb 2023 17:02:30 -0500 Subject: [PATCH 28/95] bump version to v0.10.0 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 29cce82c..e2b92ac3 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ BUILDDIR ?= $(CURDIR)/build -APP_VER := v0.9.1 +APP_VER := v0.10.0 COMMIT := $(GIT_COMMIT_HASH) TEST_DOCKER_REPO=stratos-chain-e2e From ee5fd8fd8cc294ee369602697c0d228ef9722f18 Mon Sep 17 00:00:00 2001 From: BoThe1K Date: Fri, 3 Mar 2023 18:06:54 +0100 Subject: [PATCH 29/95] Apply fix with baseFee --- app/ante/ante.go | 3 - app/ante/eip712.go | 277 --------------------- app/ante/eth.go | 33 +-- app/ante/handler_options.go | 23 -- proto/stratos/types/v1/web3.proto | 25 -- rpc/backend/evm_backend.go | 82 ++++-- rpc/types/types.go | 7 +- rpc/types/utils.go | 2 + types/codec.go | 7 - types/web3.pb.go | 397 ------------------------------ x/evm/keeper/eip1559.go | 9 +- 11 files changed, 86 insertions(+), 779 deletions(-) delete mode 100644 app/ante/eip712.go delete mode 100644 proto/stratos/types/v1/web3.proto delete mode 100644 types/web3.pb.go diff --git a/app/ante/ante.go b/app/ante/ante.go index 72b37b53..12962846 100644 --- a/app/ante/ante.go +++ b/app/ante/ante.go @@ -39,9 +39,6 @@ func NewAnteHandler(options HandlerOptions) sdk.AnteHandler { case "/stratos.evm.v1.ExtensionOptionsEthereumTx": // handle as *evmtypes.MsgEthereumTx anteHandler = newEthAnteHandler(options) - case "/stratos.types.v1.ExtensionOptionsWeb3Tx": - // handle as normal Cosmos SDK tx, except signature is checked for EIP712 representation - anteHandler = newCosmosAnteHandlerEip712(options) default: return ctx, sdkerrors.Wrapf( sdkerrors.ErrUnknownExtensionOptions, diff --git a/app/ante/eip712.go b/app/ante/eip712.go deleted file mode 100644 index eaf03334..00000000 --- a/app/ante/eip712.go +++ /dev/null @@ -1,277 +0,0 @@ -package ante - -import ( - "fmt" - "math/big" - - "github.com/cosmos/cosmos-sdk/codec" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" - cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/cosmos/cosmos-sdk/types/tx/signing" - authante "github.com/cosmos/cosmos-sdk/x/auth/ante" - "github.com/cosmos/cosmos-sdk/x/auth/legacy/legacytx" - authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" - - ethcrypto "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/crypto/secp256k1" - - "github.com/stratosnet/stratos-chain/crypto/ethsecp256k1" - "github.com/stratosnet/stratos-chain/ethereum/eip712" - stratos "github.com/stratosnet/stratos-chain/types" - evmtypes "github.com/stratosnet/stratos-chain/x/evm/types" -) - -var stratosCodec codec.ProtoCodecMarshaler - -func init() { - registry := codectypes.NewInterfaceRegistry() - stratos.RegisterInterfaces(registry) - stratosCodec = codec.NewProtoCodec(registry) -} - -// Eip712SigVerificationDecorator Verify all signatures for a tx and return an error if any are invalid. Note, -// the Eip712SigVerificationDecorator decorator will not get executed on ReCheck. -// -// CONTRACT: Pubkeys are set in context for all signers before this decorator runs -// CONTRACT: Tx must implement SigVerifiableTx interface -type Eip712SigVerificationDecorator struct { - ak evmtypes.AccountKeeper - evmKeeper EVMKeeper - signModeHandler authsigning.SignModeHandler -} - -// NewEip712SigVerificationDecorator creates a new Eip712SigVerificationDecorator -func NewEip712SigVerificationDecorator(ak evmtypes.AccountKeeper, evmKeeper EVMKeeper, signModeHandler authsigning.SignModeHandler) Eip712SigVerificationDecorator { - return Eip712SigVerificationDecorator{ - ak: ak, - evmKeeper: evmKeeper, - signModeHandler: signModeHandler, - } -} - -// AnteHandle handles validation of EIP712 signed cosmos txs. -// it is not run on RecheckTx -func (svd Eip712SigVerificationDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (newCtx sdk.Context, err error) { - // no need to verify signatures on recheck tx - if ctx.IsReCheckTx() { - return next(ctx, tx, simulate) - } - - sigTx, ok := tx.(authsigning.SigVerifiableTx) - if !ok { - return ctx, sdkerrors.Wrapf(sdkerrors.ErrInvalidType, "tx %T doesn't implement authsigning.SigVerifiableTx", tx) - } - - authSignTx, ok := tx.(authsigning.Tx) - if !ok { - return ctx, sdkerrors.Wrapf(sdkerrors.ErrInvalidType, "tx %T doesn't implement the authsigning.Tx interface", tx) - } - - // stdSigs contains the sequence number, account number, and signatures. - // When simulating, this would just be a 0-length slice. - sigs, err := sigTx.GetSignaturesV2() - if err != nil { - return ctx, err - } - - signerAddrs := sigTx.GetSigners() - - // EIP712 allows just one signature - if len(sigs) != 1 { - return ctx, sdkerrors.Wrapf(sdkerrors.ErrUnauthorized, "invalid number of signers (%d); EIP712 signatures allows just one signature", len(sigs)) - } - - // check that signer length and signature length are the same - if len(sigs) != len(signerAddrs) { - return ctx, sdkerrors.Wrapf(sdkerrors.ErrUnauthorized, "invalid number of signer; expected: %d, got %d", len(signerAddrs), len(sigs)) - } - - // EIP712 has just one signature, avoid looping here and only read index 0 - i := 0 - sig := sigs[i] - - acc, err := authante.GetSignerAcc(ctx, svd.ak, signerAddrs[i]) - if err != nil { - return ctx, err - } - - // retrieve pubkey - pubKey := acc.GetPubKey() - if !simulate && pubKey == nil { - return ctx, sdkerrors.Wrap(sdkerrors.ErrInvalidPubKey, "pubkey on account is not set") - } - - // Check account sequence number. - if sig.Sequence != acc.GetSequence() { - return ctx, sdkerrors.Wrapf( - sdkerrors.ErrWrongSequence, - "account sequence mismatch, expected %d, got %d", acc.GetSequence(), sig.Sequence, - ) - } - - // retrieve signer data - genesis := ctx.BlockHeight() == 0 - evmParams := svd.evmKeeper.GetParams(ctx) - ethChainId := evmParams.GetChainConfig().EthereumConfig().ChainID.String() - - var accNum uint64 - if !genesis { - accNum = acc.GetAccountNumber() - } - - signerData := authsigning.SignerData{ - ChainID: ethChainId, - AccountNumber: accNum, - Sequence: acc.GetSequence(), - } - - if simulate { - return next(ctx, tx, simulate) - } - - if err := VerifySignature(pubKey, signerData, sig.Data, svd.signModeHandler, authSignTx); err != nil { - errMsg := fmt.Errorf("signature verification failed; please verify account number (%d) and chain-id (%s): %w", accNum, ethChainId, err) - return ctx, sdkerrors.Wrap(sdkerrors.ErrUnauthorized, errMsg.Error()) - } - - return next(ctx, tx, simulate) -} - -// VerifySignature verifies a transaction signature contained in SignatureData abstracting over different signing modes -// and single vs multi-signatures. -func VerifySignature( - pubKey cryptotypes.PubKey, - signerData authsigning.SignerData, - sigData signing.SignatureData, - _ authsigning.SignModeHandler, - tx authsigning.Tx, -) error { - switch data := sigData.(type) { - case *signing.SingleSignatureData: - if data.SignMode != signing.SignMode_SIGN_MODE_LEGACY_AMINO_JSON { - return sdkerrors.Wrapf(sdkerrors.ErrNotSupported, "unexpected SignatureData %T: wrong SignMode", sigData) - } - - // Note: this prevents the user from sending thrash data in the signature field - if len(data.Signature) != 0 { - return sdkerrors.Wrap(sdkerrors.ErrTooManySignatures, "invalid signature value; EIP712 must have the cosmos transaction signature empty") - } - - // @contract: this code is reached only when Msg has Web3Tx extension (so this custom Ante handler flow), - // and the signature is SIGN_MODE_LEGACY_AMINO_JSON which is supported for EIP712 for now - - msgs := tx.GetMsgs() - if len(msgs) == 0 { - return sdkerrors.Wrap(sdkerrors.ErrNoSignatures, "tx doesn't contain any msgs to verify signature") - } - - txBytes := legacytx.StdSignBytes( - signerData.ChainID, - signerData.AccountNumber, - signerData.Sequence, - tx.GetTimeoutHeight(), - legacytx.StdFee{ - Amount: tx.GetFee(), - Gas: tx.GetGas(), - }, - msgs, tx.GetMemo(), - ) - - signerChainID, ok := new(big.Int).SetString(signerData.ChainID, 10) - if !ok { - return sdkerrors.Wrapf(sdkerrors.ErrUnknownExtensionOptions, "failed to parse chainID: %s", signerData.ChainID) - } - - txWithExtensions, ok := tx.(authante.HasExtensionOptionsTx) - if !ok { - return sdkerrors.Wrap(sdkerrors.ErrUnknownExtensionOptions, "tx doesnt contain any extensions") - } - opts := txWithExtensions.GetExtensionOptions() - if len(opts) != 1 { - return sdkerrors.Wrap(sdkerrors.ErrUnknownExtensionOptions, "tx doesnt contain expected amount of extension options") - } - - var optIface stratos.ExtensionOptionsWeb3TxI - - if err := stratosCodec.UnpackAny(opts[0], &optIface); err != nil { - return sdkerrors.Wrap(err, "failed to proto-unpack ExtensionOptionsWeb3Tx") - } - - extOpt, ok := optIface.(*stratos.ExtensionOptionsWeb3Tx) - if !ok { - return sdkerrors.Wrap(sdkerrors.ErrInvalidChainID, "unknown extension option") - } - - if extOpt.TypedDataChainID != signerChainID.Uint64() { - return sdkerrors.Wrap(sdkerrors.ErrInvalidChainID, "invalid chainID") - } - - if len(extOpt.FeePayer) == 0 { - return sdkerrors.Wrap(sdkerrors.ErrUnknownExtensionOptions, "no feePayer on ExtensionOptionsWeb3Tx") - } - feePayer, err := sdk.AccAddressFromBech32(extOpt.FeePayer) - if err != nil { - return sdkerrors.Wrap(err, "failed to parse feePayer from ExtensionOptionsWeb3Tx") - } - - feeDelegation := &eip712.FeeDelegationOptions{ - FeePayer: feePayer, - } - - typedData, err := eip712.WrapTxToTypedData(stratosCodec, extOpt.TypedDataChainID, msgs[0], txBytes, feeDelegation) - if err != nil { - return sdkerrors.Wrap(err, "failed to pack tx data in EIP712 object") - } - - sigHash, err := eip712.ComputeTypedDataHash(typedData) - if err != nil { - return err - } - - feePayerSig := extOpt.FeePayerSig - if len(feePayerSig) != ethcrypto.SignatureLength { - return sdkerrors.Wrap(sdkerrors.ErrorInvalidSigner, "signature length doesn't match typical [R||S||V] signature 65 bytes") - } - - // Remove the recovery offset if needed (ie. Metamask eip712 signature) - if feePayerSig[ethcrypto.RecoveryIDOffset] == 27 || feePayerSig[ethcrypto.RecoveryIDOffset] == 28 { - feePayerSig[ethcrypto.RecoveryIDOffset] -= 27 - } - - feePayerPubkey, err := secp256k1.RecoverPubkey(sigHash, feePayerSig) - if err != nil { - return sdkerrors.Wrap(err, "failed to recover delegated fee payer from sig") - } - - ecPubKey, err := ethcrypto.UnmarshalPubkey(feePayerPubkey) - if err != nil { - return sdkerrors.Wrap(err, "failed to unmarshal recovered fee payer pubkey") - } - - pk := ðsecp256k1.PubKey{ - Key: ethcrypto.CompressPubkey(ecPubKey), - } - - if !pubKey.Equals(pk) { - return sdkerrors.Wrapf(sdkerrors.ErrInvalidPubKey, "feePayer pubkey %s is different from transaction pubkey %s", pubKey, pk) - } - - recoveredFeePayerAcc := sdk.AccAddress(pk.Address().Bytes()) - - if !recoveredFeePayerAcc.Equals(feePayer) { - return sdkerrors.Wrapf(sdkerrors.ErrorInvalidSigner, "failed to verify delegated fee payer %s signature", recoveredFeePayerAcc) - } - - // VerifySignature of ethsecp256k1 accepts 64 byte signature [R||S] - // WARNING! Under NO CIRCUMSTANCES try to use pubKey.VerifySignature there - if !secp256k1.VerifySignature(pubKey.Bytes(), sigHash, feePayerSig[:len(feePayerSig)-1]) { - return sdkerrors.Wrap(sdkerrors.ErrorInvalidSigner, "unable to verify signer signature of EIP712 typed data") - } - - return nil - default: - return sdkerrors.Wrapf(sdkerrors.ErrTooManySignatures, "unexpected SignatureData %T", sigData) - } -} diff --git a/app/ante/eth.go b/app/ante/eth.go index 2a9d11b1..71add19b 100644 --- a/app/ante/eth.go +++ b/app/ante/eth.go @@ -550,21 +550,26 @@ func (mfd EthMempoolFeeDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulat if ctx.IsCheckTx() && !simulate { params := mfd.evmKeeper.GetParams(ctx) ethCfg := params.ChainConfig.EthereumConfig() + evmDenom := params.EvmDenom baseFee := mfd.evmKeeper.GetBaseFee(ctx, ethCfg) - if baseFee == nil { - for _, msg := range tx.GetMsgs() { - ethMsg, ok := msg.(*evmtypes.MsgEthereumTx) - if !ok { - return ctx, sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "invalid message type %T, expected %T", msg, (*evmtypes.MsgEthereumTx)(nil)) - } - - evmDenom := params.EvmDenom - feeAmt := ethMsg.GetFee() - glDec := sdk.NewDec(int64(ethMsg.GetGas())) - requiredFee := ctx.MinGasPrices().AmountOf(evmDenom).Mul(glDec) - if sdk.NewDecFromBigInt(feeAmt).LT(requiredFee) { - return ctx, sdkerrors.Wrapf(sdkerrors.ErrInsufficientFee, "insufficient fees; got: %s required: %s", feeAmt, requiredFee) - } + + for _, msg := range tx.GetMsgs() { + ethMsg, ok := msg.(*evmtypes.MsgEthereumTx) + if !ok { + return ctx, sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "invalid message type %T, expected %T", msg, (*evmtypes.MsgEthereumTx)(nil)) + } + + var feeAmt *big.Int + // if base fee disabled, calculate without effective fee mechanics + if baseFee == nil { + feeAmt = ethMsg.GetFee() + } else { + feeAmt = ethMsg.GetEffectiveFee(baseFee) + } + glDec := sdk.NewDec(int64(ethMsg.GetGas())) + requiredFee := ctx.MinGasPrices().AmountOf(evmDenom).Mul(glDec) + if sdk.NewDecFromBigInt(feeAmt).LT(requiredFee) { + return ctx, sdkerrors.Wrapf(sdkerrors.ErrInsufficientFee, "insufficient fees; got: %s required: %s", feeAmt, requiredFee) } } } diff --git a/app/ante/handler_options.go b/app/ante/handler_options.go index d4987c71..507a0766 100644 --- a/app/ante/handler_options.go +++ b/app/ante/handler_options.go @@ -77,26 +77,3 @@ func newCosmosAnteHandler(options HandlerOptions) sdk.AnteHandler { ibcante.NewAnteDecorator(options.IBCKeeper), ) } - -func newCosmosAnteHandlerEip712(options HandlerOptions) sdk.AnteHandler { - return sdk.ChainAnteDecorators( - RejectMessagesDecorator{}, // reject MsgEthereumTxs - ante.NewSetUpContextDecorator(), - // NOTE: extensions option decorator removed - // ante.NewRejectExtensionOptionsDecorator(), - ante.NewMempoolFeeDecorator(), - ante.NewValidateBasicDecorator(), - ante.NewTxTimeoutHeightDecorator(), - ante.NewValidateMemoDecorator(options.AccountKeeper), - ante.NewConsumeGasForTxSizeDecorator(options.AccountKeeper), - ante.NewDeductFeeDecorator(options.AccountKeeper, options.BankKeeper, options.FeegrantKeeper), - // SetPubKeyDecorator must be called before all signature verification decorators - ante.NewSetPubKeyDecorator(options.AccountKeeper), - ante.NewValidateSigCountDecorator(options.AccountKeeper), - ante.NewSigGasConsumeDecorator(options.AccountKeeper, options.SigGasConsumer), - // Note: signature verification uses EIP instead of the cosmos signature validator - NewEip712SigVerificationDecorator(options.AccountKeeper, options.EvmKeeper, options.SignModeHandler), - ante.NewIncrementSequenceDecorator(options.AccountKeeper), - ibcante.NewAnteDecorator(options.IBCKeeper), - ) -} diff --git a/proto/stratos/types/v1/web3.proto b/proto/stratos/types/v1/web3.proto deleted file mode 100644 index e50c7699..00000000 --- a/proto/stratos/types/v1/web3.proto +++ /dev/null @@ -1,25 +0,0 @@ -syntax = "proto3"; -package stratos.types.v1; - -import "gogoproto/gogo.proto"; - -option go_package = "github.com/stratosnet/stratos-chain/types"; - -message ExtensionOptionsWeb3Tx { - option (gogoproto.goproto_getters) = false; - - // typed data chain id used only in EIP712 Domain and should match - // Ethereum network ID in a Web3 provider (e.g. Metamask). - uint64 typed_data_chain_id = 1 [ - (gogoproto.jsontag) = "typedDataChainID,omitempty", - (gogoproto.customname) = "TypedDataChainID" - ]; - - // fee payer is an account address for the fee payer. It will be validated - // during EIP712 signature checking. - string fee_payer = 2 [ (gogoproto.jsontag) = "feePayer,omitempty" ]; - - // fee payer sig is a signature data from the fee paying account, - // allows to perform fee delegation when using EIP712 Domain. - bytes fee_payer_sig = 3 [ (gogoproto.jsontag) = "feePayerSig,omitempty" ]; -} diff --git a/rpc/backend/evm_backend.go b/rpc/backend/evm_backend.go index 80693518..b0b08643 100644 --- a/rpc/backend/evm_backend.go +++ b/rpc/backend/evm_backend.go @@ -76,6 +76,12 @@ func (b *Backend) GetBlockByNumber(blockNum types.BlockNumber, fullTx bool) (*ty } res.Miner = validator + feeResp, err := b.GetEVMKeeper().BaseFee(sdk.WrapSDKContext(sdkCtx), nil) + if err != nil { + return nil, err + } + res.BaseFee = feeResp.BaseFee.BigInt() + return res, nil } @@ -112,6 +118,12 @@ func (b *Backend) GetBlockByHash(hash common.Hash, fullTx bool) (*types.Block, e } res.Miner = validator + feeResp, err := b.GetEVMKeeper().BaseFee(sdk.WrapSDKContext(sdkCtx), nil) + if err != nil { + return nil, err + } + res.BaseFee = feeResp.BaseFee.BigInt() + return res, nil } @@ -234,6 +246,12 @@ func (b *Backend) HeaderByNumber(blockNum types.BlockNumber) (*types.Header, err return nil, err } ethHeader.Coinbase = validator + + feeResp, err := b.GetEVMKeeper().BaseFee(sdk.WrapSDKContext(sdkCtx), nil) + if err != nil { + return nil, err + } + ethHeader.BaseFee = feeResp.BaseFee.BigInt() return ethHeader, nil } @@ -268,6 +286,12 @@ func (b *Backend) HeaderByHash(blockHash common.Hash) (*types.Header, error) { return nil, err } ethHeader.Coinbase = validator + + feeResp, err := b.GetEVMKeeper().BaseFee(sdk.WrapSDKContext(sdkCtx), nil) + if err != nil { + return nil, err + } + ethHeader.BaseFee = feeResp.BaseFee.BigInt() return ethHeader, nil } @@ -625,33 +649,37 @@ func (b *Backend) ChainConfig() *params.ChainConfig { // Although we don't support tx prioritization yet, but we return a positive value to help client to // mitigate the base fee changes. func (b *Backend) SuggestGasTipCap() (*big.Int, error) { - baseFee, err := b.BaseFee() - if err != nil { - // london hardfork not enabled or feemarket not enabled - return big.NewInt(0), nil - } - - sdkCtx := b.GetEVMContext().GetSdkContext() - params, err := b.GetEVMKeeper().Params(sdk.WrapSDKContext(sdkCtx), &evmtypes.QueryParamsRequest{}) - if err != nil { - return nil, err - } - // calculate the maximum base fee delta in current block, assuming all block gas limit is consumed - // ``` - // GasTarget = GasLimit / ElasticityMultiplier - // Delta = BaseFee * (GasUsed - GasTarget) / GasTarget / Denominator - // ``` - // The delta is at maximum when `GasUsed` is equal to `GasLimit`, which is: - // ``` - // MaxDelta = BaseFee * (GasLimit - GasLimit / ElasticityMultiplier) / (GasLimit / ElasticityMultiplier) / Denominator - // = BaseFee * (ElasticityMultiplier - 1) / Denominator - // ``` - maxDelta := baseFee.Int64() * (int64(params.Params.FeeMarketParams.ElasticityMultiplier) - 1) / int64(params.Params.FeeMarketParams.BaseFeeChangeDenominator) - if maxDelta < 0 { - // impossible if the parameter validation passed. - maxDelta = 0 - } - return big.NewInt(maxDelta), nil + // baseFee, err := b.BaseFee() + // if err != nil { + // // london hardfork not enabled or feemarket not enabled + // return big.NewInt(0), nil + // } + + // sdkCtx := b.GetEVMContext().GetSdkContext() + // params, err := b.GetEVMKeeper().Params(sdk.WrapSDKContext(sdkCtx), &evmtypes.QueryParamsRequest{}) + // if err != nil { + // return nil, err + // } + // // calculate the maximum base fee delta in current block, assuming all block gas limit is consumed + // // ``` + // // GasTarget = GasLimit / ElasticityMultiplier + // // Delta = BaseFee * (GasUsed - GasTarget) / GasTarget / Denominator + // // ``` + // // The delta is at maximum when `GasUsed` is equal to `GasLimit`, which is: + // // ``` + // // MaxDelta = BaseFee * (GasLimit - GasLimit / ElasticityMultiplier) / (GasLimit / ElasticityMultiplier) / Denominator + // // = BaseFee * (ElasticityMultiplier - 1) / Denominator + // // ``` + // maxDelta := baseFee.Int64() * (int64(params.Params.FeeMarketParams.ElasticityMultiplier) - 1) / int64(params.Params.FeeMarketParams.BaseFeeChangeDenominator) + // if maxDelta < 0 { + // // impossible if the parameter validation passed. + // maxDelta = 0 + // } + // return big.NewInt(maxDelta), nil + + // NOTE: Commented as validators do not receive tips + // but I left a logic in case we want to have this in future + return big.NewInt(0), nil } // BaseFee returns the base fee tracked by the Fee Market module. diff --git a/rpc/types/types.go b/rpc/types/types.go index 3ad20188..2f91f10b 100644 --- a/rpc/types/types.go +++ b/rpc/types/types.go @@ -108,11 +108,7 @@ type Header struct { MixDigest common.Hash `json:"mixHash"` Nonce ethtypes.BlockNonce `json:"nonce"` Size uint64 `json:"size"` - - // BaseFee was added by EIP-1559 and is ignored in legacy headers. - // TODO: Add support - // NOTE: Do we need this in real? - // BaseFee *big.Int `json:"baseFeePerGas" rlp:"optional"` + BaseFee *big.Int `json:"baseFeePerGas"` } // Block represents a block returned to RPC clients. @@ -137,6 +133,7 @@ type Block struct { Uncles []common.Hash `json:"uncles"` ReceiptsRoot common.Hash `json:"receiptsRoot"` Transactions []interface{} `json:"transactions"` + BaseFee *big.Int `json:"baseFeePerGas"` } // TransactionReceipt represents a mined transaction returned to RPC clients. diff --git a/rpc/types/utils.go b/rpc/types/utils.go index 737c0cdf..5b31b2b4 100644 --- a/rpc/types/utils.go +++ b/rpc/types/utils.go @@ -121,6 +121,7 @@ func EthHeaderFromTendermint(header tmtypes.Header) (*Header, error) { Extra: common.Hex2Bytes(""), MixDigest: common.Hash{}, Nonce: ethtypes.BlockNonce{}, + BaseFee: nil, // TODO: Add size somehow for legacy subscription support as for a new Header type after London // is not exist but still present in newBlockHeaders call on subscription }, nil @@ -171,6 +172,7 @@ func EthBlockFromTendermint(txDecoder sdk.TxDecoder, block *tmtypes.Block, fullT Transactions: transactions, Uncles: make([]common.Hash, 0), ReceiptsRoot: common.Hash{}, + BaseFee: nil, }, nil } diff --git a/types/codec.go b/types/codec.go index d526b2ec..e75c3dd6 100644 --- a/types/codec.go +++ b/types/codec.go @@ -5,8 +5,6 @@ import ( authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) -type ExtensionOptionsWeb3TxI interface{} - // RegisterInterfaces registers the tendermint concrete client-related // implementations and interfaces. func RegisterInterfaces(registry codectypes.InterfaceRegistry) { @@ -18,9 +16,4 @@ func RegisterInterfaces(registry codectypes.InterfaceRegistry) { (*authtypes.GenesisAccount)(nil), &EthAccount{}, ) - registry.RegisterInterface( - "stratos.v1.ExtensionOptionsWeb3Tx", - (*ExtensionOptionsWeb3TxI)(nil), - &ExtensionOptionsWeb3Tx{}, - ) } diff --git a/types/web3.pb.go b/types/web3.pb.go deleted file mode 100644 index 1e2549bd..00000000 --- a/types/web3.pb.go +++ /dev/null @@ -1,397 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: stratos/types/v1/web3.proto - -package types - -import ( - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type ExtensionOptionsWeb3Tx struct { - // typed data chain id used only in EIP712 Domain and should match - // Ethereum network ID in a Web3 provider (e.g. Metamask). - TypedDataChainID uint64 `protobuf:"varint,1,opt,name=typed_data_chain_id,json=typedDataChainId,proto3" json:"typedDataChainID,omitempty"` - // fee payer is an account address for the fee payer. It will be validated - // during EIP712 signature checking. - FeePayer string `protobuf:"bytes,2,opt,name=fee_payer,json=feePayer,proto3" json:"feePayer,omitempty"` - // fee payer sig is a signature data from the fee paying account, - // allows to perform fee delegation when using EIP712 Domain. - FeePayerSig []byte `protobuf:"bytes,3,opt,name=fee_payer_sig,json=feePayerSig,proto3" json:"feePayerSig,omitempty"` -} - -func (m *ExtensionOptionsWeb3Tx) Reset() { *m = ExtensionOptionsWeb3Tx{} } -func (m *ExtensionOptionsWeb3Tx) String() string { return proto.CompactTextString(m) } -func (*ExtensionOptionsWeb3Tx) ProtoMessage() {} -func (*ExtensionOptionsWeb3Tx) Descriptor() ([]byte, []int) { - return fileDescriptor_7234f467a119d7c0, []int{0} -} -func (m *ExtensionOptionsWeb3Tx) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ExtensionOptionsWeb3Tx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ExtensionOptionsWeb3Tx.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 *ExtensionOptionsWeb3Tx) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExtensionOptionsWeb3Tx.Merge(m, src) -} -func (m *ExtensionOptionsWeb3Tx) XXX_Size() int { - return m.Size() -} -func (m *ExtensionOptionsWeb3Tx) XXX_DiscardUnknown() { - xxx_messageInfo_ExtensionOptionsWeb3Tx.DiscardUnknown(m) -} - -var xxx_messageInfo_ExtensionOptionsWeb3Tx proto.InternalMessageInfo - -func init() { - proto.RegisterType((*ExtensionOptionsWeb3Tx)(nil), "stratos.types.v1.ExtensionOptionsWeb3Tx") -} - -func init() { proto.RegisterFile("stratos/types/v1/web3.proto", fileDescriptor_7234f467a119d7c0) } - -var fileDescriptor_7234f467a119d7c0 = []byte{ - // 303 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2e, 0x2e, 0x29, 0x4a, - 0x2c, 0xc9, 0x2f, 0xd6, 0x2f, 0xa9, 0x2c, 0x48, 0x2d, 0xd6, 0x2f, 0x33, 0xd4, 0x2f, 0x4f, 0x4d, - 0x32, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 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, 0x1b, 0x49, - 0xd8, 0x8a, 0xa5, 0x63, 0x81, 0x3c, 0x83, 0x93, 0xf3, 0x89, 0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9, - 0x31, 0x3e, 0x78, 0x24, 0xc7, 0x38, 0xe1, 0xb1, 0x1c, 0xc3, 0x85, 0xc7, 0x72, 0x0c, 0x37, 0x1e, - 0xcb, 0x31, 0x44, 0x69, 0xa6, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0x43, - 0x03, 0x31, 0x2f, 0xb5, 0x04, 0xc6, 0xd4, 0x05, 0x87, 0x03, 0x24, 0xc8, 0x93, 0xd8, 0xc0, 0x61, - 0x68, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x61, 0x11, 0xa6, 0x74, 0x8a, 0x01, 0x00, 0x00, -} - -func (m *ExtensionOptionsWeb3Tx) 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 *ExtensionOptionsWeb3Tx) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ExtensionOptionsWeb3Tx) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.FeePayerSig) > 0 { - i -= len(m.FeePayerSig) - copy(dAtA[i:], m.FeePayerSig) - i = encodeVarintWeb3(dAtA, i, uint64(len(m.FeePayerSig))) - i-- - dAtA[i] = 0x1a - } - if len(m.FeePayer) > 0 { - i -= len(m.FeePayer) - copy(dAtA[i:], m.FeePayer) - i = encodeVarintWeb3(dAtA, i, uint64(len(m.FeePayer))) - i-- - dAtA[i] = 0x12 - } - if m.TypedDataChainID != 0 { - i = encodeVarintWeb3(dAtA, i, uint64(m.TypedDataChainID)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func encodeVarintWeb3(dAtA []byte, offset int, v uint64) int { - offset -= sovWeb3(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *ExtensionOptionsWeb3Tx) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.TypedDataChainID != 0 { - n += 1 + sovWeb3(uint64(m.TypedDataChainID)) - } - l = len(m.FeePayer) - if l > 0 { - n += 1 + l + sovWeb3(uint64(l)) - } - l = len(m.FeePayerSig) - if l > 0 { - n += 1 + l + sovWeb3(uint64(l)) - } - return n -} - -func sovWeb3(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozWeb3(x uint64) (n int) { - return sovWeb3(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *ExtensionOptionsWeb3Tx) 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 ErrIntOverflowWeb3 - } - 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: ExtensionOptionsWeb3Tx: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ExtensionOptionsWeb3Tx: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TypedDataChainID", wireType) - } - m.TypedDataChainID = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowWeb3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TypedDataChainID |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FeePayer", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowWeb3 - } - 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 ErrInvalidLengthWeb3 - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthWeb3 - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FeePayer = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FeePayerSig", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowWeb3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthWeb3 - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthWeb3 - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FeePayerSig = append(m.FeePayerSig[:0], dAtA[iNdEx:postIndex]...) - if m.FeePayerSig == nil { - m.FeePayerSig = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipWeb3(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthWeb3 - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipWeb3(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowWeb3 - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowWeb3 - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowWeb3 - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthWeb3 - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupWeb3 - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthWeb3 - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthWeb3 = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowWeb3 = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupWeb3 = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/evm/keeper/eip1559.go b/x/evm/keeper/eip1559.go index ce1a0cdc..494b2c19 100644 --- a/x/evm/keeper/eip1559.go +++ b/x/evm/keeper/eip1559.go @@ -9,6 +9,13 @@ import ( "github.com/ethereum/go-ethereum/common/math" ) +var ( + // MinimumBaseFee is a bare minimum for calculation even if block capacity showing less + // to prevent spam. Later could be removed after CalculateBaseFee rework on block end + // and getting a real gas for the period + MinimumBaseFee = new(big.Int).SetUint64(1_000_000_000) // 1gWei +) + // CalculateBaseFee calculates the base fee for the current block. This is only calculated once per // block during BeginBlock. If the NoBaseFee parameter is enabled or below activation height, this function returns nil. // NOTE: This code is inspired from the go-ethereum EIP1559 implementation and adapted to Cosmos SDK-based @@ -84,6 +91,6 @@ func (k Keeper) CalculateBaseFee(ctx sdk.Context) *big.Int { return math.BigMax( x.Sub(parentBaseFee, baseFeeDelta), - common.Big0, + MinimumBaseFee, ) } From e37ad123b8ae5ce4455bc4dc613419cb8907c550 Mon Sep 17 00:00:00 2001 From: Xixiong Chen <60588630+Xiong-stratos@users.noreply.github.com> Date: Tue, 7 Mar 2023 10:37:29 -0500 Subject: [PATCH 30/95] Feat/Qb-1669: Use GRPC APIs to interact with stchain (#226) * naming change --- x/register/keeper/msg_server.go | 4 ++-- x/register/types/events.go | 3 +-- x/register/types/msg.go | 38 ++++++++++++++++----------------- x/sds/types/events.go | 2 +- 4 files changed, 23 insertions(+), 24 deletions(-) diff --git a/x/register/keeper/msg_server.go b/x/register/keeper/msg_server.go index 20dc76ee..3534e5d3 100644 --- a/x/register/keeper/msg_server.go +++ b/x/register/keeper/msg_server.go @@ -333,7 +333,7 @@ func (k msgServer) HandleMsgUpdateResourceNodeStake(goCtx context.Context, msg * types.EventTypeUpdateResourceNodeStake, sdk.NewAttribute(sdk.AttributeKeySender, msg.OwnerAddress), sdk.NewAttribute(types.AttributeKeyNetworkAddress, msg.NetworkAddress), - sdk.NewAttribute(types.AttributeKeyIncrStakeBool, strconv.FormatBool(msg.IncrStake)), + sdk.NewAttribute(types.AttributeKeyIncrStake, strconv.FormatBool(msg.IncrStake)), sdk.NewAttribute(types.AttributeKeyStakeDelta, msg.StakeDelta.String()), sdk.NewAttribute(types.AttributeKeyCurrentStake, sdk.NewCoin(k.BondDenom(ctx), node.Tokens).String()), sdk.NewAttribute(types.AttributeKeyAvailableTokenBefore, sdk.NewCoin(k.BondDenom(ctx), availableTokenAmtBefore).String()), @@ -447,7 +447,7 @@ func (k msgServer) HandleMsgUpdateMetaNodeStake(goCtx context.Context, msg *type types.EventTypeUpdateMetaNodeStake, sdk.NewAttribute(sdk.AttributeKeySender, msg.OwnerAddress), sdk.NewAttribute(types.AttributeKeyNetworkAddress, msg.NetworkAddress), - sdk.NewAttribute(types.AttributeKeyIncrStakeBool, strconv.FormatBool(msg.IncrStake)), + sdk.NewAttribute(types.AttributeKeyIncrStake, strconv.FormatBool(msg.IncrStake)), sdk.NewAttribute(types.AttributeKeyOZoneLimitChanges, ozoneLimitChange.String()), sdk.NewAttribute(types.AttributeKeyUnbondingMatureTime, completionTime.Format(time.RFC3339)), ), diff --git a/x/register/types/events.go b/x/register/types/events.go index 41b7bc9c..c96f0589 100644 --- a/x/register/types/events.go +++ b/x/register/types/events.go @@ -32,8 +32,7 @@ const ( AttributeKeyAvailableTokenAfter = "available_token_after" AttributeKeyStakeDelta = "stake_delta" AttributeKeyStakeToRemove = "stake_to_remove" - AttributeKeyIncrStakeBool = "incr_stake" - AttributeKeyEffectiveStakeChange = "effective_stake_change" + AttributeKeyIncrStake = "incr_stake" AttributeKeyEffectiveStakeAfter = "effective_stake_after" AttributeKeyIsUnsuspended = "is_unsuspended" diff --git a/x/register/types/msg.go b/x/register/types/msg.go index 645c4911..f50d8c73 100644 --- a/x/register/types/msg.go +++ b/x/register/types/msg.go @@ -23,16 +23,16 @@ var ( // message type and route constants const ( - TypeMsgCreateResourceNodeTx = "create_resource_node" - TypeMsgRemoveResourceNodeTx = "remove_resource_node" - TypeUpdateResourceNodeTx = "update_resource_node" - TypeUpdateResourceNodeStakeTx = "update_resource_node_stake" - TypeUpdateEffectiveStakeTx = "update_effective_stake" - TypeCreateMetaNodeTx = "create_meta_node" - TypeRemoveMetaNodeTx = "remove_meta_node" - TypeUpdateMetaNodeTx = "update_meta_node" - TypeUpdateMetaNodeStakeTx = "update_meta_node_stake" - TypeMetaNodeRegistrationVoteTx = "meta_node_registration_vote" + TypeMsgCreateResourceNode = "create_resource_node" + TypeMsgRemoveResourceNode = "remove_resource_node" + TypeMsgUpdateResourceNode = "update_resource_node" + TypeMsgUpdateResourceNodeStake = "update_resource_node_stake" + TypeMsgUpdateEffectiveStake = "update_effective_stake" + TypeMsgCreateMetaNode = "create_meta_node" + TypeMsgRemoveMetaNode = "remove_meta_node" + TypeMsgUpdateMetaNode = "update_meta_node" + TypeMsgUpdateMetaNodeStake = "update_meta_node_stake" + TypeMsgMetaNodeRegistrationVote = "meta_node_registration_vote" ) // NewMsgCreateResourceNode NewMsg creates a new Msg instance @@ -61,7 +61,7 @@ func NewMsgCreateResourceNode(networkAddr stratos.SdsAddress, pubKey cryptotypes func (msg MsgCreateResourceNode) Route() string { return RouterKey } -func (msg MsgCreateResourceNode) Type() string { return TypeMsgCreateResourceNodeTx } +func (msg MsgCreateResourceNode) Type() string { return TypeMsgCreateResourceNode } // ValidateBasic validity check for the CreateResourceNode func (msg MsgCreateResourceNode) ValidateBasic() error { @@ -150,7 +150,7 @@ func NewMsgCreateMetaNode(networkAddr stratos.SdsAddress, pubKey cryptotypes.Pub func (msg MsgCreateMetaNode) Route() string { return RouterKey } -func (msg MsgCreateMetaNode) Type() string { return TypeCreateMetaNodeTx } +func (msg MsgCreateMetaNode) Type() string { return TypeMsgCreateMetaNode } func (msg MsgCreateMetaNode) ValidateBasic() error { netAddr, err := stratos.SdsAddressFromBech32(msg.GetNetworkAddress()) @@ -222,7 +222,7 @@ func NewMsgRemoveResourceNode(resourceNodeAddr stratos.SdsAddress, ownerAddr sdk func (msg MsgRemoveResourceNode) Route() string { return RouterKey } // Type implements the sdk.Msg interface. -func (msg MsgRemoveResourceNode) Type() string { return TypeMsgRemoveResourceNodeTx } +func (msg MsgRemoveResourceNode) Type() string { return TypeMsgRemoveResourceNode } // GetSigners implements the sdk.Msg interface. func (msg MsgRemoveResourceNode) GetSigners() []sdk.AccAddress { @@ -271,7 +271,7 @@ func NewMsgRemoveMetaNode(metaNodeAddr stratos.SdsAddress, ownerAddr sdk.AccAddr func (msg MsgRemoveMetaNode) Route() string { return RouterKey } // Type implements the sdk.Msg interface. -func (msg MsgRemoveMetaNode) Type() string { return TypeRemoveMetaNodeTx } +func (msg MsgRemoveMetaNode) Type() string { return TypeMsgRemoveMetaNode } // GetSigners implements the sdk.Msg interface. func (msg MsgRemoveMetaNode) GetSigners() []sdk.AccAddress { @@ -323,7 +323,7 @@ func NewMsgUpdateResourceNode(description Description, nodeType uint32, func (msg MsgUpdateResourceNode) Route() string { return RouterKey } // Type implements the sdk.Msg interface. -func (msg MsgUpdateResourceNode) Type() string { return TypeUpdateResourceNodeTx } +func (msg MsgUpdateResourceNode) Type() string { return TypeMsgUpdateResourceNode } // GetSigners implements the sdk.Msg interface. func (msg MsgUpdateResourceNode) GetSigners() []sdk.AccAddress { @@ -383,7 +383,7 @@ func NewMsgUpdateResourceNodeStake(networkAddress stratos.SdsAddress, ownerAddre func (msg MsgUpdateResourceNodeStake) Route() string { return RouterKey } // Type implements the sdk.Msg interface. -func (msg MsgUpdateResourceNodeStake) Type() string { return TypeUpdateResourceNodeStakeTx } +func (msg MsgUpdateResourceNodeStake) Type() string { return TypeMsgUpdateResourceNodeStake } // GetSigners implements the sdk.Msg interface. func (msg MsgUpdateResourceNodeStake) GetSigners() []sdk.AccAddress { @@ -438,7 +438,7 @@ func NewMsgUpdateMetaNode(description Description, networkAddress stratos.SdsAdd func (msg MsgUpdateMetaNode) Route() string { return RouterKey } // Type implements the sdk.Msg interface. -func (msg MsgUpdateMetaNode) Type() string { return TypeUpdateMetaNodeTx } +func (msg MsgUpdateMetaNode) Type() string { return TypeMsgUpdateMetaNode } // GetSigners implements the sdk.Msg interface. func (msg MsgUpdateMetaNode) GetSigners() []sdk.AccAddress { @@ -494,7 +494,7 @@ func NewMsgUpdateMetaNodeStake(networkAddress stratos.SdsAddress, ownerAddress s func (msg MsgUpdateMetaNodeStake) Route() string { return RouterKey } // Type implements the sdk.Msg interface. -func (msg MsgUpdateMetaNodeStake) Type() string { return TypeUpdateMetaNodeStakeTx } +func (msg MsgUpdateMetaNodeStake) Type() string { return TypeMsgUpdateMetaNodeStake } // GetSigners implements the sdk.Msg interface. func (msg MsgUpdateMetaNodeStake) GetSigners() []sdk.AccAddress { @@ -549,7 +549,7 @@ func NewMsgMetaNodeRegistrationVote(candidateNetworkAddress stratos.SdsAddress, func (mmsg MsgMetaNodeRegistrationVote) Route() string { return RouterKey } -func (msg MsgMetaNodeRegistrationVote) Type() string { return TypeMetaNodeRegistrationVoteTx } +func (msg MsgMetaNodeRegistrationVote) Type() string { return TypeMsgMetaNodeRegistrationVote } func (msg MsgMetaNodeRegistrationVote) ValidateBasic() error { candidateNetworkAddress, err := stratos.SdsAddressFromBech32(msg.CandidateNetworkAddress) diff --git a/x/sds/types/events.go b/x/sds/types/events.go index ad43e6b0..4e36e1ce 100644 --- a/x/sds/types/events.go +++ b/x/sds/types/events.go @@ -10,7 +10,7 @@ const ( AttributeKeyUploader = "uploader" AttributeKeyAmount = "amount" - AttributeKeyPurchasedNoz = "purchased" + AttributeKeyPurchasedNoz = "purchased_noz" AttributeValueCategory = ModuleName ) From 135f3bdfbda48ef10c6b458198aab05621ff3760 Mon Sep 17 00:00:00 2001 From: Xixiong Chen <60588630+Xiong-stratos@users.noreply.github.com> Date: Tue, 7 Mar 2023 17:57:32 -0500 Subject: [PATCH 31/95] add a query api to get the total mined token from pot module (#231) --- proto/stratos/pot/v1/query.proto | 13 + x/pot/client/cli/query.go | 48 +++- x/pot/client/rest/query.go | 23 +- x/pot/client/rest/rest.go | 8 +- x/pot/keeper/grpc_query.go | 26 +- x/pot/keeper/store.go | 19 ++ x/pot/types/querier.go | 1 + x/pot/types/query.pb.go | 442 +++++++++++++++++++++++++++---- x/pot/types/query.pb.gw.go | 62 +++++ 9 files changed, 549 insertions(+), 93 deletions(-) diff --git a/proto/stratos/pot/v1/query.proto b/proto/stratos/pot/v1/query.proto index 5dbe08c8..4097baa8 100644 --- a/proto/stratos/pot/v1/query.proto +++ b/proto/stratos/pot/v1/query.proto @@ -35,6 +35,10 @@ service Query { rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { option (google.api.http).get = "/stratos/pot/v1/params"; } + + rpc TotalMinedToken(QueryTotalMinedTokenRequest) returns (QueryTotalMinedTokenResponse) { + option (google.api.http).get = "/stratos/pot/v1/total-mined-token"; + } } // QueryVolumeReportRequest is request type for the Query/VolumeReport RPC method @@ -116,6 +120,15 @@ message QuerySlashingByOwnerResponse { } +message QueryTotalMinedTokenRequest{} + +message QueryTotalMinedTokenResponse{ + cosmos.base.v1beta1.Coin total_mined_token = 1 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "total_mined_token", + (gogoproto.moretags) = "yaml:\"total_mined_token\"" + ]; +} diff --git a/x/pot/client/cli/query.go b/x/pot/client/cli/query.go index 93047fa2..f123af25 100644 --- a/x/pot/client/cli/query.go +++ b/x/pot/client/cli/query.go @@ -5,12 +5,14 @@ import ( "strconv" "strings" + "github.com/spf13/cobra" + "github.com/spf13/viper" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/version" - "github.com/spf13/cobra" - "github.com/spf13/viper" + "github.com/stratosnet/stratos-chain/x/pot/types" ) @@ -28,11 +30,40 @@ func GetQueryCmd() *cobra.Command { potQueryCmd.AddCommand( GetCmdQueryVolumeReport(), GetCmdQueryParams(), + GetCmdQueryTotalMinedTokens(), ) return potQueryCmd } +func GetCmdQueryTotalMinedTokens() *cobra.Command { + cmd := &cobra.Command{ + Use: "total-mined-token", + Args: cobra.NoArgs, + Short: "Query the total mined tokens", + Long: strings.TrimSpace( + fmt.Sprintf(`Query the total mined tokens.`), + ), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + queryClient := types.NewQueryClient(clientCtx) + + res, err := queryClient.TotalMinedToken(cmd.Context(), &types.QueryTotalMinedTokenRequest{}) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + return cmd +} + // GetCmdQueryParams implements the params query command. func GetCmdQueryParams() *cobra.Command { cmd := &cobra.Command{ @@ -72,10 +103,9 @@ $ %s query pot params // GetCmdQueryVolumeReport implements the query volume report command. func GetCmdQueryVolumeReport() *cobra.Command { cmd := &cobra.Command{ - Use: "report [flags]", // reporter: []byte + Use: "report [flags]", Short: "Query volume report hash by epoch", Long: strings.TrimSpace( - //fmt.Sprintf(`Query volume report hash by reporter.`), fmt.Sprintf(`Query volume report hash by epoch.`), ), @@ -110,16 +140,6 @@ func GetCmdQueryVolumeReport() *cobra.Command { return cmd } -//func QueryVolumeReport(cliCtx context.CLIContext, queryRoute string, epoch sdk.Int) (types.ReportInfo, int64, error) { -// route := fmt.Sprintf("custom/%s/%s", queryRoute, keeper.QueryVolumeReport) -// resp, height, err := cliCtx.QueryWithData(route, []byte(epoch.String())) -// if err != nil { -// return types.ReportInfo{}, height, err -// } -// reportRes := types.NewReportInfo(epoch, string(resp)) -// return reportRes, height, nil -//} - func checkFlagEpoch(epochStr string) (sdk.Int, error) { epochInt64, err := strconv.ParseInt(epochStr, 10, 64) if err != nil { diff --git a/x/pot/client/rest/query.go b/x/pot/client/rest/query.go index 47876524..fa636743 100644 --- a/x/pot/client/rest/query.go +++ b/x/pot/client/rest/query.go @@ -5,10 +5,12 @@ import ( "net/http" "strconv" + "github.com/gorilla/mux" + "github.com/cosmos/cosmos-sdk/client" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/rest" - "github.com/gorilla/mux" + "github.com/stratosnet/stratos-chain/x/pot/types" ) @@ -18,6 +20,7 @@ func registerQueryRoutes(clientCtx client.Context, r *mux.Router) { r.HandleFunc("/pot/rewards/wallet/{walletAddress}", getRewardsByWalletAddrHandlerFn(clientCtx, types.QueryRewardsByWalletAddr)).Methods("GET") r.HandleFunc("/pot/slashing/{walletAddress}", getSlashingByWalletAddressHandlerFn(clientCtx, types.QuerySlashingByWalletAddr)).Methods("GET") r.HandleFunc("/pot/params", potParamsHandlerFn(clientCtx, types.QueryPotParams)).Methods("GET") + r.HandleFunc("/pot/total-mined-token", getTotalMinedTokenHandlerFn(clientCtx, types.QueryTotalMinedToken)).Methods("GET") } // GET request handler to query params of POT module @@ -187,3 +190,21 @@ func getSlashingByWalletAddressHandlerFn(clientCtx client.Context, queryPath str rest.PostProcessResponse(w, cliCtx, res) } } + +func getTotalMinedTokenHandlerFn(clientCtx client.Context, queryPath string) http.HandlerFunc { + return func(w http.ResponseWriter, r *http.Request) { + cliCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, clientCtx, r) + if !ok { + return + } + + route := fmt.Sprintf("custom/%s/%s", types.QuerierRoute, queryPath) + res, height, err := cliCtx.Query(route) + if err != nil { + rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) + return + } + cliCtx = cliCtx.WithHeight(height) + rest.PostProcessResponse(w, cliCtx, res) + } +} diff --git a/x/pot/client/rest/rest.go b/x/pot/client/rest/rest.go index 576eeb81..6bbd90cd 100644 --- a/x/pot/client/rest/rest.go +++ b/x/pot/client/rest/rest.go @@ -1,15 +1,15 @@ package rest import ( + "github.com/gorilla/mux" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/rest" - "github.com/gorilla/mux" ) const ( - RestWalletAddress = "wallet_address" - RestEpoch = "epoch" - RestHeight = "height" + RestEpoch = "epoch" + RestHeight = "height" ) // RegisterRoutes registers pot-related REST handlers to a router diff --git a/x/pot/keeper/grpc_query.go b/x/pot/keeper/grpc_query.go index cb361c1a..6e693db1 100644 --- a/x/pot/keeper/grpc_query.go +++ b/x/pot/keeper/grpc_query.go @@ -7,8 +7,6 @@ import ( "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - db "github.com/tendermint/tm-db" - "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/store/prefix" storetypes "github.com/cosmos/cosmos-sdk/store/types" @@ -103,10 +101,7 @@ func (q Querier) RewardsByEpoch(c context.Context, req *types.QueryRewardsByEpoc return &types.QueryRewardsByEpochResponse{}, status.Error(codes.Internal, err.Error()) } height := ctx.BlockHeight() - //var rewards []*types.Reward - //for i, v := range res { - // rewards[i] = &v - //} + return &types.QueryRewardsByEpochResponse{Rewards: res, Height: height, Pagination: rewardsPageRes}, nil } @@ -373,18 +368,9 @@ func Paginate( return res, nil } -func GetIterator(prefixStore storetypes.KVStore, start []byte, reverse bool) db.Iterator { - if reverse { - var end []byte - if start != nil { - itr := prefixStore.Iterator(start, nil) - defer itr.Close() - if itr.Valid() { - itr.Next() - end = itr.Key() - } - } - return prefixStore.ReverseIterator(nil, end) - } - return prefixStore.Iterator(start, nil) +func (q Querier) TotalMinedToken(c context.Context, _ *types.QueryTotalMinedTokenRequest) (*types.QueryTotalMinedTokenResponse, error) { + ctx := sdk.UnwrapSDKContext(c) + totalMinedToken := q.GetTotalMinedTokens(ctx) + + return &types.QueryTotalMinedTokenResponse{TotalMinedToken: totalMinedToken}, nil } diff --git a/x/pot/keeper/store.go b/x/pot/keeper/store.go index 0731a67d..378df184 100644 --- a/x/pot/keeper/store.go +++ b/x/pot/keeper/store.go @@ -3,6 +3,9 @@ package keeper import ( gogotypes "github.com/gogo/protobuf/types" + db "github.com/tendermint/tm-db" + + storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" stratos "github.com/stratosnet/stratos-chain/types" @@ -216,3 +219,19 @@ func (k Keeper) SetIsReadyToDistributeReward(ctx sdk.Context, isReady bool) { b := k.cdc.MustMarshalLengthPrefixed(&gogotypes.BoolValue{Value: isReady}) store.Set(types.IsReadyToDistributeReward, b) } + +func GetIterator(prefixStore storetypes.KVStore, start []byte, reverse bool) db.Iterator { + if reverse { + var end []byte + if start != nil { + itr := prefixStore.Iterator(start, nil) + defer itr.Close() + if itr.Valid() { + itr.Next() + end = itr.Key() + } + } + return prefixStore.ReverseIterator(nil, end) + } + return prefixStore.Iterator(start, nil) +} diff --git a/x/pot/types/querier.go b/x/pot/types/querier.go index 8ccd7757..4e098cd0 100644 --- a/x/pot/types/querier.go +++ b/x/pot/types/querier.go @@ -10,6 +10,7 @@ const ( QueryRewardsByWalletAddr = "query_pot_rewards_by_wallet_address" QuerySlashingByWalletAddr = "query_pot_slashing_by_wallet_address" QueryPotParams = "query_pot_params" + QueryTotalMinedToken = "query_total_mined_token" QueryDefaultLimit = 100 ) diff --git a/x/pot/types/query.pb.go b/x/pot/types/query.pb.go index 1ec194dc..043648a7 100644 --- a/x/pot/types/query.pb.go +++ b/x/pot/types/query.pb.go @@ -661,6 +661,86 @@ func (m *QuerySlashingByOwnerResponse) GetHeight() int64 { return 0 } +type QueryTotalMinedTokenRequest struct { +} + +func (m *QueryTotalMinedTokenRequest) Reset() { *m = QueryTotalMinedTokenRequest{} } +func (m *QueryTotalMinedTokenRequest) String() string { return proto.CompactTextString(m) } +func (*QueryTotalMinedTokenRequest) ProtoMessage() {} +func (*QueryTotalMinedTokenRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_c09bd09df76a68e0, []int{12} +} +func (m *QueryTotalMinedTokenRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTotalMinedTokenRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTotalMinedTokenRequest.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 *QueryTotalMinedTokenRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTotalMinedTokenRequest.Merge(m, src) +} +func (m *QueryTotalMinedTokenRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryTotalMinedTokenRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTotalMinedTokenRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryTotalMinedTokenRequest proto.InternalMessageInfo + +type QueryTotalMinedTokenResponse struct { + TotalMinedToken types.Coin `protobuf:"bytes,1,opt,name=total_mined_token,json=totalMinedToken,proto3" json:"total_mined_token" yaml:"total_mined_token"` +} + +func (m *QueryTotalMinedTokenResponse) Reset() { *m = QueryTotalMinedTokenResponse{} } +func (m *QueryTotalMinedTokenResponse) String() string { return proto.CompactTextString(m) } +func (*QueryTotalMinedTokenResponse) ProtoMessage() {} +func (*QueryTotalMinedTokenResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_c09bd09df76a68e0, []int{13} +} +func (m *QueryTotalMinedTokenResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTotalMinedTokenResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTotalMinedTokenResponse.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 *QueryTotalMinedTokenResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTotalMinedTokenResponse.Merge(m, src) +} +func (m *QueryTotalMinedTokenResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryTotalMinedTokenResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTotalMinedTokenResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryTotalMinedTokenResponse proto.InternalMessageInfo + +func (m *QueryTotalMinedTokenResponse) GetTotalMinedToken() types.Coin { + if m != nil { + return m.TotalMinedToken + } + return types.Coin{} +} + func init() { proto.RegisterType((*QueryVolumeReportRequest)(nil), "stratos.pot.v1.QueryVolumeReportRequest") proto.RegisterType((*QueryVolumeReportResponse)(nil), "stratos.pot.v1.QueryVolumeReportResponse") @@ -674,65 +754,74 @@ func init() { proto.RegisterType((*RewardByOwner)(nil), "stratos.pot.v1.RewardByOwner") proto.RegisterType((*QuerySlashingByOwnerRequest)(nil), "stratos.pot.v1.QuerySlashingByOwnerRequest") proto.RegisterType((*QuerySlashingByOwnerResponse)(nil), "stratos.pot.v1.QuerySlashingByOwnerResponse") + proto.RegisterType((*QueryTotalMinedTokenRequest)(nil), "stratos.pot.v1.QueryTotalMinedTokenRequest") + proto.RegisterType((*QueryTotalMinedTokenResponse)(nil), "stratos.pot.v1.QueryTotalMinedTokenResponse") } func init() { proto.RegisterFile("stratos/pot/v1/query.proto", fileDescriptor_c09bd09df76a68e0) } var fileDescriptor_c09bd09df76a68e0 = []byte{ - // 840 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x96, 0xcd, 0x4e, 0xdb, 0x48, - 0x1c, 0xc0, 0xe3, 0x64, 0x09, 0x30, 0x2c, 0xac, 0x76, 0x40, 0xac, 0xf1, 0xb2, 0x06, 0x79, 0xc5, - 0xf2, 0xb5, 0xf1, 0x10, 0xf6, 0xc0, 0x61, 0x4f, 0x0b, 0xcb, 0x6e, 0x39, 0x54, 0xa5, 0x6e, 0xd5, - 0x43, 0x2f, 0x68, 0x92, 0x0c, 0xb6, 0xd5, 0xc4, 0x63, 0x3c, 0x93, 0x40, 0x84, 0xb8, 0xf4, 0x09, - 0xaa, 0xf6, 0xd2, 0x5b, 0xd5, 0x1e, 0x7b, 0xe2, 0x31, 0x38, 0x22, 0xf5, 0xd2, 0x53, 0x5b, 0x41, - 0x5f, 0xa0, 0x6f, 0x50, 0x65, 0x66, 0x12, 0x62, 0xc7, 0x21, 0x51, 0xd5, 0x53, 0xec, 0xf9, 0x7f, - 0xfd, 0xfe, 0x1f, 0xf3, 0x77, 0x80, 0xc1, 0x78, 0x84, 0x39, 0x65, 0x28, 0xa4, 0x1c, 0x35, 0x8a, - 0xe8, 0xa8, 0x4e, 0xa2, 0xa6, 0x1d, 0x46, 0x94, 0x53, 0x38, 0xa5, 0x64, 0x76, 0x48, 0xb9, 0xdd, - 0x28, 0x1a, 0x33, 0x2e, 0x75, 0xa9, 0x10, 0xa1, 0xd6, 0x93, 0xd4, 0x32, 0xe6, 0x5d, 0x4a, 0xdd, - 0x2a, 0x41, 0x38, 0xf4, 0x11, 0x0e, 0x02, 0xca, 0x31, 0xf7, 0x69, 0xc0, 0x94, 0xd4, 0x2c, 0x53, - 0x56, 0xa3, 0x0c, 0x95, 0x30, 0x23, 0xa8, 0x51, 0x2c, 0x11, 0x8e, 0x8b, 0xa8, 0x4c, 0xfd, 0x40, - 0xc9, 0xd7, 0xba, 0xe5, 0x22, 0x78, 0x47, 0x2b, 0xc4, 0xae, 0x1f, 0x08, 0x67, 0x4a, 0x57, 0x4f, - 0xb0, 0xb6, 0xb0, 0x84, 0xc4, 0xda, 0x00, 0xfa, 0xfd, 0x96, 0xed, 0x23, 0x5a, 0xad, 0xd7, 0x88, - 0x43, 0x42, 0x1a, 0x71, 0x87, 0x1c, 0xd5, 0x09, 0xe3, 0x70, 0x06, 0x8c, 0x90, 0x90, 0x96, 0x3d, - 0x5d, 0x5b, 0xd4, 0x56, 0x72, 0x8e, 0x7c, 0xb1, 0x42, 0x30, 0x97, 0x62, 0xc1, 0x42, 0x1a, 0x30, - 0x02, 0xff, 0x06, 0x13, 0x91, 0x38, 0x39, 0xf0, 0x83, 0x43, 0x2a, 0x0c, 0x27, 0x36, 0x0d, 0x3b, - 0x5e, 0x0e, 0x5b, 0x1a, 0xed, 0x05, 0x87, 0xd4, 0x01, 0x51, 0xe7, 0x19, 0xce, 0x82, 0xbc, 0x47, - 0x7c, 0xd7, 0xe3, 0x7a, 0x56, 0x04, 0x54, 0x6f, 0x56, 0x1d, 0x80, 0x1b, 0x8b, 0x74, 0x2a, 0x38, - 0x0f, 0xc6, 0x23, 0x72, 0x48, 0x22, 0x12, 0x94, 0x89, 0x30, 0x1f, 0x77, 0x6e, 0x0e, 0xe0, 0x2f, - 0x60, 0x94, 0x9f, 0x1c, 0x78, 0x98, 0x79, 0x7a, 0x4e, 0xc8, 0xf2, 0xfc, 0xe4, 0x0e,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b, 0x08, 0x4d, 0x5d, 0x08, - 0x24, 0x98, 0x3a, 0x68, 0x6f, 0xba, 0xd1, 0xe4, 0x3d, 0x18, 0x80, 0xd6, 0xdd, 0xf3, 0x41, 0x68, - 0xb1, 0xce, 0x5a, 0x5b, 0x02, 0xad, 0x08, 0x51, 0x3f, 0x34, 0x39, 0x28, 0xe8, 0x34, 0x3e, 0x46, - 0x67, 0xf0, 0x95, 0x06, 0x7e, 0x4a, 0x8c, 0x0b, 0x4c, 0x8f, 0x9c, 0x3e, 0x9a, 0xc6, 0x9f, 0xc3, - 0x29, 0x2b, 0xce, 0xa2, 0xe0, 0x5c, 0x87, 0xab, 0x49, 0xce, 0xf6, 0x1c, 0xf6, 0x12, 0x1e, 0x81, - 0xbc, 0xfc, 0xd6, 0x40, 0x2b, 0x35, 0x54, 0xec, 0x73, 0x66, 0xfc, 0x7e, 0xab, 0x8e, 0xa2, 0x30, - 0x05, 0x85, 0x0e, 0x67, 0x93, 0x14, 0xf2, 0x63, 0xb6, 0xbd, 0x77, 0x71, 0x65, 0x6a, 0x97, 0x57, - 0xa6, 0xf6, 0xe9, 0xca, 0xd4, 0x9e, 0x5d, 0x9b, 0x99, 0xcb, 0x6b, 0x33, 0xf3, 0xfe, 0xda, 0xcc, - 0x3c, 0x46, 0x5d, 0xd7, 0x5c, 0xd9, 0x06, 0x84, 0xb7, 0x1f, 0x0b, 0x65, 0x0f, 0xfb, 0x01, 0x3a, - 0x11, 0xee, 0xc4, 0x9d, 0x2f, 0xe5, 0xc5, 0xdf, 0x92, 0xbf, 0xbe, 0x06, 0x00, 0x00, 0xff, 0xff, - 0x53, 0x30, 0x78, 0x78, 0x5e, 0x09, 0x00, 0x00, + // 945 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x96, 0x41, 0x6f, 0x1b, 0x45, + 0x14, 0x80, 0xb3, 0x09, 0x75, 0xda, 0x17, 0x9a, 0xa8, 0xd3, 0x28, 0x6c, 0x97, 0xd4, 0x29, 0x53, + 0x95, 0x26, 0x2d, 0xde, 0x89, 0x83, 0x50, 0x25, 0x38, 0x91, 0x52, 0x20, 0x87, 0x8a, 0xb2, 0x54, + 0x1c, 0xb8, 0x58, 0x13, 0x7b, 0xb2, 0xbb, 0xaa, 0x3d, 0xb3, 0xd9, 0x19, 0x27, 0xb1, 0x4a, 0x2e, + 0x5c, 0xb9, 0x20, 0x38, 0xc0, 0x01, 0x09, 0xc1, 0x91, 0x53, 0x7f, 0x46, 0x8f, 0x91, 0xb8, 0x70, + 0x0a, 0x28, 0xe1, 0xc4, 0x91, 0x5f, 0x80, 0x76, 0x66, 0xec, 0x78, 0xd7, 0xeb, 0x38, 0x42, 0x9c, + 0xbc, 0x33, 0xef, 0xbd, 0x79, 0xdf, 0x7b, 0xf3, 0xde, 0x1b, 0x83, 0x27, 0x55, 0x4a, 0x95, 0x90, + 0x24, 0x11, 0x8a, 0xec, 0xd5, 0xc9, 0x6e, 0x97, 0xa5, 0x3d, 0x3f, 0x49, 0x85, 0x12, 0x68, 0xde, + 0xca, 0xfc, 0x44, 0x28, 0x7f, 0xaf, 0xee, 0x2d, 0x86, 0x22, 0x14, 0x5a, 0x44, 0xb2, 0x2f, 0xa3, + 0xe5, 0x2d, 0x87, 0x42, 0x84, 0x6d, 0x46, 0x68, 0x12, 0x13, 0xca, 0xb9, 0x50, 0x54, 0xc5, 0x82, + 0x4b, 0x2b, 0xad, 0x36, 0x85, 0xec, 0x08, 0x49, 0xb6, 0xa9, 0x64, 0x64, 0xaf, 0xbe, 0xcd, 0x14, + 0xad, 0x93, 0xa6, 0x88, 0xb9, 0x95, 0xdf, 0x1b, 0x96, 0x6b, 0xe7, 0x03, 0xad, 0x84, 0x86, 0x31, + 0xd7, 0x87, 0x59, 0x5d, 0xb7, 0xc0, 0x9a, 0x61, 0x69, 0x09, 0x5e, 0x07, 0xf7, 0xd3, 0xcc, 0xf6, + 0x73, 0xd1, 0xee, 0x76, 0x58, 0xc0, 0x12, 0x91, 0xaa, 0x80, 0xed, 0x76, 0x99, 0x54, 0x68, 0x11, + 0x2e, 0xb1, 0x44, 0x34, 0x23, 0xd7, 0xb9, 0xe5, 0xac, 0xce, 0x04, 0x66, 0x81, 0x13, 0xb8, 0x51, + 0x62, 0x21, 0x13, 0xc1, 0x25, 0x43, 0xef, 0xc1, 0x5c, 0xaa, 0x77, 0x1a, 0x31, 0xdf, 0x11, 0xda, + 0x70, 0x6e, 0xc3, 0xf3, 0xf3, 0xe9, 0xf0, 0x8d, 0xd1, 0x16, 0xdf, 0x11, 0x01, 0xa4, 0x83, 0x6f, + 0xb4, 0x04, 0x95, 0x88, 0xc5, 0x61, 0xa4, 0xdc, 0x69, 0xed, 0xd0, 0xae, 0x70, 0x17, 0xe0, 0xcc, + 0xa2, 0x9c, 0x0a, 0x2d, 0xc3, 0x95, 0x94, 0xed, 0xb0, 0x94, 0xf1, 0x26, 0xd3, 0xe6, 0x57, 0x82, + 0xb3, 0x0d, 0xf4, 0x1a, 0xcc, 0xaa, 0x83, 0x46, 0x44, 0x65, 0xe4, 0xce, 0x68, 0x59, 0x45, 0x1d, + 0x7c, 0x4c, 0x65, 0x84, 0x3c, 0xb8, 0x6c, 0x00, 0x58, 0xea, 0xbe, 0xa2, 0x25, 0x83, 0x35, 0x5e, + 0x04, 0xa4, 0x03, 0x7d, 0x42, 0x53, 0xda, 0x91, 0x36, 0x29, 0xf8, 0x11, 0x5c, 0xcf, 0xed, 0xda, + 0xc0, 0x7d, 0xa8, 0x24, 0x7a, 0xc7, 0xc6, 0xbc, 0x54, 0x8c, 0xd9, 0xea, 0x5b, 0x2d, 0xfc, 0xb3, + 0x03, 0x9e, 0x3e, 0x27, 0x60, 0xfb, 0x34, 0x6d, 0xc9, 0xcd, 0xde, 0xa3, 0x2c, 0x8e, 0x73, 0x53, + 0x8f, 0xee, 0xc0, 0xfc, 0x3e, 0x6d, 0xb7, 0x99, 0x6a, 0xd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db, 0xce, 0x44, 0x33, 0x0d, 0xd0, 0x7e, 0x19, 0x46, 0x33, 0x5d, 0x3c, + 0x01, 0x6d, 0xb8, 0x62, 0x27, 0xa1, 0xe5, 0xea, 0x12, 0x3f, 0xd0, 0x68, 0x75, 0x44, 0xc6, 0xa1, + 0x99, 0x32, 0x27, 0xcf, 0xf3, 0x4d, 0x70, 0x88, 0x7e, 0x72, 0x60, 0xa1, 0x50, 0xec, 0xa8, 0xdc, + 0x73, 0x79, 0x63, 0x79, 0x6f, 0x5d, 0x4c, 0xd9, 0x72, 0xd6, 0x35, 0xe7, 0x7d, 0xb4, 0x56, 0xe4, + 0xec, 0x77, 0xd1, 0x28, 0xe1, 0x2e, 0x54, 0xcc, 0x4b, 0x89, 0x70, 0xa9, 0xab, 0xdc, 0x63, 0xec, + 0xdd, 0x3e, 0x57, 0xc7, 0x52, 0x54, 0x35, 0x85, 0x8b, 0x96, 0x8a, 0x14, 0xe6, 0x29, 0x46, 0xdf, + 0x3b, 0xb0, 0x50, 0xe8, 0xc6, 0x31, 0x49, 0x29, 0xef, 0xe9, 0x31, 0x49, 0x19, 0xd3, 0xe0, 0x78, + 0x4d, 0xe3, 0xdc, 0x46, 0x6f, 0x14, 0x71, 0x74, 0x2f, 0xd6, 0x74, 0x7f, 0xd6, 0x74, 0x7f, 0x6e, + 0x6e, 0xbd, 0x3c, 0xa9, 0x3a, 0x47, 0x27, 0x55, 0xe7, 0xcf, 0x93, 0xaa, 0xf3, 0xcd, 0x69, 0x75, + 0xea, 0xe8, 0xb4, 0x3a, 0xf5, 0xfb, 0x69, 0x75, 0xea, 0x0b, 0x32, 0x34, 0x3e, 0xed, 0x31, 0x9c, + 0xa9, 0xfe, 0x67, 0xad, 0x19, 0xd1, 0x98, 0x93, 0x03, 0x7d, 0xb2, 0x9e, 0xa5, 0xdb, 0x15, 0xfd, + 0x77, 0xef, 0xed, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x2c, 0x9c, 0xef, 0xd6, 0xb6, 0x0a, 0x00, + 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -757,6 +846,7 @@ type QueryClient interface { SlashingByOwner(ctx context.Context, in *QuerySlashingByOwnerRequest, opts ...grpc.CallOption) (*QuerySlashingByOwnerResponse, error) // Params queries POT module Params info. Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) + TotalMinedToken(ctx context.Context, in *QueryTotalMinedTokenRequest, opts ...grpc.CallOption) (*QueryTotalMinedTokenResponse, error) } type queryClient struct { @@ -812,6 +902,15 @@ func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts . return out, nil } +func (c *queryClient) TotalMinedToken(ctx context.Context, in *QueryTotalMinedTokenRequest, opts ...grpc.CallOption) (*QueryTotalMinedTokenResponse, error) { + out := new(QueryTotalMinedTokenResponse) + err := c.cc.Invoke(ctx, "/stratos.pot.v1.Query/TotalMinedToken", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // QueryServer is the server API for Query service. type QueryServer interface { // VolumeReport queries VolumeReport info for given epoch. @@ -824,6 +923,7 @@ type QueryServer interface { SlashingByOwner(context.Context, *QuerySlashingByOwnerRequest) (*QuerySlashingByOwnerResponse, error) // Params queries POT module Params info. Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) + TotalMinedToken(context.Context, *QueryTotalMinedTokenRequest) (*QueryTotalMinedTokenResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -845,6 +945,9 @@ func (*UnimplementedQueryServer) SlashingByOwner(ctx context.Context, req *Query func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") } +func (*UnimplementedQueryServer) TotalMinedToken(ctx context.Context, req *QueryTotalMinedTokenRequest) (*QueryTotalMinedTokenResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method TotalMinedToken not implemented") +} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -940,6 +1043,24 @@ func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interf return interceptor(ctx, in, info, handler) } +func _Query_TotalMinedToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryTotalMinedTokenRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).TotalMinedToken(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/stratos.pot.v1.Query/TotalMinedToken", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).TotalMinedToken(ctx, req.(*QueryTotalMinedTokenRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "stratos.pot.v1.Query", HandlerType: (*QueryServer)(nil), @@ -964,6 +1085,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "Params", Handler: _Query_Params_Handler, }, + { + MethodName: "TotalMinedToken", + Handler: _Query_TotalMinedToken_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "stratos/pot/v1/query.proto", @@ -1438,6 +1563,62 @@ func (m *QuerySlashingByOwnerResponse) MarshalToSizedBuffer(dAtA []byte) (int, e return len(dAtA) - i, nil } +func (m *QueryTotalMinedTokenRequest) 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 *QueryTotalMinedTokenRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTotalMinedTokenRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryTotalMinedTokenResponse) 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 *QueryTotalMinedTokenResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTotalMinedTokenResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.TotalMinedToken.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { offset -= sovQuery(v) base := offset @@ -1648,6 +1829,26 @@ func (m *QuerySlashingByOwnerResponse) Size() (n int) { return n } +func (m *QueryTotalMinedTokenRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryTotalMinedTokenResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.TotalMinedToken.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + func sovQuery(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -2925,6 +3126,139 @@ func (m *QuerySlashingByOwnerResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *QueryTotalMinedTokenRequest) 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 ErrIntOverflowQuery + } + 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: QueryTotalMinedTokenRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryTotalMinedTokenRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryTotalMinedTokenResponse) 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 ErrIntOverflowQuery + } + 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: QueryTotalMinedTokenResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryTotalMinedTokenResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TotalMinedToken", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.TotalMinedToken.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipQuery(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/pot/types/query.pb.gw.go b/x/pot/types/query.pb.gw.go index 9593f114..c19c0dbf 100644 --- a/x/pot/types/query.pb.gw.go +++ b/x/pot/types/query.pb.gw.go @@ -283,6 +283,24 @@ func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshal } +func request_Query_TotalMinedToken_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryTotalMinedTokenRequest + var metadata runtime.ServerMetadata + + msg, err := client.TotalMinedToken(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_TotalMinedToken_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryTotalMinedTokenRequest + var metadata runtime.ServerMetadata + + msg, err := server.TotalMinedToken(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -389,6 +407,26 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_TotalMinedToken_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_TotalMinedToken_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_TotalMinedToken_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -530,6 +568,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_TotalMinedToken_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_TotalMinedToken_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_TotalMinedToken_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -543,6 +601,8 @@ var ( pattern_Query_SlashingByOwner_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"stratos", "pot", "v1", "slashing", "wallet_address"}, "", runtime.AssumeColonVerbOpt(true))) pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"stratos", "pot", "v1", "params"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Query_TotalMinedToken_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"stratos", "pot", "v1", "total-mined-token"}, "", runtime.AssumeColonVerbOpt(true))) ) var ( @@ -555,4 +615,6 @@ var ( forward_Query_SlashingByOwner_0 = runtime.ForwardResponseMessage forward_Query_Params_0 = runtime.ForwardResponseMessage + + forward_Query_TotalMinedToken_0 = runtime.ForwardResponseMessage ) From a192d2619f9699e8d76c8df1fe544453464988c4 Mon Sep 17 00:00:00 2001 From: Xiong Date: Wed, 8 Mar 2023 14:57:54 -0500 Subject: [PATCH 32/95] add report owner validation for MsgVolumeReport/MsgSlashingResourceNode/MsgUpdateEffectiveStake --- x/pot/keeper/keeper.go | 9 +++------ x/pot/keeper/msg_server.go | 29 +++++++++++++++++++++-------- x/pot/types/errors.go | 6 ++++-- x/pot/types/expected_keepers.go | 3 ++- x/pot/types/msg.go | 2 +- x/register/keeper/meta_node.go | 14 +++++++++++--- x/register/keeper/msg_server.go | 14 ++++++++++---- x/register/types/errors.go | 2 ++ 8 files changed, 54 insertions(+), 25 deletions(-) diff --git a/x/pot/keeper/keeper.go b/x/pot/keeper/keeper.go index 3504a18d..505ab796 100644 --- a/x/pot/keeper/keeper.go +++ b/x/pot/keeper/keeper.go @@ -3,12 +3,13 @@ package keeper import ( "fmt" - paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" - stratos "github.com/stratosnet/stratos-chain/types" "github.com/tendermint/tendermint/libs/log" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" + paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" + + stratos "github.com/stratosnet/stratos-chain/types" "github.com/stratosnet/stratos-chain/x/pot/types" ) @@ -69,10 +70,6 @@ func (k Keeper) VolumeReport(ctx sdk.Context, walletVolumes types.WalletVolumes, return nil } -func (k Keeper) IsMetaNode(ctx sdk.Context, p2pAddr stratos.SdsAddress) (found bool) { - return k.registerKeeper.IsMetaNode(ctx, p2pAddr) -} - func (k Keeper) FoundationDeposit(ctx sdk.Context, amount sdk.Coins, from sdk.AccAddress) (err error) { err = k.bankKeeper.SendCoinsFromAccountToModule(ctx, from, types.FoundationAccount, amount) if err != nil { diff --git a/x/pot/keeper/msg_server.go b/x/pot/keeper/msg_server.go index e7dbafa8..265808cc 100644 --- a/x/pot/keeper/msg_server.go +++ b/x/pot/keeper/msg_server.go @@ -6,13 +6,15 @@ import ( "fmt" "strconv" + "github.com/tendermint/tendermint/crypto/tmhash" + "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/bech32" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + stratos "github.com/stratosnet/stratos-chain/types" "github.com/stratosnet/stratos-chain/x/pot/types" - "github.com/tendermint/tendermint/crypto/tmhash" ) type msgServer struct { @@ -31,10 +33,15 @@ func (k msgServer) HandleMsgVolumeReport(goCtx context.Context, msg *types.MsgVo ctx := sdk.UnwrapSDKContext(goCtx) reporter, err := stratos.SdsAddressFromBech32(msg.Reporter) if err != nil { - return &types.MsgVolumeReportResponse{}, sdkerrors.Wrap(types.ErrInvalidAddress, err.Error()) + return &types.MsgVolumeReportResponse{}, sdkerrors.Wrap(types.ErrReporterAddress, err.Error()) + } + reporterOwner, err := sdk.AccAddressFromBech32(msg.ReporterOwner) + if err != nil { + return &types.MsgVolumeReportResponse{}, sdkerrors.Wrap(types.ErrReporterOwnerAddr, err.Error()) } - if !(k.IsMetaNode(ctx, reporter)) { - return &types.MsgVolumeReportResponse{}, sdkerrors.Wrap(types.ErrInvalidAddress, "Volume report is not sent by a superior peer") + + if !(k.registerKeeper.OwnMetaNode(ctx, reporterOwner, reporter)) { + return &types.MsgVolumeReportResponse{}, types.ErrReporterAddressOrOwner } // ensure epoch increment @@ -178,13 +185,19 @@ func (k msgServer) HandleMsgFoundationDeposit(goCtx context.Context, msg *types. func (k msgServer) HandleMsgSlashingResourceNode(goCtx context.Context, msg *types.MsgSlashingResourceNode) (*types.MsgSlashingResourceNodeResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) - for _, reporter := range msg.Reporters { + reporterOwners := msg.ReporterOwner + for idx, reporter := range msg.Reporters { reporterSdsAddr, err := stratos.SdsAddressFromBech32(reporter) if err != nil { - return &types.MsgSlashingResourceNodeResponse{}, sdkerrors.Wrap(types.ErrInvalidAddress, err.Error()) + return &types.MsgSlashingResourceNodeResponse{}, sdkerrors.Wrap(types.ErrReporterAddress, err.Error()) } - if !(k.IsMetaNode(ctx, reporterSdsAddr)) { - return &types.MsgSlashingResourceNodeResponse{}, sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "Slashing msg is not sent by a meta node") + ownerAddr, err := sdk.AccAddressFromBech32(reporterOwners[idx]) + if err != nil { + return &types.MsgSlashingResourceNodeResponse{}, sdkerrors.Wrap(types.ErrReporterOwnerAddr, err.Error()) + } + + if !(k.registerKeeper.OwnMetaNode(ctx, ownerAddr, reporterSdsAddr)) { + return &types.MsgSlashingResourceNodeResponse{}, types.ErrReporterAddressOrOwner } } networkAddress, err := stratos.SdsAddressFromBech32(msg.NetworkAddress) diff --git a/x/pot/types/errors.go b/x/pot/types/errors.go index cf8972ee..c786b020 100644 --- a/x/pot/types/errors.go +++ b/x/pot/types/errors.go @@ -18,7 +18,7 @@ const ( codeErrEmptyWalletVolumes codeErrEpochNotPositive codeErrEmptyReportReference - codeErrEmptyReporterOwnerAddr + codeErrReporterOwnerAddr codeErrNegativeVolume codeErrFoundationDepositAmountInvalid codeErrBLSSignatureInvalid @@ -37,6 +37,7 @@ const ( codeErrVolumeReport codeErrLegacyAddressNotMatch codeErrLegacyWithdrawFailure + codeErrReporterAddressOrOwner ) var ( @@ -53,7 +54,7 @@ var ( ErrEmptyWalletVolumes = sdkerrors.Register(ModuleName, codeErrEmptyWalletVolumes, "wallet volumes list empty") ErrEpochNotPositive = sdkerrors.Register(ModuleName, codeErrEpochNotPositive, "report epoch is not positive") ErrEmptyReportReference = sdkerrors.Register(ModuleName, codeErrEmptyReportReference, "missing report reference") - ErrEmptyReporterOwnerAddr = sdkerrors.Register(ModuleName, codeErrEmptyReporterOwnerAddr, "missing reporter owner address") + ErrReporterOwnerAddr = sdkerrors.Register(ModuleName, codeErrReporterOwnerAddr, "invalid reporter owner address") ErrNegativeVolume = sdkerrors.Register(ModuleName, codeErrNegativeVolume, "report volume is negative") ErrFoundationDepositAmountInvalid = sdkerrors.Register(ModuleName, codeErrFoundationDepositAmountInvalid, "foundation deposit amount is invalid") ErrBLSSignatureInvalid = sdkerrors.Register(ModuleName, codeErrBLSSignatureInvalid, "BLS signature is invalid") @@ -72,4 +73,5 @@ var ( ErrVolumeReport = sdkerrors.Register(ModuleName, codeErrVolumeReport, "volume report failed") ErrLegacyAddressNotMatch = sdkerrors.Register(ModuleName, codeErrLegacyAddressNotMatch, "public key does not mathe the legacy wallet address") ErrLegacyWithdrawFailure = sdkerrors.Register(ModuleName, codeErrLegacyWithdrawFailure, "failure during legacyWithdraw") + ErrReporterAddressOrOwner = sdkerrors.Register(ModuleName, codeErrReporterAddressOrOwner, "invalid reporter address or owner address") ) diff --git a/x/pot/types/expected_keepers.go b/x/pot/types/expected_keepers.go index c939b8c8..bb46f065 100644 --- a/x/pot/types/expected_keepers.go +++ b/x/pot/types/expected_keepers.go @@ -4,6 +4,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" + stratos "github.com/stratosnet/stratos-chain/types" "github.com/stratosnet/stratos-chain/x/register/types" ) @@ -48,7 +49,7 @@ type RegisterKeeper interface { GetUnbondingNodeBalance(ctx sdk.Context, networkAddr stratos.SdsAddress) sdk.Int NozSupply(ctx sdk.Context) (remaining, total sdk.Int) - IsMetaNode(ctx sdk.Context, p2pAddr stratos.SdsAddress) (found bool) + OwnMetaNode(ctx sdk.Context, ownerAddr sdk.AccAddress, p2pAddr stratos.SdsAddress) (found bool) } type StakingKeeper interface { diff --git a/x/pot/types/msg.go b/x/pot/types/msg.go index 9b2440d9..b3f8c10e 100644 --- a/x/pot/types/msg.go +++ b/x/pot/types/msg.go @@ -82,7 +82,7 @@ func (msg MsgVolumeReport) ValidateBasic() error { return ErrEmptyReportReference } if len(msg.ReporterOwner) == 0 { - return ErrEmptyReporterOwnerAddr + return ErrReporterOwnerAddr } _, err := sdk.AccAddressFromBech32(msg.GetReporterOwner()) diff --git a/x/register/keeper/meta_node.go b/x/register/keeper/meta_node.go index 04736193..f33fc38c 100644 --- a/x/register/keeper/meta_node.go +++ b/x/register/keeper/meta_node.go @@ -8,6 +8,7 @@ import ( cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + stratos "github.com/stratosnet/stratos-chain/types" "github.com/stratosnet/stratos-chain/x/register/types" ) @@ -462,7 +463,14 @@ func (k Keeper) GetMetaNodeIterator(ctx sdk.Context) sdk.Iterator { return iterator } -func (k Keeper) IsMetaNode(ctx sdk.Context, p2pAddr stratos.SdsAddress) (found bool) { - _, found = k.GetMetaNode(ctx, p2pAddr) - return found +func (k Keeper) OwnMetaNode(ctx sdk.Context, ownerAddr sdk.AccAddress, p2pAddr stratos.SdsAddress) bool { + metaNode, found := k.GetMetaNode(ctx, p2pAddr) + if !found { + return false + } + + if metaNode.OwnerAddress != ownerAddr.String() { + return false + } + return true } diff --git a/x/register/keeper/msg_server.go b/x/register/keeper/msg_server.go index 20dc76ee..3ccfde86 100644 --- a/x/register/keeper/msg_server.go +++ b/x/register/keeper/msg_server.go @@ -11,6 +11,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + stratos "github.com/stratosnet/stratos-chain/types" "github.com/stratosnet/stratos-chain/x/register/types" ) @@ -353,13 +354,18 @@ func (k msgServer) HandleMsgUpdateResourceNodeStake(goCtx context.Context, msg * func (k msgServer) HandleMsgUpdateEffectiveStake(goCtx context.Context, msg *types.MsgUpdateEffectiveStake) (*types.MsgUpdateEffectiveStakeResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) - for _, reporter := range msg.Reporters { + reporterOwners := msg.ReporterOwner + for idx, reporter := range msg.Reporters { reporterSdsAddr, err := stratos.SdsAddressFromBech32(reporter) if err != nil { - return &types.MsgUpdateEffectiveStakeResponse{}, sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, err.Error()) + return &types.MsgUpdateEffectiveStakeResponse{}, sdkerrors.Wrap(types.ErrReporterAddress, err.Error()) + } + ownerAddr, err := sdk.AccAddressFromBech32(reporterOwners[idx]) + if err != nil { + return &types.MsgUpdateEffectiveStakeResponse{}, sdkerrors.Wrap(types.ErrInvalidOwnerAddr, err.Error()) } - if !(k.IsMetaNode(ctx, reporterSdsAddr)) { - return &types.MsgUpdateEffectiveStakeResponse{}, sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "MsgUpdateEffectiveStake is not sent by a meta node") + if !(k.OwnMetaNode(ctx, ownerAddr, reporterSdsAddr)) { + return &types.MsgUpdateEffectiveStakeResponse{}, types.ErrReporterAddressOrOwner } } diff --git a/x/register/types/errors.go b/x/register/types/errors.go index 41edced4..6377b8ae 100644 --- a/x/register/types/errors.go +++ b/x/register/types/errors.go @@ -62,6 +62,7 @@ const ( codeErrInvalidSuspensionStatForUnbondNode codeErrReporterAddress codeErrInvalidAmount + codeErrReporterAddressOrOwner ) var ( @@ -122,4 +123,5 @@ var ( ErrInvalidSuspensionStatForUnbondNode = sdkerrors.Register(ModuleName, codeErrInvalidSuspensionStatForUnbondNode, "cannot unbond a suspended node") ErrReporterAddress = sdkerrors.Register(ModuleName, codeErrReporterAddress, "invalid reporter address") ErrInvalidAmount = sdkerrors.Register(ModuleName, codeErrInvalidAmount, "invalid amount") + ErrReporterAddressOrOwner = sdkerrors.Register(ModuleName, codeErrReporterAddressOrOwner, "invalid reporter address or owner address") ) From 83fbbf3f8f73fdcf89302653afe50596b664e70c Mon Sep 17 00:00:00 2001 From: Xixiong Chen <60588630+Xiong-stratos@users.noreply.github.com> Date: Mon, 13 Mar 2023 10:09:45 -0400 Subject: [PATCH 33/95] Feat/QB-1671: Prepay for other address (#230) * naming change * prepay for other address --- proto/stratos/sds/v1/tx.proto | 7 +- x/sds/client/cli/tx.go | 18 +++-- x/sds/client/rest/rest.go | 8 ++- x/sds/client/rest/tx.go | 13 +++- x/sds/keeper/keeper.go | 12 ++-- x/sds/keeper/msg_server.go | 9 ++- x/sds/oz_price_test.go | 12 ++-- x/sds/types/errors.go | 22 +++--- x/sds/types/events.go | 1 + x/sds/types/msg.go | 18 +++-- x/sds/types/tx.pb.go | 129 ++++++++++++++++++++++++---------- 11 files changed, 167 insertions(+), 82 deletions(-) diff --git a/proto/stratos/sds/v1/tx.proto b/proto/stratos/sds/v1/tx.proto index 665d2bbf..20416852 100644 --- a/proto/stratos/sds/v1/tx.proto +++ b/proto/stratos/sds/v1/tx.proto @@ -44,8 +44,11 @@ message MsgPrepay { (gogoproto.jsontag) = "sender", (gogoproto.moretags) = "yaml:\"sender\"" ]; - - repeated cosmos.base.v1beta1.Coin amount = 2 [ + string beneficiary = 2 [ + (gogoproto.jsontag) = "beneficiary", + (gogoproto.moretags) = "yaml:\"beneficiary\"" + ]; + repeated cosmos.base.v1beta1.Coin amount = 3 [ (gogoproto.jsontag) = "amount", (gogoproto.moretags) = "yaml:\"amount\"", (gogoproto.nullable) = false, diff --git a/x/sds/client/cli/tx.go b/x/sds/client/cli/tx.go index baa379b9..4bbdc34c 100644 --- a/x/sds/client/cli/tx.go +++ b/x/sds/client/cli/tx.go @@ -4,14 +4,15 @@ import ( "encoding/hex" "fmt" - "github.com/cosmos/cosmos-sdk/client/tx" "github.com/spf13/cobra" - stratos "github.com/stratosnet/stratos-chain/types" + flag "github.com/spf13/pflag" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" + "github.com/cosmos/cosmos-sdk/client/tx" sdk "github.com/cosmos/cosmos-sdk/types" - flag "github.com/spf13/pflag" + + stratos "github.com/stratosnet/stratos-chain/types" "github.com/stratosnet/stratos-chain/x/sds/types" ) @@ -72,7 +73,7 @@ func FileUploadTxCmd() *cobra.Command { // PrepayTxCmd will create a prepay tx and sign it with the given key. func PrepayTxCmd() *cobra.Command { cmd := &cobra.Command{ - Use: "prepay [from_address] [coins]", + Use: "prepay [from_address] [beneficiary_address] [coins]", Short: "Create and sign a prepay tx", Args: cobra.ExactArgs(2), RunE: func(cmd *cobra.Command, args []string) error { @@ -143,13 +144,18 @@ func newBuildFileuploadMsg(clientCtx client.Context, txf tx.Factory, fs *flag.Fl // makes a new newBuildPrepayMsg func newBuildPrepayMsg(clientCtx client.Context, txf tx.Factory, fs *flag.FlagSet) (tx.Factory, *types.MsgPrepay, error) { - amount, err := sdk.ParseCoinNormalized(fs.Arg(1)) + beneficiary, err := sdk.AccAddressFromBech32(fs.Arg(1)) + if err != nil { + return txf, nil, err + } + + amount, err := sdk.ParseCoinNormalized(fs.Arg(2)) if err != nil { return txf, nil, err } // build and sign the transaction, then broadcast to Tendermint - msg := types.NewMsgPrepay(clientCtx.GetFromAddress().String(), sdk.NewCoins(amount)) + msg := types.NewMsgPrepay(clientCtx.GetFromAddress().String(), beneficiary.String(), sdk.NewCoins(amount)) return txf, msg, nil } diff --git a/x/sds/client/rest/rest.go b/x/sds/client/rest/rest.go index 58efe667..540a085b 100644 --- a/x/sds/client/rest/rest.go +++ b/x/sds/client/rest/rest.go @@ -1,11 +1,12 @@ package rest import ( + "github.com/gorilla/mux" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/rest" sdk "github.com/cosmos/cosmos-sdk/types" sdktrest "github.com/cosmos/cosmos-sdk/types/rest" - "github.com/gorilla/mux" ) // RegisterHandlers registers register-related REST handlers to a router @@ -25,6 +26,7 @@ type FileUploadReq struct { // PrepayReq defines the properties of a prepay request's body. type PrepayReq struct { - BaseReq sdktrest.BaseReq `json:"base_req" yaml:"base_req"` - Amount sdk.Coins `json:"amount" yaml:"amount"` + BaseReq sdktrest.BaseReq `json:"base_req" yaml:"base_req"` + Beneficiary string `json:"beneficiary" yaml:"beneficiary"` + Amount sdk.Coins `json:"amount" yaml:"amount"` } diff --git a/x/sds/client/rest/tx.go b/x/sds/client/rest/tx.go index 9c09f47d..1f9d1fe2 100644 --- a/x/sds/client/rest/tx.go +++ b/x/sds/client/rest/tx.go @@ -4,13 +4,14 @@ import ( "encoding/hex" "net/http" - "github.com/cosmos/cosmos-sdk/client/tx" "github.com/gorilla/mux" - stratos "github.com/stratosnet/stratos-chain/types" "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/tx" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/rest" + + stratos "github.com/stratosnet/stratos-chain/types" "github.com/stratosnet/stratos-chain/x/sds/types" ) @@ -90,7 +91,13 @@ func postPrepayHandlerFn(clientCtx client.Context) http.HandlerFunc { return } - msg := types.NewMsgPrepay(fromAddr.String(), req.Amount) + beneficiary, err := sdk.AccAddressFromBech32(req.Beneficiary) + if err != nil { + rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) + return + } + + msg := types.NewMsgPrepay(fromAddr.String(), beneficiary.String(), req.Amount) tx.WriteGeneratedTxResponse(cliCtx, w, req.BaseReq, msg) } } diff --git a/x/sds/keeper/keeper.go b/x/sds/keeper/keeper.go index 30a9087e..3ff169d4 100644 --- a/x/sds/keeper/keeper.go +++ b/x/sds/keeper/keeper.go @@ -121,15 +121,13 @@ func (k Keeper) simulatePurchaseNoz(ctx sdk.Context, coins sdk.Coins) sdk.Int { // Prepay transfers coins from bank to sds (volumn) pool func (k Keeper) Prepay(ctx sdk.Context, sender sdk.AccAddress, coins sdk.Coins) (sdk.Int, error) { - for _, coin := range coins { - hasCoin := k.bankKeeper.HasBalance(ctx, sender, coin) - if !hasCoin { - return sdk.ZeroInt(), sdkerrors.Wrapf(sdkerrors.ErrInsufficientFunds, "Insufficient balance in the acc %s", sender.String()) - } + validPrepayAmt := coins.AmountOf(k.BondDenom(ctx)) + hasCoin := k.bankKeeper.HasBalance(ctx, sender, sdk.NewCoin(k.BondDenom(ctx), validPrepayAmt)) + if !hasCoin { + return sdk.ZeroInt(), sdkerrors.Wrapf(sdkerrors.ErrInsufficientFunds, "Insufficient balance in the acc %s", sender.String()) } - prepay := coins.AmountOf(k.BondDenom(ctx)) - return k.purchaseNozAndSubCoins(ctx, sender, prepay) + return k.purchaseNozAndSubCoins(ctx, sender, validPrepayAmt) } // IterateFileUpload Iterate over all uploaded files. diff --git a/x/sds/keeper/msg_server.go b/x/sds/keeper/msg_server.go index 2d92bcdf..627e3228 100644 --- a/x/sds/keeper/msg_server.go +++ b/x/sds/keeper/msg_server.go @@ -5,6 +5,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + stratos "github.com/stratosnet/stratos-chain/types" "github.com/stratosnet/stratos-chain/x/sds/types" ) @@ -73,7 +74,12 @@ func (k msgServer) HandleMsgPrepay(c context.Context, msg *types.MsgPrepay) (*ty sender, err := sdk.AccAddressFromBech32(msg.GetSender()) if err != nil { - return &types.MsgPrepayResponse{}, sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, err.Error()) + return &types.MsgPrepayResponse{}, sdkerrors.Wrap(types.ErrInvalidSenderAddr, err.Error()) + } + + _, err = sdk.AccAddressFromBech32(msg.GetBeneficiary()) + if err != nil { + return &types.MsgPrepayResponse{}, sdkerrors.Wrap(types.ErrInvalidBeneficiaryAddr, err.Error()) } purchased, err := k.Prepay(ctx, sender, msg.GetAmount()) @@ -85,6 +91,7 @@ func (k msgServer) HandleMsgPrepay(c context.Context, msg *types.MsgPrepay) (*ty sdk.NewEvent( types.EventTypePrepay, sdk.NewAttribute(sdk.AttributeKeySender, msg.GetSender()), + sdk.NewAttribute(types.AttributeKeyBeneficiary, msg.GetBeneficiary()), sdk.NewAttribute(types.AttributeKeyAmount, msg.GetAmount().String()), sdk.NewAttribute(types.AttributeKeyPurchasedNoz, purchased.String()), ), diff --git a/x/sds/oz_price_test.go b/x/sds/oz_price_test.go index c3393c22..739fdb26 100644 --- a/x/sds/oz_price_test.go +++ b/x/sds/oz_price_test.go @@ -7,8 +7,6 @@ import ( "testing" "time" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - registertypes "github.com/stratosnet/stratos-chain/x/register/types" "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" @@ -17,18 +15,20 @@ import ( "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" bankKeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" + banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/stratosnet/stratos-chain/app" stratos "github.com/stratosnet/stratos-chain/types" potKeeper "github.com/stratosnet/stratos-chain/x/pot/keeper" pottypes "github.com/stratosnet/stratos-chain/x/pot/types" registerKeeper "github.com/stratosnet/stratos-chain/x/register/keeper" + registertypes "github.com/stratosnet/stratos-chain/x/register/types" sdstypes "github.com/stratosnet/stratos-chain/x/sds/types" ) @@ -627,7 +627,7 @@ func setupPrepayMsg() *sdstypes.MsgPrepay { sender := resOwner1 amount, _ := sdk.NewIntFromString("1" + StosToWeiSuffix) coin := sdk.NewCoin(stratos.Wei, amount) - prepayMsg := sdstypes.NewMsgPrepay(sender.String(), sdk.NewCoins(coin)) + prepayMsg := sdstypes.NewMsgPrepay(sender.String(), sender.String(), sdk.NewCoins(coin)) return prepayMsg } @@ -635,7 +635,7 @@ func setupPrepayMsgWithResOwner(resOwner sdk.AccAddress) *sdstypes.MsgPrepay { sender := resOwner amount, _ := sdk.NewIntFromString("3" + StosToWeiSuffix) coin := sdk.NewCoin(stratos.Wei, amount) - prepayMsg := sdstypes.NewMsgPrepay(sender.String(), sdk.NewCoins(coin)) + prepayMsg := sdstypes.NewMsgPrepay(sender.String(), sender.String(), sdk.NewCoins(coin)) return prepayMsg } @@ -654,7 +654,7 @@ func setupUnsuspendMsgByIndex(i int, resNodeNetworkId stratos.SdsAddress, resNod reporters = append(reporters, idxNodeNetworkId1) reportOwner := make([]sdk.AccAddress, 0) reportOwner = append(reportOwner, idxOwner1) - slashingMsg := pottypes.NewMsgSlashingResourceNode(reporters, reportOwner, resNodeNetworkId, resOwner, sdk.ZeroInt(), false, resNodeSlashingEffectiveTokenAmt1) + slashingMsg := pottypes.NewMsgSlashingResourceNode(reporters, reportOwner, resNodeNetworkId, resOwner, sdk.ZeroInt(), false) return slashingMsg } diff --git a/x/sds/types/errors.go b/x/sds/types/errors.go index 24b93369..2592a8f8 100644 --- a/x/sds/types/errors.go +++ b/x/sds/types/errors.go @@ -14,16 +14,20 @@ const ( codeErrInvalidFileHash codeErrInvalidDenom codeErrPrepayFailure + codeErrInvalidSenderAddr + codeErrInvalidBeneficiaryAddr ) var ( - ErrInvalid = sdkerrors.Register(ModuleName, codeErrInvalid, "error invalid") - ErrInvalidHeight = sdkerrors.Register(ModuleName, codeErrInvalidHeight, "invalid height") - ErrEmptyUploaderAddr = sdkerrors.Register(ModuleName, codeErrEmptyUploaderAddr, "missing uploader address") - ErrEmptyReporterAddr = sdkerrors.Register(ModuleName, codeErrEmptyReporterAddr, "missing reporter address") - ErrEmptyFileHash = sdkerrors.Register(ModuleName, codeErrEmptyFileHash, "missing file hash") - ErrInvalidCoins = sdkerrors.Register(ModuleName, codeErrInvalidCoins, "invalid coins") - ErrInvalidFileHash = sdkerrors.Register(ModuleName, codeErrInvalidFileHash, "invalid file hash") - ErrInvalidDenom = sdkerrors.Register(ModuleName, codeErrInvalidDenom, "invalid denomination") - ErrPrepayFailure = sdkerrors.Register(ModuleName, codeErrPrepayFailure, "failure during prepay") + ErrInvalid = sdkerrors.Register(ModuleName, codeErrInvalid, "error invalid") + ErrInvalidHeight = sdkerrors.Register(ModuleName, codeErrInvalidHeight, "invalid height") + ErrEmptyUploaderAddr = sdkerrors.Register(ModuleName, codeErrEmptyUploaderAddr, "missing uploader address") + ErrEmptyReporterAddr = sdkerrors.Register(ModuleName, codeErrEmptyReporterAddr, "missing reporter address") + ErrEmptyFileHash = sdkerrors.Register(ModuleName, codeErrEmptyFileHash, "missing file hash") + ErrInvalidCoins = sdkerrors.Register(ModuleName, codeErrInvalidCoins, "invalid coins") + ErrInvalidFileHash = sdkerrors.Register(ModuleName, codeErrInvalidFileHash, "invalid file hash") + ErrInvalidDenom = sdkerrors.Register(ModuleName, codeErrInvalidDenom, "invalid denomination") + ErrPrepayFailure = sdkerrors.Register(ModuleName, codeErrPrepayFailure, "failure during prepay") + ErrInvalidSenderAddr = sdkerrors.Register(ModuleName, codeErrInvalidSenderAddr, "invalid sender address") + ErrInvalidBeneficiaryAddr = sdkerrors.Register(ModuleName, codeErrInvalidBeneficiaryAddr, "invalid beneficiary address") ) diff --git a/x/sds/types/events.go b/x/sds/types/events.go index 4e36e1ce..60ced2c9 100644 --- a/x/sds/types/events.go +++ b/x/sds/types/events.go @@ -11,6 +11,7 @@ const ( AttributeKeyAmount = "amount" AttributeKeyPurchasedNoz = "purchased_noz" + AttributeKeyBeneficiary = "beneficiary" AttributeValueCategory = ModuleName ) diff --git a/x/sds/types/msg.go b/x/sds/types/msg.go index f4c1f65a..3feaab88 100644 --- a/x/sds/types/msg.go +++ b/x/sds/types/msg.go @@ -91,10 +91,11 @@ func (msg MsgFileUpload) ValidateBasic() error { } // NewMsgPrepay NewMsg creates a new Msg instance -func NewMsgPrepay(sender string, amount sdk.Coins) *MsgPrepay { +func NewMsgPrepay(sender string, beneficiary string, amount sdk.Coins) *MsgPrepay { return &MsgPrepay{ - Sender: sender, - Amount: amount, + Sender: sender, + Beneficiary: beneficiary, + Amount: amount, } } @@ -123,16 +124,19 @@ func (msg MsgPrepay) GetSignBytes() []byte { // ValidateBasic validity check for the AnteHandler func (msg MsgPrepay) ValidateBasic() error { - sender, err := sdk.AccAddressFromBech32(msg.GetSender()) + _, err := sdk.AccAddressFromBech32(msg.GetSender()) if err != nil { - return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "invalid sender address") + return ErrInvalidSenderAddr } - if sender.Empty() { - return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "missing sender address") + _, err = sdk.AccAddressFromBech32(msg.GetBeneficiary()) + if err != nil { + return ErrInvalidBeneficiaryAddr } + if msg.Amount.Empty() { return sdkerrors.Wrap(sdkerrors.ErrInvalidCoins, "missing amount to send") } + return nil } diff --git a/x/sds/types/tx.pb.go b/x/sds/types/tx.pb.go index e2987424..d4cd230c 100644 --- a/x/sds/types/tx.pb.go +++ b/x/sds/types/tx.pb.go @@ -136,8 +136,9 @@ func (m *MsgFileUploadResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgFileUploadResponse proto.InternalMessageInfo type MsgPrepay struct { - Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender" yaml:"sender"` - Amount github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount" yaml:"amount"` + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender" yaml:"sender"` + Beneficiary string `protobuf:"bytes,2,opt,name=beneficiary,proto3" json:"beneficiary" yaml:"beneficiary"` + Amount github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount" yaml:"amount"` } func (m *MsgPrepay) Reset() { *m = MsgPrepay{} } @@ -180,6 +181,13 @@ func (m *MsgPrepay) GetSender() string { return "" } +func (m *MsgPrepay) GetBeneficiary() string { + if m != nil { + return m.Beneficiary + } + return "" +} + func (m *MsgPrepay) GetAmount() github_com_cosmos_cosmos_sdk_types.Coins { if m != nil { return m.Amount @@ -233,41 +241,43 @@ func init() { func init() { proto.RegisterFile("stratos/sds/v1/tx.proto", fileDescriptor_a5a216e2f9435b27) } var fileDescriptor_a5a216e2f9435b27 = []byte{ - // 544 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x53, 0xc1, 0x6b, 0x13, 0x4f, - 0x18, 0xcd, 0xb6, 0x25, 0x34, 0x53, 0xfa, 0xeb, 0xcf, 0xad, 0x9a, 0x6d, 0x6a, 0x77, 0xda, 0x11, - 0x21, 0x20, 0xdd, 0x21, 0xed, 0x4d, 0xc1, 0x43, 0x04, 0xa9, 0x48, 0x40, 0x16, 0xbc, 0x78, 0x91, - 0x49, 0x32, 0xdd, 0x2c, 0xee, 0xce, 0x2c, 0xfb, 0x4d, 0x42, 0x73, 0x11, 0xf1, 0x2f, 0x10, 0xfc, - 0x2f, 0xfc, 0x2b, 0x3c, 0xf6, 0x58, 0xf0, 0xe2, 0x69, 0x95, 0xc4, 0x53, 0x8e, 0x39, 0x08, 0xde, - 0x64, 0x67, 0x36, 0x1b, 0x53, 0xd4, 0xd3, 0xce, 0xbc, 0x37, 0xef, 0x7d, 0x33, 0xef, 0xfb, 0x16, - 0xd5, 0x41, 0xa5, 0x4c, 0x49, 0xa0, 0xd0, 0x07, 0x3a, 0x6a, 0x51, 0x75, 0xe1, 0x25, 0xa9, 0x54, - 0xd2, 0xfe, 0xaf, 0x20, 0x3c, 0xe8, 0x83, 0x37, 0x6a, 0x35, 0x6e, 0x06, 0x32, 0x90, 0x9a, 0xa2, - 0xf9, 0xca, 0x9c, 0x6a, 0xdc, 0x09, 0xa4, 0x0c, 0x22, 0x4e, 0x59, 0x12, 0x52, 0x26, 0x84, 0x54, - 0x4c, 0x85, 0x52, 0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- 0xab, 0xc5, 0xf2, 0xb8, 0x37, 0x60, 0xa1, 0xa0, 0x17, 0xda, 0x4e, 0x27, 0xdd, 0xad, 0xea, 0xff, - 0xe6, 0xf4, 0x57, 0x00, 0x00, 0x00, 0xff, 0xff, 0x64, 0xe5, 0x8e, 0x05, 0xb6, 0x03, 0x00, 0x00, + // 572 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x53, 0x41, 0x6b, 0x13, 0x41, + 0x14, 0xce, 0x36, 0xa5, 0xb4, 0x13, 0x6a, 0x75, 0xab, 0x66, 0x9b, 0xda, 0x9d, 0x76, 0xa4, 0x10, + 0x90, 0xee, 0x90, 0xf6, 0xa6, 0xe0, 0x21, 0x82, 0x56, 0x24, 0x20, 0x0b, 0x5e, 0xbc, 0xc8, 0x24, + 0x99, 0x6c, 0x16, 0x77, 0x67, 0x96, 0x9d, 0x49, 0x68, 0x2e, 0x22, 0xde, 0xbc, 0x09, 0xfe, 0x0b, + 0x7f, 0x49, 0x8f, 0x05, 0x2f, 0x9e, 0x56, 0x49, 0x3c, 0xe5, 0x98, 0x83, 0xe0, 0x4d, 0x76, 0x66, + 0xb2, 0x49, 0x8a, 0x7a, 0xda, 0x99, 0xef, 0x7b, 0xdf, 0x7b, 0x6f, 0xdf, 0xf7, 0x06, 0x54, 0x85, + 0x4c, 0x89, 0xe4, 0x02, 0x8b, 0xae, 0xc0, 0xc3, 0x06, 0x96, 0x17, 0x5e, 0x92, 0x72, 0xc9, 0xed, + 0x1b, 0x86, 0xf0, 0x44, 0x57, 0x78, 0xc3, 0x46, 0xed, 0x76, 0xc0, 0x03, 0xae, 0x28, 0x9c, 0x9f, + 0x74, 0x54, 0xed, 0x5e, 0xc0, 0x79, 0x10, 0x51, 0x4c, 0x92, 0x10, 0x13, 0xc6, 0xb8, 0x24, 0x32, + 0xe4, 0x4c, 0x18, 0xd6, 0xed, 0x70, 0x11, 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, 0x35, 0x76, 0xad, 0x1f, 0x63, 0xd7, 0xfa, 0x34, 0x71, 0x4b, 0x57, 0x13, + 0xb7, 0xf4, 0x6d, 0xe2, 0x96, 0x5e, 0xe3, 0xa5, 0xe1, 0x1a, 0x2d, 0xa3, 0x72, 0x7e, 0x3c, 0xe9, + 0xf4, 0x49, 0xc8, 0xf0, 0x85, 0x4a, 0xa7, 0x26, 0xdd, 0xde, 0x50, 0x0f, 0xf0, 0xec, 0x4f, 0x00, + 0x00, 0x00, 0xff, 0xff, 0x8f, 0xf1, 0x39, 0xd2, 0xff, 0x03, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -493,9 +503,16 @@ func (m *MsgPrepay) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintTx(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x12 + dAtA[i] = 0x1a } } + if len(m.Beneficiary) > 0 { + i -= len(m.Beneficiary) + copy(dAtA[i:], m.Beneficiary) + i = encodeVarintTx(dAtA, i, uint64(len(m.Beneficiary))) + i-- + dAtA[i] = 0x12 + } if len(m.Sender) > 0 { i -= len(m.Sender) copy(dAtA[i:], m.Sender) @@ -584,6 +601,10 @@ func (m *MsgPrepay) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } + l = len(m.Beneficiary) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } if len(m.Amount) > 0 { for _, e := range m.Amount { l = e.Size() @@ -898,6 +919,38 @@ func (m *MsgPrepay) Unmarshal(dAtA []byte) error { m.Sender = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Beneficiary", 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.Beneficiary = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) } From 6250dc6bd9d0413bd3b823c5fb2c29fa72b5d026 Mon Sep 17 00:00:00 2001 From: BoThe1K Date: Sun, 26 Mar 2023 14:00:51 +0200 Subject: [PATCH 34/95] Fix evm contract destroy --- x/evm/genesis.go | 4 ++-- x/evm/keeper/grpc_query.go | 2 +- x/evm/keeper/statedb.go | 18 ++++++++++-------- x/evm/statedb/interfaces.go | 4 ++-- x/evm/statedb/state_object.go | 2 +- x/evm/statedb/statedb.go | 6 +++--- 6 files changed, 19 insertions(+), 17 deletions(-) diff --git a/x/evm/genesis.go b/x/evm/genesis.go index f05b67c9..3d676b8e 100644 --- a/x/evm/genesis.go +++ b/x/evm/genesis.go @@ -56,7 +56,7 @@ func InitGenesis( panic("code don't match codeHash") } - k.SetCode(ctx, codeHash.Bytes(), code) + k.SetCode(ctx, address, codeHash.Bytes(), code) for _, storage := range account.Storage { k.SetState(ctx, address, common.HexToHash(storage.Key), common.HexToHash(storage.Value).Bytes()) @@ -82,7 +82,7 @@ func ExportGenesis(ctx sdk.Context, k *keeper.Keeper, ak types.AccountKeeper) *t genAccount := types.GenesisAccount{ Address: addr.String(), - Code: common.Bytes2Hex(k.GetCode(ctx, ethAccount.GetCodeHash())), + Code: common.Bytes2Hex(k.GetCode(ctx, addr, ethAccount.GetCodeHash())), Storage: storage, } diff --git a/x/evm/keeper/grpc_query.go b/x/evm/keeper/grpc_query.go index e18f5bdf..c9b231d0 100644 --- a/x/evm/keeper/grpc_query.go +++ b/x/evm/keeper/grpc_query.go @@ -188,7 +188,7 @@ func (k Keeper) Code(c context.Context, req *types.QueryCodeRequest) (*types.Que var code []byte if acct != nil && acct.IsContract() { - code = k.GetCode(ctx, common.BytesToHash(acct.CodeHash)) + code = k.GetCode(ctx, address, common.BytesToHash(acct.CodeHash)) } return &types.QueryCodeResponse{ diff --git a/x/evm/keeper/statedb.go b/x/evm/keeper/statedb.go index 0af2d40d..862b4119 100644 --- a/x/evm/keeper/statedb.go +++ b/x/evm/keeper/statedb.go @@ -46,9 +46,9 @@ func (k *Keeper) GetState(ctx sdk.Context, addr common.Address, key common.Hash) } // GetCode loads contract code from database, implements `statedb.Keeper` interface. -func (k *Keeper) GetCode(ctx sdk.Context, codeHash common.Hash) []byte { +func (k *Keeper) GetCode(ctx sdk.Context, addr common.Address, codeHash common.Hash) []byte { store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefixCode) - return store.Get(codeHash.Bytes()) + return store.Get(append(addr.Bytes(), codeHash.Bytes()...)) } // ForEachStorage iterate contract storage, callback return false to break early @@ -126,8 +126,7 @@ func (k *Keeper) SetAccount(ctx sdk.Context, addr common.Address, account stated } k.accountKeeper.SetAccount(ctx, acct) } else { - var baseAcc *authtypes.BaseAccount - baseAcc = acct.(*authtypes.BaseAccount) + baseAcc := acct.(*authtypes.BaseAccount) if !bytes.Equal(codeHash.Bytes(), types.EmptyCodeHash) { //if codeHash is not empty, and the acct is new created baseAccount, convert to ethAccount first @@ -174,19 +173,22 @@ func (k *Keeper) SetState(ctx sdk.Context, addr common.Address, key common.Hash, } // SetCode set contract code, delete if code is empty. -func (k *Keeper) SetCode(ctx sdk.Context, codeHash, code []byte) { +func (k *Keeper) SetCode(ctx sdk.Context, addr common.Address, codeHash, code []byte) { store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefixCode) + key := append(addr.Bytes(), codeHash...) + // store or delete code action := "updated" if len(code) == 0 { - store.Delete(codeHash) + store.Delete(key) action = "deleted" } else { - store.Set(codeHash, code) + store.Set(key, code) } k.Logger(ctx).Debug( fmt.Sprintf("code %s", action), + "addr", common.BytesToHash(addr.Bytes()).Hex(), "code-hash", common.BytesToHash(codeHash).Hex(), ) } @@ -217,7 +219,7 @@ func (k *Keeper) DeleteAccount(ctx sdk.Context, addr common.Address) error { // remove code codeHashBz := ethAcct.GetCodeHash().Bytes() if !bytes.Equal(codeHashBz, types.EmptyCodeHash) { - k.SetCode(ctx, codeHashBz, nil) + k.SetCode(ctx, addr, codeHashBz, nil) } // clear storage diff --git a/x/evm/statedb/interfaces.go b/x/evm/statedb/interfaces.go index 4f41454c..54f33656 100644 --- a/x/evm/statedb/interfaces.go +++ b/x/evm/statedb/interfaces.go @@ -10,7 +10,7 @@ type Keeper interface { // Read methods GetAccount(ctx sdk.Context, addr common.Address) *Account GetState(ctx sdk.Context, addr common.Address, key common.Hash) common.Hash - GetCode(ctx sdk.Context, codeHash common.Hash) []byte + GetCode(ctx sdk.Context, addr common.Address, codeHash common.Hash) []byte // the callback returns false to break early ForEachStorage(ctx sdk.Context, addr common.Address, cb func(key, value common.Hash) bool) @@ -18,6 +18,6 @@ type Keeper interface { // Write methods, only called by `StateDB.Commit()` SetAccount(ctx sdk.Context, addr common.Address, account Account) error SetState(ctx sdk.Context, addr common.Address, key common.Hash, value []byte) - SetCode(ctx sdk.Context, codeHash []byte, code []byte) + SetCode(ctx sdk.Context, addr common.Address, codeHash []byte, code []byte) DeleteAccount(ctx sdk.Context, addr common.Address) error } diff --git a/x/evm/statedb/state_object.go b/x/evm/statedb/state_object.go index 3ebb800c..4ac18500 100644 --- a/x/evm/statedb/state_object.go +++ b/x/evm/statedb/state_object.go @@ -141,7 +141,7 @@ func (s *stateObject) Code() []byte { if bytes.Equal(s.CodeHash(), emptyCodeHash) { return nil } - code := s.db.keeper.GetCode(s.db.ctx, common.BytesToHash(s.CodeHash())) + code := s.db.keeper.GetCode(s.db.ctx, s.Address(), common.BytesToHash(s.CodeHash())) s.code = code return code } diff --git a/x/evm/statedb/statedb.go b/x/evm/statedb/statedb.go index e075308d..c9753581 100644 --- a/x/evm/statedb/statedb.go +++ b/x/evm/statedb/statedb.go @@ -250,8 +250,8 @@ func (s *StateDB) createObject(addr common.Address) (newobj, prev *stateObject) // CreateAccount is called during the EVM CREATE operation. The situation might arise that // a contract does the following: // -// 1. sends funds to sha(account ++ (nonce + 1)) -// 2. tx_create(sha(account ++ nonce)) (note that this gets the address of 1) +// 1. sends funds to sha(account ++ (nonce + 1)) +// 2. tx_create(sha(account ++ nonce)) (note that this gets the address of 1) // // Carrying over the balance ensures that Ether doesn't disappear. func (s *StateDB) CreateAccount(addr common.Address) { @@ -444,7 +444,7 @@ func (s *StateDB) Commit() error { } } else { if obj.code != nil && obj.dirtyCode { - s.keeper.SetCode(s.ctx, obj.CodeHash(), obj.code) + s.keeper.SetCode(s.ctx, obj.Address(), obj.CodeHash(), obj.code) } if err := s.keeper.SetAccount(s.ctx, obj.Address(), obj.account); err != nil { return sdkerrors.Wrap(err, "failed to set account") From 86e67736249388bce2c7ab08d828f5bc7103b059 Mon Sep 17 00:00:00 2001 From: Xiong Date: Mon, 27 Mar 2023 14:11:58 -0400 Subject: [PATCH 35/95] 1, Add reporter owner validation. 2, Use bit map to record reporters of the same uploaded file instead of overrite the reporter. 3, Bug fix for QueryFileUpload. 4, Code optimization. --- go.mod | 4 +- go.sum | 7 +- proto/stratos/sds/v1/genesis.proto | 23 +- proto/stratos/sds/v1/sds.proto | 29 +-- x/register/abci.go | 9 +- x/register/genesis.go | 4 + x/register/keeper/keeper.go | 54 ++-- x/register/keeper/meta_node.go | 78 ++++++ x/register/keeper/node_state_change.go | 8 +- x/register/types/meta_node.go | 7 + x/sds/client/cli/tx.go | 5 - x/sds/genesis.go | 13 +- x/sds/keeper/grpc_query.go | 27 +- x/sds/keeper/keeper.go | 54 ++-- x/sds/keeper/msg_server.go | 21 +- x/sds/keeper/querier.go | 18 +- x/sds/keeper/store.go | 41 +++ x/sds/types/errors.go | 24 +- x/sds/types/genesis.go | 20 +- x/sds/types/genesis.pb.go | 274 ++++++++++++++++++-- x/sds/types/sds.pb.go | 342 ++++--------------------- x/sds/types/types.go | 14 + x/sds/types/uploaded_file.go | 35 --- 23 files changed, 615 insertions(+), 496 deletions(-) create mode 100644 x/sds/keeper/store.go create mode 100644 x/sds/types/types.go delete mode 100644 x/sds/types/uploaded_file.go diff --git a/go.mod b/go.mod index 83dfa825..9299d18e 100644 --- a/go.mod +++ b/go.mod @@ -17,6 +17,7 @@ require ( github.com/grpc-ecosystem/grpc-gateway v1.16.0 github.com/improbable-eng/grpc-web v0.15.0 github.com/ipfs/go-cid v0.1.0 + github.com/kelindar/bitmap v1.4.1 github.com/pkg/errors v0.9.1 github.com/rakyll/statik v0.1.7 github.com/regen-network/cosmos-proto v0.3.1 @@ -105,9 +106,10 @@ require ( github.com/inconshreveable/mousetrap v1.0.1 // indirect github.com/jackpal/go-nat-pmp v1.0.2 // indirect github.com/jmhodges/levigo v1.0.0 // indirect + github.com/kelindar/simd v1.1.2 // indirect github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d // indirect github.com/klauspost/compress v1.15.11 // indirect - github.com/klauspost/cpuid/v2 v2.0.4 // indirect + github.com/klauspost/cpuid/v2 v2.0.12 // indirect github.com/lib/pq v1.10.6 // indirect github.com/libp2p/go-buffer-pool v0.1.0 // indirect github.com/magiconair/properties v1.8.6 // indirect diff --git a/go.sum b/go.sum index 80a95e03..65604235 100644 --- a/go.sum +++ b/go.sum @@ -516,6 +516,10 @@ github.com/julienschmidt/httprouter v1.1.1-0.20170430222011-975b5c4c7c21/go.mod github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/karalabe/usb v0.0.0-20190919080040-51dc0efba356/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= +github.com/kelindar/bitmap v1.4.1 h1:Ih0BWMYXkkZxPMU536DsQKRhdvqFl7tuNjImfLJWC6E= +github.com/kelindar/bitmap v1.4.1/go.mod h1:4QyD+TDbfgy8oYB9oC4JzqfudYCYIjhbSP7iLraP+28= +github.com/kelindar/simd v1.1.2 h1:KduKb+M9cMY2HIH8S/cdJyD+5n5EGgq+Aeeleos55To= +github.com/kelindar/simd v1.1.2/go.mod h1:inq4DFudC7W8L5fhxoeZflLRNpWSs0GNx6MlWFvuvr0= github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d h1:Z+RDyXzjKE0i2sTjZ/b1uxiGtPhFy34Ou/Tk0qwN0kM= github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d/go.mod h1:JJNrCn9otv/2QP4D7SMJBgaleKpOf66PnW6F5WGNRIc= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= @@ -525,8 +529,9 @@ github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYs github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.15.11 h1:Lcadnb3RKGin4FYM/orgq0qde+nc15E5Cbqg4B9Sx9c= github.com/klauspost/compress v1.15.11/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM= -github.com/klauspost/cpuid/v2 v2.0.4 h1:g0I61F2K2DjRHz1cnxlkNSBIaePVoJIjjnHui8QHbiw= github.com/klauspost/cpuid/v2 v2.0.4/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= +github.com/klauspost/cpuid/v2 v2.0.12 h1:p9dKCg8i4gmOxtv35DvrYoWqYzQrvEVdjQ762Y0OqZE= +github.com/klauspost/cpuid/v2 v2.0.12/go.mod h1:g2LTdtYhdyuGPqyWyv7qRAmj1WBqxuObKfj5c0PQa7c= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= diff --git a/proto/stratos/sds/v1/genesis.proto b/proto/stratos/sds/v1/genesis.proto index 2f89aacf..a6137af3 100644 --- a/proto/stratos/sds/v1/genesis.proto +++ b/proto/stratos/sds/v1/genesis.proto @@ -8,16 +8,25 @@ option go_package = "github.com/stratosnet/stratos-chain/x/sds/types"; // GenesisState defines the register module's genesis state. message GenesisState { - Params params = 1 [ + Params params = 1 [ (gogoproto.jsontag) = "params", (gogoproto.moretags) = "yaml:\"params\"" ]; - repeated FileUpload file_uploads = 2 [ - (gogoproto.jsontag) = "file_uploads", - (gogoproto.moretags) = "yaml:\"file_uploads\"" + repeated GenesisFileInfo files = 2 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "files", + (gogoproto.moretags) = "yaml:\"files\"" ]; } - - - +message GenesisFileInfo { + string file_hash = 1 [ + (gogoproto.jsontag) = "file_hash", + (gogoproto.moretags) = "yaml:\"file_hash\"" + ]; + FileInfo file_info = 2 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "file_info", + (gogoproto.moretags) = "yaml:\"file_info\"" + ]; +} diff --git a/proto/stratos/sds/v1/sds.proto b/proto/stratos/sds/v1/sds.proto index 65e405c8..4aeb49d3 100644 --- a/proto/stratos/sds/v1/sds.proto +++ b/proto/stratos/sds/v1/sds.proto @@ -13,22 +13,19 @@ message Params { ]; } -message FileUpload { - string file_hash = 1 [ - (gogoproto.jsontag) = "file_hash", - (gogoproto.moretags) = "yaml:\"file_hash\"" - ]; - FileInfo file_info = 2 [ - (gogoproto.jsontag) = "file_info", - (gogoproto.moretags) = "yaml:\"file_info\"" - ]; -} - message FileInfo { - string height = 1 [ + string height = 1 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "height", + (gogoproto.moretags) = "yaml:\"height\"", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int" ]; - string reporter = 2; - string uploader = 3; -} - + bytes reporters = 2 [ + (gogoproto.jsontag) = "reporters", + (gogoproto.moretags) = "yaml:\"reporters\"" + ]; + string uploader = 3 [ + (gogoproto.jsontag) = "uploader", + (gogoproto.moretags) = "yaml:\"uploader\"" + ]; +} \ No newline at end of file diff --git a/x/register/abci.go b/x/register/abci.go index 03773d7a..46a2cde6 100644 --- a/x/register/abci.go +++ b/x/register/abci.go @@ -1,18 +1,21 @@ package register import ( + abci "github.com/tendermint/tendermint/abci/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/stratosnet/stratos-chain/x/register/keeper" - abci "github.com/tendermint/tendermint/abci/types" ) // BeginBlocker check for infraction evidence or downtime of validators // on every begin block func BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock, k keeper.Keeper) { - // TODO: fill out if your application requires beginblock, if not you can delete this function + k.UpdateMetaNodeBitMapIdxCache(ctx) } // EndBlocker called every block, process inflation, update validator set. func EndBlocker(ctx sdk.Context, k keeper.Keeper) []abci.ValidatorUpdate { - return k.BlockRegisteredNodesUpdates(ctx) + k.BlockRegisteredNodesUpdates(ctx) + return []abci.ValidatorUpdate{} } diff --git a/x/register/genesis.go b/x/register/genesis.go index 6c24f0a6..33a7b3dd 100644 --- a/x/register/genesis.go +++ b/x/register/genesis.go @@ -3,6 +3,7 @@ package register import ( sdk "github.com/cosmos/cosmos-sdk/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + "github.com/stratosnet/stratos-chain/x/register/keeper" "github.com/stratosnet/stratos-chain/x/register/types" ) @@ -116,6 +117,9 @@ func InitGenesis(ctx sdk.Context, keeper keeper.Keeper, data *types.GenesisState keeper.SetSlashing(ctx, walletAddress, sdk.NewInt(slashing.Value)) } + + keeper.ReloadMetaNodeBitMapIdxCache(ctx) + return } diff --git a/x/register/keeper/keeper.go b/x/register/keeper/keeper.go index a69c7a03..7630fd06 100644 --- a/x/register/keeper/keeper.go +++ b/x/register/keeper/keeper.go @@ -6,6 +6,8 @@ import ( "fmt" "time" + "github.com/tendermint/tendermint/libs/log" + "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" @@ -14,23 +16,26 @@ import ( stratos "github.com/stratosnet/stratos-chain/types" "github.com/stratosnet/stratos-chain/x/register/types" regtypes "github.com/stratosnet/stratos-chain/x/register/types" - "github.com/tendermint/tendermint/libs/log" +) + +var ( + metaNodeBitMapIndexCacheStatus = types.CACHE_DIRTY ) // Keeper of the register store type Keeper struct { - storeKey sdk.StoreKey - cdc codec.Codec - // module specific parameter space that can be configured through governance - paramSpace paramtypes.Subspace - accountKeeper types.AccountKeeper - bankKeeper types.BankKeeper - distrKeeper types.DistrKeeper - hooks types.RegisterHooks - resourceNodeCache map[string]cachedResourceNode - resourceNodeCacheList *list.List - metaNodeCache map[string]cachedMetaNode - metaNodeCacheList *list.List + storeKey sdk.StoreKey + cdc codec.Codec + paramSpace paramtypes.Subspace + accountKeeper types.AccountKeeper + bankKeeper types.BankKeeper + distrKeeper types.DistrKeeper + hooks types.RegisterHooks + resourceNodeCache map[string]cachedResourceNode + resourceNodeCacheList *list.List + metaNodeCache map[string]cachedMetaNode + metaNodeCacheList *list.List + metaNodeBitMapIndexCache map[string]int } // NewKeeper creates a register keeper @@ -38,17 +43,18 @@ func NewKeeper(cdc codec.Codec, key sdk.StoreKey, paramSpace paramtypes.Subspace accountKeeper types.AccountKeeper, bankKeeper types.BankKeeper, distrKeeper types.DistrKeeper) Keeper { keeper := Keeper{ - storeKey: key, - cdc: cdc, - paramSpace: paramSpace.WithKeyTable(types.ParamKeyTable()), - accountKeeper: accountKeeper, - bankKeeper: bankKeeper, - distrKeeper: distrKeeper, - hooks: nil, - resourceNodeCache: make(map[string]cachedResourceNode, resourceNodeCacheSize), - resourceNodeCacheList: list.New(), - metaNodeCache: make(map[string]cachedMetaNode, metaNodeCacheSize), - metaNodeCacheList: list.New(), + storeKey: key, + cdc: cdc, + paramSpace: paramSpace.WithKeyTable(types.ParamKeyTable()), + accountKeeper: accountKeeper, + bankKeeper: bankKeeper, + distrKeeper: distrKeeper, + hooks: nil, + resourceNodeCache: make(map[string]cachedResourceNode, resourceNodeCacheSize), + resourceNodeCacheList: list.New(), + metaNodeCache: make(map[string]cachedMetaNode, metaNodeCacheSize), + metaNodeCacheList: list.New(), + metaNodeBitMapIndexCache: make(map[string]int), } return keeper } diff --git a/x/register/keeper/meta_node.go b/x/register/keeper/meta_node.go index f33fc38c..6178b2f5 100644 --- a/x/register/keeper/meta_node.go +++ b/x/register/keeper/meta_node.go @@ -2,6 +2,9 @@ package keeper import ( "bytes" + "errors" + "fmt" + "sort" "strings" "time" @@ -350,6 +353,9 @@ func (k Keeper) HandleVoteForMetaNodeRegistration(ctx sdk.Context, nodeAddr stra node.Status = stakingtypes.Bonded node.Suspend = false k.SetMetaNode(ctx, node) + // add new available meta node to cache + networkAddr, _ := stratos.SdsAddressFromBech32(node.GetNetworkAddress()) + k.AddMetaNodeToBitMapIdxCache(networkAddr) // increase ozone limit after vote is approved _ = k.IncreaseOzoneLimitByAddStake(ctx, node.Tokens) // increase mata node count @@ -474,3 +480,75 @@ func (k Keeper) OwnMetaNode(ctx sdk.Context, ownerAddr sdk.AccAddress, p2pAddr s } return true } + +func (k Keeper) GetMetaNodeBitMapIndex(ctx sdk.Context, networkAddr stratos.SdsAddress) (index int, err error) { + k.UpdateMetaNodeBitMapIdxCache(ctx) + + index, ok := k.metaNodeBitMapIndexCache[networkAddr.String()] + if !ok { + return index, errors.New(fmt.Sprintf("Can not find meta-node %v from cache", networkAddr.String())) + } + if index < 0 { + return index, errors.New(fmt.Sprintf("Can not find correct index of meta-node %v from cache", networkAddr.String())) + } + + return index, nil +} + +func (k Keeper) AddMetaNodeToBitMapIdxCache(networkAddr stratos.SdsAddress) { + k.metaNodeBitMapIndexCache[networkAddr.String()] = -1 + metaNodeBitMapIndexCacheStatus = types.CACHE_DIRTY +} + +func (k Keeper) RemoveMetaNodeFromBitMapIdxCache(networkAddr stratos.SdsAddress) { + delete(k.metaNodeBitMapIndexCache, networkAddr.String()) + metaNodeBitMapIndexCacheStatus = types.CACHE_DIRTY +} + +func (k Keeper) UpdateMetaNodeBitMapIdxCache(ctx sdk.Context) { + if metaNodeBitMapIndexCacheStatus == types.CACHE_NOT_DIRTY { + return + } + if len(k.metaNodeBitMapIndexCache) == 0 { + k.ReloadMetaNodeBitMapIdxCache(ctx) + return + } + + keys := make([]string, 0) + for key, _ := range k.metaNodeBitMapIndexCache { + keys = append(keys, key) + } + sort.Slice(keys, func(i, j int) bool { + return keys[i] < keys[j] + }) + for index, key := range keys { + k.metaNodeBitMapIndexCache[key] = index + } + metaNodeBitMapIndexCacheStatus = types.CACHE_NOT_DIRTY +} + +func (k Keeper) ReloadMetaNodeBitMapIdxCache(ctx sdk.Context) { + if metaNodeBitMapIndexCacheStatus == types.CACHE_NOT_DIRTY { + return + } + keys := make([]string, 0) + store := ctx.KVStore(k.storeKey) + iterator := sdk.KVStorePrefixIterator(store, types.MetaNodeKey) + defer iterator.Close() + + for ; iterator.Valid(); iterator.Next() { + node := types.MustUnmarshalMetaNode(k.cdc, iterator.Value()) + if node.GetSuspend() || node.GetStatus() == stakingtypes.Unbonded { + continue + } + keys = append(keys, node.GetNetworkAddress()) + } + + sort.Slice(keys, func(i, j int) bool { + return keys[i] < keys[j] + }) + for index, key := range keys { + k.metaNodeBitMapIndexCache[key] = index + } + metaNodeBitMapIndexCacheStatus = types.CACHE_NOT_DIRTY +} diff --git a/x/register/keeper/node_state_change.go b/x/register/keeper/node_state_change.go index 7e3e8669..c9555ee0 100644 --- a/x/register/keeper/node_state_change.go +++ b/x/register/keeper/node_state_change.go @@ -6,13 +6,13 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + stratos "github.com/stratosnet/stratos-chain/types" "github.com/stratosnet/stratos-chain/x/register/types" - abci "github.com/tendermint/tendermint/abci/types" ) // Called in each EndBlock -func (k Keeper) BlockRegisteredNodesUpdates(ctx sdk.Context) []abci.ValidatorUpdate { +func (k Keeper) BlockRegisteredNodesUpdates(ctx sdk.Context) { // Remove all mature unbonding nodes from the ubd queue. ctx.Logger().Debug("Enter BlockRegisteredNodesUpdates") matureUBDs := k.DequeueAllMatureUBDQueue(ctx, ctx.BlockHeader().Time) @@ -42,7 +42,7 @@ func (k Keeper) BlockRegisteredNodesUpdates(ctx sdk.Context) []abci.ValidatorUpd } // UpdateNode won't create UBD node - return []abci.ValidatorUpdate{} + return } // Node state transitions @@ -135,6 +135,8 @@ func (k Keeper) completeUnbondingNode(ctx sdk.Context, node interface{}, isMetaN temp := node.(types.MetaNode) temp.Status = stakingtypes.Unbonded k.SetMetaNode(ctx, temp) + networkAddr, _ := stratos.SdsAddressFromBech32(temp.GetNetworkAddress()) + k.RemoveMetaNodeFromBitMapIdxCache(networkAddr) return temp } else { temp := node.(types.ResourceNode) diff --git a/x/register/types/meta_node.go b/x/register/types/meta_node.go index 2eeb9675..a98fbad2 100644 --- a/x/register/types/meta_node.go +++ b/x/register/types/meta_node.go @@ -14,6 +14,13 @@ import ( stratos "github.com/stratosnet/stratos-chain/types" ) +type CacheStatus uint8 + +const ( + CACHE_NOT_DIRTY CacheStatus = 0 + CACHE_DIRTY CacheStatus = 1 +) + // NewMetaNode - initialize a new meta node func NewMetaNode(networkAddr stratos.SdsAddress, pubKey cryptotypes.PubKey, ownerAddr sdk.AccAddress, description *Description, creationTime time.Time) (MetaNode, error) { pkAny, err := codectypes.NewAnyWithValue(pubKey) diff --git a/x/sds/client/cli/tx.go b/x/sds/client/cli/tx.go index baa379b9..c6e6b149 100644 --- a/x/sds/client/cli/tx.go +++ b/x/sds/client/cli/tx.go @@ -1,7 +1,6 @@ package cli import ( - "encoding/hex" "fmt" "github.com/cosmos/cosmos-sdk/client/tx" @@ -108,10 +107,6 @@ func newBuildFileuploadMsg(clientCtx client.Context, txf tx.Factory, fs *flag.Fl if err != nil { return txf, nil, err } - _, err = hex.DecodeString(fileHash) - if err != nil { - return txf, nil, err - } flagReporterStr, err := fs.GetString(FlagReporter) if err != nil { diff --git a/x/sds/genesis.go b/x/sds/genesis.go index efd0b708..0ce480dd 100644 --- a/x/sds/genesis.go +++ b/x/sds/genesis.go @@ -2,6 +2,7 @@ package sds import ( sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/stratosnet/stratos-chain/x/sds/keeper" "github.com/stratosnet/stratos-chain/x/sds/types" ) @@ -11,8 +12,8 @@ import ( func InitGenesis(ctx sdk.Context, keeper keeper.Keeper, data *types.GenesisState) { keeper.SetParams(ctx, *data.Params) - for _, file := range data.GetFileUploads() { - keeper.SetFileHash(ctx, []byte(file.FileHash), *file.FileInfo) + for _, file := range data.GetFiles() { + keeper.SetFileInfo(ctx, []byte(file.FileHash), file.GetFileInfo()) } return } @@ -23,11 +24,11 @@ func InitGenesis(ctx sdk.Context, keeper keeper.Keeper, data *types.GenesisState func ExportGenesis(ctx sdk.Context, keeper keeper.Keeper) (data types.GenesisState) { params := keeper.GetParams(ctx) - var fileUpload []*types.FileUpload - keeper.IterateFileUpload(ctx, func(fileHash string, fileInfo types.FileInfo) (stop bool) { - fileUpload = append(fileUpload, &types.FileUpload{FileHash: fileHash, FileInfo: &fileInfo}) + var files []types.GenesisFileInfo + keeper.IterateFileInfo(ctx, func(fileHash string, fileInfo types.FileInfo) (stop bool) { + files = append(files, types.GenesisFileInfo{FileHash: fileHash, FileInfo: fileInfo}) return false }) - return types.NewGenesisState(¶ms, fileUpload) + return types.NewGenesisState(¶ms, files) } diff --git a/x/sds/keeper/grpc_query.go b/x/sds/keeper/grpc_query.go index 3b70c574..8815abb6 100644 --- a/x/sds/keeper/grpc_query.go +++ b/x/sds/keeper/grpc_query.go @@ -2,13 +2,15 @@ package keeper import ( "context" - "encoding/hex" "fmt" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/stratosnet/stratos-chain/x/sds/types" + "github.com/ipfs/go-cid" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" + + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/stratosnet/stratos-chain/x/sds/types" ) var _ types.QueryServer = Querier{} @@ -27,19 +29,16 @@ func (q Querier) Fileupload(c context.Context, req *types.QueryFileUploadRequest return &types.QueryFileUploadResponse{}, status.Error(codes.InvalidArgument, " Network address cannot be empty") } - ctx := sdk.UnwrapSDKContext(c) - - _, err := hex.DecodeString(req.GetFileHash()) - if err != nil { - return &types.QueryFileUploadResponse{}, fmt.Errorf("invalid file hash, please specify a hash in hex format %w", err) - } - fileInfoBytes, err := q.GetFileInfoBytesByFileHash(ctx, []byte(req.GetFileHash())) + _, err := cid.Decode(req.GetFileHash()) if err != nil { - return &types.QueryFileUploadResponse{}, err + return &types.QueryFileUploadResponse{}, fmt.Errorf("invalid file hash %w", err) } - fileInfo, err := types.UnmarshalFileInfo(q.cdc, fileInfoBytes) - if err != nil { - return &types.QueryFileUploadResponse{}, err + + ctx := sdk.UnwrapSDKContext(c) + + fileInfo, found := q.GetFileInfoByFileHash(ctx, []byte(req.GetFileHash())) + if !found { + return &types.QueryFileUploadResponse{}, types.ErrNoFileFound } return &types.QueryFileUploadResponse{FileInfo: &fileInfo}, nil diff --git a/x/sds/keeper/keeper.go b/x/sds/keeper/keeper.go index 30a9087e..0cfa1636 100644 --- a/x/sds/keeper/keeper.go +++ b/x/sds/keeper/keeper.go @@ -1,9 +1,10 @@ package keeper import ( - "encoding/hex" "fmt" + "github.com/kelindar/bitmap" + "github.com/tendermint/tendermint/libs/log" "github.com/cosmos/cosmos-sdk/codec" @@ -12,6 +13,7 @@ import ( bankKeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" + stratos "github.com/stratosnet/stratos-chain/types" potKeeper "github.com/stratosnet/stratos-chain/x/pot/keeper" registerKeeper "github.com/stratosnet/stratos-chain/x/register/keeper" registertypes "github.com/stratosnet/stratos-chain/x/register/types" @@ -55,22 +57,28 @@ func (k Keeper) Logger(ctx sdk.Context) log.Logger { return ctx.Logger().With("module", fmt.Sprintf("x/%s", types.ModuleName)) } -// GetFileInfoBytesByFileHash Returns the hash of file -func (k Keeper) GetFileInfoBytesByFileHash(ctx sdk.Context, key []byte) ([]byte, error) { - store := ctx.KVStore(k.key) - bz := store.Get(types.FileStoreKey(key)) - if bz == nil { - return nil, sdkerrors.Wrapf(sdkerrors.ErrUnknownAddress, "FileHash %s does not exist", hex.EncodeToString(types.FileStoreKey(key))[2:]) +func (k Keeper) FileUpload(ctx sdk.Context, fileHash string, reporter stratos.SdsAddress, reporterOwner, uploader sdk.AccAddress) (err error) { + if !(k.registerKeeper.OwnMetaNode(ctx, reporterOwner, reporter)) { + return types.ErrReporterAddressOrOwner } - return bz, nil -} -// SetFileHash Sets sender-fileHash KV pair -func (k Keeper) SetFileHash(ctx sdk.Context, fileHash []byte, fileInfo types.FileInfo) { - store := ctx.KVStore(k.key) - storeKey := types.FileStoreKey(fileHash) - bz := types.MustMarshalFileInfo(k.cdc, fileInfo) - store.Set(storeKey, bz) + var fileUploadReporters bitmap.Bitmap + // query exist fileInfo which sent by other meta node + fileInfo, found := k.GetFileInfoByFileHash(ctx, []byte(fileHash)) + if !found { + fileUploadReporters = bitmap.Bitmap{} + } else { + fileUploadReporters = bitmap.FromBytes(fileInfo.GetReporters()) + } + reporterIndex, err := k.registerKeeper.GetMetaNodeBitMapIndex(ctx, reporter) + fileUploadReporters.Set(uint32(reporterIndex)) + height := sdk.NewInt(ctx.BlockHeight()) + + newFileInfo := types.NewFileInfo(height, fileUploadReporters.ToBytes(), uploader.String()) + + k.SetFileInfo(ctx, []byte(fileHash), newFileInfo) + + return nil } // [S] is the initial genesis deposit by all Resource Nodes and Meta Nodes at t=0 @@ -131,19 +139,3 @@ func (k Keeper) Prepay(ctx sdk.Context, sender sdk.AccAddress, coins sdk.Coins) prepay := coins.AmountOf(k.BondDenom(ctx)) return k.purchaseNozAndSubCoins(ctx, sender, prepay) } - -// IterateFileUpload Iterate over all uploaded files. -// Iteration for all uploaded files -func (k Keeper) IterateFileUpload(ctx sdk.Context, handler func(string, types.FileInfo) (stop bool)) { - store := ctx.KVStore(k.key) - iter := sdk.KVStorePrefixIterator(store, types.FileStoreKeyPrefix) - defer iter.Close() - for ; iter.Valid(); iter.Next() { - fileHash := string(iter.Key()[len(types.FileStoreKeyPrefix):]) - var fileInfo types.FileInfo - k.cdc.MustUnmarshal(iter.Value(), &fileInfo) - if handler(fileHash, fileInfo) { - break - } - } -} diff --git a/x/sds/keeper/msg_server.go b/x/sds/keeper/msg_server.go index 2d92bcdf..9fa05a09 100644 --- a/x/sds/keeper/msg_server.go +++ b/x/sds/keeper/msg_server.go @@ -5,6 +5,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + stratos "github.com/stratosnet/stratos-chain/types" "github.com/stratosnet/stratos-chain/x/sds/types" ) @@ -30,20 +31,20 @@ func (k msgServer) HandleMsgFileUpload(c context.Context, msg *types.MsgFileUplo return &types.MsgFileUploadResponse{}, sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, err.Error()) } - if _, found := k.registerKeeper.GetMetaNode(ctx, reporter); found == false { - return nil, sdkerrors.Wrapf(sdkerrors.ErrUnauthorized, "Reporter %s isn't an SP node", msg.GetReporter()) + reporterOwner, err := sdk.AccAddressFromBech32(msg.GetFrom()) + if err != nil { + return &types.MsgFileUploadResponse{}, sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, err.Error()) } - height := sdk.NewInt(ctx.BlockHeight()) - heightByteArr, _ := height.MarshalJSON() - var heightReEncoded sdk.Int - err = heightReEncoded.UnmarshalJSON(heightByteArr) + + uploader, err := sdk.AccAddressFromBech32(msg.Uploader) if err != nil { - return &types.MsgFileUploadResponse{}, sdkerrors.Wrap(sdkerrors.ErrJSONUnmarshal, err.Error()) + return &types.MsgFileUploadResponse{}, sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, err.Error()) } - fileInfo := types.NewFileInfo(&heightReEncoded, msg.Reporter, msg.Uploader) - fileHashByte := []byte(msg.FileHash) - k.SetFileHash(ctx, fileHashByte, fileInfo) + err = k.FileUpload(ctx, msg.GetFileHash(), reporter, reporterOwner, uploader) + if err != nil { + return &types.MsgFileUploadResponse{}, err + } ctx.EventManager().EmitEvents(sdk.Events{ sdk.NewEvent( diff --git a/x/sds/keeper/querier.go b/x/sds/keeper/querier.go index e819ef75..7a90d36a 100644 --- a/x/sds/keeper/querier.go +++ b/x/sds/keeper/querier.go @@ -4,14 +4,13 @@ import ( "encoding/hex" "encoding/json" - "github.com/cosmos/cosmos-sdk/codec" - "github.com/stratosnet/stratos-chain/x/sds/types" - - // this line is used by starport scaffolding # 1 abci "github.com/tendermint/tendermint/abci/types" + "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + + "github.com/stratosnet/stratos-chain/x/sds/types" ) // NewQuerier creates a new querier for sds clients. @@ -45,13 +44,16 @@ func getSdsParams(ctx sdk.Context, req abci.RequestQuery, k Keeper, legacyQuerie } // queryFileHash fetch a file's hash for the supplied height. -func queryUploadedFileByHash(ctx sdk.Context, req abci.RequestQuery, k Keeper, _ *codec.LegacyAmino) ([]byte, error) { - fileInfo, err := k.GetFileInfoBytesByFileHash(ctx, req.Data) +func queryUploadedFileByHash(ctx sdk.Context, req abci.RequestQuery, k Keeper, legacyQuerierCdc *codec.LegacyAmino) ([]byte, error) { + fileInfo, found := k.GetFileInfoByFileHash(ctx, req.Data) + if !found { + return nil, types.ErrNoFileFound + } + res, err := codec.MarshalJSONIndent(legacyQuerierCdc, fileInfo) if err != nil { return nil, sdkerrors.Wrap(sdkerrors.ErrJSONMarshal, err.Error()) } - - return fileInfo, nil + return res, nil } // querySimulatePrepay fetch amt of noz with a simulated prepay of X wei. diff --git a/x/sds/keeper/store.go b/x/sds/keeper/store.go new file mode 100644 index 00000000..16b4a9d2 --- /dev/null +++ b/x/sds/keeper/store.go @@ -0,0 +1,41 @@ +package keeper + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/stratosnet/stratos-chain/x/sds/types" +) + +// GetFileInfoByFileHash Returns the fileInfo +func (k Keeper) GetFileInfoByFileHash(ctx sdk.Context, fileHash []byte) (fileInfo types.FileInfo, found bool) { + store := ctx.KVStore(k.key) + bz := store.Get(types.FileStoreKey(fileHash)) + if bz == nil { + return fileInfo, false + } + k.cdc.MustUnmarshalLengthPrefixed(bz, &fileInfo) + return fileInfo, true +} + +func (k Keeper) SetFileInfo(ctx sdk.Context, fileHash []byte, fileInfo types.FileInfo) { + store := ctx.KVStore(k.key) + storeKey := types.FileStoreKey(fileHash) + bz := k.cdc.MustMarshalLengthPrefixed(&fileInfo) + store.Set(storeKey, bz) +} + +// IterateFileInfo Iterate over all uploaded files. +// Iteration for all uploaded files +func (k Keeper) IterateFileInfo(ctx sdk.Context, handler func(string, types.FileInfo) (stop bool)) { + store := ctx.KVStore(k.key) + iter := sdk.KVStorePrefixIterator(store, types.FileStoreKeyPrefix) + defer iter.Close() + for ; iter.Valid(); iter.Next() { + fileHash := string(iter.Key()[len(types.FileStoreKeyPrefix):]) + var fileInfo types.FileInfo + k.cdc.MustUnmarshalLengthPrefixed(iter.Value(), &fileInfo) + if handler(fileHash, fileInfo) { + break + } + } +} diff --git a/x/sds/types/errors.go b/x/sds/types/errors.go index 24b93369..5998c77b 100644 --- a/x/sds/types/errors.go +++ b/x/sds/types/errors.go @@ -9,21 +9,25 @@ const ( codeErrInvalidHeight codeErrEmptyUploaderAddr codeErrEmptyReporterAddr + codeErrEmptyReporters codeErrEmptyFileHash - codeErrInvalidCoins codeErrInvalidFileHash + codeErrNoFileFound codeErrInvalidDenom codeErrPrepayFailure + codeErrReporterAddressOrOwner ) var ( - ErrInvalid = sdkerrors.Register(ModuleName, codeErrInvalid, "error invalid") - ErrInvalidHeight = sdkerrors.Register(ModuleName, codeErrInvalidHeight, "invalid height") - ErrEmptyUploaderAddr = sdkerrors.Register(ModuleName, codeErrEmptyUploaderAddr, "missing uploader address") - ErrEmptyReporterAddr = sdkerrors.Register(ModuleName, codeErrEmptyReporterAddr, "missing reporter address") - ErrEmptyFileHash = sdkerrors.Register(ModuleName, codeErrEmptyFileHash, "missing file hash") - ErrInvalidCoins = sdkerrors.Register(ModuleName, codeErrInvalidCoins, "invalid coins") - ErrInvalidFileHash = sdkerrors.Register(ModuleName, codeErrInvalidFileHash, "invalid file hash") - ErrInvalidDenom = sdkerrors.Register(ModuleName, codeErrInvalidDenom, "invalid denomination") - ErrPrepayFailure = sdkerrors.Register(ModuleName, codeErrPrepayFailure, "failure during prepay") + ErrInvalid = sdkerrors.Register(ModuleName, codeErrInvalid, "error invalid") + ErrInvalidHeight = sdkerrors.Register(ModuleName, codeErrInvalidHeight, "invalid height") + ErrEmptyUploaderAddr = sdkerrors.Register(ModuleName, codeErrEmptyUploaderAddr, "missing uploader address") + ErrEmptyReporterAddr = sdkerrors.Register(ModuleName, codeErrEmptyReporterAddr, "missing reporter address") + ErrEmptyReporters = sdkerrors.Register(ModuleName, codeErrEmptyReporters, "missing reporters") + ErrEmptyFileHash = sdkerrors.Register(ModuleName, codeErrEmptyFileHash, "missing file hash") + ErrInvalidFileHash = sdkerrors.Register(ModuleName, codeErrInvalidFileHash, "invalid file hash") + ErrNoFileFound = sdkerrors.Register(ModuleName, codeErrNoFileFound, "file does not exist") + ErrInvalidDenom = sdkerrors.Register(ModuleName, codeErrInvalidDenom, "invalid denomination") + ErrPrepayFailure = sdkerrors.Register(ModuleName, codeErrPrepayFailure, "failure during prepay") + ErrReporterAddressOrOwner = sdkerrors.Register(ModuleName, codeErrReporterAddressOrOwner, "invalid reporter address or owner address") ) diff --git a/x/sds/types/genesis.go b/x/sds/types/genesis.go index 3298509a..449c6485 100644 --- a/x/sds/types/genesis.go +++ b/x/sds/types/genesis.go @@ -8,10 +8,10 @@ import ( ) // NewGenesisState creates a new GenesisState object -func NewGenesisState(params *Params, fileUploads []*FileUpload) GenesisState { +func NewGenesisState(params *Params, files []GenesisFileInfo) GenesisState { return GenesisState{ - Params: params, - FileUploads: fileUploads, + Params: params, + Files: files, } } @@ -39,18 +39,18 @@ func ValidateGenesis(data GenesisState) error { return err } - if len(data.FileUploads) > 0 { - for _, upload := range data.FileUploads { - if len(upload.FileHash) == 0 { + if len(data.GetFiles()) > 0 { + for _, file := range data.GetFiles() { + if len(file.FileHash) == 0 { return ErrEmptyFileHash } - if upload.FileInfo.Height.LT(sdk.ZeroInt()) { + if file.FileInfo.Height.LT(sdk.ZeroInt()) { return ErrInvalidHeight } - if len(upload.FileInfo.Reporter) == 0 { - return ErrEmptyReporterAddr + if len(file.FileInfo.Reporters) == 0 { + return ErrEmptyReporters } - if len(upload.FileInfo.Uploader) == 0 { + if len(file.FileInfo.Uploader) == 0 { return ErrEmptyUploaderAddr } } diff --git a/x/sds/types/genesis.pb.go b/x/sds/types/genesis.pb.go index c84d92d2..9039cce6 100644 --- a/x/sds/types/genesis.pb.go +++ b/x/sds/types/genesis.pb.go @@ -25,8 +25,8 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // GenesisState defines the register module's genesis state. type GenesisState struct { - Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params" yaml:"params"` - FileUploads []*FileUpload `protobuf:"bytes,2,rep,name=file_uploads,json=fileUploads,proto3" json:"file_uploads" yaml:"file_uploads"` + Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params" yaml:"params"` + Files []GenesisFileInfo `protobuf:"bytes,2,rep,name=files,proto3" json:"files" yaml:"files"` } func (m *GenesisState) Reset() { *m = GenesisState{} } @@ -69,38 +69,96 @@ func (m *GenesisState) GetParams() *Params { return nil } -func (m *GenesisState) GetFileUploads() []*FileUpload { +func (m *GenesisState) GetFiles() []GenesisFileInfo { if m != nil { - return m.FileUploads + return m.Files } return nil } +type GenesisFileInfo struct { + FileHash string `protobuf:"bytes,1,opt,name=file_hash,json=fileHash,proto3" json:"file_hash" yaml:"file_hash"` + FileInfo FileInfo `protobuf:"bytes,2,opt,name=file_info,json=fileInfo,proto3" json:"file_info" yaml:"file_info"` +} + +func (m *GenesisFileInfo) Reset() { *m = GenesisFileInfo{} } +func (m *GenesisFileInfo) String() string { return proto.CompactTextString(m) } +func (*GenesisFileInfo) ProtoMessage() {} +func (*GenesisFileInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_a3396301dd7676d6, []int{1} +} +func (m *GenesisFileInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GenesisFileInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GenesisFileInfo.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 *GenesisFileInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenesisFileInfo.Merge(m, src) +} +func (m *GenesisFileInfo) XXX_Size() int { + return m.Size() +} +func (m *GenesisFileInfo) XXX_DiscardUnknown() { + xxx_messageInfo_GenesisFileInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_GenesisFileInfo proto.InternalMessageInfo + +func (m *GenesisFileInfo) GetFileHash() string { + if m != nil { + return m.FileHash + } + return "" +} + +func (m *GenesisFileInfo) GetFileInfo() FileInfo { + if m != nil { + return m.FileInfo + } + return FileInfo{} +} + func init() { proto.RegisterType((*GenesisState)(nil), "stratos.sds.v1.GenesisState") + proto.RegisterType((*GenesisFileInfo)(nil), "stratos.sds.v1.GenesisFileInfo") } func init() { proto.RegisterFile("stratos/sds/v1/genesis.proto", fileDescriptor_a3396301dd7676d6) } var fileDescriptor_a3396301dd7676d6 = []byte{ - // 271 bytes of a gzipped FileDescriptorProto + // 344 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x29, 0x2e, 0x29, 0x4a, 0x2c, 0xc9, 0x2f, 0xd6, 0x2f, 0x4e, 0x29, 0xd6, 0x2f, 0x33, 0xd4, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x83, 0xca, 0xea, 0x15, 0xa7, 0x14, 0xeb, 0x95, 0x19, 0x4a, 0x89, 0xa4, 0xe7, 0xa7, 0xe7, 0x83, 0xa5, 0xf4, 0x41, 0x2c, 0x88, 0x2a, - 0x29, 0x09, 0x34, 0x33, 0x40, 0x8a, 0xc1, 0x32, 0x4a, 0x87, 0x19, 0xb9, 0x78, 0xdc, 0x21, 0x26, + 0x29, 0x09, 0x34, 0x33, 0x40, 0x8a, 0xc1, 0x32, 0x4a, 0x1b, 0x19, 0xb9, 0x78, 0xdc, 0x21, 0x26, 0x06, 0x97, 0x24, 0x96, 0xa4, 0x0a, 0x79, 0x73, 0xb1, 0x15, 0x24, 0x16, 0x25, 0xe6, 0x16, 0x4b, 0x30, 0x2a, 0x30, 0x6a, 0x70, 0x1b, 0x89, 0xe9, 0xa1, 0xda, 0xa0, 0x17, 0x00, 0x96, 0x75, 0x92, 0x7e, 0x75, 0x4f, 0x1e, 0xaa, 0xf2, 0xd3, 0x3d, 0x79, 0xde, 0xca, 0xc4, 0xdc, 0x1c, 0x2b, 0x25, - 0x08, 0x5f, 0x29, 0x08, 0x2a, 0x21, 0x94, 0xc6, 0xc5, 0x93, 0x96, 0x99, 0x93, 0x1a, 0x5f, 0x5a, - 0x90, 0x93, 0x9f, 0x98, 0x52, 0x2c, 0xc1, 0xa4, 0xc0, 0xac, 0xc1, 0x6d,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x8e, 0x8b, 0x13, 0x24, 0x19, 0x9f, 0x91, 0x58, 0x9c, 0x01, 0x76, 0x39, 0xa7, + 0x93, 0xe2, 0xab, 0x7b, 0xf2, 0x08, 0xc1, 0x4f, 0xf7, 0xe4, 0x05, 0x10, 0x86, 0x81, 0x85, 0x94, + 0x82, 0x38, 0x40, 0x6c, 0x8f, 0xc4, 0xe2, 0x0c, 0xa1, 0x18, 0xa8, 0xfe, 0xcc, 0xbc, 0xb4, 0x7c, + 0x09, 0x26, 0xb0, 0xcf, 0x25, 0xd0, 0x5d, 0x0b, 0x77, 0xa6, 0x2a, 0xd4, 0x99, 0x08, 0x2d, 0x68, + 0xa6, 0x83, 0x84, 0xa0, 0xa6, 0x83, 0x35, 0x78, 0x9e, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, + 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x13, 0x1e, 0xcb, 0x31, 0x5c, 0x78, 0x2c, 0xc7, 0x70, 0xe3, 0xb1, + 0x1c, 0x43, 0x94, 0x7e, 0x7a, 0x66, 0x49, 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, 0x3e, 0xd4, + 0xba, 0xbc, 0xd4, 0x12, 0x18, 0x53, 0x37, 0x39, 0x23, 0x31, 0x33, 0x4f, 0xbf, 0x02, 0x1c, 0x6f, + 0x25, 0x95, 0x05, 0xa9, 0xc5, 0x49, 0x6c, 0xe0, 0x78, 0x33, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, + 0x10, 0x41, 0x42, 0x04, 0x17, 0x02, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -123,10 +181,10 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.FileUploads) > 0 { - for iNdEx := len(m.FileUploads) - 1; iNdEx >= 0; iNdEx-- { + if len(m.Files) > 0 { + for iNdEx := len(m.Files) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.FileUploads[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Files[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -152,6 +210,46 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *GenesisFileInfo) 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 *GenesisFileInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GenesisFileInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.FileInfo.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.FileHash) > 0 { + i -= len(m.FileHash) + copy(dAtA[i:], m.FileHash) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.FileHash))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { offset -= sovGenesis(v) base := offset @@ -173,8 +271,8 @@ func (m *GenesisState) Size() (n int) { l = m.Params.Size() n += 1 + l + sovGenesis(uint64(l)) } - if len(m.FileUploads) > 0 { - for _, e := range m.FileUploads { + if len(m.Files) > 0 { + for _, e := range m.Files { l = e.Size() n += 1 + l + sovGenesis(uint64(l)) } @@ -182,6 +280,21 @@ func (m *GenesisState) Size() (n int) { return n } +func (m *GenesisFileInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.FileHash) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + l = m.FileInfo.Size() + n += 1 + l + sovGenesis(uint64(l)) + return n +} + func sovGenesis(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -255,7 +368,123 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FileUploads", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Files", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Files = append(m.Files, GenesisFileInfo{}) + if err := m.Files[len(m.Files)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GenesisFileInfo) 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 ErrIntOverflowGenesis + } + 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: GenesisFileInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GenesisFileInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FileHash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + 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 ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FileHash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FileInfo", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -282,8 +511,7 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.FileUploads = append(m.FileUploads, &FileUpload{}) - if err := m.FileUploads[len(m.FileUploads)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.FileInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/x/sds/types/sds.pb.go b/x/sds/types/sds.pb.go index 87aaeb94..d9a3bcd4 100644 --- a/x/sds/types/sds.pb.go +++ b/x/sds/types/sds.pb.go @@ -69,69 +69,17 @@ func (m *Params) GetBondDenom() string { return "" } -type FileUpload struct { - FileHash string `protobuf:"bytes,1,opt,name=file_hash,json=fileHash,proto3" json:"file_hash" yaml:"file_hash"` - FileInfo *FileInfo `protobuf:"bytes,2,opt,name=file_info,json=fileInfo,proto3" json:"file_info" yaml:"file_info"` -} - -func (m *FileUpload) Reset() { *m = FileUpload{} } -func (m *FileUpload) String() string { return proto.CompactTextString(m) } -func (*FileUpload) ProtoMessage() {} -func (*FileUpload) Descriptor() ([]byte, []int) { - return fileDescriptor_a89f3959b8649eb2, []int{1} -} -func (m *FileUpload) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FileUpload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_FileUpload.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 *FileUpload) XXX_Merge(src proto.Message) { - xxx_messageInfo_FileUpload.Merge(m, src) -} -func (m *FileUpload) XXX_Size() int { - return m.Size() -} -func (m *FileUpload) XXX_DiscardUnknown() { - xxx_messageInfo_FileUpload.DiscardUnknown(m) -} - -var xxx_messageInfo_FileUpload proto.InternalMessageInfo - -func (m *FileUpload) GetFileHash() string { - if m != nil { - return m.FileHash - } - return "" -} - -func (m *FileUpload) GetFileInfo() *FileInfo { - if m != nil { - return m.FileInfo - } - return nil -} - type FileInfo struct { - Height *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,1,opt,name=height,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"height,omitempty"` - Reporter string `protobuf:"bytes,2,opt,name=reporter,proto3" json:"reporter,omitempty"` - Uploader string `protobuf:"bytes,3,opt,name=uploader,proto3" json:"uploader,omitempty"` + Height github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,1,opt,name=height,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"height" yaml:"height"` + Reporters []byte `protobuf:"bytes,2,opt,name=reporters,proto3" json:"reporters" yaml:"reporters"` + Uploader string `protobuf:"bytes,3,opt,name=uploader,proto3" json:"uploader" yaml:"uploader"` } func (m *FileInfo) Reset() { *m = FileInfo{} } func (m *FileInfo) String() string { return proto.CompactTextString(m) } func (*FileInfo) ProtoMessage() {} func (*FileInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_a89f3959b8649eb2, []int{2} + return fileDescriptor_a89f3959b8649eb2, []int{1} } func (m *FileInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -160,11 +108,11 @@ func (m *FileInfo) XXX_DiscardUnknown() { var xxx_messageInfo_FileInfo proto.InternalMessageInfo -func (m *FileInfo) GetReporter() string { +func (m *FileInfo) GetReporters() []byte { if m != nil { - return m.Reporter + return m.Reporters } - return "" + return nil } func (m *FileInfo) GetUploader() string { @@ -176,37 +124,34 @@ func (m *FileInfo) GetUploader() string { func init() { proto.RegisterType((*Params)(nil), "stratos.sds.v1.Params") - proto.RegisterType((*FileUpload)(nil), "stratos.sds.v1.FileUpload") proto.RegisterType((*FileInfo)(nil), "stratos.sds.v1.FileInfo") } func init() { proto.RegisterFile("stratos/sds/v1/sds.proto", fileDescriptor_a89f3959b8649eb2) } var fileDescriptor_a89f3959b8649eb2 = []byte{ - // 364 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x51, 0x4d, 0x4b, 0xeb, 0x40, - 0x14, 0xed, 0xbc, 0x07, 0xa5, 0x99, 0x07, 0x8f, 0xf7, 0x82, 0x8b, 0xd0, 0x45, 0x52, 0x23, 0x48, - 0x11, 0x9a, 0x50, 0xdd, 0xb9, 0x70, 0x11, 0x44, 0x2c, 0xb8, 0x90, 0x80, 0x20, 0x6e, 0xca, 0xb4, - 0x99, 0x26, 0xc1, 0x24, 0x37, 0xcc, 0x4c, 0x8b, 0xfd, 0x03, 0xae, 0xfd, 0x15, 0xfe, 0x16, 0x97, - 0x5d, 0x8a, 0x8b, 0x20, 0xed, 0xae, 0xcb, 0xfe, 0x02, 0x99, 0xe9, 0xf4, 0x43, 0x57, 0x73, 0xee, - 0x39, 0xf7, 0x9e, 0x9c, 0x9b, 0x8b, 0x2d, 0x2e, 0x18, 0x11, 0xc0, 0x7d, 0x1e, 0x71, 0x7f, 0xd2, - 0x95, 0x8f, 0x57, 0x32, 0x10, 0x60, 0xfe, 0xd5, 0x8a, 0x27, 0xa9, 0x49, 0xb7, 0x79, 0x10, 0x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b6, 0x96, 0xda, 0x58, 0xfd, 0x10, 0xca, 0xac, 0xdf, 0x6b, 0x6d, 0x53, - 0x07, 0xbd, 0xb7, 0xb9, 0x8d, 0x66, 0x73, 0x1b, 0x7d, 0xce, 0x6d, 0xf4, 0xb2, 0xb0, 0x6b, 0xb3, - 0x85, 0x5d, 0x7b, 0x5f, 0xd8, 0xb5, 0x07, 0x7f, 0x2f, 0x81, 0xde, 0xb9, 0xa0, 0x62, 0x03, 0x3b, - 0xc3, 0x84, 0xa4, 0x85, 0xff, 0xa4, 0xee, 0xae, 0xe2, 0x0c, 0xea, 0xea, 0xa2, 0x67, 0x5f, 0x01, - 0x00, 0x00, 0xff, 0xff, 0x8e, 0xcc, 0x78, 0xb5, 0x13, 0x02, 0x00, 0x00, + // 334 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0x91, 0x3d, 0x6b, 0xeb, 0x30, + 0x14, 0x86, 0xad, 0x7b, 0x21, 0x24, 0xe2, 0xde, 0x7e, 0x98, 0x0e, 0xa6, 0x83, 0x95, 0xba, 0x50, + 0xb2, 0xc4, 0x22, 0x74, 0x6b, 0x87, 0x82, 0x29, 0x05, 0x43, 0x87, 0xe2, 0xb1, 0x4b, 0x51, 0x62, + 0xd5, 0x36, 0x8d, 0x7d, 0x8c, 0xa4, 0x84, 0xe6, 0x5f, 0xf4, 0x67, 0x65, 0xcc, 0x58, 0x3a, 0x88, + 0x92, 0x6c, 0xee, 0xe6, 0x5f, 0x50, 0xfc, 0x91, 0x8f, 0xe9, 0x9c, 0xf3, 0xbc, 0x7a, 0x25, 0x1d, + 0x5e, 0x6c, 0x49, 0x25, 0x98, 0x02, 0x49, 0x65, 0x28, 0xe9, 0x7c, 0x54, 0x15, 0x37, 0x17, 0xa0, + 0xc0, 0x3c, 0x6a, 0x15, 0xb7, 0x42, 0xf3, 0xd1, 0xf9, 0x59, 0x04, 0x11, 0xd4,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 0x8d, 0xcf, 0x8d, 0x6d, 0x3c, 0xd3, 0x83, 0x15, 0xdb, 0x18, 0x32, 0xae, 0xb6, + 0xed, 0x70, 0x12, 0xb3, 0x24, 0xa3, 0xef, 0x75, 0x66, 0xf5, 0xbe, 0xe3, 0x4e, 0x9d, 0xc6, 0xf5, + 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd6, 0xc6, 0x4f, 0x7b, 0xcf, 0x01, 0x00, 0x00, } func (m *Params) Marshal() (dAtA []byte, err error) { @@ -239,48 +184,6 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *FileUpload) 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 *FileUpload) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *FileUpload) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.FileInfo != nil { - { - size, err := m.FileInfo.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSds(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.FileHash) > 0 { - i -= len(m.FileHash) - copy(dAtA[i:], m.FileHash) - i = encodeVarintSds(dAtA, i, uint64(len(m.FileHash))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - func (m *FileInfo) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -308,25 +211,23 @@ func (m *FileInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x1a } - if len(m.Reporter) > 0 { - i -= len(m.Reporter) - copy(dAtA[i:], m.Reporter) - i = encodeVarintSds(dAtA, i, uint64(len(m.Reporter))) + if len(m.Reporters) > 0 { + i -= len(m.Reporters) + copy(dAtA[i:], m.Reporters) + i = encodeVarintSds(dAtA, i, uint64(len(m.Reporters))) i-- dAtA[i] = 0x12 } - if m.Height != nil { - { - size := m.Height.Size() - i -= size - if _, err := m.Height.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintSds(dAtA, i, uint64(size)) + { + size := m.Height.Size() + i -= size + if _, err := m.Height.MarshalTo(dAtA[i:]); err != nil { + return 0, err } - i-- - dAtA[i] = 0xa + i = encodeVarintSds(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0xa return len(dAtA) - i, nil } @@ -354,34 +255,15 @@ func (m *Params) Size() (n int) { return n } -func (m *FileUpload) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.FileHash) - if l > 0 { - n += 1 + l + sovSds(uint64(l)) - } - if m.FileInfo != nil { - l = m.FileInfo.Size() - n += 1 + l + sovSds(uint64(l)) - } - return n -} - func (m *FileInfo) Size() (n int) { if m == nil { return 0 } var l int _ = l - if m.Height != nil { - l = m.Height.Size() - n += 1 + l + sovSds(uint64(l)) - } - l = len(m.Reporter) + l = m.Height.Size() + n += 1 + l + sovSds(uint64(l)) + l = len(m.Reporters) if l > 0 { n += 1 + l + sovSds(uint64(l)) } @@ -480,124 +362,6 @@ func (m *Params) Unmarshal(dAtA []byte) error { } return nil } -func (m *FileUpload) 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 ErrIntOverflowSds - } - 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: FileUpload: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FileUpload: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FileHash", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSds - } - 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 ErrInvalidLengthSds - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthSds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FileHash = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FileInfo", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSds - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSds - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSds - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.FileInfo == nil { - m.FileInfo = &FileInfo{} - } - if err := m.FileInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipSds(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSds - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *FileInfo) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -657,17 +421,15 @@ func (m *FileInfo) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_cosmos_cosmos_sdk_types.Int - m.Height = &v if err := m.Height.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Reporter", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Reporters", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSds @@ -677,23 +439,25 @@ func (m *FileInfo) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return ErrInvalidLengthSds } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthSds } if postIndex > l { return io.ErrUnexpectedEOF } - m.Reporter = string(dAtA[iNdEx:postIndex]) + m.Reporters = append(m.Reporters[:0], dAtA[iNdEx:postIndex]...) + if m.Reporters == nil { + m.Reporters = []byte{} + } iNdEx = postIndex case 3: if wireType != 2 { diff --git a/x/sds/types/types.go b/x/sds/types/types.go new file mode 100644 index 00000000..07f17a49 --- /dev/null +++ b/x/sds/types/types.go @@ -0,0 +1,14 @@ +package types + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" +) + +// NewFileInfo constructor +func NewFileInfo(height sdk.Int, reporters []byte, uploader string) FileInfo { + return FileInfo{ + Height: height, + Reporters: reporters, + Uploader: uploader, + } +} diff --git a/x/sds/types/uploaded_file.go b/x/sds/types/uploaded_file.go deleted file mode 100644 index e89fee26..00000000 --- a/x/sds/types/uploaded_file.go +++ /dev/null @@ -1,35 +0,0 @@ -package types - -import ( - "github.com/cosmos/cosmos-sdk/codec" - sdk "github.com/cosmos/cosmos-sdk/types" -) - -// NewFileInfo constructor -func NewFileInfo(height *sdk.Int, reporter, uploader string) FileInfo { - return FileInfo{ - Height: height, - Reporter: reporter, - Uploader: uploader, - } -} - -// MustMarshalFileInfo returns the fileInfo's bytes. Panics if fails -func MustMarshalFileInfo(cdc codec.Codec, file FileInfo) []byte { - return cdc.MustMarshal(&file) -} - -// MustUnmarshalFileInfo unmarshal a file's info from a store value. Panics if fails -func MustUnmarshalFileInfo(cdc codec.Codec, value []byte) FileInfo { - file, err := UnmarshalFileInfo(cdc, value) - if err != nil { - panic(err) - } - return file -} - -// UnmarshalFileInfo unmarshal a file's info from a store value -func UnmarshalFileInfo(cdc codec.Codec, value []byte) (fi FileInfo, err error) { - err = cdc.Unmarshal(value, &fi) - return fi, err -} From 78c47ddd9e9d28bf9370eb8aad88184f768c9d8d Mon Sep 17 00:00:00 2001 From: jialbai Date: Thu, 30 Mar 2023 14:00:46 +0800 Subject: [PATCH 36/95] - qb1747: fix validation of MsgUpdateEffectiveStake --- x/register/types/msg.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/x/register/types/msg.go b/x/register/types/msg.go index f50d8c73..9b21b70b 100644 --- a/x/register/types/msg.go +++ b/x/register/types/msg.go @@ -635,6 +635,12 @@ func (m MsgUpdateEffectiveStake) ValidateBasic() error { if len(m.NetworkAddress) == 0 { return ErrInvalidNetworkAddr } + if len(m.Reporters) == 0 { + return ErrReporterAddress + } + if len(m.ReporterOwner) == 0 || len(m.Reporters) != len(m.ReporterOwner) { + return ErrInvalidOwnerAddr + } for _, r := range m.Reporters { if len(r) == 0 { return ErrReporterAddress @@ -668,5 +674,8 @@ func (m MsgUpdateEffectiveStake) GetSigners() []sdk.AccAddress { } addrs = append(addrs, reporterOwner) } + if len(addrs) == 0 { + panic("no valid signer for MsgUpdateEffectiveStake") + } return addrs } From 3adad30c7f258bf1bc5b76c3219e385c137e94aa Mon Sep 17 00:00:00 2001 From: jialbai Date: Thu, 30 Mar 2023 14:07:13 +0800 Subject: [PATCH 37/95] - qb1747: simplify GetTotalConsumedNoz impl --- x/pot/keeper/distribute.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/x/pot/keeper/distribute.go b/x/pot/keeper/distribute.go index ea93c2f7..0560ca9c 100644 --- a/x/pot/keeper/distribute.go +++ b/x/pot/keeper/distribute.go @@ -410,11 +410,8 @@ func (k Keeper) CalcRewardForMetaNode(ctx sdk.Context, distributeGoalBalance typ func (k Keeper) GetTotalConsumedNoz(trafficList []*types.SingleWalletVolume) sdk.Int { totalTraffic := sdk.ZeroInt() for _, vol := range trafficList { - toAdd, ok := sdk.NewIntFromString(vol.Volume.String()) - if !ok { - continue - } - totalTraffic = totalTraffic.Add(toAdd) + toAdd := vol.Volume + totalTraffic = totalTraffic.Add(*toAdd) } return totalTraffic } From 33af4f2888a68991bdfec5d3d2a722e075f693f5 Mon Sep 17 00:00:00 2001 From: jialbai Date: Thu, 30 Mar 2023 16:30:51 +0800 Subject: [PATCH 38/95] - qb1746: fix extreme case that remainingOzoneLimit decreases to negative value --- x/register/keeper/keeper.go | 4 ++++ x/register/keeper/resource_node.go | 2 +- x/register/keeper/store.go | 6 ++++++ x/sds/keeper/keeper.go | 4 ++++ 4 files changed, 15 insertions(+), 1 deletion(-) diff --git a/x/register/keeper/keeper.go b/x/register/keeper/keeper.go index a69c7a03..cb1201ea 100644 --- a/x/register/keeper/keeper.go +++ b/x/register/keeper/keeper.go @@ -379,6 +379,10 @@ func (k Keeper) UnbondMetaNode(ctx sdk.Context, metaNode types.MetaNode, amt sdk bondDenom := k.GetParams(ctx).BondDenom coin := sdk.NewCoin(bondDenom, amt) if metaNode.GetStatus() == stakingtypes.Bonded { + // to prevent remainingOzoneLimit from being negative value + if !k.IsUnbondable(ctx, amt) { + return sdk.ZeroInt(), time.Time{}, types.ErrInsufficientBalance + } // transfer the node tokens to the not bonded pool k.bondedToUnbonding(ctx, metaNode, true, coin) // adjust ozone limit diff --git a/x/register/keeper/resource_node.go b/x/register/keeper/resource_node.go index dcee57da..99c88594 100644 --- a/x/register/keeper/resource_node.go +++ b/x/register/keeper/resource_node.go @@ -376,7 +376,7 @@ func (k Keeper) UpdateEffectiveStake(ctx sdk.Context, networkAddr stratos.SdsAdd node.Suspend = false k.SetResourceNode(ctx, node) - if effectiveStakeChange.IsNegative() { + if effectiveStakeChange.IsNegative() && k.IsUnbondable(ctx, effectiveStakeChange.Abs()) { ozoneLimitChange = k.DecreaseOzoneLimitBySubtractStake(ctx, effectiveStakeChange.Abs()) } if effectiveStakeChange.IsPositive() { diff --git a/x/register/keeper/store.go b/x/register/keeper/store.go index 2fcd2ad6..6df84fa1 100644 --- a/x/register/keeper/store.go +++ b/x/register/keeper/store.go @@ -45,6 +45,12 @@ func (k Keeper) GetRemainingOzoneLimit(ctx sdk.Context) (value sdk.Int) { return } +func (k Keeper) IsUnbondable(ctx sdk.Context, unbondAmt sdk.Int) bool { + remaining := k.GetRemainingOzoneLimit(ctx) + stakeNozRate := k.GetStakeNozRate(ctx) + return remaining.ToDec().GTE(unbondAmt.ToDec().Quo(stakeNozRate)) +} + // SetUnbondingNode sets the unbonding MetaNode func (k Keeper) SetUnbondingNode(ctx sdk.Context, ubd types.UnbondingNode) { store := ctx.KVStore(k.storeKey) diff --git a/x/sds/keeper/keeper.go b/x/sds/keeper/keeper.go index 3ff169d4..6253a75d 100644 --- a/x/sds/keeper/keeper.go +++ b/x/sds/keeper/keeper.go @@ -2,6 +2,7 @@ package keeper import ( "encoding/hex" + "errors" "fmt" "github.com/tendermint/tendermint/libs/log" @@ -90,6 +91,9 @@ func (k Keeper) purchaseNozAndSubCoins(ctx sdk.Context, from sdk.AccAddress, amo Add(amount)).ToDec()). TruncateInt() + if purchased.GT(Lt) { + return sdk.ZeroInt(), errors.New("not enough remaining ozone limit to complete prepay") + } // send coins to total unissued prepay pool prepayAmt := sdk.NewCoin(k.BondDenom(ctx), amount) err := k.bankKeeper.SendCoinsFromAccountToModule(ctx, from, registertypes.TotalUnissuedPrepay, sdk.NewCoins(prepayAmt)) From 9e511c3d8818857585e5d8866a3017c095689309 Mon Sep 17 00:00:00 2001 From: Xiong Date: Thu, 30 Mar 2023 16:12:01 -0400 Subject: [PATCH 39/95] 1, Add access control for MsgRemoveResourceNode/MsgRemoveMetaNode 2, Code optimization, move some logic validation from msg_server lever to other keeper functions --- x/register/keeper/keeper.go | 19 +++--- x/register/keeper/meta_node.go | 103 +++++++++++++++++------------ x/register/keeper/msg_server.go | 84 ++++++----------------- x/register/keeper/resource_node.go | 38 ++++++----- x/register/types/errors.go | 6 +- 5 files changed, 118 insertions(+), 132 deletions(-) diff --git a/x/register/keeper/keeper.go b/x/register/keeper/keeper.go index a69c7a03..86a37417 100644 --- a/x/register/keeper/keeper.go +++ b/x/register/keeper/keeper.go @@ -272,17 +272,18 @@ func (k Keeper) subtractUBDNodeStake(ctx sdk.Context, ubd types.UnbondingNode, t func (k Keeper) UnbondResourceNode(ctx sdk.Context, resourceNode types.ResourceNode, amt sdk.Int, ) (ozoneLimitChange, availableTokenAmtBefore, availableTokenAmtAfter sdk.Int, unbondingMatureTime time.Time, err error) { - params := k.GetParams(ctx) - ctx.Logger().Info("Params of register module: " + params.String()) + if resourceNode.GetStatus() == stakingtypes.Unbonding { + return sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroInt(), time.Time{}, types.ErrUnbondingNode + } // transfer the node tokens to the not bonded pool networkAddr, err := stratos.SdsAddressFromBech32(resourceNode.GetNetworkAddress()) if err != nil { - return sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroInt(), time.Now(), errors.New("invalid network address") + return sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroInt(), time.Time{}, errors.New("invalid network address") } ownerAddr, err := sdk.AccAddressFromBech32(resourceNode.GetOwnerAddress()) if err != nil { - return sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroInt(), time.Now(), errors.New("invalid wallet address") + return sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroInt(), time.Time{}, errors.New("invalid wallet address") } ownerAcc := k.accountKeeper.GetAccount(ctx, ownerAddr) if ownerAcc == nil { @@ -308,8 +309,7 @@ func (k Keeper) UnbondResourceNode(ctx sdk.Context, resourceNode types.ResourceN } unbondingMatureTime = calcUnbondingMatureTime(ctx, resourceNode.Status, resourceNode.CreationTime, k.UnbondingThreasholdTime(ctx), k.UnbondingCompletionTime(ctx)) - bondDenom := k.GetParams(ctx).BondDenom - coin := sdk.NewCoin(bondDenom, amt) + coin := sdk.NewCoin(k.BondDenom(ctx), amt) if resourceNode.GetStatus() == stakingtypes.Bonded { // transfer the node tokens to the not bonded pool k.bondedToUnbonding(ctx, resourceNode, false, coin) @@ -343,14 +343,17 @@ func (k Keeper) UnbondResourceNode(ctx sdk.Context, resourceNode types.ResourceN func (k Keeper) UnbondMetaNode(ctx sdk.Context, metaNode types.MetaNode, amt sdk.Int, ) (ozoneLimitChange sdk.Int, unbondingMatureTime time.Time, err error) { + if metaNode.GetStatus() == stakingtypes.Unbonding { + return sdk.ZeroInt(), time.Time{}, types.ErrUnbondingNode + } networkAddr, err := stratos.SdsAddressFromBech32(metaNode.GetNetworkAddress()) if err != nil { - return sdk.ZeroInt(), time.Now(), errors.New("invalid network address") + return sdk.ZeroInt(), time.Time{}, errors.New("invalid network address") } ownerAddr, err := sdk.AccAddressFromBech32(metaNode.GetOwnerAddress()) if err != nil { - return sdk.ZeroInt(), time.Now(), errors.New("invalid wallet address") + return sdk.ZeroInt(), time.Time{}, errors.New("invalid wallet address") } ownerAcc := k.accountKeeper.GetAccount(ctx, ownerAddr) diff --git a/x/register/keeper/meta_node.go b/x/register/keeper/meta_node.go index f33fc38c..2c1dbcaa 100644 --- a/x/register/keeper/meta_node.go +++ b/x/register/keeper/meta_node.go @@ -1,7 +1,6 @@ package keeper import ( - "bytes" "strings" "time" @@ -104,6 +103,14 @@ func (k Keeper) GetAllValidMetaNodes(ctx sdk.Context) (metaNodes []types.MetaNod func (k Keeper) RegisterMetaNode(ctx sdk.Context, networkAddr stratos.SdsAddress, pubKey cryptotypes.PubKey, ownerAddr sdk.AccAddress, description types.Description, stake sdk.Coin) (ozoneLimitChange sdk.Int, err error) { + if _, found := k.GetMetaNode(ctx, networkAddr); found { + ctx.Logger().Error("Meta node already exist") + return ozoneLimitChange, types.ErrMetaNodePubKeyExists + } + if stake.GetDenom() != k.BondDenom(ctx) { + return ozoneLimitChange, types.ErrBadDenom + } + metaNode, err := types.NewMetaNode(networkAddr, pubKey, ownerAddr, &description, ctx.BlockHeader().Time) if err != nil { return ozoneLimitChange, err @@ -285,7 +292,7 @@ func (k Keeper) GetMetaNodeList(ctx sdk.Context, networkAddr stratos.SdsAddress) if err != nil { continue } - if bytes.Equal(networkAddrNode, networkAddr) { + if networkAddrNode.Equals(networkAddr) { metaNodes = append(metaNodes, node) } } @@ -306,78 +313,88 @@ func (k Keeper) GetMetaNodeListByMoniker(ctx sdk.Context, moniker string) (resou return resourceNodes, nil } -func (k Keeper) HandleVoteForMetaNodeRegistration(ctx sdk.Context, nodeAddr stratos.SdsAddress, ownerAddr sdk.AccAddress, - opinion types.VoteOpinion, voterAddr stratos.SdsAddress) (nodeStatus stakingtypes.BondStatus, err error) { +func (k Keeper) HandleVoteForMetaNodeRegistration(ctx sdk.Context, candidateNetworkAddr stratos.SdsAddress, candidateOwnerAddr sdk.AccAddress, + opinion types.VoteOpinion, voterNetworkAddr stratos.SdsAddress, voterOwnerAddr sdk.AccAddress) (nodeStatus stakingtypes.BondStatus, err error) { - votePool, found := k.GetMetaNodeRegistrationVotePool(ctx, nodeAddr) + // voter validation + voterNode, found := k.GetMetaNode(ctx, voterNetworkAddr) if !found { - return stakingtypes.Unbonded, types.ErrNoRegistrationVotePoolFound + return stakingtypes.Unbonded, types.ErrNoVoterMetaNodeFound } - if votePool.ExpireTime.Before(ctx.BlockHeader().Time) { - return stakingtypes.Unbonded, types.ErrVoteExpired + if voterNode.GetOwnerAddress() != voterOwnerAddr.String() { + return stakingtypes.Unbonded, types.ErrInvalidVoterOwnerAddr } - if hasStringValue(votePool.ApproveList, voterAddr.String()) || hasStringValue(votePool.RejectList, voterAddr.String()) { - return stakingtypes.Unbonded, types.ErrDuplicateVoting + if voterNode.Status != stakingtypes.Bonded || voterNode.Suspend { + return stakingtypes.Unbonded, types.ErrInvalidVoterStatus } - node, found := k.GetMetaNode(ctx, nodeAddr) + // candidate validation + candidateNode, found := k.GetMetaNode(ctx, candidateNetworkAddr) if !found { - return stakingtypes.Unbonded, types.ErrNoMetaNodeFound + return stakingtypes.Unbonded, types.ErrNoCandidateMetaNodeFound } - ownerAddrNode, err := sdk.AccAddressFromBech32(node.GetOwnerAddress()) - if err != nil { - return stakingtypes.Unbonded, types.ErrInvalidOwnerAddr + if candidateNode.GetOwnerAddress() != candidateOwnerAddr.String() { + return candidateNode.Status, types.ErrInvalidCandidateOwnerAddr } - if !bytes.Equal(ownerAddrNode, ownerAddr) { - return node.Status, types.ErrInvalidOwnerAddr + + // vote validation and handle voting + votePool, found := k.GetMetaNodeRegistrationVotePool(ctx, candidateNetworkAddr) + if !found { + return stakingtypes.Unbonded, types.ErrNoRegistrationVotePoolFound + } + if votePool.ExpireTime.Before(ctx.BlockHeader().Time) { + return stakingtypes.Unbonded, types.ErrVoteExpired + } + if hasStringValue(votePool.ApproveList, voterNetworkAddr.String()) || hasStringValue(votePool.RejectList, voterNetworkAddr.String()) { + return stakingtypes.Unbonded, types.ErrDuplicateVoting } if opinion.Equal(types.Approve) { - votePool.ApproveList = append(votePool.ApproveList, voterAddr.String()) + votePool.ApproveList = append(votePool.ApproveList, voterNetworkAddr.String()) } else { - votePool.RejectList = append(votePool.RejectList, voterAddr.String()) + votePool.RejectList = append(votePool.RejectList, voterNetworkAddr.String()) } k.SetMetaNodeRegistrationVotePool(ctx, votePool) - if node.Status == stakingtypes.Bonded { - return node.Status, nil + if candidateNode.Status == stakingtypes.Bonded { + return candidateNode.Status, nil } totalSpCount := len(k.GetAllValidMetaNodes(ctx)) voteCountRequiredToPass := totalSpCount*2/3 + 1 //unbounded to bounded if len(votePool.ApproveList) >= voteCountRequiredToPass { - node.Status = stakingtypes.Bonded - node.Suspend = false - k.SetMetaNode(ctx, node) + candidateNode.Status = stakingtypes.Bonded + candidateNode.Suspend = false + k.SetMetaNode(ctx, candidateNode) // increase ozone limit after vote is approved - _ = k.IncreaseOzoneLimitByAddStake(ctx, node.Tokens) + _ = k.IncreaseOzoneLimitByAddStake(ctx, candidateNode.Tokens) // increase mata node count v := k.GetBondedMetaNodeCnt(ctx) count := v.Add(sdk.NewInt(1)) k.SetBondedMetaNodeCnt(ctx, count) // move stake from not bonded pool to bonded pool - tokenToBond := sdk.NewCoin(k.BondDenom(ctx), node.Tokens) + tokenToBond := sdk.NewCoin(k.BondDenom(ctx), candidateNode.Tokens) // sub coins from not bonded pool nBondedMetaAccountAddr := k.accountKeeper.GetModuleAddress(types.MetaNodeNotBondedPool) if nBondedMetaAccountAddr == nil { ctx.Logger().Error("not bonded account address for meta nodes does not exist.") - return node.Status, types.ErrUnknownAccountAddress + return candidateNode.Status, types.ErrUnknownAccountAddress } hasCoin := k.bankKeeper.HasBalance(ctx, nBondedMetaAccountAddr, tokenToBond) if !hasCoin { - return node.Status, types.ErrInsufficientBalance + return candidateNode.Status, types.ErrInsufficientBalance } err = k.bankKeeper.SendCoinsFromModuleToModule(ctx, types.MetaNodeNotBondedPool, types.MetaNodeBondedPool, sdk.NewCoins(tokenToBond)) if err != nil { - return node.Status, err + return candidateNode.Status, err } } - return node.Status, nil + return candidateNode.Status, nil } func (k Keeper) UpdateMetaNode(ctx sdk.Context, description types.Description, @@ -389,7 +406,7 @@ func (k Keeper) UpdateMetaNode(ctx sdk.Context, description types.Description, } ownerAddrNode, _ := sdk.AccAddressFromBech32(node.GetOwnerAddress()) - if !bytes.Equal(ownerAddrNode, ownerAddr) { + if !ownerAddrNode.Equals(ownerAddr) { return types.ErrInvalidOwnerAddr } @@ -400,34 +417,34 @@ func (k Keeper) UpdateMetaNode(ctx sdk.Context, description types.Description, return nil } -func (k Keeper) UpdateMetaNodeStake(ctx sdk.Context, networkAddr stratos.SdsAddress, ownerAddr sdk.AccAddress, - stakeDelta sdk.Coin, incrStake bool) (ozoneLimitChange sdk.Int, unbondingMatureTime time.Time, err error) { +func (k Keeper) UpdateMetaNodeStake(ctx sdk.Context, networkAddr stratos.SdsAddress, ownerAddr sdk.AccAddress, stakeDelta sdk.Coin, incrStake bool) ( + ozoneLimitChange sdk.Int, unbondingMatureTime time.Time, err error) { + + if stakeDelta.GetDenom() != k.BondDenom(ctx) { + return sdk.ZeroInt(), time.Time{}, types.ErrBadDenom + } - blockTime := ctx.BlockHeader().Time node, found := k.GetMetaNode(ctx, networkAddr) if !found { - return sdk.ZeroInt(), blockTime, types.ErrNoMetaNodeFound + return sdk.ZeroInt(), time.Time{}, types.ErrNoMetaNodeFound } ownerAddrNode, _ := sdk.AccAddressFromBech32(node.GetOwnerAddress()) - if !bytes.Equal(ownerAddrNode, ownerAddr) { - return sdk.ZeroInt(), blockTime, types.ErrInvalidOwnerAddr + if !ownerAddrNode.Equals(ownerAddr) { + return sdk.ZeroInt(), time.Time{}, types.ErrInvalidOwnerAddr } if incrStake { + blockTime := ctx.BlockHeader().Time ozoneLimitChange, err = k.AddMetaNodeStake(ctx, node, stakeDelta) if err != nil { - return sdk.ZeroInt(), blockTime, err + return sdk.ZeroInt(), time.Time{}, err } return ozoneLimitChange, blockTime, nil } else { - // if !incrStake - if node.GetStatus() == stakingtypes.Unbonding { - return sdk.ZeroInt(), blockTime, types.ErrUnbondingNode - } ozoneLimitChange, completionTime, err := k.UnbondMetaNode(ctx, node, stakeDelta.Amount) if err != nil { - return sdk.ZeroInt(), blockTime, err + return sdk.ZeroInt(), time.Time{}, err } return ozoneLimitChange, completionTime, nil } diff --git a/x/register/keeper/msg_server.go b/x/register/keeper/msg_server.go index 3ccfde86..c91c6d71 100644 --- a/x/register/keeper/msg_server.go +++ b/x/register/keeper/msg_server.go @@ -10,8 +10,6 @@ import ( cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - stratos "github.com/stratosnet/stratos-chain/types" "github.com/stratosnet/stratos-chain/x/register/types" ) @@ -50,15 +48,6 @@ func (k msgServer) HandleMsgCreateResourceNode(goCtx context.Context, msg *types return &types.MsgCreateResourceNodeResponse{}, sdkerrors.Wrap(types.ErrInvalidOwnerAddr, err.Error()) } - if _, found := k.GetResourceNode(ctx, networkAddr); found { - ctx.Logger().Error("Resource node already exist") - return nil, types.ErrResourceNodePubKeyExists - } - - if msg.GetValue().Denom != k.BondDenom(ctx) { - return nil, types.ErrBadDenom - } - ozoneLimitChange, err := k.RegisterResourceNode(ctx, networkAddr, pk, ownerAddress, *msg.Description, types.NodeType(msg.NodeType), msg.GetValue()) if err != nil { return nil, sdkerrors.Wrap(types.ErrRegisterResourceNode, err.Error()) @@ -95,15 +84,6 @@ func (k msgServer) HandleMsgCreateMetaNode(goCtx context.Context, msg *types.Msg return &types.MsgCreateMetaNodeResponse{}, sdkerrors.Wrap(types.ErrInvalidNetworkAddr, err.Error()) } - if _, found := k.GetMetaNode(ctx, networkAddr); found { - ctx.Logger().Error("Meta node already exist") - return nil, types.ErrMetaNodePubKeyExists - } - - if msg.GetValue().Denom != k.BondDenom(ctx) { - return nil, types.ErrBadDenom - } - ownerAddress, err := sdk.AccAddressFromBech32(msg.OwnerAddress) if err != nil { return &types.MsgCreateMetaNodeResponse{}, sdkerrors.Wrap(types.ErrInvalidOwnerAddr, err.Error()) @@ -138,21 +118,21 @@ func (k msgServer) HandleMsgRemoveResourceNode(goCtx context.Context, msg *types } resourceNode, found := k.GetResourceNode(ctx, p2pAddress) if !found { - return nil, types.ErrNoResourceNodeFound + return &types.MsgRemoveResourceNodeResponse{}, types.ErrNoResourceNodeFound } - if resourceNode.GetStatus() == stakingtypes.Unbonding { - return nil, types.ErrUnbondingNode + if msg.GetOwnerAddress() != resourceNode.GetOwnerAddress() { + return &types.MsgRemoveResourceNodeResponse{}, types.ErrInvalidOwnerAddr } unbondingStake := k.GetUnbondingNodeBalance(ctx, p2pAddress) availableStake := resourceNode.Tokens.Sub(unbondingStake) if availableStake.LTE(sdk.ZeroInt()) { - return nil, types.ErrInsufficientBalance + return &types.MsgRemoveResourceNodeResponse{}, types.ErrInsufficientBalance } ozoneLimitChange, _, _, completionTime, err := k.UnbondResourceNode(ctx, resourceNode, availableStake) if err != nil { - return nil, sdkerrors.Wrap(types.ErrUnbondResourceNode, err.Error()) + return &types.MsgRemoveResourceNodeResponse{}, sdkerrors.Wrap(types.ErrUnbondResourceNode, err.Error()) } ctx.EventManager().EmitEvents(sdk.Events{ @@ -182,22 +162,21 @@ func (k msgServer) HandleMsgRemoveMetaNode(goCtx context.Context, msg *types.Msg } metaNode, found := k.GetMetaNode(ctx, p2pAddress) if !found { - return nil, types.ErrNoMetaNodeFound + return &types.MsgRemoveMetaNodeResponse{}, types.ErrNoMetaNodeFound } - - if metaNode.GetStatus() == stakingtypes.Unbonding { - return nil, types.ErrUnbondingNode + if msg.GetOwnerAddress() != metaNode.GetOwnerAddress() { + return &types.MsgRemoveMetaNodeResponse{}, types.ErrInvalidOwnerAddr } unbondingStake := k.GetUnbondingNodeBalance(ctx, p2pAddress) availableStake := metaNode.Tokens.Sub(unbondingStake) if availableStake.LTE(sdk.ZeroInt()) { - return nil, types.ErrInsufficientBalance + return &types.MsgRemoveMetaNodeResponse{}, types.ErrInsufficientBalance } ozoneLimitChange, completionTime, err := k.UnbondMetaNode(ctx, metaNode, availableStake) if err != nil { - return nil, sdkerrors.Wrap(types.ErrUnbondMetaNode, err.Error()) + return &types.MsgRemoveMetaNodeResponse{}, sdkerrors.Wrap(types.ErrUnbondMetaNode, err.Error()) } ctx.EventManager().EmitEvents(sdk.Events{ @@ -221,40 +200,27 @@ func (k msgServer) HandleMsgRemoveMetaNode(goCtx context.Context, msg *types.Msg func (k msgServer) HandleMsgMetaNodeRegistrationVote(goCtx context.Context, msg *types.MsgMetaNodeRegistrationVote) (*types.MsgMetaNodeRegistrationVoteResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) - candidateNetworkAddress, err := stratos.SdsAddressFromBech32(msg.CandidateNetworkAddress) + candidateNetworkAddress, err := stratos.SdsAddressFromBech32(msg.GetCandidateNetworkAddress()) if err != nil { return &types.MsgMetaNodeRegistrationVoteResponse{}, sdkerrors.Wrap(types.ErrInvalidCandidateNetworkAddr, err.Error()) } - - nodeToApprove, found := k.GetMetaNode(ctx, candidateNetworkAddress) - if !found { - return nil, types.ErrNoMetaNodeFound - } - if nodeToApprove.OwnerAddress != msg.CandidateOwnerAddress { - return nil, types.ErrInvalidOwnerAddr + candidateOwnerAddress, err := sdk.AccAddressFromBech32(msg.GetCandidateOwnerAddress()) + if err != nil { + return &types.MsgMetaNodeRegistrationVoteResponse{}, types.ErrInvalidCandidateOwnerAddr } - - voterNetworkAddress, err := stratos.SdsAddressFromBech32(msg.VoterNetworkAddress) + voterNetworkAddress, err := stratos.SdsAddressFromBech32(msg.GetVoterNetworkAddress()) if err != nil { return &types.MsgMetaNodeRegistrationVoteResponse{}, sdkerrors.Wrap(types.ErrInvalidVoterNetworkAddr, err.Error()) } - voter, found := k.GetMetaNode(ctx, voterNetworkAddress) - if !found { - return nil, types.ErrInvalidVoterAddr - } - - candidateOwnerAddress, err := sdk.AccAddressFromBech32(msg.CandidateOwnerAddress) + voterOwnerAddress, err := sdk.AccAddressFromBech32(msg.GetVoterOwnerAddress()) if err != nil { - return &types.MsgMetaNodeRegistrationVoteResponse{}, sdkerrors.Wrap(types.ErrInvalidCandidateOwnerAddr, err.Error()) - } - - if !(voter.Status == stakingtypes.Bonded) || voter.Suspend { - return nil, types.ErrInvalidVoterStatus + return &types.MsgMetaNodeRegistrationVoteResponse{}, sdkerrors.Wrap(types.ErrInvalidVoterOwnerAddr, err.Error()) } - nodeStatus, err := k.HandleVoteForMetaNodeRegistration(ctx, candidateNetworkAddress, candidateOwnerAddress, types.VoteOpinion(msg.Opinion), voterNetworkAddress) + nodeStatus, err := k.HandleVoteForMetaNodeRegistration( + ctx, candidateNetworkAddress, candidateOwnerAddress, types.VoteOpinion(msg.Opinion), voterNetworkAddress, voterOwnerAddress) if err != nil { - return nil, sdkerrors.Wrap(types.ErrVoteMetaNode, err.Error()) + return &types.MsgMetaNodeRegistrationVoteResponse{}, sdkerrors.Wrap(types.ErrVoteMetaNode, err.Error()) } ctx.EventManager().EmitEvents(sdk.Events{ @@ -282,11 +248,11 @@ func (k msgServer) HandleMsgUpdateResourceNode(goCtx context.Context, msg *types if err != nil { return &types.MsgUpdateResourceNodeResponse{}, sdkerrors.Wrap(types.ErrInvalidNetworkAddr, err.Error()) } - ownerAddress, err := sdk.AccAddressFromBech32(msg.OwnerAddress) if err != nil { return &types.MsgUpdateResourceNodeResponse{}, sdkerrors.Wrap(types.ErrInvalidOwnerAddr, err.Error()) } + err = k.UpdateResourceNode(ctx, msg.Description, types.NodeType(msg.NodeType), networkAddr, ownerAddress) if err != nil { return nil, sdkerrors.Wrap(types.ErrUpdateResourceNode, err.Error()) @@ -319,10 +285,6 @@ func (k msgServer) HandleMsgUpdateResourceNodeStake(goCtx context.Context, msg * return &types.MsgUpdateResourceNodeStakeResponse{}, sdkerrors.Wrap(types.ErrInvalidOwnerAddr, err.Error()) } - if msg.GetStakeDelta().Denom != k.BondDenom(ctx) { - return nil, types.ErrBadDenom - } - ozoneLimitChange, availableTokenAmtBefore, availableTokenAmtAfter, completionTime, node, err := k.UpdateResourceNodeStake(ctx, networkAddr, ownerAddress, msg.GetStakeDelta(), msg.IncrStake) if err != nil { @@ -439,10 +401,6 @@ func (k msgServer) HandleMsgUpdateMetaNodeStake(goCtx context.Context, msg *type return &types.MsgUpdateMetaNodeStakeResponse{}, sdkerrors.Wrap(types.ErrInvalidOwnerAddr, err.Error()) } - if msg.GetStakeDelta().Denom != k.BondDenom(ctx) { - return nil, types.ErrBadDenom - } - ozoneLimitChange, completionTime, err := k.UpdateMetaNodeStake(ctx, networkAddr, ownerAddress, msg.GetStakeDelta(), msg.IncrStake) if err != nil { return nil, sdkerrors.Wrap(types.ErrUpdateMetaNodeStake, err.Error()) diff --git a/x/register/keeper/resource_node.go b/x/register/keeper/resource_node.go index dcee57da..5af72da8 100644 --- a/x/register/keeper/resource_node.go +++ b/x/register/keeper/resource_node.go @@ -1,12 +1,12 @@ package keeper import ( - "bytes" "time" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + stratos "github.com/stratosnet/stratos-chain/types" "github.com/stratosnet/stratos-chain/x/register/types" ) @@ -281,6 +281,14 @@ func (k Keeper) removeResourceNode(ctx sdk.Context, addr stratos.SdsAddress) err func (k Keeper) RegisterResourceNode(ctx sdk.Context, networkAddr stratos.SdsAddress, pubKey cryptotypes.PubKey, ownerAddr sdk.AccAddress, description types.Description, nodeType types.NodeType, stake sdk.Coin) (ozoneLimitChange sdk.Int, err error) { + if _, found := k.GetResourceNode(ctx, networkAddr); found { + ctx.Logger().Error("Resource node already exist") + return ozoneLimitChange, types.ErrResourceNodePubKeyExists + } + if stake.GetDenom() != k.BondDenom(ctx) { + return ozoneLimitChange, types.ErrBadDenom + } + resourceNode, err := types.NewResourceNode(networkAddr, pubKey, ownerAddr, &description, nodeType, ctx.BlockHeader().Time) if err != nil { return ozoneLimitChange, err @@ -298,7 +306,7 @@ func (k Keeper) UpdateResourceNode(ctx sdk.Context, description types.Descriptio } ownerAddrNode, _ := sdk.AccAddressFromBech32(node.GetOwnerAddress()) - if !bytes.Equal(ownerAddrNode, ownerAddr) { + if !ownerAddrNode.Equals(ownerAddr) { return types.ErrInvalidOwnerAddr } @@ -312,36 +320,34 @@ func (k Keeper) UpdateResourceNode(ctx sdk.Context, description types.Descriptio return nil } -func (k Keeper) UpdateResourceNodeStake(ctx sdk.Context, networkAddr stratos.SdsAddress, ownerAddr sdk.AccAddress, - stakeDelta sdk.Coin, incrStake bool) (ozoneLimitChange, availableTokenAmtBefore, availableTokenAmtAfter sdk.Int, - unbondingMatureTime time.Time, resourcenode types.ResourceNode, err error) { +func (k Keeper) UpdateResourceNodeStake(ctx sdk.Context, networkAddr stratos.SdsAddress, ownerAddr sdk.AccAddress, stakeDelta sdk.Coin, incrStake bool) ( + ozoneLimitChange, availableTokenAmtBefore, availableTokenAmtAfter sdk.Int, unbondingMatureTime time.Time, resourcenode types.ResourceNode, err error) { + + if stakeDelta.GetDenom() != k.BondDenom(ctx) { + return sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroInt(), time.Time{}, types.ResourceNode{}, types.ErrBadDenom + } - blockTime := ctx.BlockHeader().Time node, found := k.GetResourceNode(ctx, networkAddr) if !found { - return sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroInt(), blockTime, node, types.ErrNoResourceNodeFound + return sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroInt(), time.Time{}, types.ResourceNode{}, types.ErrNoResourceNodeFound } ownerAddrNode, _ := sdk.AccAddressFromBech32(node.GetOwnerAddress()) - if !bytes.Equal(ownerAddrNode, ownerAddr) { - return sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroInt(), blockTime, node, types.ErrInvalidOwnerAddr + if !ownerAddrNode.Equals(ownerAddr) { + return sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroInt(), time.Time{}, types.ResourceNode{}, types.ErrInvalidOwnerAddr } if incrStake { + blockTime := ctx.BlockHeader().Time ozoneLimitChange, availableTokenAmtBefore, availableTokenAmtAfter, err := k.AddResourceNodeStake(ctx, node, stakeDelta) if err != nil { - return sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroInt(), blockTime, node, err + return sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroInt(), time.Time{}, types.ResourceNode{}, err } return ozoneLimitChange, availableTokenAmtBefore, availableTokenAmtAfter, blockTime, node, nil } else { - // if !incrStake - if node.GetStatus() == stakingtypes.Unbonding { - return sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroInt(), blockTime, node, types.ErrUnbondingNode - } - ozoneLimitChange, availableTokenAmtBefore, availableTokenAmtAfter, completionTime, err := k.UnbondResourceNode(ctx, node, stakeDelta.Amount) if err != nil { - return sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroInt(), blockTime, node, err + return sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroInt(), time.Time{}, types.ResourceNode{}, err } return ozoneLimitChange, availableTokenAmtBefore, availableTokenAmtAfter, completionTime, node, nil } diff --git a/x/register/types/errors.go b/x/register/types/errors.go index 6377b8ae..02abf4b7 100644 --- a/x/register/types/errors.go +++ b/x/register/types/errors.go @@ -27,11 +27,12 @@ const ( codeErrEmptyVoterOwnerAddr codeErrInvalidCandidateNetworkAddr codeErrInvalidCandidateOwnerAddr + codeErrNoCandidateMetaNodeFound codeErrInvalidVoterNetworkAddr codeErrInvalidVoterOwnerAddr + codeErrNoVoterMetaNodeFound codeErrSameAddr codeErrInvalidOwnerAddr - codeErrInvalidVoterAddr codeErrInvalidVoterStatus codeEcoderrNoRegistrationVotePoolFound codeErrDuplicateVoting @@ -88,11 +89,12 @@ var ( ErrEmptyVoterOwnerAddr = sdkerrors.Register(ModuleName, codeErrEmptyVoterOwnerAddr, "missing voter owner address") ErrInvalidCandidateNetworkAddr = sdkerrors.Register(ModuleName, codeErrInvalidCandidateNetworkAddr, "invalid candidate network address") ErrInvalidCandidateOwnerAddr = sdkerrors.Register(ModuleName, codeErrInvalidCandidateOwnerAddr, "invalid candidate owner address") + ErrNoCandidateMetaNodeFound = sdkerrors.Register(ModuleName, codeErrNoCandidateMetaNodeFound, "candidate meta node does not exist") ErrInvalidVoterNetworkAddr = sdkerrors.Register(ModuleName, codeErrInvalidVoterNetworkAddr, "invalid voter network address") ErrInvalidVoterOwnerAddr = sdkerrors.Register(ModuleName, codeErrInvalidVoterOwnerAddr, "invalid voter owner address") + ErrNoVoterMetaNodeFound = sdkerrors.Register(ModuleName, codeErrNoVoterMetaNodeFound, "voter meta node does not exist") ErrSameAddr = sdkerrors.Register(ModuleName, codeErrSameAddr, "node address should not same as the voter address") ErrInvalidOwnerAddr = sdkerrors.Register(ModuleName, codeErrInvalidOwnerAddr, "invalid owner address") - ErrInvalidVoterAddr = sdkerrors.Register(ModuleName, codeErrInvalidVoterAddr, "invalid voter address") ErrInvalidVoterStatus = sdkerrors.Register(ModuleName, codeErrInvalidVoterStatus, "invalid voter status") ErrNoRegistrationVotePoolFound = sdkerrors.Register(ModuleName, codeEcoderrNoRegistrationVotePoolFound, "registration pool does not exist") ErrDuplicateVoting = sdkerrors.Register(ModuleName, codeErrDuplicateVoting, "duplicate voting") From 7a3c829f68874e2cff771120439a6ff5fd6ea909 Mon Sep 17 00:00:00 2001 From: Xiong Date: Thu, 30 Mar 2023 16:44:55 -0400 Subject: [PATCH 40/95] Remove unnecessary validation. Following Prepay() method only accept token with denom defined in the module params. --- x/sds/keeper/msg_server.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/x/sds/keeper/msg_server.go b/x/sds/keeper/msg_server.go index 2d92bcdf..7b5938ed 100644 --- a/x/sds/keeper/msg_server.go +++ b/x/sds/keeper/msg_server.go @@ -67,10 +67,6 @@ func (k msgServer) HandleMsgFileUpload(c context.Context, msg *types.MsgFileUplo func (k msgServer) HandleMsgPrepay(c context.Context, msg *types.MsgPrepay) (*types.MsgPrepayResponse, error) { ctx := sdk.UnwrapSDKContext(c) - if k.bankKeeper.IsSendEnabledCoin(ctx, sdk.NewCoin(types.DefaultBondDenom, sdk.OneInt())) == false { - return &types.MsgPrepayResponse{}, sdkerrors.ErrInvalidCoins - } - sender, err := sdk.AccAddressFromBech32(msg.GetSender()) if err != nil { return &types.MsgPrepayResponse{}, sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, err.Error()) From 458ec960abeb88eeb1131aa7f67bc4c8e034c3d3 Mon Sep 17 00:00:00 2001 From: Xiong Date: Fri, 31 Mar 2023 15:49:48 -0400 Subject: [PATCH 41/95] Fix int64 overflow issue for reward distribution --- x/pot/keeper/distribute.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/x/pot/keeper/distribute.go b/x/pot/keeper/distribute.go index ea93c2f7..f51470f1 100644 --- a/x/pot/keeper/distribute.go +++ b/x/pot/keeper/distribute.go @@ -198,14 +198,16 @@ func (k Keeper) addNewIndividualAndUpdateImmatureTotal(ctx sdk.Context, account // Iteration for mature rewards/slashing of all nodes func (k Keeper) rewardMatureAndSubSlashing(ctx sdk.Context, currentEpoch sdk.Int) (totalSlashed sdk.Coins) { - - matureStartEpoch := k.GetLastReportedEpoch(ctx).Int64() + 1 - matureEndEpoch := currentEpoch.Int64() + lastReportedEpoch := k.GetLastReportedEpoch(ctx) + matureStartEpochOffset := int64(1) + matureEndEpochOffset := currentEpoch.Sub(lastReportedEpoch).Int64() totalSlashed = sdk.Coins{} - for i := matureStartEpoch; i <= matureEndEpoch; i++ { - k.IteratorIndividualReward(ctx, sdk.NewInt(i), func(walletAddress sdk.AccAddress, individualReward types.Reward) (stop bool) { + for i := matureStartEpochOffset; i <= matureEndEpochOffset; i++ { + processingEpoch := sdk.NewInt(i).Add(lastReportedEpoch) + + k.IteratorIndividualReward(ctx, processingEpoch, func(walletAddress sdk.AccAddress, individualReward types.Reward) (stop bool) { oldMatureTotal := k.GetMatureTotalReward(ctx, walletAddress) oldImmatureTotal := k.GetImmatureTotalReward(ctx, walletAddress) immatureToMature := individualReward.RewardFromMiningPool.Add(individualReward.RewardFromTrafficPool...) From a01fcfe3811104be805f4295b1f43639e04e702a Mon Sep 17 00:00:00 2001 From: Xiong Date: Fri, 31 Mar 2023 16:06:31 -0400 Subject: [PATCH 42/95] Fix: BLSSignature parameter lost in the rest API --- x/pot/client/rest/tx.go | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/x/pot/client/rest/tx.go b/x/pot/client/rest/tx.go index f3ed4493..8b0544f9 100644 --- a/x/pot/client/rest/tx.go +++ b/x/pot/client/rest/tx.go @@ -40,6 +40,7 @@ type ( Reporter string `json:"reporter" yaml:"reporter"` // volume reporter Epoch int64 `json:"epoch" yaml:"epoch"` // volume report epoch ReportReference string `json:"report_reference" yaml:"report_reference"` // volume report reference + BLSSignature types.BaseBLSSignatureInfo `json:"bls_signature" yaml:"bls_signature"` // bls signature } slashingResourceNodeReq struct { @@ -100,7 +101,15 @@ func volumeReportRequestHandlerFn(cliCtx client.Context) http.HandlerFunc { return } - msg := types.NewMsgVolumeReport(walletVolumes, reporter, epoch, reportReference, reporterOwner, types.BLSSignatureInfo{}) + sig := req.BLSSignature + + pubKeys := make([][]byte, len(sig.PubKeys)) + for i, v := range sig.PubKeys { + pubKeys[i] = []byte(v) + } + blsSignature := types.NewBLSSignatureInfo(pubKeys, []byte(sig.Signature), []byte(sig.TxData)) + + msg := types.NewMsgVolumeReport(walletVolumes, reporter, epoch, reportReference, reporterOwner, blsSignature) err = msg.ValidateBasic() if err != nil { rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) From a2f37ef778502d71afb53d69bb0802388a5cb390 Mon Sep 17 00:00:00 2001 From: BoThe1K Date: Sun, 2 Apr 2023 21:29:19 +0300 Subject: [PATCH 43/95] Revert "Fix evm contract destroy" This reverts commit 6250dc6bd9d0413bd3b823c5fb2c29fa72b5d026. --- x/evm/genesis.go | 4 ++-- x/evm/keeper/grpc_query.go | 2 +- x/evm/keeper/statedb.go | 18 ++++++++---------- x/evm/statedb/interfaces.go | 4 ++-- x/evm/statedb/state_object.go | 2 +- x/evm/statedb/statedb.go | 6 +++--- 6 files changed, 17 insertions(+), 19 deletions(-) diff --git a/x/evm/genesis.go b/x/evm/genesis.go index 3d676b8e..f05b67c9 100644 --- a/x/evm/genesis.go +++ b/x/evm/genesis.go @@ -56,7 +56,7 @@ func InitGenesis( panic("code don't match codeHash") } - k.SetCode(ctx, address, codeHash.Bytes(), code) + k.SetCode(ctx, codeHash.Bytes(), code) for _, storage := range account.Storage { k.SetState(ctx, address, common.HexToHash(storage.Key), common.HexToHash(storage.Value).Bytes()) @@ -82,7 +82,7 @@ func ExportGenesis(ctx sdk.Context, k *keeper.Keeper, ak types.AccountKeeper) *t genAccount := types.GenesisAccount{ Address: addr.String(), - Code: common.Bytes2Hex(k.GetCode(ctx, addr, ethAccount.GetCodeHash())), + Code: common.Bytes2Hex(k.GetCode(ctx, ethAccount.GetCodeHash())), Storage: storage, } diff --git a/x/evm/keeper/grpc_query.go b/x/evm/keeper/grpc_query.go index c9b231d0..e18f5bdf 100644 --- a/x/evm/keeper/grpc_query.go +++ b/x/evm/keeper/grpc_query.go @@ -188,7 +188,7 @@ func (k Keeper) Code(c context.Context, req *types.QueryCodeRequest) (*types.Que var code []byte if acct != nil && acct.IsContract() { - code = k.GetCode(ctx, address, common.BytesToHash(acct.CodeHash)) + code = k.GetCode(ctx, common.BytesToHash(acct.CodeHash)) } return &types.QueryCodeResponse{ diff --git a/x/evm/keeper/statedb.go b/x/evm/keeper/statedb.go index 862b4119..0af2d40d 100644 --- a/x/evm/keeper/statedb.go +++ b/x/evm/keeper/statedb.go @@ -46,9 +46,9 @@ func (k *Keeper) GetState(ctx sdk.Context, addr common.Address, key common.Hash) } // GetCode loads contract code from database, implements `statedb.Keeper` interface. -func (k *Keeper) GetCode(ctx sdk.Context, addr common.Address, codeHash common.Hash) []byte { +func (k *Keeper) GetCode(ctx sdk.Context, codeHash common.Hash) []byte { store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefixCode) - return store.Get(append(addr.Bytes(), codeHash.Bytes()...)) + return store.Get(codeHash.Bytes()) } // ForEachStorage iterate contract storage, callback return false to break early @@ -126,7 +126,8 @@ func (k *Keeper) SetAccount(ctx sdk.Context, addr common.Address, account stated } k.accountKeeper.SetAccount(ctx, acct) } else { - baseAcc := acct.(*authtypes.BaseAccount) + var baseAcc *authtypes.BaseAccount + baseAcc = acct.(*authtypes.BaseAccount) if !bytes.Equal(codeHash.Bytes(), types.EmptyCodeHash) { //if codeHash is not empty, and the acct is new created baseAccount, convert to ethAccount first @@ -173,22 +174,19 @@ func (k *Keeper) SetState(ctx sdk.Context, addr common.Address, key common.Hash, } // SetCode set contract code, delete if code is empty. -func (k *Keeper) SetCode(ctx sdk.Context, addr common.Address, codeHash, code []byte) { +func (k *Keeper) SetCode(ctx sdk.Context, codeHash, code []byte) { store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefixCode) - key := append(addr.Bytes(), codeHash...) - // store or delete code action := "updated" if len(code) == 0 { - store.Delete(key) + store.Delete(codeHash) action = "deleted" } else { - store.Set(key, code) + store.Set(codeHash, code) } k.Logger(ctx).Debug( fmt.Sprintf("code %s", action), - "addr", common.BytesToHash(addr.Bytes()).Hex(), "code-hash", common.BytesToHash(codeHash).Hex(), ) } @@ -219,7 +217,7 @@ func (k *Keeper) DeleteAccount(ctx sdk.Context, addr common.Address) error { // remove code codeHashBz := ethAcct.GetCodeHash().Bytes() if !bytes.Equal(codeHashBz, types.EmptyCodeHash) { - k.SetCode(ctx, addr, codeHashBz, nil) + k.SetCode(ctx, codeHashBz, nil) } // clear storage diff --git a/x/evm/statedb/interfaces.go b/x/evm/statedb/interfaces.go index 54f33656..4f41454c 100644 --- a/x/evm/statedb/interfaces.go +++ b/x/evm/statedb/interfaces.go @@ -10,7 +10,7 @@ type Keeper interface { // Read methods GetAccount(ctx sdk.Context, addr common.Address) *Account GetState(ctx sdk.Context, addr common.Address, key common.Hash) common.Hash - GetCode(ctx sdk.Context, addr common.Address, codeHash common.Hash) []byte + GetCode(ctx sdk.Context, codeHash common.Hash) []byte // the callback returns false to break early ForEachStorage(ctx sdk.Context, addr common.Address, cb func(key, value common.Hash) bool) @@ -18,6 +18,6 @@ type Keeper interface { // Write methods, only called by `StateDB.Commit()` SetAccount(ctx sdk.Context, addr common.Address, account Account) error SetState(ctx sdk.Context, addr common.Address, key common.Hash, value []byte) - SetCode(ctx sdk.Context, addr common.Address, codeHash []byte, code []byte) + SetCode(ctx sdk.Context, codeHash []byte, code []byte) DeleteAccount(ctx sdk.Context, addr common.Address) error } diff --git a/x/evm/statedb/state_object.go b/x/evm/statedb/state_object.go index 4ac18500..3ebb800c 100644 --- a/x/evm/statedb/state_object.go +++ b/x/evm/statedb/state_object.go @@ -141,7 +141,7 @@ func (s *stateObject) Code() []byte { if bytes.Equal(s.CodeHash(), emptyCodeHash) { return nil } - code := s.db.keeper.GetCode(s.db.ctx, s.Address(), common.BytesToHash(s.CodeHash())) + code := s.db.keeper.GetCode(s.db.ctx, common.BytesToHash(s.CodeHash())) s.code = code return code } diff --git a/x/evm/statedb/statedb.go b/x/evm/statedb/statedb.go index c9753581..e075308d 100644 --- a/x/evm/statedb/statedb.go +++ b/x/evm/statedb/statedb.go @@ -250,8 +250,8 @@ func (s *StateDB) createObject(addr common.Address) (newobj, prev *stateObject) // CreateAccount is called during the EVM CREATE operation. The situation might arise that // a contract does the following: // -// 1. sends funds to sha(account ++ (nonce + 1)) -// 2. tx_create(sha(account ++ nonce)) (note that this gets the address of 1) +// 1. sends funds to sha(account ++ (nonce + 1)) +// 2. tx_create(sha(account ++ nonce)) (note that this gets the address of 1) // // Carrying over the balance ensures that Ether doesn't disappear. func (s *StateDB) CreateAccount(addr common.Address) { @@ -444,7 +444,7 @@ func (s *StateDB) Commit() error { } } else { if obj.code != nil && obj.dirtyCode { - s.keeper.SetCode(s.ctx, obj.Address(), obj.CodeHash(), obj.code) + s.keeper.SetCode(s.ctx, obj.CodeHash(), obj.code) } if err := s.keeper.SetAccount(s.ctx, obj.Address(), obj.account); err != nil { return sdkerrors.Wrap(err, "failed to set account") From 4f9d1e087d289c8881e59f77a59a29cf3df20dd8 Mon Sep 17 00:00:00 2001 From: BoThe1K Date: Mon, 3 Apr 2023 14:28:16 +0300 Subject: [PATCH 44/95] Rm dletion of the code which was stored --- x/evm/keeper/statedb.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/x/evm/keeper/statedb.go b/x/evm/keeper/statedb.go index 0af2d40d..df423e6a 100644 --- a/x/evm/keeper/statedb.go +++ b/x/evm/keeper/statedb.go @@ -126,8 +126,7 @@ func (k *Keeper) SetAccount(ctx sdk.Context, addr common.Address, account stated } k.accountKeeper.SetAccount(ctx, acct) } else { - var baseAcc *authtypes.BaseAccount - baseAcc = acct.(*authtypes.BaseAccount) + baseAcc := acct.(*authtypes.BaseAccount) if !bytes.Equal(codeHash.Bytes(), types.EmptyCodeHash) { //if codeHash is not empty, and the acct is new created baseAccount, convert to ethAccount first @@ -180,7 +179,7 @@ func (k *Keeper) SetCode(ctx sdk.Context, codeHash, code []byte) { // store or delete code action := "updated" if len(code) == 0 { - store.Delete(codeHash) + // store.Delete(codeHash) action = "deleted" } else { store.Set(codeHash, code) From aa027867677ed9c000b63f1527e19885d935643f Mon Sep 17 00:00:00 2001 From: jialbai Date: Mon, 3 Apr 2023 22:07:41 +0800 Subject: [PATCH 45/95] - qb1752: fix deletion in iteration while DequeueAllMatureUBDQueue --- x/register/keeper/keeper.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/x/register/keeper/keeper.go b/x/register/keeper/keeper.go index cb1201ea..f82bd188 100644 --- a/x/register/keeper/keeper.go +++ b/x/register/keeper/keeper.go @@ -182,6 +182,7 @@ func (k Keeper) InsertUnbondingNodeQueue(ctx sdk.Context, ubd types.UnbondingNod // Iteration for dequeuing all mature unbonding queue // TODO: Unused parameter: currTime func (k Keeper) DequeueAllMatureUBDQueue(ctx sdk.Context, currTime time.Time) (matureUnbonds []string) { + keysToDelete := make([][]byte, 0) store := ctx.KVStore(k.storeKey) // gets an iterator for all timeslices from time 0 until the current Blockheader time unbondingTimesliceIterator := k.UnbondingNodeQueueIterator(ctx, ctx.BlockHeader().Time) @@ -193,7 +194,11 @@ func (k Keeper) DequeueAllMatureUBDQueue(ctx sdk.Context, currTime time.Time) (m k.cdc.MustUnmarshalLengthPrefixed(value, &timeSliceVal) timeSlice := timeSliceVal.GetAddresses() matureUnbonds = append(matureUnbonds, timeSlice...) - store.Delete(unbondingTimesliceIterator.Key()) + keysToDelete = append(keysToDelete, unbondingTimesliceIterator.Key()) + } + // safe removal + for _, key := range keysToDelete { + store.Delete(key) } ctx.Logger().Debug(fmt.Sprintf("DequeueAllMatureUBDQueue, %d matured unbonding nodes detected", len(matureUnbonds))) return matureUnbonds From dcf76d276e3d33049959ff7056aa955772c5e066 Mon Sep 17 00:00:00 2001 From: Xiong Date: Mon, 3 Apr 2023 13:21:53 -0400 Subject: [PATCH 46/95] Fix: Validate reporters with threshold for MsgUpdateEffectiveStake --- x/register/keeper/keeper.go | 12 +++++++++++- x/register/keeper/msg_server.go | 12 +++++++++--- x/register/types/errors.go | 2 ++ 3 files changed, 22 insertions(+), 4 deletions(-) diff --git a/x/register/keeper/keeper.go b/x/register/keeper/keeper.go index a69c7a03..0a0d91c3 100644 --- a/x/register/keeper/keeper.go +++ b/x/register/keeper/keeper.go @@ -4,8 +4,11 @@ import ( "container/list" "errors" "fmt" + "math" "time" + "github.com/tendermint/tendermint/libs/log" + "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" @@ -14,7 +17,6 @@ import ( stratos "github.com/stratosnet/stratos-chain/types" "github.com/stratosnet/stratos-chain/x/register/types" regtypes "github.com/stratosnet/stratos-chain/x/register/types" - "github.com/tendermint/tendermint/libs/log" ) // Keeper of the register store @@ -456,3 +458,11 @@ func (k Keeper) NozSupply(ctx sdk.Context) (remaining, total sdk.Int) { total = St.ToDec().Quo(stakeNozRate).TruncateInt() return remaining, total } + +func (k Keeper) HasReachedThreshold(ctx sdk.Context, validReporterCount int) bool { + totalMetaNodes := k.GetBondedMetaNodeCnt(ctx).Int64() + + threshold := int(math.Max(1, math.Floor(float64(totalMetaNodes)*2/3))) + + return validReporterCount >= threshold +} diff --git a/x/register/keeper/msg_server.go b/x/register/keeper/msg_server.go index 3ccfde86..e5ee862f 100644 --- a/x/register/keeper/msg_server.go +++ b/x/register/keeper/msg_server.go @@ -355,18 +355,24 @@ func (k msgServer) HandleMsgUpdateEffectiveStake(goCtx context.Context, msg *typ ctx := sdk.UnwrapSDKContext(goCtx) reporterOwners := msg.ReporterOwner + validReporterCount := 0 for idx, reporter := range msg.Reporters { reporterSdsAddr, err := stratos.SdsAddressFromBech32(reporter) if err != nil { - return &types.MsgUpdateEffectiveStakeResponse{}, sdkerrors.Wrap(types.ErrReporterAddress, err.Error()) + continue } ownerAddr, err := sdk.AccAddressFromBech32(reporterOwners[idx]) if err != nil { - return &types.MsgUpdateEffectiveStakeResponse{}, sdkerrors.Wrap(types.ErrInvalidOwnerAddr, err.Error()) + continue } if !(k.OwnMetaNode(ctx, ownerAddr, reporterSdsAddr)) { - return &types.MsgUpdateEffectiveStakeResponse{}, types.ErrReporterAddressOrOwner + continue } + validReporterCount++ + } + + if !k.HasReachedThreshold(ctx, validReporterCount) { + return &types.MsgUpdateEffectiveStakeResponse{}, types.ErrReporterNotReachThreshold } networkAddr, err := stratos.SdsAddressFromBech32(msg.NetworkAddress) diff --git a/x/register/types/errors.go b/x/register/types/errors.go index 6377b8ae..23e9fee1 100644 --- a/x/register/types/errors.go +++ b/x/register/types/errors.go @@ -63,6 +63,7 @@ const ( codeErrReporterAddress codeErrInvalidAmount codeErrReporterAddressOrOwner + codeErrReporterNotReachThreshold ) var ( @@ -124,4 +125,5 @@ var ( ErrReporterAddress = sdkerrors.Register(ModuleName, codeErrReporterAddress, "invalid reporter address") ErrInvalidAmount = sdkerrors.Register(ModuleName, codeErrInvalidAmount, "invalid amount") ErrReporterAddressOrOwner = sdkerrors.Register(ModuleName, codeErrReporterAddressOrOwner, "invalid reporter address or owner address") + ErrReporterNotReachThreshold = sdkerrors.Register(ModuleName, codeErrReporterNotReachThreshold, "reporter meta-nodes does not reach the threshold") ) From ddef1b850082d57b11e17d98d16fbfe7938bde33 Mon Sep 17 00:00:00 2001 From: Xiong Date: Mon, 3 Apr 2023 14:02:57 -0400 Subject: [PATCH 47/95] 1, Verify bls signature with threshold 2, Add not null constraint in proto file --- crypto/bls/config.go | 6 + crypto/bls/keypair.go | 68 +++++++++++ crypto/bls/signature.go | 158 ++++++++++++++++++++++++ go.mod | 1 + go.sum | 2 + proto/stratos/pot/v1/pot.proto | 2 + proto/stratos/pot/v1/tx.proto | 5 +- x/pot/client/cli/tx.go | 2 +- x/pot/client/rest/tx.go | 2 +- x/pot/keeper/distribute.go | 6 +- x/pot/keeper/keeper.go | 10 ++ x/pot/keeper/msg_server.go | 14 ++- x/pot/keeper/slashing.go | 4 +- x/pot/types/errors.go | 6 +- x/pot/types/msg.go | 6 +- x/pot/types/pot.pb.go | 163 ++++++++++++------------- x/pot/types/tx.pb.go | 217 ++++++++++++++++----------------- x/pot/types/types.go | 6 +- 18 files changed, 462 insertions(+), 216 deletions(-) create mode 100644 crypto/bls/config.go create mode 100644 crypto/bls/keypair.go create mode 100644 crypto/bls/signature.go diff --git a/crypto/bls/config.go b/crypto/bls/config.go new file mode 100644 index 00000000..fbc88572 --- /dev/null +++ b/crypto/bls/config.go @@ -0,0 +1,6 @@ +package bls + +const ( + blsParams = "type a\nq 111883039802014540742638515425631208377440717422111030738555230553573602549347\nh 76553482352810235020926853532\nr 1461501637330902918203684757158419293741609123839\nexp2 160\nexp1 76\nsign1 -1\nsign0 -1" + blsGenerator = "[7450342596568074891770011364444075585630992484704200481904768097661178197184, 12840831487288433404479563278842210281426538508788525550982744564854326501497]" +) diff --git a/crypto/bls/keypair.go b/crypto/bls/keypair.go new file mode 100644 index 00000000..8f1c0537 --- /dev/null +++ b/crypto/bls/keypair.go @@ -0,0 +1,68 @@ +package bls + +import ( + "encoding/json" + "io/ioutil" +) + +type KeyPair struct { + PublicKey []byte `json:"publicKey"` + PrivateKey []byte `json:"privateKey"` +} + +// NewKeyPair creates a new BLS keypair +func NewKeyPair() (privateKey, publicKey []byte, err error) { + if err = verifyInitialization(); err != nil { + return nil, nil, err + } + + privateKeyElement := pairing.NewZr().Rand() + privateKey = privateKeyElement.BigInt().Bytes() + + publicKeyElement := pairing.NewG2().PowZn(generator, privateKeyElement) + publicKey = publicKeyElement.CompressedBytes() + return +} + +// NewKeyPairFromBytes creates a new BLS keypair deterministically based on a given seed +func NewKeyPairFromBytes(seed []byte) (privateKey, publicKey []byte, err error) { + if err = verifyInitialization(); err != nil { + return nil, nil, err + } + + privateKeyElement := pairing.NewZr().SetFromHash(seed) + privateKey = privateKeyElement.BigInt().Bytes() + + publicKeyElement := pairing.NewG2().PowZn(generator, privateKeyElement) + publicKey = publicKeyElement.CompressedBytes() + return +} + +// StoreKeyPair stores a BLS keypair to a file +func StoreKeyPair(privateKey, publicKey []byte, fileLocation string) error { + keyPair := KeyPair{ + PublicKey: publicKey, + PrivateKey: privateKey, + } + keyPairJson, err := json.Marshal(keyPair) + if err != nil { + return err + } + + return ioutil.WriteFile(fileLocation, keyPairJson, 0666) +} + +// LoadKeyPair loads a BLS keypair from a file +func LoadKeyPair(keyPairLocation string) (privateKey, publicKey []byte, err error) { + keyPairJson, err := ioutil.ReadFile(keyPairLocation) + if err != nil { + return nil, nil, err + } + keyPair := &KeyPair{} + err = json.Unmarshal(keyPairJson, keyPair) + if err != nil { + return nil, nil, err + } + + return keyPair.PrivateKey, keyPair.PublicKey, nil +} diff --git a/crypto/bls/signature.go b/crypto/bls/signature.go new file mode 100644 index 00000000..54ae2ec7 --- /dev/null +++ b/crypto/bls/signature.go @@ -0,0 +1,158 @@ +package bls + +import ( + "math/big" + + "github.com/Nik-U/pbc" + "github.com/pkg/errors" +) + +var ( + pairing *pbc.Pairing + generator *pbc.Element +) + +func init() { + err := loadPairing() + if err != nil { + panic(err) + } + + err = loadGenerator() + if err != nil { + panic(err) + } +} + +// loadPairing Loads the pairing used by the pbc library. Must be called before signatures can be created or verified. +func loadPairing() error { + params, err := pbc.NewParamsFromString(blsParams) + if err != nil { + return err + } + + pairing = params.NewPairing() + return nil +} + +// loadGenerator loads the generator params for the pbc library. Must be called after LoadPairing, and before other methods +func loadGenerator() error { + if pairing == nil { + return errors.New("The BLS pairing hasn't been initialized yet") + } + + generatorValue, success := pairing.NewG2().SetString(blsGenerator, 0) + if generatorValue == nil || !success { + return errors.New("Invalid generator params for BLS signature") + } + + generator = generatorValue + return nil +} + +// Sign signs some data using a BLS private key +func Sign(data, privateKey []byte) (signature []byte, err error) { + if err := verifyInitialization(); err != nil { + return nil, err + } + + defer func() { + if r := recover(); r != nil { + err = errors.Errorf("BLS signature error, low-level cgocall signal error: %v", r) + } + }() + + h := pairing.NewG1().SetFromHash(data) + privateKeyElement := pairing.NewZr().SetBig(big.NewInt(0).SetBytes(privateKey)) + signatureElement := pairing.NewG2().ThenMul(pairing.NewG2().PowZn(h, privateKeyElement)) + + return signatureElement.CompressedBytes(), nil +} + +// SignAndAggregate signs the data using the privateKey, then aggregate the signature with an existing signature +func SignAndAggregate(data, privateKey, existingSignature []byte) (signature []byte, err error) { + if err := verifyInitialization(); err != nil { + return nil, err + } + + defer func() { + if r := recover(); r != nil { + err = errors.Errorf("BLS signature error, low-level cgocall signal error: %v", r) + } + }() + + existingSignatureElement := pairing.NewG2().SetCompressedBytes(existingSignature) + + h := pairing.NewG1().SetFromHash(data) + privateKeyElement := pairing.NewZr().SetBig(big.NewInt(0).SetBytes(privateKey)) + signatureElement := existingSignatureElement.ThenMul(pairing.NewG2().PowZn(h, privateKeyElement)) + + return signatureElement.CompressedBytes(), nil +} + +// AggregateSignatures aggregates multiple signatures together +func AggregateSignatures(signatures ...[]byte) (aggregatedSignature []byte, err error) { + if err := verifyInitialization(); err != nil { + return nil, err + } + + defer func() { + if r := recover(); r != nil { + err = errors.Errorf("BLS signature error, low-level cgocall signal error: %v", r) + } + }() + + aggregatedSignatureElement := pairing.NewG2() + for _, signature := range signatures { + signatureElement := pairing.NewG2().SetCompressedBytes(signature) + aggregatedSignatureElement = aggregatedSignatureElement.ThenMul(signatureElement) + } + + return aggregatedSignatureElement.CompressedBytes(), nil +} + +// Verify verifies a BLS signature. It requires a public key for each private key that was used in generating the signature +func Verify(data, signature []byte, pubKeys ...[]byte) (result bool, err error) { + if err := verifyInitialization(); err != nil { + return false, err + } + + if len(pubKeys) < 1 { + return false, errors.New("BLS signatures cannot be verified without providing a public key") + } + + defer func() { + if r := recover(); r != nil { + result = false + err = errors.Errorf("BLS verification error, low-level cgocall signal error: %v", r) + } + }() + + var combinedPubKey *pbc.Element + for _, pubKey := range pubKeys { + pubKeyElement := pairing.NewG2().SetCompressedBytes(pubKey) + if combinedPubKey == nil { + combinedPubKey = pubKeyElement + } else { + combinedPubKey = combinedPubKey.ThenMul(pubKeyElement) + } + } + + h := pairing.NewG1().SetFromHash(data) + signatureElement := pairing.NewG1().SetCompressedBytes(signature) + + tmp1 := pairing.NewGT().Pair(h, combinedPubKey) + tmp2 := pairing.NewGT().Pair(signatureElement, generator) + return tmp1.Equals(tmp2), nil +} + +func verifyInitialization() error { + if pairing == nil { + return errors.New("The BLS pairing hasn't been initialized yet") + } + + if generator == nil { + return errors.New("The BLS generator params haven't been initialized yet") + } + return nil +} diff --git a/go.mod b/go.mod index 83dfa825..f8014168 100644 --- a/go.mod +++ b/go.mod @@ -3,6 +3,7 @@ module github.com/stratosnet/stratos-chain go 1.19 require ( + github.com/Nik-U/pbc v0.0.0-20181205041846-3e516ca0c5d6 github.com/btcsuite/btcd v0.23.4 github.com/btcsuite/btcd/btcutil v1.1.2 github.com/cosmos/cosmos-sdk v0.45.9 diff --git a/go.sum b/go.sum index 80a95e03..d86fc97a 100644 --- a/go.sum +++ b/go.sum @@ -61,6 +61,8 @@ github.com/DataDog/zstd v1.4.5 h1:EndNeuB0l9syBZhut0wns3gV1hL8zX8LIu6ZiVHWLIQ= github.com/DataDog/zstd v1.4.5/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg= +github.com/Nik-U/pbc v0.0.0-20181205041846-3e516ca0c5d6 h1:GU/vL5sj0IgGYEOIIAJ1HDI9dgqT0gJXkhXINri7Otc= +github.com/Nik-U/pbc v0.0.0-20181205041846-3e516ca0c5d6/go.mod h1:Zt2U1SemYWNGXqS1fDiZC7u74nsJTAnWK5WVgvI8OAs= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= diff --git a/proto/stratos/pot/v1/pot.proto b/proto/stratos/pot/v1/pot.proto index 5498517e..38163d6f 100644 --- a/proto/stratos/pot/v1/pot.proto +++ b/proto/stratos/pot/v1/pot.proto @@ -84,6 +84,7 @@ message SingleWalletVolume { (gogoproto.moretags) = "yaml:\"wallet_address\"" ]; string volume = 2 [ + (gogoproto.nullable) = false, (gogoproto.jsontag) = "volume", (gogoproto.moretags) = "yaml:\"volume\"", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int" @@ -92,6 +93,7 @@ message SingleWalletVolume { message WalletVolumes { repeated SingleWalletVolume volumes = 1 [ + (gogoproto.nullable) = false, (gogoproto.jsontag) = "volumes", (gogoproto.moretags) = "yaml:\"volumes\"" ]; diff --git a/proto/stratos/pot/v1/tx.proto b/proto/stratos/pot/v1/tx.proto index e50368ea..0cab6c4b 100644 --- a/proto/stratos/pot/v1/tx.proto +++ b/proto/stratos/pot/v1/tx.proto @@ -31,6 +31,7 @@ service Msg { // MsgVolumeReport encapsulates an VolumeReport transaction as an SDK message. message MsgVolumeReport { repeated SingleWalletVolume wallet_volumes = 1 [ + (gogoproto.nullable) = false, (gogoproto.jsontag) = "wallet_volumes", (gogoproto.moretags) = "yaml:\"wallet_volumes\"" ]; @@ -39,7 +40,8 @@ message MsgVolumeReport { (gogoproto.moretags) = "yaml:\"reporter\"" ]; string epoch = 3 [ - (gogoproto.jsontag) = "epoch", + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "epoch", (gogoproto.moretags) = "yaml:\"epoch\"", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int" ]; @@ -52,6 +54,7 @@ message MsgVolumeReport { (gogoproto.moretags) = "yaml:\"reporter_owner\"" ]; BLSSignatureInfo BLS_signature = 6 [ + (gogoproto.nullable) = false, (gogoproto.jsontag) = "bls_signature", (gogoproto.moretags) = "yaml:\"bls_signature\"" ]; diff --git a/x/pot/client/cli/tx.go b/x/pot/client/cli/tx.go index a0dc5346..b4fba7be 100644 --- a/x/pot/client/cli/tx.go +++ b/x/pot/client/cli/tx.go @@ -249,7 +249,7 @@ func createVolumeReportMsg(clientCtx client.Context, txf tx.Factory, fs *flag.Fl return txf, nil, err } - var walletVolumes = make([]*types.SingleWalletVolume, 0) + var walletVolumes = make([]types.SingleWalletVolume, 0) for _, n := range walletVolumesStr { walletAcc, err := sdk.AccAddressFromBech32(n.WalletAddress) if err != nil { diff --git a/x/pot/client/rest/tx.go b/x/pot/client/rest/tx.go index f3ed4493..736d7a8c 100644 --- a/x/pot/client/rest/tx.go +++ b/x/pot/client/rest/tx.go @@ -77,7 +77,7 @@ func volumeReportRequestHandlerFn(cliCtx client.Context) http.HandlerFunc { reportReference := req.ReportReference epoch := sdk.NewInt(req.Epoch) - var walletVolumes []*types.SingleWalletVolume + var walletVolumes []types.SingleWalletVolume for _, v := range req.WalletVolumes { walletAddr, err := sdk.AccAddressFromBech32(v.WalletAddress) if err != nil { diff --git a/x/pot/keeper/distribute.go b/x/pot/keeper/distribute.go index ea93c2f7..2bb0b6a6 100644 --- a/x/pot/keeper/distribute.go +++ b/x/pot/keeper/distribute.go @@ -21,7 +21,7 @@ var ( rewardDetailMap map[string]types.Reward ) -func (k Keeper) DistributePotReward(ctx sdk.Context, trafficList []*types.SingleWalletVolume, epoch sdk.Int) ( +func (k Keeper) DistributePotReward(ctx sdk.Context, trafficList []types.SingleWalletVolume, epoch sdk.Int) ( totalConsumedNoz sdk.Dec, err error) { k.InitVariable(ctx) @@ -234,7 +234,7 @@ func (k Keeper) getMatureEpochByCurrentEpoch(ctx sdk.Context, currentEpoch sdk.I } // Iteration for calculating reward of resource nodes -func (k Keeper) CalcRewardForResourceNode(ctx sdk.Context, totalConsumedNoz sdk.Dec, trafficList []*types.SingleWalletVolume, +func (k Keeper) CalcRewardForResourceNode(ctx sdk.Context, totalConsumedNoz sdk.Dec, trafficList []types.SingleWalletVolume, distributeGoal types.DistributeGoal, rewardDetailMap map[string]types.Reward, ) map[string]types.Reward { @@ -407,7 +407,7 @@ func (k Keeper) CalcRewardForMetaNode(ctx sdk.Context, distributeGoalBalance typ } // Iteration for getting total consumed OZ from traffic -func (k Keeper) GetTotalConsumedNoz(trafficList []*types.SingleWalletVolume) sdk.Int { +func (k Keeper) GetTotalConsumedNoz(trafficList []types.SingleWalletVolume) sdk.Int { totalTraffic := sdk.ZeroInt() for _, vol := range trafficList { toAdd, ok := sdk.NewIntFromString(vol.Volume.String()) diff --git a/x/pot/keeper/keeper.go b/x/pot/keeper/keeper.go index 505ab796..9e8cd6b7 100644 --- a/x/pot/keeper/keeper.go +++ b/x/pot/keeper/keeper.go @@ -2,6 +2,7 @@ package keeper import ( "fmt" + "math" "github.com/tendermint/tendermint/libs/log" @@ -70,6 +71,15 @@ func (k Keeper) VolumeReport(ctx sdk.Context, walletVolumes types.WalletVolumes, return nil } +func (k Keeper) HasReachedThreshold(ctx sdk.Context, pubKeys [][]byte) bool { + totalMetaNodes := k.registerKeeper.GetBondedMetaNodeCnt(ctx).Int64() + signedMetaNodes := len(pubKeys) + + threshold := int(math.Max(1, math.Floor(float64(totalMetaNodes)*2/3))) + + return signedMetaNodes >= threshold +} + func (k Keeper) FoundationDeposit(ctx sdk.Context, amount sdk.Coins, from sdk.AccAddress) (err error) { err = k.bankKeeper.SendCoinsFromAccountToModule(ctx, from, types.FoundationAccount, amount) if err != nil { diff --git a/x/pot/keeper/msg_server.go b/x/pot/keeper/msg_server.go index 265808cc..64ec7793 100644 --- a/x/pot/keeper/msg_server.go +++ b/x/pot/keeper/msg_server.go @@ -13,6 +13,7 @@ import ( "github.com/cosmos/cosmos-sdk/types/bech32" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/stratosnet/stratos-chain/crypto/bls" stratos "github.com/stratosnet/stratos-chain/types" "github.com/stratosnet/stratos-chain/x/pot/types" ) @@ -56,7 +57,18 @@ func (k msgServer) HandleMsgVolumeReport(goCtx context.Context, msg *types.MsgVo return &types.MsgVolumeReportResponse{}, e } - // TODO: verify BLS signature + blsSignature := msg.GetBLSSignature() + verified, err := bls.Verify(blsSignature.GetTxData(), blsSignature.GetSignature(), blsSignature.GetPubKeys()...) + if err != nil { + return &types.MsgVolumeReportResponse{}, sdkerrors.Wrap(types.ErrBLSVerifyFailed, err.Error()) + } + if !verified { + return &types.MsgVolumeReportResponse{}, types.ErrBLSVerifyFailed + } + + if !k.HasReachedThreshold(ctx, blsSignature.GetPubKeys()) { + return &types.MsgVolumeReportResponse{}, types.ErrBLSNotReachThreshold + } txBytes := ctx.TxBytes() txhash := fmt.Sprintf("%X", tmhash.Sum(txBytes)) diff --git a/x/pot/keeper/slashing.go b/x/pot/keeper/slashing.go index 03dc3163..eaa0528f 100644 --- a/x/pot/keeper/slashing.go +++ b/x/pot/keeper/slashing.go @@ -26,9 +26,9 @@ func (k Keeper) SlashingResourceNode(ctx sdk.Context, p2pAddr stratos.SdsAddress node.Suspend = suspend //slashing amt is equivalent to reward traffic calculation - trafficList := []*types.SingleWalletVolume{{ + trafficList := []types.SingleWalletVolume{{ WalletAddress: node.OwnerAddress, - Volume: &nozAmt, + Volume: nozAmt, }} totalConsumedNoz := k.GetTotalConsumedNoz(trafficList).ToDec() slashTokenAmt := k.GetTrafficReward(ctx, totalConsumedNoz) diff --git a/x/pot/types/errors.go b/x/pot/types/errors.go index c786b020..fc36e4e6 100644 --- a/x/pot/types/errors.go +++ b/x/pot/types/errors.go @@ -24,6 +24,8 @@ const ( codeErrBLSSignatureInvalid codeErrBLSTxDataInvalid codeErrBLSPubkeysInvalid + codeErrBLSVerifyFailed + codeErrBLSNotReachThreshold codeErrReporterAddress codeErrInvalidAmount codeErrCannotFindReport @@ -35,7 +37,6 @@ const ( codeErrSlashingResourceNodeFailure codeErrRewardDistributionNotComplete codeErrVolumeReport - codeErrLegacyAddressNotMatch codeErrLegacyWithdrawFailure codeErrReporterAddressOrOwner ) @@ -60,6 +61,8 @@ var ( ErrBLSSignatureInvalid = sdkerrors.Register(ModuleName, codeErrBLSSignatureInvalid, "BLS signature is invalid") ErrBLSTxDataInvalid = sdkerrors.Register(ModuleName, codeErrBLSTxDataInvalid, "BLS signature txData is invalid") ErrBLSPubkeysInvalid = sdkerrors.Register(ModuleName, codeErrBLSPubkeysInvalid, "BLS signature pubkeys are invalid") + ErrBLSVerifyFailed = sdkerrors.Register(ModuleName, codeErrBLSVerifyFailed, "BLS signature verify failed") + ErrBLSNotReachThreshold = sdkerrors.Register(ModuleName, codeErrBLSNotReachThreshold, "BLS signed meta-nodes does not reach the threshold") ErrReporterAddress = sdkerrors.Register(ModuleName, codeErrReporterAddress, "invalid reporter address") ErrInvalidAmount = sdkerrors.Register(ModuleName, codeErrInvalidAmount, "invalid amount") ErrCannotFindReport = sdkerrors.Register(ModuleName, codeErrCannotFindReport, "Can not find report") @@ -71,7 +74,6 @@ var ( ErrSlashingResourceNodeFailure = sdkerrors.Register(ModuleName, codeErrSlashingResourceNodeFailure, "failure during slashing resource node") ErrRewardDistributionNotComplete = sdkerrors.Register(ModuleName, codeErrRewardDistributionNotComplete, "Reward distribution not completed") ErrVolumeReport = sdkerrors.Register(ModuleName, codeErrVolumeReport, "volume report failed") - ErrLegacyAddressNotMatch = sdkerrors.Register(ModuleName, codeErrLegacyAddressNotMatch, "public key does not mathe the legacy wallet address") ErrLegacyWithdrawFailure = sdkerrors.Register(ModuleName, codeErrLegacyWithdrawFailure, "failure during legacyWithdraw") ErrReporterAddressOrOwner = sdkerrors.Register(ModuleName, codeErrReporterAddressOrOwner, "invalid reporter address or owner address") ) diff --git a/x/pot/types/msg.go b/x/pot/types/msg.go index b3f8c10e..6181bb62 100644 --- a/x/pot/types/msg.go +++ b/x/pot/types/msg.go @@ -25,7 +25,7 @@ const ( // NewMsgVolumeReport creates a new MsgVolumeReport instance func NewMsgVolumeReport( - walletVolumes []*SingleWalletVolume, + walletVolumes []SingleWalletVolume, reporter stratos.SdsAddress, epoch sdk.Int, reportReference string, @@ -35,10 +35,10 @@ func NewMsgVolumeReport( return &MsgVolumeReport{ WalletVolumes: walletVolumes, Reporter: reporter.String(), - Epoch: &epoch, + Epoch: epoch, ReportReference: reportReference, ReporterOwner: reporterOwner.String(), - BLSSignature: &blsSignature, + BLSSignature: blsSignature, } } diff --git a/x/pot/types/pot.pb.go b/x/pot/types/pot.pb.go index 206c4460..73698b51 100644 --- a/x/pot/types/pot.pb.go +++ b/x/pot/types/pot.pb.go @@ -219,8 +219,8 @@ func (m *Reward) GetRewardFromTrafficPool() github_com_cosmos_cosmos_sdk_types.C } type SingleWalletVolume struct { - WalletAddress string `protobuf:"bytes,1,opt,name=wallet_address,json=walletAddress,proto3" json:"wallet_address" yaml:"wallet_address"` - Volume *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=volume,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"volume" yaml:"volume"` + WalletAddress string `protobuf:"bytes,1,opt,name=wallet_address,json=walletAddress,proto3" json:"wallet_address" yaml:"wallet_address"` + Volume github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=volume,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"volume" yaml:"volume"` } func (m *SingleWalletVolume) Reset() { *m = SingleWalletVolume{} } @@ -264,7 +264,7 @@ func (m *SingleWalletVolume) GetWalletAddress() string { } type WalletVolumes struct { - Volumes []*SingleWalletVolume `protobuf:"bytes,1,rep,name=volumes,proto3" json:"volumes" yaml:"volumes"` + Volumes []SingleWalletVolume `protobuf:"bytes,1,rep,name=volumes,proto3" json:"volumes" yaml:"volumes"` } func (m *WalletVolumes) Reset() { *m = WalletVolumes{} } @@ -300,7 +300,7 @@ func (m *WalletVolumes) XXX_DiscardUnknown() { var xxx_messageInfo_WalletVolumes proto.InternalMessageInfo -func (m *WalletVolumes) GetVolumes() []*SingleWalletVolume { +func (m *WalletVolumes) GetVolumes() []SingleWalletVolume { if m != nil { return m.Volumes } @@ -379,69 +379,70 @@ func init() { func init() { proto.RegisterFile("stratos/pot/v1/pot.proto", fileDescriptor_a05930b44d981057) } var fileDescriptor_a05930b44d981057 = []byte{ - // 992 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x4d, 0x6f, 0x1b, 0x45, - 0x18, 0xce, 0xd6, 0xc5, 0x25, 0x93, 0x8f, 0xd2, 0x21, 0x21, 0x26, 0x14, 0x4f, 0x3a, 0x15, 0x10, - 0x09, 0xd5, 0xab, 0x14, 0x09, 0x24, 0x38, 0xe1, 0x36, 0x88, 0x20, 0x15, 0x45, 0xd3, 0xaa, 0x45, - 0x45, 0x68, 0x35, 0xde, 0x9d, 0x38, 0xab, 0xee, 0xce, 0x98, 0xd9, 0xb1, 0x9b, 0x48, 0xfc, 0x04, - 0x0e, 0xfc, 0x0d, 0xb8, 0x71, 0xe4, 0xc4, 0x81, 0x03, 0x3d, 0xf6, 0x88, 0x38, 0x0c, 0x28, 0x81, - 0xcb, 0x5e, 0x10, 0xfb, 0x0b, 0xd0, 0xce, 0x8c, 0xe3, 0xb5, 0x5d, 0xbb, 0xcd, 0x81, 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ab, 0xb3, 0x62, 0x32, 0x1e, - 0x61, 0x02, 0x27, 0x22, 0xee, 0xf2, 0x08, 0x7e, 0x01, 0x56, 0xc6, 0xc6, 0x64, 0xb6, 0x6a, 0x6e, - 0x9c, 0xc6, 0xa8, 0xab, 0x63, 0x27, 0x31, 0x59, 0xae, 0x4e, 0x16, 0xfe, 0xe8, 0x81, 0xab, 0x9d, - 0x44, 0x84, 0x8f, 0x82, 0xf0, 0x90, 0xc6, 0x3c, 0xe8, 0x31, 0x19, 0x32, 0xae, 0x68, 0x97, 0x05, - 0x31, 0x0f, 0x3a, 0xbd, 0xc6, 0x45, 0x33, 0xe3, 0xaf, 0x5f, 0x70, 0xbe, 0x7b, 0x5c, 0xe5, 0x1a, - 0xcd, 0x55, 0x2c, 0x34, 0xba, 0xee, 0xde, 0xc6, 0x39, 0x5e, 0x98, 0x34, 0x0c, 0x7d, 0xab, 0x64, - 0xf7, 0xcf, 0xc8, 0x3d, 0xde, 0xee, 0xc1, 0x9f, 0x3c, 0xd0, 0x94, 0x2c, 0x13, 0x7d, 0x19, 0xb2, - 0x80, 0x8b, 0x88, 0x4d, 0x67, 0x6d, 0x37, 0xb3, 0x7f, 0xae, 0xac, 0x9f, 0xa3, 0x59, 0x68, 0xf4, - 0xd6, 0xf0, 0xed, 0x9f, 0xe7, 0x87, 0xc9, 0xe6, 0xd0, 0xe1, 0x73, 0x11, 0xb1, 0x89, 0xdc, 0xbf, - 0xf7, 0xc0, 0x66, 0xca, 0x14, 0x9d, 0x91, 0x77, 0xdd, 0xe4, 0x9d, 0x9e, 0x2b, 0xef, 0x39, 0x7a, - 0x85, 0x46, 0xd7, 0xdc, 0x12, 0xcc, 0xf4, 0xc1, 0xe4, 0xb5, 0x92, 0x9c, 0xce, 0x15, 0xff, 0x55, - 0x03, 0x75, 0xb7, 0x26, 0x04, 0xac, 0x3e, 0xa6, 0x49, 0xc2, 0x54, 0x40, 0xa3, 0x48, 0xb2, 0x2c, - 0x73, 0x37, 0xed, 0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68, 0xb5, 0x1a, 0x2b, 0xc3, 0x64, - 0x48, 0xe1, 0xbf, 0x3d, 0x00, 0xed, 0x11, 0xc2, 0x7a, 0x42, 0x2a, 0xc2, 0x42, 0x21, 0x23, 0xf8, - 0x11, 0x78, 0x59, 0x1a, 0x9b, 0x49, 0xd7, 0x31, 0x94, 0x6b, 0x74, 0x86, 0x15, 0x1a, 0x5d, 0x1e, - 0x0e, 0xd5, 0x22, 0x98, 0x9c, 0x91, 0xf0, 0x21, 0x78, 0xc5, 0x3e, 0x07, 0x92, 0x1d, 0x30, 0xc9, - 0x78, 0x38, 0x6c, 0x95, 0x9f, 0x6b, 0x34, 0xc5, 0x15, 0x1a, 0x6d, 0x54, 0xc5, 0x46, 0x0c, 0x26, - 0x97, 0xa5, 0xcb, 0xca, 0x21, 0xf0, 0x7d, 0x70, 0x49, 0x1d, 0x05, 0x87, 0x34, 0xb3, 0x1f, 0x25, - 0x8b, 0xb6, 0x50, 0x07, 0x8d, 0x0a, 0x75, 0x00, 0x26, 0x75, 0x75, 0xf4, 0x29, 0xcd, 0x0e, 0xdb, - 0x7b, 0x4f, 0x4e, 0x9a, 0xde, 0xd3, 0x93, 0xa6, 0xf7, 0xe7, 0x49, 0xd3, 0xfb, 0xee, 0xb4, 0xb9, - 0xf0, 0xf4, 0xb4, 0xb9, 0xf0, 0xdb, 0x69, 0x73, 0xe1, 0xa1, 0x5f, 0x19, 0x9d, 0xeb, 0x2b, 0x67, - 0x6a, 0xf8, 0x78, 0xc3, 0xdc, 0xec, 0xfe, 0x91, 0xf9, 0x08, 0x34, 0x73, 0xec, 0xd4, 0xcd, 0xe7, - 0xdb, 0x7b, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0x92, 0x97, 0x7e, 0x6c, 0x20, 0x0a, 0x00, 0x00, + // 995 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x4d, 0x6f,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0x98, 0x34, 0xd5, 0xe1, 0xe7, + 0xb4, 0x38, 0xe8, 0xec, 0x3e, 0x3d, 0x6e, 0x7b, 0xcf, 0x8e, 0xdb, 0xde, 0x9f, 0xc7, 0x6d, 0xef, + 0xbb, 0x93, 0xf6, 0xc2, 0xb3, 0x93, 0xf6, 0xc2, 0x6f, 0x27, 0xed, 0x85, 0x47, 0x41, 0xad, 0x7d, + 0xae, 0xb6, 0x9c, 0xa9, 0xd1, 0xf2, 0x86, 0xb9, 0xe1, 0x83, 0x43, 0xf3, 0x33, 0x68, 0x7a, 0xd9, + 0x6d, 0x9a, 0xdf, 0xb8, 0x0f, 0xfe, 0x0b, 0x00, 0x00, 0xff, 0xff, 0xfd, 0x5f, 0x85, 0xcf, 0x28, + 0x0a, 0x00, 0x00, } func (m *Params) Marshal() (dAtA []byte, err error) { @@ -683,18 +684,16 @@ func (m *SingleWalletVolume) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.Volume != nil { - { - size := m.Volume.Size() - i -= size - if _, err := m.Volume.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintPot(dAtA, i, uint64(size)) + { + size := m.Volume.Size() + i -= size + if _, err := m.Volume.MarshalTo(dAtA[i:]); err != nil { + return 0, err } - i-- - dAtA[i] = 0x12 + i = encodeVarintPot(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x12 if len(m.WalletAddress) > 0 { i -= len(m.WalletAddress) copy(dAtA[i:], m.WalletAddress) @@ -893,10 +892,8 @@ func (m *SingleWalletVolume) Size() (n int) { if l > 0 { n += 1 + l + sovPot(uint64(l)) } - if m.Volume != nil { - l = m.Volume.Size() - n += 1 + l + sovPot(uint64(l)) - } + l = m.Volume.Size() + n += 1 + l + sovPot(uint64(l)) return n } @@ -1650,8 +1647,6 @@ func (m *SingleWalletVolume) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_cosmos_cosmos_sdk_types.Int - m.Volume = &v if err := m.Volume.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -1735,7 +1730,7 @@ func (m *WalletVolumes) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Volumes = append(m.Volumes, &SingleWalletVolume{}) + m.Volumes = append(m.Volumes, SingleWalletVolume{}) if err := m.Volumes[len(m.Volumes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } diff --git a/x/pot/types/tx.pb.go b/x/pot/types/tx.pb.go index c35ba573..53963fe8 100644 --- a/x/pot/types/tx.pb.go +++ b/x/pot/types/tx.pb.go @@ -33,12 +33,12 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // MsgVolumeReport encapsulates an VolumeReport transaction as an SDK message. type MsgVolumeReport struct { - WalletVolumes []*SingleWalletVolume `protobuf:"bytes,1,rep,name=wallet_volumes,json=walletVolumes,proto3" json:"wallet_volumes" yaml:"wallet_volumes"` - Reporter string `protobuf:"bytes,2,opt,name=reporter,proto3" json:"reporter" yaml:"reporter"` - Epoch *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,3,opt,name=epoch,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"epoch" yaml:"epoch"` - ReportReference string `protobuf:"bytes,4,opt,name=report_reference,json=reportReference,proto3" json:"report_reference" yaml:"report_reference"` - ReporterOwner string `protobuf:"bytes,5,opt,name=reporter_owner,json=reporterOwner,proto3" json:"reporter_owner" yaml:"reporter_owner"` - BLSSignature *BLSSignatureInfo `protobuf:"bytes,6,opt,name=BLS_signature,json=BLSSignature,proto3" json:"bls_signature" yaml:"bls_signature"` + WalletVolumes []SingleWalletVolume `protobuf:"bytes,1,rep,name=wallet_volumes,json=walletVolumes,proto3" json:"wallet_volumes" yaml:"wallet_volumes"` + Reporter string `protobuf:"bytes,2,opt,name=reporter,proto3" json:"reporter" yaml:"reporter"` + Epoch github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,3,opt,name=epoch,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"epoch" yaml:"epoch"` + ReportReference string `protobuf:"bytes,4,opt,name=report_reference,json=reportReference,proto3" json:"report_reference" yaml:"report_reference"` + ReporterOwner string `protobuf:"bytes,5,opt,name=reporter_owner,json=reporterOwner,proto3" json:"reporter_owner" yaml:"reporter_owner"` + BLSSignature BLSSignatureInfo `protobuf:"bytes,6,opt,name=BLS_signature,json=BLSSignature,proto3" json:"bls_signature" yaml:"bls_signature"` } func (m *MsgVolumeReport) Reset() { *m = MsgVolumeReport{} } @@ -74,7 +74,7 @@ func (m *MsgVolumeReport) XXX_DiscardUnknown() { var xxx_messageInfo_MsgVolumeReport proto.InternalMessageInfo -func (m *MsgVolumeReport) GetWalletVolumes() []*SingleWalletVolume { +func (m *MsgVolumeReport) GetWalletVolumes() []SingleWalletVolume { if m != nil { return m.WalletVolumes } @@ -102,11 +102,11 @@ func (m *MsgVolumeReport) GetReporterOwner() string { return "" } -func (m *MsgVolumeReport) GetBLSSignature() *BLSSignatureInfo { +func (m *MsgVolumeReport) GetBLSSignature() BLSSignatureInfo { if m != nil { return m.BLSSignature } - return nil + return BLSSignatureInfo{} } // MsgVolumeReportResponse defines the MsgVolumeReport response type @@ -624,78 +624,78 @@ func init() { func init() { proto.RegisterFile("stratos/pot/v1/tx.proto", fileDescriptor_103c258cace119ca) } var fileDescriptor_103c258cace119ca = []byte{ - // 1123 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x56, 0xcf, 0x6f, 0x1b, 0x45, - 0x14, 0xce, 0x26, 0x69, 0x9a, 0x4e, 0xe2, 0xa4, 0x5d, 0x12, 0xe2, 0xb8, 0x8d, 0x27, 0x19, 0x4a, - 0x9b, 0x52, 0xb2, 0xab, 0x04, 0x21, 0xa4, 0x72, 0x40, 0xb8, 0x15, 0x22, 0x6a, 0x02, 0xd2, 0x46, - 0x6a, 0x45, 0x2f, 0xab, 0xb5, 0x77, 0xb2, 0x59, 0xc5, 0x9e, 0x59, 0xed, 0x8c, 0xe3, 0xe4, 0xc2, - 0x81, 0x13, 0xc7, 0x4a, 0x70, 0xe4, 0x1f, 0x80, 0x3b, 0x7f, 0x41, 0x25, 0xd4, 0x63, 0x25, 0x2e, - 0x88, 0xc3, 0x80, 0x12, 0x24, 0x24, 0x1f, 0x7d, 0xe4, 0x84, 0x3c, 0x33, 0x3b, 0x6b, 0x6f, 0x0c, - 0x0d, 0xaa, 0x90, 0xe0, 0x64, 0xcf, 0xf7, 0xbd, 0x5f, 0xf3, 0xe6, 0xdb, 0x37, 0x03, 0x96, 0x18, - 0x4f, 0x03, 0x4e, 0x99, 0x9b, 0x50, 0xee, 0x1e, 0x6d, 0xba, 0xfc, 0xd8, 0x49, 0x52, 0xca, 0xa9, - 0x3d, 0xa7, 0x09, 0x27, 0xa1, 0xdc, 0x39, 0xda, 0xac, 0x2c, 0x44, 0x34, 0xa2, 0x92, 0x72, 0xfb, - 0xff, 0x94, 0x55, 0xe5, 0x46, 0x44, 0x69, 0xd4, 0xc4, 0x6e, 0x90, 0xc4, 0x6e, 0x40, 0x08, 0xe5, - 0x01, 0x8f, 0x29, 0x61, 0x9a, 0x2d, 0x17, 0x82, 0xf7, 0x43, 0x29, 0xa6, 0xda, 0xa0, 0xac, 0x45, - 0x99, 0x5b, 0x0f, 0x18, 0x76, 0x8f, 0x36, 0xeb, 0x98, 0x07, 0x9b, 0x6e, 0x83, 0xc6, 0x44, 0xf1, - 0xe8, 0xd9, 0x24, 0x98, 0xdf, 0x65, 0xd1, 0x23, 0xda, 0x6c, 0xb7, 0xb0, 0x87, 0x13, 0x9a, 0x72, - 0xfb, 0x08, 0xcc, 0x75, 0x82, 0x66, 0x13, 0x73, 0xff, 0x48, 0xc2, 0xac, 0x6c, 0xad, 0x4e, 0xac, - 0xcf, 0x6c, 0x21, 0x67, 0xb8, 0x54, 0x67, 0x2f, 0x26, 0x51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 0x5c, 0xb8, 0x14, 0xd6, 0x46, 0xa4, 0x18, 0x36, 0xa9, 0xdc, 0x79, 0xa9, 0x89, 0xa9, 0xe5, - 0xb6, 0xac, 0x65, 0x0d, 0xc1, 0x62, 0x2d, 0x4d, 0x69, 0xef, 0x9b, 0x92, 0xbe, 0xb1, 0x40, 0xc5, - 0x94, 0x74, 0x7e, 0xe6, 0xde, 0x1c, 0x91, 0xf2, 0x9c, 0x55, 0xe5, 0xed, 0x8b, 0x58, 0x99, 0xda, - 0xde, 0x92, 0xb5, 0xdd, 0x44, 0xa8, 0x58, 0xdb, 0xbe, 0x71, 0xf1, 0x43, 0x9d, 0xff, 0x5b, 0x0b, - 0xac, 0x98, 0xf2, 0x46, 0x0e, 0xcb, 0x51, 0xe2, 0x18, 0x65, 0x58, 0x71, 0x2f, 0x68, 0x68, 0xea, - 0x74, 0x64, 0x9d, 0xeb, 0xe8, 0x56, 0xb1, 0xce, 0x6c, 0x00, 0xf8, 0xa9, 0x76, 0xf3, 0x09, 0x0d, - 0x71, 0x6d, 0xfb, 0xf9, 0x69, 0xd5, 0x7a, 0x71, 0x5a, 0xb5, 0x7e, 0x3d, 0xad, 0x5a, 0x4f, 0xcf, - 0xaa, 0x63, 0x2f, 0xce, 0xaa, 0x63, 0x3f, 0x9d, 0x55, 0xc7, 0x9e, 0xb8, 0x03, 0x93, 0x47, 0xc7, - 0x22, 0x98, 0x67, 0x7f, 0x37, 0x1a, 0x07, 0x41, 0x4c, 0xdc, 0x63, 0x19, 0x5e, 0x8e, 0xa1, 0xfa, - 0x94, 0x7c, 0xee, 0xbf, 0xf3, 0x67, 0x00, 0x00, 0x00, 0xff, 0xff, 0xea, 0x54, 0xc3, 0x06, 0x87, - 0x0c, 0x00, 0x00, + // 1128 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x56, 0xcf, 0x6b, 0x24, 0x45, + 0x14, 0x4e,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b4, 0xd9, 0x6e, 0x61, 0x07, 0x47, 0x34, + 0xe6, 0xe6, 0x27, 0x60, 0xae, 0xe3, 0x35, 0x9b, 0x98, 0xbb, 0x27, 0x02, 0x66, 0x65, 0x63, 0x6d, + 0x6c, 0x63, 0x66, 0x07, 0x59, 0x83, 0x56, 0xad, 0x83, 0x90, 0x04, 0x4d, 0xfc, 0x50, 0xc4, 0x4a, + 0x85, 0x9a, 0xfd, 0x24, 0x81, 0x23, 0xdd, 0x04, 0x16, 0x14, 0x7a, 0x09, 0x5c, 0x3a, 0xf3, 0x5a, + 0xcd, 0xbb, 0x68, 0x10, 0x47, 0x4e, 0xa9, 0xd3, 0xb7, 0x9d, 0x99, 0x6f, 0x81, 0xa9, 0x58, 0xb8, + 0xc0, 0x71, 0x79, 0x74, 0xcd, 0xd8, 0x98, 0xae, 0xc1, 0x6e, 0x02, 0x35, 0xd6, 0x4b, 0xe0, 0xbc, + 0xd4, 0xc9, 0x10, 0xe4, 0x68, 0xd2, 0xfc, 0x18, 0x4c, 0xe0, 0x88, 0x36, 0x8e, 0xca, 0x63, 0x62, + 0xe7, 0xfb, 0xa9, 0x97, 0x9f, 0x13, 0x78, 0x3b, 0x08, 0xf9, 0x51, 0xbb, 0x6e, 0x35, 0x68, 0xcb, + 0x56, 0xe5, 0x90, 0x3f, 0x5b, 0xcc, 0x3f, 0xb6, 0xf9, 0x59, 0x84, 0x99, 0xb5, 0x4b, 0x78, 0x37, + 0x81, 0x72, 0x7b, 0x2f, 0x81, 0xb3, 0x32, 0x89, 0x58, 0x22, 0x47, 0xc2, 0xe6, 0x23, 0xb0, 0x20, + 0x53, 0xb9, 0x31, 0x3e, 0xc4, 0x31, 0x26, 0x0d, 0x5c, 0x1e, 0x17, 0x99, 0xec, 0x6e, 0x02, 0x2f, + 0x71, 0xbd, 0x04, 0x2e, 0xf7, 0x7b, 0xcd, 0x19, 0xe4, 0xcc, 0x4b, 0xc8, 0xc9, 0x10, 0xd3, 0x01, + 0x73, 0x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xeb, 0x7f, 0x06, 0x00, 0x00, 0xff, 0xff, + 0x96, 0x31, 0xad, 0xe9, 0x93, 0x0c, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -942,18 +942,16 @@ func (m *MsgVolumeReport) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.BLSSignature != nil { - { - size, err := m.BLSSignature.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) + { + size, err := m.BLSSignature.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x32 + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x32 if len(m.ReporterOwner) > 0 { i -= len(m.ReporterOwner) copy(dAtA[i:], m.ReporterOwner) @@ -968,18 +966,16 @@ func (m *MsgVolumeReport) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x22 } - if m.Epoch != nil { - { - size := m.Epoch.Size() - i -= size - if _, err := m.Epoch.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintTx(dAtA, i, uint64(size)) + { + size := m.Epoch.Size() + i -= size + if _, err := m.Epoch.MarshalTo(dAtA[i:]); err != nil { + return 0, err } - i-- - dAtA[i] = 0x1a + i = encodeVarintTx(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x1a if len(m.Reporter) > 0 { i -= len(m.Reporter) copy(dAtA[i:], m.Reporter) @@ -1415,10 +1411,8 @@ func (m *MsgVolumeReport) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - if m.Epoch != nil { - l = m.Epoch.Size() - n += 1 + l + sovTx(uint64(l)) - } + l = m.Epoch.Size() + n += 1 + l + sovTx(uint64(l)) l = len(m.ReportReference) if l > 0 { n += 1 + l + sovTx(uint64(l)) @@ -1427,10 +1421,8 @@ func (m *MsgVolumeReport) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - if m.BLSSignature != nil { - l = m.BLSSignature.Size() - n += 1 + l + sovTx(uint64(l)) - } + l = m.BLSSignature.Size() + n += 1 + l + sovTx(uint64(l)) return n } @@ -1667,7 +1659,7 @@ func (m *MsgVolumeReport) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.WalletVolumes = append(m.WalletVolumes, &SingleWalletVolume{}) + m.WalletVolumes = append(m.WalletVolumes, SingleWalletVolume{}) if err := m.WalletVolumes[len(m.WalletVolumes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -1734,8 +1726,6 @@ func (m *MsgVolumeReport) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_cosmos_cosmos_sdk_types.Int - m.Epoch = &v if err := m.Epoch.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -1833,9 +1823,6 @@ func (m *MsgVolumeReport) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.BLSSignature == nil { - m.BLSSignature = &BLSSignatureInfo{} - } if err := m.BLSSignature.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } diff --git a/x/pot/types/types.go b/x/pot/types/types.go index 7c8c88c7..8ae99032 100644 --- a/x/pot/types/types.go +++ b/x/pot/types/types.go @@ -9,10 +9,10 @@ import ( func NewSingleWalletVolume( walletAddress sdk.AccAddress, volume sdk.Int, -) *SingleWalletVolume { - return &SingleWalletVolume{ +) SingleWalletVolume { + return SingleWalletVolume{ WalletAddress: walletAddress.String(), - Volume: &volume, + Volume: volume, } } From d12aa709b8fdd23840c84516801eeed71e0bc694 Mon Sep 17 00:00:00 2001 From: Xiong Date: Tue, 4 Apr 2023 17:11:40 -0400 Subject: [PATCH 48/95] conflict solve --- x/register/keeper/meta_node.go | 1 - 1 file changed, 1 deletion(-) diff --git a/x/register/keeper/meta_node.go b/x/register/keeper/meta_node.go index 92a605e8..ef943709 100644 --- a/x/register/keeper/meta_node.go +++ b/x/register/keeper/meta_node.go @@ -1,7 +1,6 @@ package keeper import ( - "bytes" "errors" "fmt" "sort" From 34addbbd3c871d19784fda9c041efbb1a1f5ef6e Mon Sep 17 00:00:00 2001 From: Xiong Date: Tue, 4 Apr 2023 17:26:52 -0400 Subject: [PATCH 49/95] remove return value ozoneLimitChange from UnbondResourceNode() --- x/register/keeper/keeper.go | 18 +++++++++--------- x/register/keeper/msg_server.go | 3 +-- x/register/keeper/resource_node.go | 4 ++-- 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/x/register/keeper/keeper.go b/x/register/keeper/keeper.go index 60e1d30f..fdc8f819 100644 --- a/x/register/keeper/keeper.go +++ b/x/register/keeper/keeper.go @@ -278,28 +278,28 @@ func (k Keeper) subtractUBDNodeStake(ctx sdk.Context, ubd types.UnbondingNode, t } func (k Keeper) UnbondResourceNode(ctx sdk.Context, resourceNode types.ResourceNode, amt sdk.Int, -) (ozoneLimitChange, availableTokenAmtBefore, availableTokenAmtAfter sdk.Int, unbondingMatureTime time.Time, err error) { +) (availableTokenAmtBefore, availableTokenAmtAfter sdk.Int, unbondingMatureTime time.Time, err error) { if resourceNode.GetStatus() == stakingtypes.Unbonding { - return sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroInt(), time.Time{}, types.ErrUnbondingNode + return sdk.ZeroInt(), sdk.ZeroInt(), time.Time{}, types.ErrUnbondingNode } // transfer the node tokens to the not bonded pool networkAddr, err := stratos.SdsAddressFromBech32(resourceNode.GetNetworkAddress()) if err != nil { - return sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroInt(), time.Time{}, errors.New("invalid network address") + return sdk.ZeroInt(), sdk.ZeroInt(), time.Time{}, errors.New("invalid network address") } ownerAddr, err := sdk.AccAddressFromBech32(resourceNode.GetOwnerAddress()) if err != nil { - return sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroInt(), time.Time{}, errors.New("invalid wallet address") + return sdk.ZeroInt(), sdk.ZeroInt(), time.Time{}, errors.New("invalid wallet address") } ownerAcc := k.accountKeeper.GetAccount(ctx, ownerAddr) if ownerAcc == nil { - return sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroInt(), time.Time{}, types.ErrNoOwnerAccountFound + return sdk.ZeroInt(), sdk.ZeroInt(), time.Time{}, types.ErrNoOwnerAccountFound } // suspended node cannot be unbonded (avoid dup stake decrease with node suspension) if resourceNode.Suspend { - return sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroInt(), time.Time{}, types.ErrInvalidSuspensionStatForUnbondNode + return sdk.ZeroInt(), sdk.ZeroInt(), time.Time{}, types.ErrInvalidSuspensionStatForUnbondNode } // check if node_token - unbonding_token > amt_to_unbond @@ -307,12 +307,12 @@ func (k Keeper) UnbondResourceNode(ctx sdk.Context, resourceNode types.ResourceN availableStake := resourceNode.Tokens.Sub(unbondingStake) if availableStake.LT(amt) { - return sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroInt(), time.Time{}, types.ErrInsufficientBalance + return sdk.ZeroInt(), sdk.ZeroInt(), time.Time{}, types.ErrInsufficientBalance } availableTokenAmtBefore = availableStake if k.HasMaxUnbondingNodeEntries(ctx, networkAddr) { - return sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroInt(), time.Time{}, types.ErrMaxUnbondingNodeEntries + return sdk.ZeroInt(), sdk.ZeroInt(), time.Time{}, types.ErrMaxUnbondingNodeEntries } unbondingMatureTime = calcUnbondingMatureTime(ctx, resourceNode.Status, resourceNode.CreationTime, k.UnbondingThreasholdTime(ctx), k.UnbondingCompletionTime(ctx)) @@ -345,7 +345,7 @@ func (k Keeper) UnbondResourceNode(ctx sdk.Context, resourceNode types.ResourceN k.InsertUnbondingNodeQueue(ctx, unbondingNode, unbondingMatureTime) ctx.Logger().Info("Unbonding resource node " + unbondingNode.String() + "\n after mature time" + unbondingMatureTime.String()) availableTokenAmtAfter = availableTokenAmtBefore.Sub(amt) - return ozoneLimitChange, availableTokenAmtBefore, availableTokenAmtAfter, unbondingMatureTime, nil + return availableTokenAmtBefore, availableTokenAmtAfter, unbondingMatureTime, nil } func (k Keeper) UnbondMetaNode(ctx sdk.Context, metaNode types.MetaNode, amt sdk.Int, diff --git a/x/register/keeper/msg_server.go b/x/register/keeper/msg_server.go index 2469cd9e..ca5653af 100644 --- a/x/register/keeper/msg_server.go +++ b/x/register/keeper/msg_server.go @@ -130,7 +130,7 @@ func (k msgServer) HandleMsgRemoveResourceNode(goCtx context.Context, msg *types return &types.MsgRemoveResourceNodeResponse{}, types.ErrInsufficientBalance } - ozoneLimitChange, _, _, completionTime, err := k.UnbondResourceNode(ctx, resourceNode, availableStake) + _, _, completionTime, err := k.UnbondResourceNode(ctx, resourceNode, availableStake) if err != nil { return &types.MsgRemoveResourceNodeResponse{}, sdkerrors.Wrap(types.ErrUnbondResourceNode, err.Error()) } @@ -140,7 +140,6 @@ func (k msgServer) HandleMsgRemoveResourceNode(goCtx context.Context, msg *types types.EventTypeUnbondingResourceNode, sdk.NewAttribute(sdk.AttributeKeySender, msg.OwnerAddress), sdk.NewAttribute(types.AttributeKeyResourceNode, msg.ResourceNodeAddress), - sdk.NewAttribute(types.AttributeKeyOZoneLimitChanges, ozoneLimitChange.Neg().String()), sdk.NewAttribute(types.AttributeKeyStakeToRemove, sdk.NewCoin(k.BondDenom(ctx), availableStake).String()), sdk.NewAttribute(types.AttributeKeyUnbondingMatureTime, completionTime.Format(time.RFC3339)), ), diff --git a/x/register/keeper/resource_node.go b/x/register/keeper/resource_node.go index 5af72da8..ea6df3c9 100644 --- a/x/register/keeper/resource_node.go +++ b/x/register/keeper/resource_node.go @@ -345,11 +345,11 @@ func (k Keeper) UpdateResourceNodeStake(ctx sdk.Context, networkAddr stratos.Sds } return ozoneLimitChange, availableTokenAmtBefore, availableTokenAmtAfter, blockTime, node, nil } else { - ozoneLimitChange, availableTokenAmtBefore, availableTokenAmtAfter, completionTime, err := k.UnbondResourceNode(ctx, node, stakeDelta.Amount) + availableTokenAmtBefore, availableTokenAmtAfter, completionTime, err := k.UnbondResourceNode(ctx, node, stakeDelta.Amount) if err != nil { return sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroInt(), time.Time{}, types.ResourceNode{}, err } - return ozoneLimitChange, availableTokenAmtBefore, availableTokenAmtAfter, completionTime, node, nil + return sdk.ZeroInt(), availableTokenAmtBefore, availableTokenAmtAfter, completionTime, node, nil } } From 5c46ae666743ae84625f47f2b0f483fa763b873e Mon Sep 17 00:00:00 2001 From: Xiong Date: Tue, 4 Apr 2023 17:55:01 -0400 Subject: [PATCH 50/95] Verify the value of hashed volumeReport sign data equals to txData from blsSignature --- crypto/crypto.go | 14 + crypto/sha3/LICENSE | 27 ++ crypto/sha3/PATENTS | 22 + crypto/sha3/doc.go | 62 +++ crypto/sha3/hashes.go | 71 ++++ crypto/sha3/keccakf.go | 413 +++++++++++++++++++ crypto/sha3/keccakf_amd64.go | 14 + crypto/sha3/keccakf_amd64.s | 390 +++++++++++++++++ crypto/sha3/register.go | 19 + crypto/sha3/sha3.go | 192 +++++++++ crypto/sha3/sha3_test.go | 297 +++++++++++++ crypto/sha3/shake.go | 60 +++ crypto/sha3/testdata/keccakKats.json.deflate | Bin 0 -> 521342 bytes crypto/sha3/xor.go | 17 + crypto/sha3/xor_generic.go | 28 ++ crypto/sha3/xor_unaligned.go | 59 +++ x/pot/keeper/msg_server.go | 8 + 17 files changed, 1693 insertions(+) create mode 100644 crypto/crypto.go create mode 100644 crypto/sha3/LICENSE create mode 100644 crypto/sha3/PATENTS create mode 100644 crypto/sha3/doc.go create mode 100644 crypto/sha3/hashes.go create mode 100644 crypto/sha3/keccakf.go create mode 100644 crypto/sha3/keccakf_amd64.go create mode 100644 crypto/sha3/keccakf_amd64.s create mode 100644 crypto/sha3/register.go create mode 100644 crypto/sha3/sha3.go create mode 100644 crypto/sha3/sha3_test.go create mode 100644 crypto/sha3/shake.go create mode 100644 crypto/sha3/testdata/keccakKats.json.deflate create mode 100644 crypto/sha3/xor.go create mode 100644 crypto/sha3/xor_generic.go create mode 100644 crypto/sha3/xor_unaligned.go diff --git a/crypto/crypto.go b/crypto/crypto.go new file mode 100644 index 00000000..dad6a182 --- /dev/null +++ b/crypto/crypto.go @@ -0,0 +1,14 @@ +package crypto + +import ( + "github.com/stratosnet/stratos-chain/crypto/sha3" +) + +// Keccak256 calculates and returns the Keccak256 hash of the input data. +func Keccak256(data ...[]byte) []byte { + d := sha3.NewKeccak256() + for _, b := range data { + d.Write(b) + } + return d.Sum(nil) +} diff --git a/crypto/sha3/LICENSE b/crypto/sha3/LICENSE new file mode 100644 index 00000000..6a66aea5 --- /dev/null +++ b/crypto/sha3/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/crypto/sha3/PATENTS b/crypto/sha3/PATENTS new file mode 100644 index 00000000..73309904 --- /dev/null +++ b/crypto/sha3/PATENTS @@ -0,0 +1,22 @@ +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the Go project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. diff --git a/crypto/sha3/doc.go b/crypto/sha3/doc.go new file mode 100644 index 00000000..fed02aee --- /dev/null +++ b/crypto/sha3/doc.go @@ -0,0 +1,62 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package sha3 implements the SHA-3 fixed-output-length hash functions and +// the SHAKE variable-output-length hash functions defined by FIPS-202. +// +// Both types of hash function use the "sponge" construction and the Keccak +// permutation. For a detailed specification see http://keccak.noekeon.org/ +// +// # Guidance +// +// If you aren't sure what function you need, use SHAKE256 with at least 64 +// bytes of output. The SHAKE instances are faster than the SHA3 instances; +// the latter have to allocate memory to conform to the hash.Hash interface. +// +// If you need a secret-key MAC (message authentication code), prepend the +// secret key to the input, hash with SHAKE256 and read at least 32 bytes of +// output. +// +// # Security strengths +// +// The SHA3-x (x equals 224, 256, 384, or 512) functions have a security +// strength against preimage attacks of x bits. Since they only produce "x" +// bits of output, their collision-resistance is only "x/2" bits. +// +// The SHAKE-256 and -128 functions have a generic security strength of 256 and +// 128 bits against all attacks, provided that at least 2x bits of their output +// is used. Requesting more than 64 or 32 bytes of output, respectively, does +// not increase the collision-resistance of the SHAKE functions. +// +// # The sponge construction +// +// A sponge builds a pseudo-random function from a public pseudo-random +// permutation, by applying the permutation to a state of "rate + capacity" +// bytes, but hiding "capacity" of the bytes. +// +// A sponge starts out with a zero state. To hash an input using a sponge, up +// to "rate" bytes of the input are XORed into the sponge's state. The sponge +// is then "full" and the permutation is applied to "empty" it. This process is +// repeated until all the input has been "absorbed". The input is then padded. +// The digest is "squeezed" from the sponge in the same way, except that output +// output is copied out instead of input being XORed in. +// +// A sponge is parameterized by its generic security strength, which is equal +// to half its capacity; capacity + rate is equal to the permutation's width. +// Since the KeccakF-1600 permutation is 1600 bits (200 bytes) wide, this means +// that the security strength of a sponge instance is equal to (1600 - bitrate) / 2. +// +// # Recommendations +// +// The SHAKE functions are recommended for most new uses. They can produce +// output of arbitrary length. SHAKE256, with an output length of at least +// 64 bytes, provides 256-bit security against all attacks. The Keccak team +// recommends it for most applications upgrading from SHA2-512. (NIST chose a +// much stronger, but much slower, sponge instance for SHA3-512.) +// +// The SHA-3 functions are "drop-in" replacements for the SHA-2 functions. +// They produce output of the same length, with the same security strengths +// against all attacks. This means, in particular, that SHA3-256 only has +// 128-bit collision resistance, because its output length is 32 bytes. +package sha3 diff --git a/crypto/sha3/hashes.go b/crypto/sha3/hashes.go new file mode 100644 index 00000000..fa0d7b43 --- /dev/null +++ b/crypto/sha3/hashes.go @@ -0,0 +1,71 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package sha3 + +// This file provides functions for creating instances of the SHA-3 +// and SHAKE hash functions, as well as utility functions for hashing +// bytes. + +import ( + "hash" +) + +// NewKeccak256 creates a new Keccak-256 hash. +func NewKeccak256() hash.Hash { return &state{rate: 136, outputLen: 32, dsbyte: 0x01} } + +// NewKeccak512 creates a new Keccak-512 hash. +func NewKeccak512() hash.Hash { return &state{rate: 72, outputLen: 64, dsbyte: 0x01} } + +// New224 creates a new SHA3-224 hash. +// Its generic security strength is 224 bits against preimage attacks, +// and 112 bits against collision attacks. +func New224() hash.Hash { return &state{rate: 144, outputLen: 28, dsbyte: 0x06} } + +// New256 creates a new SHA3-256 hash. +// Its generic security strength is 256 bits against preimage attacks, +// and 128 bits against collision attacks. +func New256() hash.Hash { return &state{rate: 136, outputLen: 32, dsbyte: 0x06} } + +// New384 creates a new SHA3-384 hash. +// Its generic security strength is 384 bits against preimage attacks, +// and 192 bits against collision attacks. +func New384() hash.Hash { return &state{rate: 104, outputLen: 48, dsbyte: 0x06} } + +// New512 creates a new SHA3-512 hash. +// Its generic security strength is 512 bits against preimage attacks, +// and 256 bits against collision attacks. +func New512() hash.Hash { return &state{rate: 72, outputLen: 64, dsbyte: 0x06} } + +// Sum224 returns the SHA3-224 digest of the data. +func Sum224(data []byte) (digest [28]byte) { + h := New224() + h.Write(data) + h.Sum(digest[:0]) + return +} + +// Sum256 returns the SHA3-256 digest of the data. +func Sum256(data []byte) (digest [32]byte) { + h := New256() + h.Write(data) + h.Sum(digest[:0]) + return +} + +// Sum384 returns the SHA3-384 digest of the data. +func Sum384(data []byte) (digest [48]byte) { + h := New384() + h.Write(data) + h.Sum(digest[:0]) + return +} + +// Sum512 returns the SHA3-512 digest of the data. +func Sum512(data []byte) (digest [64]byte) { + h := New512() + h.Write(data) + h.Sum(digest[:0]) + return +} diff --git a/crypto/sha3/keccakf.go b/crypto/sha3/keccakf.go new file mode 100644 index 00000000..8a3fe263 --- /dev/null +++ b/crypto/sha3/keccakf.go @@ -0,0 +1,413 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build !amd64 || appengine || gccgo +// +build !amd64 appengine gccgo + +package sha3 + +// rc stores the round constants for use in the ι step. +var rc = [24]uint64{ + 0x0000000000000001, + 0x0000000000008082, + 0x800000000000808A, + 0x8000000080008000, + 0x000000000000808B, + 0x0000000080000001, + 0x8000000080008081, + 0x8000000000008009, + 0x000000000000008A, + 0x0000000000000088, + 0x0000000080008009, + 0x000000008000000A, + 0x000000008000808B, + 0x800000000000008B, + 0x8000000000008089, + 0x8000000000008003, + 0x8000000000008002, + 0x8000000000000080, + 0x000000000000800A, + 0x800000008000000A, + 0x8000000080008081, + 0x8000000000008080, + 0x0000000080000001, + 0x8000000080008008, +} + +// keccakF1600 applies the Keccak permutation to a 1600b-wide +// state represented as a slice of 25 uint64s. +func keccakF1600(a *[25]uint64) { + // Implementation translated from Keccak-inplace.c + // in the keccak reference code. + var t, bc0, bc1, bc2, bc3, bc4, d0, d1, d2, d3, d4 uint64 + + for i := 0; i < 24; i += 4 { + // Combines the 5 steps in each round into 2 steps. + // Unrolls 4 rounds per loop and spreads some steps across rounds. + + // Round 1 + bc0 = a[0] ^ a[5] ^ a[10] ^ a[15] ^ a[20] + bc1 = a[1] ^ a[6] ^ a[11] ^ a[16] ^ a[21] + bc2 = a[2] ^ a[7] ^ a[12] ^ a[17] ^ a[22] + bc3 = a[3] ^ a[8] ^ a[13] ^ a[18] ^ a[23] + bc4 = a[4] ^ a[9] ^ a[14] ^ a[19] ^ a[24] + d0 = bc4 ^ (bc1<<1 | bc1>>63) + d1 = bc0 ^ (bc2<<1 | bc2>>63) + d2 = bc1 ^ (bc3<<1 | bc3>>63) + d3 = bc2 ^ (bc4<<1 | bc4>>63) + d4 = bc3 ^ (bc0<<1 | bc0>>63) + + bc0 = a[0] ^ d0 + t = a[6] ^ d1 + bc1 = t<<44 | t>>(64-44) + t = a[12] ^ d2 + bc2 = t<<43 | t>>(64-43) + t = a[18] ^ d3 + bc3 = t<<21 | t>>(64-21) + t = a[24] ^ d4 + bc4 = t<<14 | t>>(64-14) + a[0] = bc0 ^ (bc2 &^ bc1) ^ rc[i] + a[6] = bc1 ^ (bc3 &^ bc2) + a[12] = bc2 ^ (bc4 &^ bc3) + a[18] = bc3 ^ (bc0 &^ bc4) + a[24] = bc4 ^ (bc1 &^ bc0) + + t = a[10] ^ d0 + bc2 = t<<3 | t>>(64-3) + t = a[16] ^ d1 + bc3 = t<<45 | t>>(64-45) + t = a[22] ^ d2 + bc4 = t<<61 | t>>(64-61) + t = a[3] ^ d3 + bc0 = t<<28 | t>>(64-28) + t = a[9] ^ d4 + bc1 = t<<20 | t>>(64-20) + a[10] = bc0 ^ (bc2 &^ bc1) + a[16] = bc1 ^ (bc3 &^ bc2) + a[22] = bc2 ^ (bc4 &^ bc3) + a[3] = bc3 ^ (bc0 &^ bc4) + a[9] = bc4 ^ (bc1 &^ bc0) + + t = a[20] ^ d0 + bc4 = t<<18 | t>>(64-18) + t = a[1] ^ d1 + bc0 = t<<1 | t>>(64-1) + t = a[7] ^ d2 + bc1 = t<<6 | t>>(64-6) + t = a[13] ^ d3 + bc2 = t<<25 | t>>(64-25) + t = a[19] ^ d4 + bc3 = t<<8 | t>>(64-8) + a[20] = bc0 ^ (bc2 &^ bc1) + a[1] = bc1 ^ (bc3 &^ bc2) + a[7] = bc2 ^ (bc4 &^ bc3) + a[13] = bc3 ^ (bc0 &^ bc4) + a[19] = bc4 ^ (bc1 &^ bc0) + + t = a[5] ^ d0 + bc1 = t<<36 | t>>(64-36) + t = a[11] ^ d1 + bc2 = t<<10 | t>>(64-10) + t = a[17] ^ d2 + bc3 = t<<15 | t>>(64-15) + t = a[23] ^ d3 + bc4 = t<<56 | t>>(64-56) + t = a[4] ^ d4 + bc0 = t<<27 | t>>(64-27) + a[5] = bc0 ^ (bc2 &^ bc1) + a[11] = bc1 ^ (bc3 &^ bc2) + a[17] = bc2 ^ (bc4 &^ bc3) + a[23] = bc3 ^ (bc0 &^ bc4) + a[4] = bc4 ^ (bc1 &^ bc0) + + t = a[15] ^ d0 + bc3 = t<<41 | t>>(64-41) + t = a[21] ^ d1 + bc4 = t<<2 | t>>(64-2) + t = a[2] ^ d2 + bc0 = t<<62 | t>>(64-62) + t = a[8] ^ d3 + bc1 = t<<55 | t>>(64-55) + t = a[14] ^ d4 + bc2 = t<<39 | t>>(64-39) + a[15] = bc0 ^ (bc2 &^ bc1) + a[21] = bc1 ^ (bc3 &^ bc2) + a[2] = bc2 ^ (bc4 &^ bc3) + a[8] = bc3 ^ (bc0 &^ bc4) + a[14] = bc4 ^ (bc1 &^ bc0) + + // Round 2 + bc0 = a[0] ^ a[5] ^ a[10] ^ a[15] ^ a[20] + bc1 = a[1] ^ a[6] ^ a[11] ^ a[16] ^ a[21] + bc2 = a[2] ^ a[7] ^ a[12] ^ a[17] ^ a[22] + bc3 = a[3] ^ a[8] ^ a[13] ^ a[18] ^ a[23] + bc4 = a[4] ^ a[9] ^ a[14] ^ a[19] ^ a[24] + d0 = bc4 ^ (bc1<<1 | bc1>>63) + d1 = bc0 ^ (bc2<<1 | bc2>>63) + d2 = bc1 ^ (bc3<<1 | bc3>>63) + d3 = bc2 ^ (bc4<<1 | bc4>>63) + d4 = bc3 ^ (bc0<<1 | bc0>>63) + + bc0 = a[0] ^ d0 + t = a[16] ^ d1 + bc1 = t<<44 | t>>(64-44) + t = a[7] ^ d2 + bc2 = t<<43 | t>>(64-43) + t = a[23] ^ d3 + bc3 = t<<21 | t>>(64-21) + t = a[14] ^ d4 + bc4 = t<<14 | t>>(64-14) + a[0] = bc0 ^ (bc2 &^ bc1) ^ rc[i+1] + a[16] = bc1 ^ (bc3 &^ bc2) + a[7] = bc2 ^ (bc4 &^ bc3) + a[23] = bc3 ^ (bc0 &^ bc4) + a[14] = bc4 ^ (bc1 &^ bc0) + + t = a[20] ^ d0 + bc2 = t<<3 | t>>(64-3) + t = a[11] ^ d1 + bc3 = t<<45 | t>>(64-45) + t = a[2] ^ d2 + bc4 = t<<61 | t>>(64-61) + t = a[18] ^ d3 + bc0 = t<<28 | t>>(64-28) + t = a[9] ^ d4 + bc1 = t<<20 | t>>(64-20) + a[20] = bc0 ^ (bc2 &^ bc1) + a[11] = bc1 ^ (bc3 &^ bc2) + a[2] = bc2 ^ (bc4 &^ bc3) + a[18] = bc3 ^ (bc0 &^ bc4) + a[9] = bc4 ^ (bc1 &^ bc0) + + t = a[15] ^ d0 + bc4 = t<<18 | t>>(64-18) + t = a[6] ^ d1 + bc0 = t<<1 | t>>(64-1) + t = a[22] ^ d2 + bc1 = t<<6 | t>>(64-6) + t = a[13] ^ d3 + bc2 = t<<25 | t>>(64-25) + t = a[4] ^ d4 + bc3 = t<<8 | t>>(64-8) + a[15] = bc0 ^ (bc2 &^ bc1) + a[6] = bc1 ^ (bc3 &^ bc2) + a[22] = bc2 ^ (bc4 &^ bc3) + a[13] = bc3 ^ (bc0 &^ bc4) + a[4] = bc4 ^ (bc1 &^ bc0) + + t = a[10] ^ d0 + bc1 = t<<36 | t>>(64-36) + t = a[1] ^ d1 + bc2 = t<<10 | t>>(64-10) + t = a[17] ^ d2 + bc3 = t<<15 | t>>(64-15) + t = a[8] ^ d3 + bc4 = t<<56 | t>>(64-56) + t = a[24] ^ d4 + bc0 = t<<27 | t>>(64-27) + a[10] = bc0 ^ (bc2 &^ bc1) + a[1] = bc1 ^ (bc3 &^ bc2) + a[17] = bc2 ^ (bc4 &^ bc3) + a[8] = bc3 ^ (bc0 &^ bc4) + a[24] = bc4 ^ (bc1 &^ bc0) + + t = a[5] ^ d0 + bc3 = t<<41 | t>>(64-41) + t = a[21] ^ d1 + bc4 = t<<2 | t>>(64-2) + t = a[12] ^ d2 + bc0 = t<<62 | t>>(64-62) + t = a[3] ^ d3 + bc1 = t<<55 | t>>(64-55) + t = a[19] ^ d4 + bc2 = t<<39 | t>>(64-39) + a[5] = bc0 ^ (bc2 &^ bc1) + a[21] = bc1 ^ (bc3 &^ bc2) + a[12] = bc2 ^ (bc4 &^ bc3) + a[3] = bc3 ^ (bc0 &^ bc4) + a[19] = bc4 ^ (bc1 &^ bc0) + + // Round 3 + bc0 = a[0] ^ a[5] ^ a[10] ^ a[15] ^ a[20] + bc1 = a[1] ^ a[6] ^ a[11] ^ a[16] ^ a[21] + bc2 = a[2] ^ a[7] ^ a[12] ^ a[17] ^ a[22] + bc3 = a[3] ^ a[8] ^ a[13] ^ a[18] ^ a[23] + bc4 = a[4] ^ a[9] ^ a[14] ^ a[19] ^ a[24] + d0 = bc4 ^ (bc1<<1 | bc1>>63) + d1 = bc0 ^ (bc2<<1 | bc2>>63) + d2 = bc1 ^ (bc3<<1 | bc3>>63) + d3 = bc2 ^ (bc4<<1 | bc4>>63) + d4 = bc3 ^ (bc0<<1 | bc0>>63) + + bc0 = a[0] ^ d0 + t = a[11] ^ d1 + bc1 = t<<44 | t>>(64-44) + t = a[22] ^ d2 + bc2 = t<<43 | t>>(64-43) + t = a[8] ^ d3 + bc3 = t<<21 | t>>(64-21) + t = a[19] ^ d4 + bc4 = t<<14 | t>>(64-14) + a[0] = bc0 ^ (bc2 &^ bc1) ^ rc[i+2] + a[11] = bc1 ^ (bc3 &^ bc2) + a[22] = bc2 ^ (bc4 &^ bc3) + a[8] = bc3 ^ (bc0 &^ bc4) + a[19] = bc4 ^ (bc1 &^ bc0) + + t = a[15] ^ d0 + bc2 = t<<3 | t>>(64-3) + t = a[1] ^ d1 + bc3 = t<<45 | t>>(64-45) + t = a[12] ^ d2 + bc4 = t<<61 | t>>(64-61) + t = a[23] ^ d3 + bc0 = t<<28 | t>>(64-28) + t = a[9] ^ d4 + bc1 = t<<20 | t>>(64-20) + a[15] = bc0 ^ (bc2 &^ bc1) + a[1] = bc1 ^ (bc3 &^ bc2) + a[12] = bc2 ^ (bc4 &^ bc3) + a[23] = bc3 ^ (bc0 &^ bc4) + a[9] = bc4 ^ (bc1 &^ bc0) + + t = a[5] ^ d0 + bc4 = t<<18 | t>>(64-18) + t = a[16] ^ d1 + bc0 = t<<1 | t>>(64-1) + t = a[2] ^ d2 + bc1 = t<<6 | t>>(64-6) + t = a[13] ^ d3 + bc2 = t<<25 | t>>(64-25) + t = a[24] ^ d4 + bc3 = t<<8 | t>>(64-8) + a[5] = bc0 ^ (bc2 &^ bc1) + a[16] = bc1 ^ (bc3 &^ bc2) + a[2] = bc2 ^ (bc4 &^ bc3) + a[13] = bc3 ^ (bc0 &^ bc4) + a[24] = bc4 ^ (bc1 &^ bc0) + + t = a[20] ^ d0 + bc1 = t<<36 | t>>(64-36) + t = a[6] ^ d1 + bc2 = t<<10 | t>>(64-10) + t = a[17] ^ d2 + bc3 = t<<15 | t>>(64-15) + t = a[3] ^ d3 + bc4 = t<<56 | t>>(64-56) + t = a[14] ^ d4 + bc0 = t<<27 | t>>(64-27) + a[20] = bc0 ^ (bc2 &^ bc1) + a[6] = bc1 ^ (bc3 &^ bc2) + a[17] = bc2 ^ (bc4 &^ bc3) + a[3] = bc3 ^ (bc0 &^ bc4) + a[14] = bc4 ^ (bc1 &^ bc0) + + t = a[10] ^ d0 + bc3 = t<<41 | t>>(64-41) + t = a[21] ^ d1 + bc4 = t<<2 | t>>(64-2) + t = a[7] ^ d2 + bc0 = t<<62 | t>>(64-62) + t = a[18] ^ d3 + bc1 = t<<55 | t>>(64-55) + t = a[4] ^ d4 + bc2 = t<<39 | t>>(64-39) + a[10] = bc0 ^ (bc2 &^ bc1) + a[21] = bc1 ^ (bc3 &^ bc2) + a[7] = bc2 ^ (bc4 &^ bc3) + a[18] = bc3 ^ (bc0 &^ bc4) + a[4] = bc4 ^ (bc1 &^ bc0) + + // Round 4 + bc0 = a[0] ^ a[5] ^ a[10] ^ a[15] ^ a[20] + bc1 = a[1] ^ a[6] ^ a[11] ^ a[16] ^ a[21] + bc2 = a[2] ^ a[7] ^ a[12] ^ a[17] ^ a[22] + bc3 = a[3] ^ a[8] ^ a[13] ^ a[18] ^ a[23] + bc4 = a[4] ^ a[9] ^ a[14] ^ a[19] ^ a[24] + d0 = bc4 ^ (bc1<<1 | bc1>>63) + d1 = bc0 ^ (bc2<<1 | bc2>>63) + d2 = bc1 ^ (bc3<<1 | bc3>>63) + d3 = bc2 ^ (bc4<<1 | bc4>>63) + d4 = bc3 ^ (bc0<<1 | bc0>>63) + + bc0 = a[0] ^ d0 + t = a[1] ^ d1 + bc1 = t<<44 | t>>(64-44) + t = a[2] ^ d2 + bc2 = t<<43 | t>>(64-43) + t = a[3] ^ d3 + bc3 = t<<21 | t>>(64-21) + t = a[4] ^ d4 + bc4 = t<<14 | t>>(64-14) + a[0] = bc0 ^ (bc2 &^ bc1) ^ rc[i+3] + a[1] = bc1 ^ (bc3 &^ bc2) + a[2] = bc2 ^ (bc4 &^ bc3) + a[3] = bc3 ^ (bc0 &^ bc4) + a[4] = bc4 ^ (bc1 &^ bc0) + + t = a[5] ^ d0 + bc2 = t<<3 | t>>(64-3) + t = a[6] ^ d1 + bc3 = t<<45 | t>>(64-45) + t = a[7] ^ d2 + bc4 = t<<61 | t>>(64-61) + t = a[8] ^ d3 + bc0 = t<<28 | t>>(64-28) + t = a[9] ^ d4 + bc1 = t<<20 | t>>(64-20) + a[5] = bc0 ^ (bc2 &^ bc1) + a[6] = bc1 ^ (bc3 &^ bc2) + a[7] = bc2 ^ (bc4 &^ bc3) + a[8] = bc3 ^ (bc0 &^ bc4) + a[9] = bc4 ^ (bc1 &^ bc0) + + t = a[10] ^ d0 + bc4 = t<<18 | t>>(64-18) + t = a[11] ^ d1 + bc0 = t<<1 | t>>(64-1) + t = a[12] ^ d2 + bc1 = t<<6 | t>>(64-6) + t = a[13] ^ d3 + bc2 = t<<25 | t>>(64-25) + t = a[14] ^ d4 + bc3 = t<<8 | t>>(64-8) + a[10] = bc0 ^ (bc2 &^ bc1) + a[11] = bc1 ^ (bc3 &^ bc2) + a[12] = bc2 ^ (bc4 &^ bc3) + a[13] = bc3 ^ (bc0 &^ bc4) + a[14] = bc4 ^ (bc1 &^ bc0) + + t = a[15] ^ d0 + bc1 = t<<36 | t>>(64-36) + t = a[16] ^ d1 + bc2 = t<<10 | t>>(64-10) + t = a[17] ^ d2 + bc3 = t<<15 | t>>(64-15) + t = a[18] ^ d3 + bc4 = t<<56 | t>>(64-56) + t = a[19] ^ d4 + bc0 = t<<27 | t>>(64-27) + a[15] = bc0 ^ (bc2 &^ bc1) + a[16] = bc1 ^ (bc3 &^ bc2) + a[17] = bc2 ^ (bc4 &^ bc3) + a[18] = bc3 ^ (bc0 &^ bc4) + a[19] = bc4 ^ (bc1 &^ bc0) + + t = a[20] ^ d0 + bc3 = t<<41 | t>>(64-41) + t = a[21] ^ d1 + bc4 = t<<2 | t>>(64-2) + t = a[22] ^ d2 + bc0 = t<<62 | t>>(64-62) + t = a[23] ^ d3 + bc1 = t<<55 | t>>(64-55) + t = a[24] ^ d4 + bc2 = t<<39 | t>>(64-39) + a[20] = bc0 ^ (bc2 &^ bc1) + a[21] = bc1 ^ (bc3 &^ bc2) + a[22] = bc2 ^ (bc4 &^ bc3) + a[23] = bc3 ^ (bc0 &^ bc4) + a[24] = bc4 ^ (bc1 &^ bc0) + } +} diff --git a/crypto/sha3/keccakf_amd64.go b/crypto/sha3/keccakf_amd64.go new file mode 100644 index 00000000..c0cfd170 --- /dev/null +++ b/crypto/sha3/keccakf_amd64.go @@ -0,0 +1,14 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build amd64 && !appengine && !gccgo +// +build amd64,!appengine,!gccgo + +package sha3 + +// This function is implemented in keccakf_amd64.s. + +//go:noescape + +func keccakF1600(state *[25]uint64) diff --git a/crypto/sha3/keccakf_amd64.s b/crypto/sha3/keccakf_amd64.s new file mode 100644 index 00000000..f88533ac --- /dev/null +++ b/crypto/sha3/keccakf_amd64.s @@ -0,0 +1,390 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build amd64,!appengine,!gccgo + +// This code was translated into a form compatible with 6a from the public +// domain sources at https://github.com/gvanas/KeccakCodePackage + +// Offsets in state +#define _ba (0*8) +#define _be (1*8) +#define _bi (2*8) +#define _bo (3*8) +#define _bu (4*8) +#define _ga (5*8) +#define _ge (6*8) +#define _gi (7*8) +#define _go (8*8) +#define _gu (9*8) +#define _ka (10*8) +#define _ke (11*8) +#define _ki (12*8) +#define _ko (13*8) +#define _ku (14*8) +#define _ma (15*8) +#define _me (16*8) +#define _mi (17*8) +#define _mo (18*8) +#define _mu (19*8) +#define _sa (20*8) +#define _se (21*8) +#define _si (22*8) +#define _so (23*8) +#define _su (24*8) + +// Temporary registers +#define rT1 AX + +// Round vars +#define rpState DI +#define rpStack SP + +#define rDa BX +#define rDe CX +#define rDi DX +#define rDo R8 +#define rDu R9 + +#define rBa R10 +#define rBe R11 +#define rBi R12 +#define rBo R13 +#define rBu R14 + +#define rCa SI +#define rCe BP +#define rCi rBi +#define rCo rBo +#define rCu R15 + +#define MOVQ_RBI_RCE MOVQ rBi, rCe +#define XORQ_RT1_RCA XORQ rT1, rCa +#define XORQ_RT1_RCE XORQ rT1, rCe +#define XORQ_RBA_RCU XORQ rBa, rCu +#define XORQ_RBE_RCU XORQ rBe, rCu +#define XORQ_RDU_RCU XORQ rDu, rCu +#define XORQ_RDA_RCA XORQ rDa, rCa +#define XORQ_RDE_RCE XORQ rDe, rCe + +#define mKeccakRound(iState, oState, rc, B_RBI_RCE, G_RT1_RCA, G_RT1_RCE, G_RBA_RCU, K_RT1_RCA, K_RT1_RCE, K_RBA_RCU, M_RT1_RCA, M_RT1_RCE, M_RBE_RCU, S_RDU_RCU, S_RDA_RCA, S_RDE_RCE) \ + /* Prepare round */ \ + MOVQ rCe, rDa; \ + ROLQ $1, rDa; \ + \ + MOVQ _bi(iState), rCi; \ + XORQ _gi(iState), rDi; \ + XORQ rCu, rDa; \ + XORQ _ki(iState), rCi; \ + XORQ _mi(iState), rDi; \ + XORQ rDi, rCi; \ + \ + MOVQ rCi, rDe; \ + ROLQ $1, rDe; \ + \ + MOVQ _bo(iState), rCo; \ + XORQ _go(iState), rDo; \ + XORQ rCa, rDe; \ + XORQ _ko(iState), rCo; \ + XORQ _mo(iState), rDo; \ + XORQ rDo, rCo; \ + \ + MOVQ rCo, rDi; \ + ROLQ $1, rDi; \ + \ + MOVQ rCu, rDo; \ + XORQ rCe, rDi; \ + ROLQ $1, rDo; \ + \ + MOVQ rCa, rDu; \ + XORQ rCi, rDo; \ + ROLQ $1, rDu; \ + \ + /* Result b */ \ + MOVQ _ba(iState), rBa; \ + MOVQ _ge(iState), rBe; \ + XORQ rCo, rDu; \ + MOVQ _ki(iState), rBi; \ + MOVQ _mo(iState), rBo; \ + MOVQ _su(iState), rBu; \ + XORQ rDe, rBe; \ + ROLQ $44, rBe; \ + XORQ rDi, rBi; \ + XORQ rDa, rBa; \ + ROLQ $43, rBi; \ + \ + MOVQ rBe, rCa; \ + MOVQ rc, rT1; \ + ORQ rBi, rCa; \ + XORQ rBa, rT1; \ + XORQ rT1, rCa; \ + MOVQ rCa, _ba(oState); \ + \ + XORQ rDu, rBu; \ + ROLQ $14, rBu; \ + MOVQ rBa, rCu; \ + ANDQ rBe, rCu; \ + XORQ rBu, rCu; \ + MOVQ rCu, _bu(oState); \ + \ + XORQ rDo, rBo; \ + ROLQ $21, rBo; \ + MOVQ rBo, rT1; \ + ANDQ rBu, rT1; \ + XORQ rBi, rT1; \ + MOVQ rT1, _bi(oState); \ + \ + NOTQ rBi; \ + ORQ rBa, rBu; \ + ORQ rBo, rBi; \ + XORQ rBo, rBu; \ + XORQ rBe, rBi; \ + MOVQ rBu, _bo(oState); \ + MOVQ rBi, _be(oState); \ + B_RBI_RCE; \ + \ + /* Result g */ \ + MOVQ _gu(iState), rBe; \ + XORQ rDu, rBe; \ + MOVQ _ka(iState), rBi; \ + ROLQ $20, rBe; \ + XORQ rDa, rBi; \ + ROLQ $3, rBi; \ + MOVQ _bo(iState), rBa; \ + MOVQ rBe, rT1; \ + ORQ rBi, rT1; \ + XORQ rDo, rBa; \ + MOVQ _me(iState), rBo; \ + MOVQ _si(iState), rBu; \ + ROLQ $28, rBa; \ + XORQ rBa, rT1; \ + MOVQ rT1, _ga(oState); \ + G_RT1_RCA; \ + \ + XORQ rDe, rBo; \ + ROLQ $45, rBo; \ + MOVQ rBi, rT1; \ + ANDQ rBo, rT1; \ + XORQ rBe, rT1; \ + MOVQ rT1, _ge(oState); \ + G_RT1_RCE; \ + \ + XORQ rDi, rBu; \ + ROLQ $61, rBu; \ + MOVQ rBu, rT1; \ + ORQ rBa, rT1; \ + XORQ rBo, rT1; \ + MOVQ rT1, _go(oState); \ + \ + ANDQ rBe, rBa; \ + XORQ rBu, rBa; \ + MOVQ rBa, _gu(oState); \ + NOTQ rBu; \ + G_RBA_RCU; \ + \ + ORQ rBu, rBo; \ + XORQ rBi, rBo; \ + MOVQ rBo, _gi(oState); \ + \ + /* Result k */ \ + MOVQ _be(iState), rBa; \ + MOVQ _gi(iState), rBe; \ + MOVQ _ko(iState), rBi; \ + MOVQ _mu(iState), rBo; \ + MOVQ _sa(iState), rBu; \ + XORQ rDi, rBe; \ + ROLQ $6, rBe; \ + XORQ rDo, rBi; \ + ROLQ $25, rBi; \ + MOVQ rBe, rT1; \ + ORQ rBi, rT1; \ + XORQ rDe, rBa; \ + ROLQ $1, rBa; \ + XORQ rBa, rT1; \ + MOVQ rT1, _ka(oState); \ + K_RT1_RCA; \ + \ + XORQ rDu, rBo; \ + ROLQ $8, rBo; \ + MOVQ rBi, rT1; \ + ANDQ rBo, rT1; \ + XORQ rBe, rT1; \ + MOVQ rT1, _ke(oState); \ + K_RT1_RCE; \ + \ + XORQ rDa, rBu; \ + ROLQ $18, rBu; \ + NOTQ rBo; \ + MOVQ rBo, rT1; \ + ANDQ rBu, rT1; \ + XORQ rBi, rT1; \ + MOVQ rT1, _ki(oState); \ + \ + MOVQ rBu, rT1; \ + ORQ rBa, rT1; \ + XORQ rBo, rT1; \ + MOVQ rT1, _ko(oState); \ + \ + ANDQ rBe, rBa; \ + XORQ rBu, rBa; \ + MOVQ rBa, _ku(oState); \ + K_RBA_RCU; \ + \ + /* Result m */ \ + MOVQ _ga(iState), rBe; \ + XORQ rDa, rBe; \ + MOVQ _ke(iState), rBi; \ + ROLQ $36, rBe; \ + XORQ rDe, rBi; \ + MOVQ _bu(iState), rBa; \ + ROLQ $10, rBi; \ + MOVQ rBe, rT1; \ + MOVQ _mi(iState), rBo; \ + ANDQ rBi, rT1; \ + XORQ rDu, rBa; \ + MOVQ _so(iState), rBu; \ + ROLQ $27, rBa; \ + XORQ rBa, rT1; \ + MOVQ rT1, _ma(oState); \ + M_RT1_RCA; \ + \ + XORQ rDi, rBo; \ + ROLQ $15, rBo; \ + MOVQ rBi, rT1; \ + ORQ rBo, rT1; \ + XORQ rBe, rT1; \ + MOVQ rT1, _me(oState); \ + M_RT1_RCE; \ + \ + XORQ rDo, rBu; \ + ROLQ $56, rBu; \ + NOTQ rBo; \ + MOVQ rBo, rT1; \ + ORQ rBu, rT1; \ + XORQ rBi, rT1; \ + MOVQ rT1, _mi(oState); \ + \ + ORQ rBa, rBe; \ + XORQ rBu, rBe; \ + MOVQ rBe, _mu(oState); \ + \ + ANDQ rBa, rBu; \ + XORQ rBo, rBu; \ + MOVQ rBu, _mo(oState); \ + M_RBE_RCU; \ + \ + /* Result s */ \ + MOVQ _bi(iState), rBa; \ + MOVQ _go(iState), rBe; \ + MOVQ _ku(iState), rBi; \ + XORQ rDi, rBa; \ + MOVQ _ma(iState), rBo; \ + ROLQ $62, rBa; \ + XORQ rDo, rBe; \ + MOVQ _se(iState), rBu; \ + ROLQ $55, rBe; \ + \ + XORQ rDu, rBi; \ + MOVQ rBa, rDu; \ + XORQ rDe, rBu; \ + ROLQ $2, rBu; \ + ANDQ rBe, rDu; \ + XORQ rBu, rDu; \ + MOVQ rDu, _su(oState); \ + \ + ROLQ $39, rBi; \ + S_RDU_RCU; \ + NOTQ rBe; \ + XORQ rDa, rBo; \ + MOVQ rBe, rDa; \ + ANDQ rBi, rDa; \ + XORQ rBa, rDa; \ + MOVQ rDa, _sa(oState); \ + S_RDA_RCA; \ + \ + ROLQ $41, rBo; \ + MOVQ rBi, rDe; \ + ORQ rBo, rDe; \ + XORQ rBe, rDe; \ + MOVQ rDe, _se(oState); \ + S_RDE_RCE; \ + \ + MOVQ rBo, rDi; \ + MOVQ rBu, rDo; \ + ANDQ rBu, rDi; \ + ORQ rBa, rDo; \ + XORQ rBi, rDi; \ + XORQ rBo, rDo; \ + MOVQ rDi, _si(oState); \ + MOVQ rDo, _so(oState) \ + +// func keccakF1600(state *[25]uint64) +TEXT ·keccakF1600(SB), 0, $200-8 + MOVQ state+0(FP), rpState + + // Convert the user state into an internal state + NOTQ _be(rpState) + NOTQ _bi(rpState) + NOTQ _go(rpState) + NOTQ _ki(rpState) + NOTQ _mi(rpState) + NOTQ _sa(rpState) + + // Execute the KeccakF permutation + MOVQ _ba(rpState), rCa + MOVQ _be(rpState), rCe + MOVQ _bu(rpState), rCu + + XORQ _ga(rpState), rCa + XORQ _ge(rpState), rCe + XORQ _gu(rpState), rCu + + XORQ _ka(rpState), rCa + XORQ _ke(rpState), rCe + XORQ _ku(rpState), rCu + + XORQ _ma(rpState), rCa + XORQ _me(rpState), rCe + XORQ _mu(rpState), rCu + + XORQ _sa(rpState), rCa + XORQ _se(rpState), rCe + MOVQ _si(rpState), rDi + MOVQ _so(rpState), rDo + XORQ _su(rpState), rCu + + mKeccakRound(rpState, rpStack, $0x0000000000000001, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE) + mKeccakRound(rpStack, rpState, $0x0000000000008082, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE) + mKeccakRound(rpState, rpStack, $0x800000000000808a, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE) + mKeccakRound(rpStack, rpState, $0x8000000080008000, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE) + mKeccakRound(rpState, rpStack, $0x000000000000808b, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE) + mKeccakRound(rpStack, rpState, $0x0000000080000001, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE) + mKeccakRound(rpState, rpStack, $0x8000000080008081, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE) + mKeccakRound(rpStack, rpState, $0x8000000000008009, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE) + mKeccakRound(rpState, rpStack, $0x000000000000008a, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE) + mKeccakRound(rpStack, rpState, $0x0000000000000088, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE) + mKeccakRound(rpState, rpStack, $0x0000000080008009, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE) + mKeccakRound(rpStack, rpState, $0x000000008000000a, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE) + mKeccakRound(rpState, rpStack, $0x000000008000808b, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE) + mKeccakRound(rpStack, rpState, $0x800000000000008b, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE) + mKeccakRound(rpState, rpStack, $0x8000000000008089, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE) + mKeccakRound(rpStack, rpState, $0x8000000000008003, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE) + mKeccakRound(rpState, rpStack, $0x8000000000008002, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE) + mKeccakRound(rpStack, rpState, $0x8000000000000080, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE) + mKeccakRound(rpState, rpStack, $0x000000000000800a, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE) + mKeccakRound(rpStack, rpState, $0x800000008000000a, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE) + mKeccakRound(rpState, rpStack, $0x8000000080008081, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE) + mKeccakRound(rpStack, rpState, $0x8000000000008080, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE) + mKeccakRound(rpState, rpStack, $0x0000000080000001, MOVQ_RBI_RCE, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBA_RCU, XORQ_RT1_RCA, XORQ_RT1_RCE, XORQ_RBE_RCU, XORQ_RDU_RCU, XORQ_RDA_RCA, XORQ_RDE_RCE) + mKeccakRound(rpStack, rpState, $0x8000000080008008, NOP, NOP, NOP, NOP, NOP, NOP, NOP, NOP, NOP, NOP, NOP, NOP, NOP) + + // Revert the internal state to the user state + NOTQ _be(rpState) + NOTQ _bi(rpState) + NOTQ _go(rpState) + NOTQ _ki(rpState) + NOTQ _mi(rpState) + NOTQ _sa(rpState) + + RET diff --git a/crypto/sha3/register.go b/crypto/sha3/register.go new file mode 100644 index 00000000..8b4453aa --- /dev/null +++ b/crypto/sha3/register.go @@ -0,0 +1,19 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build go1.4 +// +build go1.4 + +package sha3 + +import ( + "crypto" +) + +func init() { + crypto.RegisterHash(crypto.SHA3_224, New224) + crypto.RegisterHash(crypto.SHA3_256, New256) + crypto.RegisterHash(crypto.SHA3_384, New384) + crypto.RegisterHash(crypto.SHA3_512, New512) +} diff --git a/crypto/sha3/sha3.go b/crypto/sha3/sha3.go new file mode 100644 index 00000000..cd17a5ab --- /dev/null +++ b/crypto/sha3/sha3.go @@ -0,0 +1,192 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package sha3 + +// spongeDirection indicates the direction bytes are flowing through the sponge. +type spongeDirection int + +const ( + // spongeAbsorbing indicates that the sponge is absorbing input. + spongeAbsorbing spongeDirection = iota + // spongeSqueezing indicates that the sponge is being squeezed. + spongeSqueezing +) + +const ( + // maxRate is the maximum size of the internal buffer. SHAKE-256 + // currently needs the largest buffer. + maxRate = 168 +) + +type state struct { + // Generic sponge components. + a [25]uint64 // main state of the hash + buf []byte // points into storage + rate int // the number of bytes of state to use + + // dsbyte contains the "domain separation" bits and the first bit of + // the padding. Sections 6.1 and 6.2 of [1] separate the outputs of the + // SHA-3 and SHAKE functions by appending bitstrings to the message. + // Using a little-endian bit-ordering convention, these are "01" for SHA-3 + // and "1111" for SHAKE, or 00000010b and 00001111b, respectively. Then the + // padding rule from section 5.1 is applied to pad the message to a multiple + // of the rate, which involves adding a "1" bit, zero or more "0" bits, and + // a final "1" bit. We merge the first "1" bit from the padding into dsbyte, + // giving 00000110b (0x06) and 00011111b (0x1f). + // [1] http://csrc.nist.gov/publications/drafts/fips-202/fips_202_draft.pdf + // "Draft FIPS 202: SHA-3 Standard: Permutation-Based Hash and + // Extendable-Output Functions (May 2014)" + dsbyte byte + storage [maxRate]byte + + // Specific to SHA-3 and SHAKE. + outputLen int // the default output size in bytes + state spongeDirection // whether the sponge is absorbing or squeezing +} + +// BlockSize returns the rate of sponge underlying this hash function. +func (d *state) BlockSize() int { return d.rate } + +// Size returns the output size of the hash function in bytes. +func (d *state) Size() int { return d.outputLen } + +// Reset clears the internal state by zeroing the sponge state and +// the byte buffer, and setting Sponge.state to absorbing. +func (d *state) Reset() { + // Zero the permutation's state. + for i := range d.a { + d.a[i] = 0 + } + d.state = spongeAbsorbing + d.buf = d.storage[:0] +} + +func (d *state) clone() *state { + ret := *d + if ret.state == spongeAbsorbing { + ret.buf = ret.storage[:len(ret.buf)] + } else { + ret.buf = ret.storage[d.rate-cap(d.buf) : d.rate] + } + + return &ret +} + +// permute applies the KeccakF-1600 permutation. It handles +// any input-output buffering. +func (d *state) permute() { + switch d.state { + case spongeAbsorbing: + // If we're absorbing, we need to xor the input into the state + // before applying the permutation. + xorIn(d, d.buf) + d.buf = d.storage[:0] + keccakF1600(&d.a) + case spongeSqueezing: + // If we're squeezing, we need to apply the permutatin before + // copying more output. + keccakF1600(&d.a) + d.buf = d.storage[:d.rate] + copyOut(d, d.buf) + } +} + +// pads appends the domain separation bits in dsbyte, applies +// the multi-bitrate 10..1 padding rule, and permutes the state. +func (d *state) padAndPermute(dsbyte byte) { + if d.buf == nil { + d.buf = d.storage[:0] + } + // Pad with this instance's domain-separator bits. We know that there's + // at least one byte of space in d.buf because, if it were full, + // permute would have been called to empty it. dsbyte also contains the + // first one bit for the padding. See the comment in the state struct. + d.buf = append(d.buf, dsbyte) + zerosStart := len(d.buf) + d.buf = d.storage[:d.rate] + for i := zerosStart; i < d.rate; i++ { + d.buf[i] = 0 + } + // This adds the final one bit for the padding. Because of the way that + // bits are numbered from the LSB upwards, the final bit is the MSB of + // the last byte. + d.buf[d.rate-1] ^= 0x80 + // Apply the permutation + d.permute() + d.state = spongeSqueezing + d.buf = d.storage[:d.rate] + copyOut(d, d.buf) +} + +// Write absorbs more data into the hash's state. It produces an error +// if more data is written to the ShakeHash after writing +func (d *state) Write(p []byte) (written int, err error) { + if d.state != spongeAbsorbing { + panic("sha3: write to sponge after read") + } + if d.buf == nil { + d.buf = d.storage[:0] + } + written = len(p) + + for len(p) > 0 { + if len(d.buf) == 0 && len(p) >= d.rate { + // The fast path; absorb a full "rate" bytes of input and apply the permutation. + xorIn(d, p[:d.rate]) + p = p[d.rate:] + keccakF1600(&d.a) + } else { + // The slow path; buffer the input until we can fill the sponge, and then xor it in. + todo := d.rate - len(d.buf) + if todo > len(p) { + todo = len(p) + } + d.buf = append(d.buf, p[:todo]...) + p = p[todo:] + + // If the sponge is full, apply the permutation. + if len(d.buf) == d.rate { + d.permute() + } + } + } + + return +} + +// Read squeezes an arbitrary number of bytes from the sponge. +func (d *state) Read(out []byte) (n int, err error) { + // If we're still absorbing, pad and apply the permutation. + if d.state == spongeAbsorbing { + d.padAndPermute(d.dsbyte) + } + + n = len(out) + + // Now, do the squeezing. + for len(out) > 0 { + n := copy(out, d.buf) + d.buf = d.buf[n:] + out = out[n:] + + // Apply the permutation if we've squeezed the sponge dry. + if len(d.buf) == 0 { + d.permute() + } + } + + return +} + +// Sum applies padding to the hash state and then squeezes out the desired +// number of output bytes. +func (d *state) Sum(in []byte) []byte { + // Make a copy of the original hash so that caller can keep writing + // and summing. + dup := d.clone() + hash := make([]byte, dup.outputLen) + _, _ = dup.Read(hash) + return append(in, hash...) +} diff --git a/crypto/sha3/sha3_test.go b/crypto/sha3/sha3_test.go new file mode 100644 index 00000000..cebaeaac --- /dev/null +++ b/crypto/sha3/sha3_test.go @@ -0,0 +1,297 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package sha3 + +// Tests include all the ShortMsgKATs provided by the Keccak team at +// https://github.com/gvanas/KeccakCodePackage +// +// They only include the zero-bit case of the bitwise testvectors +// published by NIST in the draft of FIPS-202. + +import ( + "bytes" + "compress/flate" + "encoding/hex" + "encoding/json" + "hash" + "os" + "strings" + "testing" +) + +const ( + testString = "brekeccakkeccak koax koax" + katFilename = "testdata/keccakKats.json.deflate" +) + +// Internal-use instances of SHAKE used to test against KATs. +func newHashShake128() hash.Hash { + return &state{rate: 168, dsbyte: 0x1f, outputLen: 512} +} +func newHashShake256() hash.Hash { + return &state{rate: 136, dsbyte: 0x1f, outputLen: 512} +} + +// testDigests contains functions returning hash.Hash instances +// with output-length equal to the KAT length for both SHA-3 and +// SHAKE instances. +var testDigests = map[string]func() hash.Hash{ + "SHA3-224": New224, + "SHA3-256": New256, + "SHA3-384": New384, + "SHA3-512": New512, + "SHAKE128": newHashShake128, + "SHAKE256": newHashShake256, +} + +// testShakes contains functions that return ShakeHash instances for +// testing the ShakeHash-specific interface. +var testShakes = map[string]func() ShakeHash{ + "SHAKE128": NewShake128, + "SHAKE256": NewShake256, +} + +// structs used to marshal JSON test-cases. +type KeccakKats struct { + Kats map[string][]struct { + Digest string `json:"digest"` + Length int64 `json:"length"` + Message string `json:"message"` + } +} + +func testUnalignedAndGeneric(t *testing.T, testf func(impl string)) { + xorInOrig, copyOutOrig := xorIn, copyOut + xorIn, copyOut = xorInGeneric, copyOutGeneric + testf("generic") + if xorImplementationUnaligned != "generic" { + xorIn, copyOut = xorInUnaligned, copyOutUnaligned + testf("unaligned") + } + xorIn, copyOut = xorInOrig, copyOutOrig +} + +// TestKeccakKats tests the SHA-3 and Shake implementations against all the +// ShortMsgKATs from https://github.com/gvanas/KeccakCodePackage +// (The testvectors are stored in keccakKats.json.deflate due to their length.) +func TestKeccakKats(t *testing.T) { + testUnalignedAndGeneric(t, func(impl string) { + // Read the KATs. + deflated, err := os.Open(katFilename) + if err != nil { + t.Errorf("error opening %s: %s", katFilename, err) + } + file := flate.NewReader(deflated) + dec := json.NewDecoder(file) + var katSet KeccakKats + err = dec.Decode(&katSet) + if err != nil { + t.Errorf("error decoding KATs: %s", err) + } + + // Do the KATs. + for functionName, kats := range katSet.Kats { + d := testDigests[functionName]() + for _, kat := range kats { + d.Reset() + in, err := hex.DecodeString(kat.Message) + if err != nil { + t.Errorf("error decoding KAT: %s", err) + } + d.Write(in[:kat.Length/8]) + got := strings.ToUpper(hex.EncodeToString(d.Sum(nil))) + if got != kat.Digest { + t.Errorf("function=%s, implementation=%s, length=%d\nmessage:\n %s\ngot:\n %s\nwanted:\n %s", + functionName, impl, kat.Length, kat.Message, got, kat.Digest) + t.Logf("wanted %+v", kat) + t.FailNow() + } + continue + } + } + }) +} + +// TestUnalignedWrite tests that writing data in an arbitrary pattern with +// small input buffers. +func TestUnalignedWrite(t *testing.T) { + testUnalignedAndGeneric(t, func(impl string) { + buf := sequentialBytes(0x10000) + for alg, df := range testDigests { + d := df() + d.Reset() + d.Write(buf) + want := d.Sum(nil) + d.Reset() + for i := 0; i < len(buf); { + // Cycle through offsets which make a 137 byte sequence. + // Because 137 is prime this sequence should exercise all corner cases. + offsets := [17]int{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 1} + for _, j := range offsets { + if v := len(buf) - i; v < j { + j = v + } + d.Write(buf[i : i+j]) + i += j + } + } + got := d.Sum(nil) + if !bytes.Equal(got, want) { + t.Errorf("Unaligned writes, implementation=%s, alg=%s\ngot %q, want %q", impl, alg, got, want) + } + } + }) +} + +// TestAppend checks that appending works when reallocation is necessary. +func TestAppend(t *testing.T) { + testUnalignedAndGeneric(t, func(impl string) { + d := New224() + + for capacity := 2; capacity <= 66; capacity += 64 { + // The first time around the loop, Sum will have to reallocate. + // The second time, it will not. + buf := make([]byte, 2, capacity) + d.Reset() + d.Write([]byte{0xcc}) + buf = d.Sum(buf) + expected := "0000DF70ADC49B2E76EEE3A6931B93FA41841C3AF2CDF5B32A18B5478C39" + if got := strings.ToUpper(hex.EncodeToString(buf)); got != expected { + t.Errorf("got %s, want %s", got, expected) + } + } + }) +} + +// TestAppendNoRealloc tests that appending works when no reallocation is necessary. +func TestAppendNoRealloc(t *testing.T) { + testUnalignedAndGeneric(t, func(impl string) { + buf := make([]byte, 1, 200) + d := New224() + d.Write([]byte{0xcc}) + buf = d.Sum(buf) + expected := "00DF70ADC49B2E76EEE3A6931B93FA41841C3AF2CDF5B32A18B5478C39" + if got := strings.ToUpper(hex.EncodeToString(buf)); got != expected { + t.Errorf("%s: got %s, want %s", impl, got, expected) + } + }) +} + +// TestSqueezing checks that squeezing the full output a single time produces +// the same output as repeatedly squeezing the instance. +func TestSqueezing(t *testing.T) { + testUnalignedAndGeneric(t, func(impl string) { + for functionName, newShakeHash := range testShakes { + d0 := newShakeHash() + _, _ = d0.Write([]byte(testString)) + ref := make([]byte, 32) + _, _ = d0.Read(ref) + + d1 := newShakeHash() + _, _ = d1.Write([]byte(testString)) + var multiple []byte + for range ref { + one := make([]byte, 1) + _, _ = d1.Read(one) + multiple = append(multiple, one...) + } + if !bytes.Equal(ref, multiple) { + t.Errorf("%s (%s): squeezing %d bytes one at a time failed", functionName, impl, len(ref)) + } + } + }) +} + +// sequentialBytes produces a buffer of size consecutive bytes 0x00, 0x01, ..., used for testing. +func sequentialBytes(size int) []byte { + result := make([]byte, size) + for i := range result { + result[i] = byte(i) + } + return result +} + +// BenchmarkPermutationFunction measures the speed of the permutation function +// with no input data. +func BenchmarkPermutationFunction(b *testing.B) { + b.SetBytes(int64(200)) + var lanes [25]uint64 + for i := 0; i < b.N; i++ { + keccakF1600(&lanes) + } +} + +// benchmarkHash tests the speed to hash num buffers of buflen each. +func benchmarkHash(b *testing.B, h hash.Hash, size, num int) { + b.StopTimer() + h.Reset() + data := sequentialBytes(size) + b.SetBytes(int64(size * num)) + b.StartTimer() + + var state []byte + for i := 0; i < b.N; i++ { + for j := 0; j < num; j++ { + h.Write(data) + } + state = h.Sum(state[:0]) + } + b.StopTimer() + h.Reset() +} + +// benchmarkShake is specialized to the Shake instances, which don't +// require a copy on reading output. +func benchmarkShake(b *testing.B, h ShakeHash, size, num int) { + b.StopTimer() + h.Reset() + data := sequentialBytes(size) + d := make([]byte, 32) + + b.SetBytes(int64(size * num)) + b.StartTimer() + + for i := 0; i < b.N; i++ { + h.Reset() + for j := 0; j < num; j++ { + _, _ = h.Write(data) + } + _, _ = h.Read(d) + } +} + +func BenchmarkSha3_512_MTU(b *testing.B) { benchmarkHash(b, New512(), 1350, 1) } +func BenchmarkSha3_384_MTU(b *testing.B) { benchmarkHash(b, New384(), 1350, 1) } +func BenchmarkSha3_256_MTU(b *testing.B) { benchmarkHash(b, New256(), 1350, 1) } +func BenchmarkSha3_224_MTU(b *testing.B) { benchmarkHash(b, New224(), 1350, 1) } + +func BenchmarkShake128_MTU(b *testing.B) { benchmarkShake(b, NewShake128(), 1350, 1) } +func BenchmarkShake256_MTU(b *testing.B) { benchmarkShake(b, NewShake256(), 1350, 1) } +func BenchmarkShake256_16x(b *testing.B) { benchmarkShake(b, NewShake256(), 16, 1024) } +func BenchmarkShake256_1MiB(b *testing.B) { benchmarkShake(b, NewShake256(), 1024, 1024) } + +func BenchmarkSha3_512_1MiB(b *testing.B) { benchmarkHash(b, New512(), 1024, 1024) } + +func Example_sum() { + buf := []byte("some data to hash") + // A hash needs to be 64 bytes long to have 256-bit collision resistance. + h := make([]byte, 64) + // Compute a 64-byte hash of buf and put it in h. + ShakeSum256(h, buf) +} + +func Example_mac() { + k := []byte("this is a secret key; you should generate a strong random key that's at least 32 bytes long") + buf := []byte("and this is some data to authenticate") + // A MAC with 32 bytes of output has 256-bit security strength -- if you use at least a 32-byte-long key. + h := make([]byte, 32) + d := NewShake256() + // Write the key into the hash. + _, _ = d.Write(k) + // Now write the data. + _, _ = d.Write(buf) + // Read 32 bytes of output from the hash into h. + _, _ = d.Read(h) +} diff --git a/crypto/sha3/shake.go b/crypto/sha3/shake.go new file mode 100644 index 00000000..742b59b6 --- /dev/null +++ b/crypto/sha3/shake.go @@ -0,0 +1,60 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package sha3 + +// This file defines the ShakeHash interface, and provides +// functions for creating SHAKE instances, as well as utility +// functions for hashing bytes to arbitrary-length output. + +import ( + "io" +) + +// ShakeHash defines the interface to hash functions that +// support arbitrary-length output. +type ShakeHash interface { + // Write absorbs more data into the hash's state. It panics if input is + // written to it after output has been read from it. + io.Writer + + // Read reads more output from the hash; reading affects the hash's + // state. (ShakeHash.Read is thus very different from Hash.Sum) + // It never returns an error. + io.Reader + + // Clone returns a copy of the ShakeHash in its current state. + Clone() ShakeHash + + // Reset resets the ShakeHash to its initial state. + Reset() +} + +func (d *state) Clone() ShakeHash { + return d.clone() +} + +// NewShake128 creates a new SHAKE128 variable-output-length ShakeHash. +// Its generic security strength is 128 bits against all attacks if at +// least 32 bytes of its output are used. +func NewShake128() ShakeHash { return &state{rate: 168, dsbyte: 0x1f} } + +// NewShake256 creates a new SHAKE128 variable-output-length ShakeHash. +// Its generic security strength is 256 bits against all attacks if +// at least 64 bytes of its output are used. +func NewShake256() ShakeHash { return &state{rate: 136, dsbyte: 0x1f} } + +// ShakeSum128 writes an arbitrary-length digest of data into hash. +func ShakeSum128(hash, data []byte) { + h := NewShake128() + _, _ = h.Write(data) + _, _ = h.Read(hash) +} + +// ShakeSum256 writes an arbitrary-length digest of data into hash. +func ShakeSum256(hash, data []byte) { + h := NewShake256() + _, _ = h.Write(data) + _, _ = h.Read(hash) +} diff --git a/crypto/sha3/testdata/keccakKats.json.deflate b/crypto/sha3/testdata/keccakKats.json.deflate new file mode 100644 index 0000000000000000000000000000000000000000..62e85ae24236b46c09e5cfa84c71c69f5cc33cf6 GIT binary patch literal 521342 zcmV(wKzy6Q^@gM*Azx~Vq{J;Fmzx?Ch{x$i(5WRo?```ch?|=FG z>3{z3AOH9N=YRii|M5Tm`SX8hy#;>6sy0=|rHk_99c*FNJPEr@%PjJ-+%s}pIW)HOadPLF*FZ1|m#XVEZQL^J z8}q2xyRg#2Gfi@x>sGO%u(G>lHS%u@0*@p+eRb&B7)x6 zN8q{HPb`wT#pgU7NDnR~FjQ-F0CtB9*D1syD{4u-^FG;N`lJK5Z?1ph0V@v4gb@;o z8qApUxUUa^^qr%q02@32@&v6X{_!F2Q<;Q^{IbPjE;~`mCci#u zMXxC(#SH=&=YW#-X->!mi}R8_Q3iQ1K4E9TUk>*v<=wGIL}ZFwdcyrvM>yu(Y|WHZ zh9&T-GeNEaN;wWM*Vf0EkE>rCJpB5oPf>5~j`ZA($87HtIsElm^4j**aT_lNKcehlYQBnAr;U<|JieS6xWwAc)abQG0+dqn7?Fg;B-D9(fn6uhft?JZ|+3lz< zvO8!_!SD0?{8Mw33Z6ySJ>&VFSc>heIicxKlXZB~XFkL}qG5E{F7WVGKX}(VU5Mv@ zf*j!2ik}Gb=c{m94B7{eXL^vfPbf47&cSx)rv~rFAG8SM5QpKG^m^pdjS^ATl^tZ> z*cJeYq1M+ozR&kzqR!JLqWGYNNFG<|280)367J7eOtW3GiA9n$nOnp!eL@#bj1V8G zswVB47O_h!eSM|SXW-R+d;0`fR`D|Lkz2j-!9(f{TlpEo#3NYQAbALYqo2mSm)NAM z^2X9WMN=(C+8ugN5_Od;TMPU?4 zFX89gLU+|B>{>nwWPJ@*tYDs62jwJQu#F;1ONDvFU*8+_`Muj!Kqhham`AS*G?d#O zDE2s)6yK#Da{u&IVg()08$Y)u0?8`5f!EAi$siCRLI9$gaAs65zGg0f&o9oK4thL1 zFCkR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6R5N zHE-F13))+H?qCgX0P(Jl$Xv*LET*68X-chD!E(mi-mTpFzZd!U|KI=o^Y8aRCpfy) literal 0 HcmV?d00001 diff --git a/crypto/sha3/xor.go b/crypto/sha3/xor.go new file mode 100644 index 00000000..1d88b110 --- /dev/null +++ b/crypto/sha3/xor.go @@ -0,0 +1,17 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build (!amd64 && !386 && !ppc64le) || appengine +// +build !amd64,!386,!ppc64le appengine + +package sha3 + +var ( + xorIn = xorInGeneric + copyOut = copyOutGeneric + xorInUnaligned = xorInGeneric + copyOutUnaligned = copyOutGeneric +) + +const xorImplementationUnaligned = "generic" diff --git a/crypto/sha3/xor_generic.go b/crypto/sha3/xor_generic.go new file mode 100644 index 00000000..fd35f02e --- /dev/null +++ b/crypto/sha3/xor_generic.go @@ -0,0 +1,28 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package sha3 + +import "encoding/binary" + +// xorInGeneric xors the bytes in buf into the state; it +// makes no non-portable assumptions about memory layout +// or alignment. +func xorInGeneric(d *state, buf []byte) { + n := len(buf) / 8 + + for i := 0; i < n; i++ { + a := binary.LittleEndian.Uint64(buf) + d.a[i] ^= a + buf = buf[8:] + } +} + +// copyOutGeneric copies ulint64s to a byte buffer. +func copyOutGeneric(d *state, b []byte) { + for i := 0; len(b) >= 8; i++ { + binary.LittleEndian.PutUint64(b, d.a[i]) + b = b[8:] + } +} diff --git a/crypto/sha3/xor_unaligned.go b/crypto/sha3/xor_unaligned.go new file mode 100644 index 00000000..47a04fba --- /dev/null +++ b/crypto/sha3/xor_unaligned.go @@ -0,0 +1,59 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build (amd64 || 386 || ppc64le) && !appengine +// +build amd64 386 ppc64le +// +build !appengine + +package sha3 + +import "unsafe" + +func xorInUnaligned(d *state, buf []byte) { + bw := (*[maxRate / 8]uint64)(unsafe.Pointer(&buf[0])) + n := len(buf) + if n >= 72 { + d.a[0] ^= bw[0] + d.a[1] ^= bw[1] + d.a[2] ^= bw[2] + d.a[3] ^= bw[3] + d.a[4] ^= bw[4] + d.a[5] ^= bw[5] + d.a[6] ^= bw[6] + d.a[7] ^= bw[7] + d.a[8] ^= bw[8] + } + if n >= 104 { + d.a[9] ^= bw[9] + d.a[10] ^= bw[10] + d.a[11] ^= bw[11] + d.a[12] ^= bw[12] + } + if n >= 136 { + d.a[13] ^= bw[13] + d.a[14] ^= bw[14] + d.a[15] ^= bw[15] + d.a[16] ^= bw[16] + } + if n >= 144 { + d.a[17] ^= bw[17] + } + if n >= 168 { + d.a[18] ^= bw[18] + d.a[19] ^= bw[19] + d.a[20] ^= bw[20] + } +} + +func copyOutUnaligned(d *state, buf []byte) { + ab := (*[maxRate]uint8)(unsafe.Pointer(&d.a[0])) + copy(buf, ab[:]) +} + +var ( + xorIn = xorInUnaligned + copyOut = copyOutUnaligned +) + +const xorImplementationUnaligned = "unaligned" diff --git a/x/pot/keeper/msg_server.go b/x/pot/keeper/msg_server.go index 64ec7793..450b64e0 100644 --- a/x/pot/keeper/msg_server.go +++ b/x/pot/keeper/msg_server.go @@ -1,6 +1,7 @@ package keeper import ( + "bytes" "context" "encoding/hex" "fmt" @@ -13,6 +14,7 @@ import ( "github.com/cosmos/cosmos-sdk/types/bech32" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/stratosnet/stratos-chain/crypto" "github.com/stratosnet/stratos-chain/crypto/bls" stratos "github.com/stratosnet/stratos-chain/types" "github.com/stratosnet/stratos-chain/x/pot/types" @@ -70,6 +72,12 @@ func (k msgServer) HandleMsgVolumeReport(goCtx context.Context, msg *types.MsgVo return &types.MsgVolumeReportResponse{}, types.ErrBLSNotReachThreshold } + signBytes := msg.GetSignBytes() + txDataHash := crypto.Keccak256(signBytes) + if !bytes.Equal(txDataHash, blsSignature.GetTxData()) { + return &types.MsgVolumeReportResponse{}, types.ErrBLSTxDataInvalid + } + txBytes := ctx.TxBytes() txhash := fmt.Sprintf("%X", tmhash.Sum(txBytes)) From cf99db83a711b9f7bdc488556cce12cd51f2bb0a Mon Sep 17 00:00:00 2001 From: jialbai Date: Wed, 5 Apr 2023 21:42:57 +0800 Subject: [PATCH 51/95] - qb1752: fix deletion in iteration while DequeueAllMatureUBDQueue - qb1747: fix validation of msg update effective stake - qb1746: fix extreme case which will make remainingOzoneLimit fall to a negative value - qb1762: fix unnecessary format convertion of sdk.int --- x/pot/keeper/distribute.go | 7 ++----- x/register/keeper/keeper.go | 11 ++++++++++- x/register/keeper/resource_node.go | 2 +- x/register/keeper/store.go | 6 ++++++ x/register/types/msg.go | 9 +++++++++ x/sds/keeper/keeper.go | 4 ++++ 6 files changed, 32 insertions(+), 7 deletions(-) diff --git a/x/pot/keeper/distribute.go b/x/pot/keeper/distribute.go index f51470f1..513e360b 100644 --- a/x/pot/keeper/distribute.go +++ b/x/pot/keeper/distribute.go @@ -412,11 +412,8 @@ func (k Keeper) CalcRewardForMetaNode(ctx sdk.Context, distributeGoalBalance typ func (k Keeper) GetTotalConsumedNoz(trafficList []*types.SingleWalletVolume) sdk.Int { totalTraffic := sdk.ZeroInt() for _, vol := range trafficList { - toAdd, ok := sdk.NewIntFromString(vol.Volume.String()) - if !ok { - continue - } - totalTraffic = totalTraffic.Add(toAdd) + toAdd := vol.Volume + totalTraffic = totalTraffic.Add(*toAdd) } return totalTraffic } diff --git a/x/register/keeper/keeper.go b/x/register/keeper/keeper.go index 97d609cb..9104beb0 100644 --- a/x/register/keeper/keeper.go +++ b/x/register/keeper/keeper.go @@ -189,6 +189,7 @@ func (k Keeper) InsertUnbondingNodeQueue(ctx sdk.Context, ubd types.UnbondingNod // Iteration for dequeuing all mature unbonding queue // TODO: Unused parameter: currTime func (k Keeper) DequeueAllMatureUBDQueue(ctx sdk.Context, currTime time.Time) (matureUnbonds []string) { + keysToDelete := make([][]byte, 0) store := ctx.KVStore(k.storeKey) // gets an iterator for all timeslices from time 0 until the current Blockheader time unbondingTimesliceIterator := k.UnbondingNodeQueueIterator(ctx, ctx.BlockHeader().Time) @@ -200,7 +201,11 @@ func (k Keeper) DequeueAllMatureUBDQueue(ctx sdk.Context, currTime time.Time) (m k.cdc.MustUnmarshalLengthPrefixed(value, &timeSliceVal) timeSlice := timeSliceVal.GetAddresses() matureUnbonds = append(matureUnbonds, timeSlice...) - store.Delete(unbondingTimesliceIterator.Key()) + keysToDelete = append(keysToDelete, unbondingTimesliceIterator.Key()) + } + // safe removal + for _, key := range keysToDelete { + store.Delete(key) } ctx.Logger().Debug(fmt.Sprintf("DequeueAllMatureUBDQueue, %d matured unbonding nodes detected", len(matureUnbonds))) return matureUnbonds @@ -386,6 +391,10 @@ func (k Keeper) UnbondMetaNode(ctx sdk.Context, metaNode types.MetaNode, amt sdk bondDenom := k.GetParams(ctx).BondDenom coin := sdk.NewCoin(bondDenom, amt) if metaNode.GetStatus() == stakingtypes.Bonded { + // to prevent remainingOzoneLimit from being negative value + if !k.IsUnbondable(ctx, amt) { + return sdk.ZeroInt(), time.Time{}, types.ErrInsufficientBalance + } // transfer the node tokens to the not bonded pool k.bondedToUnbonding(ctx, metaNode, true, coin) // adjust ozone limit diff --git a/x/register/keeper/resource_node.go b/x/register/keeper/resource_node.go index dcee57da..99c88594 100644 --- a/x/register/keeper/resource_node.go +++ b/x/register/keeper/resource_node.go @@ -376,7 +376,7 @@ func (k Keeper) UpdateEffectiveStake(ctx sdk.Context, networkAddr stratos.SdsAdd node.Suspend = false k.SetResourceNode(ctx, node) - if effectiveStakeChange.IsNegative() { + if effectiveStakeChange.IsNegative() && k.IsUnbondable(ctx, effectiveStakeChange.Abs()) { ozoneLimitChange = k.DecreaseOzoneLimitBySubtractStake(ctx, effectiveStakeChange.Abs()) } if effectiveStakeChange.IsPositive() { diff --git a/x/register/keeper/store.go b/x/register/keeper/store.go index 2fcd2ad6..6df84fa1 100644 --- a/x/register/keeper/store.go +++ b/x/register/keeper/store.go @@ -45,6 +45,12 @@ func (k Keeper) GetRemainingOzoneLimit(ctx sdk.Context) (value sdk.Int) { return } +func (k Keeper) IsUnbondable(ctx sdk.Context, unbondAmt sdk.Int) bool { + remaining := k.GetRemainingOzoneLimit(ctx) + stakeNozRate := k.GetStakeNozRate(ctx) + return remaining.ToDec().GTE(unbondAmt.ToDec().Quo(stakeNozRate)) +} + // SetUnbondingNode sets the unbonding MetaNode func (k Keeper) SetUnbondingNode(ctx sdk.Context, ubd types.UnbondingNode) { store := ctx.KVStore(k.storeKey) diff --git a/x/register/types/msg.go b/x/register/types/msg.go index 645c4911..b65d9a9d 100644 --- a/x/register/types/msg.go +++ b/x/register/types/msg.go @@ -635,6 +635,12 @@ func (m MsgUpdateEffectiveStake) ValidateBasic() error { if len(m.NetworkAddress) == 0 { return ErrInvalidNetworkAddr } + if len(m.Reporters) == 0 { + return ErrReporterAddress + } + if len(m.ReporterOwner) == 0 || len(m.Reporters) != len(m.ReporterOwner) { + return ErrInvalidOwnerAddr + } for _, r := range m.Reporters { if len(r) == 0 { return ErrReporterAddress @@ -668,5 +674,8 @@ func (m MsgUpdateEffectiveStake) GetSigners() []sdk.AccAddress { } addrs = append(addrs, reporterOwner) } + if len(addrs) == 0 { + panic("no valid signer for MsgUpdateEffectiveStake") + } return addrs } diff --git a/x/sds/keeper/keeper.go b/x/sds/keeper/keeper.go index 0cfa1636..99896fe6 100644 --- a/x/sds/keeper/keeper.go +++ b/x/sds/keeper/keeper.go @@ -1,6 +1,7 @@ package keeper import ( + "errors" "fmt" "github.com/kelindar/bitmap" @@ -98,6 +99,9 @@ func (k Keeper) purchaseNozAndSubCoins(ctx sdk.Context, from sdk.AccAddress, amo Add(amount)).ToDec()). TruncateInt() + if purchased.GT(Lt) { + return sdk.ZeroInt(), errors.New("not enough remaining ozone limit to complete prepay") + } // send coins to total unissued prepay pool prepayAmt := sdk.NewCoin(k.BondDenom(ctx), amount) err := k.bankKeeper.SendCoinsFromAccountToModule(ctx, from, registertypes.TotalUnissuedPrepay, sdk.NewCoins(prepayAmt)) From dcc47c305703a78d5fe62019b05502ca8fc7386c Mon Sep 17 00:00:00 2001 From: Xiong Date: Wed, 5 Apr 2023 10:19:35 -0400 Subject: [PATCH 52/95] Verify txDataHash before blsSignature validation --- x/pot/keeper/msg_server.go | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/x/pot/keeper/msg_server.go b/x/pot/keeper/msg_server.go index 450b64e0..6d394014 100644 --- a/x/pot/keeper/msg_server.go +++ b/x/pot/keeper/msg_server.go @@ -60,6 +60,15 @@ func (k msgServer) HandleMsgVolumeReport(goCtx context.Context, msg *types.MsgVo } blsSignature := msg.GetBLSSignature() + + // verify txDataHash + signBytes := msg.GetSignBytes() + txDataHash := crypto.Keccak256(signBytes) + if !bytes.Equal(txDataHash, blsSignature.GetTxData()) { + return &types.MsgVolumeReportResponse{}, types.ErrBLSTxDataInvalid + } + + // verify blsSignature verified, err := bls.Verify(blsSignature.GetTxData(), blsSignature.GetSignature(), blsSignature.GetPubKeys()...) if err != nil { return &types.MsgVolumeReportResponse{}, sdkerrors.Wrap(types.ErrBLSVerifyFailed, err.Error()) @@ -72,12 +81,6 @@ func (k msgServer) HandleMsgVolumeReport(goCtx context.Context, msg *types.MsgVo return &types.MsgVolumeReportResponse{}, types.ErrBLSNotReachThreshold } - signBytes := msg.GetSignBytes() - txDataHash := crypto.Keccak256(signBytes) - if !bytes.Equal(txDataHash, blsSignature.GetTxData()) { - return &types.MsgVolumeReportResponse{}, types.ErrBLSTxDataInvalid - } - txBytes := ctx.TxBytes() txhash := fmt.Sprintf("%X", tmhash.Sum(txBytes)) From 9f1fbbaa421f7ba503a1affa51d1095a50da3832 Mon Sep 17 00:00:00 2001 From: xiong Date: Wed, 12 Apr 2023 12:38:47 -0700 Subject: [PATCH 53/95] error fix --- x/pot/keeper/distribute.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/pot/keeper/distribute.go b/x/pot/keeper/distribute.go index 806919b8..f6fd7104 100644 --- a/x/pot/keeper/distribute.go +++ b/x/pot/keeper/distribute.go @@ -413,7 +413,7 @@ func (k Keeper) GetTotalConsumedNoz(trafficList []types.SingleWalletVolume) sdk. totalTraffic := sdk.ZeroInt() for _, vol := range trafficList { toAdd := vol.Volume - totalTraffic = totalTraffic.Add(*toAdd) + totalTraffic = totalTraffic.Add(toAdd) } return totalTraffic } From b7c24e19688fbe10582ca644dbdea83cfd694204 Mon Sep 17 00:00:00 2001 From: Xiong Date: Tue, 18 Apr 2023 14:23:19 -0400 Subject: [PATCH 54/95] 1, Add minimum stake limit param to genesis file. 2, Add not null constraint & json tags to proto files. --- app/test_helpers.go | 2 +- proto/stratos/register/v1/genesis.proto | 31 +- proto/stratos/register/v1/query.proto | 8 +- proto/stratos/register/v1/register.proto | 9 + x/pot/keeper/distribute.go | 2 +- x/register/genesis.go | 13 +- x/register/keeper/meta_node.go | 4 +- x/register/keeper/resource_node.go | 4 +- x/register/types/genesis.go | 10 +- x/register/types/genesis.pb.go | 191 ++++++----- x/register/types/meta_node.go | 2 +- x/register/types/params.go | 30 +- x/register/types/querier.go | 16 +- x/register/types/query.pb.go | 364 ++++++++++----------- x/register/types/register.pb.go | 390 +++++++++++++---------- x/register/types/resource_node.go | 2 +- 16 files changed, 559 insertions(+), 519 deletions(-) diff --git a/app/test_helpers.go b/app/test_helpers.go index a65d067a..776890e5 100644 --- a/app/test_helpers.go +++ b/app/test_helpers.go @@ -207,7 +207,7 @@ func SetupWithGenesisNodeSet(t *testing.T, resourceNodes, metaNodes, registertypes.DefaultRemainingNozLimit, - make([]*registertypes.Slashing, 0), + make([]registertypes.Slashing, 0), registertypes.DefaultStakeNozRate, ) genesisState[registertypes.ModuleName] = app.AppCodec().MustMarshalJSON(registerGenesis) diff --git a/proto/stratos/register/v1/genesis.proto b/proto/stratos/register/v1/genesis.proto index ac43efc2..1690ec9c 100644 --- a/proto/stratos/register/v1/genesis.proto +++ b/proto/stratos/register/v1/genesis.proto @@ -12,17 +12,21 @@ option go_package = "github.com/stratosnet/stratos-chain/x/register/types"; // GenesisState defines the register module's genesis state. message GenesisState { Params params = 1 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "params", (gogoproto.moretags) = "yaml:\"params\"" ]; repeated ResourceNode resource_nodes = 2 [ (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "ResourceNodes", - (gogoproto.moretags) = "yaml:\"resource_nodes\"" + (gogoproto.jsontag) = "resource_nodes", + (gogoproto.moretags) = "yaml:\"resource_nodes\"", + (gogoproto.castrepeated) = "ResourceNodes" ]; repeated MetaNode meta_nodes = 3 [ (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "MetaNodes", - (gogoproto.moretags) = "yaml:\"meta_nodes\"" + (gogoproto.jsontag) = "meta_nodes", + (gogoproto.moretags) = "yaml:\"meta_nodes\"", + (gogoproto.castrepeated) = "MetaNodes" ]; string remaining_noz_limit = 4 [ (gogoproto.nullable) = false, @@ -31,37 +35,48 @@ message GenesisState { (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int" ]; // remaining noz limit repeated Slashing slashing = 5 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "slashing", (gogoproto.moretags) = "yaml:\"slashing_info\"" ]; string stake_noz_rate = 6 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "stake_noz_rate", (gogoproto.moretags) = "yaml:\"stake_noz_rate\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec" ]; //fixed rate of stake over noz } message GenesisMetaNode { string network_address = 1 [ + (gogoproto.jsontag) = "network_address", (gogoproto.moretags) = "yaml:\"network_address\"" ]; // network address of the meta node google.protobuf.Any pubkey = 2 [ (cosmos_proto.accepts_interface) = "cosmos.crypto.PubKey", + (gogoproto.jsontag) = "pubkey", (gogoproto.moretags) = "yaml:\"pubkey\"" ]; // the consensus public key of the meta node; bech encoded in JSON bool suspend = 3 [ + (gogoproto.jsontag) = "suspend", (gogoproto.moretags) = "yaml:\"suspend\"" ]; // has the meta node been suspended from bonded status? cosmos.staking.v1beta1.BondStatus status = 4 [ + (gogoproto.jsontag) = "status", (gogoproto.moretags) = "yaml:\"status\"" ]; // meta node status (Unspecified/Bonded/Unbonding/Unbonded) string tokens = 5 [ - (gogoproto.moretags) = "yaml:\"token\"" + (gogoproto.jsontag) = "tokens", + (gogoproto.moretags) = "yaml:\"tokens\"" ]; // delegated tokens string owner_address = 6 [ + (gogoproto.jsontag) = "owner_address", (gogoproto.moretags) = "yaml:\"owner_address\"" ]; // owner address of the meta node Description description = 7 [ - (gogoproto.moretags) = "yaml:\"description\",omitempty" + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "description", + (gogoproto.moretags) = "yaml:\"description\"" ]; // description terms for the meta node } diff --git a/proto/stratos/register/v1/query.proto b/proto/stratos/register/v1/query.proto index 76e1ae0f..c32cfdb8 100644 --- a/proto/stratos/register/v1/query.proto +++ b/proto/stratos/register/v1/query.proto @@ -172,6 +172,7 @@ message StakingInfo { (gogoproto.jsontag) = "status", (gogoproto.moretags) = "yaml:\"status\""]; string tokens = 5 [ + (gogoproto.nullable) = false, (gogoproto.jsontag) = "tokens", (gogoproto.moretags) = "yaml:\"tokens\"", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int" @@ -181,6 +182,7 @@ message StakingInfo { (gogoproto.moretags) = "yaml:\"owner_address\"" ]; Description description = 7 [ + (gogoproto.nullable) = false, (gogoproto.jsontag) = "description", (gogoproto.moretags) = "yaml:\"description\"" ]; @@ -195,17 +197,17 @@ message StakingInfo { (gogoproto.moretags) = "yaml:\"node_type\"" ]; cosmos.base.v1beta1.Coin bonded_stake = 10 [ - (gogoproto.nullable) = true, + (gogoproto.nullable) = false, (gogoproto.jsontag) = "bonded_stake", (gogoproto.moretags) = "yaml:\"bonded_stake\"" ]; cosmos.base.v1beta1.Coin un_bonding_stake = 11 [ - (gogoproto.nullable) = true, + (gogoproto.nullable) = false, (gogoproto.jsontag) = "un_bonding_stake", (gogoproto.moretags) = "yaml:\"un_bonding_stake\"" ]; cosmos.base.v1beta1.Coin un_bonded_stake = 12 [ - (gogoproto.nullable) = true, + (gogoproto.nullable) = false, (gogoproto.jsontag) = "un_bonded_stake", (gogoproto.moretags) = "yaml:\"un_bonded_stake\"" ]; diff --git a/proto/stratos/register/v1/register.proto b/proto/stratos/register/v1/register.proto index 8c892e2e..81b30189 100644 --- a/proto/stratos/register/v1/register.proto +++ b/proto/stratos/register/v1/register.proto @@ -6,6 +6,7 @@ import "google/protobuf/any.proto"; import "google/protobuf/timestamp.proto"; import "google/protobuf/duration.proto"; import "cosmos_proto/cosmos.proto"; +import "cosmos/base/v1beta1/coin.proto"; import "cosmos/staking/v1beta1/staking.proto"; option go_package = "github.com/stratosnet/stratos-chain/x/register/types"; @@ -33,8 +34,14 @@ message Params { (gogoproto.moretags) = "yaml:\"max_entries\",omitempty" ]; bool resource_node_reg_enabled = 5 [ + (gogoproto.jsontag) = "resource_node_reg_enabled", (gogoproto.moretags) = "yaml:\"resource_node_reg_enabled\"" ]; + cosmos.base.v1beta1.Coin resource_node_min_staking = 6 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "resource_node_min_staking", + (gogoproto.moretags) = "yaml:\"resource_node_min_staking\"" + ]; } message ResourceNode { @@ -68,6 +75,7 @@ message ResourceNode { (gogoproto.moretags) = "yaml:\"owner_address\"" ]; Description description = 7 [ + (gogoproto.nullable) = false, (gogoproto.jsontag) = "description", (gogoproto.moretags) = "yaml:\"description\"" ]; @@ -120,6 +128,7 @@ message MetaNode { (gogoproto.moretags) = "yaml:\"owner_address\"" ]; Description description = 7 [ + (gogoproto.nullable) = false, (gogoproto.jsontag) = "description", (gogoproto.moretags) = "yaml:\"description\"" ]; diff --git a/x/pot/keeper/distribute.go b/x/pot/keeper/distribute.go index 806919b8..f6fd7104 100644 --- a/x/pot/keeper/distribute.go +++ b/x/pot/keeper/distribute.go @@ -413,7 +413,7 @@ func (k Keeper) GetTotalConsumedNoz(trafficList []types.SingleWalletVolume) sdk. totalTraffic := sdk.ZeroInt() for _, vol := range trafficList { toAdd := vol.Volume - totalTraffic = totalTraffic.Add(*toAdd) + totalTraffic = totalTraffic.Add(toAdd) } return totalTraffic } diff --git a/x/register/genesis.go b/x/register/genesis.go index 33a7b3dd..16fa6dca 100644 --- a/x/register/genesis.go +++ b/x/register/genesis.go @@ -11,7 +11,7 @@ import ( // InitGenesis initialize default parameters // and the keeper's address to pubkey map func InitGenesis(ctx sdk.Context, keeper keeper.Keeper, data *types.GenesisState) { - keeper.SetParams(ctx, *data.Params) + keeper.SetParams(ctx, data.Params) freshStart := keeper.GetResourceNodeNotBondedToken(ctx).IsZero() && keeper.GetResourceNodeBondedToken(ctx).IsZero() && @@ -134,7 +134,7 @@ func ExportGenesis(ctx sdk.Context, keeper keeper.Keeper) (data *types.GenesisSt remainingNozLimit := keeper.GetRemainingOzoneLimit(ctx) stakeNozRate := keeper.GetStakeNozRate(ctx) - var slashingInfo []*types.Slashing + var slashingInfo []types.Slashing keeper.IteratorSlashingInfo(ctx, func(walletAddress sdk.AccAddress, val sdk.Int) (stop bool) { if val.GT(sdk.ZeroInt()) { slashing := types.NewSlashing(walletAddress, val) @@ -143,12 +143,5 @@ func ExportGenesis(ctx sdk.Context, keeper keeper.Keeper) (data *types.GenesisSt return false }) - return &types.GenesisState{ - Params: ¶ms, - ResourceNodes: resourceNodes, - MetaNodes: metaNodes, - RemainingNozLimit: remainingNozLimit, - Slashing: slashingInfo, - StakeNozRate: stakeNozRate, - } + return types.NewGenesisState(params, resourceNodes, metaNodes, remainingNozLimit, slashingInfo, stakeNozRate) } diff --git a/x/register/keeper/meta_node.go b/x/register/keeper/meta_node.go index ef943709..d894dfce 100644 --- a/x/register/keeper/meta_node.go +++ b/x/register/keeper/meta_node.go @@ -114,7 +114,7 @@ func (k Keeper) RegisterMetaNode(ctx sdk.Context, networkAddr stratos.SdsAddress return ozoneLimitChange, types.ErrBadDenom } - metaNode, err := types.NewMetaNode(networkAddr, pubKey, ownerAddr, &description, ctx.BlockHeader().Time) + metaNode, err := types.NewMetaNode(networkAddr, pubKey, ownerAddr, description, ctx.BlockHeader().Time) if err != nil { return ozoneLimitChange, err } @@ -416,7 +416,7 @@ func (k Keeper) UpdateMetaNode(ctx sdk.Context, description types.Description, return types.ErrInvalidOwnerAddr } - node.Description = &description + node.Description = description k.SetMetaNode(ctx, node) diff --git a/x/register/keeper/resource_node.go b/x/register/keeper/resource_node.go index 94e83f4a..1dcbdd2d 100644 --- a/x/register/keeper/resource_node.go +++ b/x/register/keeper/resource_node.go @@ -289,7 +289,7 @@ func (k Keeper) RegisterResourceNode(ctx sdk.Context, networkAddr stratos.SdsAdd return ozoneLimitChange, types.ErrBadDenom } - resourceNode, err := types.NewResourceNode(networkAddr, pubKey, ownerAddr, &description, nodeType, ctx.BlockHeader().Time) + resourceNode, err := types.NewResourceNode(networkAddr, pubKey, ownerAddr, description, nodeType, ctx.BlockHeader().Time) if err != nil { return ozoneLimitChange, err } @@ -310,7 +310,7 @@ func (k Keeper) UpdateResourceNode(ctx sdk.Context, description types.Descriptio return types.ErrInvalidOwnerAddr } - node.Description = &description + node.Description = description if nodeType != 0 { node.NodeType = uint32(nodeType) } diff --git a/x/register/types/genesis.go b/x/register/types/genesis.go index 53f2565b..a84d037f 100644 --- a/x/register/types/genesis.go +++ b/x/register/types/genesis.go @@ -12,11 +12,11 @@ import ( ) // NewGenesisState creates a new GenesisState object -func NewGenesisState(params *Params, +func NewGenesisState(params Params, resourceNodes ResourceNodes, metaNodes MetaNodes, remainingNozLimit sdk.Int, - slashingInfo []*Slashing, + slashingInfo []Slashing, stakeNozRate sdk.Dec, ) *GenesisState { return &GenesisState{ @@ -36,7 +36,7 @@ func DefaultGenesisState() *GenesisState { ResourceNodes: ResourceNodes{}, MetaNodes: MetaNodes{}, RemainingNozLimit: DefaultRemainingNozLimit, - Slashing: make([]*Slashing, 0), + Slashing: make([]Slashing, 0), StakeNozRate: DefaultStakeNozRate, } } @@ -102,8 +102,8 @@ func (v GenesisMetaNode) ToMetaNode() (MetaNode, error) { }, nil } -func NewSlashing(walletAddress sdk.AccAddress, value sdk.Int) *Slashing { - return &Slashing{ +func NewSlashing(walletAddress sdk.AccAddress, value sdk.Int) Slashing { + return Slashing{ WalletAddress: walletAddress.String(), Value: value.Int64(), } diff --git a/x/register/types/genesis.pb.go b/x/register/types/genesis.pb.go index d5e45c6f..04fc73f6 100644 --- a/x/register/types/genesis.pb.go +++ b/x/register/types/genesis.pb.go @@ -29,11 +29,11 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // GenesisState defines the register module's genesis state. type GenesisState struct { - Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty" yaml:"params"` + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params" yaml:"params"` ResourceNodes ResourceNodes `protobuf:"bytes,2,rep,name=resource_nodes,json=resourceNodes,proto3,castrepeated=ResourceNodes" json:"resource_nodes" yaml:"resource_nodes"` MetaNodes MetaNodes `protobuf:"bytes,3,rep,name=meta_nodes,json=metaNodes,proto3,castrepeated=MetaNodes" json:"meta_nodes" yaml:"meta_nodes"` RemainingNozLimit github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,4,opt,name=remaining_noz_limit,json=remainingNozLimit,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"remaining_noz_limit" yaml:"remaining_noz_limit"` - Slashing []*Slashing `protobuf:"bytes,5,rep,name=slashing,proto3" json:"slashing,omitempty" yaml:"slashing_info"` + Slashing []Slashing `protobuf:"bytes,5,rep,name=slashing,proto3" json:"slashing" yaml:"slashing_info"` StakeNozRate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,6,opt,name=stake_noz_rate,json=stakeNozRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"stake_noz_rate" yaml:"stake_noz_rate"` } @@ -70,11 +70,11 @@ func (m *GenesisState) XXX_DiscardUnknown() { var xxx_messageInfo_GenesisState proto.InternalMessageInfo -func (m *GenesisState) GetParams() *Params { +func (m *GenesisState) GetParams() Params { if m != nil { return m.Params } - return nil + return Params{} } func (m *GenesisState) GetResourceNodes() ResourceNodes { @@ -91,7 +91,7 @@ func (m *GenesisState) GetMetaNodes() MetaNodes { return nil } -func (m *GenesisState) GetSlashing() []*Slashing { +func (m *GenesisState) GetSlashing() []Slashing { if m != nil { return m.Slashing } @@ -99,13 +99,13 @@ func (m *GenesisState) GetSlashing() []*Slashing { } type GenesisMetaNode struct { - NetworkAddress string `protobuf:"bytes,1,opt,name=network_address,json=networkAddress,proto3" json:"network_address,omitempty" yaml:"network_address"` - Pubkey *types.Any `protobuf:"bytes,2,opt,name=pubkey,proto3" json:"pubkey,omitempty" yaml:"pubkey"` - Suspend bool `protobuf:"varint,3,opt,name=suspend,proto3" json:"suspend,omitempty" yaml:"suspend"` - Status types1.BondStatus `protobuf:"varint,4,opt,name=status,proto3,enum=cosmos.staking.v1beta1.BondStatus" json:"status,omitempty" yaml:"status"` - Tokens string `protobuf:"bytes,5,opt,name=tokens,proto3" json:"tokens,omitempty" yaml:"token"` - OwnerAddress string `protobuf:"bytes,6,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty" yaml:"owner_address"` - Description *Description `protobuf:"bytes,7,opt,name=description,proto3" json:"description,omitempty" yaml:"description",omitempty` + NetworkAddress string `protobuf:"bytes,1,opt,name=network_address,json=networkAddress,proto3" json:"network_address" yaml:"network_address"` + Pubkey *types.Any `protobuf:"bytes,2,opt,name=pubkey,proto3" json:"pubkey" yaml:"pubkey"` + Suspend bool `protobuf:"varint,3,opt,name=suspend,proto3" json:"suspend" yaml:"suspend"` + Status types1.BondStatus `protobuf:"varint,4,opt,name=status,proto3,enum=cosmos.staking.v1beta1.BondStatus" json:"status" yaml:"status"` + Tokens string `protobuf:"bytes,5,opt,name=tokens,proto3" json:"tokens" yaml:"tokens"` + OwnerAddress string `protobuf:"bytes,6,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address" yaml:"owner_address"` + Description Description `protobuf:"bytes,7,opt,name=description,proto3" json:"description" yaml:"description"` } func (m *GenesisMetaNode) Reset() { *m = GenesisMetaNode{} } @@ -183,11 +183,11 @@ func (m *GenesisMetaNode) GetOwnerAddress() string { return "" } -func (m *GenesisMetaNode) GetDescription() *Description { +func (m *GenesisMetaNode) GetDescription() Description { if m != nil { return m.Description } - return nil + return Description{} } type Slashing struct { @@ -251,58 +251,61 @@ func init() { func init() { proto.RegisterFile("stratos/register/v1/genesis.proto", fileDescriptor_5bdab54ebea9e48e) } var fileDescriptor_5bdab54ebea9e48e = []byte{ - // 806 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0x41, 0x8f, 0xdb, 0x44, - 0x14, 0x5e, 0x37, 0x6c, 0xba, 0x3b, 0x9b, 0xa4, 0xac, 0x1b, 0x90, 0x37, 0x40, 0x9c, 0x8e, 0x50, - 0x15, 0x44, 0xd7, 0x56, 0x16, 0x4e, 0x48, 0x1c, 0x6a, 0x2a, 0x2a, 0x04, 0x8d, 0xaa, 0xc9, 0x01, - 0x89, 0x4b, 0x34, 0xb1, 0xa7, 0x5e, 0x2b, 0xf1, 0x8c, 0xe5, 0x19, 0x67, 0xeb, 0xfd, 0x13, 0x54, - 0xe2, 0x5f, 0x70, 0xe6, 0x47, 0x54, 0x9c, 0xf6, 0x88, 0x38, 0x18, 0xb4, 0x7b, 0xdb, 0xa3, 0xaf, - 0x5c, 0x50, 0x66, 0xc6, 0x89, 0xb3, 0x44, 0x48, 0x3d, 0x65, 0xde, 0xf7, 0xbe, 0xf9, 0x9e, 0xdf, - 0x9b, 0xef, 0x05, 0x3c, 0x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, 0x1a, 0x5f, 0x00, 0x8e, 0x02, 0xc2, 0xfd, 0x34, 0x4a, 0x44, - 0xc4, 0xa8, 0x75, 0x5f, 0xce, 0x70, 0xb0, 0xd3, 0x5e, 0xcf, 0x36, 0x3c, 0x6f, 0x50, 0x16, 0xf6, - 0xc7, 0x4a, 0xbe, 0x76, 0x1d, 0x3e, 0x61, 0x71, 0x24, 0x48, 0x9c, 0x88, 0x1c, 0xd5, 0x65, 0xe1, - 0xcf, 0x06, 0x38, 0xa8, 0xdc, 0x69, 0x22, 0xd0, 0xb9, 0xc0, 0x8b, 0x05, 0x11, 0x77, 0x5e, 0xfd, - 0xf3, 0xdb, 0xc2, 0xbe, 0x93, 0xd9, 0xb8, 0x6b, 0x1b, 0x87, 0xa8, 0xad, 0x80, 0xaa, 0x0d, 0x17, - 0xec, 0x2f, 0xf1, 0x22, 0x23, 0xd2, 0x04, 0x0d, 0xef, 0xe4, 0xb6, 0xb0, 0x15, 0xb0, 0x99, 0x9b, - 0x0c, 0x21, 0x52, 0xb0, 0x37, 0x7e, 0x7b, 0xdd, 0x37, 0xae, 0xae, 0xfb, 0xc6, 0xdf, 0xd7, 0x7d, - 0xe3, 0xcd, 0x4d, 0x7f, 0xef, 0xea, 0xa6, 0xbf, 0xf7, 0xc7, 0x4d, 0x7f, 0xef, 0xa7, 0x2f, 0x6b, - 0xc6, 0xd7, 0x63, 0xa0, 0x44, 0x54, 0xc7, 0x53, 0xff, 0x1c, 0x47, 0xd4, 0x7d, 0xbd, 0xf9, 0xfb, - 0x95, 0xab, 0x30, 0x6b, 0x4a, 0xbb, 0x7d, 0xf1, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xeb, 0x7a, - 0xca, 0x16, 0x49, 0x06, 0x00, 0x00, + // 849 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0x4f, 0x6f, 0x1b, 0x45, + 0x14, 0xcf, 0x36, 0x8d, 0x9b, 0x4c, 0x62, 0x57, 0xdd, 0x06, 0xb4, 0x49, 0x55, 0x8f, 0x3b, 0x42, + 0xc8, 0x15, 0xca, 0xae, 0x92, 0x54, 0x42, 0xe2, 0x44, 0x57, 0x95, 0x10, 0x02, 0xac, 0x6a, 0x82, + 0x40, 0x70, 0xb1, 0xc6, 0xeb, 0xe9, 0x66, 0x65, 0xef, 0x8c, 0x35, 0x33, 0x4e, 0x70, 0x2e, 0xdc, + 0xb9, 0x80, 0xc4, 0xb7, 0xe0, 0xcc, 0x87, 0xa8, 0x38, 0x55, 0x9c, 0x10, 0x87, 0x01, 0x92, 0x9b, + 0x8f, 0xfb, 0x09, 0xd0, 0xce, 0xcc, 0xda, 0xeb, 0x60, 0x21, 0xf5, 0xe4, 0x79, 0xbf, 0xf7, 0x7b, + 0x7f, 0xe6, 0xed, 0xef, 0x8d, 0xc1, 0x13, 0xa9, 0x04, 0x51, 0x5c, 0x46, 0x82, 0xa6, 0x99, 0x54, + 0x54, 0x44, 0x17, 0xc7, 0x51, 0x4a, 0x19, 0x95, 0x99, 0x0c, 0x27, 0x82, 0x2b, 0xee, 0x3f, 0x74, + 0x94, 0xb0, 0xa2, 0x84, 0x17, 0xc7, 0x87, 0x07, 0x29, 0xe7, 0xe9, 0x98, 0x46, 0x86, 0x32, 0x98, + 0xbe, 0x8a, 0x08, 0x9b, 0x59, 0xfe, 0xe1, 0x7e, 0xca, 0x53, 0x6e, 0x8e, 0x51, 0x79, 0x72, 0xe8, + 0x41, 0xc2, 0x65, 0xce, 0x65, 0xdf, 0x3a, 0xac, 0xe1, 0x5c, 0xef, 0x59, 0x2b, 0x92, 0x8a, 0x8c, + 0x32, 0x96, 0x46, 0x17, 0xc7, 0x03, 0xaa, 0xc8, 0x71, 0x65, 0x3b, 0x16, 0x5a, 0xd7, 0xe9, 0xa2, + 0x25, 0xc3, 0x41, 0xff, 0x6c, 0x81, 0xbd, 0x4f, 0x6c, 0xf3, 0x67, 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0xbb, 0xea, 0x59, 0x8a, + 0x76, 0x15, 0x47, 0xb8, 0x69, 0x81, 0xea, 0x3e, 0x11, 0xd8, 0xba, 0x20, 0xe3, 0x29, 0x35, 0x42, + 0xda, 0x8c, 0x0f, 0xe6, 0x1a, 0x5a, 0xa0, 0xd0, 0x70, 0xcf, 0x66, 0x30, 0x26, 0xc2, 0x16, 0x8e, + 0x7b, 0xaf, 0xaf, 0xdb, 0xde, 0x9b, 0xeb, 0xb6, 0xf7, 0xf7, 0x75, 0xdb, 0xfb, 0xe9, 0xa6, 0xbd, + 0xf1, 0xe6, 0xa6, 0xbd, 0xf1, 0xc7, 0x4d, 0x7b, 0xe3, 0xdb, 0x67, 0xb5, 0x0d, 0x73, 0xf3, 0x60, + 0x54, 0x55, 0xc7, 0xa3, 0xe4, 0x9c, 0x64, 0x2c, 0xfa, 0x6e, 0xf9, 0x37, 0x61, 0x76, 0x6e, 0xd0, + 0x30, 0x92, 0x3d, 0xfd, 0x37, 0x00, 0x00, 0xff, 0xff, 0xa7, 0xc5, 0x78, 0x0b, 0xf1, 0x06, 0x00, + 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -387,18 +390,16 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x12 } } - if m.Params != nil { - { - size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0xa + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0xa return len(dAtA) - i, nil } @@ -422,18 +423,16 @@ func (m *GenesisMetaNode) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.Description != nil { - { - size, err := m.Description.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) + { + size, err := m.Description.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x3a + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x3a if len(m.OwnerAddress) > 0 { i -= len(m.OwnerAddress) copy(dAtA[i:], m.OwnerAddress) @@ -537,10 +536,8 @@ func (m *GenesisState) Size() (n int) { } var l int _ = l - if m.Params != nil { - l = m.Params.Size() - n += 1 + l + sovGenesis(uint64(l)) - } + l = m.Params.Size() + n += 1 + l + sovGenesis(uint64(l)) if len(m.ResourceNodes) > 0 { for _, e := range m.ResourceNodes { l = e.Size() @@ -594,10 +591,8 @@ func (m *GenesisMetaNode) Size() (n int) { if l > 0 { n += 1 + l + sovGenesis(uint64(l)) } - if m.Description != nil { - l = m.Description.Size() - n += 1 + l + sovGenesis(uint64(l)) - } + l = m.Description.Size() + n += 1 + l + sovGenesis(uint64(l)) return n } @@ -681,9 +676,6 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Params == nil { - m.Params = &Params{} - } if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -819,7 +811,7 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Slashing = append(m.Slashing, &Slashing{}) + m.Slashing = append(m.Slashing, Slashing{}) if err := m.Slashing[len(m.Slashing)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -1108,9 +1100,6 @@ func (m *GenesisMetaNode) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Description == nil { - m.Description = &Description{} - } if err := m.Description.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } diff --git a/x/register/types/meta_node.go b/x/register/types/meta_node.go index a98fbad2..06dbe6e6 100644 --- a/x/register/types/meta_node.go +++ b/x/register/types/meta_node.go @@ -22,7 +22,7 @@ const ( ) // NewMetaNode - initialize a new meta node -func NewMetaNode(networkAddr stratos.SdsAddress, pubKey cryptotypes.PubKey, ownerAddr sdk.AccAddress, description *Description, creationTime time.Time) (MetaNode, error) { +func NewMetaNode(networkAddr stratos.SdsAddress, pubKey cryptotypes.PubKey, ownerAddr sdk.AccAddress, description Description, creationTime time.Time) (MetaNode, error) { pkAny, err := codectypes.NewAnyWithValue(pubKey) if err != nil { return MetaNode{}, err diff --git a/x/register/types/params.go b/x/register/types/params.go index a706d077..bd91e9a0 100644 --- a/x/register/types/params.go +++ b/x/register/types/params.go @@ -33,6 +33,7 @@ var ( DefaultUnbondingCompletionTime = 14 * 24 * time.Hour // lead time to complete unbonding - by default 14 days DefaultStakeNozRate = sdk.NewDec(1000000) // 0.001gwei -> 1noz = 1000000wei -> 1noz DefaultRemainingNozLimit = sdk.NewInt(0) + DefaultResourceNodeMinStaking = sdk.NewCoin(DefaultBondDenom, sdk.NewInt(1e9)) ) // ParamKeyTable returns the parameter key table. @@ -41,13 +42,16 @@ func ParamKeyTable() paramtypes.KeyTable { } // NewParams creates a new Params object -func NewParams(bondDenom string, threashold, completion time.Duration, maxEntries uint32, resourceNodeRegEnabled bool) Params { +func NewParams(bondDenom string, threashold, completion time.Duration, maxEntries uint32, + resourceNodeRegEnabled bool, resourceNodeMinStaking sdk.Coin) Params { + return Params{ BondDenom: bondDenom, UnbondingThreasholdTime: threashold, UnbondingCompletionTime: completion, MaxEntries: maxEntries, ResourceNodeRegEnabled: resourceNodeRegEnabled, + ResourceNodeMinStaking: resourceNodeMinStaking, } } @@ -78,13 +82,22 @@ func (p Params) Validate() error { if err := validateResourceNodeRegEnabled(p.ResourceNodeRegEnabled); err != nil { return err } + if err := validateResourceNodeMinStaking(p.ResourceNodeMinStaking); err != nil { + return err + } return nil } // DefaultParams defines the parameters for this module -func DefaultParams() *Params { - p := NewParams(DefaultBondDenom, DefaultUnbondingThreasholdTime, DefaultUnbondingCompletionTime, DefaultMaxEntries, DefaultResourceNodeRegEnabled) - return &p +func DefaultParams() Params { + return NewParams( + DefaultBondDenom, + DefaultUnbondingThreasholdTime, + DefaultUnbondingCompletionTime, + DefaultMaxEntries, + DefaultResourceNodeRegEnabled, + DefaultResourceNodeMinStaking, + ) } func validateBondDenom(i interface{}) error { @@ -150,3 +163,12 @@ func validateResourceNodeRegEnabled(i interface{}) error { return nil } + +func validateResourceNodeMinStaking(i interface{}) error { + _, ok := i.(sdk.Coin) + if !ok { + return fmt.Errorf("invalid parameter type: %T", i) + } + + return nil +} diff --git a/x/register/types/querier.go b/x/register/types/querier.go index f20c6c7d..183f019c 100644 --- a/x/register/types/querier.go +++ b/x/register/types/querier.go @@ -81,14 +81,14 @@ func NewStakingInfoByResourceNodeAddr( Pubkey: resourceNode.GetPubkey(), Suspend: resourceNode.GetSuspend(), Status: resourceNode.GetStatus(), - Tokens: &resourceNode.Tokens, + Tokens: resourceNode.Tokens, OwnerAddress: resourceNode.GetOwnerAddress(), Description: resourceNode.GetDescription(), NodeType: resourceNode.GetNodeType(), CreationTime: resourceNode.GetCreationTime(), - UnBondingStake: &unBondingValue, - UnBondedStake: &unBondedValue, - BondedStake: &bonedValue, + UnBondingStake: unBondingValue, + UnBondedStake: unBondedValue, + BondedStake: bonedValue, } } @@ -107,14 +107,14 @@ func NewStakingInfoByMetaNodeAddr( Pubkey: metaNode.GetPubkey(), Suspend: metaNode.Suspend, Status: metaNode.Status, - Tokens: &metaNode.Tokens, + Tokens: metaNode.Tokens, OwnerAddress: metaNode.GetOwnerAddress(), Description: metaNode.Description, NodeType: uint32(0), CreationTime: metaNode.CreationTime, - UnBondingStake: &unBondingValue, - UnBondedStake: &unBondedValue, - BondedStake: &bonedValue, + UnBondingStake: unBondingValue, + UnBondedStake: unBondedValue, + BondedStake: bonedValue, } } diff --git a/x/register/types/query.pb.go b/x/register/types/query.pb.go index 31c7b0b7..6df0275f 100644 --- a/x/register/types/query.pb.go +++ b/x/register/types/query.pb.go @@ -842,18 +842,18 @@ func (m *TotalStakesResponse) GetTotalUnbondingStake() *types.Coin { } type StakingInfo struct { - NetworkAddress string `protobuf:"bytes,1,opt,name=network_address,json=networkAddress,proto3" json:"network_address" yaml:"network_address"` - Pubkey *types1.Any `protobuf:"bytes,2,opt,name=pubkey,proto3" json:"pubkey" yaml:"pubkey"` - Suspend bool `protobuf:"varint,3,opt,name=suspend,proto3" json:"suspend" yaml:"suspend"` - Status types2.BondStatus `protobuf:"varint,4,opt,name=status,proto3,enum=cosmos.staking.v1beta1.BondStatus" json:"status" yaml:"status"` - Tokens *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,5,opt,name=tokens,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"tokens" yaml:"tokens"` - OwnerAddress string `protobuf:"bytes,6,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address" yaml:"owner_address"` - Description *Description `protobuf:"bytes,7,opt,name=description,proto3" json:"description" yaml:"description"` - CreationTime time.Time `protobuf:"bytes,8,opt,name=creation_time,json=creationTime,proto3,stdtime" json:"creation_time" yaml:"creation_time"` - NodeType uint32 `protobuf:"varint,9,opt,name=node_type,json=nodeType,proto3" json:"node_type" yaml:"node_type"` - BondedStake *types.Coin `protobuf:"bytes,10,opt,name=bonded_stake,json=bondedStake,proto3" json:"bonded_stake" yaml:"bonded_stake"` - UnBondingStake *types.Coin `protobuf:"bytes,11,opt,name=un_bonding_stake,json=unBondingStake,proto3" json:"un_bonding_stake" yaml:"un_bonding_stake"` - UnBondedStake *types.Coin `protobuf:"bytes,12,opt,name=un_bonded_stake,json=unBondedStake,proto3" json:"un_bonded_stake" yaml:"un_bonded_stake"` + NetworkAddress string `protobuf:"bytes,1,opt,name=network_address,json=networkAddress,proto3" json:"network_address" yaml:"network_address"` + Pubkey *types1.Any `protobuf:"bytes,2,opt,name=pubkey,proto3" json:"pubkey" yaml:"pubkey"` + Suspend bool `protobuf:"varint,3,opt,name=suspend,proto3" json:"suspend" yaml:"suspend"` + Status types2.BondStatus `protobuf:"varint,4,opt,name=status,proto3,enum=cosmos.staking.v1beta1.BondStatus" json:"status" yaml:"status"` + Tokens github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,5,opt,name=tokens,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"tokens" yaml:"tokens"` + OwnerAddress string `protobuf:"bytes,6,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address" yaml:"owner_address"` + Description Description `protobuf:"bytes,7,opt,name=description,proto3" json:"description" yaml:"description"` + CreationTime time.Time `protobuf:"bytes,8,opt,name=creation_time,json=creationTime,proto3,stdtime" json:"creation_time" yaml:"creation_time"` + NodeType uint32 `protobuf:"varint,9,opt,name=node_type,json=nodeType,proto3" json:"node_type" yaml:"node_type"` + BondedStake types.Coin `protobuf:"bytes,10,opt,name=bonded_stake,json=bondedStake,proto3" json:"bonded_stake" yaml:"bonded_stake"` + UnBondingStake types.Coin `protobuf:"bytes,11,opt,name=un_bonding_stake,json=unBondingStake,proto3" json:"un_bonding_stake" yaml:"un_bonding_stake"` + UnBondedStake types.Coin `protobuf:"bytes,12,opt,name=un_bonded_stake,json=unBondedStake,proto3" json:"un_bonded_stake" yaml:"un_bonded_stake"` } func (m *StakingInfo) Reset() { *m = StakingInfo{} } @@ -924,11 +924,11 @@ func (m *StakingInfo) GetOwnerAddress() string { return "" } -func (m *StakingInfo) GetDescription() *Description { +func (m *StakingInfo) GetDescription() Description { if m != nil { return m.Description } - return nil + return Description{} } func (m *StakingInfo) GetCreationTime() time.Time { @@ -945,25 +945,25 @@ func (m *StakingInfo) GetNodeType() uint32 { return 0 } -func (m *StakingInfo) GetBondedStake() *types.Coin { +func (m *StakingInfo) GetBondedStake() types.Coin { if m != nil { return m.BondedStake } - return nil + return types.Coin{} } -func (m *StakingInfo) GetUnBondingStake() *types.Coin { +func (m *StakingInfo) GetUnBondingStake() types.Coin { if m != nil { return m.UnBondingStake } - return nil + return types.Coin{} } -func (m *StakingInfo) GetUnBondedStake() *types.Coin { +func (m *StakingInfo) GetUnBondedStake() types.Coin { if m != nil { return m.UnBondedStake } - return nil + return types.Coin{} } func init() { @@ -990,101 +990,101 @@ func init() { func init() { proto.RegisterFile("stratos/register/v1/query.proto", fileDescriptor_59a612d1da8c0670) } var fileDescriptor_59a612d1da8c0670 = []byte{ - // 1501 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0x5d, 0x6f, 0x13, 0x47, - 0x17, 0xce, 0xf2, 0x61, 0xe2, 0x63, 0x27, 0xa0, 0x49, 0x48, 0x82, 0x79, 0xe3, 0x4d, 0x96, 0xaf, - 0xf0, 0x91, 0xdd, 0x37, 0x09, 0xbc, 0x6f, 0x41, 0x2d, 0x12, 0x06, 0x8a, 0x00, 0x91, 0xd2, 0x85, - 0x52, 0xa9, 0x55, 0x65, 0xad, 0xed, 0x89, 0x59, 0x05, 0xef, 0x9a, 0x9d, 0x31, 0x60, 0x21, 0xa4, - 0x7e, 0xfc, 0x01, 0xd4, 0x5e, 0xf5, 0xb6, 0x52, 0xa5, 0x7e, 0xdc, 0xf4, 0xa2, 0xea, 0x6f, 0x40, - 0xbd, 0x42, 0xea, 0x4d, 0xd5, 0x8b, 0x6d, 0x05, 0xbd, 0xca, 0xa5, 0x7f, 0x41, 0xb5, 0x33, 0x67, - 0xb3, 0xb3, 0xce, 0x3a, 0x0e, 0xbd, 0xb2, 0xf7, 0xcc, 0x39, 0xcf, 0x79, 0xce, 0xcc, 0x99, 0x39, - 0x0f, 0xe8, 0x8c, 0x07, 0x0e, 0xf7, 0x99, 0x15, 0xd0, 0xa6, 0xcb, 0x38, 0x0d, 0xac, 0x47, 0x4b, - 0xd6, 0xc3, 0x0e, 0x0d, 0xba, 0x66, 0x3b, 0xf0, 0xb9, 0x4f, 0x26, 0xd0, 0xc1, 0x8c, 0x1d, 0xcc, - 0x47, 0x4b, 0xa5, 0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, 0xcd, 0x8c, 0x03, 0x32, 0x53, 0x81, 0xc2, 0xdd, - 0x38, 0x0f, 0x93, 0x02, 0xf3, 0x16, 0xe5, 0xce, 0x1b, 0xd2, 0xb9, 0x01, 0x07, 0xfb, 0x42, 0x91, - 0xca, 0x52, 0x8a, 0xca, 0x6c, 0x26, 0x95, 0xcd, 0x20, 0x49, 0xe3, 0x63, 0x98, 0x16, 0x58, 0x77, - 0xb8, 0xb3, 0x4e, 0x2b, 0xdd, 0x37, 0x63, 0x42, 0x66, 0x01, 0xc4, 0x19, 0x57, 0x79, 0xb7, 0x4d, - 0x67, 0x76, 0xcd, 0x69, 0x0b, 0x63, 0x76, 0x5e, 0x58, 0xee, 0x76, 0xdb, 0xd4, 0xa8, 0xe2, 0xb6, - 0xa7, 0xc0, 0x91, 0xeb, 0x65, 0x28, 0xe2, 0x39, 0x56, 0x5d, 0x6f, 0xcd, 0x47, 0xce, 0x73, 0x99, - 0x9c, 0xef, 0x48, 0xc7, 0xeb, 0xde, 0x9a, 0x6f, 0x17, 0x58, 0xf2, 0x61, 0x7c, 0xa6, 0xa5, 0x33, - 0xbc, 0xf7, 0xd8, 0xa3, 0x41, 0xcc, 0x7f, 0x16, 0xc0, 0x8f, 0xbe, 0x55, 0xf6, 0x79, 0x61, 0x11, - 0xdc, 0xdf, 0x05, 0x48, 0x3a, 0x52, 0x70, 0x2f, 0x2c, 0x1f, 0x37, 0xb1, 0x99, 0xa3, 0x96, 0x34, - 0xe5, 0xbd, 0xc3, 0xae, 0x33, 0x6f, 0x3b, 0xcd, 0x78, 0x6b, 0x6c, 0x25, 0xd2, 0xf8, 0x51, 0xc3, - 0xee, 0x48, 0x73, 0xc0, 0x32, 0xaf, 0xc2, 0x98, 0x5a, 0x26, 0x9b, 0xd1, 0xe6, 0x76, 0xef, 0xa8, - 0xce, 0xa2, 0x52, 0x27, 0x23, 0xd7, 0x32, 0xc8, 0x9e, 0x18, 0x4a, 0x56, 0x72, 0x48, 0xb1, 0x9d, - 0x81, 0x29, 0x41, 0xf6, 0xae, 0xcf, 0x9d, 0x07, 0x82, 0x31, 0xd6, 0x64, 0xac, 0x61, 0x27, 0xa8, - 0x2b, 0x58, 0xc4, 0x4d, 0x28, 0xf2, 0xc8, 0x5a, 0x8d, 0x38, 0x51, 0x86, 0x67, 0xb5, 0x90, 0x59, - 0x43, 0x12, 0xce, 0x36, 0x09, 0x14, 0x78, 0x62, 0x34, 0x26, 0x81, 0x88, 0x3c, 0xb7, 0x9d, 0xc0, - 0x69, 0xb1, 0x38, 0xfb, 0x0d, 0x98, 0x48, 0x59, 0x31, 0xf3, 0x0a, 0xe4, 0xda, 0xc2, 0x82, 0x39, - 0x0f, 0x67, 0xe6, 0xc4, 0x20, 0x74, 0x35, 0x8e, 0xc1, 0x11, 0x81, 0x55, 0xf1, 0xbd, 0x06, 0x6d, - 0xa8, 0x77, 0xef, 0xb2, 0xdf, 0xf1, 0x78, 0x9c, 0xf2, 0x22, 0x1c, 0xdd, 0xde, 0x0d, 0x39, 0x4c, - 0x41, 0xce, 0xeb, 0xb4, 0x6a, 0x54, 0xf6, 0xd0, 0x1e, 0x1b, 0xbf, 0x8c, 0x79, 0xd0, 0x95, 0xf8, - 0xf8, 0x5e, 0xa5, 0x52, 0x5c, 0x80, 0xb9, 0xc1, 0x2e, 0x43, 0xe0, 0xbf, 0xd9, 0x0d, 0x13, 0x19, - 0x9b, 0x49, 0xee, 0x41, 0x29, 0x40, 0xae, 0xd5, 0xe8, 0x0a, 0xb3, 0xaa, 0x72, 0x36, 0xb8, 0x4d, - 0x87, 0x52, 0xad, 0x11, 0x37, 0xc5, 0x65, 0xdf, 0xf5, 0xec, 0xe9, 0x40, 0x29, 0x94, 0x25, 0x09, - 0xc8, 0x2a, 0x4c, 0xb5, 0x28, 0x77, 0x32, 0x30, 0x77, 0x0d, 0xc3, 0x9c, 0x68, 0x61, 0x65, 0x2a, - 0xde, 0x35, 0x20, 0x12, 0xa4, 0x26, 0x8a, 0x47, 0xac, 0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c, 0x3a, 0xf7, 0x86, 0x51, 0x3b, 0x22, 0xcb, 0x62, 0xb2, 0x95, 0xd5, 0x17, 0xaf, 0xca, - 0xda, 0xcb, 0x57, 0x65, 0xed, 0xaf, 0x57, 0x65, 0xed, 0xf9, 0xeb, 0xf2, 0xc8, 0xcb, 0xd7, 0xe5, - 0x91, 0xdf, 0x5f, 0x97, 0x47, 0x3e, 0x3a, 0xab, 0x28, 0x0b, 0xc4, 0xf0, 0x28, 0x8f, 0xff, 0x2e, - 0xd6, 0xef, 0x3b, 0xae, 0x67, 0x3d, 0x49, 0x60, 0x85, 0xd6, 0xa8, 0xe5, 0xc4, 0xa8, 0x5d, 0xf9, - 0x27, 0x00, 0x00, 0xff, 0xff, 0xa5, 0x0d, 0xbf, 0x9b, 0xb9, 0x11, 0x00, 0x00, + // 1497 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x57, 0xcf, 0x6f, 0x13, 0xc7, + 0x17, 0xcf, 0xf2, 0x23, 0xc4, 0xcf, 0x4e, 0x40, 0x93, 0x90, 0x04, 0xf3, 0x8d, 0x37, 0x59, 0xf8, + 0x42, 0x02, 0x78, 0xb7, 0x49, 0xa0, 0x2d, 0xa8, 0x45, 0xc2, 0xd0, 0x22, 0x40, 0xa4, 0x74, 0xa1, + 0x54, 0x6a, 0x0f, 0xd6, 0xda, 0x9e, 0x18, 0x2b, 0x78, 0xd7, 0xec, 0xcc, 0x02, 0x16, 0x42, 0x6a, + 0x7b, 0xed, 0x05, 0xb5, 0xa7, 0x5e, 0x2b, 0x55, 0xea, 0x8f, 0x4b, 0x0f, 0x55, 0xff, 0x06, 0xd4, + 0x13, 0x52, 0x2f, 0x55, 0x0f, 0xdb, 0x0a, 0x7a, 0xca, 0xd1, 0x7f, 0x41, 0xb5, 0x33, 0x6f, 0xb3, + 0xb3, 0xce, 0x3a, 0x0e, 0x3d, 0x79, 0xe7, 0x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+ 0x57, 0x0d, 0x66, 0x06, 0x8c, 0xa4, 0xe4, 0xed, 0xc1, 0x4e, 0x77, 0x1e, 0x76, 0x8b, 0xe7, 0xff, + 0x83, 0x25, 0x72, 0x3f, 0x21, 0xb8, 0xcf, 0x93, 0x52, 0x76, 0x95, 0x76, 0xaa, 0x72, 0x60, 0x25, + 0x3f, 0x6a, 0x30, 0x99, 0x31, 0xe8, 0x92, 0xb3, 0xc3, 0x5c, 0x67, 0x8d, 0xce, 0xc5, 0x73, 0xaf, + 0x69, 0xb5, 0x2b, 0xb2, 0x2c, 0x26, 0x5b, 0x59, 0x7b, 0xfe, 0xb2, 0xa4, 0xbd, 0x78, 0x59, 0xd2, + 0xfe, 0x7e, 0x59, 0xd2, 0x9e, 0xbd, 0x2a, 0x8d, 0xbc, 0x78, 0x55, 0x1a, 0xf9, 0xe3, 0x55, 0x69, + 0xe4, 0x93, 0xb3, 0xca, 0x74, 0x81, 0x18, 0x2e, 0xe5, 0xf1, 0x67, 0xb9, 0x7e, 0xcf, 0x69, 0xb9, + 0xd6, 0xe3, 0x04, 0x56, 0xcc, 0x1b, 0xb5, 0x51, 0xd1, 0x6a, 0x57, 0xff, 0x0d, 0x00, 0x00, 0xff, + 0xff, 0x75, 0x9f, 0x0c, 0x74, 0xc1, 0x11, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -2047,42 +2047,36 @@ func (m *StakingInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.UnBondedStake != nil { - { - size, err := m.UnBondedStake.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) + { + size, err := m.UnBondedStake.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x62 + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } - if m.UnBondingStake != nil { - { - size, err := m.UnBondingStake.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x62 + { + size, err := m.UnBondingStake.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x5a + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } - if m.BondedStake != nil { - { - size, err := m.BondedStake.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x5a + { + size, err := m.BondedStake.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x52 + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x52 if m.NodeType != 0 { i = encodeVarintQuery(dAtA, i, uint64(m.NodeType)) i-- @@ -2096,18 +2090,16 @@ func (m *StakingInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintQuery(dAtA, i, uint64(n16)) i-- dAtA[i] = 0x42 - if m.Description != nil { - { - size, err := m.Description.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) + { + size, err := m.Description.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x3a + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x3a if len(m.OwnerAddress) > 0 { i -= len(m.OwnerAddress) copy(dAtA[i:], m.OwnerAddress) @@ -2115,18 +2107,16 @@ func (m *StakingInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x32 } - if m.Tokens != nil { - { - size := m.Tokens.Size() - i -= size - if _, err := m.Tokens.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintQuery(dAtA, i, uint64(size)) + { + size := m.Tokens.Size() + i -= size + if _, err := m.Tokens.MarshalTo(dAtA[i:]); err != nil { + return 0, err } - i-- - dAtA[i] = 0x2a + i = encodeVarintQuery(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x2a if m.Status != 0 { i = encodeVarintQuery(dAtA, i, uint64(m.Status)) i-- @@ -2427,35 +2417,25 @@ func (m *StakingInfo) Size() (n int) { if m.Status != 0 { n += 1 + sovQuery(uint64(m.Status)) } - if m.Tokens != nil { - l = m.Tokens.Size() - n += 1 + l + sovQuery(uint64(l)) - } + l = m.Tokens.Size() + n += 1 + l + sovQuery(uint64(l)) l = len(m.OwnerAddress) if l > 0 { n += 1 + l + sovQuery(uint64(l)) } - if m.Description != nil { - l = m.Description.Size() - n += 1 + l + sovQuery(uint64(l)) - } + l = m.Description.Size() + n += 1 + l + sovQuery(uint64(l)) l = github_com_gogo_protobuf_types.SizeOfStdTime(m.CreationTime) n += 1 + l + sovQuery(uint64(l)) if m.NodeType != 0 { n += 1 + sovQuery(uint64(m.NodeType)) } - if m.BondedStake != nil { - l = m.BondedStake.Size() - n += 1 + l + sovQuery(uint64(l)) - } - if m.UnBondingStake != nil { - l = m.UnBondingStake.Size() - n += 1 + l + sovQuery(uint64(l)) - } - if m.UnBondedStake != nil { - l = m.UnBondedStake.Size() - n += 1 + l + sovQuery(uint64(l)) - } + l = m.BondedStake.Size() + n += 1 + l + sovQuery(uint64(l)) + l = m.UnBondingStake.Size() + n += 1 + l + sovQuery(uint64(l)) + l = m.UnBondedStake.Size() + n += 1 + l + sovQuery(uint64(l)) return n } @@ -4132,8 +4112,6 @@ func (m *StakingInfo) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_cosmos_cosmos_sdk_types.Int - m.Tokens = &v if err := m.Tokens.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -4199,9 +4177,6 @@ func (m *StakingInfo) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Description == nil { - m.Description = &Description{} - } if err := m.Description.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -4287,9 +4262,6 @@ func (m *StakingInfo) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.BondedStake == nil { - m.BondedStake = &types.Coin{} - } if err := m.BondedStake.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -4323,9 +4295,6 @@ func (m *StakingInfo) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.UnBondingStake == nil { - m.UnBondingStake = &types.Coin{} - } if err := m.UnBondingStake.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -4359,9 +4328,6 @@ func (m *StakingInfo) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.UnBondedStake == nil { - m.UnBondedStake = &types.Coin{} - } if err := m.UnBondedStake.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } diff --git a/x/register/types/register.pb.go b/x/register/types/register.pb.go index 4e034bfd..9ea0eeac 100644 --- a/x/register/types/register.pb.go +++ b/x/register/types/register.pb.go @@ -5,9 +5,10 @@ package types import ( fmt "fmt" - types "github.com/cosmos/cosmos-sdk/codec/types" + types1 "github.com/cosmos/cosmos-sdk/codec/types" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" - types1 "github.com/cosmos/cosmos-sdk/x/staking/types" + types "github.com/cosmos/cosmos-sdk/types" + types2 "github.com/cosmos/cosmos-sdk/x/staking/types" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" @@ -38,7 +39,8 @@ type Params struct { UnbondingThreasholdTime time.Duration `protobuf:"bytes,2,opt,name=unbonding_threashold_time,json=unbondingThreasholdTime,proto3,stdduration" json:"unbonding_threashold_time" yaml:"unbonding_threashold_time"` UnbondingCompletionTime time.Duration `protobuf:"bytes,3,opt,name=unbonding_completion_time,json=unbondingCompletionTime,proto3,stdduration" json:"unbonding_completion_time" yaml:"unbonding_completion_time"` MaxEntries uint32 `protobuf:"varint,4,opt,name=max_entries,json=maxEntries,proto3" json:"max_entries" yaml:"max_entries",omitempty` - ResourceNodeRegEnabled bool `protobuf:"varint,5,opt,name=resource_node_reg_enabled,json=resourceNodeRegEnabled,proto3" json:"resource_node_reg_enabled,omitempty" yaml:"resource_node_reg_enabled"` + ResourceNodeRegEnabled bool `protobuf:"varint,5,opt,name=resource_node_reg_enabled,json=resourceNodeRegEnabled,proto3" json:"resource_node_reg_enabled" yaml:"resource_node_reg_enabled"` + ResourceNodeMinStaking types.Coin `protobuf:"bytes,6,opt,name=resource_node_min_staking,json=resourceNodeMinStaking,proto3" json:"resource_node_min_staking" yaml:"resource_node_min_staking"` } func (m *Params) Reset() { *m = Params{} } @@ -109,14 +111,21 @@ func (m *Params) GetResourceNodeRegEnabled() bool { return false } +func (m *Params) GetResourceNodeMinStaking() types.Coin { + if m != nil { + return m.ResourceNodeMinStaking + } + return types.Coin{} +} + type ResourceNode struct { NetworkAddress string `protobuf:"bytes,1,opt,name=network_address,json=networkAddress,proto3" json:"network_address" yaml:"network_address"` - Pubkey *types.Any `protobuf:"bytes,2,opt,name=pubkey,proto3" json:"pubkey" yaml:"pubkey"` + Pubkey *types1.Any `protobuf:"bytes,2,opt,name=pubkey,proto3" json:"pubkey" yaml:"pubkey"` Suspend bool `protobuf:"varint,3,opt,name=suspend,proto3" json:"suspend" yaml:"suspend"` - Status types1.BondStatus `protobuf:"varint,4,opt,name=status,proto3,enum=cosmos.staking.v1beta1.BondStatus" json:"status" yaml:"status"` + Status types2.BondStatus `protobuf:"varint,4,opt,name=status,proto3,enum=cosmos.staking.v1beta1.BondStatus" json:"status" yaml:"status"` Tokens github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,5,opt,name=tokens,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"tokens" yaml:"tokens"` OwnerAddress string `protobuf:"bytes,6,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address" yaml:"owner_address"` - Description *Description `protobuf:"bytes,7,opt,name=description,proto3" json:"description" yaml:"description"` + Description Description `protobuf:"bytes,7,opt,name=description,proto3" json:"description" yaml:"description"` CreationTime time.Time `protobuf:"bytes,8,opt,name=creation_time,json=creationTime,proto3,stdtime" json:"creation_time" yaml:"creation_time"` NodeType uint32 `protobuf:"varint,9,opt,name=node_type,json=nodeType,proto3" json:"node_type" yaml:"node_type"` EffectiveTokens github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,10,opt,name=effective_tokens,json=effectiveTokens,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"effective_tokens" yaml:"effective_tokens"` @@ -162,7 +171,7 @@ func (m *ResourceNode) GetNetworkAddress() string { return "" } -func (m *ResourceNode) GetPubkey() *types.Any { +func (m *ResourceNode) GetPubkey() *types1.Any { if m != nil { return m.Pubkey } @@ -176,11 +185,11 @@ func (m *ResourceNode) GetSuspend() bool { return false } -func (m *ResourceNode) GetStatus() types1.BondStatus { +func (m *ResourceNode) GetStatus() types2.BondStatus { if m != nil { return m.Status } - return types1.Unspecified + return types2.Unspecified } func (m *ResourceNode) GetOwnerAddress() string { @@ -190,11 +199,11 @@ func (m *ResourceNode) GetOwnerAddress() string { return "" } -func (m *ResourceNode) GetDescription() *Description { +func (m *ResourceNode) GetDescription() Description { if m != nil { return m.Description } - return nil + return Description{} } func (m *ResourceNode) GetCreationTime() time.Time { @@ -213,12 +222,12 @@ func (m *ResourceNode) GetNodeType() uint32 { type MetaNode struct { NetworkAddress string `protobuf:"bytes,1,opt,name=network_address,json=networkAddress,proto3" json:"network_address" yaml:"network_address"` - Pubkey *types.Any `protobuf:"bytes,2,opt,name=pubkey,proto3" json:"pubkey" yaml:"pubkey"` + Pubkey *types1.Any `protobuf:"bytes,2,opt,name=pubkey,proto3" json:"pubkey" yaml:"pubkey"` Suspend bool `protobuf:"varint,3,opt,name=suspend,proto3" json:"suspend" yaml:"suspend"` - Status types1.BondStatus `protobuf:"varint,4,opt,name=status,proto3,enum=cosmos.staking.v1beta1.BondStatus" json:"status" yaml:"status"` + Status types2.BondStatus `protobuf:"varint,4,opt,name=status,proto3,enum=cosmos.staking.v1beta1.BondStatus" json:"status" yaml:"status"` Tokens github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,5,opt,name=tokens,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"tokens" yaml:"tokens"` OwnerAddress string `protobuf:"bytes,6,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address" yaml:"owner_address"` - Description *Description `protobuf:"bytes,7,opt,name=description,proto3" json:"description" yaml:"description"` + Description Description `protobuf:"bytes,7,opt,name=description,proto3" json:"description" yaml:"description"` CreationTime time.Time `protobuf:"bytes,8,opt,name=creation_time,json=creationTime,proto3,stdtime" json:"creation_time" yaml:"creation_time"` } @@ -262,7 +271,7 @@ func (m *MetaNode) GetNetworkAddress() string { return "" } -func (m *MetaNode) GetPubkey() *types.Any { +func (m *MetaNode) GetPubkey() *types1.Any { if m != nil { return m.Pubkey } @@ -276,11 +285,11 @@ func (m *MetaNode) GetSuspend() bool { return false } -func (m *MetaNode) GetStatus() types1.BondStatus { +func (m *MetaNode) GetStatus() types2.BondStatus { if m != nil { return m.Status } - return types1.Unspecified + return types2.Unspecified } func (m *MetaNode) GetOwnerAddress() string { @@ -290,11 +299,11 @@ func (m *MetaNode) GetOwnerAddress() string { return "" } -func (m *MetaNode) GetDescription() *Description { +func (m *MetaNode) GetDescription() Description { if m != nil { return m.Description } - return nil + return Description{} } func (m *MetaNode) GetCreationTime() time.Time { @@ -579,91 +588,95 @@ func init() { } var fileDescriptor_fef1e3aeec8499d6 = []byte{ - // 1336 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x57, 0xcf, 0x8f, 0xd3, 0xc6, - 0x17, 0x5f, 0xef, 0xc2, 0x26, 0x99, 0xec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9f, 0x85, 0x54, 0x90, 0x30, 0x16, 0x63, 0x17, 0x84, 0xf8, 0xe0, 0xba, 0x82, - 0x6d, 0x0f, 0xac, 0x27, 0x84, 0xb3, 0x51, 0xe2, 0x13, 0x2f, 0x62, 0x01, 0xf1, 0x12, 0x32, 0xf0, - 0x48, 0x84, 0xfb, 0x43, 0x12, 0xb4, 0x8e, 0x77, 0xac, 0x8d, 0xba, 0x73, 0xbe, 0xa8, 0xfb, 0x95, - 0xae, 0xc8, 0x3d, 0x65, 0xb8, 0x5b, 0x2c, 0x20, 0x2e, 0x19, 0x5c, 0xd7, 0xc4, 0x4f, 0x35, 0xb0, - 0xe4, 0x96, 0x28, 0xfb, 0x36, 0x58, 0x8d, 0x88, 0xb8, 0xcf, 0x92, 0x3d, 0x0f, 0x07, 0x41, 0x42, - 0x38, 0xd7, 0x92, 0xda, 0x9c, 0xa4, 0xb0, 0x4a, 0x65, 0x29, 0x3c, 0xa5, 0x52, 0x57, 0x08, 0xe4, - 0xae, 0x68, 0xe4, 0x8a, 0x02, 0x6c, 0x0c, 0x16, 0xe3, 0x51, 0x7f, 0x8f, 0x8c, 0xb5, 0x9a, 0xd6, - 0x0e, 0xb5, 0xea, 0x4a, 0x34, 0x76, 0x2e, 0x4d, 0x52, 0xa8, 0xfd, 0xb2, 0x14, 0x2e, 0xab, 0xd8, - 0xca, 0x46, 0x4f, 0x7f, 0xdc, 0x5c, 0xd3, 0x93, 0xe2, 0x27, 0xe3, 0x58, 0xb0, 0xee, 0xf6, 0xa8, - 0xff, 0x39, 0x19, 0xbb, 0x7a, 0x81, 0xfd, 0x21, 0xa8, 0xf1, 0x11, 0x8f, 0x49, 0x14, 0x48, 0x39, - 0xd4, 0x9d, 0xb7, 0x26, 0x29, 0x34, 0x50, 0x96, 0xc2, 0x15, 0x15, 0x4e, 0x03, 0xc8, 0x35, 0x94, - 0x7d, 0x07, 0x2c, 0x72, 0x81, 0xc5, 0x48, 0xb5, 0x6c, 0xe5, 0x22, 0xea, 0xea, 0x3c, 0x66, 0xe6, - 0xf4, 0x0c, 0x76, 0x1d, 0x16, 0x05, 0x5f, 0x49, 0x4f, 0xe7, 0xff, 0x79, 0xa5, 0x6a, 0x55, 0x51, - 0xa9, 0xb2, 0x91, 0xab, 0x89, 0x7c, 0xd3, 0x82, 0xed, 0x91, 0x88, 0xcb, 0x5e, 0x35, 0x94, 0x08, - 0x7f, 0x4d, 0xe1, 0xbb, 0x03, 0x2a, 0x76, 0x47, 0xfd, 0xae, 0xcf, 0x42, 0x3d, 0xfc, 0xfa, 0x67, - 0x93, 0x07, 0x7b, 0x3d, 0x31, 0x8e, 0x09, 0xef, 0xde, 0x88, 0x44, 0x9e, 0x42, 0xad, 0x2f, 0x52, - 0x28, 0x1b, 0xb9, 0x9a, 0xb0, 0x6f, 0x81, 0x65, 0x76, 0x3f, 0x22, 0xc9, 0xb4, 0x5b, 0x8b, 0x32, - 0xd3, 0x7b, 0x93, 0x14, 0xce, 0x12, 0x59, 0x0a, 0xd7, 0x54, 0x88, 0x19, 0x18, 0xb9, 0x4b, 0xd2, - 0x36, 0x7d, 0xa2, 0xa0, 0x19, 0x10, 0xee, 0x27, 0x34, 0xce, 0x65, 0xdd, 0xaa, 0xc9, 0x66, 0x75, - 0xba, 0x2f, 0x39, 0x36, 0xbb, 0xd7, 0x0a, 0x3f, 0xe7, 0x9d, 0x5c, 0xe5, 0xa5, 0x85, 0x59, 0x0a, - 0x6d, 0x95, 0xad, 0x04, 0x22, 0xb7, 0xec, 0x62, 0x27, 0x60, 0xd9, 0x4f, 0x08, 0x2e, 0x86, 0xb8, - 0x2e, 0x93, 0x9d, 0x39, 0xa4, 0x8c, 0x1d, 0x73, 0xba, 0x3a, 0x5b, 0x7a, 0x8a, 0x67, 0x17, 0x16, - 0x5b, 0x9b, 0x81, 0xd1, 0xc3, 0x7c, 0x5a, 0x97, 0x0c, 0x26, 0x47, 0xf4, 0x63, 0xd0, 0x90, 0xc3, - 0x91, 0xbf, 0xe3, 0x56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0xa2, 0xbc, 0xac, 0xc8, 0x53, - 0x02, 0x55, 0x13, 0x80, 0x42, 0xf2, 0xf5, 0xe8, 0x87, 0x05, 0xd0, 0x2c, 0x49, 0x27, 0x1f, 0xdb, - 0x90, 0x45, 0x74, 0x8f, 0x24, 0xfa, 0xfd, 0xca, 0xb1, 0xd5, 0x50, 0x31, 0xb6, 0x1a, 0x40, 0xae, - 0xa1, 0xec, 0xeb, 0xa0, 0x4e, 0x03, 0x12, 0x09, 0x2a, 0xd4, 0xa1, 0xa2, 0x54, 0x3f, 0xc5, 0xb2, - 0x14, 0xae, 0xab, 0xa5, 0x06, 0x29, 0x5f, 0x93, 0xa6, 0x6e, 0xf6, 0x15, 0x50, 0xbb, 0x4f, 0xfa, - 0x9c, 0x0a, 0x75, 0x0d, 0x54, 0xad, 0x30, 0x50, 0x96, 0xc2, 0x96, 0x0a, 0xa2, 0x81, 0x72, 0x0c, - 0xe3, 0x64, 0x07, 0xe0, 0x04, 0x27, 0xfe, 0x28, 0xa1, 0x62, 0xec, 0xf9, 0x2c, 0x12, 0xd8, 0x17, - 0xf2, 0x1d, 0x36, 0x9c, 0x8f, 0xf2, 0x73, 0xba, 0xca, 0x65, 0x29, 0x3c, 0xa7, 0x0f, 0x8c, 0x0a, - 0x53, 0x8e, 0xbe, 0x6a, 0xc8, 0xab, 0x8a, 0xcb, 0x0b, 0x0d, 0x88, 0xc0, 0x74, 0x68, 0x8e, 0x13, - 0x59, 0xa8, 0x86, 0x8a, 0x42, 0x35, 0x30, 0x53, 0xa8, 0xc6, 0x4a, 0xf2, 0x7f, 0x30, 0x0f, 0x96, - 0xbf, 0x36, 0x17, 0x51, 0x79, 0xf2, 0xdf, 0x04, 0x4b, 0x65, 0xed, 0xea, 0x66, 0x48, 0x5d, 0x96, - 0xf1, 0x42, 0x97, 0x65, 0x14, 0xb9, 0xcd, 0x92, 0xcc, 0xed, 0x1b, 0x60, 0x89, 0x72, 0x2f, 0x24, - 0x02, 0xcb, 0xcb, 0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 0x71, 0xd3, 0xdf, 0xc5, 0x34, 0xea, 0x1d, - 0x14, 0x5f, 0xff, 0x32, 0x73, 0x7f, 0x51, 0x36, 0xe3, 0xd2, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, - 0xc3, 0x9a, 0xa6, 0xfc, 0x1e, 0x10, 0x00, 0x00, + // 1397 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0xcf, 0x6f, 0x13, 0xc7, + 0x17, 0xcf, 0x26, 0x10, 0xdb, 0xe3, 0xfc, 0xe0, 0xbb, 0x44, 0xe0, 0xf0, 0xa5, 0x1e, 0x33, 0xfd, + 0x41, 0x90, 0x1a, 0x5b, 0x81, 0x4a, 0x55, 0x39, 0x54, 0xca, 0x42, 0xda, 0x42, 0x0b, 0x8a, 0x96, + 0x14, 0xa4, 0x4a, 0xd5, 0x76, 0xbc, 0x3b, 0x38, 0x43, 0xbc, 0x3b, 0xd6, 0xce, 0x38, 0xc4, 0x52, + 0x0f, 0x48, 0xbd, 0x70, 0xe4, 0x88, 0xd4, 0x0b, 0x7f, 0x44, 0xff, 0x86, 0x0a, 0x71, 0xe2, 0x58, + 0xf5, 0xb0, 0xad, 0xe0, 0x52, 0xf9, 0xb8, 0x87, 0xf6, 0x5a, 0xed, 0xfc, 0xf0, 0xae, 0x37, 0x44, + 0x15, 0x95, 0x38, 0x95, 0x13, 0x3b, 0x9f, 0xcf, 0x9b, 0xf7, 0xde, 0xcc, 0xfb, 0xbc, 0xe7, 0x09, + 0x00, 0x71, 0x11, 0x63, 0xc1, 0x78, 0x27, 0x26, 0x3d, 0xca, 0x05, 0x89, 0x3b, 0xfb, 0x1b, 0x93, + 0xef, 0xf6, 0x20, 0x66, 0x82, 0xd9, 0x27, 0xb5, 0x4d, 0x7b, 0x82, 0xef, 0x6f, 0x9c, 0x59, 0xe9, + 0xb1, 0x1e, 0x93, 0x7c, 0x27, 0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0xe2, 0x3e, 0x8b, 0xf7, 0x3c, 0x1c, 0x04, 0x31, 0xe1, 0x5c, 0x77, 0xc3, 0xfa, + 0x38, 0x81, 0x65, 0x2a, 0x4d, 0xe0, 0x29, 0x15, 0xba, 0x44, 0x20, 0x77, 0x49, 0x23, 0x9b, 0x0a, + 0xb0, 0x31, 0x98, 0x1f, 0x0c, 0xbb, 0x7b, 0x64, 0xa4, 0x1b, 0x61, 0xe5, 0x90, 0xca, 0x36, 0xa3, + 0x91, 0x73, 0x69, 0x9c, 0x40, 0x6d, 0x97, 0x26, 0x70, 0x51, 0xf9, 0x56, 0x6b, 0xf4, 0xec, 0xa7, + 0xf5, 0x15, 0x7d, 0x4d, 0x7e, 0x3c, 0x1a, 0x08, 0xd6, 0xde, 0x1e, 0x76, 0xbf, 0x24, 0x23, 0x57, + 0x6f, 0xb0, 0x3f, 0x06, 0x15, 0x3e, 0xe4, 0x03, 0x12, 0x05, 0x52, 0xc9, 0x55, 0xe7, 0x9d, 0x71, + 0x02, 0x0d, 0x94, 0x26, 0x70, 0x49, 0xb9, 0xd3, 0x00, 0x72, 0x0d, 0x65, 0xdf, 0x01, 0xf3, 0x5c, + 0x60, 0x31, 0x54, 0x6a, 0x5b, 0xba, 0x88, 0x4c, 0x39, 0xcc, 0xb8, 0x30, 0x15, 0x71, 0x58, 0x14, + 0xdc, 0x92, 0x96, 0xce, 0xff, 0xb3, 0x4c, 0xd5, 0xae, 0x3c, 0x53, 0xb5, 0x46, 0xae, 0x26, 0xb2, + 0x43, 0x0b, 0xb6, 0x47, 0x22, 0x2e, 0x65, 0x56, 0x53, 0xfd, 0xf3, 0x6b, 0x02, 0x3f, 0xe8, 0x51, + 0xb1, 0x3b, 0xec, 0xb6, 0x7d, 0x16, 0xea, 0xb9, 0xa6, 0xff, 0x59, 0xe7, 0xc1, 0x5e, 0x47, 0x8c, + 0x06, 0x84, 0xb7, 0xaf, 0x45, 0x22, 0x0b, 0xa1, 0xf6, 0xe7, 0x21, 0xd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d, 0x50, 0xb9, 0x4f, 0xba, 0x9c, 0x0a, 0xf5, + 0x92, 0x55, 0xa5, 0x30, 0x50, 0x9a, 0xc0, 0x86, 0x72, 0xa2, 0x81, 0xa2, 0x0f, 0x63, 0x64, 0x07, + 0xe0, 0x04, 0x27, 0xfe, 0x30, 0xa6, 0x62, 0xe4, 0xf9, 0x2c, 0x12, 0xd8, 0x17, 0xf2, 0x0e, 0x6b, + 0xce, 0x27, 0xd9, 0xac, 0x2e, 0x73, 0x69, 0x02, 0xcf, 0xe9, 0xa1, 0x51, 0x62, 0x8a, 0xde, 0x97, + 0x0d, 0x79, 0x45, 0x71, 0x59, 0xa2, 0x01, 0x11, 0x98, 0xf6, 0xcd, 0x48, 0x91, 0x89, 0x6a, 0x28, + 0x4f, 0x54, 0x03, 0x53, 0x89, 0x6a, 0xac, 0x20, 0xff, 0x87, 0xb3, 0x60, 0xf1, 0x6b, 0xf3, 0x96, + 0x96, 0xd3, 0xff, 0x3a, 0x58, 0x28, 0x6a, 0x57, 0x17, 0x43, 0xea, 0xb2, 0x88, 0xe7, 0xba, 0x2c, + 0xa2, 0xc8, 0xad, 0x17, 0x64, 0x6e, 0x5f, 0x03, 0x0b, 0x94, 0x7b, 0x21, 0x11, 0x58, 0x3e, 0x2a, + 0x65, 0x79, 0xaa, 0xca, 0x57, 0x11, 0xcf, 0x7d, 0x15, 0x51, 0xe4, 0x02, 0xca, 0x27, 0x3f, 0x4a, + 0xdf, 0x81, 0x8a, 0x79, 0xd4, 0x67, 0xf2, 0xae, 0x5f, 0x3c, 0xff, 0xca, 0x81, 0x34, 0x75, 0x96, + 0xec, 0x09, 0x3f, 0x52, 0x3a, 0xca, 0x5f, 0xfe, 0x5a, 0x47, 0xe6, 0xd5, 0xef, 0x1a, 0x0a, 0x3d, + 0x9b, 0x03, 0xf6, 0xe1, 0xed, 0x59, 0xff, 0x4f, 0xc6, 0xc9, 0x2e, 0xa1, 0xbd, 0x5d, 0x21, 0xaf, + 0x64, 0x4e, 0xf5, 0x7f, 0x89, 0xca, 0xfb, 0xbf, 0x44, 0x20, 0x77, 0xc9, 0x20, 0x5f, 0x48, 0xc0, + 0xde, 0x07, 0xcb, 0xe5, 0xbf, 0xa0, 0x66, 0xdf, 0xc4, 0xe0, 0x5b, 0xf2, 0xa7, 0xff, 0x42, 0x7a, + 0x60, 0x81, 0x65, 0x1a, 0x51, 0x41, 0x71, 0xdf, 0xeb, 0xe2, 0x3e, 0x8e, 0x7c, 0x23, 0xf8, 0x3b, + 0xaf, 0xf5, 0xb3, 0x54, 0x76, 0x92, 0x1f, 0xbd, 0x44, 0x20, 0x77, 0x49, 0x23, 0x8e, 0x02, 0x6c, + 0x0c, 0x2a, 0x26, 0xb2, 0x6a, 0x8f, 0xcf, 0x5f, 0x2b, 0x72, 0x25, 0x8f, 0xa8, 0x8b, 0x39, 0x89, + 0x64, 0x28, 0xe7, 0xe6, 0xd3, 0x17, 0x4d, 0xeb, 0xf9, 0x8b, 0xa6, 0xf5, 0xfb, 0x8b, 0xa6, 0xf5, + 0xe8, 0x65, 0x73, 0xe6, 0xf9, 0xcb, 0xe6, 0xcc, 0x2f, 0x2f, 0x9b, 0x33, 0xdf, 0x7c, 0x54, 0x88, + 0xa3, 0x15, 0x14, 0x11, 0x61, 0x3e, 0xd7, 0xfd, 0x5d, 0x4c, 0xa3, 0xce, 0x41, 0xfe, 0x1f, 0x1c, + 0x32, 0x72, 0x77, 0x5e, 0x16, 0xe3, 0xd2, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x1e, 0x4a, 0x90, + 0xa8, 0x01, 0x11, 0x00, 0x00, } func (this *ResourceNode) Equal(that interface{}) bool { @@ -703,7 +716,7 @@ func (this *ResourceNode) Equal(that interface{}) bool { if this.OwnerAddress != that1.OwnerAddress { return false } - if !this.Description.Equal(that1.Description) { + if !this.Description.Equal(&that1.Description) { return false } if !this.CreationTime.Equal(that1.CreationTime) { @@ -754,7 +767,7 @@ func (this *MetaNode) Equal(that interface{}) bool { if this.OwnerAddress != that1.OwnerAddress { return false } - if !this.Description.Equal(that1.Description) { + if !this.Description.Equal(&that1.Description) { return false } if !this.CreationTime.Equal(that1.CreationTime) { @@ -818,6 +831,16 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + { + size, err := m.ResourceNodeMinStaking.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRegister(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 if m.ResourceNodeRegEnabled { i-- if m.ResourceNodeRegEnabled { @@ -833,21 +856,21 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x20 } - n1, err1 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.UnbondingCompletionTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.UnbondingCompletionTime):]) - if err1 != nil { - return 0, err1 - } - i -= n1 - i = encodeVarintRegister(dAtA, i, uint64(n1)) - i-- - dAtA[i] = 0x1a - n2, err2 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.UnbondingThreasholdTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.UnbondingThreasholdTime):]) + n2, err2 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.UnbondingCompletionTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.UnbondingCompletionTime):]) if err2 != nil { return 0, err2 } i -= n2 i = encodeVarintRegister(dAtA, i, uint64(n2)) i-- + dAtA[i] = 0x1a + n3, err3 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.UnbondingThreasholdTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.UnbondingThreasholdTime):]) + if err3 != nil { + return 0, err3 + } + i -= n3 + i = encodeVarintRegister(dAtA, i, uint64(n3)) + i-- dAtA[i] = 0x12 if len(m.BondDenom) > 0 { i -= len(m.BondDenom) @@ -894,26 +917,24 @@ func (m *ResourceNode) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x48 } - n3, err3 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.CreationTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.CreationTime):]) - if err3 != nil { - return 0, err3 + n4, err4 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.CreationTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.CreationTime):]) + if err4 != nil { + return 0, err4 } - i -= n3 - i = encodeVarintRegister(dAtA, i, uint64(n3)) + i -= n4 + i = encodeVarintRegister(dAtA, i, uint64(n4)) i-- dAtA[i] = 0x42 - if m.Description != nil { - { - size, err := m.Description.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRegister(dAtA, i, uint64(size)) + { + size, err := m.Description.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x3a + i -= size + i = encodeVarintRegister(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x3a if len(m.OwnerAddress) > 0 { i -= len(m.OwnerAddress) copy(dAtA[i:], m.OwnerAddress) @@ -988,26 +1009,24 @@ func (m *MetaNode) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - n6, err6 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.CreationTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.CreationTime):]) - if err6 != nil { - return 0, err6 + n7, err7 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.CreationTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.CreationTime):]) + if err7 != nil { + return 0, err7 } - i -= n6 - i = encodeVarintRegister(dAtA, i, uint64(n6)) + i -= n7 + i = encodeVarintRegister(dAtA, i, uint64(n7)) i-- dAtA[i] = 0x42 - if m.Description != nil { - { - size, err := m.Description.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRegister(dAtA, i, uint64(size)) + { + size, err := m.Description.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x3a + i -= size + i = encodeVarintRegister(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x3a if len(m.OwnerAddress) > 0 { i -= len(m.OwnerAddress) copy(dAtA[i:], m.OwnerAddress) @@ -1082,12 +1101,12 @@ func (m *MetaNodeRegistrationVotePool) MarshalToSizedBuffer(dAtA []byte) (int, e _ = i var l int _ = l - n9, err9 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.ExpireTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.ExpireTime):]) - if err9 != nil { - return 0, err9 + n10, err10 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.ExpireTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.ExpireTime):]) + if err10 != nil { + return 0, err10 } - i -= n9 - i = encodeVarintRegister(dAtA, i, uint64(n9)) + i -= n10 + i = encodeVarintRegister(dAtA, i, uint64(n10)) i-- dAtA[i] = 0x22 if len(m.RejectList) > 0 { @@ -1274,12 +1293,12 @@ func (m *UnbondingNodeEntry) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x1a } - n10, err10 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.CompletionTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.CompletionTime):]) - if err10 != nil { - return 0, err10 + n11, err11 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.CompletionTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.CompletionTime):]) + if err11 != nil { + return 0, err11 } - i -= n10 - i = encodeVarintRegister(dAtA, i, uint64(n10)) + i -= n11 + i = encodeVarintRegister(dAtA, i, uint64(n11)) i-- dAtA[i] = 0x12 if m.CreationHeight != 0 { @@ -1321,6 +1340,8 @@ func (m *Params) Size() (n int) { if m.ResourceNodeRegEnabled { n += 2 } + l = m.ResourceNodeMinStaking.Size() + n += 1 + l + sovRegister(uint64(l)) return n } @@ -1350,10 +1371,8 @@ func (m *ResourceNode) Size() (n int) { if l > 0 { n += 1 + l + sovRegister(uint64(l)) } - if m.Description != nil { - l = m.Description.Size() - n += 1 + l + sovRegister(uint64(l)) - } + l = m.Description.Size() + n += 1 + l + sovRegister(uint64(l)) l = github_com_gogo_protobuf_types.SizeOfStdTime(m.CreationTime) n += 1 + l + sovRegister(uint64(l)) if m.NodeType != 0 { @@ -1390,10 +1409,8 @@ func (m *MetaNode) Size() (n int) { if l > 0 { n += 1 + l + sovRegister(uint64(l)) } - if m.Description != nil { - l = m.Description.Size() - n += 1 + l + sovRegister(uint64(l)) - } + l = m.Description.Size() + n += 1 + l + sovRegister(uint64(l)) l = github_com_gogo_protobuf_types.SizeOfStdTime(m.CreationTime) n += 1 + l + sovRegister(uint64(l)) return n @@ -1671,6 +1688,39 @@ func (m *Params) Unmarshal(dAtA []byte) error { } } m.ResourceNodeRegEnabled = bool(v != 0) + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResourceNodeMinStaking", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRegister + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRegister + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRegister + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ResourceNodeMinStaking.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipRegister(dAtA[iNdEx:]) @@ -1783,7 +1833,7 @@ func (m *ResourceNode) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.Pubkey == nil { - m.Pubkey = &types.Any{} + m.Pubkey = &types1.Any{} } if err := m.Pubkey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -1823,7 +1873,7 @@ func (m *ResourceNode) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Status |= types1.BondStatus(b&0x7F) << shift + m.Status |= types2.BondStatus(b&0x7F) << shift if b < 0x80 { break } @@ -1923,9 +1973,6 @@ func (m *ResourceNode) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Description == nil { - m.Description = &Description{} - } if err := m.Description.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -2128,7 +2175,7 @@ func (m *MetaNode) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.Pubkey == nil { - m.Pubkey = &types.Any{} + m.Pubkey = &types1.Any{} } if err := m.Pubkey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -2168,7 +2215,7 @@ func (m *MetaNode) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Status |= types1.BondStatus(b&0x7F) << shift + m.Status |= types2.BondStatus(b&0x7F) << shift if b < 0x80 { break } @@ -2268,9 +2315,6 @@ func (m *MetaNode) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Description == nil { - m.Description = &Description{} - } if err := m.Description.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } diff --git a/x/register/types/resource_node.go b/x/register/types/resource_node.go index 32323176..622c4ba5 100644 --- a/x/register/types/resource_node.go +++ b/x/register/types/resource_node.go @@ -74,7 +74,7 @@ func (v ResourceNodes) Validate() error { // NewResourceNode - initialize a new resource node func NewResourceNode(networkAddr stratos.SdsAddress, pubKey cryptotypes.PubKey, ownerAddr sdk.AccAddress, - description *Description, nodeType NodeType, creationTime time.Time) (ResourceNode, error) { + description Description, nodeType NodeType, creationTime time.Time) (ResourceNode, error) { pkAny, err := codectypes.NewAnyWithValue(pubKey) if err != nil { return ResourceNode{}, err From 1cd8ebfc6914a6199b337c7264743df4500c0e80 Mon Sep 17 00:00:00 2001 From: Xiong Date: Tue, 18 Apr 2023 15:13:07 -0400 Subject: [PATCH 55/95] Add not null constraint & json tags to proto files. --- proto/stratos/register/v1/tx.proto | 2 + x/register/client/cli/tx.go | 4 +- x/register/client/rest/tx.go | 4 +- x/register/keeper/msg_server.go | 4 +- x/register/types/msg.go | 8 +- x/register/types/registration.go | 4 +- x/register/types/tx.pb.go | 263 ++++++++++++++--------------- 7 files changed, 138 insertions(+), 151 deletions(-) diff --git a/proto/stratos/register/v1/tx.proto b/proto/stratos/register/v1/tx.proto index 64b789e7..4f0b8050 100644 --- a/proto/stratos/register/v1/tx.proto +++ b/proto/stratos/register/v1/tx.proto @@ -70,6 +70,7 @@ message MsgCreateResourceNode { (gogoproto.moretags) = "yaml:\"owner_address\"" ]; Description description = 5 [ + (gogoproto.nullable) = false, (gogoproto.jsontag) = "description", (gogoproto.moretags) = "yaml:\"description\"" ]; @@ -103,6 +104,7 @@ message MsgCreateMetaNode { (gogoproto.moretags) = "yaml:\"owner_address\"" ]; Description description = 5 [ + (gogoproto.nullable) = false, (gogoproto.jsontag) = "description", (gogoproto.moretags) = "yaml:\"description\"" ]; diff --git a/x/register/client/cli/tx.go b/x/register/client/cli/tx.go index 52176471..e1b2887d 100644 --- a/x/register/client/cli/tx.go +++ b/x/register/client/cli/tx.go @@ -496,7 +496,7 @@ func newBuildUpdateResourceNodeMsg(clientCtx client.Context, txf tx.Factory, fs if t := nodeType.Type(); t == "UNKNOWN" { return txf, nil, types.ErrNodeType } - msg := types.NewMsgUpdateResourceNode(*description, nodeTypeVal, networkAddr, ownerAddr) + msg := types.NewMsgUpdateResourceNode(description, nodeTypeVal, networkAddr, ownerAddr) return txf, msg, nil } @@ -526,7 +526,7 @@ func newBuildUpdateMetaNodeMsg(clientCtx client.Context, txf tx.Factory, fs *fla details, ) - msg := types.NewMsgUpdateMetaNode(*description, networkAddr, ownerAddr) + msg := types.NewMsgUpdateMetaNode(description, networkAddr, ownerAddr) return txf, msg, nil } diff --git a/x/register/client/rest/tx.go b/x/register/client/rest/tx.go index 81cb683b..da1fc939 100644 --- a/x/register/client/rest/tx.go +++ b/x/register/client/rest/tx.go @@ -166,7 +166,7 @@ func postCreateResourceNodeHandlerFn(cliCtx client.Context) http.HandlerFunc { return } - msg, err := types.NewMsgCreateResourceNode(networkAddr, pubKey, req.Amount, ownerAddr, &req.Description, + msg, err := types.NewMsgCreateResourceNode(networkAddr, pubKey, req.Amount, ownerAddr, req.Description, req.NodeType) if err := msg.ValidateBasic(); err != nil { rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) @@ -206,7 +206,7 @@ func postCreateMetaNodeHandlerFn(cliCtx client.Context) http.HandlerFunc { rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) return } - msg, err := types.NewMsgCreateMetaNode(networkAddr, pubKey, req.Amount, ownerAddr, &req.Description) + msg, err := types.NewMsgCreateMetaNode(networkAddr, pubKey, req.Amount, ownerAddr, req.Description) if err != nil { rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) return diff --git a/x/register/keeper/msg_server.go b/x/register/keeper/msg_server.go index 254073b5..20ef05a8 100644 --- a/x/register/keeper/msg_server.go +++ b/x/register/keeper/msg_server.go @@ -48,7 +48,7 @@ func (k msgServer) HandleMsgCreateResourceNode(goCtx context.Context, msg *types return &types.MsgCreateResourceNodeResponse{}, sdkerrors.Wrap(types.ErrInvalidOwnerAddr, err.Error()) } - ozoneLimitChange, err := k.RegisterResourceNode(ctx, networkAddr, pk, ownerAddress, *msg.Description, types.NodeType(msg.NodeType), msg.GetValue()) + ozoneLimitChange, err := k.RegisterResourceNode(ctx, networkAddr, pk, ownerAddress, msg.Description, types.NodeType(msg.NodeType), msg.GetValue()) if err != nil { return nil, sdkerrors.Wrap(types.ErrRegisterResourceNode, err.Error()) } @@ -89,7 +89,7 @@ func (k msgServer) HandleMsgCreateMetaNode(goCtx context.Context, msg *types.Msg return &types.MsgCreateMetaNodeResponse{}, sdkerrors.Wrap(types.ErrInvalidOwnerAddr, err.Error()) } - ozoneLimitChange, err := k.RegisterMetaNode(ctx, networkAddr, pk, ownerAddress, *msg.Description, msg.GetValue()) + ozoneLimitChange, err := k.RegisterMetaNode(ctx, networkAddr, pk, ownerAddress, msg.Description, msg.GetValue()) if err != nil { return nil, sdkerrors.Wrap(types.ErrRegisterMetaNode, err.Error()) } diff --git a/x/register/types/msg.go b/x/register/types/msg.go index 9b21b70b..cb625583 100644 --- a/x/register/types/msg.go +++ b/x/register/types/msg.go @@ -37,7 +37,7 @@ const ( // NewMsgCreateResourceNode NewMsg creates a new Msg instance func NewMsgCreateResourceNode(networkAddr stratos.SdsAddress, pubKey cryptotypes.PubKey, //nolint:interfacer - value sdk.Coin, ownerAddr sdk.AccAddress, description *Description, nodeType uint32, + value sdk.Coin, ownerAddr sdk.AccAddress, description Description, nodeType uint32, ) (*MsgCreateResourceNode, error) { var pkAny *codectypes.Any if pubKey != nil { @@ -93,7 +93,7 @@ func (msg MsgCreateResourceNode) ValidateBasic() error { return ErrEmptyMoniker } - if *msg.GetDescription() == (Description{}) { + if msg.GetDescription() == (Description{}) { return ErrEmptyDescription } @@ -127,7 +127,7 @@ func (msg MsgCreateResourceNode) UnpackInterfaces(unpacker codectypes.AnyUnpacke // NewMsgCreateMetaNode creates a new Msg instance func NewMsgCreateMetaNode(networkAddr stratos.SdsAddress, pubKey cryptotypes.PubKey, //nolint:interfacer - value sdk.Coin, ownerAddr sdk.AccAddress, description *Description, + value sdk.Coin, ownerAddr sdk.AccAddress, description Description, ) (*MsgCreateMetaNode, error) { var pkAny *codectypes.Any if pubKey != nil { @@ -182,7 +182,7 @@ func (msg MsgCreateMetaNode) ValidateBasic() error { return ErrEmptyMoniker } - if *msg.GetDescription() == (Description{}) { + if msg.GetDescription() == (Description{}) { return ErrEmptyDescription } diff --git a/x/register/types/registration.go b/x/register/types/registration.go index 80de4f49..7acf56d6 100644 --- a/x/register/types/registration.go +++ b/x/register/types/registration.go @@ -15,8 +15,8 @@ const ( ) // NewDescription returns a new Description with the provided values. -func NewDescription(moniker, identity, website, securityContact, details string) *Description { - return &Description{ +func NewDescription(moniker, identity, website, securityContact, details string) Description { + return Description{ Moniker: moniker, Identity: identity, Website: website, diff --git a/x/register/types/tx.pb.go b/x/register/types/tx.pb.go index 0dfb9260..b1981146 100644 --- a/x/register/types/tx.pb.go +++ b/x/register/types/tx.pb.go @@ -35,12 +35,12 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // MsgCreateResourceNode encapsulates an MsgCreateResourceNodeTx transaction as an SDK message. type MsgCreateResourceNode struct { - NetworkAddress string `protobuf:"bytes,1,opt,name=network_address,json=networkAddress,proto3" json:"network_address" yaml:"network_address"` - Pubkey *types.Any `protobuf:"bytes,2,opt,name=pubkey,proto3" json:"pubkey" yaml:"pubkey"` - Value types1.Coin `protobuf:"bytes,3,opt,name=value,proto3" json:"value" yaml:"value"` - OwnerAddress string `protobuf:"bytes,4,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address" yaml:"owner_address"` - Description *Description `protobuf:"bytes,5,opt,name=description,proto3" json:"description" yaml:"description"` - NodeType uint32 `protobuf:"varint,6,opt,name=node_type,json=nodeType,proto3" json:"node_type" yaml:"node_type"` + NetworkAddress string `protobuf:"bytes,1,opt,name=network_address,json=networkAddress,proto3" json:"network_address" yaml:"network_address"` + Pubkey *types.Any `protobuf:"bytes,2,opt,name=pubkey,proto3" json:"pubkey" yaml:"pubkey"` + Value types1.Coin `protobuf:"bytes,3,opt,name=value,proto3" json:"value" yaml:"value"` + OwnerAddress string `protobuf:"bytes,4,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address" yaml:"owner_address"` + Description Description `protobuf:"bytes,5,opt,name=description,proto3" json:"description" yaml:"description"` + NodeType uint32 `protobuf:"varint,6,opt,name=node_type,json=nodeType,proto3" json:"node_type" yaml:"node_type"` } func (m *MsgCreateResourceNode) Reset() { *m = MsgCreateResourceNode{} } @@ -104,11 +104,11 @@ func (m *MsgCreateResourceNode) GetOwnerAddress() string { return "" } -func (m *MsgCreateResourceNode) GetDescription() *Description { +func (m *MsgCreateResourceNode) GetDescription() Description { if m != nil { return m.Description } - return nil + return Description{} } func (m *MsgCreateResourceNode) GetNodeType() uint32 { @@ -157,11 +157,11 @@ var xxx_messageInfo_MsgCreateResourceNodeResponse proto.InternalMessageInfo // MsgCreateMetaNode encapsulates an MsgCreateMetaNodeTx transaction as an SDK message. type MsgCreateMetaNode struct { - NetworkAddress string `protobuf:"bytes,1,opt,name=network_address,json=networkAddress,proto3" json:"network_address" yaml:"network_address"` - Pubkey *types.Any `protobuf:"bytes,2,opt,name=pubkey,proto3" json:"pubkey" yaml:"pubkey"` - Value types1.Coin `protobuf:"bytes,3,opt,name=value,proto3" json:"value" yaml:"value"` - OwnerAddress string `protobuf:"bytes,4,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address" yaml:"owner_address"` - Description *Description `protobuf:"bytes,5,opt,name=description,proto3" json:"description" yaml:"description"` + NetworkAddress string `protobuf:"bytes,1,opt,name=network_address,json=networkAddress,proto3" json:"network_address" yaml:"network_address"` + Pubkey *types.Any `protobuf:"bytes,2,opt,name=pubkey,proto3" json:"pubkey" yaml:"pubkey"` + Value types1.Coin `protobuf:"bytes,3,opt,name=value,proto3" json:"value" yaml:"value"` + OwnerAddress string `protobuf:"bytes,4,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address" yaml:"owner_address"` + Description Description `protobuf:"bytes,5,opt,name=description,proto3" json:"description" yaml:"description"` } func (m *MsgCreateMetaNode) Reset() { *m = MsgCreateMetaNode{} } @@ -225,11 +225,11 @@ func (m *MsgCreateMetaNode) GetOwnerAddress() string { return "" } -func (m *MsgCreateMetaNode) GetDescription() *Description { +func (m *MsgCreateMetaNode) GetDescription() Description { if m != nil { return m.Description } - return nil + return Description{} } // MsgCreateMetaNodeResponse defines the CreateMetaNode response type @@ -1083,98 +1083,97 @@ func init() { func init() { proto.RegisterFile("stratos/register/v1/tx.proto", fileDescriptor_75d4b90d7a185a31) } var fileDescriptor_75d4b90d7a185a31 = []byte{ - // 1443 bytes of a gzipped FileDescriptorProto + // 1434 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0xcf, 0x6f, 0x1b, 0x45, 0x14, 0xce, 0xda, 0x69, 0x69, 0xa6, 0x4d, 0xda, 0xb8, 0x49, 0xe3, 0xb8, 0x89, 0xc7, 0x9d, 0xd2, - 0x90, 0x12, 0xb2, 0x5b, 0x27, 0x45, 0x2d, 0x95, 0x00, 0xd5, 0x2d, 0x12, 0x08, 0x25, 0x45, 0x4b, - 0xe9, 0x01, 0xa9, 0xb2, 0xd6, 0xf6, 0xd4, 0x5d, 0x25, 0xde, 0xb1, 0x76, 0xd7, 0x6e, 0x7d, 0xe0, - 0xc2, 0xa9, 0x27, 0x84, 0xc4, 0x81, 0x13, 0x52, 0xc5, 0x91, 0x13, 0x07, 0x90, 0x38, 0x23, 0x21, - 0x15, 0x4e, 0x95, 0x90, 0x10, 0x70, 0x18, 0xa1, 0x96, 0xd3, 0x22, 0x81, 0xb4, 0x7f, 0x01, 0xda, - 0x99, 0xdd, 0x59, 0xef, 0x7a, 0x77, 0x1b, 0xd3, 0xf6, 0x82, 0x72, 0xb2, 0xe7, 0xbd, 0x6f, 0x66, - 0xbe, 0xf7, 0xde, 0x37, 0xbf, 0x16, 0x2c, 0x59, 0xb6, 0xa9, 0xd9, 0xc4, 0x52, 0x4c, 0xdc, 0xd6, - 0x2d, 0x1b, 0x9b, 0x4a, 0xbf, 0xaa, 0xd8, 0x77, 0xe5, 0xae, 0x49, 0x6c, 0x52, 0x38, 0xee, 0x7b, - 0xe5, 0xc0, 0x2b, 0xf7, 0xab, 0xa5, 0xb9, 0x36, 0x69, 0x13, 0xe6, 0x57, 0xbc, 0x7f, 0x1c, 0x5a, - 0x5a, 0x6c,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 0x1e, 0xa8, 0x7e, 0x87, 0xc2, 0x36, 0x38, 0xd0, - 0xd7, 0x76, 0x7b, 0xb8, 0x98, 0x67, 0x33, 0x2c, 0xca, 0x3e, 0xda, 0x4b, 0x82, 0xec, 0x27, 0x41, - 0xbe, 0x42, 0x74, 0xa3, 0xb6, 0xfc, 0x80, 0xc2, 0x09, 0x87, 0x42, 0x8e, 0x77, 0x29, 0x3c, 0xc2, - 0x67, 0x62, 0x4d, 0xa4, 0x72, 0x73, 0x61, 0x1b, 0x4c, 0x93, 0x3b, 0x06, 0x36, 0x45, 0x22, 0x26, - 0x59, 0x22, 0xce, 0x3a, 0x14, 0x46, 0x1d, 0x2e, 0x85, 0x73, 0x7c, 0x80, 0x88, 0x19, 0xa9, 0x47, - 0x58, 0x3b, 0x48, 0x81, 0x0e, 0x0e, 0xb7, 0xb0, 0xd5, 0x34, 0xf5, 0xae, 0x57, 0xe9, 0xe2, 0x01, - 0xc6, 0xb2, 0x22, 0x27, 0xa8, 0x49, 0xbe, 0x1a, 0xe2, 0x6a, 0x67, 0x1c, 0x0a, 0x87, 0x3b, 0xba, - 0x14, 0x16, 0xf8, 0x6c, 0x43, 0x46, 0xa4, 0x0e, 0x43, 0x0a, 0x6f, 0x80, 0x29, 0x83, 0xb4, 0x70, - 0xdd, 0x1e, 0x74, 0x71, 0xf1, 0x60, 0x45, 0x5a, 0x9d, 0xae, 0x9d, 0x72, 0x28, 0x0c, 0x8d, 0x2e, - 0x85, 0xc7, 0xfc, 0xca, 0x05, 0x26, 0xa4, 0x1e, 0xf2, 0xfe, 0x5f, 0xf7, 0xfe, 0x42, 0xb0, 0x9c, - 0x28, 0x0f, 0x15, 0x5b, 0x5d, 0x62, 0x58, 0x18, 0xfd, 0x96, 0x07, 0xb3, 0x02, 0xb1, 0x85, 0x6d, - 0x6d, 0x5f, 0x3c, 0xff, 0x17, 0xf1, 0xa0, 0x93, 0x60, 0x71, 0xa4, 0xb4, 0xa2, 0xf0, 0xbf, 0x48, -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 0x18, 0x00, 0x00, + 0x90, 0x12, 0xbc, 0x5b, 0x27, 0x45, 0x2d, 0x95, 0x00, 0xd5, 0x2d, 0x12, 0x08, 0x25, 0x45, 0x4b, + 0xe9, 0x01, 0xa9, 0xb2, 0xd6, 0xf6, 0xd4, 0xb5, 0x12, 0xef, 0x58, 0xbb, 0x6b, 0xb7, 0x3e, 0x70, + 0xe1, 0xd4, 0x13, 0x42, 0xe2, 0xc0, 0xb5, 0x70, 0xe4, 0xc4, 0x01, 0x24, 0xce, 0x48, 0x48, 0x85, + 0x53, 0x25, 0x24, 0x84, 0x90, 0x18, 0xa1, 0x96, 0xd3, 0x22, 0x81, 0xb4, 0x7f, 0x01, 0xda, 0x99, + 0xdd, 0xd9, 0x1f, 0xde, 0xdd, 0x26, 0xb4, 0xb9, 0xa0, 0x9e, 0xec, 0x79, 0xef, 0x9b, 0x99, 0xef, + 0xbd, 0xf7, 0xcd, 0xaf, 0x05, 0x4b, 0xa6, 0x65, 0x68, 0x16, 0x31, 0x15, 0x03, 0x77, 0xba, 0xa6, + 0x85, 0x0d, 0x65, 0x58, 0x53, 0xac, 0xbb, 0x72, 0xdf, 0x20, 0x16, 0x29, 0x1c, 0xf7, 0xbc, 0xb2, + 0xef, 0x95, 0x87, 0xb5, 0xd2, 0x5c, 0x87, 0x74, 0x08, 0xf3, 0x2b, 0xee, 0x3f, 0x0e, 0x2d, 0x2d, + 0x76, 0x08, 0xe9, 0xec, 0x60, 0x85, 0xb5, 0x9a, 0x83, 0x5b, 0x8a, 0xa6, 0x8f, 0x3c, 0xd7, 0x92, + 0xe7, 0xd2, 0xfa, 0x5d, 0x45, 0xd3, 0x75, 0x62, 0x69, 0x56, 0x97, 0xe8, 0xa6, 0xdf, 0xb1, 0x45, + 0xcc, 0x1e, 0x31, 0x1b, 0x7c, 0x44, 0xde, 0xf0, 0x5c, 0x28, 0x89, 0x9c, 0xa0, 0xc2, 0x31, 0x65, + 0xde, 0x43, 0x69, 0x6a, 0x26, 0x56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, 0x29, 0x85, 0x22, 0x97, + 0xe8, 0xda, 0xee, 0xe6, 0xe7, 0x0a, 0xdd, 0xd8, 0x03, 0x78, 0x6f, 0x02, 0x0d, 0x3e, 0x69, 0x70, + 0x81, 0xfe, 0x28, 0x81, 0x53, 0x82, 0x77, 0xea, 0xb5, 0xe4, 0x5c, 0x1a, 0x9f, 0xb4, 0x1e, 0xa5, + 0x8b, 0x7b, 0xed, 0x21, 0xc2, 0xb8, 0xc8, 0xc2, 0x58, 0x47, 0xe7, 0x12, 0xc3, 0x08, 0xf8, 0x1b, + 0xa1, 0x01, 0x1a, 0xee, 0x21, 0x5a, 0xdf, 0x7a, 0xf0, 0xa8, 0x2c, 0x3d, 0x7c, 0x54, 0x96, 0xfe, + 0x78, 0x54, 0x96, 0x3e, 0x7d, 0x5c, 0x9e, 0x78, 0xf8, 0xb8, 0x3c, 0xf1, 0xeb, 0xe3, 0xf2, 0xc4, + 0x87, 0xe7, 0x43, 0xf7, 0x72, 0x6f, 0x54, 0x1d, 0x5b, 0xfe, 0xdf, 0x6a, 0xeb, 0xb6, 0xd6, 0xd5, + 0x95, 0xbb, 0xc1, 0x44, 0xec, 0xa6, 0xde, 0x3c, 0xc8, 0x3e, 0x60, 0x6e, 0xfc, 0x1b, 0x00, 0x00, + 0xff, 0xff, 0xa6, 0x89, 0x3a, 0xd5, 0x75, 0x18, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1608,18 +1607,16 @@ func (m *MsgCreateResourceNode) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x30 } - if m.Description != nil { - { - size, err := m.Description.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) + { + size, err := m.Description.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x2a + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x2a if len(m.OwnerAddress) > 0 { i -= len(m.OwnerAddress) copy(dAtA[i:], m.OwnerAddress) @@ -1702,18 +1699,16 @@ func (m *MsgCreateMetaNode) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.Description != nil { - { - size, err := m.Description.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) + { + size, err := m.Description.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x2a + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x2a if len(m.OwnerAddress) > 0 { i -= len(m.OwnerAddress) copy(dAtA[i:], m.OwnerAddress) @@ -2397,10 +2392,8 @@ func (m *MsgCreateResourceNode) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - if m.Description != nil { - l = m.Description.Size() - n += 1 + l + sovTx(uint64(l)) - } + l = m.Description.Size() + n += 1 + l + sovTx(uint64(l)) if m.NodeType != 0 { n += 1 + sovTx(uint64(m.NodeType)) } @@ -2436,10 +2429,8 @@ func (m *MsgCreateMetaNode) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - if m.Description != nil { - l = m.Description.Size() - n += 1 + l + sovTx(uint64(l)) - } + l = m.Description.Size() + n += 1 + l + sovTx(uint64(l)) return n } @@ -2895,9 +2886,6 @@ func (m *MsgCreateResourceNode) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Description == nil { - m.Description = &Description{} - } if err := m.Description.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -3183,9 +3171,6 @@ func (m *MsgCreateMetaNode) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Description == nil { - m.Description = &Description{} - } if err := m.Description.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } From 6947c1379f2a16929f1b0b6e924d5847182df646 Mon Sep 17 00:00:00 2001 From: Xiong Date: Wed, 19 Apr 2023 15:35:42 -0400 Subject: [PATCH 56/95] MsgUpdateResourceNodeStake only allow to add stake --- proto/stratos/register/v1/register.proto | 6 +- proto/stratos/register/v1/tx.proto | 4 - x/register/client/cli/tx.go | 12 +- x/register/client/rest/tx.go | 8 +- x/register/keeper/keeper.go | 82 ++++----- x/register/keeper/msg_server.go | 35 ++-- x/register/keeper/params.go | 5 + x/register/keeper/resource_node.go | 26 ++- x/register/keeper/store.go | 6 +- x/register/types/errors.go | 4 +- x/register/types/msg.go | 3 +- x/register/types/params.go | 14 +- x/register/types/register.pb.go | 192 ++++++++++---------- x/register/types/tx.pb.go | 215 +++++++++-------------- 14 files changed, 267 insertions(+), 345 deletions(-) diff --git a/proto/stratos/register/v1/register.proto b/proto/stratos/register/v1/register.proto index 81b30189..f132a01e 100644 --- a/proto/stratos/register/v1/register.proto +++ b/proto/stratos/register/v1/register.proto @@ -37,10 +37,10 @@ message Params { (gogoproto.jsontag) = "resource_node_reg_enabled", (gogoproto.moretags) = "yaml:\"resource_node_reg_enabled\"" ]; - cosmos.base.v1beta1.Coin resource_node_min_staking = 6 [ + cosmos.base.v1beta1.Coin resource_node_min_stake = 6 [ (gogoproto.nullable) = false, - (gogoproto.jsontag) = "resource_node_min_staking", - (gogoproto.moretags) = "yaml:\"resource_node_min_staking\"" + (gogoproto.jsontag) = "resource_node_min_stake", + (gogoproto.moretags) = "yaml:\"resource_node_min_stake\"" ]; } diff --git a/proto/stratos/register/v1/tx.proto b/proto/stratos/register/v1/tx.proto index 4f0b8050..ec13c4ac 100644 --- a/proto/stratos/register/v1/tx.proto +++ b/proto/stratos/register/v1/tx.proto @@ -201,10 +201,6 @@ message MsgUpdateResourceNodeStake { (gogoproto.jsontag) = "owner_address", (gogoproto.moretags) = "yaml:\"owner_address\"" ]; - bool incr_stake = 3 [ - (gogoproto.jsontag) = "incr_stake", - (gogoproto.moretags) = "yaml:\"incr_stake\"" - ]; cosmos.base.v1beta1.Coin stake_delta = 4 [ (gogoproto.nullable) = false, (gogoproto.jsontag) = "stake_delta", diff --git a/x/register/client/cli/tx.go b/x/register/client/cli/tx.go index e1b2887d..67d4b756 100644 --- a/x/register/client/cli/tx.go +++ b/x/register/client/cli/tx.go @@ -274,7 +274,6 @@ func UpdateResourceNodeStakeCmd() *cobra.Command { _ = cmd.MarkFlagRequired(flags.FlagFrom) _ = cmd.MarkFlagRequired(FlagStakeDelta) - _ = cmd.MarkFlagRequired(FlagIncrStake) _ = cmd.MarkFlagRequired(FlagNetworkAddress) return cmd } @@ -541,15 +540,6 @@ func newBuildUpdateResourceNodeStakeMsg(clientCtx client.Context, txf tx.Factory return txf, nil, err } - incrStakeStr, err := fs.GetString(FlagIncrStake) - if err != nil { - return txf, nil, err - } - incrStake, err := strconv.ParseBool(incrStakeStr) - if err != nil { - return txf, nil, err - } - networkAddrStr, _ := fs.GetString(FlagNetworkAddress) networkAddr, err := stratos.SdsAddressFromBech32(networkAddrStr) if err != nil { @@ -558,7 +548,7 @@ func newBuildUpdateResourceNodeStakeMsg(clientCtx client.Context, txf tx.Factory ownerAddr := clientCtx.GetFromAddress() - msg := types.NewMsgUpdateResourceNodeStake(networkAddr, ownerAddr, stakeDelta, incrStake) + msg := types.NewMsgUpdateResourceNodeStake(networkAddr, ownerAddr, stakeDelta) return txf, msg, nil } diff --git a/x/register/client/rest/tx.go b/x/register/client/rest/tx.go index da1fc939..e5e9c119 100644 --- a/x/register/client/rest/tx.go +++ b/x/register/client/rest/tx.go @@ -84,7 +84,6 @@ type ( BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"` NetworkAddress string `json:"network_address" yaml:"network_address"` StakeDelta sdk.Coin `json:"stake_delta" yaml:"stake_delta"` - IncrStake string `json:"incr_stake" yaml:"incr_stake"` } UpdateEffectiveStakeRequest struct { @@ -354,12 +353,7 @@ func postUpdateResourceNodeStakeHandlerFn(cliCtx client.Context) http.HandlerFun return } - incrStake, err := strconv.ParseBool(req.IncrStake) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - msg := types.NewMsgUpdateResourceNodeStake(networkAddr, ownerAddr, req.StakeDelta, incrStake) + msg := types.NewMsgUpdateResourceNodeStake(networkAddr, ownerAddr, req.StakeDelta) if err := msg.ValidateBasic(); err != nil { rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) return diff --git a/x/register/keeper/keeper.go b/x/register/keeper/keeper.go index 362b6942..c3fff105 100644 --- a/x/register/keeper/keeper.go +++ b/x/register/keeper/keeper.go @@ -145,7 +145,7 @@ func (k Keeper) DecreaseOzoneLimitBySubtractStake(ctx sdk.Context, stake sdk.Int return limitToSub.TruncateInt() } -// HasMaxUnbondingMetaNodeEntries - check if unbonding MetaNode has maximum number of entries +// HasMaxUnbondingNodeEntries - check if unbonding node has maximum number of entries func (k Keeper) HasMaxUnbondingNodeEntries(ctx sdk.Context, networkAddr stratos.SdsAddress) bool { ubd, found := k.GetUnbondingNode(ctx, networkAddr) if !found { @@ -282,75 +282,59 @@ func (k Keeper) subtractUBDNodeStake(ctx sdk.Context, ubd types.UnbondingNode, t return k.SubtractResourceNodeStake(ctx, resourceNode, tokenToSub) } -func (k Keeper) UnbondResourceNode(ctx sdk.Context, resourceNode types.ResourceNode, amt sdk.Int, -) (availableTokenAmtBefore, availableTokenAmtAfter sdk.Int, unbondingMatureTime time.Time, err error) { - if resourceNode.GetStatus() == stakingtypes.Unbonding { - return sdk.ZeroInt(), sdk.ZeroInt(), time.Time{}, types.ErrUnbondingNode - } +// Unbond all tokens of resource node +func (k Keeper) UnbondResourceNode(ctx sdk.Context, networkAddr stratos.SdsAddress, ownerAddr sdk.AccAddress, +) (stakeToRemove sdk.Int, unbondingMatureTime time.Time, err error) { - // transfer the node tokens to the not bonded pool - networkAddr, err := stratos.SdsAddressFromBech32(resourceNode.GetNetworkAddress()) - if err != nil { - return sdk.ZeroInt(), sdk.ZeroInt(), time.Time{}, errors.New("invalid network address") + resourceNode, found := k.GetResourceNode(ctx, networkAddr) + if !found { + return sdk.ZeroInt(), time.Time{}, types.ErrNoResourceNodeFound } - ownerAddr, err := sdk.AccAddressFromBech32(resourceNode.GetOwnerAddress()) - if err != nil { - return sdk.ZeroInt(), sdk.ZeroInt(), time.Time{}, errors.New("invalid wallet address") + ownerAddrNode, _ := sdk.AccAddressFromBech32(resourceNode.GetOwnerAddress()) + if !ownerAddrNode.Equals(ownerAddr) { + return sdk.ZeroInt(), time.Time{}, types.ErrInvalidOwnerAddr } - ownerAcc := k.accountKeeper.GetAccount(ctx, ownerAddr) - if ownerAcc == nil { - return sdk.ZeroInt(), sdk.ZeroInt(), time.Time{}, types.ErrNoOwnerAccountFound + if resourceNode.GetStatus() != stakingtypes.Bonded { + return sdk.ZeroInt(), time.Time{}, types.ErrInvalidNodeStat } - // suspended node cannot be unbonded (avoid dup stake decrease with node suspension) - if resourceNode.Suspend { - return sdk.ZeroInt(), sdk.ZeroInt(), time.Time{}, types.ErrInvalidSuspensionStatForUnbondNode + if resourceNode.GetSuspend() { + return sdk.ZeroInt(), time.Time{}, types.ErrInvalidSuspensionStatForUnbondNode + } + if k.HasMaxUnbondingNodeEntries(ctx, networkAddr) { + return sdk.ZeroInt(), time.Time{}, types.ErrMaxUnbondingNodeEntries } - // check if node_token - unbonding_token > amt_to_unbond + // check if node_token - unbonding_token > 0 unbondingStake := k.GetUnbondingNodeBalance(ctx, networkAddr) - - availableStake := resourceNode.Tokens.Sub(unbondingStake) - if availableStake.LT(amt) { - return sdk.ZeroInt(), sdk.ZeroInt(), time.Time{}, types.ErrInsufficientBalance + stakeToRemove = resourceNode.Tokens.Sub(unbondingStake) + if stakeToRemove.LTE(sdk.ZeroInt()) { + return sdk.ZeroInt(), time.Time{}, types.ErrInsufficientBalance } - availableTokenAmtBefore = availableStake - if k.HasMaxUnbondingNodeEntries(ctx, networkAddr) { - return sdk.ZeroInt(), sdk.ZeroInt(), time.Time{}, types.ErrMaxUnbondingNodeEntries - } unbondingMatureTime = calcUnbondingMatureTime(ctx, resourceNode.Status, resourceNode.CreationTime, k.UnbondingThreasholdTime(ctx), k.UnbondingCompletionTime(ctx)) - coin := sdk.NewCoin(k.BondDenom(ctx), amt) - if resourceNode.GetStatus() == stakingtypes.Bonded { - // transfer the node tokens to the not bonded pool - k.bondedToUnbonding(ctx, resourceNode, false, coin) - // not adjusting ozone limit since resourceNode.EffectiveTokens are not changed - //ozoneLimitChange = k.DecreaseOzoneLimitBySubtractStake(ctx, amt) - } - + // transfer the node tokens to the not bonded pool + k.bondedToUnbonding(ctx, resourceNode, false, sdk.NewCoin(k.BondDenom(ctx), stakeToRemove)) // change node status to unbonding if unbonding all available tokens - if amt.Equal(availableStake) { - resourceNode.Status = stakingtypes.Unbonding - - k.SetResourceNode(ctx, resourceNode) - - // decrease resource node count - v := k.GetBondedResourceNodeCnt(ctx) - count := v.Sub(sdk.NewInt(1)) - k.SetBondedResourceNodeCnt(ctx, count) - } + resourceNode.Status = stakingtypes.Unbonding + k.SetResourceNode(ctx, resourceNode) + // decrease resource node count + v := k.GetBondedResourceNodeCnt(ctx) + count := v.Sub(sdk.OneInt()) + k.SetBondedResourceNodeCnt(ctx, count) // set the unbonding mature time and completion height appropriately ctx.Logger().Info(fmt.Sprintf("Calculating mature time: creationTime[%s], threasholdTime[%s], completionTime[%s], matureTime[%s]", resourceNode.CreationTime, k.UnbondingThreasholdTime(ctx), k.UnbondingCompletionTime(ctx), unbondingMatureTime, )) - unbondingNode := k.SetUnbondingNodeEntry(ctx, networkAddr, false, ctx.BlockHeight(), unbondingMatureTime, amt) + unbondingNode := k.SetUnbondingNodeEntry(ctx, networkAddr, false, ctx.BlockHeight(), unbondingMatureTime, stakeToRemove) + // Add to unbonding node queue k.InsertUnbondingNodeQueue(ctx, unbondingNode, unbondingMatureTime) ctx.Logger().Info("Unbonding resource node " + unbondingNode.String() + "\n after mature time" + unbondingMatureTime.String()) - availableTokenAmtAfter = availableTokenAmtBefore.Sub(amt) - return availableTokenAmtBefore, availableTokenAmtAfter, unbondingMatureTime, nil + + return stakeToRemove, unbondingMatureTime, nil } func (k Keeper) UnbondMetaNode(ctx sdk.Context, metaNode types.MetaNode, amt sdk.Int, diff --git a/x/register/keeper/msg_server.go b/x/register/keeper/msg_server.go index 20ef05a8..2a4c1a31 100644 --- a/x/register/keeper/msg_server.go +++ b/x/register/keeper/msg_server.go @@ -26,7 +26,9 @@ func NewMsgServerImpl(keeper Keeper) types.MsgServer { var _ types.MsgServer = msgServer{} -func (k msgServer) HandleMsgCreateResourceNode(goCtx context.Context, msg *types.MsgCreateResourceNode) (*types.MsgCreateResourceNodeResponse, error) { +func (k msgServer) HandleMsgCreateResourceNode(goCtx context.Context, msg *types.MsgCreateResourceNode) ( + *types.MsgCreateResourceNodeResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) if !k.ResourceNodeRegEnabled(ctx) { @@ -110,27 +112,21 @@ func (k msgServer) HandleMsgCreateMetaNode(goCtx context.Context, msg *types.Msg return &types.MsgCreateMetaNodeResponse{}, nil } -func (k msgServer) HandleMsgRemoveResourceNode(goCtx context.Context, msg *types.MsgRemoveResourceNode) (*types.MsgRemoveResourceNodeResponse, error) { +func (k msgServer) HandleMsgRemoveResourceNode(goCtx context.Context, msg *types.MsgRemoveResourceNode) ( + *types.MsgRemoveResourceNodeResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) - p2pAddress, err := stratos.SdsAddressFromBech32(msg.ResourceNodeAddress) + p2pAddress, err := stratos.SdsAddressFromBech32(msg.GetResourceNodeAddress()) if err != nil { return &types.MsgRemoveResourceNodeResponse{}, sdkerrors.Wrap(types.ErrInvalidNetworkAddr, err.Error()) } - resourceNode, found := k.GetResourceNode(ctx, p2pAddress) - if !found { - return &types.MsgRemoveResourceNodeResponse{}, types.ErrNoResourceNodeFound - } - if msg.GetOwnerAddress() != resourceNode.GetOwnerAddress() { - return &types.MsgRemoveResourceNodeResponse{}, types.ErrInvalidOwnerAddr - } - unbondingStake := k.GetUnbondingNodeBalance(ctx, p2pAddress) - availableStake := resourceNode.Tokens.Sub(unbondingStake) - if availableStake.LTE(sdk.ZeroInt()) { - return &types.MsgRemoveResourceNodeResponse{}, types.ErrInsufficientBalance + ownerAddress, err := sdk.AccAddressFromBech32(msg.GetOwnerAddress()) + if err != nil { + return &types.MsgRemoveResourceNodeResponse{}, sdkerrors.Wrap(types.ErrInvalidOwnerAddr, err.Error()) } - _, _, completionTime, err := k.UnbondResourceNode(ctx, resourceNode, availableStake) + stakeToRemove, completionTime, err := k.UnbondResourceNode(ctx, p2pAddress, ownerAddress) if err != nil { return &types.MsgRemoveResourceNodeResponse{}, sdkerrors.Wrap(types.ErrUnbondResourceNode, err.Error()) } @@ -140,7 +136,7 @@ func (k msgServer) HandleMsgRemoveResourceNode(goCtx context.Context, msg *types types.EventTypeUnbondingResourceNode, sdk.NewAttribute(sdk.AttributeKeySender, msg.OwnerAddress), sdk.NewAttribute(types.AttributeKeyResourceNode, msg.ResourceNodeAddress), - sdk.NewAttribute(types.AttributeKeyStakeToRemove, sdk.NewCoin(k.BondDenom(ctx), availableStake).String()), + sdk.NewAttribute(types.AttributeKeyStakeToRemove, sdk.NewCoin(k.BondDenom(ctx), stakeToRemove).String()), sdk.NewAttribute(types.AttributeKeyUnbondingMatureTime, completionTime.Format(time.RFC3339)), ), sdk.NewEvent( @@ -271,7 +267,9 @@ func (k msgServer) HandleMsgUpdateResourceNode(goCtx context.Context, msg *types return &types.MsgUpdateResourceNodeResponse{}, nil } -func (k msgServer) HandleMsgUpdateResourceNodeStake(goCtx context.Context, msg *types.MsgUpdateResourceNodeStake) (*types.MsgUpdateResourceNodeStakeResponse, error) { +func (k msgServer) HandleMsgUpdateResourceNodeStake(goCtx context.Context, msg *types.MsgUpdateResourceNodeStake) ( + *types.MsgUpdateResourceNodeStakeResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) networkAddr, err := stratos.SdsAddressFromBech32(msg.NetworkAddress) @@ -285,7 +283,7 @@ func (k msgServer) HandleMsgUpdateResourceNodeStake(goCtx context.Context, msg * } ozoneLimitChange, availableTokenAmtBefore, availableTokenAmtAfter, completionTime, node, err := - k.UpdateResourceNodeStake(ctx, networkAddr, ownerAddress, msg.GetStakeDelta(), msg.IncrStake) + k.UpdateResourceNodeStake(ctx, networkAddr, ownerAddress, msg.GetStakeDelta()) if err != nil { return nil, sdkerrors.Wrap(types.ErrUpdateResourceNodeStake, err.Error()) } @@ -295,7 +293,6 @@ func (k msgServer) HandleMsgUpdateResourceNodeStake(goCtx context.Context, msg * types.EventTypeUpdateResourceNodeStake, sdk.NewAttribute(sdk.AttributeKeySender, msg.OwnerAddress), sdk.NewAttribute(types.AttributeKeyNetworkAddress, msg.NetworkAddress), - sdk.NewAttribute(types.AttributeKeyIncrStake, strconv.FormatBool(msg.IncrStake)), sdk.NewAttribute(types.AttributeKeyStakeDelta, msg.StakeDelta.String()), sdk.NewAttribute(types.AttributeKeyCurrentStake, sdk.NewCoin(k.BondDenom(ctx), node.Tokens).String()), sdk.NewAttribute(types.AttributeKeyAvailableTokenBefore, sdk.NewCoin(k.BondDenom(ctx), availableTokenAmtBefore).String()), diff --git a/x/register/keeper/params.go b/x/register/keeper/params.go index 4743d753..906bd53c 100644 --- a/x/register/keeper/params.go +++ b/x/register/keeper/params.go @@ -48,3 +48,8 @@ func (k Keeper) ResourceNodeRegEnabled(ctx sdk.Context) (res bool) { k.paramSpace.Get(ctx, types.KeyResourceNodeRegEnabled, &res) return } + +func (k Keeper) ResourceNodeMinStake(ctx sdk.Context) (res sdk.Coin) { + k.paramSpace.Get(ctx, types.KeyResourceNodeMinStake, &res) + return +} diff --git a/x/register/keeper/resource_node.go b/x/register/keeper/resource_node.go index 1dcbdd2d..d4b3e145 100644 --- a/x/register/keeper/resource_node.go +++ b/x/register/keeper/resource_node.go @@ -288,6 +288,9 @@ func (k Keeper) RegisterResourceNode(ctx sdk.Context, networkAddr stratos.SdsAdd if stake.GetDenom() != k.BondDenom(ctx) { return ozoneLimitChange, types.ErrBadDenom } + if stake.IsLT(k.ResourceNodeMinStake(ctx)) { + return ozoneLimitChange, types.ErrInsufficientStake + } resourceNode, err := types.NewResourceNode(networkAddr, pubKey, ownerAddr, description, nodeType, ctx.BlockHeader().Time) if err != nil { @@ -320,8 +323,9 @@ func (k Keeper) UpdateResourceNode(ctx sdk.Context, description types.Descriptio return nil } -func (k Keeper) UpdateResourceNodeStake(ctx sdk.Context, networkAddr stratos.SdsAddress, ownerAddr sdk.AccAddress, stakeDelta sdk.Coin, incrStake bool) ( - ozoneLimitChange, availableTokenAmtBefore, availableTokenAmtAfter sdk.Int, unbondingMatureTime time.Time, resourcenode types.ResourceNode, err error) { +// Add stake only +func (k Keeper) UpdateResourceNodeStake(ctx sdk.Context, networkAddr stratos.SdsAddress, ownerAddr sdk.AccAddress, stakeDelta sdk.Coin) ( + ozoneLimitChange, availableTokenAmtBefore, availableTokenAmtAfter sdk.Int, completionTime time.Time, resourcenode types.ResourceNode, err error) { if stakeDelta.GetDenom() != k.BondDenom(ctx) { return sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroInt(), time.Time{}, types.ResourceNode{}, types.ErrBadDenom @@ -337,20 +341,12 @@ func (k Keeper) UpdateResourceNodeStake(ctx sdk.Context, networkAddr stratos.Sds return sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroInt(), time.Time{}, types.ResourceNode{}, types.ErrInvalidOwnerAddr } - if incrStake { - blockTime := ctx.BlockHeader().Time - ozoneLimitChange, availableTokenAmtBefore, availableTokenAmtAfter, err := k.AddResourceNodeStake(ctx, node, stakeDelta) - if err != nil { - return sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroInt(), time.Time{}, types.ResourceNode{}, err - } - return ozoneLimitChange, availableTokenAmtBefore, availableTokenAmtAfter, blockTime, node, nil - } else { - availableTokenAmtBefore, availableTokenAmtAfter, completionTime, err := k.UnbondResourceNode(ctx, node, stakeDelta.Amount) - if err != nil { - return sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroInt(), time.Time{}, types.ResourceNode{}, err - } - return sdk.ZeroInt(), availableTokenAmtBefore, availableTokenAmtAfter, completionTime, node, nil + completionTime = ctx.BlockHeader().Time + ozoneLimitChange, availableTokenAmtBefore, availableTokenAmtAfter, err = k.AddResourceNodeStake(ctx, node, stakeDelta) + if err != nil { + return sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroInt(), time.Time{}, types.ResourceNode{}, err } + return ozoneLimitChange, availableTokenAmtBefore, availableTokenAmtAfter, completionTime, node, nil } func (k Keeper) UpdateEffectiveStake(ctx sdk.Context, networkAddr stratos.SdsAddress, effectiveStakeAfter sdk.Int) ( diff --git a/x/register/keeper/store.go b/x/register/keeper/store.go index 6df84fa1..8ee9b8de 100644 --- a/x/register/keeper/store.go +++ b/x/register/keeper/store.go @@ -51,7 +51,7 @@ func (k Keeper) IsUnbondable(ctx sdk.Context, unbondAmt sdk.Int) bool { return remaining.ToDec().GTE(unbondAmt.ToDec().Quo(stakeNozRate)) } -// SetUnbondingNode sets the unbonding MetaNode +// SetUnbondingNode sets the unbonding node func (k Keeper) SetUnbondingNode(ctx sdk.Context, ubd types.UnbondingNode) { store := ctx.KVStore(k.storeKey) bz := k.cdc.MustMarshalLengthPrefixed(&ubd) @@ -63,14 +63,14 @@ func (k Keeper) SetUnbondingNode(ctx sdk.Context, ubd types.UnbondingNode) { store.Set(key, bz) } -// RemoveUnbondingNode removes the unbonding MetaNode object +// RemoveUnbondingNode removes the unbonding node object func (k Keeper) RemoveUnbondingNode(ctx sdk.Context, networkAddr stratos.SdsAddress) { store := ctx.KVStore(k.storeKey) key := types.GetUBDNodeKey(networkAddr) store.Delete(key) } -// GetUnbondingNode return a unbonding UnbondingMetaNode +// GetUnbondingNode return a unbonding node func (k Keeper) GetUnbondingNode(ctx sdk.Context, networkAddr stratos.SdsAddress) (ubd types.UnbondingNode, found bool) { store := ctx.KVStore(k.storeKey) key := types.GetUBDNodeKey(networkAddr) diff --git a/x/register/types/errors.go b/x/register/types/errors.go index 2df0e56a..62e2c437 100644 --- a/x/register/types/errors.go +++ b/x/register/types/errors.go @@ -14,6 +14,7 @@ const ( codeErrEmptyResourceNodeAddr codeErrEmptyMetaNodeAddr codeErrBadDenom + codeErrInsufficientStake codeErrResourceNodePubKeyExists codeErrMetaNodePubKeyExists codeErrNoResourceNodeFound @@ -63,7 +64,6 @@ const ( codeErrInvalidSuspensionStatForUnbondNode codeErrReporterAddress codeErrInvalidAmount - codeErrReporterAddressOrOwner codeErrReporterNotReachThreshold ) @@ -77,6 +77,7 @@ var ( ErrEmptyResourceNodeAddr = sdkerrors.Register(ModuleName, codeErrEmptyResourceNodeAddr, "missing resource node address") ErrEmptyMetaNodeAddr = sdkerrors.Register(ModuleName, codeErrEmptyMetaNodeAddr, "missing Meta node address") ErrBadDenom = sdkerrors.Register(ModuleName, codeErrBadDenom, "invalid coin denomination") + ErrInsufficientStake = sdkerrors.Register(ModuleName, codeErrInsufficientStake, "insufficient stake") ErrResourceNodePubKeyExists = sdkerrors.Register(ModuleName, codeErrResourceNodePubKeyExists, "resource node already exist for this pubkey; must use new resource node pubkey") ErrMetaNodePubKeyExists = sdkerrors.Register(ModuleName, codeErrMetaNodePubKeyExists, "meta node already exist for this pubkey; must use new meta node pubkey") ErrNoResourceNodeFound = sdkerrors.Register(ModuleName, codeErrNoResourceNodeFound, "resource node does not exist") @@ -126,6 +127,5 @@ var ( ErrInvalidSuspensionStatForUnbondNode = sdkerrors.Register(ModuleName, codeErrInvalidSuspensionStatForUnbondNode, "cannot unbond a suspended node") ErrReporterAddress = sdkerrors.Register(ModuleName, codeErrReporterAddress, "invalid reporter address") ErrInvalidAmount = sdkerrors.Register(ModuleName, codeErrInvalidAmount, "invalid amount") - ErrReporterAddressOrOwner = sdkerrors.Register(ModuleName, codeErrReporterAddressOrOwner, "invalid reporter address or owner address") ErrReporterNotReachThreshold = sdkerrors.Register(ModuleName, codeErrReporterNotReachThreshold, "reporter meta-nodes does not reach the threshold") ) diff --git a/x/register/types/msg.go b/x/register/types/msg.go index cb625583..cbad0681 100644 --- a/x/register/types/msg.go +++ b/x/register/types/msg.go @@ -370,12 +370,11 @@ func (msg MsgUpdateResourceNode) ValidateBasic() error { } func NewMsgUpdateResourceNodeStake(networkAddress stratos.SdsAddress, ownerAddress sdk.AccAddress, - stakeDelta sdk.Coin, incrStake bool) *MsgUpdateResourceNodeStake { + stakeDelta sdk.Coin) *MsgUpdateResourceNodeStake { return &MsgUpdateResourceNodeStake{ NetworkAddress: networkAddress.String(), OwnerAddress: ownerAddress.String(), StakeDelta: stakeDelta, - IncrStake: incrStake, } } diff --git a/x/register/types/params.go b/x/register/types/params.go index bd91e9a0..ea7c7698 100644 --- a/x/register/types/params.go +++ b/x/register/types/params.go @@ -28,12 +28,13 @@ var ( KeyUnbondingCompletionTime = []byte("UnbondingCompletionTime") KeyMaxEntries = []byte("MaxEntries") KeyResourceNodeRegEnabled = []byte("ResourceNodeRegEnabled") + KeyResourceNodeMinStake = []byte("ResourceNodeMinStake") DefaultUnbondingThreasholdTime = 180 * 24 * time.Hour // threashold for unbonding - by default 180 days DefaultUnbondingCompletionTime = 14 * 24 * time.Hour // lead time to complete unbonding - by default 14 days DefaultStakeNozRate = sdk.NewDec(1000000) // 0.001gwei -> 1noz = 1000000wei -> 1noz DefaultRemainingNozLimit = sdk.NewInt(0) - DefaultResourceNodeMinStaking = sdk.NewCoin(DefaultBondDenom, sdk.NewInt(1e9)) + DefaultResourceNodeMinStake = sdk.NewCoin(DefaultBondDenom, sdk.NewInt(1e18)) ) // ParamKeyTable returns the parameter key table. @@ -43,7 +44,7 @@ func ParamKeyTable() paramtypes.KeyTable { // NewParams creates a new Params object func NewParams(bondDenom string, threashold, completion time.Duration, maxEntries uint32, - resourceNodeRegEnabled bool, resourceNodeMinStaking sdk.Coin) Params { + resourceNodeRegEnabled bool, resourceNodeMinStake sdk.Coin) Params { return Params{ BondDenom: bondDenom, @@ -51,7 +52,7 @@ func NewParams(bondDenom string, threashold, completion time.Duration, maxEntrie UnbondingCompletionTime: completion, MaxEntries: maxEntries, ResourceNodeRegEnabled: resourceNodeRegEnabled, - ResourceNodeMinStaking: resourceNodeMinStaking, + ResourceNodeMinStake: resourceNodeMinStake, } } @@ -63,6 +64,7 @@ func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { paramtypes.NewParamSetPair(KeyUnbondingCompletionTime, &p.UnbondingCompletionTime, validateUnbondingCompletionTime), paramtypes.NewParamSetPair(KeyMaxEntries, &p.MaxEntries, validateMaxEntries), paramtypes.NewParamSetPair(KeyResourceNodeRegEnabled, &p.ResourceNodeRegEnabled, validateResourceNodeRegEnabled), + paramtypes.NewParamSetPair(KeyResourceNodeMinStake, &p.ResourceNodeMinStake, validateResourceNodeMinStake), } } @@ -82,7 +84,7 @@ func (p Params) Validate() error { if err := validateResourceNodeRegEnabled(p.ResourceNodeRegEnabled); err != nil { return err } - if err := validateResourceNodeMinStaking(p.ResourceNodeMinStaking); err != nil { + if err := validateResourceNodeMinStake(p.ResourceNodeMinStake); err != nil { return err } return nil @@ -96,7 +98,7 @@ func DefaultParams() Params { DefaultUnbondingCompletionTime, DefaultMaxEntries, DefaultResourceNodeRegEnabled, - DefaultResourceNodeMinStaking, + DefaultResourceNodeMinStake, ) } @@ -164,7 +166,7 @@ func validateResourceNodeRegEnabled(i interface{}) error { return nil } -func validateResourceNodeMinStaking(i interface{}) error { +func validateResourceNodeMinStake(i interface{}) error { _, ok := i.(sdk.Coin) if !ok { return fmt.Errorf("invalid parameter type: %T", i) diff --git a/x/register/types/register.pb.go b/x/register/types/register.pb.go index 9ea0eeac..5a400624 100644 --- a/x/register/types/register.pb.go +++ b/x/register/types/register.pb.go @@ -40,7 +40,7 @@ type Params struct { UnbondingCompletionTime time.Duration `protobuf:"bytes,3,opt,name=unbonding_completion_time,json=unbondingCompletionTime,proto3,stdduration" json:"unbonding_completion_time" yaml:"unbonding_completion_time"` MaxEntries uint32 `protobuf:"varint,4,opt,name=max_entries,json=maxEntries,proto3" json:"max_entries" yaml:"max_entries",omitempty` ResourceNodeRegEnabled bool `protobuf:"varint,5,opt,name=resource_node_reg_enabled,json=resourceNodeRegEnabled,proto3" json:"resource_node_reg_enabled" yaml:"resource_node_reg_enabled"` - ResourceNodeMinStaking types.Coin `protobuf:"bytes,6,opt,name=resource_node_min_staking,json=resourceNodeMinStaking,proto3" json:"resource_node_min_staking" yaml:"resource_node_min_staking"` + ResourceNodeMinStake types.Coin `protobuf:"bytes,6,opt,name=resource_node_min_stake,json=resourceNodeMinStake,proto3" json:"resource_node_min_stake" yaml:"resource_node_min_stake"` } func (m *Params) Reset() { *m = Params{} } @@ -111,9 +111,9 @@ func (m *Params) GetResourceNodeRegEnabled() bool { return false } -func (m *Params) GetResourceNodeMinStaking() types.Coin { +func (m *Params) GetResourceNodeMinStake() types.Coin { if m != nil { - return m.ResourceNodeMinStaking + return m.ResourceNodeMinStake } return types.Coin{} } @@ -588,95 +588,95 @@ func init() { } var fileDescriptor_fef1e3aeec8499d6 = []byte{ - // 1397 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0xcf, 0x6f, 0x13, 0xc7, - 0x17, 0xcf, 0x26, 0x10, 0xdb, 0xe3, 0xfc, 0xe0, 0xbb, 0x44, 0xe0, 0xf0, 0xa5, 0x1e, 0x33, 0xfd, - 0x41, 0x90, 0x1a, 0x5b, 0x81, 0x4a, 0x55, 0x39, 0x54, 0xca, 0x42, 0xda, 0x42, 0x0b, 0x8a, 0x96, - 0x14, 0xa4, 0x4a, 0xd5, 0x76, 0xbc, 0x3b, 0x38, 0x43, 0xbc, 0x3b, 0xd6, 0xce, 0x38, 0xc4, 0x52, - 0x0f, 0x48, 0xbd, 0x70, 0xe4, 0x88, 0xd4, 0x0b, 0x7f, 0x44, 0xff, 0x86, 0x0a, 0x71, 0xe2, 0x58, - 0xf5, 0xb0, 0xad, 0xe0, 0x52, 0xf9, 0xb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 0xb8, 0x9b, 0x2c, 0x20, 0x2e, 0xe9, 0x6d, 0x29, 0xc2, 0xfe, 0xd1, - 0x2a, 0x87, 0x0f, 0x69, 0xe4, 0x69, 0x21, 0x36, 0xe6, 0xf5, 0x95, 0x6b, 0x75, 0x67, 0x7a, 0x6e, - 0x6b, 0xb1, 0xb6, 0xaf, 0x30, 0x1a, 0x39, 0x5b, 0xe6, 0xca, 0x8f, 0xf4, 0x71, 0x54, 0x76, 0x05, - 0x93, 0x52, 0x76, 0x37, 0x68, 0x74, 0x4b, 0x13, 0x3f, 0x57, 0xc0, 0x82, 0x5b, 0xa0, 0xec, 0xdb, - 0x60, 0x39, 0x22, 0xe2, 0x3e, 0x8b, 0xf7, 0x3c, 0x1c, 0x04, 0x31, 0xe1, 0x5c, 0x77, 0xc3, 0xfa, - 0x38, 0x81, 0x65, 0x2a, 0x4d, 0xe0, 0x29, 0x15, 0xba, 0x44, 0x20, 0x77, 0x49, 0x23, 0x9b, 0x0a, - 0xb0, 0x31, 0x98, 0x1f, 0x0c, 0xbb, 0x7b, 0x64, 0xa4, 0x1b, 0x61, 0xe5, 0x90, 0xca, 0x36, 0xa3, - 0x91, 0x73, 0x69, 0x9c, 0x40, 0x6d, 0x97, 0x26, 0x70, 0x51, 0xf9, 0x56, 0x6b, 0xf4, 0xec, 0xa7, - 0xf5, 0x15, 0x7d, 0x4d, 0x7e, 0x3c, 0x1a, 0x08, 0xd6, 0xde, 0x1e, 0x76, 0xbf, 0x24, 0x23, 0x57, - 0x6f, 0xb0, 0x3f, 0x06, 0x15, 0x3e, 0xe4, 0x03, 0x12, 0x05, 0x52, 0xc9, 0x55, 0xe7, 0x9d, 0x71, - 0x02, 0x0d, 0x94, 0x26, 0x70, 0x49, 0xb9, 0xd3, 0x00, 0x72, 0x0d, 0x65, 0xdf, 0x01, 0xf3, 0x5c, - 0x60, 0x31, 0x54, 0x6a, 0x5b, 0xba, 0x88, 0x4c, 0x39, 0xcc, 0xb8, 0x30, 0x15, 0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 0xdb, 0xf2, 0x38, 0x05, 0x50, 0x15, - 0x01, 0x28, 0x24, 0xdb, 0x8f, 0x7e, 0x98, 0x03, 0xf5, 0x82, 0x7c, 0xb2, 0xd6, 0x0d, 0x59, 0x44, - 0xf7, 0x48, 0xac, 0xef, 0x57, 0xb6, 0xae, 0x86, 0xf2, 0xd6, 0xd5, 0x00, 0x72, 0x0d, 0x65, 0x6f, - 0x81, 0x2a, 0x0d, 0x48, 0x24, 0xa8, 0x50, 0x83, 0x45, 0x29, 0x7f, 0x82, 0xa5, 0x09, 0x5c, 0x55, - 0x5b, 0x0d, 0x52, 0x7c, 0xe9, 0x4d, 0xcc, 0xec, 0x4d, 0x50, 0xb9, 0x4f, 0xba, 0x9c, 0x0a, 0xf5, - 0x92, 0x55, 0xa5, 0x30, 0x50, 0x9a, 0xc0, 0x86, 0x72, 0xa2, 0x81, 0xa2, 0x0f, 0x63, 0x64, 0x07, - 0xe0, 0x04, 0x27, 0xfe, 0x30, 0xa6, 0x62, 0xe4, 0xf9, 0x2c, 0x12, 0xd8, 0x17, 0xf2, 0x0e, 0x6b, - 0xce, 0x27, 0xd9, 0xac, 0x2e, 0x73, 0x69, 0x02, 0xcf, 0xe9, 0xa1, 0x51, 0x62, 0x8a, 0xde, 0x97, - 0x0d, 0x79, 0x45, 0x71, 0x59, 0xa2, 0x01, 0x11, 0x98, 0xf6, 0xcd, 0x48, 0x91, 0x89, 0x6a, 0x28, - 0x4f, 0x54, 0x03, 0x53, 0x89, 0x6a, 0xac, 0x20, 0xff, 0x87, 0xb3, 0x60, 0xf1, 0x6b, 0xf3, 0x96, - 0x96, 0xd3, 0xff, 0x3a, 0x58, 0x28, 0x6a, 0x57, 0x17, 0x43, 0xea, 0xb2, 0x88, 0xe7, 0xba, 0x2c, - 0xa2, 0xc8, 0xad, 0x17, 0x64, 0x6e, 0x5f, 0x03, 0x0b, 0x94, 0x7b, 0x21, 0x11, 0x58, 0x3e, 0x2a, - 0x65, 0x79, 0xaa, 0xca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 0x4c, 0xa3, 0xce, 0x41, 0xfe, 0x1f, 0x1c, - 0x32, 0x72, 0x77, 0x5e, 0x16, 0xe3, 0xd2, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x1e, 0x4a, 0x90, - 0xa8, 0x01, 0x11, 0x00, 0x00, + // 1406 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0xcf, 0x6f, 0xd4, 0xc6, + 0x17, 0x8f, 0x13, 0x48, 0x36, 0xb3, 0xf9, 0xc1, 0xd7, 0x44, 0xb0, 0xe1, 0x4b, 0x77, 0x96, 0xe9, + 0x0f, 0x82, 0xd4, 0xec, 0x2a, 0x50, 0xa9, 0x2a, 0x87, 0x4a, 0x31, 0xd0, 0x16, 0x5a, 0x50, 0x64, + 0x52, 0x90, 0x2a, 0x55, 0xee, 0xac, 0x3d, 0x6c, 0x86, 0xac, 0x3d, 0x2b, 0xcf, 0x6c, 0xc8, 0x4a, + 0x3d, 0x54, 0xea, 0x85, 0x23, 0x52, 0x2f, 0x1c, 0xf9, 0x23, 0xfa, 0x37, 0x54, 0x88, 0x13, 0xc7, + 0xaa, 0x07, 0xb7, 0x82, 0x4b, 0xb5, 0x47, 0x1f, 0xda, 0x1e, 0x2b, 0xcf, 0x0f, 0xdb, 0xeb, 0x24, + 0xaa, 0xa8, 0xc4, 0xa9, 0x9c, 0xf0, 0x7c, 0x3e, 0x6f, 0xde, 0x7b, 0x33, 0xef, 0xf3, 0xde, 0x4e, + 0x00, 0x88, 0x8b, 0x18, 0x0b, 0xc6, 0x3b, 0x31, 0xe9, 0x51, 0x2e, 0x48, 0xdc, 0xd9, 0xdb, 0xc8, + 0xbf, 0xdb, 0x83, 0x98, 0x09, 0x66, 0x9f, 0xd4, 0x36, 0xed, 0x1c, 0xdf, 0xdb, 0x38, 0xb3, 0xd2, + 0x63, 0x3d, 0x26, 0xf9, 0x4e, 0xf6, 0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e, 0xb8, 0x3d, 0xeb, 0xff, + 0x7c, 0x9c, 0xec, 0x10, 0xda, 0xdb, 0x11, 0xf2, 0x4a, 0x66, 0x54, 0xff, 0x57, 0xa8, 0xa2, 0xff, + 0x2b, 0x04, 0x72, 0x97, 0x0c, 0xf2, 0x99, 0x04, 0xec, 0x3d, 0xb0, 0x5c, 0xfd, 0xcb, 0x69, 0xfa, + 0x75, 0x0c, 0xbe, 0x25, 0x7f, 0xf2, 0x2f, 0xa3, 0xef, 0x2c, 0xb0, 0x4c, 0x23, 0x2a, 0x28, 0xee, + 0x7b, 0x5d, 0xdc, 0xc7, 0x91, 0x6f, 0x04, 0x7f, 0xf7, 0x95, 0x7e, 0x96, 0xaa, 0x4e, 0x8a, 0xa3, + 0x57, 0x08, 0xe4, 0x2e, 0x69, 0xc4, 0x51, 0x80, 0x8d, 0xc1, 0x9c, 0x89, 0xac, 0xda, 0xe3, 0xd3, + 0x57, 0x8a, 0x3c, 0x57, 0x44, 0xd4, 0xc5, 0xcc, 0x23, 0x19, 0xca, 0xb9, 0xf5, 0xf4, 0x45, 0xd3, + 0x7a, 0xfe, 0xa2, 0x69, 0xfd, 0xf6, 0xa2, 0x69, 0x3d, 0x7a, 0xd9, 0x9c, 0x7a, 0xfe, 0xb2, 0x39, + 0xf5, 0xf3, 0xcb, 0xe6, 0xd4, 0x57, 0x1f, 0x94, 0xe2, 0x68, 0x05, 0x45, 0x44, 0x98, 0xcf, 0x75, + 0x7f, 0x07, 0xd3, 0xa8, 0xb3, 0x5f, 0xfc, 0xc7, 0x86, 0x8c, 0xdc, 0x9d, 0x95, 0xc5, 0xb8, 0xf4, + 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0x1a, 0x77, 0x41, 0x4b, 0xf9, 0x10, 0x00, 0x00, } func (this *ResourceNode) Equal(that interface{}) bool { @@ -832,7 +832,7 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { var l int _ = l { - size, err := m.ResourceNodeMinStaking.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.ResourceNodeMinStake.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -1340,7 +1340,7 @@ func (m *Params) Size() (n int) { if m.ResourceNodeRegEnabled { n += 2 } - l = m.ResourceNodeMinStaking.Size() + l = m.ResourceNodeMinStake.Size() n += 1 + l + sovRegister(uint64(l)) return n } @@ -1690,7 +1690,7 @@ func (m *Params) Unmarshal(dAtA []byte) error { m.ResourceNodeRegEnabled = bool(v != 0) case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceNodeMinStaking", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ResourceNodeMinStake", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -1717,7 +1717,7 @@ func (m *Params) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ResourceNodeMinStaking.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.ResourceNodeMinStake.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/x/register/types/tx.pb.go b/x/register/types/tx.pb.go index b1981146..53bd13a9 100644 --- a/x/register/types/tx.pb.go +++ b/x/register/types/tx.pb.go @@ -657,7 +657,6 @@ var xxx_messageInfo_MsgUpdateMetaNodeResponse proto.InternalMessageInfo type MsgUpdateResourceNodeStake struct { NetworkAddress string `protobuf:"bytes,1,opt,name=network_address,json=networkAddress,proto3" json:"network_address" yaml:"network_address"` OwnerAddress string `protobuf:"bytes,2,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address" yaml:"owner_address"` - IncrStake bool `protobuf:"varint,3,opt,name=incr_stake,json=incrStake,proto3" json:"incr_stake" yaml:"incr_stake"` StakeDelta types1.Coin `protobuf:"bytes,4,opt,name=stake_delta,json=stakeDelta,proto3" json:"stake_delta" yaml:"stake_delta"` } @@ -708,13 +707,6 @@ func (m *MsgUpdateResourceNodeStake) GetOwnerAddress() string { return "" } -func (m *MsgUpdateResourceNodeStake) GetIncrStake() bool { - if m != nil { - return m.IncrStake - } - return false -} - func (m *MsgUpdateResourceNodeStake) GetStakeDelta() types1.Coin { if m != nil { return m.StakeDelta @@ -1083,97 +1075,97 @@ func init() { func init() { proto.RegisterFile("stratos/register/v1/tx.proto", fileDescriptor_75d4b90d7a185a31) } var fileDescriptor_75d4b90d7a185a31 = []byte{ - // 1434 bytes of a gzipped FileDescriptorProto + // 1437 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0xcf, 0x6f, 0x1b, 0x45, 0x14, 0xce, 0xda, 0x69, 0x69, 0xa6, 0x4d, 0xda, 0xb8, 0x49, 0xe3, 0xb8, 0x89, 0xc7, 0x9d, 0xd2, 0x90, 0x12, 0xbc, 0x5b, 0x27, 0x45, 0x2d, 0x95, 0x00, 0xd5, 0x2d, 0x12, 0x08, 0x25, 0x45, 0x4b, 0xe9, 0x01, 0xa9, 0xb2, 0xd6, 0xf6, 0xd4, 0xb5, 0x12, 0xef, 0x58, 0xbb, 0x6b, 0xb7, 0x3e, 0x70, - 0xe1, 0xd4, 0x13, 0x42, 0xe2, 0xc0, 0xb5, 0x70, 0xe4, 0xc4, 0x01, 0x24, 0xce, 0x48, 0x48, 0x85, - 0x53, 0x25, 0x24, 0x84, 0x90, 0x18, 0xa1, 0x96, 0xd3, 0x22, 0x81, 0xb4, 0x7f, 0x01, 0xda, 0x99, - 0xdd, 0xd9, 0x1f, 0xde, 0xdd, 0x26, 0xb4, 0xb9, 0xa0, 0x9e, 0xec, 0x79, 0xef, 0x9b, 0x99, 0xef, - 0xbd, 0xf7, 0xcd, 0xaf, 0x05, 0x4b, 0xa6, 0x65, 0x68, 0x16, 0x31, 0x15, 0x03, 0x77, 0xba, 0xa6, - 0x85, 0x0d, 0x65, 0x58, 0x53, 0xac, 0xbb, 0x72, 0xdf, 0x20, 0x16, 0x29, 0x1c, 0xf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8, 0x3e, 0x60, 0x6e, 0xfc, 0x1b, 0x00, 0x00, - 0xff, 0xff, 0xa6, 0x89, 0x3a, 0xd5, 0x75, 0x18, 0x00, 0x00, + 0xe1, 0xd4, 0x13, 0x42, 0xe2, 0xc0, 0xb5, 0x70, 0x84, 0x0b, 0x07, 0x90, 0x38, 0x23, 0x21, 0x15, + 0x4e, 0x95, 0x90, 0x10, 0x42, 0x62, 0x84, 0x5a, 0x4e, 0x8b, 0xc4, 0x61, 0xff, 0x02, 0xb4, 0x33, + 0xbb, 0xb3, 0x3f, 0xbc, 0xbb, 0x4d, 0x68, 0x8b, 0x04, 0xea, 0xc9, 0x3b, 0xef, 0xbd, 0x99, 0xf9, + 0xde, 0xf7, 0xde, 0xbc, 0x79, 0x63, 0xb0, 0x64, 0x5a, 0x86, 0x66, 0x11, 0x53, 0x31, 0x70, 0xa7, + 0x6b, 0x5a, 0xd8, 0x50, 0x86, 0x35, 0xc5, 0xba, 0x2d, 0xf7, 0x0d, 0x62, 0x91, 0xc2, 0x51, 0x4f, + 0x2b, 0xfb, 0x5a, 0x79, 0x58, 0x2b, 0xcd, 0x75, 0x48, 0x87, 0x30, 0xbd, 0xe2, 0x7e, 0x71, 0xd3, + 0xd2, 0x62, 0x87, 0x90, 0xce, 0x0e, 0x56, 0xd8, 0xa8, 0x39, 0xb8, 0xa1, 0x68, 0xfa, 0xc8, 0x53, + 0x2d, 0x79, 0x2a, 0xad, 0xdf, 0x55, 0x34, 0x5d, 0x27, 0x96, 0x66, 0x75, 0x89, 0x6e, 0xfa, 0x13, + 0x5b, 0xc4, 0xec, 0x11, 0xb3, 0xc1, 0x57, 0xe4, 0x03, 0x4f, 0x85, 0x92, 0xc0, 0x09, 0x28, 0xdc, + 0xa6, 0xcc, 0x67, 0x28, 0x4d, 0xcd, 0xc4, 0xca, 0xb0, 0xd6, 0xc4, 0x96, 0x56, 0x53, 0x5a, 0xa4, + 0xab, 0x73, 0x3d, 0xfa, 0x6c, 0x12, 0xcc, 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 0x19, 0xba, 0xb1, 0x07, 0xe3, 0xbd, 0x25, 0x68, 0xf0, + 0x77, 0x04, 0x4f, 0xd0, 0x1f, 0x24, 0x70, 0x42, 0xe0, 0x4e, 0x6d, 0x4b, 0xce, 0xa4, 0xe1, 0x49, + 0x9b, 0x51, 0x3a, 0xbf, 0xd7, 0x19, 0xc2, 0x8d, 0xf3, 0xcc, 0x8d, 0x75, 0x74, 0x26, 0xd1, 0x8d, + 0x00, 0xbf, 0x11, 0x5a, 0xa0, 0xe1, 0x5e, 0xa2, 0xf5, 0xad, 0x7b, 0x0f, 0xca, 0xd2, 0xfd, 0x07, + 0x65, 0xe9, 0xf7, 0x07, 0x65, 0xe9, 0xe3, 0x87, 0xe5, 0x89, 0xfb, 0x0f, 0xcb, 0x13, 0xbf, 0x3c, + 0x2c, 0x4f, 0xbc, 0x7f, 0x36, 0xd4, 0x97, 0x7b, 0xab, 0xea, 0xd8, 0xf2, 0x3f, 0xab, 0xad, 0x9b, + 0x5a, 0x57, 0x57, 0x6e, 0x07, 0x1b, 0xb1, 0x4e, 0xbd, 0xb9, 0x9f, 0xfd, 0xf9, 0xb8, 0xf1, 0x77, + 0x00, 0x00, 0x00, 0xff, 0xff, 0x62, 0x35, 0x9d, 0x41, 0x31, 0x18, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -2066,16 +2058,6 @@ func (m *MsgUpdateResourceNodeStake) MarshalToSizedBuffer(dAtA []byte) (int, err } i-- dAtA[i] = 0x22 - if m.IncrStake { - i-- - if m.IncrStake { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 - } if len(m.OwnerAddress) > 0 { i -= len(m.OwnerAddress) copy(dAtA[i:], m.OwnerAddress) @@ -2568,9 +2550,6 @@ func (m *MsgUpdateResourceNodeStake) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - if m.IncrStake { - n += 2 - } l = m.StakeDelta.Size() n += 1 + l + sovTx(uint64(l)) return n @@ -4080,26 +4059,6 @@ func (m *MsgUpdateResourceNodeStake) Unmarshal(dAtA []byte) error { } m.OwnerAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IncrStake", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IncrStake = bool(v != 0) case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field StakeDelta", wireType) From e9ea0a147ef3b8cd03668d63fcc4fda5f35e26db Mon Sep 17 00:00:00 2001 From: Xiong Date: Tue, 25 Apr 2023 10:48:45 -0400 Subject: [PATCH 57/95] fix --- x/register/keeper/keeper.go | 9 --------- x/register/keeper/msg_server.go | 4 ---- 2 files changed, 13 deletions(-) diff --git a/x/register/keeper/keeper.go b/x/register/keeper/keeper.go index c3fff105..9274b295 100644 --- a/x/register/keeper/keeper.go +++ b/x/register/keeper/keeper.go @@ -4,7 +4,6 @@ import ( "container/list" "errors" "fmt" - "math" "time" "github.com/tendermint/tendermint/libs/log" @@ -459,11 +458,3 @@ func (k Keeper) NozSupply(ctx sdk.Context) (remaining, total sdk.Int) { total = St.ToDec().Quo(stakeNozRate).TruncateInt() return remaining, total } - -func (k Keeper) HasReachedThreshold(ctx sdk.Context, validReporterCount int) bool { - totalMetaNodes := k.GetBondedMetaNodeCnt(ctx).Int64() - - threshold := int(math.Max(1, math.Floor(float64(totalMetaNodes)*2/3))) - - return validReporterCount >= threshold -} diff --git a/x/register/keeper/msg_server.go b/x/register/keeper/msg_server.go index 2a4c1a31..04c46093 100644 --- a/x/register/keeper/msg_server.go +++ b/x/register/keeper/msg_server.go @@ -329,10 +329,6 @@ func (k msgServer) HandleMsgUpdateEffectiveStake(goCtx context.Context, msg *typ validReporterCount++ } - if !k.HasReachedThreshold(ctx, validReporterCount) { - return &types.MsgUpdateEffectiveStakeResponse{}, types.ErrReporterNotReachThreshold - } - networkAddr, err := stratos.SdsAddressFromBech32(msg.NetworkAddress) if err != nil { return &types.MsgUpdateEffectiveStakeResponse{}, sdkerrors.Wrap(types.ErrInvalidNetworkAddr, err.Error()) From d163325f56817116fea75a4c12bcd16fb7255e30 Mon Sep 17 00:00:00 2001 From: Xiong Date: Tue, 18 Apr 2023 14:23:19 -0400 Subject: [PATCH 58/95] 1, Add minimum stake limit param to genesis file. 2, Add not null constraint & json tags to proto files. --- app/test_helpers.go | 2 +- proto/stratos/register/v1/genesis.proto | 31 +- proto/stratos/register/v1/query.proto | 8 +- proto/stratos/register/v1/register.proto | 9 + x/register/genesis.go | 13 +- x/register/keeper/meta_node.go | 4 +- x/register/keeper/resource_node.go | 4 +- x/register/types/genesis.go | 10 +- x/register/types/genesis.pb.go | 191 ++++++----- x/register/types/meta_node.go | 2 +- x/register/types/params.go | 30 +- x/register/types/querier.go | 16 +- x/register/types/query.pb.go | 364 ++++++++++----------- x/register/types/register.pb.go | 390 +++++++++++++---------- x/register/types/resource_node.go | 2 +- 15 files changed, 558 insertions(+), 518 deletions(-) diff --git a/app/test_helpers.go b/app/test_helpers.go index a65d067a..776890e5 100644 --- a/app/test_helpers.go +++ b/app/test_helpers.go @@ -207,7 +207,7 @@ func SetupWithGenesisNodeSet(t *testing.T, resourceNodes, metaNodes, registertypes.DefaultRemainingNozLimit, - make([]*registertypes.Slashing, 0), + make([]registertypes.Slashing, 0), registertypes.DefaultStakeNozRate, ) genesisState[registertypes.ModuleName] = app.AppCodec().MustMarshalJSON(registerGenesis) diff --git a/proto/stratos/register/v1/genesis.proto b/proto/stratos/register/v1/genesis.proto index ac43efc2..1690ec9c 100644 --- a/proto/stratos/register/v1/genesis.proto +++ b/proto/stratos/register/v1/genesis.proto @@ -12,17 +12,21 @@ option go_package = "github.com/stratosnet/stratos-chain/x/register/types"; // GenesisState defines the register module's genesis state. message GenesisState { Params params = 1 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "params", (gogoproto.moretags) = "yaml:\"params\"" ]; repeated ResourceNode resource_nodes = 2 [ (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "ResourceNodes", - (gogoproto.moretags) = "yaml:\"resource_nodes\"" + (gogoproto.jsontag) = "resource_nodes", + (gogoproto.moretags) = "yaml:\"resource_nodes\"", + (gogoproto.castrepeated) = "ResourceNodes" ]; repeated MetaNode meta_nodes = 3 [ (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "MetaNodes", - (gogoproto.moretags) = "yaml:\"meta_nodes\"" + (gogoproto.jsontag) = "meta_nodes", + (gogoproto.moretags) = "yaml:\"meta_nodes\"", + (gogoproto.castrepeated) = "MetaNodes" ]; string remaining_noz_limit = 4 [ (gogoproto.nullable) = false, @@ -31,37 +35,48 @@ message GenesisState { (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int" ]; // remaining noz limit repeated Slashing slashing = 5 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "slashing", (gogoproto.moretags) = "yaml:\"slashing_info\"" ]; string stake_noz_rate = 6 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "stake_noz_rate", (gogoproto.moretags) = "yaml:\"stake_noz_rate\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec" ]; //fixed rate of stake over noz } message GenesisMetaNode { string network_address = 1 [ + (gogoproto.jsontag) = "network_address", (gogoproto.moretags) = "yaml:\"network_address\"" ]; // network address of the meta node google.protobuf.Any pubkey = 2 [ (cosmos_proto.accepts_interface) = "cosmos.crypto.PubKey", + (gogoproto.jsontag) = "pubkey", (gogoproto.moretags) = "yaml:\"pubkey\"" ]; // the consensus public key of the meta node; bech encoded in JSON bool suspend = 3 [ + (gogoproto.jsontag) = "suspend", (gogoproto.moretags) = "yaml:\"suspend\"" ]; // has the meta node been suspended from bonded status? cosmos.staking.v1beta1.BondStatus status = 4 [ + (gogoproto.jsontag) = "status", (gogoproto.moretags) = "yaml:\"status\"" ]; // meta node status (Unspecified/Bonded/Unbonding/Unbonded) string tokens = 5 [ - (gogoproto.moretags) = "yaml:\"token\"" + (gogoproto.jsontag) = "tokens", + (gogoproto.moretags) = "yaml:\"tokens\"" ]; // delegated tokens string owner_address = 6 [ + (gogoproto.jsontag) = "owner_address", (gogoproto.moretags) = "yaml:\"owner_address\"" ]; // owner address of the meta node Description description = 7 [ - (gogoproto.moretags) = "yaml:\"description\",omitempty" + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "description", + (gogoproto.moretags) = "yaml:\"description\"" ]; // description terms for the meta node } diff --git a/proto/stratos/register/v1/query.proto b/proto/stratos/register/v1/query.proto index 76e1ae0f..c32cfdb8 100644 --- a/proto/stratos/register/v1/query.proto +++ b/proto/stratos/register/v1/query.proto @@ -172,6 +172,7 @@ message StakingInfo { (gogoproto.jsontag) = "status", (gogoproto.moretags) = "yaml:\"status\""]; string tokens = 5 [ + (gogoproto.nullable) = false, (gogoproto.jsontag) = "tokens", (gogoproto.moretags) = "yaml:\"tokens\"", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int" @@ -181,6 +182,7 @@ message StakingInfo { (gogoproto.moretags) = "yaml:\"owner_address\"" ]; Description description = 7 [ + (gogoproto.nullable) = false, (gogoproto.jsontag) = "description", (gogoproto.moretags) = "yaml:\"description\"" ]; @@ -195,17 +197,17 @@ message StakingInfo { (gogoproto.moretags) = "yaml:\"node_type\"" ]; cosmos.base.v1beta1.Coin bonded_stake = 10 [ - (gogoproto.nullable) = true, + (gogoproto.nullable) = false, (gogoproto.jsontag) = "bonded_stake", (gogoproto.moretags) = "yaml:\"bonded_stake\"" ]; cosmos.base.v1beta1.Coin un_bonding_stake = 11 [ - (gogoproto.nullable) = true, + (gogoproto.nullable) = false, (gogoproto.jsontag) = "un_bonding_stake", (gogoproto.moretags) = "yaml:\"un_bonding_stake\"" ]; cosmos.base.v1beta1.Coin un_bonded_stake = 12 [ - (gogoproto.nullable) = true, + (gogoproto.nullable) = false, (gogoproto.jsontag) = "un_bonded_stake", (gogoproto.moretags) = "yaml:\"un_bonded_stake\"" ]; diff --git a/proto/stratos/register/v1/register.proto b/proto/stratos/register/v1/register.proto index 8c892e2e..81b30189 100644 --- a/proto/stratos/register/v1/register.proto +++ b/proto/stratos/register/v1/register.proto @@ -6,6 +6,7 @@ import "google/protobuf/any.proto"; import "google/protobuf/timestamp.proto"; import "google/protobuf/duration.proto"; import "cosmos_proto/cosmos.proto"; +import "cosmos/base/v1beta1/coin.proto"; import "cosmos/staking/v1beta1/staking.proto"; option go_package = "github.com/stratosnet/stratos-chain/x/register/types"; @@ -33,8 +34,14 @@ message Params { (gogoproto.moretags) = "yaml:\"max_entries\",omitempty" ]; bool resource_node_reg_enabled = 5 [ + (gogoproto.jsontag) = "resource_node_reg_enabled", (gogoproto.moretags) = "yaml:\"resource_node_reg_enabled\"" ]; + cosmos.base.v1beta1.Coin resource_node_min_staking = 6 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "resource_node_min_staking", + (gogoproto.moretags) = "yaml:\"resource_node_min_staking\"" + ]; } message ResourceNode { @@ -68,6 +75,7 @@ message ResourceNode { (gogoproto.moretags) = "yaml:\"owner_address\"" ]; Description description = 7 [ + (gogoproto.nullable) = false, (gogoproto.jsontag) = "description", (gogoproto.moretags) = "yaml:\"description\"" ]; @@ -120,6 +128,7 @@ message MetaNode { (gogoproto.moretags) = "yaml:\"owner_address\"" ]; Description description = 7 [ + (gogoproto.nullable) = false, (gogoproto.jsontag) = "description", (gogoproto.moretags) = "yaml:\"description\"" ]; diff --git a/x/register/genesis.go b/x/register/genesis.go index 33a7b3dd..16fa6dca 100644 --- a/x/register/genesis.go +++ b/x/register/genesis.go @@ -11,7 +11,7 @@ import ( // InitGenesis initialize default parameters // and the keeper's address to pubkey map func InitGenesis(ctx sdk.Context, keeper keeper.Keeper, data *types.GenesisState) { - keeper.SetParams(ctx, *data.Params) + keeper.SetParams(ctx, data.Params) freshStart := keeper.GetResourceNodeNotBondedToken(ctx).IsZero() && keeper.GetResourceNodeBondedToken(ctx).IsZero() && @@ -134,7 +134,7 @@ func ExportGenesis(ctx sdk.Context, keeper keeper.Keeper) (data *types.GenesisSt remainingNozLimit := keeper.GetRemainingOzoneLimit(ctx) stakeNozRate := keeper.GetStakeNozRate(ctx) - var slashingInfo []*types.Slashing + var slashingInfo []types.Slashing keeper.IteratorSlashingInfo(ctx, func(walletAddress sdk.AccAddress, val sdk.Int) (stop bool) { if val.GT(sdk.ZeroInt()) { slashing := types.NewSlashing(walletAddress, val) @@ -143,12 +143,5 @@ func ExportGenesis(ctx sdk.Context, keeper keeper.Keeper) (data *types.GenesisSt return false }) - return &types.GenesisState{ - Params: ¶ms, - ResourceNodes: resourceNodes, - MetaNodes: metaNodes, - RemainingNozLimit: remainingNozLimit, - Slashing: slashingInfo, - StakeNozRate: stakeNozRate, - } + return types.NewGenesisState(params, resourceNodes, metaNodes, remainingNozLimit, slashingInfo, stakeNozRate) } diff --git a/x/register/keeper/meta_node.go b/x/register/keeper/meta_node.go index ef943709..d894dfce 100644 --- a/x/register/keeper/meta_node.go +++ b/x/register/keeper/meta_node.go @@ -114,7 +114,7 @@ func (k Keeper) RegisterMetaNode(ctx sdk.Context, networkAddr stratos.SdsAddress return ozoneLimitChange, types.ErrBadDenom } - metaNode, err := types.NewMetaNode(networkAddr, pubKey, ownerAddr, &description, ctx.BlockHeader().Time) + metaNode, err := types.NewMetaNode(networkAddr, pubKey, ownerAddr, description, ctx.BlockHeader().Time) if err != nil { return ozoneLimitChange, err } @@ -416,7 +416,7 @@ func (k Keeper) UpdateMetaNode(ctx sdk.Context, description types.Description, return types.ErrInvalidOwnerAddr } - node.Description = &description + node.Description = description k.SetMetaNode(ctx, node) diff --git a/x/register/keeper/resource_node.go b/x/register/keeper/resource_node.go index 94e83f4a..1dcbdd2d 100644 --- a/x/register/keeper/resource_node.go +++ b/x/register/keeper/resource_node.go @@ -289,7 +289,7 @@ func (k Keeper) RegisterResourceNode(ctx sdk.Context, networkAddr stratos.SdsAdd return ozoneLimitChange, types.ErrBadDenom } - resourceNode, err := types.NewResourceNode(networkAddr, pubKey, ownerAddr, &description, nodeType, ctx.BlockHeader().Time) + resourceNode, err := types.NewResourceNode(networkAddr, pubKey, ownerAddr, description, nodeType, ctx.BlockHeader().Time) if err != nil { return ozoneLimitChange, err } @@ -310,7 +310,7 @@ func (k Keeper) UpdateResourceNode(ctx sdk.Context, description types.Descriptio return types.ErrInvalidOwnerAddr } - node.Description = &description + node.Description = description if nodeType != 0 { node.NodeType = uint32(nodeType) } diff --git a/x/register/types/genesis.go b/x/register/types/genesis.go index 53f2565b..a84d037f 100644 --- a/x/register/types/genesis.go +++ b/x/register/types/genesis.go @@ -12,11 +12,11 @@ import ( ) // NewGenesisState creates a new GenesisState object -func NewGenesisState(params *Params, +func NewGenesisState(params Params, resourceNodes ResourceNodes, metaNodes MetaNodes, remainingNozLimit sdk.Int, - slashingInfo []*Slashing, + slashingInfo []Slashing, stakeNozRate sdk.Dec, ) *GenesisState { return &GenesisState{ @@ -36,7 +36,7 @@ func DefaultGenesisState() *GenesisState { ResourceNodes: ResourceNodes{}, MetaNodes: MetaNodes{}, RemainingNozLimit: DefaultRemainingNozLimit, - Slashing: make([]*Slashing, 0), + Slashing: make([]Slashing, 0), StakeNozRate: DefaultStakeNozRate, } } @@ -102,8 +102,8 @@ func (v GenesisMetaNode) ToMetaNode() (MetaNode, error) { }, nil } -func NewSlashing(walletAddress sdk.AccAddress, value sdk.Int) *Slashing { - return &Slashing{ +func NewSlashing(walletAddress sdk.AccAddress, value sdk.Int) Slashing { + return Slashing{ WalletAddress: walletAddress.String(), Value: value.Int64(), } diff --git a/x/register/types/genesis.pb.go b/x/register/types/genesis.pb.go index d5e45c6f..04fc73f6 100644 --- a/x/register/types/genesis.pb.go +++ b/x/register/types/genesis.pb.go @@ -29,11 +29,11 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // GenesisState defines the register module's genesis state. type GenesisState struct { - Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty" yaml:"params"` + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params" yaml:"params"` ResourceNodes ResourceNodes `protobuf:"bytes,2,rep,name=resource_nodes,json=resourceNodes,proto3,castrepeated=ResourceNodes" json:"resource_nodes" yaml:"resource_nodes"` MetaNodes MetaNodes `protobuf:"bytes,3,rep,name=meta_nodes,json=metaNodes,proto3,castrepeated=MetaNodes" json:"meta_nodes" yaml:"meta_nodes"` RemainingNozLimit github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,4,opt,name=remaining_noz_limit,json=remainingNozLimit,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"remaining_noz_limit" yaml:"remaining_noz_limit"` - Slashing []*Slashing `protobuf:"bytes,5,rep,name=slashing,proto3" json:"slashing,omitempty" yaml:"slashing_info"` + Slashing []Slashing `protobuf:"bytes,5,rep,name=slashing,proto3" json:"slashing" yaml:"slashing_info"` StakeNozRate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,6,opt,name=stake_noz_rate,json=stakeNozRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"stake_noz_rate" yaml:"stake_noz_rate"` } @@ -70,11 +70,11 @@ func (m *GenesisState) XXX_DiscardUnknown() { var xxx_messageInfo_GenesisState proto.InternalMessageInfo -func (m *GenesisState) GetParams() *Params { +func (m *GenesisState) GetParams() Params { if m != nil { return m.Params } - return nil + return Params{} } func (m *GenesisState) GetResourceNodes() ResourceNodes { @@ -91,7 +91,7 @@ func (m *GenesisState) GetMetaNodes() MetaNodes { return nil } -func (m *GenesisState) GetSlashing() []*Slashing { +func (m *GenesisState) GetSlashing() []Slashing { if m != nil { return m.Slashing } @@ -99,13 +99,13 @@ func (m *GenesisState) GetSlashing() []*Slashing { } type GenesisMetaNode struct { - NetworkAddress string `protobuf:"bytes,1,opt,name=network_address,json=networkAddress,proto3" json:"network_address,omitempty" yaml:"network_address"` - Pubkey *types.Any `protobuf:"bytes,2,opt,name=pubkey,proto3" json:"pubkey,omitempty" yaml:"pubkey"` - Suspend bool `protobuf:"varint,3,opt,name=suspend,proto3" json:"suspend,omitempty" yaml:"suspend"` - Status types1.BondStatus `protobuf:"varint,4,opt,name=status,proto3,enum=cosmos.staking.v1beta1.BondStatus" json:"status,omitempty" yaml:"status"` - Tokens string `protobuf:"bytes,5,opt,name=tokens,proto3" json:"tokens,omitempty" yaml:"token"` - OwnerAddress string `protobuf:"bytes,6,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty" yaml:"owner_address"` - Description *Description `protobuf:"bytes,7,opt,name=description,proto3" json:"description,omitempty" yaml:"description",omitempty` + NetworkAddress string `protobuf:"bytes,1,opt,name=network_address,json=networkAddress,proto3" json:"network_address" yaml:"network_address"` + Pubkey *types.Any `protobuf:"bytes,2,opt,name=pubkey,proto3" json:"pubkey" yaml:"pubkey"` + Suspend bool `protobuf:"varint,3,opt,name=suspend,proto3" json:"suspend" yaml:"suspend"` + Status types1.BondStatus `protobuf:"varint,4,opt,name=status,proto3,enum=cosmos.staking.v1beta1.BondStatus" json:"status" yaml:"status"` + Tokens string `protobuf:"bytes,5,opt,name=tokens,proto3" json:"tokens" yaml:"tokens"` + OwnerAddress string `protobuf:"bytes,6,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address" yaml:"owner_address"` + Description Description `protobuf:"bytes,7,opt,name=description,proto3" json:"description" yaml:"description"` } func (m *GenesisMetaNode) Reset() { *m = GenesisMetaNode{} } @@ -183,11 +183,11 @@ func (m *GenesisMetaNode) GetOwnerAddress() string { return "" } -func (m *GenesisMetaNode) GetDescription() *Description { +func (m *GenesisMetaNode) GetDescription() Description { if m != nil { return m.Description } - return nil + return Description{} } type Slashing struct { @@ -251,58 +251,61 @@ func init() { func init() { proto.RegisterFile("stratos/register/v1/genesis.proto", fileDescriptor_5bdab54ebea9e48e) } var fileDescriptor_5bdab54ebea9e48e = []byte{ - // 806 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0x41, 0x8f, 0xdb, 0x44, - 0x14, 0x5e, 0x37, 0x6c, 0xba, 0x3b, 0x9b, 0xa4, 0xac, 0x1b, 0x90, 0x37, 0x40, 0x9c, 0x8e, 0x50, - 0x15, 0x44, 0xd7, 0x56, 0x16, 0x4e, 0x48, 0x1c, 0x6a, 0x2a, 0x2a, 0x04, 0x8d, 0xaa, 0xc9, 0x01, - 0x89, 0x4b, 0x34, 0xb1, 0xa7, 0x5e, 0x2b, 0xf1, 0x8c, 0xe5, 0x19, 0x67, 0xeb, 0xfd, 0x13, 0x54, - 0xe2, 0x5f, 0x70, 0xe6, 0x47, 0x54, 0x9c, 0xf6, 0x88, 0x38, 0x18, 0xb4, 0x7b, 0xdb, 0xa3, 0xaf, - 0x5c, 0x50, 0x66, 0xc6, 0x89, 0xb3, 0x44, 0x48, 0x3d, 0x65, 0xde, 0xf7, 0xbe, 0xf9, 0x9e, 0xdf, - 0x9b, 0xef, 0x05, 0x3c, 0xe2, 0x22, 0xc5, 0x82, 0x71, 0x37, 0x25, 0x61, 0xc4, 0x05, 0x49, 0xdd, - 0xe5, 0xc8, 0x0d, 0x09, 0x25, 0x3c, 0xe2, 0x4e, 0x92, 0x32, 0xc1, 0xcc, 0x87, 0x9a, 0xe2, 0x54, - 0x14, 0x67, 0x39, 0xea, 0x9d, 0x84, 0x8c, 0x85, 0x0b, 0xe2, 0x4a, 0xca, 0x2c, 0x7b, 0xe5, 0x62, - 0x9a, 0x2b, 0x7e, 0xaf, 0x1b, 0xb2, 0x90, 0xc9, 0xa3, 0xbb, 0x3a, 0x69, 0xf4, 0xc4, 0x67, 0x3c, - 0x66, 0x7c, 0xaa, 0x12, 0x2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9, 0xb8, 0x6b, 0x1b, 0x87, 0xa8, 0xad, 0x80, 0xaa, 0x0d, 0x17, - 0xec, 0x2f, 0xf1, 0x22, 0x23, 0xd2, 0x04, 0x0d, 0xef, 0xe4, 0xb6, 0xb0, 0x15, 0xb0, 0x99, 0x9b, - 0x0c, 0x21, 0x52, 0xb0, 0x37, 0x7e, 0x7b, 0xdd, 0x37, 0xae, 0xae, 0xfb, 0xc6, 0xdf, 0xd7, 0x7d, - 0xe3, 0xcd, 0x4d, 0x7f, 0xef, 0xea, 0xa6, 0xbf, 0xf7, 0xc7, 0x4d, 0x7f, 0xef, 0xa7, 0x2f, 0x6b, - 0xc6, 0xd7, 0x63, 0xa0, 0x44, 0x54, 0xc7, 0x53, 0xff, 0x1c, 0x47, 0xd4, 0x7d, 0xbd, 0xf9, 0xfb, - 0x95, 0xab, 0x30, 0x6b, 0x4a, 0xbb, 0x7d, 0xf1, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xeb, 0x7a, - 0xca, 0x16, 0x49, 0x06, 0x00, 0x00, + // 849 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0x4f, 0x6f, 0x1b, 0x45, + 0x14, 0xcf, 0x36, 0x8d, 0x9b, 0x4c, 0x62, 0x57, 0xdd, 0x06, 0xb4, 0x49, 0x55, 0x8f, 0x3b, 0x42, + 0xc8, 0x15, 0xca, 0xae, 0x92, 0x54, 0x42, 0xe2, 0x44, 0x57, 0x95, 0x10, 0x02, 0xac, 0x6a, 0x82, + 0x40, 0x70, 0xb1, 0xc6, 0xeb, 0xe9, 0x66, 0x65, 0xef, 0x8c, 0x35, 0x33, 0x4e, 0x70, 0x2e, 0xdc, + 0xb9, 0x80, 0xc4, 0xb7, 0xe0, 0xcc, 0x87, 0xa8, 0x38, 0x55, 0x9c, 0x10, 0x87, 0x01, 0x92, 0x9b, + 0x8f, 0xfb, 0x09, 0xd0, 0xce, 0xcc, 0xda, 0xeb, 0x60, 0x21, 0xf5, 0xe4, 0x79, 0xbf, 0xf7, 0x7b, + 0x7f, 0xe6, 0xed, 0xef, 0x8d, 0xc1, 0x13, 0xa9, 0x04, 0x51, 0x5c, 0x46, 0x82, 0xa6, 0x99, 0x54, + 0x54, 0x44, 0x17, 0xc7, 0x51, 0x4a, 0x19, 0x95, 0x99, 0x0c, 0x27, 0x82, 0x2b, 0xee, 0x3f, 0x74, + 0x94, 0xb0, 0xa2, 0x84, 0x17, 0xc7, 0x87, 0x07, 0x29, 0xe7, 0xe9, 0x98, 0x46, 0x86, 0x32, 0x98, + 0xbe, 0x8a, 0x08, 0x9b, 0x59, 0xfe, 0xe1, 0x7e, 0xca, 0x53, 0x6e, 0x8e, 0x51, 0x79, 0x72, 0xe8, + 0x41, 0xc2, 0x65, 0xce, 0x65, 0xdf, 0x3a, 0xac, 0xe1, 0x5c, 0xef, 0x59, 0x2b, 0x92, 0x8a, 0x8c, + 0x32, 0x96, 0x46, 0x17, 0xc7, 0x03, 0xaa, 0xc8, 0x71, 0x65, 0x3b, 0x16, 0x5a, 0xd7, 0xe9, 0xa2, + 0x25, 0xc3, 0x41, 0xff, 0x6c, 0x81, 0xbd, 0x4f, 0x6c, 0xf3, 0x67, 0x8a, 0x28, 0xea, 0x7f, 0x09, + 0x1a, 0x13, 0x22, 0x48, 0x2e, 0x03, 0xaf, 0xe3, 0x75, 0x77, 0x4f, 0x1e, 0x85, 0x6b, 0x2e, 0x13, + 0xbe, 0x34, 0x94, 0x18, 0xbe, 0xd6, 0x70, 0x63, 0xae, 0xa1, 0x0b, 0x29, 0x34, 0x6c, 0xce, 0x48, + 0x3e, 0xfe, 0x08, 0x59, 0x1b, 0x61, 0xe7, 0xf0, 0x7f, 0xf0, 0x40, 0x4b, 0x50, 0xc9, 0xa7, 0x22, + 0xa1, 0x7d, 0xc6, 0x87, 0x54, 0x06, 0x77, 0x3a, 0x9b, 0xdd, 0xdd, 0x93, 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5, 0x0d, 0x73, 0xf3, 0x60, + 0x54, 0x55, 0xc7, 0xa3, 0xe4, 0x9c, 0x64, 0x2c, 0xfa, 0x6e, 0xf9, 0x37, 0x61, 0x76, 0x6e, 0xd0, + 0x30, 0x92, 0x3d, 0xfd, 0x37, 0x00, 0x00, 0xff, 0xff, 0xa7, 0xc5, 0x78, 0x0b, 0xf1, 0x06, 0x00, + 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -387,18 +390,16 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x12 } } - if m.Params != nil { - { - size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0xa + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0xa return len(dAtA) - i, nil } @@ -422,18 +423,16 @@ func (m *GenesisMetaNode) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.Description != nil { - { - size, err := m.Description.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) + { + size, err := m.Description.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x3a + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x3a if len(m.OwnerAddress) > 0 { i -= len(m.OwnerAddress) copy(dAtA[i:], m.OwnerAddress) @@ -537,10 +536,8 @@ func (m *GenesisState) Size() (n int) { } var l int _ = l - if m.Params != nil { - l = m.Params.Size() - n += 1 + l + sovGenesis(uint64(l)) - } + l = m.Params.Size() + n += 1 + l + sovGenesis(uint64(l)) if len(m.ResourceNodes) > 0 { for _, e := range m.ResourceNodes { l = e.Size() @@ -594,10 +591,8 @@ func (m *GenesisMetaNode) Size() (n int) { if l > 0 { n += 1 + l + sovGenesis(uint64(l)) } - if m.Description != nil { - l = m.Description.Size() - n += 1 + l + sovGenesis(uint64(l)) - } + l = m.Description.Size() + n += 1 + l + sovGenesis(uint64(l)) return n } @@ -681,9 +676,6 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Params == nil { - m.Params = &Params{} - } if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -819,7 +811,7 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Slashing = append(m.Slashing, &Slashing{}) + m.Slashing = append(m.Slashing, Slashing{}) if err := m.Slashing[len(m.Slashing)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -1108,9 +1100,6 @@ func (m *GenesisMetaNode) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Description == nil { - m.Description = &Description{} - } if err := m.Description.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } diff --git a/x/register/types/meta_node.go b/x/register/types/meta_node.go index a98fbad2..06dbe6e6 100644 --- a/x/register/types/meta_node.go +++ b/x/register/types/meta_node.go @@ -22,7 +22,7 @@ const ( ) // NewMetaNode - initialize a new meta node -func NewMetaNode(networkAddr stratos.SdsAddress, pubKey cryptotypes.PubKey, ownerAddr sdk.AccAddress, description *Description, creationTime time.Time) (MetaNode, error) { +func NewMetaNode(networkAddr stratos.SdsAddress, pubKey cryptotypes.PubKey, ownerAddr sdk.AccAddress, description Description, creationTime time.Time) (MetaNode, error) { pkAny, err := codectypes.NewAnyWithValue(pubKey) if err != nil { return MetaNode{}, err diff --git a/x/register/types/params.go b/x/register/types/params.go index a706d077..bd91e9a0 100644 --- a/x/register/types/params.go +++ b/x/register/types/params.go @@ -33,6 +33,7 @@ var ( DefaultUnbondingCompletionTime = 14 * 24 * time.Hour // lead time to complete unbonding - by default 14 days DefaultStakeNozRate = sdk.NewDec(1000000) // 0.001gwei -> 1noz = 1000000wei -> 1noz DefaultRemainingNozLimit = sdk.NewInt(0) + DefaultResourceNodeMinStaking = sdk.NewCoin(DefaultBondDenom, sdk.NewInt(1e9)) ) // ParamKeyTable returns the parameter key table. @@ -41,13 +42,16 @@ func ParamKeyTable() paramtypes.KeyTable { } // NewParams creates a new Params object -func NewParams(bondDenom string, threashold, completion time.Duration, maxEntries uint32, resourceNodeRegEnabled bool) Params { +func NewParams(bondDenom string, threashold, completion time.Duration, maxEntries uint32, + resourceNodeRegEnabled bool, resourceNodeMinStaking sdk.Coin) Params { + return Params{ BondDenom: bondDenom, UnbondingThreasholdTime: threashold, UnbondingCompletionTime: completion, MaxEntries: maxEntries, ResourceNodeRegEnabled: resourceNodeRegEnabled, + ResourceNodeMinStaking: resourceNodeMinStaking, } } @@ -78,13 +82,22 @@ func (p Params) Validate() error { if err := validateResourceNodeRegEnabled(p.ResourceNodeRegEnabled); err != nil { return err } + if err := validateResourceNodeMinStaking(p.ResourceNodeMinStaking); err != nil { + return err + } return nil } // DefaultParams defines the parameters for this module -func DefaultParams() *Params { - p := NewParams(DefaultBondDenom, DefaultUnbondingThreasholdTime, DefaultUnbondingCompletionTime, DefaultMaxEntries, DefaultResourceNodeRegEnabled) - return &p +func DefaultParams() Params { + return NewParams( + DefaultBondDenom, + DefaultUnbondingThreasholdTime, + DefaultUnbondingCompletionTime, + DefaultMaxEntries, + DefaultResourceNodeRegEnabled, + DefaultResourceNodeMinStaking, + ) } func validateBondDenom(i interface{}) error { @@ -150,3 +163,12 @@ func validateResourceNodeRegEnabled(i interface{}) error { return nil } + +func validateResourceNodeMinStaking(i interface{}) error { + _, ok := i.(sdk.Coin) + if !ok { + return fmt.Errorf("invalid parameter type: %T", i) + } + + return nil +} diff --git a/x/register/types/querier.go b/x/register/types/querier.go index f20c6c7d..183f019c 100644 --- a/x/register/types/querier.go +++ b/x/register/types/querier.go @@ -81,14 +81,14 @@ func NewStakingInfoByResourceNodeAddr( Pubkey: resourceNode.GetPubkey(), Suspend: resourceNode.GetSuspend(), Status: resourceNode.GetStatus(), - Tokens: &resourceNode.Tokens, + Tokens: resourceNode.Tokens, OwnerAddress: resourceNode.GetOwnerAddress(), Description: resourceNode.GetDescription(), NodeType: resourceNode.GetNodeType(), CreationTime: resourceNode.GetCreationTime(), - UnBondingStake: &unBondingValue, - UnBondedStake: &unBondedValue, - BondedStake: &bonedValue, + UnBondingStake: unBondingValue, + UnBondedStake: unBondedValue, + BondedStake: bonedValue, } } @@ -107,14 +107,14 @@ func NewStakingInfoByMetaNodeAddr( Pubkey: metaNode.GetPubkey(), Suspend: metaNode.Suspend, Status: metaNode.Status, - Tokens: &metaNode.Tokens, + Tokens: metaNode.Tokens, OwnerAddress: metaNode.GetOwnerAddress(), Description: metaNode.Description, NodeType: uint32(0), CreationTime: metaNode.CreationTime, - UnBondingStake: &unBondingValue, - UnBondedStake: &unBondedValue, - BondedStake: &bonedValue, + UnBondingStake: unBondingValue, + UnBondedStake: unBondedValue, + BondedStake: bonedValue, } } diff --git a/x/register/types/query.pb.go b/x/register/types/query.pb.go index 31c7b0b7..6df0275f 100644 --- a/x/register/types/query.pb.go +++ b/x/register/types/query.pb.go @@ -842,18 +842,18 @@ func (m *TotalStakesResponse) GetTotalUnbondingStake() *types.Coin { } type StakingInfo struct { - NetworkAddress string `protobuf:"bytes,1,opt,name=network_address,json=networkAddress,proto3" json:"network_address" yaml:"network_address"` - Pubkey *types1.Any `protobuf:"bytes,2,opt,name=pubkey,proto3" json:"pubkey" yaml:"pubkey"` - Suspend bool `protobuf:"varint,3,opt,name=suspend,proto3" json:"suspend" yaml:"suspend"` - Status types2.BondStatus `protobuf:"varint,4,opt,name=status,proto3,enum=cosmos.staking.v1beta1.BondStatus" json:"status" yaml:"status"` - Tokens *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,5,opt,name=tokens,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"tokens" yaml:"tokens"` - OwnerAddress string `protobuf:"bytes,6,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address" yaml:"owner_address"` - Description *Description `protobuf:"bytes,7,opt,name=description,proto3" json:"description" yaml:"description"` - CreationTime time.Time `protobuf:"bytes,8,opt,name=creation_time,json=creationTime,proto3,stdtime" json:"creation_time" yaml:"creation_time"` - NodeType uint32 `protobuf:"varint,9,opt,name=node_type,json=nodeType,proto3" json:"node_type" yaml:"node_type"` - BondedStake *types.Coin `protobuf:"bytes,10,opt,name=bonded_stake,json=bondedStake,proto3" json:"bonded_stake" yaml:"bonded_stake"` - UnBondingStake *types.Coin `protobuf:"bytes,11,opt,name=un_bonding_stake,json=unBondingStake,proto3" json:"un_bonding_stake" yaml:"un_bonding_stake"` - UnBondedStake *types.Coin `protobuf:"bytes,12,opt,name=un_bonded_stake,json=unBondedStake,proto3" json:"un_bonded_stake" yaml:"un_bonded_stake"` + NetworkAddress string `protobuf:"bytes,1,opt,name=network_address,json=networkAddress,proto3" json:"network_address" yaml:"network_address"` + Pubkey *types1.Any `protobuf:"bytes,2,opt,name=pubkey,proto3" json:"pubkey" yaml:"pubkey"` + Suspend bool `protobuf:"varint,3,opt,name=suspend,proto3" json:"suspend" yaml:"suspend"` + Status types2.BondStatus `protobuf:"varint,4,opt,name=status,proto3,enum=cosmos.staking.v1beta1.BondStatus" json:"status" yaml:"status"` + Tokens github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,5,opt,name=tokens,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"tokens" yaml:"tokens"` + OwnerAddress string `protobuf:"bytes,6,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address" yaml:"owner_address"` + Description Description `protobuf:"bytes,7,opt,name=description,proto3" json:"description" yaml:"description"` + CreationTime time.Time `protobuf:"bytes,8,opt,name=creation_time,json=creationTime,proto3,stdtime" json:"creation_time" yaml:"creation_time"` + NodeType uint32 `protobuf:"varint,9,opt,name=node_type,json=nodeType,proto3" json:"node_type" yaml:"node_type"` + BondedStake types.Coin `protobuf:"bytes,10,opt,name=bonded_stake,json=bondedStake,proto3" json:"bonded_stake" yaml:"bonded_stake"` + UnBondingStake types.Coin `protobuf:"bytes,11,opt,name=un_bonding_stake,json=unBondingStake,proto3" json:"un_bonding_stake" yaml:"un_bonding_stake"` + UnBondedStake types.Coin `protobuf:"bytes,12,opt,name=un_bonded_stake,json=unBondedStake,proto3" json:"un_bonded_stake" yaml:"un_bonded_stake"` } func (m *StakingInfo) Reset() { *m = StakingInfo{} } @@ -924,11 +924,11 @@ func (m *StakingInfo) GetOwnerAddress() string { return "" } -func (m *StakingInfo) GetDescription() *Description { +func (m *StakingInfo) GetDescription() Description { if m != nil { return m.Description } - return nil + return Description{} } func (m *StakingInfo) GetCreationTime() time.Time { @@ -945,25 +945,25 @@ func (m *StakingInfo) GetNodeType() uint32 { return 0 } -func (m *StakingInfo) GetBondedStake() *types.Coin { +func (m *StakingInfo) GetBondedStake() types.Coin { if m != nil { return m.BondedStake } - return nil + return types.Coin{} } -func (m *StakingInfo) GetUnBondingStake() *types.Coin { +func (m *StakingInfo) GetUnBondingStake() types.Coin { if m != nil { return m.UnBondingStake } - return nil + return types.Coin{} } -func (m *StakingInfo) GetUnBondedStake() *types.Coin { +func (m *StakingInfo) GetUnBondedStake() types.Coin { if m != nil { return m.UnBondedStake } - return nil + return types.Coin{} } func init() { @@ -990,101 +990,101 @@ func init() { func init() { proto.RegisterFile("stratos/register/v1/query.proto", fileDescriptor_59a612d1da8c0670) } var fileDescriptor_59a612d1da8c0670 = []byte{ - // 1501 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0x5d, 0x6f, 0x13, 0x47, - 0x17, 0xce, 0xf2, 0x61, 0xe2, 0x63, 0x27, 0xa0, 0x49, 0x48, 0x82, 0x79, 0xe3, 0x4d, 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0x76, 0xdb, 0xd4, 0xa8, 0xe2, 0xb6, - 0xa7, 0xc0, 0x91, 0xeb, 0x65, 0x28, 0xe2, 0x39, 0x56, 0x5d, 0x6f, 0xcd, 0x47, 0xce, 0x73, 0x99, - 0x9c, 0xef, 0x48, 0xc7, 0xeb, 0xde, 0x9a, 0x6f, 0x17, 0x58, 0xf2, 0x61, 0x7c, 0xa6, 0xa5, 0x33, - 0xbc, 0xf7, 0xd8, 0xa3, 0x41, 0xcc, 0x7f, 0x16, 0xc0, 0x8f, 0xbe, 0x55, 0xf6, 0x79, 0x61, 0x11, - 0xdc, 0xdf, 0x05, 0x48, 0x3a, 0x52, 0x70, 0x2f, 0x2c, 0x1f, 0x37, 0xb1, 0x99, 0xa3, 0x96, 0x34, - 0xe5, 0xbd, 0xc3, 0xae, 0x33, 0x6f, 0x3b, 0xcd, 0x78, 0x6b, 0x6c, 0x25, 0xd2, 0xf8, 0x51, 0xc3, - 0xee, 0x48, 0x73, 0xc0, 0x32, 0xaf, 0xc2, 0x98, 0x5a, 0x26, 0x9b, 0xd1, 0xe6, 0x76, 0xef, 0xa8, - 0xce, 0xa2, 0x52, 0x27, 0x23, 0xd7, 0x32, 0xc8, 0x9e, 0x18, 0x4a, 0x56, 0x72, 0x48, 0xb1, 0x9d, - 0x81, 0x29, 0x41, 0xf6, 0xae, 0xcf, 0x9d, 0x07, 0x82, 0x31, 0xd6, 0x64, 0xac, 0x61, 0x27, 0xa8, - 0x2b, 0x58, 0xc4, 0x4d, 0x28, 0xf2, 0xc8, 0x5a, 0x8d, 0x38, 0x51, 0x86, 0x67, 0xb5, 0x90, 0x59, - 0x43, 0x12, 0xce, 0x36, 0x09, 0x14, 0x78, 0x62, 0x34, 0x26, 0x81, 0x88, 0x3c, 0xb7, 0x9d, 0xc0, - 0x69, 0xb1, 0x38, 0xfb, 0x0d, 0x98, 0x48, 0x59, 0x31, 0xf3, 0x0a, 0xe4, 0xda, 0xc2, 0x82, 0x39, - 0x0f, 0x67, 0x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0x00, 0xff, 0xff, 0xa5, 0x0d, 0xbf, 0x9b, 0xb9, 0x11, 0x00, 0x00, + // 1497 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x57, 0xcf, 0x6f, 0x13, 0xc7, + 0x17, 0xcf, 0xf2, 0x23, 0xc4, 0xcf, 0x4e, 0x40, 0x93, 0x90, 0x04, 0xf3, 0x8d, 0x37, 0x59, 0xf8, + 0x42, 0x02, 0x78, 0xb7, 0x49, 0xa0, 0x2d, 0xa8, 0x45, 0xc2, 0xd0, 0x22, 0x40, 0xa4, 0x74, 0xa1, + 0x54, 0x6a, 0x0f, 0xd6, 0xda, 0x9e, 0x18, 0x2b, 0x78, 0xd7, 0xec, 0xcc, 0x02, 0x16, 0x42, 0x6a, + 0x7b, 0xed, 0x05, 0xb5, 0xa7, 0x5e, 0x2b, 0x55, 0xea, 0x8f, 0x4b, 0x0f, 0x55, 0xff, 0x06, 0xd4, + 0x13, 0x52, 0x2f, 0x55, 0x0f, 0xdb, 0x0a, 0x7a, 0xca, 0xd1, 0x7f, 0x41, 0xb5, 0x33, 0x6f, 0xb3, + 0xb3, 0xce, 0x3a, 0x0e, 0x3d, 0x79, 0xe7, 0xcd, 0x7b, 0x9f, 0xf7, 0x79, 0xf3, 0xde, 0xcc, 0x7b, + 0x06, 0x9d, 0x71, 0xdf, 0xe1, 0x1e, 0xb3, 0x7c, 0xda, 0x6c, 0x31, 0x4e, 0x7d, 0xeb, 0xe1, 0xb2, + 0xf5, 0x20, 0xa0, 0x7e, 0xd7, 0xec, 0xf8, 0x1e, 0xf7, 0xc8, 0x24, 0x2a, 0x98, 0xb1, 0x82, 0xf9, + 0x70, 0xb9, 0x38, 0xd5, 0xf4, 0x9a, 0x9e, 0xd8, 0xb7, 0xa2, 0x2f, 0xa9, 0x5a, 0x3c, 0xd2, 0xf4, + 0xbc, 0xe6, 0x7d, 0x6a, 0x89, 0x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49, 0xe7, 0x3a, 0x1c, 0xee, 0x33, 0x45, 0x2a, + 0xcb, 0x29, 0x2a, 0x73, 0x99, 0x54, 0xb6, 0x8c, 0x24, 0x8d, 0x4f, 0x61, 0x46, 0x60, 0xdd, 0xe6, + 0xce, 0x06, 0xad, 0x74, 0x5f, 0x8f, 0x09, 0x99, 0x03, 0x10, 0x39, 0xae, 0xf2, 0x6e, 0x87, 0xce, + 0xee, 0x99, 0xd7, 0x16, 0xc7, 0xed, 0x9c, 0x90, 0xdc, 0xe9, 0x76, 0xa8, 0x51, 0xc5, 0x63, 0x4f, + 0x81, 0x23, 0xd7, 0xcb, 0x50, 0xc0, 0x3c, 0x56, 0x5b, 0xee, 0xba, 0x87, 0x9c, 0xe7, 0x33, 0x39, + 0xdf, 0x96, 0x8a, 0xd7, 0xdc, 0x75, 0xcf, 0xce, 0xb3, 0x64, 0x61, 0x7c, 0xae, 0xa5, 0x3d, 0x7c, + 0xf0, 0xc8, 0xa5, 0x7e, 0xcc, 0x7f, 0x0e, 0xc0, 0x8b, 0xd6, 0x2a, 0xfb, 0x9c, 0x90, 0x08, 0xee, + 0xef, 0x03, 0x24, 0x15, 0x29, 0xb8, 0xe7, 0x57, 0x4e, 0x98, 0x58, 0xcc, 0x51, 0x49, 0x9a, 0xf2, + 0xde, 0x61, 0xd5, 0x99, 0xb7, 0x9c, 0x66, 0x7c, 0x34, 0xb6, 0x62, 0x69, 0xfc, 0xa4, 0x61, 0x75, + 0xa4, 0x39, 0x60, 0x98, 0xef, 0xc1, 0xb8, 0x1a, 0x26, 0x9b, 0xd5, 0xe6, 0xf7, 0xee, 0x2a, 0xce, + 0x82, 0x12, 0x27, 0x23, 0x57, 0x33, 0xc8, 0x9e, 0x1c, 0x4a, 0x56, 0x72, 0x48, 0xb1, 0x9d, 0x85, + 0x69, 0x41, 0xf6, 0x8e, 0xc7, 0x9d, 0xfb, 0x82, 0x31, 0xc6, 0x64, 0xac, 0x63, 0x25, 0xa8, 0x3b, + 0x18,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e, 0x7e, 0x59, 0xd2, 0x9e, 0xbd, 0x2a, 0x8d, 0xbc, 0x78, 0x55, 0x1a, 0xf9, 0xe3, 0x55, 0x69, + 0xe4, 0x93, 0xb3, 0xca, 0x74, 0x81, 0x18, 0x2e, 0xe5, 0xf1, 0x67, 0xb9, 0x7e, 0xcf, 0x69, 0xb9, + 0xd6, 0xe3, 0x04, 0x56, 0xcc, 0x1b, 0xb5, 0x51, 0xd1, 0x6a, 0x57, 0xff, 0x0d, 0x00, 0x00, 0xff, + 0xff, 0x75, 0x9f, 0x0c, 0x74, 0xc1, 0x11, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -2047,42 +2047,36 @@ func (m *StakingInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.UnBondedStake != nil { - { - size, err := m.UnBondedStake.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) + { + size, err := m.UnBondedStake.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x62 + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } - if m.UnBondingStake != nil { - { - size, err := m.UnBondingStake.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x62 + { + size, err := m.UnBondingStake.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x5a + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } - if m.BondedStake != nil { - { - size, err := m.BondedStake.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x5a + { + size, err := m.BondedStake.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x52 + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x52 if m.NodeType != 0 { i = encodeVarintQuery(dAtA, i, uint64(m.NodeType)) i-- @@ -2096,18 +2090,16 @@ func (m *StakingInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintQuery(dAtA, i, uint64(n16)) i-- dAtA[i] = 0x42 - if m.Description != nil { - { - size, err := m.Description.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) + { + size, err := m.Description.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x3a + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x3a if len(m.OwnerAddress) > 0 { i -= len(m.OwnerAddress) copy(dAtA[i:], m.OwnerAddress) @@ -2115,18 +2107,16 @@ func (m *StakingInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x32 } - if m.Tokens != nil { - { - size := m.Tokens.Size() - i -= size - if _, err := m.Tokens.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintQuery(dAtA, i, uint64(size)) + { + size := m.Tokens.Size() + i -= size + if _, err := m.Tokens.MarshalTo(dAtA[i:]); err != nil { + return 0, err } - i-- - dAtA[i] = 0x2a + i = encodeVarintQuery(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x2a if m.Status != 0 { i = encodeVarintQuery(dAtA, i, uint64(m.Status)) i-- @@ -2427,35 +2417,25 @@ func (m *StakingInfo) Size() (n int) { if m.Status != 0 { n += 1 + sovQuery(uint64(m.Status)) } - if m.Tokens != nil { - l = m.Tokens.Size() - n += 1 + l + sovQuery(uint64(l)) - } + l = m.Tokens.Size() + n += 1 + l + sovQuery(uint64(l)) l = len(m.OwnerAddress) if l > 0 { n += 1 + l + sovQuery(uint64(l)) } - if m.Description != nil { - l = m.Description.Size() - n += 1 + l + sovQuery(uint64(l)) - } + l = m.Description.Size() + n += 1 + l + sovQuery(uint64(l)) l = github_com_gogo_protobuf_types.SizeOfStdTime(m.CreationTime) n += 1 + l + sovQuery(uint64(l)) if m.NodeType != 0 { n += 1 + sovQuery(uint64(m.NodeType)) } - if m.BondedStake != nil { - l = m.BondedStake.Size() - n += 1 + l + sovQuery(uint64(l)) - } - if m.UnBondingStake != nil { - l = m.UnBondingStake.Size() - n += 1 + l + sovQuery(uint64(l)) - } - if m.UnBondedStake != nil { - l = m.UnBondedStake.Size() - n += 1 + l + sovQuery(uint64(l)) - } + l = m.BondedStake.Size() + n += 1 + l + sovQuery(uint64(l)) + l = m.UnBondingStake.Size() + n += 1 + l + sovQuery(uint64(l)) + l = m.UnBondedStake.Size() + n += 1 + l + sovQuery(uint64(l)) return n } @@ -4132,8 +4112,6 @@ func (m *StakingInfo) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_cosmos_cosmos_sdk_types.Int - m.Tokens = &v if err := m.Tokens.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -4199,9 +4177,6 @@ func (m *StakingInfo) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Description == nil { - m.Description = &Description{} - } if err := m.Description.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -4287,9 +4262,6 @@ func (m *StakingInfo) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.BondedStake == nil { - m.BondedStake = &types.Coin{} - } if err := m.BondedStake.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -4323,9 +4295,6 @@ func (m *StakingInfo) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.UnBondingStake == nil { - m.UnBondingStake = &types.Coin{} - } if err := m.UnBondingStake.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -4359,9 +4328,6 @@ func (m *StakingInfo) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.UnBondedStake == nil { - m.UnBondedStake = &types.Coin{} - } if err := m.UnBondedStake.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } diff --git a/x/register/types/register.pb.go b/x/register/types/register.pb.go index 4e034bfd..9ea0eeac 100644 --- a/x/register/types/register.pb.go +++ b/x/register/types/register.pb.go @@ -5,9 +5,10 @@ package types import ( fmt "fmt" - types "github.com/cosmos/cosmos-sdk/codec/types" + types1 "github.com/cosmos/cosmos-sdk/codec/types" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" - types1 "github.com/cosmos/cosmos-sdk/x/staking/types" + types "github.com/cosmos/cosmos-sdk/types" + types2 "github.com/cosmos/cosmos-sdk/x/staking/types" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" @@ -38,7 +39,8 @@ type Params struct { UnbondingThreasholdTime time.Duration `protobuf:"bytes,2,opt,name=unbonding_threashold_time,json=unbondingThreasholdTime,proto3,stdduration" json:"unbonding_threashold_time" yaml:"unbonding_threashold_time"` UnbondingCompletionTime time.Duration `protobuf:"bytes,3,opt,name=unbonding_completion_time,json=unbondingCompletionTime,proto3,stdduration" json:"unbonding_completion_time" yaml:"unbonding_completion_time"` MaxEntries uint32 `protobuf:"varint,4,opt,name=max_entries,json=maxEntries,proto3" json:"max_entries" yaml:"max_entries",omitempty` - ResourceNodeRegEnabled bool `protobuf:"varint,5,opt,name=resource_node_reg_enabled,json=resourceNodeRegEnabled,proto3" json:"resource_node_reg_enabled,omitempty" yaml:"resource_node_reg_enabled"` + ResourceNodeRegEnabled bool `protobuf:"varint,5,opt,name=resource_node_reg_enabled,json=resourceNodeRegEnabled,proto3" json:"resource_node_reg_enabled" yaml:"resource_node_reg_enabled"` + ResourceNodeMinStaking types.Coin `protobuf:"bytes,6,opt,name=resource_node_min_staking,json=resourceNodeMinStaking,proto3" json:"resource_node_min_staking" yaml:"resource_node_min_staking"` } func (m *Params) Reset() { *m = Params{} } @@ -109,14 +111,21 @@ func (m *Params) GetResourceNodeRegEnabled() bool { return false } +func (m *Params) GetResourceNodeMinStaking() types.Coin { + if m != nil { + return m.ResourceNodeMinStaking + } + return types.Coin{} +} + type ResourceNode struct { NetworkAddress string `protobuf:"bytes,1,opt,name=network_address,json=networkAddress,proto3" json:"network_address" yaml:"network_address"` - Pubkey *types.Any `protobuf:"bytes,2,opt,name=pubkey,proto3" json:"pubkey" yaml:"pubkey"` + Pubkey *types1.Any `protobuf:"bytes,2,opt,name=pubkey,proto3" json:"pubkey" yaml:"pubkey"` Suspend bool `protobuf:"varint,3,opt,name=suspend,proto3" json:"suspend" yaml:"suspend"` - Status types1.BondStatus `protobuf:"varint,4,opt,name=status,proto3,enum=cosmos.staking.v1beta1.BondStatus" json:"status" yaml:"status"` + Status types2.BondStatus `protobuf:"varint,4,opt,name=status,proto3,enum=cosmos.staking.v1beta1.BondStatus" json:"status" yaml:"status"` Tokens github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,5,opt,name=tokens,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"tokens" yaml:"tokens"` OwnerAddress string `protobuf:"bytes,6,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address" yaml:"owner_address"` - Description *Description `protobuf:"bytes,7,opt,name=description,proto3" json:"description" yaml:"description"` + Description Description `protobuf:"bytes,7,opt,name=description,proto3" json:"description" yaml:"description"` CreationTime time.Time `protobuf:"bytes,8,opt,name=creation_time,json=creationTime,proto3,stdtime" json:"creation_time" yaml:"creation_time"` NodeType uint32 `protobuf:"varint,9,opt,name=node_type,json=nodeType,proto3" json:"node_type" yaml:"node_type"` EffectiveTokens github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,10,opt,name=effective_tokens,json=effectiveTokens,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"effective_tokens" yaml:"effective_tokens"` @@ -162,7 +171,7 @@ func (m *ResourceNode) GetNetworkAddress() string { return "" } -func (m *ResourceNode) GetPubkey() *types.Any { +func (m *ResourceNode) GetPubkey() *types1.Any { if m != nil { return m.Pubkey } @@ -176,11 +185,11 @@ func (m *ResourceNode) GetSuspend() bool { return false } -func (m *ResourceNode) GetStatus() types1.BondStatus { +func (m *ResourceNode) GetStatus() types2.BondStatus { if m != nil { return m.Status } - return types1.Unspecified + return types2.Unspecified } func (m *ResourceNode) GetOwnerAddress() string { @@ -190,11 +199,11 @@ func (m *ResourceNode) GetOwnerAddress() string { return "" } -func (m *ResourceNode) GetDescription() *Description { +func (m *ResourceNode) GetDescription() Description { if m != nil { return m.Description } - return nil + return Description{} } func (m *ResourceNode) GetCreationTime() time.Time { @@ -213,12 +222,12 @@ func (m *ResourceNode) GetNodeType() uint32 { type MetaNode struct { NetworkAddress string `protobuf:"bytes,1,opt,name=network_address,json=networkAddress,proto3" json:"network_address" yaml:"network_address"` - Pubkey *types.Any `protobuf:"bytes,2,opt,name=pubkey,proto3" json:"pubkey" yaml:"pubkey"` + Pubkey *types1.Any `protobuf:"bytes,2,opt,name=pubkey,proto3" json:"pubkey" yaml:"pubkey"` Suspend bool `protobuf:"varint,3,opt,name=suspend,proto3" json:"suspend" yaml:"suspend"` - Status types1.BondStatus `protobuf:"varint,4,opt,name=status,proto3,enum=cosmos.staking.v1beta1.BondStatus" json:"status" yaml:"status"` + Status types2.BondStatus `protobuf:"varint,4,opt,name=status,proto3,enum=cosmos.staking.v1beta1.BondStatus" json:"status" yaml:"status"` Tokens github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,5,opt,name=tokens,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"tokens" yaml:"tokens"` OwnerAddress string `protobuf:"bytes,6,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address" yaml:"owner_address"` - Description *Description `protobuf:"bytes,7,opt,name=description,proto3" json:"description" yaml:"description"` + Description Description `protobuf:"bytes,7,opt,name=description,proto3" json:"description" yaml:"description"` CreationTime time.Time `protobuf:"bytes,8,opt,name=creation_time,json=creationTime,proto3,stdtime" json:"creation_time" yaml:"creation_time"` } @@ -262,7 +271,7 @@ func (m *MetaNode) GetNetworkAddress() string { return "" } -func (m *MetaNode) GetPubkey() *types.Any { +func (m *MetaNode) GetPubkey() *types1.Any { if m != nil { return m.Pubkey } @@ -276,11 +285,11 @@ func (m *MetaNode) GetSuspend() bool { return false } -func (m *MetaNode) GetStatus() types1.BondStatus { +func (m *MetaNode) GetStatus() types2.BondStatus { if m != nil { return m.Status } - return types1.Unspecified + return types2.Unspecified } func (m *MetaNode) GetOwnerAddress() string { @@ -290,11 +299,11 @@ func (m *MetaNode) GetOwnerAddress() string { return "" } -func (m *MetaNode) GetDescription() *Description { +func (m *MetaNode) GetDescription() Description { if m != nil { return m.Description } - return nil + return Description{} } func (m *MetaNode) GetCreationTime() time.Time { @@ -579,91 +588,95 @@ func init() { } var fileDescriptor_fef1e3aeec8499d6 = []byte{ - // 1336 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x57, 0xcf, 0x8f, 0xd3, 0xc6, - 0x17, 0x5f, 0xef, 0xc2, 0x26, 0x99, 0xec, 0x0f, 0xbe, 0x66, 0x05, 0x59, 0xbe, 0x34, 0x13, 0xa6, - 0xb4, 0x6c, 0xa5, 0x6e, 0xa2, 0x85, 0x4a, 0x55, 0x39, 0x54, 0xc2, 0x40, 0x5b, 0x68, 0x8b, 0x56, - 0xee, 0x16, 0xa4, 0x4a, 0x95, 0x3b, 0xb1, 0x87, 0xec, 0xb0, 0xb1, 0xc7, 0xf2, 0x4c, 0x96, 0xcd, - 0xad, 0x52, 0x2f, 0x1c, 0x39, 0x72, 0xe4, 0x8f, 0xe8, 0x5f, 0x50, 0xa9, 0x12, 0xe2, 0xc4, 0xb1, - 0xea, 0xc1, 0xad, 0xe0, 0x52, 0xe5, 0xe8,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0x58, 0x8d, 0x88, 0xb8, 0xcf, 0x92, 0x3d, 0x0f, 0x07, 0x41, 0x42, - 0x38, 0xd7, 0x92, 0xda, 0x9c, 0xa4, 0xb0, 0x4a, 0x65, 0x29, 0x3c, 0xa5, 0x52, 0x57, 0x08, 0xe4, - 0xae, 0x68, 0xe4, 0x8a, 0x02, 0x6c, 0x0c, 0x16, 0xe3, 0x51, 0x7f, 0x8f, 0x8c, 0xb5, 0x9a, 0xd6, - 0x0e, 0xb5, 0xea, 0x4a, 0x34, 0x76, 0x2e, 0x4d, 0x52, 0xa8, 0xfd, 0xb2, 0x14, 0x2e, 0xab, 0xd8, - 0xca, 0x46, 0x4f, 0x7f, 0xdc, 0x5c, 0xd3, 0x93, 0xe2, 0x27, 0xe3, 0x58, 0xb0, 0xee, 0xf6, 0xa8, - 0xff, 0x39, 0x19, 0xbb, 0x7a, 0x81, 0xfd, 0x21, 0xa8, 0xf1, 0x11, 0x8f, 0x49, 0x14, 0x48, 0x39, - 0xd4, 0x9d, 0xb7, 0x26, 0x29, 0x34, 0x50, 0x96, 0xc2, 0x15, 0x15, 0x4e, 0x03, 0xc8, 0x35, 0x94, - 0x7d, 0x07, 0x2c, 0x72, 0x81, 0xc5, 0x48, 0xb5, 0x6c, 0xe5, 0x22, 0xea, 0xea, 0x3c, 0x66, 0xe6, - 0xf4, 0x0c, 0x76, 0x1d, 0x16, 0x05, 0x5f, 0x49, 0x4f, 0xe7, 0xff, 0x79, 0xa5, 0x6a, 0x55, 0x51, - 0xa9, 0xb2, 0x91, 0xab, 0x89, 0x7c, 0xd3, 0x82, 0xed, 0x91, 0x88, 0xcb, 0x5e, 0x35, 0x94, 0x08, - 0x7f, 0x4d, 0xe1, 0xbb, 0x03, 0x2a, 0x76, 0x47, 0xfd, 0xae, 0xcf, 0x42, 0x3d, 0xfc, 0xfa, 0x67, - 0x93, 0x07, 0x7b, 0x3d, 0x31, 0x8e, 0x09, 0xef, 0xde, 0x88, 0x44, 0x9e, 0x42, 0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5, 0xc7, 0x63, 0x68, 0xa1, 0x3f, 0x8f, 0x83, 0xfa, 0x97, 0x44, 0xe0, 0x37, - 0x03, 0xfc, 0x66, 0x80, 0xff, 0xe3, 0x03, 0x5c, 0x52, 0xfd, 0x5f, 0xf3, 0xe0, 0xac, 0x51, 0xbd, - 0x2b, 0x77, 0xa5, 0xfe, 0xea, 0x6f, 0x33, 0x41, 0xb6, 0x19, 0x1b, 0xbe, 0xb6, 0x49, 0xb8, 0x09, - 0x96, 0x70, 0x1c, 0x27, 0x6c, 0x9f, 0x78, 0x43, 0xca, 0x45, 0x6b, 0xbe, 0xb3, 0xb0, 0xd1, 0x70, - 0x2e, 0x4c, 0x52, 0x38, 0x83, 0x67, 0x29, 0x3c, 0xa9, 0x22, 0x96, 0x51, 0xe4, 0x36, 0xb5, 0xf9, - 0x05, 0xe5, 0xc2, 0xfe, 0x04, 0x34, 0x13, 0x72, 0x8f, 0xf8, 0x42, 0x85, 0x5a, 0x90, 0xa1, 0x64, - 0x2f, 0x4a, 0x70, 0xd1, 0x8b, 0x12, 0x88, 0x5c, 0xa0, 0x2c, 0x19, 0xe7, 0x1e, 0x68, 0x92, 0x83, - 0x98, 0x26, 0x44, 0x35, 0xe2, 0xd8, 0x3f, 0x36, 0x62, 0x53, 0x37, 0xa2, 0xbc, 0xac, 0xc8, 0x53, - 0x02, 0x55, 0x13, 0x80, 0x42, 0xf2, 0xf5, 0xe8, 0x87, 0x05, 0xd0, 0x2c, 0x49, 0x27, 0x1f, 0xdb, - 0x90, 0x45, 0x74, 0x8f, 0x24, 0xfa, 0xfd, 0xca, 0xb1, 0xd5, 0x50, 0x31, 0xb6, 0x1a, 0x40, 0xae, - 0xa1, 0xec, 0xeb, 0xa0, 0x4e, 0x03, 0x12, 0x09, 0x2a, 0xd4, 0xa1, 0xa2, 0x54, 0x3f, 0xc5, 0xb2, - 0x14, 0xae, 0xab, 0xa5, 0x06, 0x29, 0x5f, 0x93, 0xa6, 0x6e, 0xf6, 0x15, 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af, 0x64, 0x41, 0xcd, 0x7f, 0x85, 0x2a, 0xe6, 0xbf, 0x42, 0x20, 0x77, 0xc5, - 0x20, 0x9f, 0x49, 0xc0, 0xde, 0x07, 0xab, 0xd5, 0xcf, 0x8f, 0xf9, 0xd7, 0x71, 0xf0, 0xad, 0xf8, - 0xb3, 0x9f, 0x17, 0xdf, 0x5b, 0x60, 0x95, 0x46, 0x54, 0x50, 0x3c, 0xf4, 0xfa, 0x78, 0x88, 0x23, - 0xdf, 0x08, 0xfe, 0xce, 0x91, 0xfe, 0x92, 0xaa, 0x41, 0x8a, 0xad, 0x57, 0x08, 0xe4, 0xae, 0x68, - 0xc4, 0x51, 0x80, 0x8d, 0x41, 0xcd, 0x64, 0x56, 0xe3, 0xf1, 0xe9, 0x91, 0x32, 0xd7, 0x8a, 0x8c, - 0xba, 0x99, 0xd3, 0x4c, 0x86, 0x72, 0x6e, 0x3d, 0x79, 0xde, 0xb6, 0x9e, 0x3d, 0x6f, 0x5b, 0xbf, - 0x3f, 0x6f, 0x5b, 0x0f, 0x5f, 0xb4, 0xe7, 0x9e, 0xbd, 0x68, 0xcf, 0xfd, 0xf2, 0xa2, 0x3d, 0xf7, - 0xcd, 0x07, 0xa5, 0x3c, 0x5a, 0x41, 0x11, 0x11, 0xe6, 0x71, 0xd3, 0xdf, 0xc5, 0x34, 0xea, 0x1d, - 0x14, 0x5f, 0xff, 0x32, 0x73, 0x7f, 0x51, 0x36, 0xe3, 0xd2, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, - 0xc3, 0x9a, 0xa6, 0xfc, 0x1e, 0x10, 0x00, 0x00, + // 1397 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0xcf, 0x6f, 0x13, 0xc7, + 0x17, 0xcf, 0x26, 0x10, 0xdb, 0xe3, 0xfc, 0xe0, 0xbb, 0x44, 0xe0, 0xf0, 0xa5, 0x1e, 0x33, 0xfd, + 0x41, 0x90, 0x1a, 0x5b, 0x81, 0x4a, 0x55, 0x39, 0x54, 0xca, 0x42, 0xda, 0x42, 0x0b, 0x8a, 0x96, + 0x14, 0xa4, 0x4a, 0xd5, 0x76, 0xbc, 0x3b, 0x38, 0x43, 0xbc, 0x3b, 0xd6, 0xce, 0x38, 0xc4, 0x52, + 0x0f, 0x48, 0xbd, 0x70, 0xe4, 0x88, 0xd4, 0x0b, 0x7f, 0x44, 0xff, 0x86, 0x0a, 0x71, 0xe2, 0x58, + 0xf5, 0xb0, 0xad, 0xe0, 0x52, 0xf9, 0xb8, 0x87, 0xf6, 0x5a, 0xed, 0xfc, 0xf0, 0xae, 0x37, 0x44, + 0x15, 0x95, 0x38, 0x95, 0x13, 0x3b, 0x9f, 0xcf, 0x9b, 0xf7, 0xde, 0xcc, 0xfb, 0xbc, 0xe7, 0x09, + 0x00, 0x71, 0x11, 0x63, 0xc1, 0x78, 0x27, 0x26, 0x3d, 0xca, 0x05, 0x89, 0x3b, 0xfb, 0x1b, 0x93, + 0xef, 0xf6, 0x20, 0x66, 0x82, 0xd9, 0x27, 0xb5, 0x4d, 0x7b, 0x82, 0xef, 0x6f, 0x9c, 0x59, 0xe9, + 0xb1, 0x1e, 0x93, 0x7c, 0x27, 0xfb, 0x52, 0xa6, 0x67, 0x56, 0x7b, 0x8c, 0xf5, 0xfa, 0xa4, 0x23, + 0x57, 0xdd, 0xe1, 0xdd, 0x0e, 0x8e, 0x46, 0x9a, 0x82, 0x65, 0x4a, 0xd0, 0x90, 0x70, 0x81, 0xc3, + 0x81, 0x36, 0x68, 0x96, 0x0d, 0x82, 0x61, 0x8c, 0x05, 0x65, 0x91, 0xf1, 0xed, 0x33, 0x1e, 0x32, + 0xee, 0xa9, 0xa0, 0x6a, 0x61, 0xb6, 0xaa, 0x55, 0xa7, 0x8b, 0x39, 0xe9, 0xec, 0x6f, 0x74, 0x89, + 0xc0, 0x1b, 0x1d, 0x9f, 0x51, 0xb3, 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69, 0x02, 0x4f, 0x2a, 0x8f, 0x45, 0x14, 0xb9, 0x75, 0xbd, 0xfc, 0x8a, 0x72, 0x61, 0x7f, + 0x06, 0xea, 0x31, 0xb9, 0x47, 0x7c, 0xa1, 0x5c, 0xcd, 0x49, 0x57, 0xef, 0x67, 0xb5, 0x28, 0xc0, + 0x79, 0x2d, 0x0a, 0x20, 0x72, 0x81, 0x5a, 0x49, 0x3f, 0xf7, 0x40, 0x9d, 0x1c, 0x0c, 0x68, 0x4c, + 0x54, 0x21, 0x8e, 0xfd, 0x63, 0x21, 0xd6, 0x4d, 0xcd, 0x0b, 0xdb, 0xf2, 0x38, 0x05, 0x50, 0x15, + 0x01, 0x28, 0x24, 0xdb, 0x8f, 0x7e, 0x98, 0x03, 0xf5, 0x82, 0x7c, 0xb2, 0xd6, 0x0d, 0x59, 0x44, + 0xf7, 0x48, 0xac, 0xef, 0x57, 0xb6, 0xae, 0x86, 0xf2, 0xd6, 0xd5, 0x00, 0x72, 0x0d, 0x65, 0x6f, + 0x81, 0x2a, 0x0d, 0x48, 0x24, 0xa8, 0x50, 0x83, 0x45, 0x29, 0x7f, 0x82, 0xa5, 0x09, 0x5c, 0x55, + 0x5b, 0x0d, 0x52, 0x7c, 0xe9, 0x4d, 0xcc, 0xec, 0x4d, 0x50, 0xb9, 0x4f, 0xba, 0x9c, 0x0a, 0xf5, + 0x92, 0x55, 0xa5, 0x30, 0x50, 0x9a, 0xc0, 0x86, 0x72, 0xa2, 0x81, 0xa2, 0x0f, 0x63, 0x64, 0x07, + 0xe0, 0x04, 0x27, 0xfe, 0x30, 0xa6, 0x62, 0xe4, 0xf9, 0x2c, 0x12, 0xd8, 0x17, 0xf2, 0x0e, 0x6b, + 0xce, 0x27, 0xd9, 0xac, 0x2e, 0x73, 0x69, 0x02, 0xcf, 0xe9, 0xa1, 0x51, 0x62, 0x8a, 0xde, 0x97, + 0x0d, 0x79, 0x45, 0x71, 0x59, 0xa2, 0x01, 0x11, 0x98, 0xf6, 0xcd, 0x48, 0x91, 0x89, 0x6a, 0x28, + 0x4f, 0x54, 0x03, 0x53, 0x89, 0x6a, 0xac, 0x20, 0xff, 0x87, 0xb3, 0x60, 0xf1, 0x6b, 0xf3, 0x96, + 0x96, 0xd3, 0xff, 0x3a, 0x58, 0x28, 0x6a, 0x57, 0x17, 0x43, 0xea, 0xb2, 0x88, 0xe7, 0xba, 0x2c, + 0xa2, 0xc8, 0xad, 0x17, 0x64, 0x6e, 0x5f, 0x03, 0x0b, 0x94, 0x7b, 0x21, 0x11, 0x58, 0x3e, 0x2a, + 0x65, 0x79, 0xaa, 0xca, 0x57, 0x11, 0xcf, 0x7d, 0x15, 0x51, 0xe4, 0x02, 0xca, 0x27, 0x3f, 0x4a, + 0xdf, 0x81, 0x8a, 0x79, 0xd4, 0x67, 0xf2, 0xae, 0x5f, 0x3c, 0xff, 0xca, 0x81, 0x34, 0x75, 0x96, + 0xec, 0x09, 0x3f, 0x52, 0x3a, 0xca, 0x5f, 0xfe, 0x5a, 0x47, 0xe6, 0xd5, 0xef, 0x1a, 0x0a, 0x3d, + 0x9b, 0x03, 0xf6, 0xe1, 0xed, 0x59, 0xff, 0x4f, 0xc6, 0xc9, 0x2e, 0xa1, 0xbd, 0x5d, 0x21, 0xaf, + 0x64, 0x4e, 0xf5, 0x7f, 0x89, 0xca, 0xfb, 0xbf, 0x44, 0x20, 0x77, 0xc9, 0x20, 0x5f, 0x48, 0xc0, + 0xde, 0x07, 0xcb, 0xe5, 0xbf, 0xa0, 0x66, 0xdf, 0xc4, 0xe0, 0x5b, 0xf2, 0xa7, 0xff, 0x42, 0x7a, + 0x60, 0x81, 0x65, 0x1a, 0x51, 0x41, 0x71, 0xdf, 0xeb, 0xe2, 0x3e, 0x8e, 0x7c, 0x23, 0xf8, 0x3b, + 0xaf, 0xf5, 0xb3, 0x54, 0x76, 0x92, 0x1f, 0xbd, 0x44, 0x20, 0x77, 0x49, 0x23, 0x8e, 0x02, 0x6c, + 0x0c, 0x2a, 0x26, 0xb2, 0x6a, 0x8f, 0xcf, 0x5f, 0x2b, 0x72, 0x25, 0x8f, 0xa8, 0x8b, 0x39, 0x89, + 0x64, 0x28, 0xe7, 0xe6, 0xd3, 0x17, 0x4d, 0xeb, 0xf9, 0x8b, 0xa6, 0xf5, 0xfb, 0x8b, 0xa6, 0xf5, + 0xe8, 0x65, 0x73, 0xe6, 0xf9, 0xcb, 0xe6, 0xcc, 0x2f, 0x2f, 0x9b, 0x33, 0xdf, 0x7c, 0x54, 0x88, + 0xa3, 0x15, 0x14, 0x11, 0x61, 0x3e, 0xd7, 0xfd, 0x5d, 0x4c, 0xa3, 0xce, 0x41, 0xfe, 0x1f, 0x1c, + 0x32, 0x72, 0x77, 0x5e, 0x16, 0xe3, 0xd2, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x1e, 0x4a, 0x90, + 0xa8, 0x01, 0x11, 0x00, 0x00, } func (this *ResourceNode) Equal(that interface{}) bool { @@ -703,7 +716,7 @@ func (this *ResourceNode) Equal(that interface{}) bool { if this.OwnerAddress != that1.OwnerAddress { return false } - if !this.Description.Equal(that1.Description) { + if !this.Description.Equal(&that1.Description) { return false } if !this.CreationTime.Equal(that1.CreationTime) { @@ -754,7 +767,7 @@ func (this *MetaNode) Equal(that interface{}) bool { if this.OwnerAddress != that1.OwnerAddress { return false } - if !this.Description.Equal(that1.Description) { + if !this.Description.Equal(&that1.Description) { return false } if !this.CreationTime.Equal(that1.CreationTime) { @@ -818,6 +831,16 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + { + size, err := m.ResourceNodeMinStaking.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRegister(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 if m.ResourceNodeRegEnabled { i-- if m.ResourceNodeRegEnabled { @@ -833,21 +856,21 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x20 } - n1, err1 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.UnbondingCompletionTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.UnbondingCompletionTime):]) - if err1 != nil { - return 0, err1 - } - i -= n1 - i = encodeVarintRegister(dAtA, i, uint64(n1)) - i-- - dAtA[i] = 0x1a - n2, err2 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.UnbondingThreasholdTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.UnbondingThreasholdTime):]) + n2, err2 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.UnbondingCompletionTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.UnbondingCompletionTime):]) if err2 != nil { return 0, err2 } i -= n2 i = encodeVarintRegister(dAtA, i, uint64(n2)) i-- + dAtA[i] = 0x1a + n3, err3 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.UnbondingThreasholdTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.UnbondingThreasholdTime):]) + if err3 != nil { + return 0, err3 + } + i -= n3 + i = encodeVarintRegister(dAtA, i, uint64(n3)) + i-- dAtA[i] = 0x12 if len(m.BondDenom) > 0 { i -= len(m.BondDenom) @@ -894,26 +917,24 @@ func (m *ResourceNode) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x48 } - n3, err3 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.CreationTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.CreationTime):]) - if err3 != nil { - return 0, err3 + n4, err4 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.CreationTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.CreationTime):]) + if err4 != nil { + return 0, err4 } - i -= n3 - i = encodeVarintRegister(dAtA, i, uint64(n3)) + i -= n4 + i = encodeVarintRegister(dAtA, i, uint64(n4)) i-- dAtA[i] = 0x42 - if m.Description != nil { - { - size, err := m.Description.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRegister(dAtA, i, uint64(size)) + { + size, err := m.Description.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x3a + i -= size + i = encodeVarintRegister(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x3a if len(m.OwnerAddress) > 0 { i -= len(m.OwnerAddress) copy(dAtA[i:], m.OwnerAddress) @@ -988,26 +1009,24 @@ func (m *MetaNode) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - n6, err6 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.CreationTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.CreationTime):]) - if err6 != nil { - return 0, err6 + n7, err7 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.CreationTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.CreationTime):]) + if err7 != nil { + return 0, err7 } - i -= n6 - i = encodeVarintRegister(dAtA, i, uint64(n6)) + i -= n7 + i = encodeVarintRegister(dAtA, i, uint64(n7)) i-- dAtA[i] = 0x42 - if m.Description != nil { - { - size, err := m.Description.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRegister(dAtA, i, uint64(size)) + { + size, err := m.Description.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x3a + i -= size + i = encodeVarintRegister(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x3a if len(m.OwnerAddress) > 0 { i -= len(m.OwnerAddress) copy(dAtA[i:], m.OwnerAddress) @@ -1082,12 +1101,12 @@ func (m *MetaNodeRegistrationVotePool) MarshalToSizedBuffer(dAtA []byte) (int, e _ = i var l int _ = l - n9, err9 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.ExpireTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.ExpireTime):]) - if err9 != nil { - return 0, err9 + n10, err10 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.ExpireTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.ExpireTime):]) + if err10 != nil { + return 0, err10 } - i -= n9 - i = encodeVarintRegister(dAtA, i, uint64(n9)) + i -= n10 + i = encodeVarintRegister(dAtA, i, uint64(n10)) i-- dAtA[i] = 0x22 if len(m.RejectList) > 0 { @@ -1274,12 +1293,12 @@ func (m *UnbondingNodeEntry) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x1a } - n10, err10 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.CompletionTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.CompletionTime):]) - if err10 != nil { - return 0, err10 + n11, err11 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.CompletionTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.CompletionTime):]) + if err11 != nil { + return 0, err11 } - i -= n10 - i = encodeVarintRegister(dAtA, i, uint64(n10)) + i -= n11 + i = encodeVarintRegister(dAtA, i, uint64(n11)) i-- dAtA[i] = 0x12 if m.CreationHeight != 0 { @@ -1321,6 +1340,8 @@ func (m *Params) Size() (n int) { if m.ResourceNodeRegEnabled { n += 2 } + l = m.ResourceNodeMinStaking.Size() + n += 1 + l + sovRegister(uint64(l)) return n } @@ -1350,10 +1371,8 @@ func (m *ResourceNode) Size() (n int) { if l > 0 { n += 1 + l + sovRegister(uint64(l)) } - if m.Description != nil { - l = m.Description.Size() - n += 1 + l + sovRegister(uint64(l)) - } + l = m.Description.Size() + n += 1 + l + sovRegister(uint64(l)) l = github_com_gogo_protobuf_types.SizeOfStdTime(m.CreationTime) n += 1 + l + sovRegister(uint64(l)) if m.NodeType != 0 { @@ -1390,10 +1409,8 @@ func (m *MetaNode) Size() (n int) { if l > 0 { n += 1 + l + sovRegister(uint64(l)) } - if m.Description != nil { - l = m.Description.Size() - n += 1 + l + sovRegister(uint64(l)) - } + l = m.Description.Size() + n += 1 + l + sovRegister(uint64(l)) l = github_com_gogo_protobuf_types.SizeOfStdTime(m.CreationTime) n += 1 + l + sovRegister(uint64(l)) return n @@ -1671,6 +1688,39 @@ func (m *Params) Unmarshal(dAtA []byte) error { } } m.ResourceNodeRegEnabled = bool(v != 0) + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResourceNodeMinStaking", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRegister + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRegister + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRegister + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ResourceNodeMinStaking.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipRegister(dAtA[iNdEx:]) @@ -1783,7 +1833,7 @@ func (m *ResourceNode) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.Pubkey == nil { - m.Pubkey = &types.Any{} + m.Pubkey = &types1.Any{} } if err := m.Pubkey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -1823,7 +1873,7 @@ func (m *ResourceNode) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Status |= types1.BondStatus(b&0x7F) << shift + m.Status |= types2.BondStatus(b&0x7F) << shift if b < 0x80 { break } @@ -1923,9 +1973,6 @@ func (m *ResourceNode) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Description == nil { - m.Description = &Description{} - } if err := m.Description.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -2128,7 +2175,7 @@ func (m *MetaNode) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.Pubkey == nil { - m.Pubkey = &types.Any{} + m.Pubkey = &types1.Any{} } if err := m.Pubkey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -2168,7 +2215,7 @@ func (m *MetaNode) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Status |= types1.BondStatus(b&0x7F) << shift + m.Status |= types2.BondStatus(b&0x7F) << shift if b < 0x80 { break } @@ -2268,9 +2315,6 @@ func (m *MetaNode) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Description == nil { - m.Description = &Description{} - } if err := m.Description.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } diff --git a/x/register/types/resource_node.go b/x/register/types/resource_node.go index 32323176..622c4ba5 100644 --- a/x/register/types/resource_node.go +++ b/x/register/types/resource_node.go @@ -74,7 +74,7 @@ func (v ResourceNodes) Validate() error { // NewResourceNode - initialize a new resource node func NewResourceNode(networkAddr stratos.SdsAddress, pubKey cryptotypes.PubKey, ownerAddr sdk.AccAddress, - description *Description, nodeType NodeType, creationTime time.Time) (ResourceNode, error) { + description Description, nodeType NodeType, creationTime time.Time) (ResourceNode, error) { pkAny, err := codectypes.NewAnyWithValue(pubKey) if err != nil { return ResourceNode{}, err From b79f15a794369ec4f35edd9c9d9f63a8d0282ec3 Mon Sep 17 00:00:00 2001 From: Xiong Date: Tue, 18 Apr 2023 15:13:07 -0400 Subject: [PATCH 59/95] Add not null constraint & json tags to proto files. --- proto/stratos/register/v1/tx.proto | 2 + x/register/client/cli/tx.go | 4 +- x/register/client/rest/tx.go | 4 +- x/register/keeper/msg_server.go | 4 +- x/register/types/msg.go | 8 +- x/register/types/registration.go | 4 +- x/register/types/tx.pb.go | 263 ++++++++++++++--------------- 7 files changed, 138 insertions(+), 151 deletions(-) diff --git a/proto/stratos/register/v1/tx.proto b/proto/stratos/register/v1/tx.proto index 64b789e7..4f0b8050 100644 --- a/proto/stratos/register/v1/tx.proto +++ b/proto/stratos/register/v1/tx.proto @@ -70,6 +70,7 @@ message MsgCreateResourceNode { (gogoproto.moretags) = "yaml:\"owner_address\"" ]; Description description = 5 [ + (gogoproto.nullable) = false, (gogoproto.jsontag) = "description", (gogoproto.moretags) = "yaml:\"description\"" ]; @@ -103,6 +104,7 @@ message MsgCreateMetaNode { (gogoproto.moretags) = "yaml:\"owner_address\"" ]; Description description = 5 [ + (gogoproto.nullable) = false, (gogoproto.jsontag) = "description", (gogoproto.moretags) = "yaml:\"description\"" ]; diff --git a/x/register/client/cli/tx.go b/x/register/client/cli/tx.go index 52176471..e1b2887d 100644 --- a/x/register/client/cli/tx.go +++ b/x/register/client/cli/tx.go @@ -496,7 +496,7 @@ func newBuildUpdateResourceNodeMsg(clientCtx client.Context, txf tx.Factory, fs if t := nodeType.Type(); t == "UNKNOWN" { return txf, nil, types.ErrNodeType } - msg := types.NewMsgUpdateResourceNode(*description, nodeTypeVal, networkAddr, ownerAddr) + msg := types.NewMsgUpdateResourceNode(description, nodeTypeVal, networkAddr, ownerAddr) return txf, msg, nil } @@ -526,7 +526,7 @@ func newBuildUpdateMetaNodeMsg(clientCtx client.Context, txf tx.Factory, fs *fla details, ) - msg := types.NewMsgUpdateMetaNode(*description, networkAddr, ownerAddr) + msg := types.NewMsgUpdateMetaNode(description, networkAddr, ownerAddr) return txf, msg, nil } diff --git a/x/register/client/rest/tx.go b/x/register/client/rest/tx.go index 81cb683b..da1fc939 100644 --- a/x/register/client/rest/tx.go +++ b/x/register/client/rest/tx.go @@ -166,7 +166,7 @@ func postCreateResourceNodeHandlerFn(cliCtx client.Context) http.HandlerFunc { return } - msg, err := types.NewMsgCreateResourceNode(networkAddr, pubKey, req.Amount, ownerAddr, &req.Description, + msg, err := types.NewMsgCreateResourceNode(networkAddr, pubKey, req.Amount, ownerAddr, req.Description, req.NodeType) if err := msg.ValidateBasic(); err != nil { rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) @@ -206,7 +206,7 @@ func postCreateMetaNodeHandlerFn(cliCtx client.Context) http.HandlerFunc { rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) return } - msg, err := types.NewMsgCreateMetaNode(networkAddr, pubKey, req.Amount, ownerAddr, &req.Description) + msg, err := types.NewMsgCreateMetaNode(networkAddr, pubKey, req.Amount, ownerAddr, req.Description) if err != nil { rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) return diff --git a/x/register/keeper/msg_server.go b/x/register/keeper/msg_server.go index 254073b5..20ef05a8 100644 --- a/x/register/keeper/msg_server.go +++ b/x/register/keeper/msg_server.go @@ -48,7 +48,7 @@ func (k msgServer) HandleMsgCreateResourceNode(goCtx context.Context, msg *types return &types.MsgCreateResourceNodeResponse{}, sdkerrors.Wrap(types.ErrInvalidOwnerAddr, err.Error()) } - ozoneLimitChange, err := k.RegisterResourceNode(ctx, networkAddr, pk, ownerAddress, *msg.Description, types.NodeType(msg.NodeType), msg.GetValue()) + ozoneLimitChange, err := k.RegisterResourceNode(ctx, networkAddr, pk, ownerAddress, msg.Description, types.NodeType(msg.NodeType), msg.GetValue()) if err != nil { return nil, sdkerrors.Wrap(types.ErrRegisterResourceNode, err.Error()) } @@ -89,7 +89,7 @@ func (k msgServer) HandleMsgCreateMetaNode(goCtx context.Context, msg *types.Msg return &types.MsgCreateMetaNodeResponse{}, sdkerrors.Wrap(types.ErrInvalidOwnerAddr, err.Error()) } - ozoneLimitChange, err := k.RegisterMetaNode(ctx, networkAddr, pk, ownerAddress, *msg.Description, msg.GetValue()) + ozoneLimitChange, err := k.RegisterMetaNode(ctx, networkAddr, pk, ownerAddress, msg.Description, msg.GetValue()) if err != nil { return nil, sdkerrors.Wrap(types.ErrRegisterMetaNode, err.Error()) } diff --git a/x/register/types/msg.go b/x/register/types/msg.go index 9b21b70b..cb625583 100644 --- a/x/register/types/msg.go +++ b/x/register/types/msg.go @@ -37,7 +37,7 @@ const ( // NewMsgCreateResourceNode NewMsg creates a new Msg instance func NewMsgCreateResourceNode(networkAddr stratos.SdsAddress, pubKey cryptotypes.PubKey, //nolint:interfacer - value sdk.Coin, ownerAddr sdk.AccAddress, description *Description, nodeType uint32, + value sdk.Coin, ownerAddr sdk.AccAddress, description Description, nodeType uint32, ) (*MsgCreateResourceNode, error) { var pkAny *codectypes.Any if pubKey != nil { @@ -93,7 +93,7 @@ func (msg MsgCreateResourceNode) ValidateBasic() error { return ErrEmptyMoniker } - if *msg.GetDescription() == (Description{}) { + if msg.GetDescription() == (Description{}) { return ErrEmptyDescription } @@ -127,7 +127,7 @@ func (msg MsgCreateResourceNode) UnpackInterfaces(unpacker codectypes.AnyUnpacke // NewMsgCreateMetaNode creates a new Msg instance func NewMsgCreateMetaNode(networkAddr stratos.SdsAddress, pubKey cryptotypes.PubKey, //nolint:interfacer - value sdk.Coin, ownerAddr sdk.AccAddress, description *Description, + value sdk.Coin, ownerAddr sdk.AccAddress, description Description, ) (*MsgCreateMetaNode, error) { var pkAny *codectypes.Any if pubKey != nil { @@ -182,7 +182,7 @@ func (msg MsgCreateMetaNode) ValidateBasic() error { return ErrEmptyMoniker } - if *msg.GetDescription() == (Description{}) { + if msg.GetDescription() == (Description{}) { return ErrEmptyDescription } diff --git a/x/register/types/registration.go b/x/register/types/registration.go index 80de4f49..7acf56d6 100644 --- a/x/register/types/registration.go +++ b/x/register/types/registration.go @@ -15,8 +15,8 @@ const ( ) // NewDescription returns a new Description with the provided values. -func NewDescription(moniker, identity, website, securityContact, details string) *Description { - return &Description{ +func NewDescription(moniker, identity, website, securityContact, details string) Description { + return Description{ Moniker: moniker, Identity: identity, Website: website, diff --git a/x/register/types/tx.pb.go b/x/register/types/tx.pb.go index 0dfb9260..b1981146 100644 --- a/x/register/types/tx.pb.go +++ b/x/register/types/tx.pb.go @@ -35,12 +35,12 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // MsgCreateResourceNode encapsulates an MsgCreateResourceNodeTx transaction as an SDK message. type MsgCreateResourceNode struct { - NetworkAddress string `protobuf:"bytes,1,opt,name=network_address,json=networkAddress,proto3" json:"network_address" yaml:"network_address"` - Pubkey *types.Any `protobuf:"bytes,2,opt,name=pubkey,proto3" json:"pubkey" yaml:"pubkey"` - Value types1.Coin `protobuf:"bytes,3,opt,name=value,proto3" json:"value" yaml:"value"` - OwnerAddress string `protobuf:"bytes,4,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address" yaml:"owner_address"` - Description *Description `protobuf:"bytes,5,opt,name=description,proto3" json:"description" yaml:"description"` - NodeType uint32 `protobuf:"varint,6,opt,name=node_type,json=nodeType,proto3" json:"node_type" yaml:"node_type"` + NetworkAddress string `protobuf:"bytes,1,opt,name=network_address,json=networkAddress,proto3" json:"network_address" yaml:"network_address"` + Pubkey *types.Any `protobuf:"bytes,2,opt,name=pubkey,proto3" json:"pubkey" yaml:"pubkey"` + Value types1.Coin `protobuf:"bytes,3,opt,name=value,proto3" json:"value" yaml:"value"` + OwnerAddress string `protobuf:"bytes,4,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address" yaml:"owner_address"` + Description Description `protobuf:"bytes,5,opt,name=description,proto3" json:"description" yaml:"description"` + NodeType uint32 `protobuf:"varint,6,opt,name=node_type,json=nodeType,proto3" json:"node_type" yaml:"node_type"` } func (m *MsgCreateResourceNode) Reset() { *m = MsgCreateResourceNode{} } @@ -104,11 +104,11 @@ func (m *MsgCreateResourceNode) GetOwnerAddress() string { return "" } -func (m *MsgCreateResourceNode) GetDescription() *Description { +func (m *MsgCreateResourceNode) GetDescription() Description { if m != nil { return m.Description } - return nil + return Description{} } func (m *MsgCreateResourceNode) GetNodeType() uint32 { @@ -157,11 +157,11 @@ var xxx_messageInfo_MsgCreateResourceNodeResponse proto.InternalMessageInfo // MsgCreateMetaNode encapsulates an MsgCreateMetaNodeTx transaction as an SDK message. type MsgCreateMetaNode struct { - NetworkAddress string `protobuf:"bytes,1,opt,name=network_address,json=networkAddress,proto3" json:"network_address" yaml:"network_address"` - Pubkey *types.Any `protobuf:"bytes,2,opt,name=pubkey,proto3" json:"pubkey" yaml:"pubkey"` - Value types1.Coin `protobuf:"bytes,3,opt,name=value,proto3" json:"value" yaml:"value"` - OwnerAddress string `protobuf:"bytes,4,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address" yaml:"owner_address"` - Description *Description `protobuf:"bytes,5,opt,name=description,proto3" json:"description" yaml:"description"` + NetworkAddress string `protobuf:"bytes,1,opt,name=network_address,json=networkAddress,proto3" json:"network_address" yaml:"network_address"` + Pubkey *types.Any `protobuf:"bytes,2,opt,name=pubkey,proto3" json:"pubkey" yaml:"pubkey"` + Value types1.Coin `protobuf:"bytes,3,opt,name=value,proto3" json:"value" yaml:"value"` + OwnerAddress string `protobuf:"bytes,4,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address" yaml:"owner_address"` + Description Description `protobuf:"bytes,5,opt,name=description,proto3" json:"description" yaml:"description"` } func (m *MsgCreateMetaNode) Reset() { *m = MsgCreateMetaNode{} } @@ -225,11 +225,11 @@ func (m *MsgCreateMetaNode) GetOwnerAddress() string { return "" } -func (m *MsgCreateMetaNode) GetDescription() *Description { +func (m *MsgCreateMetaNode) GetDescription() Description { if m != nil { return m.Description } - return nil + return Description{} } // MsgCreateMetaNodeResponse defines the CreateMetaNode response type @@ -1083,98 +1083,97 @@ func init() { func init() { proto.RegisterFile("stratos/register/v1/tx.proto", fileDescriptor_75d4b90d7a185a31) } var fileDescriptor_75d4b90d7a185a31 = []byte{ - // 1443 bytes of a gzipped FileDescriptorProto + // 1434 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0xcf, 0x6f, 0x1b, 0x45, 0x14, 0xce, 0xda, 0x69, 0x69, 0xa6, 0x4d, 0xda, 0xb8, 0x49, 0xe3, 0xb8, 0x89, 0xc7, 0x9d, 0xd2, - 0x90, 0x12, 0xb2, 0x5b, 0x27, 0x45, 0x2d, 0x95, 0x00, 0xd5, 0x2d, 0x12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, 0x85, 0x9b, 0xb6, 0xde, 0xf7, 0x8b, 0xf2, 0x26, 0x98, 0x32, - 0x71, 0x97, 0x98, 0x36, 0x36, 0xbd, 0x72, 0xe4, 0x57, 0xa7, 0xf8, 0xf2, 0x12, 0xc6, 0x70, 0x79, - 0x09, 0x13, 0x52, 0x43, 0x77, 0x41, 0x05, 0x33, 0x41, 0xa3, 0xce, 0xd2, 0x58, 0xcc, 0xb1, 0x51, - 0xd6, 0x1c, 0x0a, 0x63, 0x1e, 0x97, 0xc2, 0xf9, 0xe8, 0x50, 0xdc, 0x8e, 0xd4, 0xe9, 0xc0, 0x70, - 0xcd, 0x6b, 0x27, 0x29, 0x25, 0xff, 0x2c, 0x94, 0x72, 0x4f, 0x02, 0xc7, 0x70, 0x10, 0x7f, 0xdd, - 0x26, 0x3b, 0xd8, 0x08, 0x2e, 0x0d, 0x37, 0xbd, 0x02, 0xfc, 0x4e, 0xe1, 0x4a, 0x5b, 0xb7, 0x6f, - 0xf7, 0x1a, 0x72, 0x93, 0x74, 0xfc, 0x27, 0x81, 0xff, 0xb3, 0x6e, 0xb5, 0x76, 0x14, 0x6f, 0x73, - 0xb1, 0xe4, 0x77, 0x0c, 0xdb, 0xa1, 0x70, 0x64, 0x24, 0x97, 0xc2, 0x05, 0x4e, 0x24, 0xee, 0x41, - 0xea, 0x51, 0x61, 0xba, 0xce, 0x2c, 0x97, 0x26, 0xef, 0xdd, 0x87, 0x13, 0xe8, 0x14, 0x80, 0x29, - 0x85, 0x11, 0xc5, 0xfb, 0x2b, 0x07, 0x4e, 0x8c, 0x2c, 0xb9, 0xfd, 0x05, 0xf5, 0x9c, 0x16, 0x54, - 0x05, 0x94, 0x93, 0x93, 0x2d, 0xea, 0xf1, 0xe5, 0x24, 0x38, 0xb9, 0x65, 0xb5, 0xc3, 0xcd, 0xcf, - 0x3b, 0x08, 0x4c, 0xf6, 0xb0, 0xbc, 0x41, 0x6c, 0x5c, 0xf8, 0x08, 0x2c, 0x36, 0x35, 0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6, 0xb1, 0x1e, 0x79, 0x38, 0x44, 0x29, 0x27, 0xbc, 0x54, 0x52, 0x29, 0x8f, - 0x62, 0xd3, 0x29, 0x67, 0xbc, 0x14, 0xb2, 0x29, 0x9b, 0xac, 0x63, 0x16, 0xe5, 0x84, 0x0b, 0x78, - 0x2a, 0xe5, 0x51, 0x6c, 0x3a, 0xe5, 0x8c, 0x8b, 0x66, 0x36, 0xe5, 0x1e, 0xeb, 0x18, 0xa3, 0xfc, - 0x83, 0x04, 0x2a, 0x19, 0x94, 0xf9, 0xd6, 0xa8, 0xec, 0x9d, 0x0b, 0xeb, 0x50, 0xba, 0x30, 0x66, - 0x07, 0x11, 0xc1, 0x05, 0x16, 0x41, 0x15, 0x29, 0x7b, 0x8e, 0x80, 0xef, 0xe4, 0x85, 0xef, 0x24, - 0xb0, 0x1c, 0x8b, 0x23, 0x76, 0x0f, 0x79, 0x25, 0x9b, 0x53, 0x14, 0x5d, 0x3a, 0x3f, 0x0e, 0x5a, - 0xd0, 0xdf, 0x64, 0xf4, 0xd7, 0xd1, 0x5a, 0x16, 0xfd, 0xf0, 0xec, 0xe6, 0xd4, 0xef, 0x4b, 0x60, - 0x21, 0xb6, 0x36, 0xc5, 0x23, 0x61, 0x25, 0x7b, 0xad, 0x05, 0xb8, 0x92, 0xbc, 0x37, 0x9c, 0x20, - 0xba, 0xce, 0x88, 0xbe, 0x84, 0xce, 0x64, 0xad, 0x47, 0xf1, 0xb4, 0x8d, 0x52, 0x8c, 0xbd, 0x9d, - 0x57, 0xb2, 0xd7, 0xd6, 0x93, 0x29, 0xa6, 0xbc, 0x63, 0xb3, 0x29, 0xfa, 0xeb, 0x2f, 0x85, 0x62, - 0xec, 0xa9, 0xb5, 0x92, 0x5d, 0xcc, 0x27, 0x53, 0x4c, 0x79, 0x8e, 0x64, 0x53, 0xf4, 0xcb, 0x1d, - 0x52, 0xfc, 0x56, 0x02, 0x4b, 0x29, 0x14, 0xb9, 0x44, 0xd7, 0xf6, 0x36, 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da, 0x99, + 0xdd, 0xd9, 0x1f, 0xde, 0xdd, 0x26, 0xb4, 0xb9, 0xa0, 0x9e, 0xec, 0x79, 0xef, 0x9b, 0x99, 0xef, + 0xbd, 0xf7, 0xcd, 0xaf, 0x05, 0x4b, 0xa6, 0x65, 0x68, 0x16, 0x31, 0x15, 0x03, 0x77, 0xba, 0xa6, + 0x85, 0x0d, 0x65, 0x58, 0x53, 0xac, 0xbb, 0x72, 0xdf, 0x20, 0x16, 0x29, 0x1c, 0xf7, 0xbc, 0xb2, + 0xef, 0x95, 0x87, 0xb5, 0xd2, 0x5c, 0x87, 0x74, 0x08, 0xf3, 0x2b, 0xee, 0x3f, 0x0e, 0x2d, 0x2d, + 0x76, 0x08, 0xe9, 0xec, 0x60, 0x85, 0xb5, 0x9a, 0x83, 0x5b, 0x8a, 0xa6, 0x8f, 0x3c, 0xd7, 0x92, + 0xe7, 0xd2, 0xfa, 0x5d, 0x45, 0xd3, 0x75, 0x62, 0x69, 0x56, 0x97, 0xe8, 0xa6, 0xdf, 0xb1, 0x45, + 0xcc, 0x1e, 0x31, 0x1b, 0x7c, 0x44, 0xde, 0xf0, 0x5c, 0x28, 0x89, 0x9c, 0xa0, 0xc2, 0x31, 0x65, + 0xde, 0x43, 0x69, 0x6a, 0x26, 0x56, 0x86, 0xb5, 0x26, 0xb6, 0xb4, 0x9a, 0xd2, 0x22, 0x5d, 0x9d, + 0xfb, 0xd1, 0x17, 0x93, 0x60, 0x7e, 0xd3, 0xec, 0x5c, 0x31, 0xb0, 0x66, 0x61, 0x15, 0x9b, 0x64, + 0x60, 0xb4, 0xf0, 0x16, 0x69, 0xe3, 0xc2, 0x0d, 0x70, 0x54, 0xc7, 0xd6, 0x1d, 0x62, 0x6c, 0x37, + 0xb4, 0x76, 0xdb, 0xc0, 0xa6, 0x59, 0x94, 0x2a, 0xd2, 0xea, 0x54, 0xbd, 0x6a, 0x53, 0x18, 0x77, + 0x39, 0x14, 0x9e, 0x18, 0x69, 0xbd, 0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d, 0x7c, 0x54, 0x96, 0xfe, + 0x78, 0x54, 0x96, 0x3e, 0x7d, 0x5c, 0x9e, 0x78, 0xf8, 0xb8, 0x3c, 0xf1, 0xeb, 0xe3, 0xf2, 0xc4, + 0x87, 0xe7, 0x43, 0xf7, 0x72, 0x6f, 0x54, 0x1d, 0x5b, 0xfe, 0xdf, 0x6a, 0xeb, 0xb6, 0xd6, 0xd5, + 0x95, 0xbb, 0xc1, 0x44, 0xec, 0xa6, 0xde, 0x3c, 0xc8, 0x3e, 0x60, 0x6e, 0xfc, 0x1b, 0x00, 0x00, + 0xff, 0xff, 0xa6, 0x89, 0x3a, 0xd5, 0x75, 0x18, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1608,18 +1607,16 @@ func (m *MsgCreateResourceNode) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x30 } - if m.Description != nil { - { - size, err := m.Description.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) + { + size, err := m.Description.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x2a + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x2a if len(m.OwnerAddress) > 0 { i -= len(m.OwnerAddress) copy(dAtA[i:], m.OwnerAddress) @@ -1702,18 +1699,16 @@ func (m *MsgCreateMetaNode) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.Description != nil { - { - size, err := m.Description.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) + { + size, err := m.Description.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x2a + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x2a if len(m.OwnerAddress) > 0 { i -= len(m.OwnerAddress) copy(dAtA[i:], m.OwnerAddress) @@ -2397,10 +2392,8 @@ func (m *MsgCreateResourceNode) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - if m.Description != nil { - l = m.Description.Size() - n += 1 + l + sovTx(uint64(l)) - } + l = m.Description.Size() + n += 1 + l + sovTx(uint64(l)) if m.NodeType != 0 { n += 1 + sovTx(uint64(m.NodeType)) } @@ -2436,10 +2429,8 @@ func (m *MsgCreateMetaNode) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - if m.Description != nil { - l = m.Description.Size() - n += 1 + l + sovTx(uint64(l)) - } + l = m.Description.Size() + n += 1 + l + sovTx(uint64(l)) return n } @@ -2895,9 +2886,6 @@ func (m *MsgCreateResourceNode) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Description == nil { - m.Description = &Description{} - } if err := m.Description.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -3183,9 +3171,6 @@ func (m *MsgCreateMetaNode) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Description == nil { - m.Description = &Description{} - } if err := m.Description.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } From a7df03918bc21929a0be8db086cfd3de2c60575f Mon Sep 17 00:00:00 2001 From: Xiong Date: Wed, 19 Apr 2023 15:35:42 -0400 Subject: [PATCH 60/95] MsgUpdateResourceNodeStake only allow to add stake --- proto/stratos/register/v1/register.proto | 6 +- proto/stratos/register/v1/tx.proto | 4 - x/register/client/cli/tx.go | 12 +- x/register/client/rest/tx.go | 8 +- x/register/keeper/keeper.go | 82 ++++----- x/register/keeper/msg_server.go | 35 ++-- x/register/keeper/params.go | 5 + x/register/keeper/resource_node.go | 26 ++- x/register/keeper/store.go | 6 +- x/register/types/errors.go | 4 +- x/register/types/msg.go | 3 +- x/register/types/params.go | 14 +- x/register/types/register.pb.go | 192 ++++++++++---------- x/register/types/tx.pb.go | 215 +++++++++-------------- 14 files changed, 267 insertions(+), 345 deletions(-) diff --git a/proto/stratos/register/v1/register.proto b/proto/stratos/register/v1/register.proto index 81b30189..f132a01e 100644 --- a/proto/stratos/register/v1/register.proto +++ b/proto/stratos/register/v1/register.proto @@ -37,10 +37,10 @@ message Params { (gogoproto.jsontag) = "resource_node_reg_enabled", (gogoproto.moretags) = "yaml:\"resource_node_reg_enabled\"" ]; - cosmos.base.v1beta1.Coin resource_node_min_staking = 6 [ + cosmos.base.v1beta1.Coin resource_node_min_stake = 6 [ (gogoproto.nullable) = false, - (gogoproto.jsontag) = "resource_node_min_staking", - (gogoproto.moretags) = "yaml:\"resource_node_min_staking\"" + (gogoproto.jsontag) = "resource_node_min_stake", + (gogoproto.moretags) = "yaml:\"resource_node_min_stake\"" ]; } diff --git a/proto/stratos/register/v1/tx.proto b/proto/stratos/register/v1/tx.proto index 4f0b8050..ec13c4ac 100644 --- a/proto/stratos/register/v1/tx.proto +++ b/proto/stratos/register/v1/tx.proto @@ -201,10 +201,6 @@ message MsgUpdateResourceNodeStake { (gogoproto.jsontag) = "owner_address", (gogoproto.moretags) = "yaml:\"owner_address\"" ]; - bool incr_stake = 3 [ - (gogoproto.jsontag) = "incr_stake", - (gogoproto.moretags) = "yaml:\"incr_stake\"" - ]; cosmos.base.v1beta1.Coin stake_delta = 4 [ (gogoproto.nullable) = false, (gogoproto.jsontag) = "stake_delta", diff --git a/x/register/client/cli/tx.go b/x/register/client/cli/tx.go index e1b2887d..67d4b756 100644 --- a/x/register/client/cli/tx.go +++ b/x/register/client/cli/tx.go @@ -274,7 +274,6 @@ func UpdateResourceNodeStakeCmd() *cobra.Command { _ = cmd.MarkFlagRequired(flags.FlagFrom) _ = cmd.MarkFlagRequired(FlagStakeDelta) - _ = cmd.MarkFlagRequired(FlagIncrStake) _ = cmd.MarkFlagRequired(FlagNetworkAddress) return cmd } @@ -541,15 +540,6 @@ func newBuildUpdateResourceNodeStakeMsg(clientCtx client.Context, txf tx.Factory return txf, nil, err } - incrStakeStr, err := fs.GetString(FlagIncrStake) - if err != nil { - return txf, nil, err - } - incrStake, err := strconv.ParseBool(incrStakeStr) - if err != nil { - return txf, nil, err - } - networkAddrStr, _ := fs.GetString(FlagNetworkAddress) networkAddr, err := stratos.SdsAddressFromBech32(networkAddrStr) if err != nil { @@ -558,7 +548,7 @@ func newBuildUpdateResourceNodeStakeMsg(clientCtx client.Context, txf tx.Factory ownerAddr := clientCtx.GetFromAddress() - msg := types.NewMsgUpdateResourceNodeStake(networkAddr, ownerAddr, stakeDelta, incrStake) + msg := types.NewMsgUpdateResourceNodeStake(networkAddr, ownerAddr, stakeDelta) return txf, msg, nil } diff --git a/x/register/client/rest/tx.go b/x/register/client/rest/tx.go index da1fc939..e5e9c119 100644 --- a/x/register/client/rest/tx.go +++ b/x/register/client/rest/tx.go @@ -84,7 +84,6 @@ type ( BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"` NetworkAddress string `json:"network_address" yaml:"network_address"` StakeDelta sdk.Coin `json:"stake_delta" yaml:"stake_delta"` - IncrStake string `json:"incr_stake" yaml:"incr_stake"` } UpdateEffectiveStakeRequest struct { @@ -354,12 +353,7 @@ func postUpdateResourceNodeStakeHandlerFn(cliCtx client.Context) http.HandlerFun return } - incrStake, err := strconv.ParseBool(req.IncrStake) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - msg := types.NewMsgUpdateResourceNodeStake(networkAddr, ownerAddr, req.StakeDelta, incrStake) + msg := types.NewMsgUpdateResourceNodeStake(networkAddr, ownerAddr, req.StakeDelta) if err := msg.ValidateBasic(); err != nil { rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) return diff --git a/x/register/keeper/keeper.go b/x/register/keeper/keeper.go index 362b6942..c3fff105 100644 --- a/x/register/keeper/keeper.go +++ b/x/register/keeper/keeper.go @@ -145,7 +145,7 @@ func (k Keeper) DecreaseOzoneLimitBySubtractStake(ctx sdk.Context, stake sdk.Int return limitToSub.TruncateInt() } -// HasMaxUnbondingMetaNodeEntries - check if unbonding MetaNode has maximum number of entries +// HasMaxUnbondingNodeEntries - check if unbonding node has maximum number of entries func (k Keeper) HasMaxUnbondingNodeEntries(ctx sdk.Context, networkAddr stratos.SdsAddress) bool { ubd, found := k.GetUnbondingNode(ctx, networkAddr) if !found { @@ -282,75 +282,59 @@ func (k Keeper) subtractUBDNodeStake(ctx sdk.Context, ubd types.UnbondingNode, t return k.SubtractResourceNodeStake(ctx, resourceNode, tokenToSub) } -func (k Keeper) UnbondResourceNode(ctx sdk.Context, resourceNode types.ResourceNode, amt sdk.Int, -) (availableTokenAmtBefore, availableTokenAmtAfter sdk.Int, unbondingMatureTime time.Time, err error) { - if resourceNode.GetStatus() == stakingtypes.Unbonding { - return sdk.ZeroInt(), sdk.ZeroInt(), time.Time{}, types.ErrUnbondingNode - } +// Unbond all tokens of resource node +func (k Keeper) UnbondResourceNode(ctx sdk.Context, networkAddr stratos.SdsAddress, ownerAddr sdk.AccAddress, +) (stakeToRemove sdk.Int, unbondingMatureTime time.Time, err error) { - // transfer the node tokens to the not bonded pool - networkAddr, err := stratos.SdsAddressFromBech32(resourceNode.GetNetworkAddress()) - if err != nil { - return sdk.ZeroInt(), sdk.ZeroInt(), time.Time{}, errors.New("invalid network address") + resourceNode, found := k.GetResourceNode(ctx, networkAddr) + if !found { + return sdk.ZeroInt(), time.Time{}, types.ErrNoResourceNodeFound } - ownerAddr, err := sdk.AccAddressFromBech32(resourceNode.GetOwnerAddress()) - if err != nil { - return sdk.ZeroInt(), sdk.ZeroInt(), time.Time{}, errors.New("invalid wallet address") + ownerAddrNode, _ := sdk.AccAddressFromBech32(resourceNode.GetOwnerAddress()) + if !ownerAddrNode.Equals(ownerAddr) { + return sdk.ZeroInt(), time.Time{}, types.ErrInvalidOwnerAddr } - ownerAcc := k.accountKeeper.GetAccount(ctx, ownerAddr) - if ownerAcc == nil { - return sdk.ZeroInt(), sdk.ZeroInt(), time.Time{}, types.ErrNoOwnerAccountFound + if resourceNode.GetStatus() != stakingtypes.Bonded { + return sdk.ZeroInt(), time.Time{}, types.ErrInvalidNodeStat } - // suspended node cannot be unbonded (avoid dup stake decrease with node suspension) - if resourceNode.Suspend { - return sdk.ZeroInt(), sdk.ZeroInt(), time.Time{}, types.ErrInvalidSuspensionStatForUnbondNode + if resourceNode.GetSuspend() { + return sdk.ZeroInt(), time.Time{}, types.ErrInvalidSuspensionStatForUnbondNode + } + if k.HasMaxUnbondingNodeEntries(ctx, networkAddr) { + return sdk.ZeroInt(), time.Time{}, types.ErrMaxUnbondingNodeEntries } - // check if node_token - unbonding_token > amt_to_unbond + // check if node_token - unbonding_token > 0 unbondingStake := k.GetUnbondingNodeBalance(ctx, networkAddr) - - availableStake := resourceNode.Tokens.Sub(unbondingStake) - if availableStake.LT(amt) { - return sdk.ZeroInt(), sdk.ZeroInt(), time.Time{}, types.ErrInsufficientBalance + stakeToRemove = resourceNode.Tokens.Sub(unbondingStake) + if stakeToRemove.LTE(sdk.ZeroInt()) { + return sdk.ZeroInt(), time.Time{}, types.ErrInsufficientBalance } - availableTokenAmtBefore = availableStake - if k.HasMaxUnbondingNodeEntries(ctx, networkAddr) { - return sdk.ZeroInt(), sdk.ZeroInt(), time.Time{}, types.ErrMaxUnbondingNodeEntries - } unbondingMatureTime = calcUnbondingMatureTime(ctx, resourceNode.Status, resourceNode.CreationTime, k.UnbondingThreasholdTime(ctx), k.UnbondingCompletionTime(ctx)) - coin := sdk.NewCoin(k.BondDenom(ctx), amt) - if resourceNode.GetStatus() == stakingtypes.Bonded { - // transfer the node tokens to the not bonded pool - k.bondedToUnbonding(ctx, resourceNode, false, coin) - // not adjusting ozone limit since resourceNode.EffectiveTokens are not changed - //ozoneLimitChange = k.DecreaseOzoneLimitBySubtractStake(ctx, amt) - } - + // transfer the node tokens to the not bonded pool + k.bondedToUnbonding(ctx, resourceNode, false, sdk.NewCoin(k.BondDenom(ctx), stakeToRemove)) // change node status to unbonding if unbonding all available tokens - if amt.Equal(availableStake) { - resourceNode.Status = stakingtypes.Unbonding - - k.SetResourceNode(ctx, resourceNode) - - // decrease resource node count - v := k.GetBondedResourceNodeCnt(ctx) - count := v.Sub(sdk.NewInt(1)) - k.SetBondedResourceNodeCnt(ctx, count) - } + resourceNode.Status = stakingtypes.Unbonding + k.SetResourceNode(ctx, resourceNode) + // decrease resource node count + v := k.GetBondedResourceNodeCnt(ctx) + count := v.Sub(sdk.OneInt()) + k.SetBondedResourceNodeCnt(ctx, count) // set the unbonding mature time and completion height appropriately ctx.Logger().Info(fmt.Sprintf("Calculating mature time: creationTime[%s], threasholdTime[%s], completionTime[%s], matureTime[%s]", resourceNode.CreationTime, k.UnbondingThreasholdTime(ctx), k.UnbondingCompletionTime(ctx), unbondingMatureTime, )) - unbondingNode := k.SetUnbondingNodeEntry(ctx, networkAddr, false, ctx.BlockHeight(), unbondingMatureTime, amt) + unbondingNode := k.SetUnbondingNodeEntry(ctx, networkAddr, false, ctx.BlockHeight(), unbondingMatureTime, stakeToRemove) + // Add to unbonding node queue k.InsertUnbondingNodeQueue(ctx, unbondingNode, unbondingMatureTime) ctx.Logger().Info("Unbonding resource node " + unbondingNode.String() + "\n after mature time" + unbondingMatureTime.String()) - availableTokenAmtAfter = availableTokenAmtBefore.Sub(amt) - return availableTokenAmtBefore, availableTokenAmtAfter, unbondingMatureTime, nil + + return stakeToRemove, unbondingMatureTime, nil } func (k Keeper) UnbondMetaNode(ctx sdk.Context, metaNode types.MetaNode, amt sdk.Int, diff --git a/x/register/keeper/msg_server.go b/x/register/keeper/msg_server.go index 20ef05a8..2a4c1a31 100644 --- a/x/register/keeper/msg_server.go +++ b/x/register/keeper/msg_server.go @@ -26,7 +26,9 @@ func NewMsgServerImpl(keeper Keeper) types.MsgServer { var _ types.MsgServer = msgServer{} -func (k msgServer) HandleMsgCreateResourceNode(goCtx context.Context, msg *types.MsgCreateResourceNode) (*types.MsgCreateResourceNodeResponse, error) { +func (k msgServer) HandleMsgCreateResourceNode(goCtx context.Context, msg *types.MsgCreateResourceNode) ( + *types.MsgCreateResourceNodeResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) if !k.ResourceNodeRegEnabled(ctx) { @@ -110,27 +112,21 @@ func (k msgServer) HandleMsgCreateMetaNode(goCtx context.Context, msg *types.Msg return &types.MsgCreateMetaNodeResponse{}, nil } -func (k msgServer) HandleMsgRemoveResourceNode(goCtx context.Context, msg *types.MsgRemoveResourceNode) (*types.MsgRemoveResourceNodeResponse, error) { +func (k msgServer) HandleMsgRemoveResourceNode(goCtx context.Context, msg *types.MsgRemoveResourceNode) ( + *types.MsgRemoveResourceNodeResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) - p2pAddress, err := stratos.SdsAddressFromBech32(msg.ResourceNodeAddress) + p2pAddress, err := stratos.SdsAddressFromBech32(msg.GetResourceNodeAddress()) if err != nil { return &types.MsgRemoveResourceNodeResponse{}, sdkerrors.Wrap(types.ErrInvalidNetworkAddr, err.Error()) } - resourceNode, found := k.GetResourceNode(ctx, p2pAddress) - if !found { - return &types.MsgRemoveResourceNodeResponse{}, types.ErrNoResourceNodeFound - } - if msg.GetOwnerAddress() != resourceNode.GetOwnerAddress() { - return &types.MsgRemoveResourceNodeResponse{}, types.ErrInvalidOwnerAddr - } - unbondingStake := k.GetUnbondingNodeBalance(ctx, p2pAddress) - availableStake := resourceNode.Tokens.Sub(unbondingStake) - if availableStake.LTE(sdk.ZeroInt()) { - return &types.MsgRemoveResourceNodeResponse{}, types.ErrInsufficientBalance + ownerAddress, err := sdk.AccAddressFromBech32(msg.GetOwnerAddress()) + if err != nil { + return &types.MsgRemoveResourceNodeResponse{}, sdkerrors.Wrap(types.ErrInvalidOwnerAddr, err.Error()) } - _, _, completionTime, err := k.UnbondResourceNode(ctx, resourceNode, availableStake) + stakeToRemove, completionTime, err := k.UnbondResourceNode(ctx, p2pAddress, ownerAddress) if err != nil { return &types.MsgRemoveResourceNodeResponse{}, sdkerrors.Wrap(types.ErrUnbondResourceNode, err.Error()) } @@ -140,7 +136,7 @@ func (k msgServer) HandleMsgRemoveResourceNode(goCtx context.Context, msg *types types.EventTypeUnbondingResourceNode, sdk.NewAttribute(sdk.AttributeKeySender, msg.OwnerAddress), sdk.NewAttribute(types.AttributeKeyResourceNode, msg.ResourceNodeAddress), - sdk.NewAttribute(types.AttributeKeyStakeToRemove, sdk.NewCoin(k.BondDenom(ctx), availableStake).String()), + sdk.NewAttribute(types.AttributeKeyStakeToRemove, sdk.NewCoin(k.BondDenom(ctx), stakeToRemove).String()), sdk.NewAttribute(types.AttributeKeyUnbondingMatureTime, completionTime.Format(time.RFC3339)), ), sdk.NewEvent( @@ -271,7 +267,9 @@ func (k msgServer) HandleMsgUpdateResourceNode(goCtx context.Context, msg *types return &types.MsgUpdateResourceNodeResponse{}, nil } -func (k msgServer) HandleMsgUpdateResourceNodeStake(goCtx context.Context, msg *types.MsgUpdateResourceNodeStake) (*types.MsgUpdateResourceNodeStakeResponse, error) { +func (k msgServer) HandleMsgUpdateResourceNodeStake(goCtx context.Context, msg *types.MsgUpdateResourceNodeStake) ( + *types.MsgUpdateResourceNodeStakeResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) networkAddr, err := stratos.SdsAddressFromBech32(msg.NetworkAddress) @@ -285,7 +283,7 @@ func (k msgServer) HandleMsgUpdateResourceNodeStake(goCtx context.Context, msg * } ozoneLimitChange, availableTokenAmtBefore, availableTokenAmtAfter, completionTime, node, err := - k.UpdateResourceNodeStake(ctx, networkAddr, ownerAddress, msg.GetStakeDelta(), msg.IncrStake) + k.UpdateResourceNodeStake(ctx, networkAddr, ownerAddress, msg.GetStakeDelta()) if err != nil { return nil, sdkerrors.Wrap(types.ErrUpdateResourceNodeStake, err.Error()) } @@ -295,7 +293,6 @@ func (k msgServer) HandleMsgUpdateResourceNodeStake(goCtx context.Context, msg * types.EventTypeUpdateResourceNodeStake, sdk.NewAttribute(sdk.AttributeKeySender, msg.OwnerAddress), sdk.NewAttribute(types.AttributeKeyNetworkAddress, msg.NetworkAddress), - sdk.NewAttribute(types.AttributeKeyIncrStake, strconv.FormatBool(msg.IncrStake)), sdk.NewAttribute(types.AttributeKeyStakeDelta, msg.StakeDelta.String()), sdk.NewAttribute(types.AttributeKeyCurrentStake, sdk.NewCoin(k.BondDenom(ctx), node.Tokens).String()), sdk.NewAttribute(types.AttributeKeyAvailableTokenBefore, sdk.NewCoin(k.BondDenom(ctx), availableTokenAmtBefore).String()), diff --git a/x/register/keeper/params.go b/x/register/keeper/params.go index 4743d753..906bd53c 100644 --- a/x/register/keeper/params.go +++ b/x/register/keeper/params.go @@ -48,3 +48,8 @@ func (k Keeper) ResourceNodeRegEnabled(ctx sdk.Context) (res bool) { k.paramSpace.Get(ctx, types.KeyResourceNodeRegEnabled, &res) return } + +func (k Keeper) ResourceNodeMinStake(ctx sdk.Context) (res sdk.Coin) { + k.paramSpace.Get(ctx, types.KeyResourceNodeMinStake, &res) + return +} diff --git a/x/register/keeper/resource_node.go b/x/register/keeper/resource_node.go index 1dcbdd2d..d4b3e145 100644 --- a/x/register/keeper/resource_node.go +++ b/x/register/keeper/resource_node.go @@ -288,6 +288,9 @@ func (k Keeper) RegisterResourceNode(ctx sdk.Context, networkAddr stratos.SdsAdd if stake.GetDenom() != k.BondDenom(ctx) { return ozoneLimitChange, types.ErrBadDenom } + if stake.IsLT(k.ResourceNodeMinStake(ctx)) { + return ozoneLimitChange, types.ErrInsufficientStake + } resourceNode, err := types.NewResourceNode(networkAddr, pubKey, ownerAddr, description, nodeType, ctx.BlockHeader().Time) if err != nil { @@ -320,8 +323,9 @@ func (k Keeper) UpdateResourceNode(ctx sdk.Context, description types.Descriptio return nil } -func (k Keeper) UpdateResourceNodeStake(ctx sdk.Context, networkAddr stratos.SdsAddress, ownerAddr sdk.AccAddress, stakeDelta sdk.Coin, incrStake bool) ( - ozoneLimitChange, availableTokenAmtBefore, availableTokenAmtAfter sdk.Int, unbondingMatureTime time.Time, resourcenode types.ResourceNode, err error) { +// Add stake only +func (k Keeper) UpdateResourceNodeStake(ctx sdk.Context, networkAddr stratos.SdsAddress, ownerAddr sdk.AccAddress, stakeDelta sdk.Coin) ( + ozoneLimitChange, availableTokenAmtBefore, availableTokenAmtAfter sdk.Int, completionTime time.Time, resourcenode types.ResourceNode, err error) { if stakeDelta.GetDenom() != k.BondDenom(ctx) { return sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroInt(), time.Time{}, types.ResourceNode{}, types.ErrBadDenom @@ -337,20 +341,12 @@ func (k Keeper) UpdateResourceNodeStake(ctx sdk.Context, networkAddr stratos.Sds return sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroInt(), time.Time{}, types.ResourceNode{}, types.ErrInvalidOwnerAddr } - if incrStake { - blockTime := ctx.BlockHeader().Time - ozoneLimitChange, availableTokenAmtBefore, availableTokenAmtAfter, err := k.AddResourceNodeStake(ctx, node, stakeDelta) - if err != nil { - return sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroInt(), time.Time{}, types.ResourceNode{}, err - } - return ozoneLimitChange, availableTokenAmtBefore, availableTokenAmtAfter, blockTime, node, nil - } else { - availableTokenAmtBefore, availableTokenAmtAfter, completionTime, err := k.UnbondResourceNode(ctx, node, stakeDelta.Amount) - if err != nil { - return sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroInt(), time.Time{}, types.ResourceNode{}, err - } - return sdk.ZeroInt(), availableTokenAmtBefore, availableTokenAmtAfter, completionTime, node, nil + completionTime = ctx.BlockHeader().Time + ozoneLimitChange, availableTokenAmtBefore, availableTokenAmtAfter, err = k.AddResourceNodeStake(ctx, node, stakeDelta) + if err != nil { + return sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroInt(), time.Time{}, types.ResourceNode{}, err } + return ozoneLimitChange, availableTokenAmtBefore, availableTokenAmtAfter, completionTime, node, nil } func (k Keeper) UpdateEffectiveStake(ctx sdk.Context, networkAddr stratos.SdsAddress, effectiveStakeAfter sdk.Int) ( diff --git a/x/register/keeper/store.go b/x/register/keeper/store.go index 6df84fa1..8ee9b8de 100644 --- a/x/register/keeper/store.go +++ b/x/register/keeper/store.go @@ -51,7 +51,7 @@ func (k Keeper) IsUnbondable(ctx sdk.Context, unbondAmt sdk.Int) bool { return remaining.ToDec().GTE(unbondAmt.ToDec().Quo(stakeNozRate)) } -// SetUnbondingNode sets the unbonding MetaNode +// SetUnbondingNode sets the unbonding node func (k Keeper) SetUnbondingNode(ctx sdk.Context, ubd types.UnbondingNode) { store := ctx.KVStore(k.storeKey) bz := k.cdc.MustMarshalLengthPrefixed(&ubd) @@ -63,14 +63,14 @@ func (k Keeper) SetUnbondingNode(ctx sdk.Context, ubd types.UnbondingNode) { store.Set(key, bz) } -// RemoveUnbondingNode removes the unbonding MetaNode object +// RemoveUnbondingNode removes the unbonding node object func (k Keeper) RemoveUnbondingNode(ctx sdk.Context, networkAddr stratos.SdsAddress) { store := ctx.KVStore(k.storeKey) key := types.GetUBDNodeKey(networkAddr) store.Delete(key) } -// GetUnbondingNode return a unbonding UnbondingMetaNode +// GetUnbondingNode return a unbonding node func (k Keeper) GetUnbondingNode(ctx sdk.Context, networkAddr stratos.SdsAddress) (ubd types.UnbondingNode, found bool) { store := ctx.KVStore(k.storeKey) key := types.GetUBDNodeKey(networkAddr) diff --git a/x/register/types/errors.go b/x/register/types/errors.go index 2df0e56a..62e2c437 100644 --- a/x/register/types/errors.go +++ b/x/register/types/errors.go @@ -14,6 +14,7 @@ const ( codeErrEmptyResourceNodeAddr codeErrEmptyMetaNodeAddr codeErrBadDenom + codeErrInsufficientStake codeErrResourceNodePubKeyExists codeErrMetaNodePubKeyExists codeErrNoResourceNodeFound @@ -63,7 +64,6 @@ const ( codeErrInvalidSuspensionStatForUnbondNode codeErrReporterAddress codeErrInvalidAmount - codeErrReporterAddressOrOwner codeErrReporterNotReachThreshold ) @@ -77,6 +77,7 @@ var ( ErrEmptyResourceNodeAddr = sdkerrors.Register(ModuleName, codeErrEmptyResourceNodeAddr, "missing resource node address") ErrEmptyMetaNodeAddr = sdkerrors.Register(ModuleName, codeErrEmptyMetaNodeAddr, "missing Meta node address") ErrBadDenom = sdkerrors.Register(ModuleName, codeErrBadDenom, "invalid coin denomination") + ErrInsufficientStake = sdkerrors.Register(ModuleName, codeErrInsufficientStake, "insufficient stake") ErrResourceNodePubKeyExists = sdkerrors.Register(ModuleName, codeErrResourceNodePubKeyExists, "resource node already exist for this pubkey; must use new resource node pubkey") ErrMetaNodePubKeyExists = sdkerrors.Register(ModuleName, codeErrMetaNodePubKeyExists, "meta node already exist for this pubkey; must use new meta node pubkey") ErrNoResourceNodeFound = sdkerrors.Register(ModuleName, codeErrNoResourceNodeFound, "resource node does not exist") @@ -126,6 +127,5 @@ var ( ErrInvalidSuspensionStatForUnbondNode = sdkerrors.Register(ModuleName, codeErrInvalidSuspensionStatForUnbondNode, "cannot unbond a suspended node") ErrReporterAddress = sdkerrors.Register(ModuleName, codeErrReporterAddress, "invalid reporter address") ErrInvalidAmount = sdkerrors.Register(ModuleName, codeErrInvalidAmount, "invalid amount") - ErrReporterAddressOrOwner = sdkerrors.Register(ModuleName, codeErrReporterAddressOrOwner, "invalid reporter address or owner address") ErrReporterNotReachThreshold = sdkerrors.Register(ModuleName, codeErrReporterNotReachThreshold, "reporter meta-nodes does not reach the threshold") ) diff --git a/x/register/types/msg.go b/x/register/types/msg.go index cb625583..cbad0681 100644 --- a/x/register/types/msg.go +++ b/x/register/types/msg.go @@ -370,12 +370,11 @@ func (msg MsgUpdateResourceNode) ValidateBasic() error { } func NewMsgUpdateResourceNodeStake(networkAddress stratos.SdsAddress, ownerAddress sdk.AccAddress, - stakeDelta sdk.Coin, incrStake bool) *MsgUpdateResourceNodeStake { + stakeDelta sdk.Coin) *MsgUpdateResourceNodeStake { return &MsgUpdateResourceNodeStake{ NetworkAddress: networkAddress.String(), OwnerAddress: ownerAddress.String(), StakeDelta: stakeDelta, - IncrStake: incrStake, } } diff --git a/x/register/types/params.go b/x/register/types/params.go index bd91e9a0..ea7c7698 100644 --- a/x/register/types/params.go +++ b/x/register/types/params.go @@ -28,12 +28,13 @@ var ( KeyUnbondingCompletionTime = []byte("UnbondingCompletionTime") KeyMaxEntries = []byte("MaxEntries") KeyResourceNodeRegEnabled = []byte("ResourceNodeRegEnabled") + KeyResourceNodeMinStake = []byte("ResourceNodeMinStake") DefaultUnbondingThreasholdTime = 180 * 24 * time.Hour // threashold for unbonding - by default 180 days DefaultUnbondingCompletionTime = 14 * 24 * time.Hour // lead time to complete unbonding - by default 14 days DefaultStakeNozRate = sdk.NewDec(1000000) // 0.001gwei -> 1noz = 1000000wei -> 1noz DefaultRemainingNozLimit = sdk.NewInt(0) - DefaultResourceNodeMinStaking = sdk.NewCoin(DefaultBondDenom, sdk.NewInt(1e9)) + DefaultResourceNodeMinStake = sdk.NewCoin(DefaultBondDenom, sdk.NewInt(1e18)) ) // ParamKeyTable returns the parameter key table. @@ -43,7 +44,7 @@ func ParamKeyTable() paramtypes.KeyTable { // NewParams creates a new Params object func NewParams(bondDenom string, threashold, completion time.Duration, maxEntries uint32, - resourceNodeRegEnabled bool, resourceNodeMinStaking sdk.Coin) Params { + resourceNodeRegEnabled bool, resourceNodeMinStake sdk.Coin) Params { return Params{ BondDenom: bondDenom, @@ -51,7 +52,7 @@ func NewParams(bondDenom string, threashold, completion time.Duration, maxEntrie UnbondingCompletionTime: completion, MaxEntries: maxEntries, ResourceNodeRegEnabled: resourceNodeRegEnabled, - ResourceNodeMinStaking: resourceNodeMinStaking, + ResourceNodeMinStake: resourceNodeMinStake, } } @@ -63,6 +64,7 @@ func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { paramtypes.NewParamSetPair(KeyUnbondingCompletionTime, &p.UnbondingCompletionTime, validateUnbondingCompletionTime), paramtypes.NewParamSetPair(KeyMaxEntries, &p.MaxEntries, validateMaxEntries), paramtypes.NewParamSetPair(KeyResourceNodeRegEnabled, &p.ResourceNodeRegEnabled, validateResourceNodeRegEnabled), + paramtypes.NewParamSetPair(KeyResourceNodeMinStake, &p.ResourceNodeMinStake, validateResourceNodeMinStake), } } @@ -82,7 +84,7 @@ func (p Params) Validate() error { if err := validateResourceNodeRegEnabled(p.ResourceNodeRegEnabled); err != nil { return err } - if err := validateResourceNodeMinStaking(p.ResourceNodeMinStaking); err != nil { + if err := validateResourceNodeMinStake(p.ResourceNodeMinStake); err != nil { return err } return nil @@ -96,7 +98,7 @@ func DefaultParams() Params { DefaultUnbondingCompletionTime, DefaultMaxEntries, DefaultResourceNodeRegEnabled, - DefaultResourceNodeMinStaking, + DefaultResourceNodeMinStake, ) } @@ -164,7 +166,7 @@ func validateResourceNodeRegEnabled(i interface{}) error { return nil } -func validateResourceNodeMinStaking(i interface{}) error { +func validateResourceNodeMinStake(i interface{}) error { _, ok := i.(sdk.Coin) if !ok { return fmt.Errorf("invalid parameter type: %T", i) diff --git a/x/register/types/register.pb.go b/x/register/types/register.pb.go index 9ea0eeac..5a400624 100644 --- a/x/register/types/register.pb.go +++ b/x/register/types/register.pb.go @@ -40,7 +40,7 @@ type Params struct { UnbondingCompletionTime time.Duration `protobuf:"bytes,3,opt,name=unbonding_completion_time,json=unbondingCompletionTime,proto3,stdduration" json:"unbonding_completion_time" yaml:"unbonding_completion_time"` MaxEntries uint32 `protobuf:"varint,4,opt,name=max_entries,json=maxEntries,proto3" json:"max_entries" yaml:"max_entries",omitempty` ResourceNodeRegEnabled bool `protobuf:"varint,5,opt,name=resource_node_reg_enabled,json=resourceNodeRegEnabled,proto3" json:"resource_node_reg_enabled" yaml:"resource_node_reg_enabled"` - ResourceNodeMinStaking types.Coin `protobuf:"bytes,6,opt,name=resource_node_min_staking,json=resourceNodeMinStaking,proto3" json:"resource_node_min_staking" yaml:"resource_node_min_staking"` + ResourceNodeMinStake types.Coin `protobuf:"bytes,6,opt,name=resource_node_min_stake,json=resourceNodeMinStake,proto3" json:"resource_node_min_stake" yaml:"resource_node_min_stake"` } func (m *Params) Reset() { *m = Params{} } @@ -111,9 +111,9 @@ func (m *Params) GetResourceNodeRegEnabled() bool { return false } -func (m *Params) GetResourceNodeMinStaking() types.Coin { +func (m *Params) GetResourceNodeMinStake() types.Coin { if m != nil { - return m.ResourceNodeMinStaking + return m.ResourceNodeMinStake } return types.Coin{} } @@ -588,95 +588,95 @@ func init() { } var fileDescriptor_fef1e3aeec8499d6 = []byte{ - // 1397 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0xcf, 0x6f, 0x13, 0xc7, - 0x17, 0xcf, 0x26, 0x10, 0xdb, 0xe3, 0xfc, 0xe0, 0xbb, 0x44, 0xe0, 0xf0, 0xa5, 0x1e, 0x33, 0xfd, - 0x41, 0x90, 0x1a, 0x5b, 0x81, 0x4a, 0x55, 0x39, 0x54, 0xca, 0x42, 0xda, 0x42, 0x0b, 0x8a, 0x96, - 0x14, 0xa4, 0x4a, 0xd5, 0x76, 0xbc, 0x3b, 0x38, 0x43, 0xbc, 0x3b, 0xd6, 0xce, 0x38, 0xc4, 0x52, - 0x0f, 0x48, 0xbd, 0x70, 0xe4, 0x88, 0xd4, 0x0b, 0x7f, 0x44, 0xff, 0x86, 0x0a, 0x71, 0xe2, 0x58, - 0xf5, 0xb0, 0xad, 0xe0, 0x52, 0xf9, 0xb8, 0x87, 0xf6, 0x5a, 0xed, 0xfc, 0xf0, 0xae, 0x37, 0x44, - 0x15, 0x95, 0x38, 0x95, 0x13, 0x3b, 0x9f, 0xcf, 0x9b, 0xf7, 0xde, 0xcc, 0xfb, 0xbc, 0xe7, 0x09, - 0x00, 0x71, 0x11, 0x63, 0xc1, 0x78, 0x27, 0x26, 0x3d, 0xca, 0x05, 0x89, 0x3b, 0xfb, 0x1b, 0x93, - 0xef, 0xf6, 0x20, 0x66, 0x82, 0xd9, 0x27, 0xb5, 0x4d, 0x7b, 0x82, 0xef, 0x6f, 0x9c, 0x59, 0xe9, - 0xb1, 0x1e, 0x93, 0x7c, 0x27, 0xfb, 0x52, 0xa6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8b, 0xf7, 0x3c, 0x1c, 0x04, 0x31, 0xe1, 0x5c, 0x77, 0xc3, 0xfa, - 0x38, 0x81, 0x65, 0x2a, 0x4d, 0xe0, 0x29, 0x15, 0xba, 0x44, 0x20, 0x77, 0x49, 0x23, 0x9b, 0x0a, - 0xb0, 0x31, 0x98, 0x1f, 0x0c, 0xbb, 0x7b, 0x64, 0xa4, 0x1b, 0x61, 0xe5, 0x90, 0xca, 0x36, 0xa3, - 0x91, 0x73, 0x69, 0x9c, 0x40, 0x6d, 0x97, 0x26, 0x70, 0x51, 0xf9, 0x56, 0x6b, 0xf4, 0xec, 0xa7, - 0xf5, 0x15, 0x7d, 0x4d, 0x7e, 0x3c, 0x1a, 0x08, 0xd6, 0xde, 0x1e, 0x76, 0xbf, 0x24, 0x23, 0x57, - 0x6f, 0xb0, 0x3f, 0x06, 0x15, 0x3e, 0xe4, 0x03, 0x12, 0x05, 0x52, 0xc9, 0x55, 0xe7, 0x9d, 0x71, - 0x02, 0x0d, 0x94, 0x26, 0x70, 0x49, 0xb9, 0xd3, 0x00, 0x72, 0x0d, 0x65, 0xdf, 0x01, 0xf3, 0x5c, - 0x60, 0x31, 0x54, 0x6a, 0x5b, 0xba, 0x88, 0x4c, 0x39, 0xcc, 0xb8, 0x30, 0x15, 0x71, 0x58, 0x14, - 0xdc, 0x92, 0x96, 0xce, 0xff, 0xb3, 0x4c, 0xd5, 0xae, 0x3c, 0x53, 0xb5, 0x46, 0xae, 0x26, 0xb2, - 0x43, 0x0b, 0xb6, 0x47, 0x22, 0x2e, 0x65, 0x56, 0x53, 0xfd, 0xf3, 0x6b, 0x02, 0x3f, 0xe8, 0x51, - 0xb1, 0x3b, 0xec, 0xb6, 0x7d, 0x16, 0xea, 0xb9, 0xa6, 0xff, 0x59, 0xe7, 0xc1, 0x5e, 0x47, 0x8c, - 0x06, 0x84, 0xb7, 0xaf, 0x45, 0x22, 0x0b, 0xa1, 0xf6, 0xe7, 0x21, 0xd4, 0x1a, 0xb9,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0x4f, 0xba, 0x9c, 0x0a, 0xf5, - 0x92, 0x55, 0xa5, 0x30, 0x50, 0x9a, 0xc0, 0x86, 0x72, 0xa2, 0x81, 0xa2, 0x0f, 0x63, 0x64, 0x07, - 0xe0, 0x04, 0x27, 0xfe, 0x30, 0xa6, 0x62, 0xe4, 0xf9, 0x2c, 0x12, 0xd8, 0x17, 0xf2, 0x0e, 0x6b, - 0xce, 0x27, 0xd9, 0xac, 0x2e, 0x73, 0x69, 0x02, 0xcf, 0xe9, 0xa1, 0x51, 0x62, 0x8a, 0xde, 0x97, - 0x0d, 0x79, 0x45, 0x71, 0x59, 0xa2, 0x01, 0x11, 0x98, 0xf6, 0xcd, 0x48, 0x91, 0x89, 0x6a, 0x28, - 0x4f, 0x54, 0x03, 0x53, 0x89, 0x6a, 0xac, 0x20, 0xff, 0x87, 0xb3, 0x60, 0xf1, 0x6b, 0xf3, 0x96, - 0x96, 0xd3, 0xff, 0x3a, 0x58, 0x28, 0x6a, 0x57, 0x17, 0x43, 0xea, 0xb2, 0x88, 0xe7, 0xba, 0x2c, - 0xa2, 0xc8, 0xad, 0x17, 0x64, 0x6e, 0x5f, 0x03, 0x0b, 0x94, 0x7b, 0x21, 0x11, 0x58, 0x3e, 0x2a, - 0x65, 0x79, 0xaa, 0xca, 0x57, 0x11, 0xcf, 0x7d, 0x15, 0x51, 0xe4, 0x02, 0xca, 0x27, 0x3f, 0x4a, - 0xdf, 0x81, 0x8a, 0x79, 0xd4, 0x67, 0xf2, 0xae, 0x5f, 0x3c, 0xff, 0xca, 0x81, 0x34, 0x75, 0x96, - 0xec, 0x09, 0x3f, 0x52, 0x3a, 0xca, 0x5f, 0xfe, 0x5a, 0x47, 0xe6, 0xd5, 0xef, 0x1a, 0x0a, 0x3d, - 0x9b, 0x03, 0xf6, 0xe1, 0xed, 0x59, 0xff, 0x4f, 0xc6, 0xc9, 0x2e, 0xa1, 0xbd, 0x5d, 0x21, 0xaf, - 0x64, 0x4e, 0xf5, 0x7f, 0x89, 0xca, 0xfb, 0xbf, 0x44, 0x20, 0x77, 0xc9, 0x20, 0x5f, 0x48, 0xc0, - 0xde, 0x07, 0xcb, 0xe5, 0xbf, 0xa0, 0x66, 0xdf, 0xc4, 0xe0, 0x5b, 0xf2, 0xa7, 0xff, 0x42, 0x7a, - 0x60, 0x81, 0x65, 0x1a, 0x51, 0x41, 0x71, 0xdf, 0xeb, 0xe2, 0x3e, 0x8e, 0x7c, 0x23, 0xf8, 0x3b, - 0xaf, 0xf5, 0xb3, 0x54, 0x76, 0x92, 0x1f, 0xbd, 0x44, 0x20, 0x77, 0x49, 0x23, 0x8e, 0x02, 0x6c, - 0x0c, 0x2a, 0x26, 0xb2, 0x6a, 0x8f, 0xcf, 0x5f, 0x2b, 0x72, 0x25, 0x8f, 0xa8, 0x8b, 0x39, 0x89, - 0x64, 0x28, 0xe7, 0xe6, 0xd3, 0x17, 0x4d, 0xeb, 0xf9, 0x8b, 0xa6, 0xf5, 0xfb, 0x8b, 0xa6, 0xf5, - 0xe8, 0x65, 0x73, 0xe6, 0xf9, 0xcb, 0xe6, 0xcc, 0x2f, 0x2f, 0x9b, 0x33, 0xdf, 0x7c, 0x54, 0x88, - 0xa3, 0x15, 0x14, 0x11, 0x61, 0x3e, 0xd7, 0xfd, 0x5d, 0x4c, 0xa3, 0xce, 0x41, 0xfe, 0x1f, 0x1c, - 0x32, 0x72, 0x77, 0x5e, 0x16, 0xe3, 0xd2, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x1e, 0x4a, 0x90, - 0xa8, 0x01, 0x11, 0x00, 0x00, + // 1406 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0xcf, 0x6f, 0xd4, 0xc6, + 0x17, 0x8f, 0x13, 0x48, 0x36, 0xb3, 0xf9, 0xc1, 0xd7, 0x44, 0xb0, 0xe1, 0x4b, 0x77, 0x96, 0xe9, + 0x0f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96, 0xaa, 0x4e, 0x8a, 0xa3, + 0x57, 0x08, 0xe4, 0x2e, 0x69, 0xc4, 0x51, 0x80, 0x8d, 0xc1, 0x9c, 0x89, 0xac, 0xda, 0xe3, 0xd3, + 0x57, 0x8a, 0x3c, 0x57, 0x44, 0xd4, 0xc5, 0xcc, 0x23, 0x19, 0xca, 0xb9, 0xf5, 0xf4, 0x45, 0xd3, + 0x7a, 0xfe, 0xa2, 0x69, 0xfd, 0xf6, 0xa2, 0x69, 0x3d, 0x7a, 0xd9, 0x9c, 0x7a, 0xfe, 0xb2, 0x39, + 0xf5, 0xf3, 0xcb, 0xe6, 0xd4, 0x57, 0x1f, 0x94, 0xe2, 0x68, 0x05, 0x45, 0x44, 0x98, 0xcf, 0x75, + 0x7f, 0x07, 0xd3, 0xa8, 0xb3, 0x5f, 0xfc, 0xc7, 0x86, 0x8c, 0xdc, 0x9d, 0x95, 0xc5, 0xb8, 0xf4, + 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0x1a, 0x77, 0x41, 0x4b, 0xf9, 0x10, 0x00, 0x00, } func (this *ResourceNode) Equal(that interface{}) bool { @@ -832,7 +832,7 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { var l int _ = l { - size, err := m.ResourceNodeMinStaking.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.ResourceNodeMinStake.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -1340,7 +1340,7 @@ func (m *Params) Size() (n int) { if m.ResourceNodeRegEnabled { n += 2 } - l = m.ResourceNodeMinStaking.Size() + l = m.ResourceNodeMinStake.Size() n += 1 + l + sovRegister(uint64(l)) return n } @@ -1690,7 +1690,7 @@ func (m *Params) Unmarshal(dAtA []byte) error { m.ResourceNodeRegEnabled = bool(v != 0) case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceNodeMinStaking", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ResourceNodeMinStake", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -1717,7 +1717,7 @@ func (m *Params) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ResourceNodeMinStaking.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.ResourceNodeMinStake.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/x/register/types/tx.pb.go b/x/register/types/tx.pb.go index b1981146..53bd13a9 100644 --- a/x/register/types/tx.pb.go +++ b/x/register/types/tx.pb.go @@ -657,7 +657,6 @@ var xxx_messageInfo_MsgUpdateMetaNodeResponse proto.InternalMessageInfo type MsgUpdateResourceNodeStake struct { NetworkAddress string `protobuf:"bytes,1,opt,name=network_address,json=networkAddress,proto3" json:"network_address" yaml:"network_address"` OwnerAddress string `protobuf:"bytes,2,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address" yaml:"owner_address"` - IncrStake bool `protobuf:"varint,3,opt,name=incr_stake,json=incrStake,proto3" json:"incr_stake" yaml:"incr_stake"` StakeDelta types1.Coin `protobuf:"bytes,4,opt,name=stake_delta,json=stakeDelta,proto3" json:"stake_delta" yaml:"stake_delta"` } @@ -708,13 +707,6 @@ func (m *MsgUpdateResourceNodeStake) GetOwnerAddress() string { return "" } -func (m *MsgUpdateResourceNodeStake) GetIncrStake() bool { - if m != nil { - return m.IncrStake - } - return false -} - func (m *MsgUpdateResourceNodeStake) GetStakeDelta() types1.Coin { if m != nil { return m.StakeDelta @@ -1083,97 +1075,97 @@ func init() { func init() { proto.RegisterFile("stratos/register/v1/tx.proto", fileDescriptor_75d4b90d7a185a31) } var fileDescriptor_75d4b90d7a185a31 = []byte{ - // 1434 bytes of a gzipped FileDescriptorProto + // 1437 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0xcf, 0x6f, 0x1b, 0x45, 0x14, 0xce, 0xda, 0x69, 0x69, 0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3, 0x87, 0xe5, 0x89, 0xfb, 0x0f, 0xcb, 0x13, 0xbf, 0x3c, + 0x2c, 0x4f, 0xbc, 0x7f, 0x36, 0xd4, 0x97, 0x7b, 0xab, 0xea, 0xd8, 0xf2, 0x3f, 0xab, 0xad, 0x9b, + 0x5a, 0x57, 0x57, 0x6e, 0x07, 0x1b, 0xb1, 0x4e, 0xbd, 0xb9, 0x9f, 0xfd, 0xf9, 0xb8, 0xf1, 0x77, + 0x00, 0x00, 0x00, 0xff, 0xff, 0x62, 0x35, 0x9d, 0x41, 0x31, 0x18, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -2066,16 +2058,6 @@ func (m *MsgUpdateResourceNodeStake) MarshalToSizedBuffer(dAtA []byte) (int, err } i-- dAtA[i] = 0x22 - if m.IncrStake { - i-- - if m.IncrStake { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 - } if len(m.OwnerAddress) > 0 { i -= len(m.OwnerAddress) copy(dAtA[i:], m.OwnerAddress) @@ -2568,9 +2550,6 @@ func (m *MsgUpdateResourceNodeStake) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - if m.IncrStake { - n += 2 - } l = m.StakeDelta.Size() n += 1 + l + sovTx(uint64(l)) return n @@ -4080,26 +4059,6 @@ func (m *MsgUpdateResourceNodeStake) Unmarshal(dAtA []byte) error { } m.OwnerAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IncrStake", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IncrStake = bool(v != 0) case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field StakeDelta", wireType) From 14836dd9a06b98f14eaeea754a645845f67950d8 Mon Sep 17 00:00:00 2001 From: Xiong Date: Tue, 25 Apr 2023 10:48:45 -0400 Subject: [PATCH 61/95] fix --- x/register/keeper/keeper.go | 9 --------- x/register/keeper/msg_server.go | 4 ---- 2 files changed, 13 deletions(-) diff --git a/x/register/keeper/keeper.go b/x/register/keeper/keeper.go index c3fff105..9274b295 100644 --- a/x/register/keeper/keeper.go +++ b/x/register/keeper/keeper.go @@ -4,7 +4,6 @@ import ( "container/list" "errors" "fmt" - "math" "time" "github.com/tendermint/tendermint/libs/log" @@ -459,11 +458,3 @@ func (k Keeper) NozSupply(ctx sdk.Context) (remaining, total sdk.Int) { total = St.ToDec().Quo(stakeNozRate).TruncateInt() return remaining, total } - -func (k Keeper) HasReachedThreshold(ctx sdk.Context, validReporterCount int) bool { - totalMetaNodes := k.GetBondedMetaNodeCnt(ctx).Int64() - - threshold := int(math.Max(1, math.Floor(float64(totalMetaNodes)*2/3))) - - return validReporterCount >= threshold -} diff --git a/x/register/keeper/msg_server.go b/x/register/keeper/msg_server.go index 2a4c1a31..04c46093 100644 --- a/x/register/keeper/msg_server.go +++ b/x/register/keeper/msg_server.go @@ -329,10 +329,6 @@ func (k msgServer) HandleMsgUpdateEffectiveStake(goCtx context.Context, msg *typ validReporterCount++ } - if !k.HasReachedThreshold(ctx, validReporterCount) { - return &types.MsgUpdateEffectiveStakeResponse{}, types.ErrReporterNotReachThreshold - } - networkAddr, err := stratos.SdsAddressFromBech32(msg.NetworkAddress) if err != nil { return &types.MsgUpdateEffectiveStakeResponse{}, sdkerrors.Wrap(types.ErrInvalidNetworkAddr, err.Error()) From 9fb7f3d317859ada55a401cf4091f2af74e3cd48 Mon Sep 17 00:00:00 2001 From: Xixiong Chen <60588630+Xiong-stratos@users.noreply.github.com> Date: Tue, 25 Apr 2023 18:28:34 -0400 Subject: [PATCH 62/95] Feat/Qb-1744:Reward distribution process refactor (#251) * Move reward distribution to VolumeReport tx, keep the mature reward process in the EndBlocker * Add properties to genesis file * Fix blsSignature validation * Add not null constraint and json tag to proto files * recover panic in EndBlocker * Remove individual reward when it is matured * update function GetBLSSignBytes() * move reward distribution part to endblock * bug fix & code optimization --- app/test_helpers.go | 38 +-- proto/stratos/pot/v1/genesis.proto | 44 +++- proto/stratos/pot/v1/pot.proto | 14 +- x/pot/abci.go | 43 +-- x/pot/app_test.go | 363 +++++++++++++++----------- x/pot/genesis.go | 47 +++- x/pot/keeper/distribute.go | 72 ++--- x/pot/keeper/keeper.go | 8 +- x/pot/keeper/mature.go | 98 +++++++ x/pot/keeper/msg_server.go | 8 +- x/pot/keeper/params.go | 6 +- x/pot/keeper/querier.go | 2 +- x/pot/keeper/store.go | 67 +++-- x/pot/module.go | 2 +- x/pot/types/genesis.go | 34 ++- x/pot/types/genesis.pb.go | 406 +++++++++++++++++++++-------- x/pot/types/key.go | 20 +- x/pot/types/msg.go | 6 + x/pot/types/params.go | 6 +- x/pot/types/pot.pb.go | 318 ++++++++++------------ x/pot/types/types.go | 16 +- 21 files changed, 1000 insertions(+), 618 deletions(-) create mode 100644 x/pot/keeper/mature.go diff --git a/app/test_helpers.go b/app/test_helpers.go index 776890e5..63bbeb0e 100644 --- a/app/test_helpers.go +++ b/app/test_helpers.go @@ -10,15 +10,8 @@ import ( "testing" "time" - "github.com/cosmos/cosmos-sdk/simapp" - "github.com/cosmos/cosmos-sdk/types/simulation" - "github.com/cosmos/cosmos-sdk/types/tx/signing" - stratos "github.com/stratosnet/stratos-chain/types" - evmtypes "github.com/stratosnet/stratos-chain/x/evm/types" - pottypes "github.com/stratosnet/stratos-chain/x/pot/types" - registertypes "github.com/stratosnet/stratos-chain/x/register/types" - sdstypes "github.com/stratosnet/stratos-chain/x/sds/types" "github.com/stretchr/testify/require" + abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/libs/log" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" @@ -31,14 +24,23 @@ import ( cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" + "github.com/cosmos/cosmos-sdk/simapp" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/cosmos/cosmos-sdk/types/simulation" + "github.com/cosmos/cosmos-sdk/types/tx/signing" authsign "github.com/cosmos/cosmos-sdk/x/auth/signing" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + + stratos "github.com/stratosnet/stratos-chain/types" + evmtypes "github.com/stratosnet/stratos-chain/x/evm/types" + pottypes "github.com/stratosnet/stratos-chain/x/pot/types" + registertypes "github.com/stratosnet/stratos-chain/x/register/types" + sdstypes "github.com/stratosnet/stratos-chain/x/sds/types" ) const ( @@ -109,7 +111,6 @@ func SetupWithGenesisNodeSet(t *testing.T, metaNodes []registertypes.MetaNode, resourceNodes []registertypes.ResourceNode, genAccs []authtypes.GenesisAccount, - totalUnissuedPrepay sdk.Coin, chainId string, balances ...banktypes.Balance) *NewApp { @@ -121,7 +122,7 @@ func SetupWithGenesisNodeSet(t *testing.T, validators := make([]stakingtypes.Validator, 0, len(valSet.Validators)) delegations := make([]stakingtypes.Delegation, 0, len(valSet.Validators)) - bondedAmt := sdk.ZeroInt() + validatorBondedAmt := sdk.ZeroInt() bondAmt := sdk.NewInt(1000000) for _, val := range valSet.Validators { @@ -144,7 +145,7 @@ func SetupWithGenesisNodeSet(t *testing.T, } validators = append(validators, validator) delegations = append(delegations, stakingtypes.NewDelegation(genAccs[0].GetAddress(), val.Address.Bytes(), sdk.OneDec())) - bondedAmt = bondedAmt.Add(bondAmt) + validatorBondedAmt = validatorBondedAmt.Add(bondAmt) } // set validators and delegations stakingGenesis := stakingtypes.NewGenesisState( @@ -158,11 +159,12 @@ func SetupWithGenesisNodeSet(t *testing.T, delegations) genesisState[stakingtypes.ModuleName] = app.AppCodec().MustMarshalJSON(stakingGenesis) + initRemainingOzoneLimit := sdk.ZeroInt() if !freshStart { // add bonded amount to bonded pool module account balances = append(balances, banktypes.Balance{ Address: authtypes.NewModuleAddress(stakingtypes.BondedPoolName).String(), - Coins: sdk.Coins{sdk.NewCoin(stratos.Wei, bondedAmt)}, + Coins: sdk.Coins{sdk.NewCoin(stratos.Wei, validatorBondedAmt)}, }) // add bonded amount of resource nodes to module account @@ -185,16 +187,15 @@ func SetupWithGenesisNodeSet(t *testing.T, Coins: sdk.Coins{sdk.NewCoin(stratos.Wei, metaNodeBondedAmt)}, }) - balances = append(balances, banktypes.Balance{ - Address: authtypes.NewModuleAddress(registertypes.TotalUnissuedPrepay).String(), - Coins: sdk.Coins{totalUnissuedPrepay}, - }) + initRemainingOzoneLimit = resNodeBondedAmt.ToDec(). + Quo(registertypes.DefaultStakeNozRate). + TruncateInt() } totalSupply := sdk.NewCoins() for _, b := range balances { // add genesis acc tokens and delegated tokens to total supply - totalSupply = totalSupply.Add(b.Coins.Add(sdk.NewCoin(stratos.Wei, bondedAmt))...) + totalSupply = totalSupply.Add(b.Coins.Add(sdk.NewCoin(stratos.Wei, validatorBondedAmt))...) } // update total supply @@ -206,13 +207,14 @@ func SetupWithGenesisNodeSet(t *testing.T, registertypes.DefaultParams(), resourceNodes, metaNodes, - registertypes.DefaultRemainingNozLimit, + initRemainingOzoneLimit, make([]registertypes.Slashing, 0), registertypes.DefaultStakeNozRate, ) genesisState[registertypes.ModuleName] = app.AppCodec().MustMarshalJSON(registerGenesis) potGenesis := pottypes.DefaultGenesisState() + potGenesis.Params.MatureEpoch = 1 genesisState[pottypes.ModuleName] = app.AppCodec().MustMarshalJSON(potGenesis) sdsGenesis := sdstypes.DefaultGenesisState() diff --git a/proto/stratos/pot/v1/genesis.proto b/proto/stratos/pot/v1/genesis.proto index c38eee39..3a23e44d 100644 --- a/proto/stratos/pot/v1/genesis.proto +++ b/proto/stratos/pot/v1/genesis.proto @@ -10,23 +10,57 @@ option go_package = "github.com/stratosnet/stratos-chain/x/pot/types"; // GenesisState defines the register module's genesis state. message GenesisState { Params params = 1 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "params", (gogoproto.moretags) = "yaml:\"params\"" ]; cosmos.base.v1beta1.Coin total_mined_token = 2 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "total_mined_token", (gogoproto.moretags) = "yaml:\"total_mined_token\"" ]; - int64 last_reported_epoch = 3 [ - (gogoproto.moretags) = "yaml:\"last_reported_epoch\"" + string last_distributed_epoch = 3 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "last_distributed_epoch", + (gogoproto.moretags) = "yaml:\"last_distributed_epoch\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int" ]; repeated ImmatureTotal immature_total_info = 4 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "immature_total_info", (gogoproto.moretags) = "yaml:\"immature_total_info\"" ]; repeated MatureTotal mature_total_info = 5 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "mature_total_info", (gogoproto.moretags) = "yaml:\"mature_total_info\"" ]; repeated Reward individual_reward_info = 6 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "individual_reward_info", (gogoproto.moretags) = "yaml:\"individual_reward_info\"" ]; + WalletVolumes undistributed_report = 7 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "undistributed_report", + (gogoproto.moretags) = "yaml:\"undistributed_report\"" + ]; + string undistributed_epoch = 8 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "undistributed_epoch", + (gogoproto.moretags) = "yaml:\"undistributed_epoch\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int" + ]; + bool is_ready_to_distribute = 9 [ + (gogoproto.jsontag) = "is_ready_to_distribute", + (gogoproto.moretags) = "yaml:\"is_ready_to_distribute\"" + ]; + string matured_epoch = 10 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "matured_epoch", + (gogoproto.moretags) = "yaml:\"matured_epoch\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int" + ]; } message ImmatureTotal { @@ -35,7 +69,8 @@ message ImmatureTotal { (gogoproto.moretags) = "yaml:\"wallet_address\"" ]; repeated cosmos.base.v1beta1.Coin value = 2 [ - (gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" ]; } @@ -45,6 +80,7 @@ message MatureTotal { (gogoproto.moretags) = "yaml:\"wallet_address\"" ]; repeated cosmos.base.v1beta1.Coin value = 2 [ - (gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" ]; } diff --git a/proto/stratos/pot/v1/pot.proto b/proto/stratos/pot/v1/pot.proto index 38163d6f..3673552c 100644 --- a/proto/stratos/pot/v1/pot.proto +++ b/proto/stratos/pot/v1/pot.proto @@ -21,38 +21,48 @@ message Params { (gogoproto.moretags) = "yaml:\"mature_epoch\"" ]; repeated MiningRewardParam mining_reward_params = 4 [ + (gogoproto.nullable) = false, (gogoproto.jsontag) = "mining_reward_params", (gogoproto.moretags) = "yaml:\"mining_reward_params\"" ]; string community_tax = 5 [ + (gogoproto.nullable) = false, (gogoproto.jsontag) = "community_tax", (gogoproto.moretags) = "yaml:\"community_tax\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec" ]; } message MiningRewardParam { cosmos.base.v1beta1.Coin total_mined_valve_start = 1 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "total_mined_valve_start", (gogoproto.moretags) = "yaml:\"total_mined_valve_start\"" ]; cosmos.base.v1beta1.Coin total_mined_valve_end = 2 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "total_mined_valve_end", (gogoproto.moretags) = "yaml:\"total_mined_valve_end\"" ]; cosmos.base.v1beta1.Coin mining_reward = 3 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "mining_reward", (gogoproto.moretags) = "yaml:\"mining_reward\"" ]; string block_chain_percentage_in_bp = 4 [ + (gogoproto.nullable) = false, (gogoproto.jsontag) = "block_chain_percentage_in_bp", (gogoproto.moretags) = "yaml:\"block_chain_percentage_in_bp\"", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int" ]; string resource_node_percentage_in_bp = 5 [ + (gogoproto.nullable) = false, (gogoproto.jsontag) = "resource_node_percentage_in_bp", (gogoproto.moretags) = "yaml:\"resource_node_percentage_in_bp\"", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int" ]; string meta_node_percentage_in_bp = 6 [ + (gogoproto.nullable) = false, (gogoproto.jsontag) = "meta_node_percentage_in_bp", (gogoproto.moretags) = "yaml:\"meta_node_percentage_in_bp\"", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int" diff --git a/x/pot/abci.go b/x/pot/abci.go index 5c68d318..56cae940 100644 --- a/x/pot/abci.go +++ b/x/pot/abci.go @@ -18,27 +18,40 @@ func BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock, k keeper.Keeper) // EndBlocker called every block, process inflation, update validator set. func EndBlocker(ctx sdk.Context, req abci.RequestEndBlock, k keeper.Keeper) []abci.ValidatorUpdate { - // Do not distribute rewards until the next block - if !k.GetIsReadyToDistributeReward(ctx) && k.GetUnhandledEpoch(ctx).GT(sdk.ZeroInt()) { - k.SetIsReadyToDistributeReward(ctx, true) - return []abci.ValidatorUpdate{} - } + logger := k.Logger(ctx) + + defer func() { + if r := recover(); r != nil { + logger.Error("Recovered from panic. ", "ErrMsg", r) + } + }() - walletVolumes, found := k.GetUnhandledReport(ctx) - if !found { - return []abci.ValidatorUpdate{} + // Do not distribute rewards until the next block + if !k.GetIsReadyToDistribute(ctx) && k.GetUnDistributedEpoch(ctx).GT(sdk.ZeroInt()) { + k.SetIsReadyToDistribute(ctx, true) + } else { + // Start distribute reward if report found + walletVolumes, found := k.GetUnDistributedReport(ctx) + if found { + epoch := k.GetUnDistributedEpoch(ctx) + + //distribute POT reward + err := k.DistributePotReward(ctx, walletVolumes.Volumes, epoch) + if err != nil { + logger.Error("An error occurred while distributing the reward. ", "ErrMsg", err.Error()) + } + + // reset undistributed info after distribution + k.SetUnDistributedReport(ctx, types.WalletVolumes{}) + k.SetUnDistributedEpoch(ctx, sdk.ZeroInt()) + } } - epoch := k.GetUnhandledEpoch(ctx) - logger := k.Logger(ctx) - //distribute POT reward - _, err := k.DistributePotReward(ctx, walletVolumes.Volumes, epoch) + // mature reward + err := k.RewardMatureAndSubSlashing(ctx) if err != nil { logger.Error("An error occurred while distributing the reward. ", "ErrMsg", err.Error()) } - k.SetUnhandledReport(ctx, types.WalletVolumes{}) - k.SetUnhandledEpoch(ctx, sdk.ZeroInt()) - return []abci.ValidatorUpdate{} } diff --git a/x/pot/app_test.go b/x/pot/app_test.go index 894e26f5..b59845fb 100644 --- a/x/pot/app_test.go +++ b/x/pot/app_test.go @@ -5,7 +5,6 @@ import ( "testing" "time" - distrkeeper "github.com/cosmos/cosmos-sdk/x/distribution/keeper" "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" @@ -19,14 +18,18 @@ import ( authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" bankKeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" + distrkeeper "github.com/cosmos/cosmos-sdk/x/distribution/keeper" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/stratosnet/stratos-chain/app" + "github.com/stratosnet/stratos-chain/crypto" + "github.com/stratosnet/stratos-chain/crypto/bls" stratos "github.com/stratosnet/stratos-chain/types" potKeeper "github.com/stratosnet/stratos-chain/x/pot/keeper" "github.com/stratosnet/stratos-chain/x/pot/types" registerKeeper "github.com/stratosnet/stratos-chain/x/register/keeper" registertypes "github.com/stratosnet/stratos-chain/x/register/types" + sdstypes "github.com/stratosnet/stratos-chain/x/sds/types" ) const ( @@ -46,76 +49,63 @@ var ( resNodeSlashingNOZAmt1 = sdk.NewInt(1000000000000000000) resNodeSlashingEffectiveTokenAmt1 = sdk.NewInt(1000000000000000000) - resourceNodeVolume1 = sdk.NewInt(500000) - resourceNodeVolume2 = sdk.NewInt(300000) - resourceNodeVolume3 = sdk.NewInt(200000) + resourceNodeVolume1 = sdk.NewInt(50000) + resourceNodeVolume2 = sdk.NewInt(30000) + resourceNodeVolume3 = sdk.NewInt(20000) - depositForSendingTx, _ = sdk.NewIntFromString("100000000000000000000000000000") - totalUnissuedPrepayVal, _ = sdk.NewIntFromString("1000000000000") - totalUnissuedPrepay = stratos.NewCoin(totalUnissuedPrepayVal) + prepayAmount = sdk.NewCoins(stratos.NewCoin(sdk.NewInt(20).Mul(sdk.NewInt(stratos.StosToWei)))) foundationDepositorPrivKey = secp256k1.GenPrivKey() foundationDepositorAccAddr = sdk.AccAddress(foundationDepositorPrivKey.PubKey().Address()) foundationDeposit = sdk.NewCoins(sdk.NewCoin(rewardDenom, sdk.NewInt(40000000000000000))) - resOwnerPrivKey1 = secp256k1.GenPrivKey() - resOwnerPrivKey2 = secp256k1.GenPrivKey() - resOwnerPrivKey3 = secp256k1.GenPrivKey() - resOwnerPrivKey4 = secp256k1.GenPrivKey() - resOwnerPrivKey5 = secp256k1.GenPrivKey() - idxOwnerPrivKey1 = secp256k1.GenPrivKey() - idxOwnerPrivKey2 = secp256k1.GenPrivKey() - idxOwnerPrivKey3 = secp256k1.GenPrivKey() - - resOwner1 = sdk.AccAddress(resOwnerPrivKey1.PubKey().Address()) - resOwner2 = sdk.AccAddress(resOwnerPrivKey2.PubKey().Address()) - resOwner3 = sdk.AccAddress(resOwnerPrivKey3.PubKey().Address()) - resOwner4 = sdk.AccAddress(resOwnerPrivKey4.PubKey().Address()) - resOwner5 = sdk.AccAddress(resOwnerPrivKey5.PubKey().Address()) - idxOwner1 = sdk.AccAddress(idxOwnerPrivKey1.PubKey().Address()) - idxOwner2 = sdk.AccAddress(idxOwnerPrivKey2.PubKey().Address()) - idxOwner3 = sdk.AccAddress(idxOwnerPrivKey3.PubKey().Address()) - - resNodePubKey1 = secp256k1.GenPrivKey().PubKey() - resNodeAddr1 = sdk.AccAddress(resNodePubKey1.Address()) - resNodeNetworkId1 = stratos.SdsAddress(resNodePubKey1.Address()) - resNodeInitialStake1 = sdk.NewInt(3 * stos2wei) - - resNodePubKey2 = secp256k1.GenPrivKey().PubKey() - resNodeAddr2 = sdk.AccAddress(resNodePubKey2.Address()) - resNodeNetworkId2 = stratos.SdsAddress(resNodePubKey2.Address()) - resNodeInitialStake2 = sdk.NewInt(3 * stos2wei) - - resNodePubKey3 = secp256k1.GenPrivKey().PubKey() - resNodeAddr3 = sdk.AccAddress(resNodePubKey3.Address()) - resNodeNetworkId3 = stratos.SdsAddress(resNodePubKey3.Address()) - resNodeInitialStake3 = sdk.NewInt(3 * stos2wei) - - resNodePubKey4 = secp256k1.GenPrivKey().PubKey() - resNodeAddr4 = sdk.AccAddress(resNodePubKey4.Address()) - resNodeNetworkId4 = stratos.SdsAddress(resNodePubKey4.Address()) - resNodeInitialStake4 = sdk.NewInt(3 * stos2wei) - - resNodePubKey5 = secp256k1.GenPrivKey().PubKey() - resNodeAddr5 = sdk.AccAddress(resNodePubKey5.Address()) - resNodeNetworkId5 = stratos.SdsAddress(resNodePubKey5.Address()) - resNodeInitialStake5 = sdk.NewInt(3 * stos2wei) - - idxNodePrivKey1 = secp256k1.GenPrivKey() - idxNodePubKey1 = idxNodePrivKey1.PubKey() - idxNodeAddr1 = sdk.AccAddress(idxNodePubKey1.Address()) - idxNodeNetworkId1 = stratos.SdsAddress(idxNodePubKey1.Address()) - idxNodeInitialStake1 = sdk.NewInt(5 * stos2wei) - - idxNodePubKey2 = secp256k1.GenPrivKey().PubKey() - idxNodeAddr2 = sdk.AccAddress(idxNodePubKey2.Address()) - idxNodeNetworkId2 = stratos.SdsAddress(idxNodePubKey2.Address()) - idxNodeInitialStake2 = sdk.NewInt(5 * stos2wei) - - idxNodePubKey3 = secp256k1.GenPrivKey().PubKey() - idxNodeAddr3 = sdk.AccAddress(idxNodePubKey3.Address()) - idxNodeNetworkId3 = stratos.SdsAddress(idxNodePubKey3.Address()) - idxNodeInitialStake3 = sdk.NewInt(5 * stos2wei) + nodeInitialStake = sdk.NewInt(1 * stratos.StosToWei) + initBalance = sdk.NewInt(100).Mul(sdk.NewInt(stratos.StosToWei)) + + // wallet private keys + resOwnerPrivKey1 = secp256k1.GenPrivKey() + resOwnerPrivKey2 = secp256k1.GenPrivKey() + resOwnerPrivKey3 = secp256k1.GenPrivKey() + resOwnerPrivKey4 = secp256k1.GenPrivKey() + resOwnerPrivKey5 = secp256k1.GenPrivKey() + metaOwnerPrivKey1 = secp256k1.GenPrivKey() + metaOwnerPrivKey2 = secp256k1.GenPrivKey() + metaOwnerPrivKey3 = secp256k1.GenPrivKey() + // wallet addresses + resOwner1 = sdk.AccAddress(resOwnerPrivKey1.PubKey().Address()) + resOwner2 = sdk.AccAddress(resOwnerPrivKey2.PubKey().Address()) + resOwner3 = sdk.AccAddress(resOwnerPrivKey3.PubKey().Address()) + resOwner4 = sdk.AccAddress(resOwnerPrivKey4.PubKey().Address()) + resOwner5 = sdk.AccAddress(resOwnerPrivKey5.PubKey().Address()) + metaOwner1 = sdk.AccAddress(metaOwnerPrivKey1.PubKey().Address()) + metaOwner2 = sdk.AccAddress(metaOwnerPrivKey2.PubKey().Address()) + metaOwner3 = sdk.AccAddress(metaOwnerPrivKey3.PubKey().Address()) + + // P2P public key of resource nodes + resNodeP2PPubKey1 = ed25519.GenPrivKey().PubKey() + resNodeP2PPubKey2 = ed25519.GenPrivKey().PubKey() + resNodeP2PPubKey3 = ed25519.GenPrivKey().PubKey() + resNodeP2PPubKey4 = ed25519.GenPrivKey().PubKey() + resNodeP2PPubKey5 = ed25519.GenPrivKey().PubKey() + // P2P address of resource nodes + resNodeP2PAddr1 = stratos.SdsAddress(resNodeP2PPubKey1.Address()) + resNodeP2PAddr2 = stratos.SdsAddress(resNodeP2PPubKey2.Address()) + resNodeP2PAddr3 = stratos.SdsAddress(resNodeP2PPubKey3.Address()) + resNodeP2PAddr4 = stratos.SdsAddress(resNodeP2PPubKey4.Address()) + resNodeP2PAddr5 = stratos.SdsAddress(resNodeP2PPubKey5.Address()) + + // P2P private key of meta nodes + metaNodeP2PPrivKey1 = ed25519.GenPrivKey() + metaNodeP2PPrivKey2 = ed25519.GenPrivKey() + metaNodeP2PPrivKey3 = ed25519.GenPrivKey() + // P2P public key of meta nodes + metaNodeP2PPubKey1 = metaNodeP2PPrivKey1.PubKey() + metaNodeP2PPubKey2 = metaNodeP2PPrivKey2.PubKey() + metaNodeP2PPubKey3 = metaNodeP2PPrivKey3.PubKey() + // P2P address of meta nodes + metaNodeP2PAddr1 = stratos.SdsAddress(metaNodeP2PPubKey1.Address()) + metaNodeP2PAddr2 = stratos.SdsAddress(metaNodeP2PPubKey2.Address()) + metaNodeP2PAddr3 = stratos.SdsAddress(metaNodeP2PPubKey3.Address()) valOpPrivKey1 = secp256k1.GenPrivKey() valOpPubKey1 = valOpPrivKey1.PubKey() @@ -124,39 +114,59 @@ var ( valConsPrivKey1 = ed25519.GenPrivKey() valConsPubk1 = valConsPrivKey1.PubKey() - valInitialStake = sdk.NewInt(5 * stos2wei) ) // initialize data of volume report -func setupMsgVolumeReport(newEpoch int64) *types.MsgVolumeReport { +func setupMsgVolumeReport(t *testing.T, newEpoch int64) *types.MsgVolumeReport { volume1 := types.NewSingleWalletVolume(resOwner1, resourceNodeVolume1) volume2 := types.NewSingleWalletVolume(resOwner2, resourceNodeVolume2) volume3 := types.NewSingleWalletVolume(resOwner3, resourceNodeVolume3) - nodesVolume := []*types.SingleWalletVolume{volume1, volume2, volume3} - reporter := idxNodeNetworkId1 + nodesVolume := []types.SingleWalletVolume{volume1, volume2, volume3} + reporter := metaNodeP2PAddr1 epoch := sdk.NewInt(newEpoch) reportReference := "report for epoch " + epoch.String() - reporterOwner := idxOwner1 + reporterOwner := metaOwner1 - pubKeys := make([][]byte, 1) - for i := range pubKeys { - pubKeys[i] = make([]byte, 1) - } + signature := types.BLSSignatureInfo{} + volumeReportMsg := types.NewMsgVolumeReport(nodesVolume, reporter, epoch, reportReference, reporterOwner, signature) - signature := types.NewBLSSignatureInfo(pubKeys, []byte("signature"), []byte("txData")) + signBytes := volumeReportMsg.GetSignBytes() + signBytesHash := crypto.Keccak256(signBytes) - volumeReportMsg := types.NewMsgVolumeReport(nodesVolume, reporter, epoch, reportReference, reporterOwner, signature) + // set blsSignature + blsPrivKey1, blsPubKey1, err := bls.NewKeyPairFromBytes(metaNodeP2PPrivKey1.Bytes()) + require.NoError(t, err) + blsPrivKey2, blsPubKey2, err := bls.NewKeyPairFromBytes(metaNodeP2PPrivKey2.Bytes()) + require.NoError(t, err) + blsPrivKey3, blsPubKey3, err := bls.NewKeyPairFromBytes(metaNodeP2PPrivKey3.Bytes()) + require.NoError(t, err) + + blsSignature1, err := bls.Sign(signBytesHash, blsPrivKey1) + require.NoError(t, err) + blsSignature2, err := bls.Sign(signBytesHash, blsPrivKey2) + require.NoError(t, err) + blsSignature3, err := bls.Sign(signBytesHash, blsPrivKey3) + require.NoError(t, err) + finalBlsSignature, err := bls.AggregateSignatures(blsSignature1, blsSignature2, blsSignature3) + require.NoError(t, err) + + pubKeys := make([][]byte, 0) + pubKeys = append(pubKeys, blsPubKey1, blsPubKey2, blsPubKey3) + + signature = types.NewBLSSignatureInfo(pubKeys, finalBlsSignature, signBytesHash) + + volumeReportMsg.BLSSignature = signature return volumeReportMsg } func setupSlashingMsg() *types.MsgSlashingResourceNode { reporters := make([]stratos.SdsAddress, 0) - reporters = append(reporters, idxNodeNetworkId1) + reporters = append(reporters, metaNodeP2PAddr1) reportOwner := make([]sdk.AccAddress, 0) - reportOwner = append(reportOwner, idxOwner1) - slashingMsg := types.NewMsgSlashingResourceNode(reporters, reportOwner, resNodeNetworkId1, resOwner1, resNodeSlashingNOZAmt1, true) + reportOwner = append(reportOwner, metaOwner1) + slashingMsg := types.NewMsgSlashingResourceNode(reporters, reportOwner, resNodeP2PAddr1, resOwner1, resNodeSlashingNOZAmt1, true) return slashingMsg } @@ -187,8 +197,7 @@ func TestPotVolumeReportMsgs(t *testing.T) { metaNodes := setupAllMetaNodes() resourceNodes := setupAllResourceNodes() - stApp := app.SetupWithGenesisNodeSet(t, false, valSet, metaNodes, resourceNodes, accs, totalUnissuedPrepay, chainID, balances...) - + stApp := app.SetupWithGenesisNodeSet(t, false, valSet, metaNodes, resourceNodes, accs, chainID, balances...) accountKeeper := stApp.GetAccountKeeper() bankKeeper := stApp.GetBankKeeper() registerKeeper := stApp.GetRegisterKeeper() @@ -203,9 +212,9 @@ func TestPotVolumeReportMsgs(t *testing.T) { foundationDepositMsg := types.NewMsgFoundationDeposit(foundationDeposit, foundationDepositorAccAddr) txGen := app.MakeTestEncodingConfig().TxConfig - foundationDepositorAcc := accountKeeper.GetAccount(ctx, foundationDepositorAccAddr) - accNum := foundationDepositorAcc.GetAccountNumber() - accSeq := foundationDepositorAcc.GetSequence() + senderAcc := accountKeeper.GetAccount(ctx, foundationDepositorAccAddr) + accNum := senderAcc.GetAccountNumber() + accSeq := senderAcc.GetSequence() _, _, err := app.SignCheckDeliver(t, txGen, stApp.BaseApp, header, []sdk.Msg{foundationDepositMsg}, chainID, []uint64{accNum}, []uint64{accSeq}, true, true, foundationDepositorPrivKey) require.NoError(t, err) foundationAccountAddr := accountKeeper.GetModuleAddress(types.FoundationAccount) @@ -218,14 +227,24 @@ func TestPotVolumeReportMsgs(t *testing.T) { commission := stakingtypes.NewCommissionRates(sdk.NewDecWithPrec(5, 1), sdk.NewDecWithPrec(5, 1), sdk.NewDec(0)) description := stakingtypes.NewDescription("foo_moniker", chainID, "", "", "") - createValidatorMsg, err := stakingtypes.NewMsgCreateValidator(valOpValAddr1, valConsPubk1, stratos.NewCoin(valInitialStake), description, commission, sdk.OneInt()) + createValidatorMsg, err := stakingtypes.NewMsgCreateValidator(valOpValAddr1, valConsPubk1, stratos.NewCoin(nodeInitialStake), description, commission, sdk.OneInt()) - valOpAcc1 := accountKeeper.GetAccount(ctx, valOpAccAddr1) - accNum = valOpAcc1.GetAccountNumber() - accSeq = valOpAcc1.GetSequence() + senderAcc = accountKeeper.GetAccount(ctx, valOpAccAddr1) + accNum = senderAcc.GetAccountNumber() + accSeq = senderAcc.GetSequence() _, _, err = app.SignCheckDeliver(t, txGen, stApp.BaseApp, header, []sdk.Msg{createValidatorMsg}, chainID, []uint64{accNum}, []uint64{accSeq}, true, true, valOpPrivKey1) require.NoError(t, err) - app.CheckBalance(t, stApp, valOpAccAddr1, nil) + + /********************* prepay *********************/ + header = tmproto.Header{Height: stApp.LastBlockHeight() + 1, ChainID: chainID} + stApp.BeginBlock(abci.RequestBeginBlock{Header: header}) + ctx = stApp.BaseApp.NewContext(false, header) + prepayMsg := sdstypes.NewMsgPrepay(resOwner1.String(), resOwner1.String(), prepayAmount) + senderAcc = accountKeeper.GetAccount(ctx, resOwner1) + accNum = senderAcc.GetAccountNumber() + accSeq = senderAcc.GetSequence() + _, _, err = app.SignCheckDeliver(t, txGen, stApp.BaseApp, header, []sdk.Msg{prepayMsg}, chainID, []uint64{accNum}, []uint64{accSeq}, true, true, resOwnerPrivKey1) + require.NoError(t, err) /********************** commit **********************/ header = tmproto.Header{Height: stApp.LastBlockHeight() + 1, ChainID: chainID} @@ -234,7 +253,7 @@ func TestPotVolumeReportMsgs(t *testing.T) { validator := checkValidator(t, stApp, valOpValAddr1, true) require.Equal(t, stakingtypes.Bonded, validator.Status) - require.True(sdk.IntEq(t, valInitialStake, validator.BondedTokens())) + require.True(sdk.IntEq(t, nodeInitialStake, validator.BondedTokens())) /********************** loop sending volume report **********************/ var i int64 @@ -246,14 +265,18 @@ func TestPotVolumeReportMsgs(t *testing.T) { /********************* test slashing msg when i==2 *********************/ if i == 2 { t.Log("********************************* Deliver Slashing Tx START ********************************************") + + totalConsumedNoz := resNodeSlashingNOZAmt1.ToDec() + slashingAmtCheck := potKeeper.GetTrafficReward(ctx, totalConsumedNoz) + slashingMsg := setupSlashingMsg() /********************* deliver tx *********************/ - idxOwnerAcc1 := accountKeeper.GetAccount(ctx, idxOwner1) - ownerAccNum := idxOwnerAcc1.GetAccountNumber() - ownerAccSeq := idxOwnerAcc1.GetSequence() + senderAcc = accountKeeper.GetAccount(ctx, metaOwner1) + accNum = senderAcc.GetAccountNumber() + accSeq = senderAcc.GetSequence() - _, _, err = app.SignCheckDeliver(t, txGen, stApp.BaseApp, header, []sdk.Msg{slashingMsg}, chainID, []uint64{ownerAccNum}, []uint64{ownerAccSeq}, true, true, idxOwnerPrivKey1) + _, _, err = app.SignCheckDeliver(t, txGen, stApp.BaseApp, header, []sdk.Msg{slashingMsg}, chainID, []uint64{accNum}, []uint64{accSeq}, true, true, metaOwnerPrivKey1) require.NoError(t, err) /********************* commit & check result *********************/ header = tmproto.Header{Height: stApp.LastBlockHeight() + 1, ChainID: chainID} @@ -262,9 +285,6 @@ func TestPotVolumeReportMsgs(t *testing.T) { slashingAmtSetup = registerKeeper.GetSlashing(ctx, resOwner1) - totalConsumedNoz := resNodeSlashingNOZAmt1.ToDec() - - slashingAmtCheck := potKeeper.GetTrafficReward(ctx, totalConsumedNoz) t.Log("slashingAmtSetup = " + slashingAmtSetup.String()) require.Equal(t, slashingAmtSetup, slashingAmtCheck.TruncateInt()) @@ -277,7 +297,7 @@ func TestPotVolumeReportMsgs(t *testing.T) { t.Log("*") t.Log("*****************************************************************************") /********************* prepare tx data *********************/ - volumeReportMsg := setupMsgVolumeReport(i + 1) + volumeReportMsg := setupMsgVolumeReport(t, i+1) lastTotalMinedToken := potKeeper.GetTotalMinedTokens(ctx) t.Log("last committed TotalMinedTokens = " + lastTotalMinedToken.String()) @@ -336,17 +356,17 @@ func TestPotVolumeReportMsgs(t *testing.T) { t.Log(" miningReward = " + rewardDetailMap[resOwner5.String()].RewardFromMiningPool.String()) t.Log(" trafficReward = " + rewardDetailMap[resOwner5.String()].RewardFromTrafficPool.String()) - t.Log("indexing_wallet1: address = " + idxOwner1.String()) - t.Log(" miningReward = " + rewardDetailMap[idxOwner1.String()].RewardFromMiningPool.String()) - t.Log(" trafficReward = " + rewardDetailMap[idxOwner1.String()].RewardFromTrafficPool.String()) + t.Log("indexing_wallet1: address = " + metaOwner1.String()) + t.Log(" miningReward = " + rewardDetailMap[metaOwner1.String()].RewardFromMiningPool.String()) + t.Log(" trafficReward = " + rewardDetailMap[metaOwner1.String()].RewardFromTrafficPool.String()) - t.Log("indexing_wallet2: address = " + idxOwner2.String()) - t.Log(" miningReward = " + rewardDetailMap[idxOwner2.String()].RewardFromMiningPool.String()) - t.Log(" trafficReward = " + rewardDetailMap[idxOwner2.String()].RewardFromTrafficPool.String()) + t.Log("indexing_wallet2: address = " + metaOwner2.String()) + t.Log(" miningReward = " + rewardDetailMap[metaOwner2.String()].RewardFromMiningPool.String()) + t.Log(" trafficReward = " + rewardDetailMap[metaOwner2.String()].RewardFromTrafficPool.String()) - t.Log("indexing_wallet3: address = " + idxOwner3.String()) - t.Log(" miningReward = " + rewardDetailMap[idxOwner3.String()].RewardFromMiningPool.String()) - t.Log(" trafficReward = " + rewardDetailMap[idxOwner3.String()].RewardFromTrafficPool.String()) + t.Log("indexing_wallet3: address = " + metaOwner3.String()) + t.Log(" miningReward = " + rewardDetailMap[metaOwner3.String()].RewardFromMiningPool.String()) + t.Log(" trafficReward = " + rewardDetailMap[metaOwner3.String()].RewardFromTrafficPool.String()) t.Log("---------------------------") /********************* record data before delivering tx *********************/ @@ -354,18 +374,17 @@ func TestPotVolumeReportMsgs(t *testing.T) { lastUnissuedPrepay := registerKeeper.GetTotalUnissuedPrepay(ctx) lastCommunityPool := sdk.NewCoins(sdk.NewCoin(potKeeper.BondDenom(ctx), distrKeeper.GetFeePool(ctx).CommunityPool.AmountOf(potKeeper.BondDenom(ctx)).TruncateInt())) lastMatureTotalOfResNode1 := potKeeper.GetMatureTotalReward(ctx, resOwner1) - + lastIndividualRewardOfResNode1, individualRewardOfResNode1Found := potKeeper.GetIndividualReward(ctx, resOwner1, epoch) /********************* deliver tx *********************/ - idxOwnerAcc1 := accountKeeper.GetAccount(ctx, idxOwner1) + idxOwnerAcc1 := accountKeeper.GetAccount(ctx, metaOwner1) ownerAccNum := idxOwnerAcc1.GetAccountNumber() ownerAccSeq := idxOwnerAcc1.GetSequence() feePoolAccAddr := accountKeeper.GetModuleAddress(authtypes.FeeCollectorName) require.NotNil(t, feePoolAccAddr) - feeCollectorToFeePoolAtBeginBlock := bankKeeper.GetBalance(ctx, feePoolAccAddr, potKeeper.BondDenom(ctx)) t.Log("--------------------------- deliver volumeReportMsg") - _, _, err = app.SignCheckDeliver(t, txGen, stApp.BaseApp, header, []sdk.Msg{volumeReportMsg}, chainID, []uint64{ownerAccNum}, []uint64{ownerAccSeq}, true, true, idxOwnerPrivKey1) + _, _, err = app.SignCheckDeliver(t, txGen, stApp.BaseApp, header, []sdk.Msg{volumeReportMsg}, chainID, []uint64{ownerAccNum}, []uint64{ownerAccSeq}, true, true, metaOwnerPrivKey1) require.NoError(t, err) /********************* commit & check result *********************/ @@ -374,7 +393,11 @@ func TestPotVolumeReportMsgs(t *testing.T) { stApp.BeginBlock(abci.RequestBeginBlock{Header: header}) stApp.EndBlock(abci.RequestEndBlock{Height: header.Height}) stApp.Commit() - + feeCollectorToFeePoolAtBeginBlock := bankKeeper.GetAllBalances(ctx, feePoolAccAddr) + header = tmproto.Header{Height: stApp.LastBlockHeight() + 1, ChainID: chainID} + stApp.BeginBlock(abci.RequestBeginBlock{Header: header}) + ctx = stApp.BaseApp.NewContext(true, header) + stApp.Commit() header = tmproto.Header{Height: stApp.LastBlockHeight() + 1, ChainID: chainID} stApp.BeginBlock(abci.RequestBeginBlock{Header: header}) ctx = stApp.BaseApp.NewContext(true, header) @@ -394,6 +417,8 @@ func TestPotVolumeReportMsgs(t *testing.T) { lastMatureTotalOfResNode1, slashingAmtSetup, feeCollectorToFeePoolAtBeginBlock, + lastIndividualRewardOfResNode1, + individualRewardOfResNode1Found, ) i++ @@ -425,7 +450,10 @@ func checkResult(t *testing.T, ctx sdk.Context, lastCommunityPool sdk.Coins, lastMatureTotalOfResNode1 sdk.Coins, initialSlashingAmt sdk.Int, - feeCollectorToFeePoolAtBeginBlock sdk.Coin) { + feeCollectorToFeePoolAtBeginBlock sdk.Coins, + individualRewardOfResNode1 types.Reward, + individualRewardOfResNode1Found bool, +) { // print individual reward individualRewardTotal := sdk.Coins{} @@ -460,9 +488,9 @@ func checkResult(t *testing.T, ctx sdk.Context, t.Log("resource node 1 immatureTotal = " + immatureTotal.String()) // distribution module will send all tokens from "fee_collector" to "distribution" account in the BeginBlocker() method - feeCollectorValChange := bankKeeper.GetAllBalances(ctx, feeCollectorAccAddr) - t.Log("reward for validator send to fee_collector = " + feeCollectorValChange.String()) - communityTaxChange := newCommunityPool.Sub(lastCommunityPool).Sub(sdk.NewCoins(feeCollectorToFeePoolAtBeginBlock)) + t.Log("reward for validator send to fee_collector = " + feeCollectorToFeePoolAtBeginBlock.String()) + stakeRewardFromFeeCollectorToFeePool := sdk.NewCoin(k.BondDenom(ctx), feeCollectorToFeePoolAtBeginBlock.AmountOf(k.BondDenom(ctx))) + communityTaxChange := newCommunityPool.Sub(lastCommunityPool).Sub(sdk.NewCoins(stakeRewardFromFeeCollectorToFeePool)) t.Log("community tax change in community_pool = " + communityTaxChange.String()) t.Log("community_pool amount of wei = " + newCommunityPool.String()) @@ -470,9 +498,10 @@ func checkResult(t *testing.T, ctx sdk.Context, Sub(newFoundationAccBalance). Add(lastUnissuedPrepay). Sub(newUnissuedPrepay) + t.Log("rewardSrcChange = " + rewardSrcChange.String()) - rewardDestChange := feeCollectorValChange. + rewardDestChange := feeCollectorToFeePoolAtBeginBlock. Add(individualRewardTotal...). Add(communityTaxChange...) @@ -484,9 +513,9 @@ func checkResult(t *testing.T, ctx sdk.Context, t.Log("slashing change = " + slashingDeducted.String()) upcomingMaturedIndividual := sdk.Coins{} - individualReward, found := k.GetIndividualReward(ctx, resOwner1, currentEpoch) - if found { - tmp := individualReward.RewardFromTrafficPool.Add(individualReward.RewardFromMiningPool...) + + if individualRewardOfResNode1Found { + tmp := individualRewardOfResNode1.RewardFromTrafficPool.Add(individualRewardOfResNode1.RewardFromMiningPool...) upcomingMaturedIndividual = deductSlashingAmt(ctx, tmp, slashingDeducted) } t.Log("upcomingMaturedIndividual = " + upcomingMaturedIndividual.String()) @@ -529,13 +558,13 @@ func setupAccounts() ([]authtypes.GenesisAccount, []banktypes.Balance) { resOwnerAcc4 := &authtypes.BaseAccount{Address: resOwner4.String()} resOwnerAcc5 := &authtypes.BaseAccount{Address: resOwner5.String()} //************************** setup indexing nodes owners' accounts ************************** - idxOwnerAcc1 := &authtypes.BaseAccount{Address: idxOwner1.String()} - idxOwnerAcc2 := &authtypes.BaseAccount{Address: idxOwner2.String()} - idxOwnerAcc3 := &authtypes.BaseAccount{Address: idxOwner3.String()} + idxOwnerAcc1 := &authtypes.BaseAccount{Address: metaOwner1.String()} + idxOwnerAcc2 := &authtypes.BaseAccount{Address: metaOwner2.String()} + idxOwnerAcc3 := &authtypes.BaseAccount{Address: metaOwner3.String()} //************************** setup validator delegators' accounts ************************** valOwnerAcc1 := &authtypes.BaseAccount{Address: valOpAccAddr1.String()} - //************************** setup indexing nodes' accounts ************************** - idxNodeAcc1 := &authtypes.BaseAccount{Address: idxNodeAddr1.String()} + ////************************** setup indexing nodes' accounts ************************** + //idxNodeAcc1 := &authtypes.BaseAccount{Address: idxNodeAddr1.String()} foundationDepositorAcc := &authtypes.BaseAccount{Address: foundationDepositorAccAddr.String()} accs := []authtypes.GenesisAccount{ @@ -543,50 +572,50 @@ func setupAccounts() ([]authtypes.GenesisAccount, []banktypes.Balance) { idxOwnerAcc1, idxOwnerAcc2, idxOwnerAcc3, valOwnerAcc1, foundationDepositorAcc, - idxNodeAcc1, + //idxNodeAcc1, } balances := []banktypes.Balance{ { Address: resOwner1.String(), - Coins: sdk.Coins{stratos.NewCoin(resNodeInitialStake1.Add(depositForSendingTx))}, + Coins: sdk.Coins{stratos.NewCoin(initBalance)}, }, { Address: resOwner2.String(), - Coins: sdk.Coins{stratos.NewCoin(resNodeInitialStake2)}, + Coins: sdk.Coins{stratos.NewCoin(initBalance)}, }, { Address: resOwner3.String(), - Coins: sdk.Coins{stratos.NewCoin(resNodeInitialStake3)}, + Coins: sdk.Coins{stratos.NewCoin(initBalance)}, }, { Address: resOwner4.String(), - Coins: sdk.Coins{stratos.NewCoin(resNodeInitialStake4)}, + Coins: sdk.Coins{stratos.NewCoin(initBalance)}, }, { Address: resOwner5.String(), - Coins: sdk.Coins{stratos.NewCoin(resNodeInitialStake5)}, + Coins: sdk.Coins{stratos.NewCoin(initBalance)}, }, { - Address: idxOwner1.String(), - Coins: sdk.Coins{stratos.NewCoin(idxNodeInitialStake1)}, + Address: metaOwner1.String(), + Coins: sdk.Coins{stratos.NewCoin(initBalance)}, }, { - Address: idxOwner2.String(), - Coins: sdk.Coins{stratos.NewCoin(idxNodeInitialStake2)}, + Address: metaOwner2.String(), + Coins: sdk.Coins{stratos.NewCoin(initBalance)}, }, { - Address: idxOwner3.String(), - Coins: sdk.Coins{stratos.NewCoin(idxNodeInitialStake3)}, + Address: metaOwner3.String(), + Coins: sdk.Coins{stratos.NewCoin(initBalance)}, }, { Address: valOpAccAddr1.String(), - Coins: sdk.Coins{stratos.NewCoin(valInitialStake)}, - }, - { - Address: idxNodeAddr1.String(), - Coins: sdk.Coins{stratos.NewCoin(sdk.ZeroInt())}, + Coins: sdk.Coins{stratos.NewCoin(initBalance)}, }, + //{ + // Address: idxNodeAddr1.String(), + // Coins: sdk.Coins{stratos.NewCoin(sdk.ZeroInt())}, + //}, { Address: foundationDepositorAccAddr.String(), Coins: foundationDeposit, @@ -599,17 +628,23 @@ func setupAllResourceNodes() []registertypes.ResourceNode { time, _ := time.Parse(time.RubyDate, "Fri Sep 24 10:37:13 -0400 2021") nodeType := registertypes.STORAGE - resourceNode1, _ := registertypes.NewResourceNode(resNodeNetworkId1, resNodePubKey1, resOwner1, registertypes.NewDescription("sds://resourceNode1", "", "", "", ""), nodeType, time) - resourceNode2, _ := registertypes.NewResourceNode(resNodeNetworkId2, resNodePubKey2, resOwner2, registertypes.NewDescription("sds://resourceNode2", "", "", "", ""), nodeType, time) - resourceNode3, _ := registertypes.NewResourceNode(resNodeNetworkId3, resNodePubKey3, resOwner3, registertypes.NewDescription("sds://resourceNode3", "", "", "", ""), nodeType, time) - resourceNode4, _ := registertypes.NewResourceNode(resNodeNetworkId4, resNodePubKey4, resOwner4, registertypes.NewDescription("sds://resourceNode4", "", "", "", ""), nodeType, time) - resourceNode5, _ := registertypes.NewResourceNode(resNodeNetworkId5, resNodePubKey5, resOwner5, registertypes.NewDescription("sds://resourceNode5", "", "", "", ""), nodeType, time) - - resourceNode1 = resourceNode1.AddToken(resNodeInitialStake1) - resourceNode2 = resourceNode2.AddToken(resNodeInitialStake2) - resourceNode3 = resourceNode3.AddToken(resNodeInitialStake3) - resourceNode4 = resourceNode4.AddToken(resNodeInitialStake4) - resourceNode5 = resourceNode5.AddToken(resNodeInitialStake5) + resourceNode1, _ := registertypes.NewResourceNode(resNodeP2PAddr1, resNodeP2PPubKey1, resOwner1, registertypes.NewDescription("resourceNode1", "", "", "", ""), nodeType, time) + resourceNode2, _ := registertypes.NewResourceNode(resNodeP2PAddr2, resNodeP2PPubKey2, resOwner2, registertypes.NewDescription("resourceNode2", "", "", "", ""), nodeType, time) + resourceNode3, _ := registertypes.NewResourceNode(resNodeP2PAddr3, resNodeP2PPubKey3, resOwner3, registertypes.NewDescription("resourceNode3", "", "", "", ""), nodeType, time) + resourceNode4, _ := registertypes.NewResourceNode(resNodeP2PAddr4, resNodeP2PPubKey4, resOwner4, registertypes.NewDescription("resourceNode4", "", "", "", ""), nodeType, time) + resourceNode5, _ := registertypes.NewResourceNode(resNodeP2PAddr5, resNodeP2PPubKey5, resOwner5, registertypes.NewDescription("resourceNode5", "", "", "", ""), nodeType, time) + + resourceNode1 = resourceNode1.AddToken(nodeInitialStake) + resourceNode2 = resourceNode2.AddToken(nodeInitialStake) + resourceNode3 = resourceNode3.AddToken(nodeInitialStake) + resourceNode4 = resourceNode4.AddToken(nodeInitialStake) + resourceNode5 = resourceNode5.AddToken(nodeInitialStake) + + resourceNode1.EffectiveTokens = nodeInitialStake + resourceNode2.EffectiveTokens = nodeInitialStake + resourceNode3.EffectiveTokens = nodeInitialStake + resourceNode4.EffectiveTokens = nodeInitialStake + resourceNode5.EffectiveTokens = nodeInitialStake resourceNode1.Status = stakingtypes.Bonded resourceNode2.Status = stakingtypes.Bonded @@ -617,6 +652,12 @@ func setupAllResourceNodes() []registertypes.ResourceNode { resourceNode4.Status = stakingtypes.Bonded resourceNode5.Status = stakingtypes.Bonded + resourceNode1.Suspend = false + resourceNode2.Suspend = false + resourceNode3.Suspend = false + resourceNode4.Suspend = false + resourceNode5.Suspend = false + var resourceNodes []registertypes.ResourceNode resourceNodes = append(resourceNodes, resourceNode1) resourceNodes = append(resourceNodes, resourceNode2) @@ -630,18 +671,22 @@ func setupAllMetaNodes() []registertypes.MetaNode { var indexingNodes []registertypes.MetaNode time, _ := time.Parse(time.RubyDate, "Fri Sep 24 10:37:13 -0400 2021") - indexingNode1, _ := registertypes.NewMetaNode(stratos.SdsAddress(idxNodeAddr1), idxNodePubKey1, idxOwner1, registertypes.NewDescription("sds://indexingNode1", "", "", "", ""), time) - indexingNode2, _ := registertypes.NewMetaNode(stratos.SdsAddress(idxNodeAddr2), idxNodePubKey2, idxOwner2, registertypes.NewDescription("sds://indexingNode2", "", "", "", ""), time) - indexingNode3, _ := registertypes.NewMetaNode(stratos.SdsAddress(idxNodeAddr3), idxNodePubKey3, idxOwner3, registertypes.NewDescription("sds://indexingNode3", "", "", "", ""), time) + indexingNode1, _ := registertypes.NewMetaNode(metaNodeP2PAddr1, metaNodeP2PPubKey1, metaOwner1, registertypes.NewDescription("indexingNode1", "", "", "", ""), time) + indexingNode2, _ := registertypes.NewMetaNode(metaNodeP2PAddr2, metaNodeP2PPubKey2, metaOwner2, registertypes.NewDescription("indexingNode2", "", "", "", ""), time) + indexingNode3, _ := registertypes.NewMetaNode(metaNodeP2PAddr3, metaNodeP2PPubKey3, metaOwner3, registertypes.NewDescription("indexingNode3", "", "", "", ""), time) - indexingNode1 = indexingNode1.AddToken(idxNodeInitialStake1) - indexingNode2 = indexingNode2.AddToken(idxNodeInitialStake2) - indexingNode3 = indexingNode3.AddToken(idxNodeInitialStake3) + indexingNode1 = indexingNode1.AddToken(nodeInitialStake) + indexingNode2 = indexingNode2.AddToken(nodeInitialStake) + indexingNode3 = indexingNode3.AddToken(nodeInitialStake) indexingNode1.Status = stakingtypes.Bonded indexingNode2.Status = stakingtypes.Bonded indexingNode3.Status = stakingtypes.Bonded + indexingNode1.Suspend = false + indexingNode2.Suspend = false + indexingNode3.Suspend = false + indexingNodes = append(indexingNodes, indexingNode1) indexingNodes = append(indexingNodes, indexingNode2) indexingNodes = append(indexingNodes, indexingNode3) diff --git a/x/pot/genesis.go b/x/pot/genesis.go index d8040c0d..aa7500aa 100644 --- a/x/pot/genesis.go +++ b/x/pot/genesis.go @@ -9,10 +9,9 @@ import ( // InitGenesis initialize default parameters // and the keeper's address to pubkey map func InitGenesis(ctx sdk.Context, keeper keeper.Keeper, data *types.GenesisState) { - keeper.SetParams(ctx, *data.Params) - //keeper.SetTotalMinedTokens(ctx, *data.TotalMinedToken) + keeper.SetParams(ctx, data.Params) keeper.SetTotalMinedTokens(ctx, sdk.NewCoin(keeper.RewardDenom(ctx), sdk.NewInt(0))) - keeper.SetLastReportedEpoch(ctx, sdk.NewInt(data.LastReportedEpoch)) + keeper.SetLastDistributedEpoch(ctx, data.LastDistributedEpoch) for _, immatureTotal := range data.ImmatureTotalInfo { walletAddr, err := sdk.AccAddressFromBech32(immatureTotal.WalletAddress) @@ -35,9 +34,13 @@ func InitGenesis(ctx sdk.Context, keeper keeper.Keeper, data *types.GenesisState if err != nil { panic("invliad wallet address when init genesis of PoT module") } - keeper.SetIndividualReward(ctx, walletAddr, sdk.NewInt(data.LastReportedEpoch+data.Params.MatureEpoch), *individual) + keeper.SetIndividualReward(ctx, walletAddr, data.LastDistributedEpoch.Add(sdk.NewInt(data.Params.MatureEpoch)), individual) } + keeper.SetUnDistributedReport(ctx, data.UndistributedReport) + keeper.SetUnDistributedEpoch(ctx, data.UndistributedEpoch) + keeper.SetIsReadyToDistribute(ctx, data.IsReadyToDistribute) + keeper.SetMaturedEpoch(ctx, data.MaturedEpoch) } // ExportGenesis writes the current store values @@ -46,33 +49,51 @@ func InitGenesis(ctx sdk.Context, keeper keeper.Keeper, data *types.GenesisState func ExportGenesis(ctx sdk.Context, keeper keeper.Keeper) (data *types.GenesisState) { params := keeper.GetParams(ctx) totalMinedToken := keeper.GetTotalMinedTokens(ctx) - lastReportedEpoch := keeper.GetLastReportedEpoch(ctx) + lastDistributedEpoch := keeper.GetLastDistributedEpoch(ctx) - var individualRewardInfo []*types.Reward - var immatureTotalInfo []*types.ImmatureTotal + var individualRewardInfo []types.Reward + var immatureTotalInfo []types.ImmatureTotal keeper.IteratorImmatureTotal(ctx, func(walletAddress sdk.AccAddress, reward sdk.Coins) (stop bool) { if !reward.Empty() && !reward.IsZero() { immatureTotal := types.NewImmatureTotal(walletAddress, reward) - immatureTotalInfo = append(immatureTotalInfo, &immatureTotal) + immatureTotalInfo = append(immatureTotalInfo, immatureTotal) miningReward := sdk.NewCoins(sdk.NewCoin(types.DefaultRewardDenom, reward.AmountOf(types.DefaultRewardDenom))) trafficReward := sdk.NewCoins(sdk.NewCoin(types.DefaultBondDenom, reward.AmountOf(types.DefaultBondDenom))) individualReward := types.NewReward(walletAddress, miningReward, trafficReward) - individualRewardInfo = append(individualRewardInfo, &individualReward) + individualRewardInfo = append(individualRewardInfo, individualReward) } return false }) - var matureTotalInfo []*types.MatureTotal + var matureTotalInfo []types.MatureTotal keeper.IteratorMatureTotal(ctx, func(walletAddress sdk.AccAddress, reward sdk.Coins) (stop bool) { if !reward.Empty() && !reward.IsZero() { matureTotal := types.NewMatureTotal(walletAddress, reward) - matureTotalInfo = append(matureTotalInfo, &matureTotal) + matureTotalInfo = append(matureTotalInfo, matureTotal) } return false }) - return types.NewGenesisState(params, totalMinedToken, lastReportedEpoch.Int64(), - immatureTotalInfo, matureTotalInfo, individualRewardInfo) + unDistributedReport, found := keeper.GetUnDistributedReport(ctx) + if !found { + unDistributedReport = types.WalletVolumes{} + } + unDistributedEpoch := keeper.GetUnDistributedEpoch(ctx) + isReadyToDistribute := keeper.GetIsReadyToDistribute(ctx) + + maturedEpoch := keeper.GetMaturedEpoch(ctx) + + return types.NewGenesisState( + params, + totalMinedToken, + lastDistributedEpoch, + immatureTotalInfo, + matureTotalInfo, + individualRewardInfo, + unDistributedReport, + unDistributedEpoch, + isReadyToDistribute, + maturedEpoch) } diff --git a/x/pot/keeper/distribute.go b/x/pot/keeper/distribute.go index f6fd7104..8ce53d5e 100644 --- a/x/pot/keeper/distribute.go +++ b/x/pot/keeper/distribute.go @@ -21,28 +21,27 @@ var ( rewardDetailMap map[string]types.Reward ) -func (k Keeper) DistributePotReward(ctx sdk.Context, trafficList []types.SingleWalletVolume, epoch sdk.Int) ( - totalConsumedNoz sdk.Dec, err error) { +func (k Keeper) DistributePotReward(ctx sdk.Context, trafficList []types.SingleWalletVolume, epoch sdk.Int) (err error) { k.InitVariable(ctx) //1, calc traffic reward in total - totalConsumedNoz = k.GetTotalConsumedNoz(trafficList).ToDec() + totalConsumedNoz := k.GetTotalConsumedNoz(trafficList).ToDec() remaining, total := k.registerKeeper.NozSupply(ctx) if totalConsumedNoz.Add(remaining.ToDec()).GT(total.ToDec()) { - return totalConsumedNoz, errors.New("remaining+consumed Noz exceeds total Noz supply") + return errors.New("remaining+consumed Noz exceeds total Noz supply") } distributeGoal, err = k.CalcTrafficRewardInTotal(ctx, distributeGoal, totalConsumedNoz) if err != nil { - return totalConsumedNoz, err + return err } unissuedPrepayToFeeCollector = distributeGoal.StakeTrafficRewardToValidator //2, calc mining reward in total distributeGoal, err = k.CalcMiningRewardInTotal(ctx, distributeGoal) if err != nil && err != types.ErrOutOfIssuance { - return totalConsumedNoz, err + return err } foundationToFeeCollector = distributeGoal.StakeMiningRewardToValidator @@ -58,26 +57,20 @@ func (k Keeper) DistributePotReward(ctx sdk.Context, trafficList []types.SingleW //6, record all rewards to resource & meta nodes err = k.saveRewardInfo(ctx, rewardDetailList, epoch) if err != nil { - return totalConsumedNoz, err + return err } - //7, mature rewards for all nodes - totalSlashed := k.rewardMatureAndSubSlashing(ctx, epoch) - - //8, save reported epoch - k.SetLastReportedEpoch(ctx, epoch) - - //9, update remaining ozone limit + //7, update remaining ozone limit remainingNozLimit := k.registerKeeper.GetRemainingOzoneLimit(ctx) k.registerKeeper.SetRemainingOzoneLimit(ctx, remainingNozLimit.Add(totalConsumedNoz.TruncateInt())) - //10, [TLC] transfer balance of miningReward&trafficReward pools to totalReward&totalSlashed pool, utilized for future Withdraw Tx - err = k.transferTokens(ctx, totalSlashed) + //8, [TLC] transfer balance of miningReward&trafficReward pools to totalReward&totalSlashed pool, utilized for future Withdraw Tx + err = k.transferTokensForDistribution(ctx) if err != nil { - return totalConsumedNoz, err + return err } - return totalConsumedNoz, nil + return nil } func (k Keeper) CalcTrafficRewardInTotal( @@ -184,6 +177,7 @@ func (k Keeper) saveRewardInfo(ctx sdk.Context, rewardDetailList []types.Reward, oldTotalMinedToken := k.GetTotalMinedTokens(ctx) newTotalMinedToken := oldTotalMinedToken.Add(newMinedTotal) k.SetTotalMinedTokens(ctx, newTotalMinedToken) + k.SetLastDistributedEpoch(ctx, currentEpoch) return nil } @@ -196,37 +190,6 @@ func (k Keeper) addNewIndividualAndUpdateImmatureTotal(ctx sdk.Context, account k.SetImmatureTotalReward(ctx, account, newImmatureTotal) } -// Iteration for mature rewards/slashing of all nodes -func (k Keeper) rewardMatureAndSubSlashing(ctx sdk.Context, currentEpoch sdk.Int) (totalSlashed sdk.Coins) { - lastReportedEpoch := k.GetLastReportedEpoch(ctx) - matureStartEpochOffset := int64(1) - matureEndEpochOffset := currentEpoch.Sub(lastReportedEpoch).Int64() - - totalSlashed = sdk.Coins{} - - for i := matureStartEpochOffset; i <= matureEndEpochOffset; i++ { - processingEpoch := sdk.NewInt(i).Add(lastReportedEpoch) - - k.IteratorIndividualReward(ctx, processingEpoch, func(walletAddress sdk.AccAddress, individualReward types.Reward) (stop bool) { - oldMatureTotal := k.GetMatureTotalReward(ctx, walletAddress) - oldImmatureTotal := k.GetImmatureTotalReward(ctx, walletAddress) - immatureToMature := individualReward.RewardFromMiningPool.Add(individualReward.RewardFromTrafficPool...) - - //deduct slashing amount from upcoming mature reward, don't need to deduct slashing from immatureTotal & individual - remaining, deducted := k.registerKeeper.DeductSlashing(ctx, walletAddress, immatureToMature, k.RewardDenom(ctx)) - totalSlashed = totalSlashed.Add(deducted...) - - matureTotal := oldMatureTotal.Add(remaining...) - immatureTotal := oldImmatureTotal.Sub(immatureToMature) - - k.SetMatureTotalReward(ctx, walletAddress, matureTotal) - k.SetImmatureTotalReward(ctx, walletAddress, immatureTotal) - return false - }) - } - return totalSlashed -} - // reward will mature 14 days since distribution. Each epoch interval is about 10 minutes. func (k Keeper) getMatureEpochByCurrentEpoch(ctx sdk.Context, currentEpoch sdk.Int) (matureEpoch sdk.Int) { // 14 days = 20160 minutes = 2016 epochs @@ -443,12 +406,14 @@ func (k Keeper) splitRewardByStake(ctx sdk.Context, totalReward sdk.Int, return } -func (k Keeper) transferTokens(ctx sdk.Context, totalSlashed sdk.Coins) error { +func (k Keeper) transferTokensForDistribution(ctx sdk.Context) error { + // [TLC] [FoundationAccount -> feeCollectorPool] Transfer mining reward to fee_pool for validators err := k.bankKeeper.SendCoinsFromModuleToModule(ctx, types.FoundationAccount, k.feeCollectorName, sdk.NewCoins(foundationToFeeCollector)) if err != nil { return err } + // [TLC] [TotalUnissuedPrepay -> feeCollectorPool] Transfer traffic reward to fee_pool for validators err = k.bankKeeper.SendCoinsFromModuleToModule(ctx, regtypes.TotalUnissuedPrepay, k.feeCollectorName, sdk.NewCoins(unissuedPrepayToFeeCollector)) if err != nil { @@ -467,13 +432,6 @@ func (k Keeper) transferTokens(ctx sdk.Context, totalSlashed sdk.Coins) error { return err } - // [TLC] [TotalRewardPool -> Distribution] Transfer slashed reward to FeePool.CommunityPool - totalRewardPoolAccAddr := k.accountKeeper.GetModuleAddress(types.TotalRewardPool) - err = k.distrKeeper.FundCommunityPool(ctx, totalSlashed, totalRewardPoolAccAddr) - if err != nil { - return err - } - // [TLC] [TotalUnissuedPrepay -> Distribution] Transfer tax to FeePool.CommunityPool taxCoins := sdk.NewCoins(sdk.NewCoin(k.BondDenom(ctx), unissuedPrepayToCommunityPool.TruncateInt())) prepayAccAddr := k.accountKeeper.GetModuleAddress(regtypes.TotalUnissuedPrepay) diff --git a/x/pot/keeper/keeper.go b/x/pot/keeper/keeper.go index 9e8cd6b7..21cb18de 100644 --- a/x/pot/keeper/keeper.go +++ b/x/pot/keeper/keeper.go @@ -55,7 +55,7 @@ func (k Keeper) VolumeReport(ctx sdk.Context, walletVolumes types.WalletVolumes, epoch sdk.Int, reportReference string, txHash string) (err error) { // tx fail when unhandled epoch > 0 - if k.GetUnhandledEpoch(ctx).GT(sdk.ZeroInt()) { + if k.GetUnDistributedEpoch(ctx).GT(sdk.ZeroInt()) { return types.ErrRewardDistributionNotComplete } @@ -64,9 +64,9 @@ func (k Keeper) VolumeReport(ctx sdk.Context, walletVolumes types.WalletVolumes, k.SetVolumeReport(ctx, epoch, reportRecord) // save for reward distribution in the EndBlock at height + 1 - k.SetIsReadyToDistributeReward(ctx, false) - k.SetUnhandledEpoch(ctx, epoch) - k.SetUnhandledReport(ctx, walletVolumes) + k.SetIsReadyToDistribute(ctx, false) + k.SetUnDistributedEpoch(ctx, epoch) + k.SetUnDistributedReport(ctx, walletVolumes) return nil } diff --git a/x/pot/keeper/mature.go b/x/pot/keeper/mature.go new file mode 100644 index 00000000..f4a97a26 --- /dev/null +++ b/x/pot/keeper/mature.go @@ -0,0 +1,98 @@ +package keeper + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/stratosnet/stratos-chain/x/pot/types" +) + +const ( + MatureCountPerBlock = 100 +) + +// RewardMatureAndSubSlashing mature rewards and deduct slashing for all nodes +func (k Keeper) RewardMatureAndSubSlashing(ctx sdk.Context) error { + lastDistributedEpoch := k.GetLastDistributedEpoch(ctx) + maturedEpoch := k.GetMaturedEpoch(ctx) + // The first batch of reward is matured from the value of mature_epoch(param) + 1 + if maturedEpoch.IsZero() { + maturedEpoch = sdk.NewInt(k.MatureEpoch(ctx)) + k.SetMaturedEpoch(ctx, maturedEpoch) + } + + if lastDistributedEpoch.LTE(maturedEpoch) { + return nil + } + + maturedIndividualKeys := make([][]byte, 0) + + matureStartEpochOffset := int64(1) + matureEndEpochOffset := lastDistributedEpoch.Sub(maturedEpoch).Int64() + + processCount := 1 + for i := matureStartEpochOffset; i <= matureEndEpochOffset; i++ { + processingEpoch := sdk.NewInt(i).Add(maturedEpoch) + totalSlashed := sdk.Coins{} + + isBreak := true + k.IteratorIndividualReward(ctx, processingEpoch, func(walletAddress sdk.AccAddress, individualReward types.Reward) (stop bool) { + + // Stop iteration when executed wallet reaches MatureCountPerBlock && no new volume report is received + if processCount > MatureCountPerBlock && + lastDistributedEpoch.Equal(processingEpoch) { + isBreak = true + return true + } + + // Mature reward + oldMatureTotal := k.GetMatureTotalReward(ctx, walletAddress) + oldImmatureTotal := k.GetImmatureTotalReward(ctx, walletAddress) + immatureToMature := individualReward.RewardFromMiningPool.Add(individualReward.RewardFromTrafficPool...) + + // Deduct slashing amount from upcoming mature reward, don't need to deduct slashing from immatureTotal & individual + remaining, deducted := k.registerKeeper.DeductSlashing(ctx, walletAddress, immatureToMature, k.RewardDenom(ctx)) + totalSlashed = totalSlashed.Add(deducted...) + + matureTotal := oldMatureTotal.Add(remaining...) + immatureTotal := oldImmatureTotal.Sub(immatureToMature) + + processCount++ + + k.SetMatureTotalReward(ctx, walletAddress, matureTotal) + k.SetImmatureTotalReward(ctx, walletAddress, immatureTotal) + maturedIndividualKeys = append(maturedIndividualKeys, types.GetIndividualRewardKey(walletAddress, processingEpoch)) + isBreak = false + return false + }) + + // transfer deducted slashing amount + err := k.transferTokensForMatureReward(ctx, totalSlashed) + if err != nil { + return err + } + + // when isBreak == false, means reward mature for processingEpoch is completed, update MaturedEpoch + if !isBreak { + k.SetMaturedEpoch(ctx, processingEpoch) + } + } + + // remove matured individual reward records + for _, key := range maturedIndividualKeys { + k.RemoveIndividualReward(ctx, key) + } + + return nil +} + +func (k Keeper) transferTokensForMatureReward(ctx sdk.Context, totalSlashed sdk.Coins) error { + + // [TLC] [TotalRewardPool -> Distribution] Transfer slashed reward to FeePool.CommunityPool + totalRewardPoolAccAddr := k.accountKeeper.GetModuleAddress(types.TotalRewardPool) + err := k.distrKeeper.FundCommunityPool(ctx, totalSlashed, totalRewardPoolAccAddr) + if err != nil { + return err + } + + return nil +} diff --git a/x/pot/keeper/msg_server.go b/x/pot/keeper/msg_server.go index 6d394014..6aadae68 100644 --- a/x/pot/keeper/msg_server.go +++ b/x/pot/keeper/msg_server.go @@ -52,17 +52,17 @@ func (k msgServer) HandleMsgVolumeReport(goCtx context.Context, msg *types.MsgVo if !ok { return &types.MsgVolumeReportResponse{}, types.ErrInvalid } - lastEpoch := k.GetLastReportedEpoch(ctx) - if msg.Epoch.LTE(lastEpoch) { + lastDistributedEpoch := k.GetLastDistributedEpoch(ctx) + if msg.Epoch.LTE(lastDistributedEpoch) { e := sdkerrors.Wrapf(types.ErrMatureEpoch, "expected epoch should be greater than %s, got %s", - lastEpoch.String(), msg.Epoch.String()) + lastDistributedEpoch.String(), msg.Epoch.String()) return &types.MsgVolumeReportResponse{}, e } blsSignature := msg.GetBLSSignature() // verify txDataHash - signBytes := msg.GetSignBytes() + signBytes := msg.GetBLSSignBytes() txDataHash := crypto.Keccak256(signBytes) if !bytes.Equal(txDataHash, blsSignature.GetTxData()) { return &types.MsgVolumeReportResponse{}, types.ErrBLSTxDataInvalid diff --git a/x/pot/keeper/params.go b/x/pot/keeper/params.go index 1ef9ba54..6c4b829f 100644 --- a/x/pot/keeper/params.go +++ b/x/pot/keeper/params.go @@ -32,15 +32,15 @@ func (k Keeper) MatureEpoch(ctx sdk.Context) (res int64) { return } -func (k Keeper) MiningRewardParams(ctx sdk.Context) (res []*types.MiningRewardParam) { +func (k Keeper) MiningRewardParams(ctx sdk.Context) (res []types.MiningRewardParam) { k.paramSpace.Get(ctx, types.KeyMiningRewardParams, &res) return } -func (k Keeper) GetMiningRewardParamByMinedToken(ctx sdk.Context, minedToken sdk.Coin) (*types.MiningRewardParam, error) { +func (k Keeper) GetMiningRewardParamByMinedToken(ctx sdk.Context, minedToken sdk.Coin) (types.MiningRewardParam, error) { miningRewardParams := k.MiningRewardParams(ctx) for _, param := range miningRewardParams { - if minedToken.IsGTE(*param.TotalMinedValveStart) && minedToken.IsLT(*param.TotalMinedValveEnd) { + if minedToken.IsGTE(param.TotalMinedValveStart) && minedToken.IsLT(param.TotalMinedValveEnd) { return param, nil } } diff --git a/x/pot/keeper/querier.go b/x/pot/keeper/querier.go index 3b4d66f8..19586d99 100644 --- a/x/pot/keeper/querier.go +++ b/x/pot/keeper/querier.go @@ -55,7 +55,7 @@ func queryVolumeReport(ctx sdk.Context, req abci.RequestQuery, k Keeper, legacyQ if reportRecord.TxHash == "" { e := sdkerrors.Wrapf(types.ErrCannotFindReport, fmt.Sprintf("no volume report found at epoch %d. Current epoch is %s", - epoch, k.GetLastReportedEpoch(ctx).String())) + epoch, k.GetLastDistributedEpoch(ctx).String())) return []byte{}, e } bz, err := codec.MarshalJSONIndent(legacyQuerierCdc, reportRecord) diff --git a/x/pot/keeper/store.go b/x/pot/keeper/store.go index 378df184..f802f623 100644 --- a/x/pot/keeper/store.go +++ b/x/pot/keeper/store.go @@ -15,12 +15,12 @@ import ( func (k Keeper) SetTotalMinedTokens(ctx sdk.Context, totalMinedToken sdk.Coin) { store := ctx.KVStore(k.storeKey) b := k.cdc.MustMarshalLengthPrefixed(&totalMinedToken) - store.Set(types.TotalMinedTokensKey, b) + store.Set(types.TotalMinedTokensKeyPrefix, b) } func (k Keeper) GetTotalMinedTokens(ctx sdk.Context) (totalMinedToken sdk.Coin) { store := ctx.KVStore(k.storeKey) - b := store.Get(types.TotalMinedTokensKey) + b := store.Get(types.TotalMinedTokensKeyPrefix) if b == nil { return sdk.NewCoin(k.RewardDenom(ctx), sdk.ZeroInt()) } @@ -28,15 +28,15 @@ func (k Keeper) GetTotalMinedTokens(ctx sdk.Context) (totalMinedToken sdk.Coin) return } -func (k Keeper) SetLastReportedEpoch(ctx sdk.Context, epoch sdk.Int) { +func (k Keeper) SetLastDistributedEpoch(ctx sdk.Context, epoch sdk.Int) { store := ctx.KVStore(k.storeKey) b := k.cdc.MustMarshalLengthPrefixed(&stratos.Int{Value: &epoch}) - store.Set(types.LastReportedEpochKey, b) + store.Set(types.LastDistributedEpochKeyPrefix, b) } -func (k Keeper) GetLastReportedEpoch(ctx sdk.Context) (epoch sdk.Int) { +func (k Keeper) GetLastDistributedEpoch(ctx sdk.Context) (epoch sdk.Int) { store := ctx.KVStore(k.storeKey) - b := store.Get(types.LastReportedEpochKey) + b := store.Get(types.LastDistributedEpochKeyPrefix) if b == nil { return sdk.ZeroInt() } @@ -46,15 +46,15 @@ func (k Keeper) GetLastReportedEpoch(ctx sdk.Context) (epoch sdk.Int) { return } -func (k Keeper) SetIndividualReward(ctx sdk.Context, walletAddress sdk.AccAddress, epoch sdk.Int, value types.Reward) { +func (k Keeper) SetIndividualReward(ctx sdk.Context, walletAddress sdk.AccAddress, matureEpoch sdk.Int, value types.Reward) { store := ctx.KVStore(k.storeKey) b := k.cdc.MustMarshalLengthPrefixed(&value) - store.Set(types.GetIndividualRewardKey(walletAddress, epoch), b) + store.Set(types.GetIndividualRewardKey(walletAddress, matureEpoch), b) } -func (k Keeper) GetIndividualReward(ctx sdk.Context, walletAddress sdk.AccAddress, epoch sdk.Int) (value types.Reward, found bool) { +func (k Keeper) GetIndividualReward(ctx sdk.Context, walletAddress sdk.AccAddress, matureEpoch sdk.Int) (value types.Reward, found bool) { store := ctx.KVStore(k.storeKey) - b := store.Get(types.GetIndividualRewardKey(walletAddress, epoch)) + b := store.Get(types.GetIndividualRewardKey(walletAddress, matureEpoch)) if b == nil { return value, false } @@ -62,6 +62,11 @@ func (k Keeper) GetIndividualReward(ctx sdk.Context, walletAddress sdk.AccAddres return value, true } +func (k Keeper) RemoveIndividualReward(ctx sdk.Context, individualRewardKey []byte) { + store := ctx.KVStore(k.storeKey) + store.Delete(individualRewardKey) +} + // Iteration for getting individule reward of each owner at a specific epoch func (k Keeper) IteratorIndividualReward(ctx sdk.Context, epoch sdk.Int, handler func(walletAddress sdk.AccAddress, individualReward types.Reward) (stop bool)) { store := ctx.KVStore(k.storeKey) @@ -163,9 +168,9 @@ func (k Keeper) SetVolumeReport(ctx sdk.Context, epoch sdk.Int, reportRecord typ store.Set(storeKey, bz) } -func (k Keeper) GetUnhandledReport(ctx sdk.Context) (volumes types.WalletVolumes, found bool) { +func (k Keeper) GetUnDistributedReport(ctx sdk.Context) (volumes types.WalletVolumes, found bool) { store := ctx.KVStore(k.storeKey) - bz := store.Get(types.UnhandledReportKeyPrefix) + bz := store.Get(types.UnDistributedReportKeyPrefix) if bz == nil { return volumes, false } @@ -178,15 +183,15 @@ func (k Keeper) GetUnhandledReport(ctx sdk.Context) (volumes types.WalletVolumes return } -func (k Keeper) SetUnhandledReport(ctx sdk.Context, volumes types.WalletVolumes) { +func (k Keeper) SetUnDistributedReport(ctx sdk.Context, volumes types.WalletVolumes) { store := ctx.KVStore(k.storeKey) b := k.cdc.MustMarshalLengthPrefixed(&volumes) - store.Set(types.UnhandledReportKeyPrefix, b) + store.Set(types.UnDistributedReportKeyPrefix, b) } -func (k Keeper) GetUnhandledEpoch(ctx sdk.Context) (epoch sdk.Int) { +func (k Keeper) GetUnDistributedEpoch(ctx sdk.Context) (epoch sdk.Int) { store := ctx.KVStore(k.storeKey) - b := store.Get(types.UnhandledEpochKey) + b := store.Get(types.UnDistributedEpochKeyPrefix) if b == nil { return sdk.ZeroInt() } @@ -196,15 +201,15 @@ func (k Keeper) GetUnhandledEpoch(ctx sdk.Context) (epoch sdk.Int) { return } -func (k Keeper) SetUnhandledEpoch(ctx sdk.Context, epoch sdk.Int) { +func (k Keeper) SetUnDistributedEpoch(ctx sdk.Context, epoch sdk.Int) { store := ctx.KVStore(k.storeKey) b := k.cdc.MustMarshalLengthPrefixed(&stratos.Int{Value: &epoch}) - store.Set(types.UnhandledEpochKey, b) + store.Set(types.UnDistributedEpochKeyPrefix, b) } -func (k Keeper) GetIsReadyToDistributeReward(ctx sdk.Context) (isReady bool) { +func (k Keeper) GetIsReadyToDistribute(ctx sdk.Context) (isReady bool) { store := ctx.KVStore(k.storeKey) - b := store.Get(types.IsReadyToDistributeReward) + b := store.Get(types.IsReadyToDistributeKeyPrefix) if b == nil { return false } @@ -214,10 +219,28 @@ func (k Keeper) GetIsReadyToDistributeReward(ctx sdk.Context) (isReady bool) { return } -func (k Keeper) SetIsReadyToDistributeReward(ctx sdk.Context, isReady bool) { +func (k Keeper) SetIsReadyToDistribute(ctx sdk.Context, isReady bool) { store := ctx.KVStore(k.storeKey) b := k.cdc.MustMarshalLengthPrefixed(&gogotypes.BoolValue{Value: isReady}) - store.Set(types.IsReadyToDistributeReward, b) + store.Set(types.IsReadyToDistributeKeyPrefix, b) +} + +func (k Keeper) GetMaturedEpoch(ctx sdk.Context) (epoch sdk.Int) { + store := ctx.KVStore(k.storeKey) + bz := store.Get(types.MaturedEpochKeyPrefix) + if bz == nil { + return sdk.ZeroInt() + } + intValue := stratos.Int{} + k.cdc.MustUnmarshalLengthPrefixed(bz, &intValue) + epoch = *intValue.Value + return +} + +func (k Keeper) SetMaturedEpoch(ctx sdk.Context, epoch sdk.Int) { + store := ctx.KVStore(k.storeKey) + b := k.cdc.MustMarshalLengthPrefixed(&stratos.Int{Value: &epoch}) + store.Set(types.MaturedEpochKeyPrefix, b) } func GetIterator(prefixStore storetypes.KVStore, start []byte, reverse bool) db.Iterator { diff --git a/x/pot/module.go b/x/pot/module.go index 1749c188..eee54925 100644 --- a/x/pot/module.go +++ b/x/pot/module.go @@ -88,7 +88,7 @@ func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncod if err != nil { return err } - return types.ValidateGenesis(data) + return types.ValidateGenesis(&data) } //____________________________________________________________________________ diff --git a/x/pot/types/genesis.go b/x/pot/types/genesis.go index bf642309..0d342e95 100644 --- a/x/pot/types/genesis.go +++ b/x/pot/types/genesis.go @@ -6,17 +6,23 @@ import ( ) // NewGenesisState creates a new GenesisState object -func NewGenesisState(params Params, totalMinedToken sdk.Coin, lastReportedEpoch int64, - immatureTotalInfo []*ImmatureTotal, matureTotalInfo []*MatureTotal, individualRewardInfo []*Reward, +func NewGenesisState(params Params, totalMinedToken sdk.Coin, lastDistributedEpoch sdk.Int, + immatureTotalInfo []ImmatureTotal, matureTotalInfo []MatureTotal, individualRewardInfo []Reward, + undistributedReport WalletVolumes, undistributedEpoch sdk.Int, isReadyToDistribute bool, + maturedEpoch sdk.Int, ) *GenesisState { return &GenesisState{ - Params: ¶ms, - TotalMinedToken: &totalMinedToken, - LastReportedEpoch: lastReportedEpoch, + Params: params, + TotalMinedToken: totalMinedToken, + LastDistributedEpoch: lastDistributedEpoch, ImmatureTotalInfo: immatureTotalInfo, MatureTotalInfo: matureTotalInfo, IndividualRewardInfo: individualRewardInfo, + UndistributedReport: undistributedReport, + UndistributedEpoch: undistributedEpoch, + IsReadyToDistribute: isReadyToDistribute, + MaturedEpoch: maturedEpoch, } } @@ -25,17 +31,21 @@ func DefaultGenesisState() *GenesisState { params := DefaultParams() coin := sdk.NewCoin(DefaultRewardDenom, sdk.ZeroInt()) return &GenesisState{ - Params: ¶ms, - TotalMinedToken: &coin, - LastReportedEpoch: 0, - ImmatureTotalInfo: make([]*ImmatureTotal, 0), - MatureTotalInfo: make([]*MatureTotal, 0), - IndividualRewardInfo: make([]*Reward, 0), + Params: params, + TotalMinedToken: coin, + LastDistributedEpoch: sdk.ZeroInt(), + ImmatureTotalInfo: make([]ImmatureTotal, 0), + MatureTotalInfo: make([]MatureTotal, 0), + IndividualRewardInfo: make([]Reward, 0), + UndistributedReport: WalletVolumes{}, + UndistributedEpoch: sdk.ZeroInt(), + IsReadyToDistribute: false, + MaturedEpoch: sdk.ZeroInt(), } } // ValidateGenesis validates the pot genesis parameters -func ValidateGenesis(data GenesisState) error { +func ValidateGenesis(data *GenesisState) error { return nil } diff --git a/x/pot/types/genesis.pb.go b/x/pot/types/genesis.pb.go index eaafb2e3..a783daad 100644 --- a/x/pot/types/genesis.pb.go +++ b/x/pot/types/genesis.pb.go @@ -27,12 +27,16 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // GenesisState defines the register module's genesis state. type GenesisState struct { - Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty" yaml:"params"` - TotalMinedToken *types.Coin `protobuf:"bytes,2,opt,name=total_mined_token,json=totalMinedToken,proto3" json:"total_mined_token,omitempty" yaml:"total_mined_token"` - LastReportedEpoch int64 `protobuf:"varint,3,opt,name=last_reported_epoch,json=lastReportedEpoch,proto3" json:"last_reported_epoch,omitempty" yaml:"last_reported_epoch"` - ImmatureTotalInfo []*ImmatureTotal `protobuf:"bytes,4,rep,name=immature_total_info,json=immatureTotalInfo,proto3" json:"immature_total_info,omitempty" yaml:"immature_total_info"` - MatureTotalInfo []*MatureTotal `protobuf:"bytes,5,rep,name=mature_total_info,json=matureTotalInfo,proto3" json:"mature_total_info,omitempty" yaml:"mature_total_info"` - IndividualRewardInfo []*Reward `protobuf:"bytes,6,rep,name=individual_reward_info,json=individualRewardInfo,proto3" json:"individual_reward_info,omitempty" yaml:"individual_reward_info"` + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params" yaml:"params"` + TotalMinedToken types.Coin `protobuf:"bytes,2,opt,name=total_mined_token,json=totalMinedToken,proto3" json:"total_mined_token" yaml:"total_mined_token"` + LastDistributedEpoch github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,3,opt,name=last_distributed_epoch,json=lastDistributedEpoch,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"last_distributed_epoch" yaml:"last_distributed_epoch"` + ImmatureTotalInfo []ImmatureTotal `protobuf:"bytes,4,rep,name=immature_total_info,json=immatureTotalInfo,proto3" json:"immature_total_info" yaml:"immature_total_info"` + MatureTotalInfo []MatureTotal `protobuf:"bytes,5,rep,name=mature_total_info,json=matureTotalInfo,proto3" json:"mature_total_info" yaml:"mature_total_info"` + IndividualRewardInfo []Reward `protobuf:"bytes,6,rep,name=individual_reward_info,json=individualRewardInfo,proto3" json:"individual_reward_info" yaml:"individual_reward_info"` + UndistributedReport WalletVolumes `protobuf:"bytes,7,opt,name=undistributed_report,json=undistributedReport,proto3" json:"undistributed_report" yaml:"undistributed_report"` + UndistributedEpoch github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,8,opt,name=undistributed_epoch,json=undistributedEpoch,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"undistributed_epoch" yaml:"undistributed_epoch"` + IsReadyToDistribute bool `protobuf:"varint,9,opt,name=is_ready_to_distribute,json=isReadyToDistribute,proto3" json:"is_ready_to_distribute" yaml:"is_ready_to_distribute"` + MaturedEpoch github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,10,opt,name=matured_epoch,json=maturedEpoch,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"matured_epoch" yaml:"matured_epoch"` } func (m *GenesisState) Reset() { *m = GenesisState{} } @@ -68,48 +72,55 @@ func (m *GenesisState) XXX_DiscardUnknown() { var xxx_messageInfo_GenesisState proto.InternalMessageInfo -func (m *GenesisState) GetParams() *Params { +func (m *GenesisState) GetParams() Params { if m != nil { return m.Params } - return nil + return Params{} } -func (m *GenesisState) GetTotalMinedToken() *types.Coin { +func (m *GenesisState) GetTotalMinedToken() types.Coin { if m != nil { return m.TotalMinedToken } - return nil -} - -func (m *GenesisState) GetLastReportedEpoch() int64 { - if m != nil { - return m.LastReportedEpoch - } - return 0 + return types.Coin{} } -func (m *GenesisState) GetImmatureTotalInfo() []*ImmatureTotal { +func (m *GenesisState) GetImmatureTotalInfo() []ImmatureTotal { if m != nil { return m.ImmatureTotalInfo } return nil } -func (m *GenesisState) GetMatureTotalInfo() []*MatureTotal { +func (m *GenesisState) GetMatureTotalInfo() []MatureTotal { if m != nil { return m.MatureTotalInfo } return nil } -func (m *GenesisState) GetIndividualRewardInfo() []*Reward { +func (m *GenesisState) GetIndividualRewardInfo() []Reward { if m != nil { return m.IndividualRewardInfo } return nil } +func (m *GenesisState) GetUndistributedReport() WalletVolumes { + if m != nil { + return m.UndistributedReport + } + return WalletVolumes{} +} + +func (m *GenesisState) GetIsReadyToDistribute() bool { + if m != nil { + return m.IsReadyToDistribute + } + return false +} + type ImmatureTotal struct { WalletAddress string `protobuf:"bytes,1,opt,name=wallet_address,json=walletAddress,proto3" json:"wallet_address" yaml:"wallet_address"` Value github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=value,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"value"` @@ -223,42 +234,54 @@ func init() { func init() { proto.RegisterFile("stratos/pot/v1/genesis.proto", fileDescriptor_abdde08c2564316a) } var fileDescriptor_abdde08c2564316a = []byte{ - // 546 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x94, 0xc1, 0x6e, 0xd3, 0x30, - 0x18, 0xc7, 0x9b, 0x75, 0xab, 0x84, 0x4b, 0x37, 0x35, 0x1b, 0x53, 0x28, 0x5b, 0x52, 0x72, 0xaa, - 0x84, 0x16, 0xd3, 0x71, 0xe3, 0xb6, 0x20, 0x84, 0x7a, 0x28, 0x42, 0x66, 0x27, 0x2e, 0x91, 0x9b, - 0x78, 0xad, 0xb5, 0xc4, 0x8e, 0x62, 0xb7, 0x63, 0x6f, 0xc1, 0x73, 0xf0, 0x1c, 0x08, 0xed, 0x82, - 0xb4, 0x23, 0xa7, 0x80, 0xda, 0x1b, 0xc7, 0x3e, 0x01, 0x8a, 0x1d, 0x44, 0x9b, 0x56, 0xdc, 0x39, - 0xd5, 0xfd, 0x7f, 0xff, 0xef, 0xff, 0xfb, 0xec, 0xba, 0x06, 0x27, 0x42, 0x66, 0x58, 0x72, 0x01, - 0x53, 0x2e, 0xe1, 0xac, 0x0f, 0xc7, 0x84, 0x11, 0x41, 0x85, 0x97, 0x66, 0x5c, 0x72, 0x73, 0xbf, - 0xac, 0x7a, 0x29, 0x97, 0xde, 0xac, 0xdf, 0x39, 0x1a, 0xf3, 0x31, 0x57, 0x25, 0x58, 0xac, 0xb4, - 0xab, 0x63, 0x87, 0x5c, 0x24, 0x5c, 0xc0, 0x11, 0x16, 0x04, 0xce, 0xfa, 0x23, 0x22, 0x71, 0x1f, - 0x86, 0x9c, 0xb2, 0xb2, 0x6e, 0x55, 0x18, 0x45, 0x98, 0xaa, 0xb8, 0xdf, 0x76, 0xc1, 0xc3, 0x37, - 0x9a, 0xf8, 0x5e, 0x62, 0x49, 0xcc, 0x0b, 0xd0, 0x48, 0x71, 0x86, 0x13, 0x61, 0x19, 0x5d, 0xa3, - 0xd7, 0x3c, 0x3f, 0xf6, 0xd6, 0x27, 0xf0, 0xde, 0xa9, 0xaa, 0xdf, 0x5e, 0xe6, 0x4e, 0xeb, 0x16,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x9c, 0x96, 0x3b, 0xda, 0xda, 0xef, 0xa2, 0xa3, 0xbf, - 0x05, 0xdd, 0x54, 0x00, 0xdd, 0xaf, 0x06, 0x68, 0xad, 0x1d, 0x8e, 0x89, 0xc0, 0xfe, 0x0d, 0x8e, - 0x63, 0x22, 0x03, 0x1c, 0x45, 0x19, 0x11, 0xfa, 0x62, 0x3d, 0xf0, 0x9f, 0xfd, 0xca, 0x9d, 0x4a, - 0x65, 0x99, 0x3b, 0x8f, 0x34, 0x74, 0x5d, 0x77, 0x51, 0x4b, 0x0b, 0x17, 0xfa, 0xbb, 0x89, 0xc1, - 0xde, 0x0c, 0xc7, 0x53, 0x62, 0xed, 0xa8, 0x5d, 0xfc, 0xe3, 0x56, 0x3d, 0xbf, 0xcb, 0x9d, 0xda, - 0xe7, 0x1f, 0x4e, 0x6f, 0x4c, 0xe5, 0x64, 0x3a, 0xf2, 0x42, 0x9e, 0xc0, 0xf2, 0xcf, 0xa2, 0x3f, - 0xce, 0x44, 0x74, 0x0d, 0xe5, 0x6d, 0x4a, 0x84, 0x6a, 0x10, 0x48, 0x27, 0xbb, 0x5f, 0x0c, 0xd0, - 0x1c, 0xfe, 0xf7, 0xdb, 0xf0, 0x07, 0x77, 0x73, 0xdb, 0xb8, 0x9f, 0xdb, 0xc6, 0xcf, 0xb9, 0x6d, - 0x7c, 0x5a, 0xd8, 0xb5, 0xfb, 0x85, 0x5d, 0xfb, 0xbe, 0xb0, 0x6b, 0x1f, 0xe0, 0x4a, 0x54, 0x79, - 0x09, 0x18, 0x91, 0x7f, 0x96, 0x67, 0xe1, 0x04, 0x53, 0x06, 0x3f, 0xaa, 0x17, 0x43, 0xe5, 0x8e, - 0x1a, 0xea, 0xc5, 0x78, 0xf1, 0x3b, 0x00, 0x00, 0xff, 0xff, 0x7f, 0x54, 0xa4, 0x8b, 0xb1, 0x04, - 0x00, 0x00, + // 747 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 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x05, 0x00, + 0x00, 0xff, 0xff, 0xd8, 0xaa, 0xc0, 0x23, 0x95, 0x07, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -281,6 +304,46 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + { + size := m.MaturedEpoch.Size() + i -= size + if _, err := m.MaturedEpoch.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x52 + if m.IsReadyToDistribute { + i-- + if m.IsReadyToDistribute { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x48 + } + { + size := m.UndistributedEpoch.Size() + i -= size + if _, err := m.UndistributedEpoch.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x42 + { + size, err := m.UndistributedReport.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a if len(m.IndividualRewardInfo) > 0 { for iNdEx := len(m.IndividualRewardInfo) - 1; iNdEx >= 0; iNdEx-- { { @@ -323,35 +386,36 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x22 } } - if m.LastReportedEpoch != 0 { - i = encodeVarintGenesis(dAtA, i, uint64(m.LastReportedEpoch)) - i-- - dAtA[i] = 0x18 + { + size := m.LastDistributedEpoch.Size() + i -= size + if _, err := m.LastDistributedEpoch.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintGenesis(dAtA, i, uint64(size)) } - if m.TotalMinedToken != nil { - { - size, err := m.TotalMinedToken.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + { + size, err := m.TotalMinedToken.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x12 + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) } - if m.Params != nil { - { - size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0xa + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0xa return len(dAtA) - i, nil } @@ -460,17 +524,12 @@ func (m *GenesisState) Size() (n int) { } var l int _ = l - if m.Params != nil { - l = m.Params.Size() - n += 1 + l + sovGenesis(uint64(l)) - } - if m.TotalMinedToken != nil { - l = m.TotalMinedToken.Size() - n += 1 + l + sovGenesis(uint64(l)) - } - if m.LastReportedEpoch != 0 { - n += 1 + sovGenesis(uint64(m.LastReportedEpoch)) - } + l = m.Params.Size() + n += 1 + l + sovGenesis(uint64(l)) + l = m.TotalMinedToken.Size() + n += 1 + l + sovGenesis(uint64(l)) + l = m.LastDistributedEpoch.Size() + n += 1 + l + sovGenesis(uint64(l)) if len(m.ImmatureTotalInfo) > 0 { for _, e := range m.ImmatureTotalInfo { l = e.Size() @@ -489,6 +548,15 @@ func (m *GenesisState) Size() (n int) { n += 1 + l + sovGenesis(uint64(l)) } } + l = m.UndistributedReport.Size() + n += 1 + l + sovGenesis(uint64(l)) + l = m.UndistributedEpoch.Size() + n += 1 + l + sovGenesis(uint64(l)) + if m.IsReadyToDistribute { + n += 2 + } + l = m.MaturedEpoch.Size() + n += 1 + l + sovGenesis(uint64(l)) return n } @@ -594,9 +662,6 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Params == nil { - m.Params = &Params{} - } if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -630,18 +695,15 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.TotalMinedToken == nil { - m.TotalMinedToken = &types.Coin{} - } if err := m.TotalMinedToken.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field LastReportedEpoch", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LastDistributedEpoch", wireType) } - m.LastReportedEpoch = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenesis @@ -651,11 +713,26 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.LastReportedEpoch |= int64(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.LastDistributedEpoch.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ImmatureTotalInfo", wireType) @@ -685,7 +762,7 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ImmatureTotalInfo = append(m.ImmatureTotalInfo, &ImmatureTotal{}) + m.ImmatureTotalInfo = append(m.ImmatureTotalInfo, ImmatureTotal{}) if err := m.ImmatureTotalInfo[len(m.ImmatureTotalInfo)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -719,7 +796,7 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.MatureTotalInfo = append(m.MatureTotalInfo, &MatureTotal{}) + m.MatureTotalInfo = append(m.MatureTotalInfo, MatureTotal{}) if err := m.MatureTotalInfo[len(m.MatureTotalInfo)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -753,11 +830,132 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.IndividualRewardInfo = append(m.IndividualRewardInfo, &Reward{}) + m.IndividualRewardInfo = append(m.IndividualRewardInfo, Reward{}) if err := m.IndividualRewardInfo[len(m.IndividualRewardInfo)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UndistributedReport", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.UndistributedReport.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UndistributedEpoch", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + 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 ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.UndistributedEpoch.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsReadyToDistribute", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsReadyToDistribute = bool(v != 0) + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MaturedEpoch", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + 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 ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MaturedEpoch.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenesis(dAtA[iNdEx:]) diff --git a/x/pot/types/key.go b/x/pot/types/key.go index 672aa783..b4272a92 100644 --- a/x/pot/types/key.go +++ b/x/pot/types/key.go @@ -19,16 +19,16 @@ const ( ) var ( - TotalMinedTokensKey = []byte{0x01} - LastReportedEpochKey = []byte{0x02} - IndividualRewardKeyPrefix = []byte{0x03} // key: prefix{address}_{epoch}, the amount that is matured at {epoch} - MatureTotalRewardKeyPrefix = []byte{0x04} // key: prefix{address} - ImmatureTotalRewardKeyPrefix = []byte{0x05} // key: prefix{address} - VolumeReportStoreKeyPrefix = []byte{0x06} // VolumeReportStoreKeyPrefix prefix for volumeReport store - - UnhandledReportKeyPrefix = []byte{0x11} // prefix for report need to be handled, after reward distribution, clear data - UnhandledEpochKey = []byte{0x12} // prefix for epoch need to be handled, after reward distribution, clear data - IsReadyToDistributeReward = []byte{0x13} + TotalMinedTokensKeyPrefix = []byte{0x01} + LastDistributedEpochKeyPrefix = []byte{0x02} + IndividualRewardKeyPrefix = []byte{0x03} // key: prefix{address}_{epoch}, the amount that is matured at {epoch} + MatureTotalRewardKeyPrefix = []byte{0x04} // key: prefix{address} + ImmatureTotalRewardKeyPrefix = []byte{0x05} // key: prefix{address} + VolumeReportStoreKeyPrefix = []byte{0x06} // VolumeReportStoreKeyPrefix prefix for volumeReport store + UnDistributedReportKeyPrefix = []byte{0x07} // prefix for report need to be handled, after reward distribution, clear data + UnDistributedEpochKeyPrefix = []byte{0x08} // prefix for epoch need to be handled, after reward distribution, clear data + IsReadyToDistributeKeyPrefix = []byte{0x09} + MaturedEpochKeyPrefix = []byte{0x10} ) func VolumeReportStoreKey(epoch sdk.Int) []byte { diff --git a/x/pot/types/msg.go b/x/pot/types/msg.go index 6181bb62..624749e5 100644 --- a/x/pot/types/msg.go +++ b/x/pot/types/msg.go @@ -65,6 +65,12 @@ func (msg MsgVolumeReport) GetSignBytes() []byte { return sdk.MustSortJSON(bz) } +func (msg MsgVolumeReport) GetBLSSignBytes() []byte { + msg.BLSSignature = NewBLSSignatureInfo(nil, nil, nil) + bz := ModuleCdc.MustMarshalJSON(msg) + return sdk.MustSortJSON(bz) +} + // ValidateBasic validity check for the AnteHandler func (msg MsgVolumeReport) ValidateBasic() error { if len(msg.Reporter) == 0 { diff --git a/x/pot/types/params.go b/x/pot/types/params.go index cb8f1f0d..f620d6d4 100644 --- a/x/pot/types/params.go +++ b/x/pot/types/params.go @@ -36,7 +36,7 @@ func ParamKeyTable() paramtypes.KeyTable { } // NewParams creates a new Params object -func NewParams(bondDenom string, rewardDenom string, matureEpoch int64, miningRewardParams []*MiningRewardParam, communityTax sdk.Dec) Params { +func NewParams(bondDenom string, rewardDenom string, matureEpoch int64, miningRewardParams []MiningRewardParam, communityTax sdk.Dec) Params { return Params{ BondDenom: bondDenom, RewardDenom: rewardDenom, @@ -48,7 +48,7 @@ func NewParams(bondDenom string, rewardDenom string, matureEpoch int64, miningRe // DefaultParams returns the default distribution parameters func DefaultParams() Params { - var miningRewardParams []*MiningRewardParam + var miningRewardParams []MiningRewardParam miningRewardParams = append(miningRewardParams, NewMiningRewardParam( sdk.NewCoin(DefaultRewardDenom, sdk.NewInt(0)), sdk.NewCoin(DefaultRewardDenom, sdk.NewInt(16819200000000000)), @@ -155,7 +155,7 @@ func validateMatureEpoch(i interface{}) error { } func validateMiningRewardParams(i interface{}) error { - v, ok := i.([]*MiningRewardParam) + v, ok := i.([]MiningRewardParam) if !ok { return fmt.Errorf("invalid parameter type: %T", i) } diff --git a/x/pot/types/pot.pb.go b/x/pot/types/pot.pb.go index 73698b51..e1afe03d 100644 --- a/x/pot/types/pot.pb.go +++ b/x/pot/types/pot.pb.go @@ -30,7 +30,7 @@ type Params struct { BondDenom string `protobuf:"bytes,1,opt,name=bond_denom,json=bondDenom,proto3" json:"bond_denom" yaml:"bond_denom"` RewardDenom string `protobuf:"bytes,2,opt,name=reward_denom,json=rewardDenom,proto3" json:"reward_denom" yaml:"reward_denom"` MatureEpoch int64 `protobuf:"varint,3,opt,name=mature_epoch,json=matureEpoch,proto3" json:"mature_epoch" yaml:"mature_epoch"` - MiningRewardParams []*MiningRewardParam `protobuf:"bytes,4,rep,name=mining_reward_params,json=miningRewardParams,proto3" json:"mining_reward_params" yaml:"mining_reward_params"` + MiningRewardParams []MiningRewardParam `protobuf:"bytes,4,rep,name=mining_reward_params,json=miningRewardParams,proto3" json:"mining_reward_params" yaml:"mining_reward_params"` CommunityTax github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,5,opt,name=community_tax,json=communityTax,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"community_tax" yaml:"community_tax"` } @@ -88,7 +88,7 @@ func (m *Params) GetMatureEpoch() int64 { return 0 } -func (m *Params) GetMiningRewardParams() []*MiningRewardParam { +func (m *Params) GetMiningRewardParams() []MiningRewardParam { if m != nil { return m.MiningRewardParams } @@ -96,12 +96,12 @@ func (m *Params) GetMiningRewardParams() []*MiningRewardParam { } type MiningRewardParam struct { - TotalMinedValveStart *types.Coin `protobuf:"bytes,1,opt,name=total_mined_valve_start,json=totalMinedValveStart,proto3" json:"total_mined_valve_start,omitempty" yaml:"total_mined_valve_start"` - TotalMinedValveEnd *types.Coin `protobuf:"bytes,2,opt,name=total_mined_valve_end,json=totalMinedValveEnd,proto3" json:"total_mined_valve_end,omitempty" yaml:"total_mined_valve_end"` - MiningReward *types.Coin `protobuf:"bytes,3,opt,name=mining_reward,json=miningReward,proto3" json:"mining_reward,omitempty" yaml:"mining_reward"` - BlockChainPercentageInBp *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,4,opt,name=block_chain_percentage_in_bp,json=blockChainPercentageInBp,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"block_chain_percentage_in_bp" yaml:"block_chain_percentage_in_bp"` - ResourceNodePercentageInBp *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,5,opt,name=resource_node_percentage_in_bp,json=resourceNodePercentageInBp,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"resource_node_percentage_in_bp" yaml:"resource_node_percentage_in_bp"` - MetaNodePercentageInBp *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,6,opt,name=meta_node_percentage_in_bp,json=metaNodePercentageInBp,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"meta_node_percentage_in_bp" yaml:"meta_node_percentage_in_bp"` + TotalMinedValveStart types.Coin `protobuf:"bytes,1,opt,name=total_mined_valve_start,json=totalMinedValveStart,proto3" json:"total_mined_valve_start" yaml:"total_mined_valve_start"` + TotalMinedValveEnd types.Coin `protobuf:"bytes,2,opt,name=total_mined_valve_end,json=totalMinedValveEnd,proto3" json:"total_mined_valve_end" yaml:"total_mined_valve_end"` + MiningReward types.Coin `protobuf:"bytes,3,opt,name=mining_reward,json=miningReward,proto3" json:"mining_reward" yaml:"mining_reward"` + BlockChainPercentageInBp github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,4,opt,name=block_chain_percentage_in_bp,json=blockChainPercentageInBp,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"block_chain_percentage_in_bp" yaml:"block_chain_percentage_in_bp"` + ResourceNodePercentageInBp github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,5,opt,name=resource_node_percentage_in_bp,json=resourceNodePercentageInBp,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"resource_node_percentage_in_bp" yaml:"resource_node_percentage_in_bp"` + MetaNodePercentageInBp github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,6,opt,name=meta_node_percentage_in_bp,json=metaNodePercentageInBp,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"meta_node_percentage_in_bp" yaml:"meta_node_percentage_in_bp"` } func (m *MiningRewardParam) Reset() { *m = MiningRewardParam{} } @@ -137,25 +137,25 @@ func (m *MiningRewardParam) XXX_DiscardUnknown() { var xxx_messageInfo_MiningRewardParam proto.InternalMessageInfo -func (m *MiningRewardParam) GetTotalMinedValveStart() *types.Coin { +func (m *MiningRewardParam) GetTotalMinedValveStart() types.Coin { if m != nil { return m.TotalMinedValveStart } - return nil + return types.Coin{} } -func (m *MiningRewardParam) GetTotalMinedValveEnd() *types.Coin { +func (m *MiningRewardParam) GetTotalMinedValveEnd() types.Coin { if m != nil { return m.TotalMinedValveEnd } - return nil + return types.Coin{} } -func (m *MiningRewardParam) GetMiningReward() *types.Coin { +func (m *MiningRewardParam) GetMiningReward() types.Coin { if m != nil { return m.MiningReward } - return nil + return types.Coin{} } type Reward struct { @@ -379,70 +379,71 @@ func init() { func init() { proto.RegisterFile("stratos/pot/v1/pot.proto", fileDescriptor_a05930b44d981057) } var fileDescriptor_a05930b44d981057 = []byte{ - // 995 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8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f, - 0x93, 0xcb, 0x9d, 0xb7, 0xab, 0x44, 0x1d, 0x34, 0x4e, 0xd4, 0x01, 0x98, 0x34, 0xd5, 0xe1, 0xe7, - 0xb4, 0x38, 0xe8, 0xec, 0x3e, 0x3d, 0x6e, 0x7b, 0xcf, 0x8e, 0xdb, 0xde, 0x9f, 0xc7, 0x6d, 0xef, - 0xbb, 0x93, 0xf6, 0xc2, 0xb3, 0x93, 0xf6, 0xc2, 0x6f, 0x27, 0xed, 0x85, 0x47, 0x41, 0xad, 0x7d, - 0xae, 0xb6, 0x9c, 0xa9, 0xd1, 0xf2, 0x86, 0xb9, 0xe1, 0x83, 0x43, 0xf3, 0x33, 0x68, 0x7a, 0xd9, - 0x6d, 0x9a, 0xdf, 0xb8, 0x0f, 0xfe, 0x0b, 0x00, 0x00, 0xff, 0xff, 0xfd, 0x5f, 0x85, 0xcf, 0x28, - 0x0a, 0x00, 0x00, + // 1013 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xcf, 0x6f, 0x1b, 0x45, + 0x14, 0xce, 0xd6, 0xc5, 0x25, 0x93, 0x1f, 0xa5, 0x43, 0x42, 0x4c, 0x28, 0x9e, 0x64, 0x2a, 0x20, + 0x12, 0x8a, 0x57, 0x29, 0x12, 0x07, 0x2a, 0x0e, 0x75, 0x5b, 0x44, 0x90, 0x8a, 0xa2, 0x69, 0xd5, + 0x4a, 0xbd, 0xac, 0xc6, 0xbb, 0x13, 0x67, 0xd5, 0xdd, 0x99, 0x65, 0x76, 0xec, 0x26, 0x12, 0xff, + 0x01, 0x97, 0x4a, 0xfc, 0x17, 0x48, 0x1c, 0x39, 0x22, 0x0e, 0x5c, 0x2a, 0x21, 0xa1, 0x1e, 0x11, + 0x87, 0x01, 0x25, 0x70, 0xf1, 0x71, 0x25, 0xee, 0x68, 0x67, 0xc6, 0xf1, 0x3a, 0x8e, 0x5d, 0x72, +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0x92, 0x93, 0x7e, 0xf1, 0x5f, 0x35, 0x50, 0x77, 0x2d, 0x43, 0xc0, 0xf2, 0x33, 0x9a, 0x24, 0x4c, + 0x05, 0x34, 0x8a, 0x24, 0xcb, 0x73, 0x37, 0xcc, 0x3f, 0x1c, 0x68, 0x74, 0x86, 0x29, 0x34, 0x5a, + 0xb5, 0x67, 0x8e, 0xe3, 0x98, 0x2c, 0x59, 0xe0, 0xb6, 0x5d, 0xc3, 0x9f, 0x3c, 0xb0, 0xe6, 0x86, + 0xda, 0xbe, 0x14, 0x69, 0xe0, 0x7a, 0x36, 0x13, 0x22, 0x69, 0x5c, 0x32, 0x33, 0x74, 0xc6, 0x1f, + 0x20, 0x1d, 0x4e, 0x86, 0x29, 0x0a, 0xa3, 0xc9, 0x30, 0x25, 0x00, 0x7f, 0xf7, 0x07, 0xda, 0xfa, + 0x0f, 0x77, 0x5c, 0x9e, 0x96, 0x93, 0x15, 0xab, 0xf2, 0x99, 0x14, 0xa9, 0x1d, 0x71, 0x7b, 0x42, + 0x24, 0xf0, 0x67, 0x0f, 0x34, 0xaa, 0xf2, 0x4a, 0xd2, 0xfd, 0xfd, 0x38, 0xb4, 0x29, 0xd4, 0x5e, + 0x95, 0x82, 0x70, 0x29, 0x4c, 0x95, 0x28, 0x34, 0x42, 0x93, 0x39, 0x54, 0x23, 0x2e, 0x96, 0xc4, + 0xea, 0x28, 0x89, 0x87, 0x56, 0xa4, 0xcc, 0x02, 0xff, 0xe2, 0x01, 0xf8, 0x20, 0xe6, 0xdd, 0x84, + 0x3d, 0x36, 0xf5, 0x79, 0x24, 0x92, 0x5e, 0xca, 0xfe, 0x97, 0x92, 0x53, 0x50, 0xef, 0x1b, 0x75, + 0xf7, 0x16, 0xdf, 0xbd, 0x70, 0xb3, 0xbb, 0xfd, 0x85, 0x46, 0x4b, 0xf6, 0x44, 0xbb, 0xc6, 0xc4, + 0x11, 0x38, 0x03, 0x4b, 0xd5, 0x34, 0x72, 0x18, 0x80, 0x2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 0x6b, 0x8b, 0x0a, 0x00, 0x00, } func (m *Params) Marshal() (dAtA []byte, err error) { @@ -531,78 +532,66 @@ func (m *MiningRewardParam) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.MetaNodePercentageInBp != nil { - { - size := m.MetaNodePercentageInBp.Size() - i -= size - if _, err := m.MetaNodePercentageInBp.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintPot(dAtA, i, uint64(size)) + { + size := m.MetaNodePercentageInBp.Size() + i -= size + if _, err := m.MetaNodePercentageInBp.MarshalTo(dAtA[i:]); err != nil { + return 0, err } - i-- - dAtA[i] = 0x32 + i = encodeVarintPot(dAtA, i, uint64(size)) } - if m.ResourceNodePercentageInBp != nil { - { - size := m.ResourceNodePercentageInBp.Size() - i -= size - if _, err := m.ResourceNodePercentageInBp.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintPot(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x32 + { + size := m.ResourceNodePercentageInBp.Size() + i -= size + if _, err := m.ResourceNodePercentageInBp.MarshalTo(dAtA[i:]); err != nil { + return 0, err } - i-- - dAtA[i] = 0x2a + i = encodeVarintPot(dAtA, i, uint64(size)) } - if m.BlockChainPercentageInBp != nil { - { - size := m.BlockChainPercentageInBp.Size() - i -= size - if _, err := m.BlockChainPercentageInBp.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintPot(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x2a + { + size := m.BlockChainPercentageInBp.Size() + i -= size + if _, err := m.BlockChainPercentageInBp.MarshalTo(dAtA[i:]); err != nil { + return 0, err } - i-- - dAtA[i] = 0x22 + i = encodeVarintPot(dAtA, i, uint64(size)) } - if m.MiningReward != nil { - { - size, err := m.MiningReward.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintPot(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x22 + { + size, err := m.MiningReward.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x1a + i -= size + i = encodeVarintPot(dAtA, i, uint64(size)) } - if m.TotalMinedValveEnd != nil { - { - size, err := m.TotalMinedValveEnd.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintPot(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + { + size, err := m.TotalMinedValveEnd.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x12 + i -= size + i = encodeVarintPot(dAtA, i, uint64(size)) } - if m.TotalMinedValveStart != nil { - { - size, err := m.TotalMinedValveStart.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintPot(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + { + size, err := m.TotalMinedValveStart.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0xa + i -= size + i = encodeVarintPot(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0xa return len(dAtA) - i, nil } @@ -830,30 +819,18 @@ func (m *MiningRewardParam) Size() (n int) { } var l int _ = l - if m.TotalMinedValveStart != nil { - l = m.TotalMinedValveStart.Size() - n += 1 + l + sovPot(uint64(l)) - } - if m.TotalMinedValveEnd != nil { - l = m.TotalMinedValveEnd.Size() - n += 1 + l + sovPot(uint64(l)) - } - if m.MiningReward != nil { - l = m.MiningReward.Size() - n += 1 + l + sovPot(uint64(l)) - } - if m.BlockChainPercentageInBp != nil { - l = m.BlockChainPercentageInBp.Size() - n += 1 + l + sovPot(uint64(l)) - } - if m.ResourceNodePercentageInBp != nil { - l = m.ResourceNodePercentageInBp.Size() - n += 1 + l + sovPot(uint64(l)) - } - if m.MetaNodePercentageInBp != nil { - l = m.MetaNodePercentageInBp.Size() - n += 1 + l + sovPot(uint64(l)) - } + l = m.TotalMinedValveStart.Size() + n += 1 + l + sovPot(uint64(l)) + l = m.TotalMinedValveEnd.Size() + n += 1 + l + sovPot(uint64(l)) + l = m.MiningReward.Size() + n += 1 + l + sovPot(uint64(l)) + l = m.BlockChainPercentageInBp.Size() + n += 1 + l + sovPot(uint64(l)) + l = m.ResourceNodePercentageInBp.Size() + n += 1 + l + sovPot(uint64(l)) + l = m.MetaNodePercentageInBp.Size() + n += 1 + l + sovPot(uint64(l)) return n } @@ -1080,7 +1057,7 @@ func (m *Params) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.MiningRewardParams = append(m.MiningRewardParams, &MiningRewardParam{}) + m.MiningRewardParams = append(m.MiningRewardParams, MiningRewardParam{}) if err := m.MiningRewardParams[len(m.MiningRewardParams)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -1198,9 +1175,6 @@ func (m *MiningRewardParam) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.TotalMinedValveStart == nil { - m.TotalMinedValveStart = &types.Coin{} - } if err := m.TotalMinedValveStart.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -1234,9 +1208,6 @@ func (m *MiningRewardParam) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.TotalMinedValveEnd == nil { - m.TotalMinedValveEnd = &types.Coin{} - } if err := m.TotalMinedValveEnd.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -1270,9 +1241,6 @@ func (m *MiningRewardParam) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.MiningReward == nil { - m.MiningReward = &types.Coin{} - } if err := m.MiningReward.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -1307,8 +1275,6 @@ func (m *MiningRewardParam) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_cosmos_cosmos_sdk_types.Int - m.BlockChainPercentageInBp = &v if err := m.BlockChainPercentageInBp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -1343,8 +1309,6 @@ func (m *MiningRewardParam) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_cosmos_cosmos_sdk_types.Int - m.ResourceNodePercentageInBp = &v if err := m.ResourceNodePercentageInBp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -1379,8 +1343,6 @@ func (m *MiningRewardParam) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_cosmos_cosmos_sdk_types.Int - m.MetaNodePercentageInBp = &v if err := m.MetaNodePercentageInBp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } diff --git a/x/pot/types/types.go b/x/pot/types/types.go index 8ae99032..04183be2 100644 --- a/x/pot/types/types.go +++ b/x/pot/types/types.go @@ -17,14 +17,14 @@ func NewSingleWalletVolume( } func NewMiningRewardParam(totalMinedValveStart sdk.Coin, totalMinedValveEnd sdk.Coin, miningReward sdk.Coin, - resourceNodePercentageInBp sdk.Int, metaNodePercentageInBp sdk.Int, blockChainPercentageInBp sdk.Int) *MiningRewardParam { - return &MiningRewardParam{ - TotalMinedValveStart: &totalMinedValveStart, - TotalMinedValveEnd: &totalMinedValveEnd, - MiningReward: &miningReward, - BlockChainPercentageInBp: &blockChainPercentageInBp, - ResourceNodePercentageInBp: &resourceNodePercentageInBp, - MetaNodePercentageInBp: &metaNodePercentageInBp, + resourceNodePercentageInBp sdk.Int, metaNodePercentageInBp sdk.Int, blockChainPercentageInBp sdk.Int) MiningRewardParam { + return MiningRewardParam{ + TotalMinedValveStart: totalMinedValveStart, + TotalMinedValveEnd: totalMinedValveEnd, + MiningReward: miningReward, + BlockChainPercentageInBp: blockChainPercentageInBp, + ResourceNodePercentageInBp: resourceNodePercentageInBp, + MetaNodePercentageInBp: metaNodePercentageInBp, } } From d94f537f827d2a413890e5172b5c2b54360442f0 Mon Sep 17 00:00:00 2001 From: Xiong Date: Thu, 27 Apr 2023 15:19:06 -0400 Subject: [PATCH 63/95] Add query: circulationSupply --- proto/stratos/pot/v1/query.proto | 16 +- x/pot/client/cli/flags.go | 31 -- x/pot/client/cli/query.go | 29 ++ x/pot/client/rest/query.go | 19 ++ x/pot/keeper/grpc_query.go | 7 + x/pot/keeper/keeper.go | 33 +++ x/pot/keeper/querier.go | 11 + x/pot/types/expected_keepers.go | 2 + x/pot/types/querier.go | 1 + x/pot/types/query.pb.go | 467 ++++++++++++++++++++++++++----- x/pot/types/query.pb.gw.go | 62 ++++ 11 files changed, 581 insertions(+), 97 deletions(-) diff --git a/proto/stratos/pot/v1/query.proto b/proto/stratos/pot/v1/query.proto index 4097baa8..4cea8c73 100644 --- a/proto/stratos/pot/v1/query.proto +++ b/proto/stratos/pot/v1/query.proto @@ -39,6 +39,10 @@ service Query { rpc TotalMinedToken(QueryTotalMinedTokenRequest) returns (QueryTotalMinedTokenResponse) { option (google.api.http).get = "/stratos/pot/v1/total-mined-token"; } + + rpc CirculationSupply(QueryCirculationSupplyRequest) returns (QueryCirculationSupplyResponse) { + option (google.api.http).get = "/stratos/pot/v1/circulation-supply"; + } } // QueryVolumeReportRequest is request type for the Query/VolumeReport RPC method @@ -98,11 +102,11 @@ message QueryRewardsByOwnerResponse { message RewardByOwner { string wallet_address = 1; - repeated cosmos.base.v1beta1.Coin MatureTotalReward = 2 [ + repeated cosmos.base.v1beta1.Coin mature_total_reward = 2 [ (gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" ]; - repeated cosmos.base.v1beta1.Coin ImmatureTotalReward = 3 [ + repeated cosmos.base.v1beta1.Coin immature_total_reward = 3 [ (gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" ]; @@ -119,7 +123,6 @@ message QuerySlashingByOwnerResponse { int64 height = 2; } - message QueryTotalMinedTokenRequest{} message QueryTotalMinedTokenResponse{ @@ -130,6 +133,13 @@ message QueryTotalMinedTokenResponse{ ]; } +message QueryCirculationSupplyRequest{} +message QueryCirculationSupplyResponse{ + repeated cosmos.base.v1beta1.Coin circulation_supply = 3 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; +} diff --git a/x/pot/client/cli/flags.go b/x/pot/client/cli/flags.go index d8118350..049673e2 100644 --- a/x/pot/client/cli/flags.go +++ b/x/pot/client/cli/flags.go @@ -20,37 +20,6 @@ const ( FlagBLSSignature = "bls-signature" ) -var ( -// FsReporterAddr = flag.NewFlagSet("", flag.ContinueOnError) -// FsEpoch = flag.NewFlagSet("", flag.ContinueOnError) -// FsReportReference = flag.NewFlagSet("", flag.ContinueOnError) -// FsWalletVolumes = flag.NewFlagSet("", flag.ContinueOnError) -// FsAmount = flag.NewFlagSet("", flag.ContinueOnError) -// FsWalletAddress = flag.NewFlagSet("", flag.ContinueOnError) -// FsTargetAddress = flag.NewFlagSet("", flag.ContinueOnError) -// FsReporters = flag.NewFlagSet("", flag.ContinueOnError) -// FsReportOwner = flag.NewFlagSet("", flag.ContinueOnError) -// FsNetworkAddress = flag.NewFlagSet("", flag.ContinueOnError) -// FsSlashing = flag.NewFlagSet("", flag.ContinueOnError) -// FsSuspend = flag.NewFlagSet("", flag.ContinueOnError) -) - -func init() { - //FsReporterAddr.String(FlagReporterAddr, "", "the node address of reporter") - //FsEpoch.String(FlagEpoch, "", "the epoch when this PoT message reported.") - //FsReportReference.String(FlagReportReference, "", " the hash used as a reference to this PoT report") - //FsWalletVolumes.String(FlagWalletVolumes, "", "a string of KEY-VALUE pairs. The KEY is 'wallet-volumes' and the VALUE is the proof of traffic of this wallet`") - //FsAmount.String(FlagAmount, "", "Amount of coins to withdraw") - //FsWalletAddress.String(FlagWalletAddress, "", "The address of the wallet to withdraw") - //FsTargetAddress.String(FlagTargetAddress, "", "The target account where the money is deposited after withdraw") - //FsReporters.String(FlagReporters, "", "the node address list of reporters") - //FsReportOwner.String(FlagReporterOwner, "", "the node address list of reporters") - //FsNetworkAddress.String(FlagNetworkAddress, "", "the node address of resource node to slashing") - //FsSlashing.String(FlagSlashing, "", "the amount of slashing") - //FsSuspend.Bool(FlagSuspend, false, "if the resource node is suspend") - -} - // FlagSetAmount Returns the FlagSet for amount related operations. func flagSetAmount() *flag.FlagSet { fs := flag.NewFlagSet("", flag.ContinueOnError) diff --git a/x/pot/client/cli/query.go b/x/pot/client/cli/query.go index f123af25..31da0f70 100644 --- a/x/pot/client/cli/query.go +++ b/x/pot/client/cli/query.go @@ -31,11 +31,40 @@ func GetQueryCmd() *cobra.Command { GetCmdQueryVolumeReport(), GetCmdQueryParams(), GetCmdQueryTotalMinedTokens(), + GetCmdQueryCirculationSupply(), ) return potQueryCmd } +func GetCmdQueryCirculationSupply() *cobra.Command { + cmd := &cobra.Command{ + Use: "circulation-supply", + Args: cobra.NoArgs, + Short: "Query the circulation supply", + Long: strings.TrimSpace( + fmt.Sprintf(`Query the circulation supply.`), + ), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + queryClient := types.NewQueryClient(clientCtx) + + res, err := queryClient.CirculationSupply(cmd.Context(), &types.QueryCirculationSupplyRequest{}) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + return cmd +} + func GetCmdQueryTotalMinedTokens() *cobra.Command { cmd := &cobra.Command{ Use: "total-mined-token", diff --git a/x/pot/client/rest/query.go b/x/pot/client/rest/query.go index fa636743..c3d7b3f4 100644 --- a/x/pot/client/rest/query.go +++ b/x/pot/client/rest/query.go @@ -21,6 +21,7 @@ func registerQueryRoutes(clientCtx client.Context, r *mux.Router) { r.HandleFunc("/pot/slashing/{walletAddress}", getSlashingByWalletAddressHandlerFn(clientCtx, types.QuerySlashingByWalletAddr)).Methods("GET") r.HandleFunc("/pot/params", potParamsHandlerFn(clientCtx, types.QueryPotParams)).Methods("GET") r.HandleFunc("/pot/total-mined-token", getTotalMinedTokenHandlerFn(clientCtx, types.QueryTotalMinedToken)).Methods("GET") + r.HandleFunc("/pot/circulation-supply", getCirculationSupplyHandlerFn(clientCtx, types.QueryCirculationSupply)).Methods("GET") } // GET request handler to query params of POT module @@ -208,3 +209,21 @@ func getTotalMinedTokenHandlerFn(clientCtx client.Context, queryPath string) htt rest.PostProcessResponse(w, cliCtx, res) } } + +func getCirculationSupplyHandlerFn(clientCtx client.Context, queryPath string) http.HandlerFunc { + return func(w http.ResponseWriter, r *http.Request) { + cliCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, clientCtx, r) + if !ok { + return + } + + route := fmt.Sprintf("custom/%s/%s", types.QuerierRoute, queryPath) + res, height, err := cliCtx.Query(route) + if err != nil { + rest.WriteErrorResponse(w, http.StatusInternalServerError, err.Error()) + return + } + cliCtx = cliCtx.WithHeight(height) + rest.PostProcessResponse(w, cliCtx, res) + } +} diff --git a/x/pot/keeper/grpc_query.go b/x/pot/keeper/grpc_query.go index 6e693db1..43267e9b 100644 --- a/x/pot/keeper/grpc_query.go +++ b/x/pot/keeper/grpc_query.go @@ -374,3 +374,10 @@ func (q Querier) TotalMinedToken(c context.Context, _ *types.QueryTotalMinedToke return &types.QueryTotalMinedTokenResponse{TotalMinedToken: totalMinedToken}, nil } + +func (q Querier) CirculationSupply(c context.Context, _ *types.QueryCirculationSupplyRequest) (*types.QueryCirculationSupplyResponse, error) { + ctx := sdk.UnwrapSDKContext(c) + circulationSupply := q.GetCirculationSupply(ctx) + + return &types.QueryCirculationSupplyResponse{CirculationSupply: circulationSupply}, nil +} diff --git a/x/pot/keeper/keeper.go b/x/pot/keeper/keeper.go index 21cb18de..b9374bb8 100644 --- a/x/pot/keeper/keeper.go +++ b/x/pot/keeper/keeper.go @@ -9,9 +9,11 @@ import ( "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" stratos "github.com/stratosnet/stratos-chain/types" "github.com/stratosnet/stratos-chain/x/pot/types" + registertypes "github.com/stratosnet/stratos-chain/x/register/types" ) // Keeper of the pot store @@ -87,3 +89,34 @@ func (k Keeper) FoundationDeposit(ctx sdk.Context, amount sdk.Coins, from sdk.Ac } return nil } + +func (k Keeper) GetCirculationSupply(ctx sdk.Context) (circulationSupply sdk.Coins) { + // total supply - validator staking - resource node staking - mining pool - prepay + totalSupply := k.bankKeeper.GetSupply(ctx, k.BondDenom(ctx)) + + validatorBondedPoolAcc := k.accountKeeper.GetModuleAddress(stakingtypes.BondedPoolName) + validatorStaking := k.bankKeeper.GetBalance(ctx, validatorBondedPoolAcc, k.BondDenom(ctx)) + + resourceNodeBondedPoolAcc := k.accountKeeper.GetModuleAddress(registertypes.ResourceNodeBondedPool) + resourceNodeStaking := k.bankKeeper.GetBalance(ctx, resourceNodeBondedPoolAcc, k.BondDenom(ctx)) + + metaNodeBondedPoolAcc := k.accountKeeper.GetModuleAddress(registertypes.MetaNodeNotBondedPool) + metaNodeStaking := k.bankKeeper.GetBalance(ctx, metaNodeBondedPoolAcc, k.BondDenom(ctx)) + + miningPoolAcc := k.accountKeeper.GetModuleAddress(types.FoundationAccount) + miningPool := k.bankKeeper.GetBalance(ctx, miningPoolAcc, k.BondDenom(ctx)) + + unissuedPrepayAcc := k.accountKeeper.GetModuleAddress(registertypes.TotalUnissuedPrepay) + unissuedPrepay := k.bankKeeper.GetBalance(ctx, unissuedPrepayAcc, k.BondDenom(ctx)) + + circulationSupplyStos := totalSupply. + Sub(validatorStaking). + Sub(resourceNodeStaking). + Sub(metaNodeStaking). + Sub(miningPool). + Sub(unissuedPrepay) + + circulationSupply = sdk.NewCoins(circulationSupplyStos) + + return +} diff --git a/x/pot/keeper/querier.go b/x/pot/keeper/querier.go index 19586d99..a28050d4 100644 --- a/x/pot/keeper/querier.go +++ b/x/pot/keeper/querier.go @@ -28,6 +28,8 @@ func NewQuerier(k Keeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier { return querySlashingByWalletAddress(ctx, req, k, legacyQuerierCdc) case types.QueryPotParams: return getPotParams(ctx, req, k, legacyQuerierCdc) + case types.QueryCirculationSupply: + return getCirculationSupply(ctx, req, k, legacyQuerierCdc) default: return nil, sdkerrors.Wrap(sdkerrors.ErrUnknownRequest, "unknown pot query endpoint") } @@ -155,3 +157,12 @@ func querySlashingByWalletAddress(ctx sdk.Context, req abci.RequestQuery, k Keep return []byte(k.registerKeeper.GetSlashing(ctx, addr).String()), nil } + +func getCirculationSupply(ctx sdk.Context, req abci.RequestQuery, k Keeper, legacyQuerierCdc *codec.LegacyAmino) ([]byte, error) { + circulationSupply := k.GetCirculationSupply(ctx) + bz, err := codec.MarshalJSONIndent(legacyQuerierCdc, circulationSupply) + if err != nil { + return nil, sdkerrors.Wrap(sdkerrors.ErrJSONMarshal, err.Error()) + } + return bz, nil +} diff --git a/x/pot/types/expected_keepers.go b/x/pot/types/expected_keepers.go index bb46f065..3200ce54 100644 --- a/x/pot/types/expected_keepers.go +++ b/x/pot/types/expected_keepers.go @@ -20,6 +20,8 @@ type BankKeeper interface { SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error SendCoinsFromModuleToModule(ctx sdk.Context, senderPool, recipientPool string, amt sdk.Coins) error + GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin + GetSupply(ctx sdk.Context, denom string) sdk.Coin } type RegisterKeeper interface { diff --git a/x/pot/types/querier.go b/x/pot/types/querier.go index 4e098cd0..10d26e1b 100644 --- a/x/pot/types/querier.go +++ b/x/pot/types/querier.go @@ -11,6 +11,7 @@ const ( QuerySlashingByWalletAddr = "query_pot_slashing_by_wallet_address" QueryPotParams = "query_pot_params" QueryTotalMinedToken = "query_total_mined_token" + QueryCirculationSupply = "query_circulation_supply" QueryDefaultLimit = 100 ) diff --git a/x/pot/types/query.pb.go b/x/pot/types/query.pb.go index 043648a7..fa62a574 100644 --- a/x/pot/types/query.pb.go +++ b/x/pot/types/query.pb.go @@ -505,8 +505,8 @@ func (m *QueryRewardsByOwnerResponse) GetHeight() int64 { type RewardByOwner struct { WalletAddress string `protobuf:"bytes,1,opt,name=wallet_address,json=walletAddress,proto3" json:"wallet_address,omitempty"` - MatureTotalReward github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=MatureTotalReward,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"MatureTotalReward"` - ImmatureTotalReward github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=ImmatureTotalReward,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"ImmatureTotalReward"` + MatureTotalReward github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=mature_total_reward,json=matureTotalReward,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"mature_total_reward"` + ImmatureTotalReward github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=immature_total_reward,json=immatureTotalReward,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"immature_total_reward"` } func (m *RewardByOwner) Reset() { *m = RewardByOwner{} } @@ -741,6 +741,86 @@ func (m *QueryTotalMinedTokenResponse) GetTotalMinedToken() types.Coin { return types.Coin{} } +type QueryCirculationSupplyRequest struct { +} + +func (m *QueryCirculationSupplyRequest) Reset() { *m = QueryCirculationSupplyRequest{} } +func (m *QueryCirculationSupplyRequest) String() string { return proto.CompactTextString(m) } +func (*QueryCirculationSupplyRequest) ProtoMessage() {} +func (*QueryCirculationSupplyRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_c09bd09df76a68e0, []int{14} +} +func (m *QueryCirculationSupplyRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryCirculationSupplyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryCirculationSupplyRequest.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 *QueryCirculationSupplyRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryCirculationSupplyRequest.Merge(m, src) +} +func (m *QueryCirculationSupplyRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryCirculationSupplyRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryCirculationSupplyRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryCirculationSupplyRequest proto.InternalMessageInfo + +type QueryCirculationSupplyResponse struct { + CirculationSupply github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=circulation_supply,json=circulationSupply,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"circulation_supply"` +} + +func (m *QueryCirculationSupplyResponse) Reset() { *m = QueryCirculationSupplyResponse{} } +func (m *QueryCirculationSupplyResponse) String() string { return proto.CompactTextString(m) } +func (*QueryCirculationSupplyResponse) ProtoMessage() {} +func (*QueryCirculationSupplyResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_c09bd09df76a68e0, []int{15} +} +func (m *QueryCirculationSupplyResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryCirculationSupplyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryCirculationSupplyResponse.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 *QueryCirculationSupplyResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryCirculationSupplyResponse.Merge(m, src) +} +func (m *QueryCirculationSupplyResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryCirculationSupplyResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryCirculationSupplyResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryCirculationSupplyResponse proto.InternalMessageInfo + +func (m *QueryCirculationSupplyResponse) GetCirculationSupply() github_com_cosmos_cosmos_sdk_types.Coins { + if m != nil { + return m.CirculationSupply + } + return nil +} + func init() { proto.RegisterType((*QueryVolumeReportRequest)(nil), "stratos.pot.v1.QueryVolumeReportRequest") proto.RegisterType((*QueryVolumeReportResponse)(nil), "stratos.pot.v1.QueryVolumeReportResponse") @@ -756,72 +836,79 @@ func init() { proto.RegisterType((*QuerySlashingByOwnerResponse)(nil), "stratos.pot.v1.QuerySlashingByOwnerResponse") proto.RegisterType((*QueryTotalMinedTokenRequest)(nil), "stratos.pot.v1.QueryTotalMinedTokenRequest") proto.RegisterType((*QueryTotalMinedTokenResponse)(nil), "stratos.pot.v1.QueryTotalMinedTokenResponse") + proto.RegisterType((*QueryCirculationSupplyRequest)(nil), "stratos.pot.v1.QueryCirculationSupplyRequest") + proto.RegisterType((*QueryCirculationSupplyResponse)(nil), "stratos.pot.v1.QueryCirculationSupplyResponse") } func init() { proto.RegisterFile("stratos/pot/v1/query.proto", fileDescriptor_c09bd09df76a68e0) } var fileDescriptor_c09bd09df76a68e0 = []byte{ - // 945 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x96, 0x41, 0x6f, 0x1b, 0x45, - 0x14, 0x80, 0xb3, 0x09, 0x75, 0xda, 0x17, 0x9a, 0xa8, 0xd3, 0x28, 0x6c, 0x97, 0xd4, 0x29, 0x53, - 0x95, 0x26, 0x2d, 0xde, 0x89, 0x83, 0x50, 0x25, 0x38, 0x91, 0x52, 0x20, 0x87, 0x8a, 0xb2, 0x54, - 0x1c, 0xb8, 0x58, 0x13, 0x7b, 0xb2, 0xbb, 0xaa, 0x3d, 0xb3, 0xd9, 0x19, 0x27, 0xb1, 0x4a, 0x2e, - 0x5c, 0xb9, 0x20, 0x38, 0xc0, 0x01, 0x09, 0xc1, 0x91, 0x53, 0x7f, 0x46, 0x8f, 0x91, 0xb8, 0x70, - 0x0a, 0x28, 0xe1, 0xc4, 0x91, 0x5f, 0x80, 0x76, 0x66, 0xec, 0x78, 0xd7, 0xeb, 0x38, 0x42, 0x9c, - 0xbc, 0x33, 0xef, 0xbd, 0x79, 0xdf, 0x7b, 0xf3, 0xde, 0x1b, 0x83, 0x27, 0x55, 0x4a, 0x95, 0x90, - 0x24, 0x11, 0x8a, 0xec, 0xd5, 0xc9, 0x6e, 0x97, 0xa5, 0x3d, 0x3f, 0x49, 0x85, 0x12, 0x68, 0xde, - 0xca, 0xfc, 0x44, 0x28, 0x7f, 0xaf, 0xee, 0x2d, 0x86, 0x22, 0x14, 0x5a, 0x44, 0xb2, 0x2f, 0xa3, - 0xe5, 0x2d, 0x87, 0x42, 0x84, 0x6d, 0x46, 0x68, 0x12, 0x13, 0xca, 0xb9, 0x50, 0x54, 0xc5, 0x82, - 0x4b, 0x2b, 0xad, 0x36, 0x85, 0xec, 0x08, 0x49, 0xb6, 0xa9, 0x64, 0x64, 0xaf, 0xbe, 0xcd, 0x14, - 0xad, 0x93, 0xa6, 0x88, 0xb9, 0x95, 0xdf, 0x1b, 0x96, 0x6b, 0xe7, 0x03, 0xad, 0x84, 0x86, 0x31, - 0xd7, 0x87, 0x59, 0x5d, 0xb7, 0xc0, 0x9a, 0x61, 0x69, 0x09, 0x5e, 0x07, 0xf7, 0xd3, 0xcc, 0xf6, - 0x73, 0xd1, 0xee, 0x76, 0x58, 0xc0, 0x12, 0x91, 0xaa, 0x80, 0xed, 0x76, 0x99, 0x54, 0x68, 0x11, - 0x2e, 0xb1, 0x44, 0x34, 0x23, 0xd7, 0xb9, 0xe5, 0xac, 0xce, 0x04, 0x66, 0x81, 0x13, 0xb8, 0x51, - 0x62, 0x21, 0x13, 0xc1, 0x25, 0x43, 0xef, 0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, 0x72, 0x60, 0xa1, 0x50, 0xec, 0xa8, 0xdc, - 0x73, 0x79, 0x63, 0x79, 0x6f, 0x5d, 0x4c, 0xd9, 0x72, 0xd6, 0x35, 0xe7, 0x7d, 0xb4, 0x56, 0xe4, - 0xec, 0x77, 0xd1, 0x28, 0xe1, 0x2e, 0x54, 0xcc, 0x4b, 0x89, 0x70, 0xa9, 0xab, 0xdc, 0x63, 0xec, - 0xdd, 0x3e, 0x57, 0xc7, 0x52, 0x54, 0x35, 0x85, 0x8b, 0x96, 0x8a, 0x14, 0xe6, 0x29, 0x46, 0xdf, - 0x3b, 0xb0, 0x50, 0xe8, 0xc6, 0x31, 0x49, 0x29, 0xef, 0xe9, 0x31, 0x49, 0x19, 0xd3, 0xe0, 0x78, - 0x4d, 0xe3, 0xdc, 0x46, 0x6f, 0x14, 0x71, 0x74, 0x2f, 0xd6, 0x74, 0x7f, 0xd6, 0x74, 0x7f, 0x6e, - 0x6e, 0xbd, 0x3c, 0xa9, 0x3a, 0x47, 0x27, 0x55, 0xe7, 0xcf, 0x93, 0xaa, 0xf3, 0xcd, 0x69, 0x75, - 0xea, 0xe8, 0xb4, 0x3a, 0xf5, 0xfb, 0x69, 0x75, 0xea, 0x0b, 0x32, 0x34, 0x3e, 0xed, 0x31, 0x9c, - 0xa9, 0xfe, 0x67, 0xad, 0x19, 0xd1, 0x98, 0x93, 0x03, 0x7d, 0xb2, 0x9e, 0xa5, 0xdb, 0x15, 0xfd, - 0x77, 0xef, 0xed, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x2c, 0x9c, 0xef, 0xd6, 0xb6, 0x0a, 0x00, - 0x00, + // 1027 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x96, 0x41, 0x6f, 0x1b, 0x45, + 0x14, 0xc7, 0xb3, 0x09, 0x4d, 0xd3, 0x17, 0x9a, 0x28, 0x93, 0x10, 0xb6, 0x4b, 0x62, 0x97, 0x29, + 0xa5, 0x49, 0x8a, 0x77, 0xe2, 0x20, 0x54, 0x09, 0x4e, 0x24, 0x14, 0xe8, 0x01, 0x51, 0xb6, 0x15, + 0x07, 0x2e, 0xd6, 0xc4, 0x9e, 0xd8, 0xab, 0xda, 0x3b, 0x9b, 0x9d, 0x71, 0x12, 0x13, 0x2a, 0x24, + 0x3e, 0x01, 0x82, 0x03, 0x1c, 0x10, 0x08, 0x8e, 0x88, 0x03, 0x07, 0x3e, 0x44, 0x8f, 0x95, 0xb8, + 0x70, 0x0a, 0x28, 0xe1, 0xc4, 0x91, 0x4f, 0x80, 0x76, 0x66, 0xec, 0xec, 0xae, 0x77, 0x63, 0x0b, + 0xc1, 0xc9, 0x9e, 0x79, 0xef, 0xcd, 0xfb, 0xbd, 0x37, 0x33, 0xff, 0x59, 0x70, 0x84, 0x8c, 0xa8, + 0xe4, 0x82, 0x84, 0x5c, 0x92, 0x83, 0x2a, 0xd9, 0xef, 0xb2, 0xa8, 0xe7, 0x86, 0x11, 0x97, 0x1c, + 0xcd, 0x19, 0x9b, 0x1b, 0x72, 0xe9, 0x1e, 0x54, 0x9d, 0xa5, 0x26, 0x6f, 0x72, 0x65, 0x22, 0xf1, + 0x3f, 0xed, 0xe5, 0xac, 0x34, 0x39, 0x6f, 0xb6, 0x19, 0xa1, 0xa1, 0x4f, 0x68, 0x10, 0x70, 0x49, + 0xa5, 0xcf, 0x03, 0x61, 0xac, 0xa5, 0x3a, 0x17, 0x1d, 0x2e, 0xc8, 0x2e, 0x15, 0x8c, 0x1c, 0x54, + 0x77, 0x99, 0xa4, 0x55, 0x52, 0xe7, 0x7e, 0x60, 0xec, 0x1b, 0x49, 0xbb, 0x4a, 0x3e, 0xf0, 0x0a, + 0x69, 0xd3, 0x0f, 0xd4, 0x62, 0xc6, 0xd7, 0xce, 0xb0, 0xc6, 0x58, 0xca, 0x82, 0x37, 0xc1, 0xfe, + 0x20, 0x8e, 0xfd, 0x90, 0x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 0x71, 0x1c, + 0x77, 0x5c, 0x77, 0xc3, 0xb7, 0xa1, 0xf8, 0x5e, 0x42, 0x38, 0xcb, 0x97, 0x50, 0x8b, 0x8a, 0x16, + 0xa5, 0xed, 0x7b, 0x4f, 0x4e, 0x4b, 0xd6, 0xd3, 0xd3, 0x92, 0xf5, 0xc7, 0x69, 0xc9, 0xfa, 0xfc, + 0xac, 0x34, 0xf1, 0xf4, 0xac, 0x34, 0xf1, 0xdb, 0x59, 0x69, 0xe2, 0x23, 0x92, 0x50, 0x21, 0xb3, + 0x4e, 0xc0, 0x64, 0xff, 0x6f, 0xa5, 0xde, 0xa2, 0x7e, 0x40, 0x8e, 0xd4, 0xd2, 0x4a, 0x92, 0x76, + 0xa7, 0xd5, 0x37, 0xf5, 0xab, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0x7b, 0x84, 0x7e, 0xf0, 0x1b, + 0x0c, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -847,6 +934,7 @@ type QueryClient interface { // Params queries POT module Params info. Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) TotalMinedToken(ctx context.Context, in *QueryTotalMinedTokenRequest, opts ...grpc.CallOption) (*QueryTotalMinedTokenResponse, error) + CirculationSupply(ctx context.Context, in *QueryCirculationSupplyRequest, opts ...grpc.CallOption) (*QueryCirculationSupplyResponse, error) } type queryClient struct { @@ -911,6 +999,15 @@ func (c *queryClient) TotalMinedToken(ctx context.Context, in *QueryTotalMinedTo return out, nil } +func (c *queryClient) CirculationSupply(ctx context.Context, in *QueryCirculationSupplyRequest, opts ...grpc.CallOption) (*QueryCirculationSupplyResponse, error) { + out := new(QueryCirculationSupplyResponse) + err := c.cc.Invoke(ctx, "/stratos.pot.v1.Query/CirculationSupply", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // QueryServer is the server API for Query service. type QueryServer interface { // VolumeReport queries VolumeReport info for given epoch. @@ -924,6 +1021,7 @@ type QueryServer interface { // Params queries POT module Params info. Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) TotalMinedToken(context.Context, *QueryTotalMinedTokenRequest) (*QueryTotalMinedTokenResponse, error) + CirculationSupply(context.Context, *QueryCirculationSupplyRequest) (*QueryCirculationSupplyResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -948,6 +1046,9 @@ func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsReq func (*UnimplementedQueryServer) TotalMinedToken(ctx context.Context, req *QueryTotalMinedTokenRequest) (*QueryTotalMinedTokenResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method TotalMinedToken not implemented") } +func (*UnimplementedQueryServer) CirculationSupply(ctx context.Context, req *QueryCirculationSupplyRequest) (*QueryCirculationSupplyResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CirculationSupply not implemented") +} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -1061,6 +1162,24 @@ func _Query_TotalMinedToken_Handler(srv interface{}, ctx context.Context, dec fu return interceptor(ctx, in, info, handler) } +func _Query_CirculationSupply_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryCirculationSupplyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).CirculationSupply(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/stratos.pot.v1.Query/CirculationSupply", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).CirculationSupply(ctx, req.(*QueryCirculationSupplyRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "stratos.pot.v1.Query", HandlerType: (*QueryServer)(nil), @@ -1089,6 +1208,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "TotalMinedToken", Handler: _Query_TotalMinedToken_Handler, }, + { + MethodName: "CirculationSupply", + Handler: _Query_CirculationSupply_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "stratos/pot/v1/query.proto", @@ -1619,6 +1742,66 @@ func (m *QueryTotalMinedTokenResponse) MarshalToSizedBuffer(dAtA []byte) (int, e return len(dAtA) - i, nil } +func (m *QueryCirculationSupplyRequest) 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 *QueryCirculationSupplyRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryCirculationSupplyRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryCirculationSupplyResponse) 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 *QueryCirculationSupplyResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryCirculationSupplyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.CirculationSupply) > 0 { + for iNdEx := len(m.CirculationSupply) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.CirculationSupply[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + return len(dAtA) - i, nil +} + func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { offset -= sovQuery(v) base := offset @@ -1849,6 +2032,30 @@ func (m *QueryTotalMinedTokenResponse) Size() (n int) { return n } +func (m *QueryCirculationSupplyRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryCirculationSupplyResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.CirculationSupply) > 0 { + for _, e := range m.CirculationSupply { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + func sovQuery(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -3259,6 +3466,140 @@ func (m *QueryTotalMinedTokenResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *QueryCirculationSupplyRequest) 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 ErrIntOverflowQuery + } + 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: QueryCirculationSupplyRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryCirculationSupplyRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryCirculationSupplyResponse) 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 ErrIntOverflowQuery + } + 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: QueryCirculationSupplyResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryCirculationSupplyResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CirculationSupply", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CirculationSupply = append(m.CirculationSupply, types.Coin{}) + if err := m.CirculationSupply[len(m.CirculationSupply)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipQuery(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/pot/types/query.pb.gw.go b/x/pot/types/query.pb.gw.go index c19c0dbf..060c1e3b 100644 --- a/x/pot/types/query.pb.gw.go +++ b/x/pot/types/query.pb.gw.go @@ -301,6 +301,24 @@ func local_request_Query_TotalMinedToken_0(ctx context.Context, marshaler runtim } +func request_Query_CirculationSupply_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryCirculationSupplyRequest + var metadata runtime.ServerMetadata + + msg, err := client.CirculationSupply(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_CirculationSupply_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryCirculationSupplyRequest + var metadata runtime.ServerMetadata + + msg, err := server.CirculationSupply(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -427,6 +445,26 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_CirculationSupply_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_CirculationSupply_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_CirculationSupply_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -588,6 +626,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_CirculationSupply_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_CirculationSupply_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_CirculationSupply_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -603,6 +661,8 @@ var ( pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"stratos", "pot", "v1", "params"}, "", runtime.AssumeColonVerbOpt(true))) pattern_Query_TotalMinedToken_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"stratos", "pot", "v1", "total-mined-token"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Query_CirculationSupply_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"stratos", "pot", "v1", "circulation-supply"}, "", runtime.AssumeColonVerbOpt(true))) ) var ( @@ -617,4 +677,6 @@ var ( forward_Query_Params_0 = runtime.ForwardResponseMessage forward_Query_TotalMinedToken_0 = runtime.ForwardResponseMessage + + forward_Query_CirculationSupply_0 = runtime.ForwardResponseMessage ) From 6207de41287d680624fbb81cf8fe7239a435a6c9 Mon Sep 17 00:00:00 2001 From: Xixiong Chen <60588630+Xiong-stratos@users.noreply.github.com> Date: Mon, 1 May 2023 15:04:27 -0400 Subject: [PATCH 64/95] Keep the total supply constant. (#258) Mint validator slashing burned tokens and move to community pool. --- app/app.go | 3 +- proto/stratos/pot/v1/pot.proto | 5 + x/pot/abci.go | 11 ++ x/pot/keeper/keeper.go | 59 ++++++++++ x/pot/keeper/params.go | 6 ++ x/pot/types/errors.go | 6 ++ x/pot/types/expected_keepers.go | 2 + x/pot/types/params.go | 54 ++++++++-- x/pot/types/pot.pb.go | 185 +++++++++++++++++++++----------- 9 files changed, 255 insertions(+), 76 deletions(-) diff --git a/app/app.go b/app/app.go index 2482b103..29c301b2 100644 --- a/app/app.go +++ b/app/app.go @@ -171,6 +171,7 @@ var ( registertypes.MetaNodeNotBondedPool: {authtypes.Minter}, registertypes.TotalUnissuedPrepay: {authtypes.Minter}, + pottypes.ModuleName: {authtypes.Minter}, pottypes.FoundationAccount: {authtypes.Minter, authtypes.Burner}, pottypes.TotalRewardPool: nil, //pottypes.TotalMinedTokens: {authtypes.Minter, authtypes.Burner}, @@ -509,7 +510,6 @@ func NewInitApp( govtypes.ModuleName, stakingtypes.ModuleName, registertypes.ModuleName, - pottypes.ModuleName, sdstypes.ModuleName, evmtypes.ModuleName, // no-op modules @@ -525,6 +525,7 @@ func NewInitApp( evidencetypes.ModuleName, authz.ModuleName, feegrant.ModuleName, + pottypes.ModuleName, paramstypes.ModuleName, upgradetypes.ModuleName, vestingtypes.ModuleName, diff --git a/proto/stratos/pot/v1/pot.proto b/proto/stratos/pot/v1/pot.proto index 3673552c..a37a35d4 100644 --- a/proto/stratos/pot/v1/pot.proto +++ b/proto/stratos/pot/v1/pot.proto @@ -31,6 +31,11 @@ message Params { (gogoproto.moretags) = "yaml:\"community_tax\"", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec" ]; + cosmos.base.v1beta1.Coin initial_total_supply = 6 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "initial_total_supply", + (gogoproto.moretags) = "yaml:\"initial_total_supply\"" + ]; } message MiningRewardParam { diff --git a/x/pot/abci.go b/x/pot/abci.go index 56cae940..3e11ea69 100644 --- a/x/pot/abci.go +++ b/x/pot/abci.go @@ -4,6 +4,7 @@ import ( abci "github.com/tendermint/tendermint/abci/types" sdk "github.com/cosmos/cosmos-sdk/types" + banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/stratosnet/stratos-chain/x/pot/keeper" "github.com/stratosnet/stratos-chain/x/pot/types" @@ -53,5 +54,15 @@ func EndBlocker(ctx sdk.Context, req abci.RequestEndBlock, k keeper.Keeper) []ab logger.Error("An error occurred while distributing the reward. ", "ErrMsg", err.Error()) } + // reset total supply to 100M stos + minter, amount := k.RestoreTotalSupply(ctx) + if minter.Empty() || amount.Empty() { + return []abci.ValidatorUpdate{} + } + + ctx.EventManager().EmitEvent( + banktypes.NewCoinMintEvent(minter, amount), + ) + return []abci.ValidatorUpdate{} } diff --git a/x/pot/keeper/keeper.go b/x/pot/keeper/keeper.go index 21cb18de..d3af4d87 100644 --- a/x/pot/keeper/keeper.go +++ b/x/pot/keeper/keeper.go @@ -1,6 +1,7 @@ package keeper import ( + "bytes" "fmt" "math" @@ -8,6 +9,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" + banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" stratos "github.com/stratosnet/stratos-chain/types" @@ -87,3 +89,60 @@ func (k Keeper) FoundationDeposit(ctx sdk.Context, amount sdk.Coins, from sdk.Ac } return nil } + +// Restore total supply to 100M stos +func (k Keeper) RestoreTotalSupply(ctx sdk.Context) (minter sdk.AccAddress, mintCoins sdk.Coins) { + // reset total supply to 100M stos + events := ctx.EventManager().Events() + attrKeyAmtBytes := []byte(sdk.AttributeKeyAmount) + + totalBurnedCoins := sdk.Coins{} + for _, event := range events { + if event.Type == banktypes.EventTypeCoinBurn { + attributes := event.Attributes + for _, attr := range attributes { + if bytes.Equal(attr.Key, attrKeyAmtBytes) { + amount, err := sdk.ParseCoinsNormalized(string(attr.Value)) + if err != nil { + ctx.Logger().Error("An error occurred while parsing burned amount. ", "ErrMsg", err.Error()) + break + } + totalBurnedCoins = totalBurnedCoins.Add(amount...) + } + } + } + } + + totalBurned := totalBurnedCoins.AmountOf(k.BondDenom(ctx)) + if totalBurned.IsZero() { + return sdk.AccAddress{}, sdk.Coins{} + } + + InitialTotalSupply := k.InitialTotalSupply(ctx).Amount + currentTotalSupply := k.bankKeeper.GetSupply(ctx, k.BondDenom(ctx)).Amount + + if totalBurned.Add(currentTotalSupply).GT(InitialTotalSupply) { + mintCoins = sdk.NewCoins( + sdk.NewCoin(k.BondDenom(ctx), InitialTotalSupply.Sub(currentTotalSupply)), + ) + } else { + mintCoins = totalBurnedCoins + } + + // mint coins + err := k.bankKeeper.MintCoins(ctx, types.ModuleName, mintCoins) + if err != nil { + ctx.Logger().Error("Restore total supply failed:", err.Error()) + return sdk.AccAddress{}, sdk.Coins{} + } + + // send new mint coins to community pool + senderAddr := k.accountKeeper.GetModuleAddress(types.ModuleName) + err = k.distrKeeper.FundCommunityPool(ctx, mintCoins, senderAddr) + if err != nil { + ctx.Logger().Error("Restore total supply failed:", err.Error()) + return sdk.AccAddress{}, sdk.Coins{} + } + + return +} diff --git a/x/pot/keeper/params.go b/x/pot/keeper/params.go index 6c4b829f..c4bfbea7 100644 --- a/x/pot/keeper/params.go +++ b/x/pot/keeper/params.go @@ -2,6 +2,7 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/stratosnet/stratos-chain/x/pot/types" ) @@ -51,3 +52,8 @@ func (k Keeper) GetCommunityTax(ctx sdk.Context) (res sdk.Dec) { k.paramSpace.Get(ctx, types.KeyCommunityTax, &res) return } + +func (k Keeper) InitialTotalSupply(ctx sdk.Context) (res sdk.Coin) { + k.paramSpace.Get(ctx, types.KeyInitialTotalSupply, &res) + return +} diff --git a/x/pot/types/errors.go b/x/pot/types/errors.go index fc36e4e6..ef57c8f2 100644 --- a/x/pot/types/errors.go +++ b/x/pot/types/errors.go @@ -13,6 +13,9 @@ const ( codeErrMissingTargetAddress codeErrInsufficientMatureTotal codeErrMatureEpoch + codeErrMiningRewardParams + codeErrCommunityTax + codeErrInitialTotalSupply codeErrEmptyFromAddr codeErrEmptyReporterAddr codeErrEmptyWalletVolumes @@ -50,6 +53,9 @@ var ( ErrMissingTargetAddress = sdkerrors.Register(ModuleName, codeErrMissingTargetAddress, "missing target address") ErrInsufficientMatureTotal = sdkerrors.Register(ModuleName, codeErrInsufficientMatureTotal, "insufficient mature total") ErrMatureEpoch = sdkerrors.Register(ModuleName, codeErrMatureEpoch, "the value of epoch must be positive and greater than its previous one") + ErrMiningRewardParams = sdkerrors.Register(ModuleName, codeErrMiningRewardParams, "invalid mining reward param") + ErrCommunityTax = sdkerrors.Register(ModuleName, codeErrCommunityTax, "invalid community tax param") + ErrInitialTotalSupply = sdkerrors.Register(ModuleName, codeErrInitialTotalSupply, "invalid initial total supply param") ErrEmptyFromAddr = sdkerrors.Register(ModuleName, codeErrEmptyFromAddr, "missing from address") ErrEmptyReporterAddr = sdkerrors.Register(ModuleName, codeErrEmptyReporterAddr, "missing reporter address") ErrEmptyWalletVolumes = sdkerrors.Register(ModuleName, codeErrEmptyWalletVolumes, "wallet volumes list empty") diff --git a/x/pot/types/expected_keepers.go b/x/pot/types/expected_keepers.go index bb46f065..043284bb 100644 --- a/x/pot/types/expected_keepers.go +++ b/x/pot/types/expected_keepers.go @@ -20,6 +20,8 @@ type BankKeeper interface { SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error SendCoinsFromModuleToModule(ctx sdk.Context, senderPool, recipientPool string, amt sdk.Coins) error + GetSupply(ctx sdk.Context, denom string) sdk.Coin + MintCoins(ctx sdk.Context, moduleName string, amounts sdk.Coins) error } type RegisterKeeper interface { diff --git a/x/pot/types/params.go b/x/pot/types/params.go index f620d6d4..a1e57766 100644 --- a/x/pot/types/params.go +++ b/x/pot/types/params.go @@ -26,8 +26,12 @@ var ( KeyMatureEpoch = []byte("MatureEpoch") KeyMiningRewardParams = []byte("MiningRewardParams") KeyCommunityTax = []byte("CommunityTax") + KeyInitialTotalSupply = []byte("InitialTotalSupply") - DefaultCommunityTax = sdk.NewDecWithPrec(2, 2) // 2% + DefaultCommunityTax = sdk.NewDecWithPrec(2, 2) // 2% + DefaultInitialTotalSupply = sdk.NewCoin(DefaultBondDenom, + sdk.NewInt(1e8).Mul(sdk.NewInt(stratos.StosToWei)), + ) //100,000,000 stos ) // ParamKeyTable for pot module @@ -36,13 +40,16 @@ func ParamKeyTable() paramtypes.KeyTable { } // NewParams creates a new Params object -func NewParams(bondDenom string, rewardDenom string, matureEpoch int64, miningRewardParams []MiningRewardParam, communityTax sdk.Dec) Params { +func NewParams(bondDenom string, rewardDenom string, matureEpoch int64, miningRewardParams []MiningRewardParam, + communityTax sdk.Dec, initialTotalSupply sdk.Coin) Params { + return Params{ BondDenom: bondDenom, RewardDenom: rewardDenom, MatureEpoch: matureEpoch, MiningRewardParams: miningRewardParams, CommunityTax: communityTax, + InitialTotalSupply: initialTotalSupply, } } @@ -85,17 +92,26 @@ func DefaultParams() Params { sdk.NewCoin(DefaultRewardDenom, sdk.NewInt(2500000000)), sdk.NewInt(7000), sdk.NewInt(1000), sdk.NewInt(2000))) - return NewParams(DefaultBondDenom, DefaultRewardDenom, DefaultMatureEpoch, miningRewardParams, DefaultCommunityTax) + return NewParams( + DefaultBondDenom, + DefaultRewardDenom, + DefaultMatureEpoch, + miningRewardParams, + DefaultCommunityTax, + DefaultInitialTotalSupply, + ) } // HrpString implements the stringer interface for Params func (p Params) HrpString() string { return fmt.Sprintf(`Params: - BondDenom: %s - RewardDenom: %s - MatureEpoch: %d - MiningRewardParams: %s`, - p.BondDenom, p.RewardDenom, p.MatureEpoch, p.MiningRewardParams) + BondDenom: %s + RewardDenom: %s + MatureEpoch: %d + MiningRewardParams: %s + CommunitiyTax: %v + InitialTotalSupply: %v`, + p.BondDenom, p.RewardDenom, p.MatureEpoch, p.MiningRewardParams, p.CommunityTax, p.InitialTotalSupply) } // ParamSetPairs - Implements params.ParamSet @@ -106,6 +122,7 @@ func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { paramtypes.NewParamSetPair(KeyMatureEpoch, &p.MatureEpoch, validateMatureEpoch), paramtypes.NewParamSetPair(KeyMiningRewardParams, &p.MiningRewardParams, validateMiningRewardParams), paramtypes.NewParamSetPair(KeyCommunityTax, &p.CommunityTax, validateCommunityTax), + paramtypes.NewParamSetPair(KeyInitialTotalSupply, &p.InitialTotalSupply, validateInitialTotalSupply), } } @@ -188,6 +205,20 @@ func validateCommunityTax(i interface{}) error { return nil } +func validateInitialTotalSupply(i interface{}) error { + v, ok := i.(sdk.Coin) + if !ok { + return fmt.Errorf("invalid parameter type: %T", i) + } + if v.IsNil() { + return fmt.Errorf("total supply must be not nil") + } + if v.IsNegative() { + return fmt.Errorf("total supply must be positive: %s", v) + } + return nil +} + func (p Params) ValidateBasic() error { if err := validateBondDenom(p.BondDenom); err != nil { return sdkerrors.Wrap(ErrInvalidDenom, "failed to validate bond denomination") @@ -199,10 +230,13 @@ func (p Params) ValidateBasic() error { return sdkerrors.Wrap(ErrMatureEpoch, "failed to validate mature epoch") } if err := validateMiningRewardParams(p.MiningRewardParams); err != nil { - return sdkerrors.Wrap(ErrMatureEpoch, "failed to validate mining reward params") + return sdkerrors.Wrap(ErrMiningRewardParams, "failed to validate mining reward params") } if err := validateCommunityTax(p.CommunityTax); err != nil { - return sdkerrors.Wrap(ErrMatureEpoch, "failed to validate community tax") + return sdkerrors.Wrap(ErrCommunityTax, "failed to validate community tax") + } + if err := validateInitialTotalSupply(p.InitialTotalSupply); err != nil { + return sdkerrors.Wrap(ErrInitialTotalSupply, err.Error()) } return nil } diff --git a/x/pot/types/pot.pb.go b/x/pot/types/pot.pb.go index e1afe03d..fe041e03 100644 --- a/x/pot/types/pot.pb.go +++ b/x/pot/types/pot.pb.go @@ -32,6 +32,7 @@ type Params struct { MatureEpoch int64 `protobuf:"varint,3,opt,name=mature_epoch,json=matureEpoch,proto3" json:"mature_epoch" yaml:"mature_epoch"` MiningRewardParams []MiningRewardParam `protobuf:"bytes,4,rep,name=mining_reward_params,json=miningRewardParams,proto3" json:"mining_reward_params" yaml:"mining_reward_params"` CommunityTax github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,5,opt,name=community_tax,json=communityTax,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"community_tax" yaml:"community_tax"` + InitialTotalSupply types.Coin `protobuf:"bytes,6,opt,name=initial_total_supply,json=initialTotalSupply,proto3" json:"initial_total_supply" yaml:"initial_total_supply"` } func (m *Params) Reset() { *m = Params{} } @@ -95,6 +96,13 @@ func (m *Params) GetMiningRewardParams() []MiningRewardParam { return nil } +func (m *Params) GetInitialTotalSupply() types.Coin { + if m != nil { + return m.InitialTotalSupply + } + return types.Coin{} +} + type MiningRewardParam struct { TotalMinedValveStart types.Coin `protobuf:"bytes,1,opt,name=total_mined_valve_start,json=totalMinedValveStart,proto3" json:"total_mined_valve_start" yaml:"total_mined_valve_start"` TotalMinedValveEnd types.Coin `protobuf:"bytes,2,opt,name=total_mined_valve_end,json=totalMinedValveEnd,proto3" json:"total_mined_valve_end" yaml:"total_mined_valve_end"` @@ -379,71 +387,73 @@ func init() { func init() { proto.RegisterFile("stratos/pot/v1/pot.proto", fileDescriptor_a05930b44d981057) } var fileDescriptor_a05930b44d981057 = []byte{ - // 1013 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xcf, 0x6f, 0x1b, 0x45, - 0x14, 0xce, 0xd6, 0xc5, 0x25, 0x93, 0x1f, 0xa5, 0x43, 0x42, 0x4c, 0x28, 0x9e, 0x64, 0x2a, 0x20, - 0x12, 0x8a, 0x57, 0x29, 0x12, 0x07, 0x2a, 0x0e, 0x75, 0x5b, 0x44, 0x90, 0x8a, 0xa2, 0x69, 0xd5, - 0x4a, 0xbd, 0xac, 0xc6, 0xbb, 0x13, 0x67, 0xd5, 0xdd, 0x99, 0x65, 0x76, 0xec, 0x26, 0x12, 0xff, - 0x01, 0x97, 0x4a, 0xfc, 0x17, 0x48, 0x1c, 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0x4f, 0x99, 0xa2, 0x53, 0xbc, 0xd7, 0x8d, 0xf7, - 0xaf, 0x2e, 0xec, 0x7d, 0x86, 0x66, 0xa1, 0xd1, 0xa6, 0x6b, 0x88, 0xa9, 0x31, 0x98, 0xbc, 0x55, - 0x92, 0x93, 0x7e, 0xf1, 0x5f, 0x35, 0x50, 0x77, 0x2d, 0x43, 0xc0, 0xf2, 0x33, 0x9a, 0x24, 0x4c, - 0x05, 0x34, 0x8a, 0x24, 0xcb, 0x73, 0x37, 0xcc, 0x3f, 0x1c, 0x68, 0x74, 0x86, 0x29, 0x34, 0x5a, - 0xb5, 0x67, 0x8e, 0xe3, 0x98, 0x2c, 0x59, 0xe0, 0xb6, 0x5d, 0xc3, 0x9f, 0x3c, 0xb0, 0xe6, 0x86, - 0xda, 0xbe, 0x14, 0x69, 0xe0, 0x7a, 0x36, 0x13, 0x22, 0x69, 0x5c, 0x32, 0x33, 0x74, 0xc6, 0x1f, - 0x20, 0x1d, 0x4e, 0x86, 0x29, 0x0a, 0xa3, 0xc9, 0x30, 0x25, 0x00, 0x7f, 0xf7, 0x07, 0xda, 0xfa, - 0x0f, 0x77, 0x5c, 0x9e, 0x96, 0x93, 0x15, 0xab, 0xf2, 0x99, 0x14, 0xa9, 0x1d, 0x71, 0x7b, 0x42, - 0x24, 0xf0, 0x67, 0x0f, 0x34, 0xaa, 0xf2, 0x4a, 0xd2, 0xfd, 0xfd, 0x38, 0xb4, 0x29, 0xd4, 0x5e, - 0x95, 0x82, 0x70, 0x29, 0x4c, 0x95, 0x28, 0x34, 0x42, 0x93, 0x39, 0x54, 0x23, 0x2e, 0x96, 0xc4, - 0xea, 0x28, 0x89, 0x87, 0x56, 0xa4, 0xcc, 0x02, 0xff, 0xe2, 0x01, 0xf8, 0x20, 0xe6, 0xdd, 0x84, - 0x3d, 0x36, 0xf5, 0x79, 0x24, 0x92, 0x5e, 0xca, 0xfe, 0x97, 0x92, 0x53, 0x50, 0xef, 0x1b, 0x75, - 0xf7,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e3, 0xb6, 0x99, 0xf4, 0xfe, 0xa1, 0xf9, 0xde, 0x34, - 0xb5, 0xec, 0xd4, 0xcd, 0x97, 0xe2, 0x47, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0xcd, 0xa1, 0x6f, - 0x6b, 0x8b, 0x0a, 0x00, 0x00, + // 1054 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xcf, 0x6f, 0x1c, 0x35, + 0x14, 0xce, 0x34, 0xed, 0x86, 0x38, 0x3f, 0x4a, 0xcd, 0x86, 0x2c, 0xa1, 0xac, 0x13, 0x57, 0x40, + 0x24, 0x94, 0x5d, 0xa5, 0x48, 0x1c, 0xa8, 0x38, 0x74, 0xdb, 0x22, 0x82, 0x54, 0x14, 0x39, 0x51, + 0x2b, 0xf5, 0x32, 0xf2, 0xce, 0x38, 0x9b, 0x51, 0x67, 0xec, 0xc1, 0xe3, 0xdd, 0x26, 0x12, 0x07, + 0x8e, 0x48, 0x5c, 0x2a, 0xf1, 0x5f, 0x20, 0x71, 0xe4, 0x88, 0x38, 0x70, 0xa9, 0x84, 0x84, 0x7a, + 0x44, 0x1c, 0x0c, 0x4a, 0xe0, 0xb2, 0xc7, 0xf9, 0x0b, 0xd0, 0xd8, 0xde, 0xec, 0x6c, 0x36, 0xbb, + 0x25, 0x07, 0x4e, 0x6b, 0x7f, 0xdf, 0xf3, 0xe7, 0xef, 0x3d, 0xbf, 0xf1, 0x1a, 0xd4, 0x32, 0x25, + 0xa9, 0x12, 0x59, 0x33, 0x15, 0xaa, 0xd9, 0xdb, 0x2e, 0x7e, 0x1a, 0xa9, 0x14, 0x4a, 0xc0, 0x65, + 0xc7, 0x34, 0x0a, 0xa8, 0xb7, 0xbd, 0x56, 0xed, 0x88, 0x8e, 0x30, 0x54, 0xb3, 0x18, 0xd9, 0xa8, + 0xb5, 0x7a, 0x20, 0xb2, 0x44, 0x64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0x94, 0x2c, 0xcb, 0xdc, 0xff, + 0xca, 0x07, 0x7d, 0x8d, 0xce, 0x31, 0xb9, 0x46, 0x2b, 0x76, 0xcf, 0x51, 0x1c, 0x93, 0x25, 0x0b, + 0xdc, 0xb5, 0x73, 0xf8, 0xb3, 0x07, 0x56, 0xdd, 0xfd, 0x7a, 0x20, 0x45, 0xe2, 0xbb, 0x9e, 0x4d, + 0x85, 0x88, 0x6b, 0x57, 0xcc, 0x75, 0x3e, 0xe5, 0x03, 0x48, 0x06, 0x37, 0xc3, 0x04, 0x85, 0xe1, + 0xcd, 0x30, 0x21, 0x00, 0x7f, 0xff, 0x27, 0xda, 0xfc, 0x0f, 0x35, 0x2e, 0x76, 0xcb, 0x48, 0xd5, + 0xaa, 0x7c, 0x2a, 0x45, 0x62, 0xaf, 0xb8, 0x5d, 0x21, 0x62, 0xf8, 0x8b, 0x07, 0x6a, 0x65, 0x79, + 0x25, 0xe9, 0xc1, 0x41, 0x14, 0xd8, 0x14, 0x66, 0x5f, 0x95, 0x82, 0x70, 0x29, 0x4c, 0x94, 0xc8, + 0x35, 0x42, 0xe3, 0x39, 0x94, 0x23, 0x2e, 0x97, 0xc4, 0xca, 0x30, 0x89, 0x7d, 0x2b, 0x52, 0x64, + 0x81, 0x7f, 0xf5, 0x00, 0xdc, 0x8b, 0x78, 0x27, 0x66, 0x8f, 0xcd, 0xf9, 0x3c, 0x12, 0x71, 0x37, + 0x61, 0xff, 0xcb, 0x91, 0x53, 0x50, 0xe9, 0x19, 0x75, 0xf7, 0xa0, 0xd8, 0xb9, 0x74, 0xb3, 0xbb, + 0xf5, 0xb9, 0x46, 0x4b, 0x76, 0x47, 0x3b, 0xc7, 0xc4, 0x11, 0x38, 0x05, 0x4b, 0xe5, 0x34, 0x32, + 0xe8, 0x83, 0x39, 0x4b, 0x15, 0x09, 0x14, 0x47, 0x82, 0xcf, 0x3f, 0x12, 0xc6, 0x93, 0x6f, 0x6d, + 0xb8, 0xb3, 0x19, 0x2c, 0xcd, 0x35, 0x5a, 0x2e, 0xef, 0x97, 0x61, 0x32, 0xa0, 0xf0, 0x3f, 0x1e, + 0x80, 0x76, 0x19, 0x61, 0xa9, 0x90, 0x8a, 0xb0, 0x40, 0xc8, 0x10, 0xde, 0x01, 0xaf, 0x49, 0x33, + 0x67, 0xd2, 0x55, 0x0e, 0xf5, 0x35, 0x3a, 0xc3, 0x72, 0x8d, 0xae, 0x0f, 0x0e, 0xd7, 0x22, 0x98, + 0x9c, 0x91, 0xf0, 0x09, 0x78, 0xdd, 0x8e, 0x7d, 0xc9, 0x0e, 0x98, 0x64, 0x3c, 0x18, 0x94, 0xac, + 0xd9, 0xd7, 0x68, 0x8c, 0xcb, 0x35, 0x5a, 0x2d, 0x8b, 0x0d, 0x19, 0x4c, 0xae, 0x4b, 0xe7, 0xca, + 0x21, 0xf0, 0x23, 0x30, 0xa7, 0x8e, 0xfc, 0x43, 0x9a, 0xd9, 0xa7, 0xd8, 0x7c, 0xeb, 0x9d, 0x22, + 0x51, 0x07, 0x0d, 0x13, 0x75, 0x00, 0x26, 0x15, 0x75, 0xf4, 0x19, 0xcd, 0x0e, 0x5b, 0x3b, 0x2f, + 0x4e, 0xea, 0xde, 0xcb, 0x93, 0xba, 0xf7, 0xd7, 0x49, 0xdd, 0x7b, 0x7e, 0x5a, 0x9f, 0x79, 0x79, + 0x5a, 0x9f, 0xf9, 0xfd, 0xb4, 0x3e, 0xf3, 0xa4, 0x59, 0x3a, 0x3e, 0x57, 0x5b, 0xce, 0xd4, 0x60, + 0xb8, 0x65, 0x6e, 0xfa, 0xe6, 0x91, 0x79, 0xfa, 0x9a, 0xb3, 0x6c, 0x57, 0xcc, 0xa3, 0xf5, 0xc3, + 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0xdf, 0xdb, 0x8c, 0x0f, 0x16, 0x0b, 0x00, 0x00, } func (m *Params) Marshal() (dAtA []byte, err error) { @@ -466,6 +476,16 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + { + size, err := m.InitialTotalSupply.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPot(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 { size := m.CommunityTax.Size() i -= size @@ -810,6 +830,8 @@ func (m *Params) Size() (n int) { } l = m.CommunityTax.Size() n += 1 + l + sovPot(uint64(l)) + l = m.InitialTotalSupply.Size() + n += 1 + l + sovPot(uint64(l)) return n } @@ -1096,6 +1118,39 @@ func (m *Params) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InitialTotalSupply", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPot + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthPot + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPot + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.InitialTotalSupply.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipPot(dAtA[iNdEx:]) From 75d6109549f87acd5dc2c1bc0692eb2ba56c625c Mon Sep 17 00:00:00 2001 From: Xiong Date: Mon, 8 May 2023 17:51:45 -0400 Subject: [PATCH 65/95] implement missing/outdated rest apis --- x/pot/keeper/querier.go | 11 ++++++++++ x/sds/client/rest/query.go | 41 +++++++++++++++++++++++++++++++++++++- x/sds/keeper/querier.go | 10 ++++++++-- x/sds/types/querier.go | 14 ++++++------- 4 files changed, 65 insertions(+), 11 deletions(-) diff --git a/x/pot/keeper/querier.go b/x/pot/keeper/querier.go index a28050d4..8b13c3a0 100644 --- a/x/pot/keeper/querier.go +++ b/x/pot/keeper/querier.go @@ -28,6 +28,8 @@ func NewQuerier(k Keeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier { return querySlashingByWalletAddress(ctx, req, k, legacyQuerierCdc) case types.QueryPotParams: return getPotParams(ctx, req, k, legacyQuerierCdc) + case types.QueryTotalMinedToken: + return getTotalMinedToken(ctx, req, k, legacyQuerierCdc) case types.QueryCirculationSupply: return getCirculationSupply(ctx, req, k, legacyQuerierCdc) default: @@ -158,6 +160,15 @@ func querySlashingByWalletAddress(ctx sdk.Context, req abci.RequestQuery, k Keep return []byte(k.registerKeeper.GetSlashing(ctx, addr).String()), nil } +func getTotalMinedToken(ctx sdk.Context, req abci.RequestQuery, k Keeper, legacyQuerierCdc *codec.LegacyAmino) ([]byte, error) { + totalMinedToken := k.GetTotalMinedTokens(ctx) + bz, err := codec.MarshalJSONIndent(legacyQuerierCdc, totalMinedToken) + if err != nil { + return nil, sdkerrors.Wrap(sdkerrors.ErrJSONMarshal, err.Error()) + } + return bz, nil +} + func getCirculationSupply(ctx sdk.Context, req abci.RequestQuery, k Keeper, legacyQuerierCdc *codec.LegacyAmino) ([]byte, error) { circulationSupply := k.GetCirculationSupply(ctx) bz, err := codec.MarshalJSONIndent(legacyQuerierCdc, circulationSupply) diff --git a/x/sds/client/rest/query.go b/x/sds/client/rest/query.go index 9aef3f81..5075c3de 100644 --- a/x/sds/client/rest/query.go +++ b/x/sds/client/rest/query.go @@ -10,17 +10,56 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/types/rest" "github.com/gorilla/mux" + "github.com/ipfs/go-cid" "github.com/stratosnet/stratos-chain/x/sds/client/common" "github.com/stratosnet/stratos-chain/x/sds/types" ) func sdsQueryRoutes(clientCtx client.Context, r *mux.Router) { - r.HandleFunc("/sds/simulatePrepay/{amtToPrepay}", SimulatePrepayHandlerFn(clientCtx)).Methods("GET") + r.HandleFunc("/sds/fileUpload/{fileHash}", queryFileUploadHandlerFn(clientCtx, types.QueryFileUpload)).Methods("GET") + r.HandleFunc("/sds/simPrepay/{amtToPrepay}", SimulatePrepayHandlerFn(clientCtx)).Methods("GET") r.HandleFunc("/sds/nozPrice", NozPriceHandlerFn(clientCtx)).Methods("GET") r.HandleFunc("/sds/nozSupply", NozSupplyHandlerFn(clientCtx)).Methods("GET") r.HandleFunc("/sds/params", sdsParamsHandlerFn(clientCtx, types.QueryParams)).Methods("GET") } +func queryFileUploadHandlerFn(clientCtx client.Context, queryPath string) http.HandlerFunc { + return func(w http.ResponseWriter, r *http.Request) { + cliCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, clientCtx, r) + if !ok { + return + } + + fileHash := mux.Vars(r)["fileHash"] + if len(fileHash) == 0 { + return + } + _, err := cid.Decode(fileHash) + if err != nil { + rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) + return + } + + params := types.NewQueryFileUploadParams(fileHash) + + bz, err := cliCtx.LegacyAmino.MarshalJSON(params) + if err != nil { + rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) + return + } + + route := fmt.Sprintf("custom/%s/%s", types.QuerierRoute, queryPath) + res, height, err := cliCtx.QueryWithData(route, bz) + if err != nil { + rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) + return + } + + cliCtx = cliCtx.WithHeight(height) + rest.PostProcessResponse(w, cliCtx, res) + } +} + // GET request handler to query params of POT module func sdsParamsHandlerFn(clientCtx client.Context, queryPath string) http.HandlerFunc { diff --git a/x/sds/keeper/querier.go b/x/sds/keeper/querier.go index 7a90d36a..77e8a5fb 100644 --- a/x/sds/keeper/querier.go +++ b/x/sds/keeper/querier.go @@ -17,7 +17,7 @@ import ( func NewQuerier(k Keeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier { return func(ctx sdk.Context, path []string, req abci.RequestQuery) ([]byte, error) { switch path[0] { - case types.QueryUploadedFile: + case types.QueryFileUpload: return queryUploadedFileByHash(ctx, req, k, legacyQuerierCdc) case types.QuerySimulatePrepay: return querySimulatePrepay(ctx, req, k, legacyQuerierCdc) @@ -45,7 +45,13 @@ func getSdsParams(ctx sdk.Context, req abci.RequestQuery, k Keeper, legacyQuerie // queryFileHash fetch a file's hash for the supplied height. func queryUploadedFileByHash(ctx sdk.Context, req abci.RequestQuery, k Keeper, legacyQuerierCdc *codec.LegacyAmino) ([]byte, error) { - fileInfo, found := k.GetFileInfoByFileHash(ctx, req.Data) + var params types.QueryFileUploadParams + err := legacyQuerierCdc.UnmarshalJSON(req.Data, ¶ms) + if err != nil { + return nil, sdkerrors.Wrap(sdkerrors.ErrJSONUnmarshal, err.Error()) + } + + fileInfo, found := k.GetFileInfoByFileHash(ctx, []byte(params.FileHash)) if !found { return nil, types.ErrNoFileFound } diff --git a/x/sds/types/querier.go b/x/sds/types/querier.go index 6b26c61f..5d407f92 100644 --- a/x/sds/types/querier.go +++ b/x/sds/types/querier.go @@ -1,23 +1,21 @@ package types -import "github.com/cosmos/cosmos-sdk/types" - // querier keys const ( QueryParams = "params" - QueryUploadedFile = "uploaded_file" + QueryFileUpload = "file_upload" QuerySimulatePrepay = "simulate_prepay" QueryCurrNozPrice = "curr_noz_price" QueryNozSupply = "noz_supply" ) -type QueryUploadedFileParams struct { - Sender types.AccAddress `json:"sender" yaml:"sender"` +type QueryFileUploadParams struct { + FileHash string `json:"file_hash" yaml:"file_hash"` } // NewQueryUploadedFileParams creates a new instance of QueryValidatorSlashesParams -func NewQueryUploadedFileParams(sender types.AccAddress) QueryUploadedFileParams { - return QueryUploadedFileParams{ - Sender: sender, +func NewQueryFileUploadParams(fileHash string) QueryFileUploadParams { + return QueryFileUploadParams{ + FileHash: fileHash, } } From b575a43ac325482038681e0f8c1d8b4ac5aae3b5 Mon Sep 17 00:00:00 2001 From: alexstratos <58865166+alexstratos@users.noreply.github.com> Date: Fri, 19 May 2023 08:54:46 -0400 Subject: [PATCH 66/95] Release to dev (#268) * add report owner validation for MsgVolumeReport/MsgSlashingResourceNode (#233) * rebase and solve conflicts * remove unnecessary file * update golang version --------- Co-authored-by: Xixiong Chen <60588630+Xiong-stratos@users.noreply.github.com> Co-authored-by: weichen-qsnetwork --- Dockerfile | 55 +++++++++++++++++++++++++++++++++------------------ Makefile | 9 ++++++++- entrypoint.sh | 28 ++++++++++++++++++++++++++ 3 files changed, 72 insertions(+), 20 deletions(-) create mode 100644 entrypoint.sh diff --git a/Dockerfile b/Dockerfile index e9f9d443..4cf45b02 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,41 +1,58 @@ -# Simple usage with a mounted data directory: -# > docker build -t stratos-chain . -# > docker run -it -p 46657:46657 -p 46656:46656 -v ~/.stratos-chain:/stratos-chain/.stratos-chain stratos-chain stratos-chain init -# > docker run -it -p 46657:46657 -p 46656:46656 -v ~/.stratos-chain:/stratos-chain/.stratos-chain stratos-chain stratos-chain start -FROM golang:1.15-alpine AS build-env +FROM golang:1.19-alpine AS build-env # Set up dependencies -ENV PACKAGES curl make git libc-dev bash gcc linux-headers eudev-dev python3 +ENV PACKAGES curl make git libc-dev bash gcc linux-headers eudev-dev python3 \ + gmp-dev flex bison + +# Install minimum necessary dependencies +RUN apk add --no-cache $PACKAGES +# Install pdc +RUN wget https://crypto.stanford.edu/pbc/files/pbc-0.5.14.tar.gz \ + && tar -xf pbc-0.5.14.tar.gz \ + && cd pbc-0.5.14/ \ + && ./configure \ + && make \ + && make install \ + && ldconfig / \ + && cd .. && rm -rf pbc-0.5.14/ pbc-0.5.14.tar.gz # Set working directory for the build WORKDIR /go/src/github.com/stratosnet/stratos-chain # Add source files COPY . . +RUN make install -RUN go version - -# Install minimum necessary dependencies, build Cosmos SDK, remove packages -RUN apk add --no-cache $PACKAGES && \ - make install # Final image FROM alpine:edge -ENV STRATOS /stchaind +ENV WORK_DIR /stchaind +ENV RUN_AS_USER stratos # Install ca-certificates -RUN apk add --update ca-certificates +RUN apk add --update ca-certificates gmp-dev -RUN addgroup stratos && \ - adduser -S -G stratos stratos -h "$STRATOS" +ARG chain_id +ARG moniker +ARG uid=2048 +ARG gid=2048 -USER stratos +RUN addgroup --gid $gid "$RUN_AS_USER" && \ + adduser -S -G "$RUN_AS_USER" --uid $uid "$RUN_AS_USER" -h "$WORK_DIR" -WORKDIR $STRATOS +ENV CHAIN_ID=${chain_id:-DEFAULT} +ENV MONIKER=${moniker:-stratos-node} +WORKDIR $WORK_DIR # Copy over binaries from the build-env COPY --from=build-env /go/bin/stchaind /usr/bin/stchaind +COPY --from=build-env /usr/local/lib/libpbc.so.1.0.0 /usr/local/lib/libpbc.so.1.0.0 + +RUN cd /usr/local/lib && { ln -s -f libpbc.so.1.0.0 libpbc.so.1 || { rm -f libpbc.so.1 && ln -s libpbc.so.1.0.0 libpbc.so.1; }; } \ + && cd /usr/local/lib && { ln -s -f libpbc.so.1.0.0 libpbc.so || { rm -f libpbc.so && ln -s libpbc.so.1.0.0 libpbc.so; }; } -# Run stchaind by default, omit entrypoint to ease using container with stchaincli -CMD ["stchaind"] +COPY entrypoint.sh /usr/bin/entrypoint.sh +RUN chmod +x /usr/bin/entrypoint.sh +ENTRYPOINT ["/usr/bin/entrypoint.sh"] +CMD ["stchaind start"] diff --git a/Makefile b/Makefile index e2b92ac3..71ef3573 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,5 @@ +#!/usr/bin/make -f + BUILDDIR ?= $(CURDIR)/build APP_VER := v0.10.0 @@ -5,7 +7,7 @@ COMMIT := $(GIT_COMMIT_HASH) TEST_DOCKER_REPO=stratos-chain-e2e ifeq ($(COMMIT),) - VERSION := $(APP_VER) + VERSION := $(APP_VER) else VERSION := $(APP_VER)-$(COMMIT) endif @@ -66,4 +68,9 @@ build-docker-e2e: @docker tag ${TEST_DOCKER_REPO}:$(shell git rev-parse --short HEAD) ${TEST_DOCKER_REPO}:$(shell git rev-parse --abbrev-ref HEAD | sed 's#/#_#g') @docker tag ${TEST_DOCKER_REPO}:$(shell git rev-parse --short HEAD) ${TEST_DOCKER_REPO}:latest +build-docker: + @docker build -f Dockerfile -t ${TEST_DOCKER_REPO}:$(shell git rev-parse --short HEAD) --build-arg uid=$(shell id -u) --build-arg gid=$(shell id -g) . + @docker tag ${TEST_DOCKER_REPO}:$(shell git rev-parse --short HEAD) ${TEST_DOCKER_REPO}:$(shell git rev-parse --abbrev-ref HEAD | sed 's#/#_#g') + @docker tag ${TEST_DOCKER_REPO}:$(shell git rev-parse --short HEAD) ${TEST_DOCKER_REPO}:latest + .PHONY: build-linux build-mac build clean diff --git a/entrypoint.sh b/entrypoint.sh new file mode 100644 index 00000000..6bcf264e --- /dev/null +++ b/entrypoint.sh @@ -0,0 +1,28 @@ +#!/bin/sh +chown -R $RUN_AS_USER $WORK_DIR + +if [ ! -d "$WORK_DIR/.stchaind" ] +then + echo "[entrypoint] Init stratos node..." + su -s /bin/sh - $RUN_AS_USER -c "stchaind init stratos-node" + + if [ "$CHAIN_ID" == "DEFAULT" ] + then + genesis_file_URL=https://raw.githubusercontent.com/stratosnet/stratos-chain-testnet/main/genesis.json + config_file_URL=https://raw.githubusercontent.com/stratosnet/stratos-chain-testnet/main/config.toml + else + genesis_file_URL=https://raw.githubusercontent.com/stratosnet/stratos-chain-testnet/main/$CHAIN_ID/genesis.json + config_file_URL=https://raw.githubusercontent.com/stratosnet/stratos-chain-testnet/main/$CHAIN_ID/config.toml + fi + + echo "[entrypoint] Download genesis.json from $genesis_file_URL" + su -s /bin/sh - $RUN_AS_USER -c "wget $genesis_file_URL -O $WORK_DIR/.stchaind/config/genesis.json" + + echo "[entrypoint] Download config.toml from $config_file_URL" + su -s /bin/sh - $RUN_AS_USER -c "wget $config_file_URL -O $WORK_DIR/.stchaind/config/config.toml" + + echo "[entrypoint] Set the node moniker to '$MONIKER'" + su -s /bin/sh - $RUN_AS_USER -c "sed -i 's/moniker = \".*\"/moniker = \"'$MONIKER'\"/g' $WORK_DIR/.stchaind/config/config.toml" +fi + +su -s /bin/sh - $RUN_AS_USER -c "$@" From ee7f85093a8e32eed2a45c8e23d56743372b9935 Mon Sep 17 00:00:00 2001 From: Xiong Date: Mon, 15 May 2023 18:01:18 -0400 Subject: [PATCH 67/95] fix missing access control --- x/pot/keeper/msg_server.go | 4 ++++ x/register/keeper/msg_server.go | 4 ++++ x/register/types/errors.go | 4 ++-- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/x/pot/keeper/msg_server.go b/x/pot/keeper/msg_server.go index 6aadae68..33af7159 100644 --- a/x/pot/keeper/msg_server.go +++ b/x/pot/keeper/msg_server.go @@ -208,6 +208,10 @@ func (k msgServer) HandleMsgFoundationDeposit(goCtx context.Context, msg *types. func (k msgServer) HandleMsgSlashingResourceNode(goCtx context.Context, msg *types.MsgSlashingResourceNode) (*types.MsgSlashingResourceNodeResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) + if len(msg.Reporters) == 0 || len(msg.ReporterOwner) == 0 { + return &types.MsgSlashingResourceNodeResponse{}, types.ErrReporterAddressOrOwner + } + reporterOwners := msg.ReporterOwner for idx, reporter := range msg.Reporters { reporterSdsAddr, err := stratos.SdsAddressFromBech32(reporter) diff --git a/x/register/keeper/msg_server.go b/x/register/keeper/msg_server.go index 04c46093..82a94d98 100644 --- a/x/register/keeper/msg_server.go +++ b/x/register/keeper/msg_server.go @@ -312,6 +312,10 @@ func (k msgServer) HandleMsgUpdateResourceNodeStake(goCtx context.Context, msg * func (k msgServer) HandleMsgUpdateEffectiveStake(goCtx context.Context, msg *types.MsgUpdateEffectiveStake) (*types.MsgUpdateEffectiveStakeResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) + if len(msg.Reporters) == 0 || len(msg.ReporterOwner) == 0 { + return &types.MsgUpdateEffectiveStakeResponse{}, types.ErrReporterAddressOrOwner + } + reporterOwners := msg.ReporterOwner validReporterCount := 0 for idx, reporter := range msg.Reporters { diff --git a/x/register/types/errors.go b/x/register/types/errors.go index 62e2c437..7900f60f 100644 --- a/x/register/types/errors.go +++ b/x/register/types/errors.go @@ -64,7 +64,7 @@ const ( codeErrInvalidSuspensionStatForUnbondNode codeErrReporterAddress codeErrInvalidAmount - codeErrReporterNotReachThreshold + codeErrReporterAddressOrOwner ) var ( @@ -127,5 +127,5 @@ var ( ErrInvalidSuspensionStatForUnbondNode = sdkerrors.Register(ModuleName, codeErrInvalidSuspensionStatForUnbondNode, "cannot unbond a suspended node") ErrReporterAddress = sdkerrors.Register(ModuleName, codeErrReporterAddress, "invalid reporter address") ErrInvalidAmount = sdkerrors.Register(ModuleName, codeErrInvalidAmount, "invalid amount") - ErrReporterNotReachThreshold = sdkerrors.Register(ModuleName, codeErrReporterNotReachThreshold, "reporter meta-nodes does not reach the threshold") + ErrReporterAddressOrOwner = sdkerrors.Register(ModuleName, codeErrReporterAddressOrOwner, "invalid reporter address or owner address") ) From c4dc940a16d3a59874fdcae17fff21d8081dd5b6 Mon Sep 17 00:00:00 2001 From: jialbai Date: Tue, 16 May 2023 11:41:26 -0400 Subject: [PATCH 68/95] - qb1840: vote pool related optimization --- proto/stratos/register/v1/register.proto | 10 + proto/stratos/register/v1/tx.proto | 20 +- x/register/keeper/keeper.go | 5 + x/register/keeper/meta_node.go | 91 +++- x/register/keeper/msg_server.go | 37 +- x/register/keeper/params.go | 6 + x/register/keeper/store.go | 5 + x/register/types/events.go | 22 +- x/register/types/meta_node.go | 1 + x/register/types/msg.go | 58 ++- x/register/types/params.go | 23 +- x/register/types/register.pb.go | 333 ++++++++----- x/register/types/tx.pb.go | 570 +++++++++++++++++++---- x/register/types/tx.pb.gw.go | 80 ++++ 14 files changed, 1009 insertions(+), 252 deletions(-) diff --git a/proto/stratos/register/v1/register.proto b/proto/stratos/register/v1/register.proto index f132a01e..8e39d022 100644 --- a/proto/stratos/register/v1/register.proto +++ b/proto/stratos/register/v1/register.proto @@ -42,6 +42,12 @@ message Params { (gogoproto.jsontag) = "resource_node_min_stake", (gogoproto.moretags) = "yaml:\"resource_node_min_stake\"" ]; + google.protobuf.Duration voting_validity_period = 7 [ + (gogoproto.nullable) = false, + (gogoproto.stdduration) = true, + (gogoproto.jsontag) = "voting_validity_period", + (gogoproto.moretags) = "yaml:\"voting_validity_period\"" + ]; } message ResourceNode { @@ -159,6 +165,10 @@ message MetaNodeRegistrationVotePool { (gogoproto.jsontag) = "expire_time", (gogoproto.moretags) = "yaml:\"expire_time\"" ]; + bool is_vote_passed = 5 [ + (gogoproto.jsontag) = "is_vote_passed", + (gogoproto.moretags) = "yaml:\"is_vote_passed\"" + ]; } message Description { diff --git a/proto/stratos/register/v1/tx.proto b/proto/stratos/register/v1/tx.proto index ec13c4ac..64a6e83d 100644 --- a/proto/stratos/register/v1/tx.proto +++ b/proto/stratos/register/v1/tx.proto @@ -46,6 +46,9 @@ service Msg { rpc HandleMsgMetaNodeRegistrationVote(MsgMetaNodeRegistrationVote) returns (MsgMetaNodeRegistrationVoteResponse) { option (google.api.http).post = "/stratos/register/v1/meta_node_registration_vote"; }; + rpc HandleMsgWithdrawMetaNodeRegistrationStake(MsgWithdrawMetaNodeRegistrationStake) returns (MsgWithdrawMetaNodeRegistrationStakeResponse) { + option (google.api.http).post = "/stratos/register/v1/withdraw_meta_node_registration_stake"; + }; } @@ -287,5 +290,20 @@ message MsgMetaNodeRegistrationVote { ]; // address of owner of the voter (other existed meta node) } -// MsgUpdateResourceNodeStakeResponse defines the Msg/MetaNodeRegistrationVote response type. +// MsgMetaNodeRegistrationVoteResponse defines the Msg/MetaNodeRegistrationVote response type. message MsgMetaNodeRegistrationVoteResponse {} + +// MsgWithdrawMetaNodeRegistrationStake defines a SDK message for withdrawing registration stake of meta node. +message MsgWithdrawMetaNodeRegistrationStake { + string network_address = 1 [ + (gogoproto.jsontag) = "network_address", + (gogoproto.moretags) = "yaml:\"network_address\"" + ]; // node address of meta node + string owner_address = 2 [ + (gogoproto.jsontag) = "owner_address", + (gogoproto.moretags) = "yaml:\"owner_address\"" + ]; // owner address of meta node +} + +// MsgWithdrawMetaNodeRegistrationStakeResponse defines the Msg/WithdrawMetaNodeRegistrationStake response type. +message MsgWithdrawMetaNodeRegistrationStakeResponse {} diff --git a/x/register/keeper/keeper.go b/x/register/keeper/keeper.go index 9274b295..27328609 100644 --- a/x/register/keeper/keeper.go +++ b/x/register/keeper/keeper.go @@ -395,6 +395,11 @@ func (k Keeper) UnbondMetaNode(ctx sdk.Context, metaNode types.MetaNode, amt sdk k.SetBondedMetaNodeCnt(ctx, count) // set meta node k.SetMetaNode(ctx, metaNode) + // remove record from vote pool + if _, found := k.GetMetaNodeRegistrationVotePool(ctx, networkAddr); found { + ctx.Logger().Info("DeleteMetaNodeRegistrationVotePool of meta node " + networkAddr.String()) + k.DeleteMetaNodeRegistrationVotePool(ctx, networkAddr) + } } // Set the unbonding mature time and completion height appropriately diff --git a/x/register/keeper/meta_node.go b/x/register/keeper/meta_node.go index d894dfce..a2f5dade 100644 --- a/x/register/keeper/meta_node.go +++ b/x/register/keeper/meta_node.go @@ -16,8 +16,7 @@ import ( ) const ( - metaNodeCacheSize = 500 - votingValidityPeriodInSecond = 7 * 24 * 60 * 60 // 7 days + metaNodeCacheSize = 500 ) // Cache the proto decoding of meta nodes, as it can be the case that repeated slashing calls @@ -125,7 +124,7 @@ func (k Keeper) RegisterMetaNode(ctx sdk.Context, networkAddr stratos.SdsAddress var approveList = make([]stratos.SdsAddress, 0) var rejectList = make([]stratos.SdsAddress, 0) - votingValidityPeriod := votingValidityPeriodInSecond * time.Second + votingValidityPeriod := k.VotingValidityPeriod(ctx) expireTime := ctx.BlockHeader().Time.Add(votingValidityPeriod) votePool := types.NewRegistrationVotePool(networkAddr, approveList, rejectList, expireTime) @@ -316,40 +315,88 @@ func (k Keeper) GetMetaNodeListByMoniker(ctx sdk.Context, moniker string) (resou return resourceNodes, nil } +func (k Keeper) WithdrawMetaNodeRegistrationStake(ctx sdk.Context, networkAddr stratos.SdsAddress, ownerAddr sdk.AccAddress) ( + unbondingMatureTime time.Time, err error) { + + node, found := k.GetMetaNode(ctx, networkAddr) + if !found { + return time.Time{}, types.ErrNoMetaNodeFound + } + if node.GetOwnerAddress() != ownerAddr.String() { + return time.Time{}, types.ErrInvalidOwnerAddr + } + votePool, exist := k.GetMetaNodeRegistrationVotePool(ctx, networkAddr) + if !exist { + return time.Time{}, types.ErrNoRegistrationVotePoolFound + } + // to be qualified to withdraw, meta node must be unbonded && suspended && of non-passed vote + if node.Status != stakingtypes.Unbonded || !node.Suspend || votePool.IsVotePassed { + return time.Time{}, types.ErrInvalidNodeStat + } + // check available_stake (node_token - unbonding_token > amt_to_withdraw) + unbondingStake := k.GetUnbondingNodeBalance(ctx, networkAddr) + availableStake := node.Tokens.Sub(unbondingStake) + if availableStake.LTE(sdk.ZeroInt()) { + return time.Time{}, types.ErrInsufficientBalance + } + if k.HasMaxUnbondingNodeEntries(ctx, networkAddr) { + return time.Time{}, types.ErrMaxUnbondingNodeEntries + } + unbondingMatureTime = calcUnbondingMatureTime(ctx, node.Status, node.CreationTime, k.UnbondingThreasholdTime(ctx), k.UnbondingCompletionTime(ctx)) + + // Set the unbonding mature time and completion height appropriately + unbondingNode := k.SetUnbondingNodeEntry(ctx, networkAddr, true, ctx.BlockHeight(), unbondingMatureTime, availableStake) + // Add to unbonding node queue + k.InsertUnbondingNodeQueue(ctx, unbondingNode, unbondingMatureTime) + ctx.Logger().Info("Unbonding meta node " + unbondingNode.String() + "\n after mature time" + unbondingMatureTime.String()) + + // all stake is being unbonded, update status to Unbonding + node.Status = stakingtypes.Unbonding + k.SetMetaNode(ctx, node) + + // remove from cache just in case + k.RemoveMetaNodeFromBitMapIdxCache(networkAddr) + // delete vote pool after withdraw is done + k.DeleteMetaNodeRegistrationVotePool(ctx, networkAddr) + + return unbondingMatureTime, nil +} + func (k Keeper) HandleVoteForMetaNodeRegistration(ctx sdk.Context, candidateNetworkAddr stratos.SdsAddress, candidateOwnerAddr sdk.AccAddress, - opinion types.VoteOpinion, voterNetworkAddr stratos.SdsAddress, voterOwnerAddr sdk.AccAddress) (nodeStatus stakingtypes.BondStatus, err error) { + opinion types.VoteOpinion, voterNetworkAddr stratos.SdsAddress, voterOwnerAddr sdk.AccAddress) (nodeStatus stakingtypes.BondStatus, isPassingVote bool, err error) { + isPassingVote = false // voter validation voterNode, found := k.GetMetaNode(ctx, voterNetworkAddr) if !found { - return stakingtypes.Unbonded, types.ErrNoVoterMetaNodeFound + return stakingtypes.Unbonded, isPassingVote, types.ErrNoVoterMetaNodeFound } if voterNode.GetOwnerAddress() != voterOwnerAddr.String() { - return stakingtypes.Unbonded, types.ErrInvalidVoterOwnerAddr + return stakingtypes.Unbonded, isPassingVote, types.ErrInvalidVoterOwnerAddr } if voterNode.Status != stakingtypes.Bonded || voterNode.Suspend { - return stakingtypes.Unbonded, types.ErrInvalidVoterStatus + return stakingtypes.Unbonded, isPassingVote, types.ErrInvalidVoterStatus } // candidate validation candidateNode, found := k.GetMetaNode(ctx, candidateNetworkAddr) if !found { - return stakingtypes.Unbonded, types.ErrNoCandidateMetaNodeFound + return stakingtypes.Unbonded, isPassingVote, types.ErrNoCandidateMetaNodeFound } if candidateNode.GetOwnerAddress() != candidateOwnerAddr.String() { - return candidateNode.Status, types.ErrInvalidCandidateOwnerAddr + return candidateNode.Status, isPassingVote, types.ErrInvalidCandidateOwnerAddr } // vote validation and handle voting votePool, found := k.GetMetaNodeRegistrationVotePool(ctx, candidateNetworkAddr) if !found { - return stakingtypes.Unbonded, types.ErrNoRegistrationVotePoolFound + return stakingtypes.Unbonded, isPassingVote, types.ErrNoRegistrationVotePoolFound } if votePool.ExpireTime.Before(ctx.BlockHeader().Time) { - return stakingtypes.Unbonded, types.ErrVoteExpired + return stakingtypes.Unbonded, isPassingVote, types.ErrVoteExpired } if hasStringValue(votePool.ApproveList, voterNetworkAddr.String()) || hasStringValue(votePool.RejectList, voterNetworkAddr.String()) { - return stakingtypes.Unbonded, types.ErrDuplicateVoting + return stakingtypes.Unbonded, isPassingVote, types.ErrDuplicateVoting } if opinion.Equal(types.Approve) { @@ -359,10 +406,12 @@ func (k Keeper) HandleVoteForMetaNodeRegistration(ctx sdk.Context, candidateNetw } k.SetMetaNodeRegistrationVotePool(ctx, votePool) - if candidateNode.Status == stakingtypes.Bonded { - return candidateNode.Status, nil + // if vote had already passed before + if votePool.IsVotePassed { + return candidateNode.Status, isPassingVote, nil } + //if vote is yet to pass totalSpCount := len(k.GetAllValidMetaNodes(ctx)) voteCountRequiredToPass := totalSpCount*2/3 + 1 //unbounded to bounded @@ -381,26 +430,30 @@ func (k Keeper) HandleVoteForMetaNodeRegistration(ctx sdk.Context, candidateNetw k.SetBondedMetaNodeCnt(ctx, count) // move stake from not bonded pool to bonded pool tokenToBond := sdk.NewCoin(k.BondDenom(ctx), candidateNode.Tokens) - // sub coins from not bonded pool nBondedMetaAccountAddr := k.accountKeeper.GetModuleAddress(types.MetaNodeNotBondedPool) if nBondedMetaAccountAddr == nil { ctx.Logger().Error("not bonded account address for meta nodes does not exist.") - return candidateNode.Status, types.ErrUnknownAccountAddress + return candidateNode.Status, isPassingVote, types.ErrUnknownAccountAddress } hasCoin := k.bankKeeper.HasBalance(ctx, nBondedMetaAccountAddr, tokenToBond) if !hasCoin { - return candidateNode.Status, types.ErrInsufficientBalance + return candidateNode.Status, isPassingVote, types.ErrInsufficientBalance } err = k.bankKeeper.SendCoinsFromModuleToModule(ctx, types.MetaNodeNotBondedPool, types.MetaNodeBondedPool, sdk.NewCoins(tokenToBond)) if err != nil { - return candidateNode.Status, err + return candidateNode.Status, isPassingVote, err } + + votePool.IsVotePassed = true + k.SetMetaNodeRegistrationVotePool(ctx, votePool) + // mark this vote as passing vote + isPassingVote = true } - return candidateNode.Status, nil + return candidateNode.Status, isPassingVote, nil } func (k Keeper) UpdateMetaNode(ctx sdk.Context, description types.Description, diff --git a/x/register/keeper/msg_server.go b/x/register/keeper/msg_server.go index 82a94d98..8834913c 100644 --- a/x/register/keeper/msg_server.go +++ b/x/register/keeper/msg_server.go @@ -212,7 +212,7 @@ func (k msgServer) HandleMsgMetaNodeRegistrationVote(goCtx context.Context, msg return &types.MsgMetaNodeRegistrationVoteResponse{}, sdkerrors.Wrap(types.ErrInvalidVoterOwnerAddr, err.Error()) } - nodeStatus, err := k.HandleVoteForMetaNodeRegistration( + nodeStatus, isPassingVote, err := k.HandleVoteForMetaNodeRegistration( ctx, candidateNetworkAddress, candidateOwnerAddress, types.VoteOpinion(msg.Opinion), voterNetworkAddress, voterOwnerAddress) if err != nil { return &types.MsgMetaNodeRegistrationVoteResponse{}, sdkerrors.Wrap(types.ErrVoteMetaNode, err.Error()) @@ -225,6 +225,7 @@ func (k msgServer) HandleMsgMetaNodeRegistrationVote(goCtx context.Context, msg sdk.NewAttribute(types.AttributeKeyVoterNetworkAddress, msg.VoterNetworkAddress), sdk.NewAttribute(types.AttributeKeyCandidateNetworkAddress, msg.CandidateNetworkAddress), sdk.NewAttribute(types.AttributeKeyCandidateStatus, nodeStatus.String()), + sdk.NewAttribute(types.AttributeKeyIsPassingVote, strconv.FormatBool(isPassingVote)), ), sdk.NewEvent( sdk.EventTypeMessage, @@ -236,6 +237,40 @@ func (k msgServer) HandleMsgMetaNodeRegistrationVote(goCtx context.Context, msg return &types.MsgMetaNodeRegistrationVoteResponse{}, nil } +func (k msgServer) HandleMsgWithdrawMetaNodeRegistrationStake(goCtx context.Context, msg *types.MsgWithdrawMetaNodeRegistrationStake) (*types.MsgWithdrawMetaNodeRegistrationStakeResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + networkAddr, err := stratos.SdsAddressFromBech32(msg.GetNetworkAddress()) + if err != nil { + return &types.MsgWithdrawMetaNodeRegistrationStakeResponse{}, sdkerrors.Wrap(types.ErrInvalidNetworkAddr, err.Error()) + } + ownerAddr, err := sdk.AccAddressFromBech32(msg.GetOwnerAddress()) + if err != nil { + return &types.MsgWithdrawMetaNodeRegistrationStakeResponse{}, types.ErrInvalidOwnerAddr + } + + completionTime, err := k.WithdrawMetaNodeRegistrationStake(ctx, networkAddr, ownerAddr) + if err != nil { + return &types.MsgWithdrawMetaNodeRegistrationStakeResponse{}, sdkerrors.Wrap(types.ErrUnbondMetaNode, err.Error()) + } + + ctx.EventManager().EmitEvents(sdk.Events{ + sdk.NewEvent( + types.EventTypeWithdrawMetaNodeRegistrationStake, + sdk.NewAttribute(sdk.AttributeKeySender, msg.OwnerAddress), + sdk.NewAttribute(types.AttributeKeyNetworkAddress, msg.NetworkAddress), + sdk.NewAttribute(types.AttributeKeyUnbondingMatureTime, completionTime.Format(time.RFC3339)), + ), + sdk.NewEvent( + sdk.EventTypeMessage, + sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory), + sdk.NewAttribute(sdk.AttributeKeySender, msg.OwnerAddress), + ), + }) + + return &types.MsgWithdrawMetaNodeRegistrationStakeResponse{}, nil +} + func (k msgServer) HandleMsgUpdateResourceNode(goCtx context.Context, msg *types.MsgUpdateResourceNode) (*types.MsgUpdateResourceNodeResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) diff --git a/x/register/keeper/params.go b/x/register/keeper/params.go index 906bd53c..96d8c83e 100644 --- a/x/register/keeper/params.go +++ b/x/register/keeper/params.go @@ -53,3 +53,9 @@ func (k Keeper) ResourceNodeMinStake(ctx sdk.Context) (res sdk.Coin) { k.paramSpace.Get(ctx, types.KeyResourceNodeMinStake, &res) return } + +// VotingValidityPeriod +func (k Keeper) VotingValidityPeriod(ctx sdk.Context) (res time.Duration) { + k.paramSpace.Get(ctx, types.KeyVotingValidityPeriod, &res) + return +} diff --git a/x/register/keeper/store.go b/x/register/keeper/store.go index 8ee9b8de..5578b5b0 100644 --- a/x/register/keeper/store.go +++ b/x/register/keeper/store.go @@ -146,6 +146,11 @@ func (k Keeper) GetBondedMetaNodeCnt(ctx sdk.Context) (balance sdk.Int) { return } +func (k Keeper) DeleteMetaNodeRegistrationVotePool(ctx sdk.Context, nodeAddr stratos.SdsAddress) { + store := ctx.KVStore(k.storeKey) + store.Delete(types.GetMetaNodeRegistrationVotesKey(nodeAddr)) +} + func (k Keeper) SetMetaNodeRegistrationVotePool(ctx sdk.Context, votePool types.MetaNodeRegistrationVotePool) { nodeAddr := votePool.GetNetworkAddress() store := ctx.KVStore(k.storeKey) diff --git a/x/register/types/events.go b/x/register/types/events.go index c96f0589..d38be7aa 100644 --- a/x/register/types/events.go +++ b/x/register/types/events.go @@ -4,16 +4,17 @@ const ( EventTypeCompleteUnbondingResourceNode = "complete_unbonding_resource_node" EventTypeCompleteUnbondingMetaNode = "complete_unbonding_meta_node" - EventTypeCreateResourceNode = "create_resource_node" - EventTypeUnbondingResourceNode = "unbonding_resource_node" - EventTypeUpdateResourceNode = "update_resource_node" - EventTypeUpdateResourceNodeStake = "update_resource_node_stake" - EventTypeUpdateEffectiveStake = "update_effective_stake" - EventTypeCreateMetaNode = "create_meta_node" - EventTypeUnbondingMetaNode = "unbonding_Meta_node" - EventTypeUpdateMetaNode = "update_meta_node" - EventTypeUpdateMetaNodeStake = "update_meta_node_stake" - EventTypeMetaNodeRegistrationVote = "meta_node_reg_vote" + EventTypeCreateResourceNode = "create_resource_node" + EventTypeUnbondingResourceNode = "unbonding_resource_node" + EventTypeUpdateResourceNode = "update_resource_node" + EventTypeUpdateResourceNodeStake = "update_resource_node_stake" + EventTypeUpdateEffectiveStake = "update_effective_stake" + EventTypeCreateMetaNode = "create_meta_node" + EventTypeUnbondingMetaNode = "unbonding_Meta_node" + EventTypeUpdateMetaNode = "update_meta_node" + EventTypeUpdateMetaNodeStake = "update_meta_node_stake" + EventTypeMetaNodeRegistrationVote = "meta_node_reg_vote" + EventTypeWithdrawMetaNodeRegistrationStake = "withdraw_meta_node_reg_stake" AttributeKeyResourceNode = "resource_node" AttributeKeyMetaNode = "meta_node" @@ -22,6 +23,7 @@ const ( AttributeKeyCandidateNetworkAddress = "candidate_network_address" AttributeKeyVoterNetworkAddress = "voter_network_address" AttributeKeyCandidateStatus = "candidate_status" + AttributeKeyIsPassingVote = "is_passing_vote" AttributeKeyUnbondingMatureTime = "unbonding_mature_time" diff --git a/x/register/types/meta_node.go b/x/register/types/meta_node.go index 06dbe6e6..bbc91c28 100644 --- a/x/register/types/meta_node.go +++ b/x/register/types/meta_node.go @@ -231,6 +231,7 @@ func NewRegistrationVotePool(nodeAddress stratos.SdsAddress, approveList []strat ApproveList: approveSlice, RejectList: rejectSlice, ExpireTime: expireTime, + IsVotePassed: false, } } diff --git a/x/register/types/msg.go b/x/register/types/msg.go index cbad0681..abf268e0 100644 --- a/x/register/types/msg.go +++ b/x/register/types/msg.go @@ -23,16 +23,17 @@ var ( // message type and route constants const ( - TypeMsgCreateResourceNode = "create_resource_node" - TypeMsgRemoveResourceNode = "remove_resource_node" - TypeMsgUpdateResourceNode = "update_resource_node" - TypeMsgUpdateResourceNodeStake = "update_resource_node_stake" - TypeMsgUpdateEffectiveStake = "update_effective_stake" - TypeMsgCreateMetaNode = "create_meta_node" - TypeMsgRemoveMetaNode = "remove_meta_node" - TypeMsgUpdateMetaNode = "update_meta_node" - TypeMsgUpdateMetaNodeStake = "update_meta_node_stake" - TypeMsgMetaNodeRegistrationVote = "meta_node_registration_vote" + TypeMsgCreateResourceNode = "create_resource_node" + TypeMsgRemoveResourceNode = "remove_resource_node" + TypeMsgUpdateResourceNode = "update_resource_node" + TypeMsgUpdateResourceNodeStake = "update_resource_node_stake" + TypeMsgUpdateEffectiveStake = "update_effective_stake" + TypeMsgCreateMetaNode = "create_meta_node" + TypeMsgRemoveMetaNode = "remove_meta_node" + TypeMsgUpdateMetaNode = "update_meta_node" + TypeMsgUpdateMetaNodeStake = "update_meta_node_stake" + TypeMsgMetaNodeRegistrationVote = "meta_node_registration_vote" + TypeMsgWithdrawMetaNodeRegistrationStake = "withdraw_meta_node_registration_stake" ) // NewMsgCreateResourceNode NewMsg creates a new Msg instance @@ -678,3 +679,40 @@ func (m MsgUpdateEffectiveStake) GetSigners() []sdk.AccAddress { } return addrs } + +func NewMsgWithdrawMetaNodeRegistrationStake(networkAddress stratos.SdsAddress, ownerAddress sdk.AccAddress) *MsgWithdrawMetaNodeRegistrationStake { + return &MsgWithdrawMetaNodeRegistrationStake{ + NetworkAddress: networkAddress.String(), + OwnerAddress: ownerAddress.String(), + } +} + +func (mmsg MsgWithdrawMetaNodeRegistrationStake) Route() string { return RouterKey } + +func (msg MsgWithdrawMetaNodeRegistrationStake) Type() string { + return TypeMsgWithdrawMetaNodeRegistrationStake +} + +func (msg MsgWithdrawMetaNodeRegistrationStake) ValidateBasic() error { + ownerAddr, err := sdk.AccAddressFromBech32(msg.OwnerAddress) + if err != nil { + return ErrInvalidOwnerAddr + } + if ownerAddr.Empty() { + return ErrEmptyOwnerAddr + } + return nil +} + +func (msg MsgWithdrawMetaNodeRegistrationStake) GetSignBytes() []byte { + bz := ModuleCdc.MustMarshalJSON(&msg) + return sdk.MustSortJSON(bz) +} + +func (msg MsgWithdrawMetaNodeRegistrationStake) GetSigners() []sdk.AccAddress { + addr, err := sdk.AccAddressFromBech32(msg.OwnerAddress) + if err != nil { + panic(err) + } + return []sdk.AccAddress{addr.Bytes()} +} diff --git a/x/register/types/params.go b/x/register/types/params.go index ea7c7698..03b06a27 100644 --- a/x/register/types/params.go +++ b/x/register/types/params.go @@ -29,9 +29,11 @@ var ( KeyMaxEntries = []byte("MaxEntries") KeyResourceNodeRegEnabled = []byte("ResourceNodeRegEnabled") KeyResourceNodeMinStake = []byte("ResourceNodeMinStake") + KeyVotingValidityPeriod = []byte("VotingValidityPeriod") DefaultUnbondingThreasholdTime = 180 * 24 * time.Hour // threashold for unbonding - by default 180 days DefaultUnbondingCompletionTime = 14 * 24 * time.Hour // lead time to complete unbonding - by default 14 days + DefaultVotingValidityPeriod = 7 * 24 * time.Hour // expiration time of registration voting - by default 7 days DefaultStakeNozRate = sdk.NewDec(1000000) // 0.001gwei -> 1noz = 1000000wei -> 1noz DefaultRemainingNozLimit = sdk.NewInt(0) DefaultResourceNodeMinStake = sdk.NewCoin(DefaultBondDenom, sdk.NewInt(1e18)) @@ -44,7 +46,7 @@ func ParamKeyTable() paramtypes.KeyTable { // NewParams creates a new Params object func NewParams(bondDenom string, threashold, completion time.Duration, maxEntries uint32, - resourceNodeRegEnabled bool, resourceNodeMinStake sdk.Coin) Params { + resourceNodeRegEnabled bool, resourceNodeMinStake sdk.Coin, votingValidityPeriod time.Duration) Params { return Params{ BondDenom: bondDenom, @@ -53,6 +55,7 @@ func NewParams(bondDenom string, threashold, completion time.Duration, maxEntrie MaxEntries: maxEntries, ResourceNodeRegEnabled: resourceNodeRegEnabled, ResourceNodeMinStake: resourceNodeMinStake, + VotingValidityPeriod: votingValidityPeriod, } } @@ -65,6 +68,7 @@ func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { paramtypes.NewParamSetPair(KeyMaxEntries, &p.MaxEntries, validateMaxEntries), paramtypes.NewParamSetPair(KeyResourceNodeRegEnabled, &p.ResourceNodeRegEnabled, validateResourceNodeRegEnabled), paramtypes.NewParamSetPair(KeyResourceNodeMinStake, &p.ResourceNodeMinStake, validateResourceNodeMinStake), + paramtypes.NewParamSetPair(KeyVotingValidityPeriod, &p.VotingValidityPeriod, validateVotingValidityPeriod), } } @@ -87,6 +91,9 @@ func (p Params) Validate() error { if err := validateResourceNodeMinStake(p.ResourceNodeMinStake); err != nil { return err } + if err := validateVotingValidityPeriod(p.VotingValidityPeriod); err != nil { + return err + } return nil } @@ -99,6 +106,7 @@ func DefaultParams() Params { DefaultMaxEntries, DefaultResourceNodeRegEnabled, DefaultResourceNodeMinStake, + DefaultVotingValidityPeriod, ) } @@ -174,3 +182,16 @@ func validateResourceNodeMinStake(i interface{}) error { return nil } + +func validateVotingValidityPeriod(i interface{}) error { + v, ok := i.(time.Duration) + if !ok { + return fmt.Errorf("invalid parameter type: %T", i) + } + + if v <= 0 { + return fmt.Errorf("voting validity period must be positive: %d", v) + } + + return nil +} diff --git a/x/register/types/register.pb.go b/x/register/types/register.pb.go index 5a400624..eca2fe2b 100644 --- a/x/register/types/register.pb.go +++ b/x/register/types/register.pb.go @@ -41,6 +41,7 @@ type Params struct { MaxEntries uint32 `protobuf:"varint,4,opt,name=max_entries,json=maxEntries,proto3" json:"max_entries" yaml:"max_entries",omitempty` ResourceNodeRegEnabled bool `protobuf:"varint,5,opt,name=resource_node_reg_enabled,json=resourceNodeRegEnabled,proto3" json:"resource_node_reg_enabled" yaml:"resource_node_reg_enabled"` ResourceNodeMinStake types.Coin `protobuf:"bytes,6,opt,name=resource_node_min_stake,json=resourceNodeMinStake,proto3" json:"resource_node_min_stake" yaml:"resource_node_min_stake"` + VotingValidityPeriod time.Duration `protobuf:"bytes,7,opt,name=voting_validity_period,json=votingValidityPeriod,proto3,stdduration" json:"voting_validity_period" yaml:"voting_validity_period"` } func (m *Params) Reset() { *m = Params{} } @@ -118,6 +119,13 @@ func (m *Params) GetResourceNodeMinStake() types.Coin { return types.Coin{} } +func (m *Params) GetVotingValidityPeriod() time.Duration { + if m != nil { + return m.VotingValidityPeriod + } + return 0 +} + type ResourceNode struct { NetworkAddress string `protobuf:"bytes,1,opt,name=network_address,json=networkAddress,proto3" json:"network_address" yaml:"network_address"` Pubkey *types1.Any `protobuf:"bytes,2,opt,name=pubkey,proto3" json:"pubkey" yaml:"pubkey"` @@ -318,6 +326,7 @@ type MetaNodeRegistrationVotePool struct { ApproveList []string `protobuf:"bytes,2,rep,name=approve_list,json=approveList,proto3" json:"approve_list" yaml:"approve_list"` RejectList []string `protobuf:"bytes,3,rep,name=reject_list,json=rejectList,proto3" json:"reject_list" yaml:"reject_list"` ExpireTime time.Time `protobuf:"bytes,4,opt,name=expire_time,json=expireTime,proto3,stdtime" json:"expire_time" yaml:"expire_time"` + IsVotePassed bool `protobuf:"varint,5,opt,name=is_vote_passed,json=isVotePassed,proto3" json:"is_vote_passed" yaml:"is_vote_passed"` } func (m *MetaNodeRegistrationVotePool) Reset() { *m = MetaNodeRegistrationVotePool{} } @@ -381,6 +390,13 @@ func (m *MetaNodeRegistrationVotePool) GetExpireTime() time.Time { return time.Time{} } +func (m *MetaNodeRegistrationVotePool) GetIsVotePassed() bool { + if m != nil { + return m.IsVotePassed + } + return false +} + type Description struct { Moniker string `protobuf:"bytes,1,opt,name=moniker,proto3" json:"moniker" yaml:"moniker"` Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity" yaml:"identity",omitempty` @@ -588,95 +604,100 @@ func init() { } var fileDescriptor_fef1e3aeec8499d6 = []byte{ - // 1406 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0xcf, 0x6f, 0xd4, 0xc6, - 0x17, 0x8f, 0x13, 0x48, 0x36, 0xb3, 0xf9, 0xc1, 0xd7, 0x44, 0xb0, 0xe1, 0x4b, 0x77, 0x96, 0xe9, - 0x0f, 0x82, 0xd4, 0xec, 0x2a, 0x50, 0xa9, 0x2a, 0x87, 0x4a, 0x31, 0xd0, 0x16, 0x5a, 0x50, 0x64, - 0x52, 0x90, 0x2a, 0x55, 0xee, 0xac, 0x3d, 0x6c, 0x86, 0xac, 0x3d, 0x2b, 0xcf, 0x6c, 0xc8, 0x4a, - 0x3d, 0x54, 0xea, 0x85, 0x23, 0x52, 0x2f, 0x1c, 0xf9, 0x23, 0xfa, 0x37, 0x54, 0x88, 0x13, 0xc7, - 0xaa, 0x07, 0xb7, 0x82, 0x4b, 0xb5, 0x47, 0x1f, 0xda, 0x1e, 0x2b, 0xcf, 0x0f, 0xdb, 0xeb, 0x24, - 0xaa, 0xa8, 0xc4, 0xa9, 0x9c, 0xf0, 0x7c, 0x3e, 0x6f, 0xde, 0x7b, 0x33, 0xef, 0xf3, 0xde, 0x4e, - 0x00, 0x88, 0x8b, 0x18, 0x0b, 0xc6, 0x3b, 0x31, 0xe9, 0x51, 0x2e, 0x48, 0xdc, 0xd9, 0xdb, 0xc8, - 0xbf, 0xdb, 0x83, 0x98, 0x09, 0x66, 0x9f, 0xd4, 0x36, 0xed, 0x1c, 0xdf, 0xdb, 0x38, 0xb3, 0xd2, - 0x63, 0x3d, 0x26, 0xf9, 0x4e, 0xf6, 0xa5, 0x4c, 0xcf, 0xac, 0xf6, 0x18, 0xeb, 0xf5, 0x49, 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xda, 0xdb, 0x11, 0xf2, 0x4a, 0x66, 0x54, 0xff, 0x57, 0xa8, 0xa2, 0xff, - 0x2b, 0x04, 0x72, 0x97, 0x0c, 0xf2, 0x99, 0x04, 0xec, 0x3d, 0xb0, 0x5c, 0xfd, 0xcb, 0x69, 0xfa, - 0x75, 0x0c, 0xbe, 0x25, 0x7f, 0xf2, 0x2f, 0xa3, 0xef, 0x2c, 0xb0, 0x4c, 0x23, 0x2a, 0x28, 0xee, - 0x7b, 0x5d, 0xdc, 0xc7, 0x91, 0x6f, 0x04, 0x7f, 0xf7, 0x95, 0x7e, 0x96, 0xaa, 0x4e, 0x8a, 0xa3, - 0x57, 0x08, 0xe4, 0x2e, 0x69, 0xc4, 0x51, 0x80, 0x8d, 0xc1, 0x9c, 0x89, 0xac, 0xda, 0xe3, 0xd3, - 0x57, 0x8a, 0x3c, 0x57, 0x44, 0xd4, 0xc5, 0xcc, 0x23, 0x19, 0xca, 0xb9, 0xf5, 0xf4, 0x45, 0xd3, - 0x7a, 0xfe, 0xa2, 0x69, 0xfd, 0xf6, 0xa2, 0x69, 0x3d, 0x7a, 0xd9, 0x9c, 0x7a, 0xfe, 0xb2, 0x39, - 0xf5, 0xf3, 0xcb, 0xe6, 0xd4, 0x57, 0x1f, 0x94, 0xe2, 0x68, 0x05, 0x45, 0x44, 0x98, 0xcf, 0x75, - 0x7f, 0x07, 0xd3, 0xa8, 0xb3, 0x5f, 0xfc, 0xc7, 0x86, 0x8c, 0xdc, 0x9d, 0x95, 0xc5, 0xb8, 0xf4, - 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0x1a, 0x77, 0x41, 0x4b, 0xf9, 0x10, 0x00, 0x00, + // 1486 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0xcd, 0x6f, 0xd4, 0x46, + 0x1b, 0x8f, 0x13, 0xc8, 0x6e, 0x66, 0xf3, 0xc1,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xf3, 0x07, 0x34, 0xde, 0x73, + 0x91, 0xef, 0xc7, 0x98, 0x31, 0xd5, 0x9c, 0xeb, 0xe3, 0x04, 0x56, 0xa9, 0x34, 0x81, 0xa7, 0xa4, + 0xe7, 0x0a, 0x61, 0x39, 0x8b, 0x0a, 0xd9, 0x94, 0x80, 0x89, 0xc0, 0x6c, 0x34, 0xe8, 0xee, 0xe1, + 0x91, 0xea, 0xcb, 0xe5, 0x03, 0xdb, 0xdd, 0x0c, 0x47, 0xf6, 0xe5, 0x71, 0x02, 0x95, 0x5e, 0x9a, + 0xc0, 0x05, 0x69, 0x5b, 0xca, 0xd6, 0xb3, 0xef, 0xd7, 0x97, 0x55, 0xde, 0xbc, 0x78, 0x14, 0x71, + 0xda, 0xde, 0x1e, 0x74, 0x3f, 0xc2, 0x23, 0x47, 0x2d, 0x30, 0xdf, 0x01, 0x35, 0x36, 0x60, 0x11, + 0x0e, 0x7d, 0xd1, 0x58, 0x75, 0xfb, 0xdc, 0x38, 0x81, 0x1a, 0x4a, 0x13, 0xb8, 0x28, 0xcd, 0x29, + 0xc0, 0x72, 0x34, 0x65, 0xde, 0x05, 0xb3, 0x8c, 0x23, 0x3e, 0x90, 0xc5, 0xbf, 0x78, 0xc9, 0xd2, + 0xf5, 0xa1, 0xa7, 0x97, 0x2e, 0x11, 0x9b, 0x86, 0xfe, 0x6d, 0xa1, 0x69, 0xff, 0x23, 0x8b, 0x54, + 0xae, 0x2a, 0x22, 0x95, 0xb2, 0xe5, 0x28, 0x22, 0xdb, 0x34, 0xa7, 0x7b, 0x38, 0x64, 0xa2, 0xea, + 0xe7, 0x64, 0x3b, 0xff, 0x9c, 0xc0, 0xff, 0xf4, 0x08, 0xdf, 0x1d, 0x74, 0xdb, 0x1e, 0x0d, 0xd4, + 0x98, 0x55, 0x3f, 0xeb, 0xcc, 0xdf, 0xeb, 0xf0, 0x51, 0x84, 0x59, 0xfb, 0x7a, 0xc8, 0x33, 0x17, + 0x72, 0x7d, 0xe1, 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0xd6, 0xef, 0xc7, 0x41, 0xfd, 0x26, + 0xe6, 0xe8, 0x6d, 0x13, 0xbf, 0x6d, 0xe2, 0xbf, 0x40, 0x13, 0x97, 0x2a, 0xff, 0xc7, 0x19, 0x70, + 0x56, 0x57, 0xbe, 0x23, 0x76, 0x26, 0x8f, 0xcd, 0x3b, 0x94, 0xe3, 0x6d, 0x4a, 0xfb, 0x6f, 0xac, + 0x1b, 0x6e, 0x80, 0x79, 0x14, 0x45, 0x31, 0x1d, 0x62, 0xb7, 0x4f, 0x18, 0x6f, 0x4e, 0xaf, 0xce, + 0xac, 0xcd, 0xd9, 0x17, 0xc6, 0x09, 0x9c, 0xc0, 0xd3, 0x04, 0x9e, 0x94, 0x16, 0xcb, 0xa8, 0xe5, + 0x34, 0x94, 0xf8, 0x31, 0x61, 0xdc, 0x7c, 0x1f, 0x34, 0x62, 0x7c, 0x1f, 0x7b, 0x5c, 0x9a, 0x9a, + 0x11, 0xa6, 0xfe, 0x9d, 0xe5, 0xa2, 0x04, 0x17, 0xb9, 0x28, 0x81, 0x96, 0x03, 0xa4, 0x24, 0xec, + 0xdc, 0x07, 0x0d, 0xbc, 0x1f, 0x91, 0x18, 0xcb, 0x44, 0x1c, 0x7b, 0x65, 0x22, 0xd6, 0x75, 0xce, + 0x4b, 0xcb, 0x0a, 0x3f, 0x25, 0x50, 0x26, 0x01, 0x48, 0x44, 0xcc, 0xd1, 0x4f, 0xc0, 0x22, 0x61, + 0xee, 0x90, 0x72, 0xec, 0x46, 0x88, 0xb1, 0xfc, 0xdb, 0xee, 0xbf, 0xe3, 0x04, 0x56, 0x98, 0x34, + 0x81, 0x7f, 0x97, 0x16, 0x27, 0x71, 0xcb, 0x99, 0x27, 0x4c, 0x24, 0x4a, 0x8a, 0x5f, 0xcf, 0x80, + 0x46, 0xa9, 0x22, 0xb3, 0x69, 0x10, 0xd0, 0x90, 0xec, 0xe1, 0x58, 0xa5, 0x4c, 0x4c, 0x03, 0x05, + 0x15, 0xd3, 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b2, 0x4b, 0xca, 0x48, 0xd6, 0x51, 0x71, + 0xb7, 0x51, 0x75, 0xa4, 0xef, 0x35, 0x8e, 0xa6, 0xac, 0x67, 0x33, 0xc0, 0x3c, 0xb8, 0x3c, 0x1b, + 0x29, 0xf9, 0x84, 0xda, 0xc5, 0xa4, 0xb7, 0xcb, 0xc5, 0x2b, 0x99, 0x91, 0x23, 0xa5, 0x42, 0x15, + 0x23, 0xa5, 0x42, 0x58, 0xce, 0xa2, 0x46, 0x3e, 0x14, 0x80, 0x39, 0x04, 0x4b, 0xd5, 0x3b, 0xe2, + 0xf4, 0x9b, 0x98, 0xa5, 0x8b, 0xde, 0xe4, 0x1d, 0xf0, 0x2b, 0x03, 0x2c, 0x91, 0x90, 0x70, 0x82, + 0xfa, 0x6e, 0x17, 0xf5, 0x51, 0xe8, 0xe9, 0x82, 0xbf, 0xfb, 0x5a, 0x27, 0x5d, 0xd5, 0x48, 0xb1, + 0xf5, 0x0a, 0x61, 0x39, 0x8b, 0x0a, 0xb1, 0x25, 0x60, 0x22, 0x50, 0xd3, 0x9e, 0x65, 0x7b, 0x7c, + 0xf0, 0x5a, 0x9e, 0x6b, 0x85, 0x47, 0x95, 0xcc, 0xdc, 0x93, 0xa6, 0xec, 0x5b, 0x4f, 0x5f, 0xb4, + 0x8c, 0xe7, 0x2f, 0x5a, 0xc6, 0xaf, 0x2f, 0x5a, 0xc6, 0xa3, 0x97, 0xad, 0xa9, 0xe7, 0x2f, 0x5b, + 0x53, 0x3f, 0xbd, 0x6c, 0x4d, 0x7d, 0xf6, 0xff, 0x92, 0x1f, 0x55, 0x41, 0x21, 0xe6, 0xfa, 0x71, + 0xdd, 0xdb, 0x45, 0x24, 0xec, 0xec, 0x17, 0x7f, 0xe1, 0x08, 0xcf, 0xdd, 0x59, 0x91, 0x8c, 0xcb, + 0x7f, 0x04, 0x00, 0x00, 0xff, 0xff, 0x39, 0x36, 0x5b, 0xce, 0xe3, 0x11, 0x00, 0x00, } func (this *ResourceNode) Equal(that interface{}) bool { @@ -831,6 +852,14 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + n1, err1 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.VotingValidityPeriod, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.VotingValidityPeriod):]) + if err1 != nil { + return 0, err1 + } + i -= n1 + i = encodeVarintRegister(dAtA, i, uint64(n1)) + i-- + dAtA[i] = 0x3a { size, err := m.ResourceNodeMinStake.MarshalToSizedBuffer(dAtA[:i]) if err != nil { @@ -856,21 +885,21 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x20 } - n2, err2 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.UnbondingCompletionTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.UnbondingCompletionTime):]) - if err2 != nil { - return 0, err2 - } - i -= n2 - i = encodeVarintRegister(dAtA, i, uint64(n2)) - i-- - dAtA[i] = 0x1a - n3, err3 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.UnbondingThreasholdTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.UnbondingThreasholdTime):]) + n3, err3 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.UnbondingCompletionTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.UnbondingCompletionTime):]) if err3 != nil { return 0, err3 } i -= n3 i = encodeVarintRegister(dAtA, i, uint64(n3)) i-- + dAtA[i] = 0x1a + n4, err4 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.UnbondingThreasholdTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.UnbondingThreasholdTime):]) + if err4 != nil { + return 0, err4 + } + i -= n4 + i = encodeVarintRegister(dAtA, i, uint64(n4)) + i-- dAtA[i] = 0x12 if len(m.BondDenom) > 0 { i -= len(m.BondDenom) @@ -917,12 +946,12 @@ func (m *ResourceNode) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x48 } - n4, err4 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.CreationTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.CreationTime):]) - if err4 != nil { - return 0, err4 + n5, err5 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.CreationTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.CreationTime):]) + if err5 != nil { + return 0, err5 } - i -= n4 - i = encodeVarintRegister(dAtA, i, uint64(n4)) + i -= n5 + i = encodeVarintRegister(dAtA, i, uint64(n5)) i-- dAtA[i] = 0x42 { @@ -1009,12 +1038,12 @@ func (m *MetaNode) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - n7, err7 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.CreationTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.CreationTime):]) - if err7 != nil { - return 0, err7 + n8, err8 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.CreationTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.CreationTime):]) + if err8 != nil { + return 0, err8 } - i -= n7 - i = encodeVarintRegister(dAtA, i, uint64(n7)) + i -= n8 + i = encodeVarintRegister(dAtA, i, uint64(n8)) i-- dAtA[i] = 0x42 { @@ -1101,12 +1130,22 @@ func (m *MetaNodeRegistrationVotePool) MarshalToSizedBuffer(dAtA []byte) (int, e _ = i var l int _ = l - n10, err10 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.ExpireTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.ExpireTime):]) - if err10 != nil { - return 0, err10 + if m.IsVotePassed { + i-- + if m.IsVotePassed { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x28 + } + n11, err11 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.ExpireTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.ExpireTime):]) + if err11 != nil { + return 0, err11 } - i -= n10 - i = encodeVarintRegister(dAtA, i, uint64(n10)) + i -= n11 + i = encodeVarintRegister(dAtA, i, uint64(n11)) i-- dAtA[i] = 0x22 if len(m.RejectList) > 0 { @@ -1293,12 +1332,12 @@ func (m *UnbondingNodeEntry) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x1a } - n11, err11 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.CompletionTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.CompletionTime):]) - if err11 != nil { - return 0, err11 + n12, err12 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.CompletionTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.CompletionTime):]) + if err12 != nil { + return 0, err12 } - i -= n11 - i = encodeVarintRegister(dAtA, i, uint64(n11)) + i -= n12 + i = encodeVarintRegister(dAtA, i, uint64(n12)) i-- dAtA[i] = 0x12 if m.CreationHeight != 0 { @@ -1342,6 +1381,8 @@ func (m *Params) Size() (n int) { } l = m.ResourceNodeMinStake.Size() n += 1 + l + sovRegister(uint64(l)) + l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.VotingValidityPeriod) + n += 1 + l + sovRegister(uint64(l)) return n } @@ -1440,6 +1481,9 @@ func (m *MetaNodeRegistrationVotePool) Size() (n int) { } l = github_com_gogo_protobuf_types.SizeOfStdTime(m.ExpireTime) n += 1 + l + sovRegister(uint64(l)) + if m.IsVotePassed { + n += 2 + } return n } @@ -1721,6 +1765,39 @@ func (m *Params) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VotingValidityPeriod", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRegister + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRegister + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRegister + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.VotingValidityPeriod, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipRegister(dAtA[iNdEx:]) @@ -2531,6 +2608,26 @@ func (m *MetaNodeRegistrationVotePool) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsVotePassed", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRegister + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsVotePassed = bool(v != 0) default: iNdEx = preIndex skippy, err := skipRegister(dAtA[iNdEx:]) diff --git a/x/register/types/tx.pb.go b/x/register/types/tx.pb.go index 53bd13a9..df293a80 100644 --- a/x/register/types/tx.pb.go +++ b/x/register/types/tx.pb.go @@ -1012,7 +1012,7 @@ func (m *MsgMetaNodeRegistrationVote) GetVoterOwnerAddress() string { return "" } -// MsgUpdateResourceNodeStakeResponse defines the Msg/MetaNodeRegistrationVote response type. +// MsgMetaNodeRegistrationVoteResponse defines the Msg/MetaNodeRegistrationVote response type. type MsgMetaNodeRegistrationVoteResponse struct { } @@ -1049,6 +1049,100 @@ func (m *MsgMetaNodeRegistrationVoteResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgMetaNodeRegistrationVoteResponse proto.InternalMessageInfo +// MsgWithdrawMetaNodeRegistrationStake defines a SDK message for withdrawing registration stake of meta node. +type MsgWithdrawMetaNodeRegistrationStake struct { + NetworkAddress string `protobuf:"bytes,1,opt,name=network_address,json=networkAddress,proto3" json:"network_address" yaml:"network_address"` + OwnerAddress string `protobuf:"bytes,2,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address" yaml:"owner_address"` +} + +func (m *MsgWithdrawMetaNodeRegistrationStake) Reset() { *m = MsgWithdrawMetaNodeRegistrationStake{} } +func (m *MsgWithdrawMetaNodeRegistrationStake) String() string { return proto.CompactTextString(m) } +func (*MsgWithdrawMetaNodeRegistrationStake) ProtoMessage() {} +func (*MsgWithdrawMetaNodeRegistrationStake) Descriptor() ([]byte, []int) { + return fileDescriptor_75d4b90d7a185a31, []int{20} +} +func (m *MsgWithdrawMetaNodeRegistrationStake) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgWithdrawMetaNodeRegistrationStake) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgWithdrawMetaNodeRegistrationStake.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 *MsgWithdrawMetaNodeRegistrationStake) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgWithdrawMetaNodeRegistrationStake.Merge(m, src) +} +func (m *MsgWithdrawMetaNodeRegistrationStake) XXX_Size() int { + return m.Size() +} +func (m *MsgWithdrawMetaNodeRegistrationStake) XXX_DiscardUnknown() { + xxx_messageInfo_MsgWithdrawMetaNodeRegistrationStake.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgWithdrawMetaNodeRegistrationStake proto.InternalMessageInfo + +func (m *MsgWithdrawMetaNodeRegistrationStake) GetNetworkAddress() string { + if m != nil { + return m.NetworkAddress + } + return "" +} + +func (m *MsgWithdrawMetaNodeRegistrationStake) GetOwnerAddress() string { + if m != nil { + return m.OwnerAddress + } + return "" +} + +// MsgWithdrawMetaNodeRegistrationStakeResponse defines the Msg/WithdrawMetaNodeRegistrationStake response type. +type MsgWithdrawMetaNodeRegistrationStakeResponse struct { +} + +func (m *MsgWithdrawMetaNodeRegistrationStakeResponse) Reset() { + *m = MsgWithdrawMetaNodeRegistrationStakeResponse{} +} +func (m *MsgWithdrawMetaNodeRegistrationStakeResponse) String() string { + return proto.CompactTextString(m) +} +func (*MsgWithdrawMetaNodeRegistrationStakeResponse) ProtoMessage() {} +func (*MsgWithdrawMetaNodeRegistrationStakeResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_75d4b90d7a185a31, []int{21} +} +func (m *MsgWithdrawMetaNodeRegistrationStakeResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgWithdrawMetaNodeRegistrationStakeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgWithdrawMetaNodeRegistrationStakeResponse.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 *MsgWithdrawMetaNodeRegistrationStakeResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgWithdrawMetaNodeRegistrationStakeResponse.Merge(m, src) +} +func (m *MsgWithdrawMetaNodeRegistrationStakeResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgWithdrawMetaNodeRegistrationStakeResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgWithdrawMetaNodeRegistrationStakeResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgWithdrawMetaNodeRegistrationStakeResponse proto.InternalMessageInfo + func init() { proto.RegisterType((*MsgCreateResourceNode)(nil), "stratos.register.v1.MsgCreateResourceNode") proto.RegisterType((*MsgCreateResourceNodeResponse)(nil), "stratos.register.v1.MsgCreateResourceNodeResponse") @@ -1070,102 +1164,108 @@ func init() { proto.RegisterType((*MsgUpdateMetaNodeStakeResponse)(nil), "stratos.register.v1.MsgUpdateMetaNodeStakeResponse") proto.RegisterType((*MsgMetaNodeRegistrationVote)(nil), "stratos.register.v1.MsgMetaNodeRegistrationVote") proto.RegisterType((*MsgMetaNodeRegistrationVoteResponse)(nil), "stratos.register.v1.MsgMetaNodeRegistrationVoteResponse") + proto.RegisterType((*MsgWithdrawMetaNodeRegistrationStake)(nil), "stratos.register.v1.MsgWithdrawMetaNodeRegistrationStake") + proto.RegisterType((*MsgWithdrawMetaNodeRegistrationStakeResponse)(nil), "stratos.register.v1.MsgWithdrawMetaNodeRegistrationStakeResponse") } func init() { proto.RegisterFile("stratos/register/v1/tx.proto", fileDescriptor_75d4b90d7a185a31) } var fileDescriptor_75d4b90d7a185a31 = []byte{ - // 1437 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0xcf, 0x6f, 0x1b, 0x45, - 0x14, 0xce, 0xda, 0x69, 0x69, 0xa6, 0x4d, 0xda, 0xb8, 0x49, 0xe3, 0xb8, 0x89, 0xc7, 0x9d, 0xd2, - 0x90, 0x12, 0xbc, 0x5b, 0x27, 0x45, 0x2d, 0x95, 0x00, 0xd5, 0x2d, 0x12, 0x08, 0x25, 0x45, 0x4b, - 0xe9, 0x01, 0xa9, 0xb2, 0xd6, 0xf6, 0xd4, 0xb5, 0x12, 0xef, 0x58, 0xbb, 0x6b, 0xb7, 0x3e, 0x70, - 0xe1, 0xd4, 0x13, 0x42, 0xe2, 0xc0, 0xb5, 0x70, 0x84, 0x0b, 0x07, 0x90, 0x38, 0x23, 0x21, 0x15, - 0x4e, 0x95, 0x90, 0x10, 0x42, 0x62, 0x84, 0x5a, 0x4e, 0x8b, 0xc4, 0x61, 0xff, 0x02, 0xb4, 0x33, - 0xbb, 0xb3, 0x3f, 0xbc, 0xbb, 0x4d, 0x68, 0x8b, 0x04, 0xea, 0xc9, 0x3b, 0xef, 0xbd, 0x99, 0xf9, - 0xde, 0xf7, 0xde, 0xbc, 0x79, 0x63, 0xb0, 0x64, 0x5a, 0x86, 0x66, 0x11, 0x53, 0x31, 0x70, 0xa7, - 0x6b, 0x5a, 0xd8, 0x50, 0x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d8, 0xf2, 0x3f, 0xab, 0xad, 0x9b, - 0x5a, 0x57, 0x57, 0x6e, 0x07, 0x1b, 0xb1, 0x4e, 0xbd, 0xb9, 0x9f, 0xfd, 0xf9, 0xb8, 0xf1, 0x77, - 0x00, 0x00, 0x00, 0xff, 0xff, 0x62, 0x35, 0x9d, 0x41, 0x31, 0x18, 0x00, 0x00, + // 1503 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0xcb, 0x6f, 0x1b, 0x45, + 0x18, 0xcf, 0x3a, 0x69, 0x69, 0xa6, 0x4d, 0xd3, 0xb8, 0x49, 0xe3, 0xb8, 0x89, 0xc7, 0x9d, 0xb6, + 0x21, 0x6d, 0x9a, 0xdd, 0x3a, 0x29, 0xea, 0x43, 0x3c, 0x14, 0xb7, 0x48, 0x20, 0x94, 0x14, 0x2d, + 0xa5, 0x48, 0x48, 0x95, 0xb5, 0xb6, 0xa7, 0xae, 0x95, 0x78, 0xc7, 0xda, 0x5d, 0x3b, 0xf5, 0x81, + 0x0b, 0xa7, 0x1e, 0x91, 0x38, 0x70, 0x2d, 0x1c, 0xe1, 0xc2, 0x01, 0x24, 0xce, 0x48, 0x48, 0x85, + 0x03, 0xaa, 0x84, 0x84, 0x10, 0x12, 0x23, 0xd4, 0x72, 0x5a, 0xa4, 0x1e, 0xf6, 0x1f, 0x00, 0xed, + 0xcc, 0xee, 0xac, 0x77, 0xbd, 0xbb, 0x49, 0xfa, 0x40, 0x2a, 0xea, 0xc9, 0x9e, 0xef, 0x31, 0xf3, + 0xfb, 0xbe, 0xdf, 0xf7, 0xcd, 0x63, 0xc1, 0xac, 0x69, 0x19, 0x9a, 0x45, 0x4c, 0xc5, 0xc0, 0x8d, + 0xa6, 0x69, 0x61, 0x43, 0xe9, 0x96, 0x14, 0xeb, 0xb6, 0xdc, 0x36, 0x88, 0x45, 0xb2, 0x87, 0x3d, + 0xad, 0x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 0x80, 0x09, 0xc4, 0x08, + 0xf2, 0xfe, 0xce, 0x80, 0x23, 0x03, 0xed, 0xf2, 0x7c, 0x35, 0x43, 0x19, 0x80, 0xa6, 0x5e, 0x33, + 0x2a, 0xac, 0x70, 0x19, 0x93, 0xfb, 0xca, 0xc7, 0x6d, 0x0a, 0xfb, 0xa4, 0x0e, 0x85, 0x13, 0x7c, + 0xa6, 0x40, 0x86, 0xd4, 0x51, 0x77, 0xc0, 0x63, 0xfd, 0x8f, 0x1a, 0xaa, 0x08, 0x0a, 0xf1, 0xc9, + 0x16, 0x7c, 0x7c, 0x31, 0x02, 0x8e, 0xae, 0x99, 0x8d, 0x60, 0xe3, 0x72, 0x37, 0x71, 0x83, 0x3d, + 0x0e, 0xaf, 0x13, 0x0b, 0x67, 0x3f, 0x02, 0x33, 0x35, 0x4d, 0xaf, 0x37, 0xdd, 0x19, 0x2a, 0xf1, + 0xf4, 0xac, 0xda, 0x14, 0x26, 0x1b, 0x39, 0x14, 0x16, 0x39, 0xca, 0x44, 0x13, 0xa4, 0x4e, 0x0b, + 0xdd, 0x7a, 0x98, 0xbb, 0x0e, 0x08, 0x54, 0x95, 0x38, 0x16, 0x5f, 0xb3, 0x29, 0x4c, 0x32, 0x71, + 0x28, 0x2c, 0x44, 0x97, 0x8e, 0x30, 0x3b, 0x25, 0x34, 0x57, 0xfb, 0x29, 0x3e, 0x0f, 0x5e, 0x22, + 0xed, 0xa6, 0xee, 0x1e, 0x73, 0x9c, 0xdf, 0x39, 0x9b, 0x42, 0x5f, 0xe4, 0x50, 0x78, 0xd0, 0x2b, + 0x13, 0x2e, 0x40, 0xaa, 0xaf, 0x72, 0x6f, 0xa3, 0x5d, 0xe2, 0xee, 0x04, 0xd1, 0x54, 0x8d, 0x04, + 0xb7, 0xd1, 0x58, 0x83, 0xe0, 0x36, 0x1a, 0xab, 0x46, 0xea, 0x61, 0x26, 0x8f, 0xa4, 0x07, 0x03, + 0x2e, 0x8e, 0xa4, 0x66, 0x0f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b1, 0x33, 0xe9, 0x98, + 0xc2, 0xd6, 0xf9, 0x73, 0xbb, 0xb1, 0x16, 0xf0, 0x57, 0x18, 0xfc, 0x25, 0xb4, 0x98, 0x06, 0x3f, + 0xb8, 0xbc, 0x70, 0xe8, 0x77, 0x25, 0x30, 0x1d, 0xe9, 0x4d, 0xf1, 0xc2, 0x99, 0x4f, 0xef, 0x35, + 0xdf, 0x2e, 0x2f, 0xef, 0xcc, 0x4e, 0x00, 0x5d, 0x62, 0x40, 0x5f, 0x46, 0x27, 0xd3, 0xfa, 0x51, + 0xbc, 0xcb, 0xc3, 0x10, 0x23, 0x0f, 0xff, 0xf9, 0xf4, 0xde, 0xda, 0x1e, 0x62, 0xc2, 0x23, 0x3c, + 0x1d, 0xa2, 0xd7, 0x7f, 0x09, 0x10, 0x23, 0xef, 0xc4, 0xf9, 0x74, 0x32, 0xb7, 0x87, 0x98, 0xf0, + 0x96, 0x4a, 0x87, 0xe8, 0xd1, 0x1d, 0x40, 0xfc, 0x56, 0x02, 0xb3, 0x09, 0x10, 0x79, 0x89, 0x2e, + 0xee, 0x6c, 0x7d, 0x5e, 0xa1, 0x2b, 0xbb, 0x30, 0xde, 0x5d, 0x81, 0x06, 0xdf, 0x63, 0x78, 0x81, + 0xfe, 0x28, 0x81, 0x63, 0x02, 0x77, 0xe2, 0xbd, 0xec, 0x6c, 0x12, 0x9e, 0x24, 0x8f, 0xfc, 0x85, + 0xdd, 0x7a, 0x88, 0x30, 0x2e, 0xb0, 0x30, 0x96, 0xd1, 0xd9, 0xd8, 0x30, 0x02, 0xfc, 0x46, 0xdf, + 0x04, 0x15, 0xf7, 0x16, 0x91, 0x7d, 0x24, 0x81, 0xd3, 0x22, 0x96, 0xed, 0xef, 0x05, 0x17, 0x93, + 0x20, 0x6e, 0xeb, 0x9a, 0x5f, 0x7d, 0x6c, 0x57, 0x11, 0x66, 0x99, 0x85, 0xf9, 0x2a, 0xba, 0x14, + 0x1b, 0xe6, 0x96, 0x37, 0x4f, 0x25, 0x21, 0x5e, 0x46, 0x5e, 0x79, 0xfd, 0xde, 0x83, 0x82, 0x74, + 0xff, 0x41, 0x41, 0xfa, 0xf3, 0x41, 0x41, 0xfa, 0xe4, 0x61, 0x61, 0xe8, 0xfe, 0xc3, 0xc2, 0xd0, + 0x6f, 0x0f, 0x0b, 0x43, 0x1f, 0x9e, 0xeb, 0x7b, 0x89, 0x79, 0xf3, 0xeb, 0xd8, 0xf2, 0xff, 0x2e, + 0xd5, 0x6e, 0x69, 0x4d, 0x5d, 0xb9, 0x1d, 0x2c, 0xc9, 0xde, 0x66, 0xd5, 0xbd, 0xec, 0x73, 0xf3, + 0xca, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x54, 0xac, 0x09, 0x1a, 0x23, 0x1a, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1191,6 +1291,7 @@ type MsgClient interface { HandleMsgUpdateMetaNode(ctx context.Context, in *MsgUpdateMetaNode, opts ...grpc.CallOption) (*MsgUpdateMetaNodeResponse, error) HandleMsgUpdateMetaNodeStake(ctx context.Context, in *MsgUpdateMetaNodeStake, opts ...grpc.CallOption) (*MsgUpdateMetaNodeStakeResponse, error) HandleMsgMetaNodeRegistrationVote(ctx context.Context, in *MsgMetaNodeRegistrationVote, opts ...grpc.CallOption) (*MsgMetaNodeRegistrationVoteResponse, error) + HandleMsgWithdrawMetaNodeRegistrationStake(ctx context.Context, in *MsgWithdrawMetaNodeRegistrationStake, opts ...grpc.CallOption) (*MsgWithdrawMetaNodeRegistrationStakeResponse, error) } type msgClient struct { @@ -1291,6 +1392,15 @@ func (c *msgClient) HandleMsgMetaNodeRegistrationVote(ctx context.Context, in *M return out, nil } +func (c *msgClient) HandleMsgWithdrawMetaNodeRegistrationStake(ctx context.Context, in *MsgWithdrawMetaNodeRegistrationStake, opts ...grpc.CallOption) (*MsgWithdrawMetaNodeRegistrationStakeResponse, error) { + out := new(MsgWithdrawMetaNodeRegistrationStakeResponse) + err := c.cc.Invoke(ctx, "/stratos.register.v1.Msg/HandleMsgWithdrawMetaNodeRegistrationStake", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // MsgServer is the server API for Msg service. type MsgServer interface { // CreateResourceNode defines a method for creating a new resource node. @@ -1304,6 +1414,7 @@ type MsgServer interface { HandleMsgUpdateMetaNode(context.Context, *MsgUpdateMetaNode) (*MsgUpdateMetaNodeResponse, error) HandleMsgUpdateMetaNodeStake(context.Context, *MsgUpdateMetaNodeStake) (*MsgUpdateMetaNodeStakeResponse, error) HandleMsgMetaNodeRegistrationVote(context.Context, *MsgMetaNodeRegistrationVote) (*MsgMetaNodeRegistrationVoteResponse, error) + HandleMsgWithdrawMetaNodeRegistrationStake(context.Context, *MsgWithdrawMetaNodeRegistrationStake) (*MsgWithdrawMetaNodeRegistrationStakeResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. @@ -1340,6 +1451,9 @@ func (*UnimplementedMsgServer) HandleMsgUpdateMetaNodeStake(ctx context.Context, func (*UnimplementedMsgServer) HandleMsgMetaNodeRegistrationVote(ctx context.Context, req *MsgMetaNodeRegistrationVote) (*MsgMetaNodeRegistrationVoteResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method HandleMsgMetaNodeRegistrationVote not implemented") } +func (*UnimplementedMsgServer) HandleMsgWithdrawMetaNodeRegistrationStake(ctx context.Context, req *MsgWithdrawMetaNodeRegistrationStake) (*MsgWithdrawMetaNodeRegistrationStakeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method HandleMsgWithdrawMetaNodeRegistrationStake not implemented") +} func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) @@ -1525,6 +1639,24 @@ func _Msg_HandleMsgMetaNodeRegistrationVote_Handler(srv interface{}, ctx context return interceptor(ctx, in, info, handler) } +func _Msg_HandleMsgWithdrawMetaNodeRegistrationStake_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgWithdrawMetaNodeRegistrationStake) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).HandleMsgWithdrawMetaNodeRegistrationStake(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/stratos.register.v1.Msg/HandleMsgWithdrawMetaNodeRegistrationStake", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).HandleMsgWithdrawMetaNodeRegistrationStake(ctx, req.(*MsgWithdrawMetaNodeRegistrationStake)) + } + return interceptor(ctx, in, info, handler) +} + var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "stratos.register.v1.Msg", HandlerType: (*MsgServer)(nil), @@ -1569,6 +1701,10 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "HandleMsgMetaNodeRegistrationVote", Handler: _Msg_HandleMsgMetaNodeRegistrationVote_Handler, }, + { + MethodName: "HandleMsgWithdrawMetaNodeRegistrationStake", + Handler: _Msg_HandleMsgWithdrawMetaNodeRegistrationStake_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "stratos/register/v1/tx.proto", @@ -2343,6 +2479,66 @@ func (m *MsgMetaNodeRegistrationVoteResponse) MarshalToSizedBuffer(dAtA []byte) return len(dAtA) - i, nil } +func (m *MsgWithdrawMetaNodeRegistrationStake) 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 *MsgWithdrawMetaNodeRegistrationStake) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgWithdrawMetaNodeRegistrationStake) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.OwnerAddress) > 0 { + i -= len(m.OwnerAddress) + copy(dAtA[i:], m.OwnerAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.OwnerAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.NetworkAddress) > 0 { + i -= len(m.NetworkAddress) + copy(dAtA[i:], m.NetworkAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.NetworkAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgWithdrawMetaNodeRegistrationStakeResponse) 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 *MsgWithdrawMetaNodeRegistrationStakeResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgWithdrawMetaNodeRegistrationStakeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + func encodeVarintTx(dAtA []byte, offset int, v uint64) int { offset -= sovTx(v) base := offset @@ -2668,6 +2864,32 @@ func (m *MsgMetaNodeRegistrationVoteResponse) Size() (n int) { return n } +func (m *MsgWithdrawMetaNodeRegistrationStake) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.NetworkAddress) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.OwnerAddress) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgWithdrawMetaNodeRegistrationStakeResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + func sovTx(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -4858,6 +5080,170 @@ func (m *MsgMetaNodeRegistrationVoteResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *MsgWithdrawMetaNodeRegistrationStake) 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: MsgWithdrawMetaNodeRegistrationStake: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgWithdrawMetaNodeRegistrationStake: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NetworkAddress", 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.NetworkAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerAddress", 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.OwnerAddress = 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 *MsgWithdrawMetaNodeRegistrationStakeResponse) 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: MsgWithdrawMetaNodeRegistrationStakeResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgWithdrawMetaNodeRegistrationStakeResponse: 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 skipTx(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/register/types/tx.pb.gw.go b/x/register/types/tx.pb.gw.go index bcaf8a51..856dc803 100644 --- a/x/register/types/tx.pb.gw.go +++ b/x/register/types/tx.pb.gw.go @@ -391,6 +391,42 @@ func local_request_Msg_HandleMsgMetaNodeRegistrationVote_0(ctx context.Context, } +var ( + filter_Msg_HandleMsgWithdrawMetaNodeRegistrationStake_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Msg_HandleMsgWithdrawMetaNodeRegistrationStake_0(ctx context.Context, marshaler runtime.Marshaler, client MsgClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq MsgWithdrawMetaNodeRegistrationStake + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_HandleMsgWithdrawMetaNodeRegistrationStake_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.HandleMsgWithdrawMetaNodeRegistrationStake(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Msg_HandleMsgWithdrawMetaNodeRegistrationStake_0(ctx context.Context, marshaler runtime.Marshaler, server MsgServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq MsgWithdrawMetaNodeRegistrationStake + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_HandleMsgWithdrawMetaNodeRegistrationStake_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.HandleMsgWithdrawMetaNodeRegistrationStake(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterMsgHandlerServer registers the http handlers for service Msg to "mux". // UnaryRPC :call MsgServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -597,6 +633,26 @@ func RegisterMsgHandlerServer(ctx context.Context, mux *runtime.ServeMux, server }) + mux.Handle("POST", pattern_Msg_HandleMsgWithdrawMetaNodeRegistrationStake_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Msg_HandleMsgWithdrawMetaNodeRegistrationStake_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Msg_HandleMsgWithdrawMetaNodeRegistrationStake_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -838,6 +894,26 @@ func RegisterMsgHandlerClient(ctx context.Context, mux *runtime.ServeMux, client }) + mux.Handle("POST", pattern_Msg_HandleMsgWithdrawMetaNodeRegistrationStake_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Msg_HandleMsgWithdrawMetaNodeRegistrationStake_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Msg_HandleMsgWithdrawMetaNodeRegistrationStake_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -861,6 +937,8 @@ var ( pattern_Msg_HandleMsgUpdateMetaNodeStake_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"stratos", "register", "v1", "update_meta_node_stake"}, "", runtime.AssumeColonVerbOpt(true))) pattern_Msg_HandleMsgMetaNodeRegistrationVote_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"stratos", "register", "v1", "meta_node_registration_vote"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Msg_HandleMsgWithdrawMetaNodeRegistrationStake_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"stratos", "register", "v1", "withdraw_meta_node_registration_stake"}, "", runtime.AssumeColonVerbOpt(true))) ) var ( @@ -883,4 +961,6 @@ var ( forward_Msg_HandleMsgUpdateMetaNodeStake_0 = runtime.ForwardResponseMessage forward_Msg_HandleMsgMetaNodeRegistrationVote_0 = runtime.ForwardResponseMessage + + forward_Msg_HandleMsgWithdrawMetaNodeRegistrationStake_0 = runtime.ForwardResponseMessage ) From 83a09cb39856c059417fdf12fd9ed9174083566c Mon Sep 17 00:00:00 2001 From: Xiong Date: Tue, 16 May 2023 14:56:06 -0400 Subject: [PATCH 69/95] add mutex for cache --- x/register/keeper/keeper.go | 2 ++ x/register/keeper/meta_node.go | 15 +++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/x/register/keeper/keeper.go b/x/register/keeper/keeper.go index 27328609..d07d1822 100644 --- a/x/register/keeper/keeper.go +++ b/x/register/keeper/keeper.go @@ -4,6 +4,7 @@ import ( "container/list" "errors" "fmt" + "sync" "time" "github.com/tendermint/tendermint/libs/log" @@ -20,6 +21,7 @@ import ( var ( metaNodeBitMapIndexCacheStatus = types.CACHE_DIRTY + cacheMutex sync.RWMutex ) // Keeper of the register store diff --git a/x/register/keeper/meta_node.go b/x/register/keeper/meta_node.go index a2f5dade..5954745e 100644 --- a/x/register/keeper/meta_node.go +++ b/x/register/keeper/meta_node.go @@ -554,6 +554,9 @@ func (k Keeper) OwnMetaNode(ctx sdk.Context, ownerAddr sdk.AccAddress, p2pAddr s func (k Keeper) GetMetaNodeBitMapIndex(ctx sdk.Context, networkAddr stratos.SdsAddress) (index int, err error) { k.UpdateMetaNodeBitMapIdxCache(ctx) + cacheMutex.RLock() + defer cacheMutex.RUnlock() + index, ok := k.metaNodeBitMapIndexCache[networkAddr.String()] if !ok { return index, errors.New(fmt.Sprintf("Can not find meta-node %v from cache", networkAddr.String())) @@ -566,16 +569,25 @@ func (k Keeper) GetMetaNodeBitMapIndex(ctx sdk.Context, networkAddr stratos.SdsA } func (k Keeper) AddMetaNodeToBitMapIdxCache(networkAddr stratos.SdsAddress) { + cacheMutex.Lock() + defer cacheMutex.Unlock() + k.metaNodeBitMapIndexCache[networkAddr.String()] = -1 metaNodeBitMapIndexCacheStatus = types.CACHE_DIRTY } func (k Keeper) RemoveMetaNodeFromBitMapIdxCache(networkAddr stratos.SdsAddress) { + cacheMutex.Lock() + defer cacheMutex.Unlock() + delete(k.metaNodeBitMapIndexCache, networkAddr.String()) metaNodeBitMapIndexCacheStatus = types.CACHE_DIRTY } func (k Keeper) UpdateMetaNodeBitMapIdxCache(ctx sdk.Context) { + cacheMutex.Lock() + defer cacheMutex.Unlock() + if metaNodeBitMapIndexCacheStatus == types.CACHE_NOT_DIRTY { return } @@ -598,6 +610,9 @@ func (k Keeper) UpdateMetaNodeBitMapIdxCache(ctx sdk.Context) { } func (k Keeper) ReloadMetaNodeBitMapIdxCache(ctx sdk.Context) { + cacheMutex.Lock() + defer cacheMutex.Unlock() + if metaNodeBitMapIndexCacheStatus == types.CACHE_NOT_DIRTY { return } From df36e8758276433e396c337341d0e5b0cb00f6cd Mon Sep 17 00:00:00 2001 From: jialbai Date: Wed, 17 May 2023 11:31:55 -0400 Subject: [PATCH 70/95] - qb1835: rename votingValidityPeriod as votingPeriod --- proto/stratos/register/v1/register.proto | 6 +- x/register/keeper/meta_node.go | 2 +- x/register/keeper/params.go | 6 +- x/register/types/params.go | 18 +- x/register/types/register.pb.go | 199 +++++++++++------------ 5 files changed, 115 insertions(+), 116 deletions(-) diff --git a/proto/stratos/register/v1/register.proto b/proto/stratos/register/v1/register.proto index 8e39d022..39146f40 100644 --- a/proto/stratos/register/v1/register.proto +++ b/proto/stratos/register/v1/register.proto @@ -42,11 +42,11 @@ message Params { (gogoproto.jsontag) = "resource_node_min_stake", (gogoproto.moretags) = "yaml:\"resource_node_min_stake\"" ]; - google.protobuf.Duration voting_validity_period = 7 [ + google.protobuf.Duration voting_period = 7 [ (gogoproto.nullable) = false, (gogoproto.stdduration) = true, - (gogoproto.jsontag) = "voting_validity_period", - (gogoproto.moretags) = "yaml:\"voting_validity_period\"" + (gogoproto.jsontag) = "voting_period", + (gogoproto.moretags) = "yaml:\"voting_period\"" ]; } diff --git a/x/register/keeper/meta_node.go b/x/register/keeper/meta_node.go index 5954745e..64d0204f 100644 --- a/x/register/keeper/meta_node.go +++ b/x/register/keeper/meta_node.go @@ -124,7 +124,7 @@ func (k Keeper) RegisterMetaNode(ctx sdk.Context, networkAddr stratos.SdsAddress var approveList = make([]stratos.SdsAddress, 0) var rejectList = make([]stratos.SdsAddress, 0) - votingValidityPeriod := k.VotingValidityPeriod(ctx) + votingValidityPeriod := k.VotingPeriod(ctx) expireTime := ctx.BlockHeader().Time.Add(votingValidityPeriod) votePool := types.NewRegistrationVotePool(networkAddr, approveList, rejectList, expireTime) diff --git a/x/register/keeper/params.go b/x/register/keeper/params.go index 96d8c83e..3a5352d1 100644 --- a/x/register/keeper/params.go +++ b/x/register/keeper/params.go @@ -54,8 +54,8 @@ func (k Keeper) ResourceNodeMinStake(ctx sdk.Context) (res sdk.Coin) { return } -// VotingValidityPeriod -func (k Keeper) VotingValidityPeriod(ctx sdk.Context) (res time.Duration) { - k.paramSpace.Get(ctx, types.KeyVotingValidityPeriod, &res) +// VotingPeriod +func (k Keeper) VotingPeriod(ctx sdk.Context) (res time.Duration) { + k.paramSpace.Get(ctx, types.KeyVotingPeriod, &res) return } diff --git a/x/register/types/params.go b/x/register/types/params.go index 03b06a27..6b8f8ff5 100644 --- a/x/register/types/params.go +++ b/x/register/types/params.go @@ -29,11 +29,11 @@ var ( KeyMaxEntries = []byte("MaxEntries") KeyResourceNodeRegEnabled = []byte("ResourceNodeRegEnabled") KeyResourceNodeMinStake = []byte("ResourceNodeMinStake") - KeyVotingValidityPeriod = []byte("VotingValidityPeriod") + KeyVotingPeriod = []byte("VotingPeriod") DefaultUnbondingThreasholdTime = 180 * 24 * time.Hour // threashold for unbonding - by default 180 days DefaultUnbondingCompletionTime = 14 * 24 * time.Hour // lead time to complete unbonding - by default 14 days - DefaultVotingValidityPeriod = 7 * 24 * time.Hour // expiration time of registration voting - by default 7 days + DefaultVotingPeriod = 7 * 24 * time.Hour // expiration time of registration voting - by default 7 days DefaultStakeNozRate = sdk.NewDec(1000000) // 0.001gwei -> 1noz = 1000000wei -> 1noz DefaultRemainingNozLimit = sdk.NewInt(0) DefaultResourceNodeMinStake = sdk.NewCoin(DefaultBondDenom, sdk.NewInt(1e18)) @@ -46,7 +46,7 @@ func ParamKeyTable() paramtypes.KeyTable { // NewParams creates a new Params object func NewParams(bondDenom string, threashold, completion time.Duration, maxEntries uint32, - resourceNodeRegEnabled bool, resourceNodeMinStake sdk.Coin, votingValidityPeriod time.Duration) Params { + resourceNodeRegEnabled bool, resourceNodeMinStake sdk.Coin, votingPeriod time.Duration) Params { return Params{ BondDenom: bondDenom, @@ -55,7 +55,7 @@ func NewParams(bondDenom string, threashold, completion time.Duration, maxEntrie MaxEntries: maxEntries, ResourceNodeRegEnabled: resourceNodeRegEnabled, ResourceNodeMinStake: resourceNodeMinStake, - VotingValidityPeriod: votingValidityPeriod, + VotingPeriod: votingPeriod, } } @@ -68,7 +68,7 @@ func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { paramtypes.NewParamSetPair(KeyMaxEntries, &p.MaxEntries, validateMaxEntries), paramtypes.NewParamSetPair(KeyResourceNodeRegEnabled, &p.ResourceNodeRegEnabled, validateResourceNodeRegEnabled), paramtypes.NewParamSetPair(KeyResourceNodeMinStake, &p.ResourceNodeMinStake, validateResourceNodeMinStake), - paramtypes.NewParamSetPair(KeyVotingValidityPeriod, &p.VotingValidityPeriod, validateVotingValidityPeriod), + paramtypes.NewParamSetPair(KeyVotingPeriod, &p.VotingPeriod, validateVotingPeriod), } } @@ -91,7 +91,7 @@ func (p Params) Validate() error { if err := validateResourceNodeMinStake(p.ResourceNodeMinStake); err != nil { return err } - if err := validateVotingValidityPeriod(p.VotingValidityPeriod); err != nil { + if err := validateVotingPeriod(p.VotingPeriod); err != nil { return err } return nil @@ -106,7 +106,7 @@ func DefaultParams() Params { DefaultMaxEntries, DefaultResourceNodeRegEnabled, DefaultResourceNodeMinStake, - DefaultVotingValidityPeriod, + DefaultVotingPeriod, ) } @@ -183,14 +183,14 @@ func validateResourceNodeMinStake(i interface{}) error { return nil } -func validateVotingValidityPeriod(i interface{}) error { +func validateVotingPeriod(i interface{}) error { v, ok := i.(time.Duration) if !ok { return fmt.Errorf("invalid parameter type: %T", i) } if v <= 0 { - return fmt.Errorf("voting validity period must be positive: %d", v) + return fmt.Errorf("voting period must be positive: %d", v) } return nil diff --git a/x/register/types/register.pb.go b/x/register/types/register.pb.go index eca2fe2b..186cf081 100644 --- a/x/register/types/register.pb.go +++ b/x/register/types/register.pb.go @@ -41,7 +41,7 @@ type Params struct { MaxEntries uint32 `protobuf:"varint,4,opt,name=max_entries,json=maxEntries,proto3" json:"max_entries" yaml:"max_entries",omitempty` ResourceNodeRegEnabled bool `protobuf:"varint,5,opt,name=resource_node_reg_enabled,json=resourceNodeRegEnabled,proto3" json:"resource_node_reg_enabled" yaml:"resource_node_reg_enabled"` ResourceNodeMinStake types.Coin `protobuf:"bytes,6,opt,name=resource_node_min_stake,json=resourceNodeMinStake,proto3" json:"resource_node_min_stake" yaml:"resource_node_min_stake"` - VotingValidityPeriod time.Duration `protobuf:"bytes,7,opt,name=voting_validity_period,json=votingValidityPeriod,proto3,stdduration" json:"voting_validity_period" yaml:"voting_validity_period"` + VotingPeriod time.Duration `protobuf:"bytes,7,opt,name=voting_period,json=votingPeriod,proto3,stdduration" json:"voting_period" yaml:"voting_period"` } func (m *Params) Reset() { *m = Params{} } @@ -119,9 +119,9 @@ func (m *Params) GetResourceNodeMinStake() types.Coin { return types.Coin{} } -func (m *Params) GetVotingValidityPeriod() time.Duration { +func (m *Params) GetVotingPeriod() time.Duration { if m != nil { - return m.VotingValidityPeriod + return m.VotingPeriod } return 0 } @@ -604,100 +604,99 @@ func init() { } var fileDescriptor_fef1e3aeec8499d6 = []byte{ - // 1486 bytes of a gzipped FileDescriptorProto + // 1467 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0xcd, 0x6f, 0xd4, 0x46, - 0x1b, 0x8f, 0x13, 0xc8, 0x6e, 0x66, 0xf3, 0xc1, 0x6b, 0xf2, 0xc2, 0x86, 0x17, 0x76, 0x82, 0xdf, - 0x0f, 0x82, 0xde, 0x37, 0xbb, 0x0a, 0xbc, 0x52, 0x55, 0x0e, 0x95, 0xe2, 0x40, 0x5b, 0x68, 0x41, - 0xa9, 0x49, 0x41, 0xaa, 0x54, 0xb9, 0xb3, 0xf6, 0xb0, 0x19, 0xb2, 0xf6, 0x58, 0x9e, 0xd9, 0x25, - 0x2b, 0xf5, 0x50, 0xa9, 0x17, 0x6e, 0x45, 0x6a, 0x0f, 0x1c, 0xf9, 0x23, 0xfa, 0x37, 0x54, 0x94, - 0x13, 0xc7, 0xaa, 0x07, 0xb7, 0x82, 0x4b, 0xb5, 0x47, 0x5f, 0x7a, 0xad, 0x3c, 0x1f, 0xb6, 0xd7, - 0x49, 0x84, 0xa8, 0xc4, 0xa9, 0x9c, 0xd6, 0xcf, 0xef, 0xf7, 0xcc, 0xf3, 0x3c, 0xe3, 0xe7, 0x63, - 0x3c, 0x0b, 0x2c, 0xc6, 0x63, 0xc4, 0x29, 0xeb, 0xc4, 0xb8, 0x47, 0x18, 0xc7, 0x71, 0x67, 0xb8, - 0x91, 0x3f, 0xb7, 0xa3, 0x98, 0x72, 0x6a, 0x9e, 0x54, 0x3a, 0xed, 0x1c, 0x1f, 0x6e, 0x9c, 0x59,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0x24, 0xbc, - 0x9d, 0xc1, 0xe6, 0x77, 0x06, 0x38, 0x35, 0xa4, 0x3c, 0x4b, 0xcf, 0x10, 0xf5, 0x89, 0x4f, 0xf8, - 0xc8, 0x8d, 0x70, 0x4c, 0xa8, 0xdf, 0xac, 0xbd, 0xaa, 0x0a, 0xb6, 0x54, 0x50, 0x47, 0x18, 0x48, - 0x13, 0x78, 0x4e, 0xc6, 0x74, 0x38, 0x2f, 0xf3, 0xbf, 0x2c, 0xc9, 0x3b, 0x8a, 0xdb, 0x96, 0xd4, - 0x0f, 0x35, 0x30, 0xef, 0x94, 0xe2, 0x35, 0xef, 0x80, 0xa5, 0x10, 0xf3, 0x07, 0x34, 0xde, 0x73, - 0x91, 0xef, 0xc7, 0x98, 0x31, 0xd5, 0x9c, 0xeb, 0xe3, 0x04, 0x56, 0xa9, 0x34, 0x81, 0xa7, 0xa4, - 0xe7, 0x0a, 0x61, 0x39, 0x8b, 0x0a, 0xd9, 0x94, 0x80, 0x89, 0xc0, 0x6c, 0x34, 0xe8, 0xee, 0xe1, - 0x91, 0xea, 0xcb, 0xe5, 0x03, 0xdb, 0xdd, 0x0c, 0x47, 0xf6, 0xe5, 0x71, 0x02, 0x95, 0x5e, 0x9a, - 0xc0, 0x05, 0x69, 0x5b, 0xca, 0xd6, 0xb3, 0xef, 0xd7, 0x97, 0x55, 0xde, 0xbc, 0x78, 0x14, 0x71, - 0xda, 0xde, 0x1e, 0x74, 0x3f, 0xc2, 0x23, 0x47, 0x2d, 0x30, 0xdf, 0x01, 0x35, 0x36, 0x60, 0x11, - 0x0e, 0x7d, 0xd1, 0x58, 0x75, 0xfb, 0xdc, 0x38, 0x81, 0x1a, 0x4a, 0x13, 0xb8, 0x28, 0xcd, 0x29, - 0xc0, 0x72, 0x34, 0x65, 0xde, 0x05, 0xb3, 0x8c, 0x23, 0x3e, 0x90, 0xc5, 0xbf, 0x78, 0xc9, 0xd2, - 0xf5, 0xa1, 0xa7, 0x97, 0x2e, 0x11,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0x3f, 0x25, 0x50, 0x26, 0x01, 0x48, 0x44, 0xcc, 0xd1, 0x4f, 0xc0, 0x22, 0x61, - 0xee, 0x90, 0x72, 0xec, 0x46, 0x88, 0xb1, 0xfc, 0xdb, 0xee, 0xbf, 0xe3, 0x04, 0x56, 0x98, 0x34, - 0x81, 0x7f, 0x97, 0x16, 0x27, 0x71, 0xcb, 0x99, 0x27, 0x4c, 0x24, 0x4a, 0x8a, 0x5f, 0xcf, 0x80, - 0x46, 0xa9, 0x22, 0xb3, 0x69, 0x10, 0xd0, 0x90, 0xec, 0xe1, 0x58, 0xa5, 0x4c, 0x4c, 0x03, 0x05, - 0x15, 0xd3, 0x40, 0x01, 0x96, 0xa3, 0x29, 0xf3, 0x1a, 0xa8, 0x13, 0x1f, 0x87, 0x9c, 0x70, 0x39, - 0xab, 0x64, 0x33, 0xe5, 0x58, 0x9a, 0xc0, 0x15, 0x15, 0x8f, 0x42, 0xca, 0xdf, 0xb2, 0xb9, 0x9a, - 0xb9, 0x09, 0x6a, 0x0f, 0x70, 0x97, 0x11, 0x2e, 0xbf, 0xd5, 0x65, 0x76, 0x35, 0x94, 0x26, 0xb0, - 0x29, 0x8d, 0x28, 0xa0, 0x6c, 0x43, 0x2b, 0x99, 0x3e, 0x38, 0xc1, 0xb0, 0x37, 0x88, 0xb3, 0xef, - 0x31, 0x8f, 0x86, 0x1c, 0x79, 0x5c, 0xa4, 0x65, 0xce, 0x7e, 0x37, 0x1b, 0xff, 0x55, 0x2e, 0x4d, - 0xe0, 0x79, 0x35, 0x87, 0x2a, 0x4c, 0xd9, 0xfa, 0x92, 0x26, 0xb7, 0x24, 0x97, 0x05, 0xea, 0x63, - 0x8e, 0x48, 0x5f, 0x4f, 0x29, 0x11, 0xa8, 0x82, 0x8a, 0x40, 0x15, 0x30, 0x11, 0xa8, 0xc2, 0x4a, - 0x1d, 0xf5, 0x70, 0x1a, 0x2c, 0x7c, 0xaa, 0x6f, 0x0b, 0xe2, 0x40, 0xb9, 0x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 0x12, 0x61, 0xee, 0x90, 0x72, 0xec, + 0x46, 0x88, 0xb1, 0xfc, 0x77, 0xdb, 0x3b, 0xe3, 0x04, 0x56, 0x98, 0x34, 0x81, 0xff, 0x95, 0x16, + 0x27, 0x71, 0xcb, 0x59, 0x20, 0x4c, 0x14, 0x4a, 0x8a, 0xdf, 0xcf, 0x80, 0x7a, 0xa9, 0x23, 0xb3, + 0x6d, 0x10, 0xd0, 0x90, 0xec, 0xe2, 0x58, 0x95, 0x4c, 0x6c, 0x03, 0x05, 0x15, 0xdb, 0x40, 0x01, + 0x96, 0xa3, 0x29, 0xf3, 0x0a, 0xa8, 0x11, 0x1f, 0x87, 0x9c, 0x70, 0xb9, 0xab, 0xe4, 0x30, 0xe5, + 0x58, 0x9a, 0xc0, 0x55, 0x15, 0x8f, 0x42, 0xca, 0xbf, 0x53, 0x73, 0x35, 0x73, 0x13, 0xcc, 0xdd, + 0xc3, 0x5d, 0x46, 0xb8, 0xfc, 0x1d, 0x2e, 0xab, 0xab, 0xa1, 0x34, 0x81, 0x0d, 0x69, 0x44, 0x01, + 0x65, 0x1b, 0x5a, 0xc9, 0xf4, 0xc1, 0x31, 0x86, 0xbd, 0x41, 0x4c, 0xf8, 0xc8, 0xf5, 0x68, 0xc8, + 0x91, 0xc7, 0x45, 0x59, 0xe6, 0xed, 0x0f, 0xb2, 0xf5, 0x5f, 0xe5, 0xd2, 0x04, 0x9e, 0x51, 0x7b, + 0xa8, 0xc2, 0x94, 0xad, 0x2f, 0x6b, 0xf2, 0x92, 0xe4, 0xb2, 0x40, 0x7d, 0xcc, 0x11, 0xe9, 0xeb, + 0x2d, 0x25, 0x02, 0x55, 0x50, 0x11, 0xa8, 0x02, 0x26, 0x02, 0x55, 0x58, 0x69, 0xa2, 0xee, 0x4f, + 0x83, 0xc5, 0x2f, 0xf4, 0x4d, 0x40, 0x7c, 0x50, 0xae, 0x81, 0x85, 0xf2, 0x38, 0xa8, 0x62, 0x88, + 0x56, 0x2f, 0xe3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, 0xa7, 0x9e, 0x3e, 0x6f, 0x4e, 0xfd, 0xf2, + 0xbc, 0x39, 0xf5, 0xe5, 0x7b, 0x25, 0x3f, 0xaa, 0x83, 0x42, 0xcc, 0xf5, 0xe3, 0xba, 0xb7, 0x83, + 0x48, 0xd8, 0xd9, 0x2b, 0xfe, 0x3d, 0x23, 0x3c, 0x77, 0x67, 0x45, 0x31, 0x2e, 0xfc, 0x1d, 0x00, + 0x00, 0xff, 0xff, 0x43, 0xc2, 0xd0, 0x60, 0xbf, 0x11, 0x00, 0x00, } func (this *ResourceNode) Equal(that interface{}) bool { @@ -852,7 +851,7 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - n1, err1 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.VotingValidityPeriod, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.VotingValidityPeriod):]) + n1, err1 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.VotingPeriod, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.VotingPeriod):]) if err1 != nil { return 0, err1 } @@ -1381,7 +1380,7 @@ func (m *Params) Size() (n int) { } l = m.ResourceNodeMinStake.Size() n += 1 + l + sovRegister(uint64(l)) - l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.VotingValidityPeriod) + l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.VotingPeriod) n += 1 + l + sovRegister(uint64(l)) return n } @@ -1767,7 +1766,7 @@ func (m *Params) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 7: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field VotingValidityPeriod", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field VotingPeriod", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -1794,7 +1793,7 @@ func (m *Params) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.VotingValidityPeriod, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.VotingPeriod, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex From c6ce082745ad1fc6617110bfff3b908736a0b29c Mon Sep 17 00:00:00 2001 From: Xiong Date: Wed, 17 May 2023 12:58:54 -0400 Subject: [PATCH 71/95] resource node & meta node should not use the same network address --- x/register/keeper/meta_node.go | 5 +++++ x/register/keeper/resource_node.go | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/x/register/keeper/meta_node.go b/x/register/keeper/meta_node.go index 64d0204f..c47aa78f 100644 --- a/x/register/keeper/meta_node.go +++ b/x/register/keeper/meta_node.go @@ -109,6 +109,11 @@ func (k Keeper) RegisterMetaNode(ctx sdk.Context, networkAddr stratos.SdsAddress ctx.Logger().Error("Meta node already exist") return ozoneLimitChange, types.ErrMetaNodePubKeyExists } + if _, found := k.GetResourceNode(ctx, networkAddr); found { + ctx.Logger().Error("Resource node with same network address already exist") + return ozoneLimitChange, types.ErrResourceNodePubKeyExists + } + if stake.GetDenom() != k.BondDenom(ctx) { return ozoneLimitChange, types.ErrBadDenom } diff --git a/x/register/keeper/resource_node.go b/x/register/keeper/resource_node.go index d4b3e145..deb00921 100644 --- a/x/register/keeper/resource_node.go +++ b/x/register/keeper/resource_node.go @@ -285,6 +285,11 @@ func (k Keeper) RegisterResourceNode(ctx sdk.Context, networkAddr stratos.SdsAdd ctx.Logger().Error("Resource node already exist") return ozoneLimitChange, types.ErrResourceNodePubKeyExists } + if _, found := k.GetMetaNode(ctx, networkAddr); found { + ctx.Logger().Error("Meta node with same network address already exist") + return ozoneLimitChange, types.ErrMetaNodePubKeyExists + } + if stake.GetDenom() != k.BondDenom(ctx) { return ozoneLimitChange, types.ErrBadDenom } From 46d9fac72a1826dac4108d9202a72da83e86adbb Mon Sep 17 00:00:00 2001 From: jialbai Date: Thu, 18 May 2023 11:40:02 -0400 Subject: [PATCH 72/95] - qb1835: remove flag isPassingVote --- x/register/keeper/meta_node.go | 31 ++++++++++++++----------------- x/register/keeper/msg_server.go | 3 +-- 2 files changed, 15 insertions(+), 19 deletions(-) diff --git a/x/register/keeper/meta_node.go b/x/register/keeper/meta_node.go index c47aa78f..e3bb8c33 100644 --- a/x/register/keeper/meta_node.go +++ b/x/register/keeper/meta_node.go @@ -368,40 +368,39 @@ func (k Keeper) WithdrawMetaNodeRegistrationStake(ctx sdk.Context, networkAddr s } func (k Keeper) HandleVoteForMetaNodeRegistration(ctx sdk.Context, candidateNetworkAddr stratos.SdsAddress, candidateOwnerAddr sdk.AccAddress, - opinion types.VoteOpinion, voterNetworkAddr stratos.SdsAddress, voterOwnerAddr sdk.AccAddress) (nodeStatus stakingtypes.BondStatus, isPassingVote bool, err error) { + opinion types.VoteOpinion, voterNetworkAddr stratos.SdsAddress, voterOwnerAddr sdk.AccAddress) (nodeStatus stakingtypes.BondStatus, err error) { - isPassingVote = false // voter validation voterNode, found := k.GetMetaNode(ctx, voterNetworkAddr) if !found { - return stakingtypes.Unbonded, isPassingVote, types.ErrNoVoterMetaNodeFound + return stakingtypes.Unbonded, types.ErrNoVoterMetaNodeFound } if voterNode.GetOwnerAddress() != voterOwnerAddr.String() { - return stakingtypes.Unbonded, isPassingVote, types.ErrInvalidVoterOwnerAddr + return stakingtypes.Unbonded, types.ErrInvalidVoterOwnerAddr } if voterNode.Status != stakingtypes.Bonded || voterNode.Suspend { - return stakingtypes.Unbonded, isPassingVote, types.ErrInvalidVoterStatus + return stakingtypes.Unbonded, types.ErrInvalidVoterStatus } // candidate validation candidateNode, found := k.GetMetaNode(ctx, candidateNetworkAddr) if !found { - return stakingtypes.Unbonded, isPassingVote, types.ErrNoCandidateMetaNodeFound + return stakingtypes.Unbonded, types.ErrNoCandidateMetaNodeFound } if candidateNode.GetOwnerAddress() != candidateOwnerAddr.String() { - return candidateNode.Status, isPassingVote, types.ErrInvalidCandidateOwnerAddr + return candidateNode.Status, types.ErrInvalidCandidateOwnerAddr } // vote validation and handle voting votePool, found := k.GetMetaNodeRegistrationVotePool(ctx, candidateNetworkAddr) if !found { - return stakingtypes.Unbonded, isPassingVote, types.ErrNoRegistrationVotePoolFound + return stakingtypes.Unbonded, types.ErrNoRegistrationVotePoolFound } if votePool.ExpireTime.Before(ctx.BlockHeader().Time) { - return stakingtypes.Unbonded, isPassingVote, types.ErrVoteExpired + return stakingtypes.Unbonded, types.ErrVoteExpired } if hasStringValue(votePool.ApproveList, voterNetworkAddr.String()) || hasStringValue(votePool.RejectList, voterNetworkAddr.String()) { - return stakingtypes.Unbonded, isPassingVote, types.ErrDuplicateVoting + return stakingtypes.Unbonded, types.ErrDuplicateVoting } if opinion.Equal(types.Approve) { @@ -413,7 +412,7 @@ func (k Keeper) HandleVoteForMetaNodeRegistration(ctx sdk.Context, candidateNetw // if vote had already passed before if votePool.IsVotePassed { - return candidateNode.Status, isPassingVote, nil + return candidateNode.Status, nil } //if vote is yet to pass @@ -439,26 +438,24 @@ func (k Keeper) HandleVoteForMetaNodeRegistration(ctx sdk.Context, candidateNetw nBondedMetaAccountAddr := k.accountKeeper.GetModuleAddress(types.MetaNodeNotBondedPool) if nBondedMetaAccountAddr == nil { ctx.Logger().Error("not bonded account address for meta nodes does not exist.") - return candidateNode.Status, isPassingVote, types.ErrUnknownAccountAddress + return candidateNode.Status, types.ErrUnknownAccountAddress } hasCoin := k.bankKeeper.HasBalance(ctx, nBondedMetaAccountAddr, tokenToBond) if !hasCoin { - return candidateNode.Status, isPassingVote, types.ErrInsufficientBalance + return candidateNode.Status, types.ErrInsufficientBalance } err = k.bankKeeper.SendCoinsFromModuleToModule(ctx, types.MetaNodeNotBondedPool, types.MetaNodeBondedPool, sdk.NewCoins(tokenToBond)) if err != nil { - return candidateNode.Status, isPassingVote, err + return candidateNode.Status, err } votePool.IsVotePassed = true k.SetMetaNodeRegistrationVotePool(ctx, votePool) - // mark this vote as passing vote - isPassingVote = true } - return candidateNode.Status, isPassingVote, nil + return candidateNode.Status, nil } func (k Keeper) UpdateMetaNode(ctx sdk.Context, description types.Description, diff --git a/x/register/keeper/msg_server.go b/x/register/keeper/msg_server.go index 8834913c..bfa507cc 100644 --- a/x/register/keeper/msg_server.go +++ b/x/register/keeper/msg_server.go @@ -212,7 +212,7 @@ func (k msgServer) HandleMsgMetaNodeRegistrationVote(goCtx context.Context, msg return &types.MsgMetaNodeRegistrationVoteResponse{}, sdkerrors.Wrap(types.ErrInvalidVoterOwnerAddr, err.Error()) } - nodeStatus, isPassingVote, err := k.HandleVoteForMetaNodeRegistration( + nodeStatus, err := k.HandleVoteForMetaNodeRegistration( ctx, candidateNetworkAddress, candidateOwnerAddress, types.VoteOpinion(msg.Opinion), voterNetworkAddress, voterOwnerAddress) if err != nil { return &types.MsgMetaNodeRegistrationVoteResponse{}, sdkerrors.Wrap(types.ErrVoteMetaNode, err.Error()) @@ -225,7 +225,6 @@ func (k msgServer) HandleMsgMetaNodeRegistrationVote(goCtx context.Context, msg sdk.NewAttribute(types.AttributeKeyVoterNetworkAddress, msg.VoterNetworkAddress), sdk.NewAttribute(types.AttributeKeyCandidateNetworkAddress, msg.CandidateNetworkAddress), sdk.NewAttribute(types.AttributeKeyCandidateStatus, nodeStatus.String()), - sdk.NewAttribute(types.AttributeKeyIsPassingVote, strconv.FormatBool(isPassingVote)), ), sdk.NewEvent( sdk.EventTypeMessage, From 9f4ec3db7b1d3ff14ccd1ef486b8597b8ae6d1f2 Mon Sep 17 00:00:00 2001 From: jialbai Date: Thu, 18 May 2023 12:22:53 -0400 Subject: [PATCH 73/95] - qb1835: remove unused key is_passing_vote --- x/register/types/events.go | 1 - 1 file changed, 1 deletion(-) diff --git a/x/register/types/events.go b/x/register/types/events.go index d38be7aa..05fc47e6 100644 --- a/x/register/types/events.go +++ b/x/register/types/events.go @@ -23,7 +23,6 @@ const ( AttributeKeyCandidateNetworkAddress = "candidate_network_address" AttributeKeyVoterNetworkAddress = "voter_network_address" AttributeKeyCandidateStatus = "candidate_status" - AttributeKeyIsPassingVote = "is_passing_vote" AttributeKeyUnbondingMatureTime = "unbonding_mature_time" From 808f11370e11d06ec15969c95909bbb815fbdf54 Mon Sep 17 00:00:00 2001 From: Xiong Date: Wed, 24 May 2023 11:37:47 -0400 Subject: [PATCH 74/95] disable total supply reset function --- x/pot/abci.go | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/x/pot/abci.go b/x/pot/abci.go index 3e11ea69..f37f5280 100644 --- a/x/pot/abci.go +++ b/x/pot/abci.go @@ -4,8 +4,6 @@ import ( abci "github.com/tendermint/tendermint/abci/types" sdk "github.com/cosmos/cosmos-sdk/types" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - "github.com/stratosnet/stratos-chain/x/pot/keeper" "github.com/stratosnet/stratos-chain/x/pot/types" ) @@ -55,14 +53,14 @@ func EndBlocker(ctx sdk.Context, req abci.RequestEndBlock, k keeper.Keeper) []ab } // reset total supply to 100M stos - minter, amount := k.RestoreTotalSupply(ctx) - if minter.Empty() || amount.Empty() { - return []abci.ValidatorUpdate{} - } - - ctx.EventManager().EmitEvent( - banktypes.NewCoinMintEvent(minter, amount), - ) + //minter, amount := k.RestoreTotalSupply(ctx) + //if minter.Empty() || amount.Empty() { + // return []abci.ValidatorUpdate{} + //} + // + //ctx.EventManager().EmitEvent( + // banktypes.NewCoinMintEvent(minter, amount), + //) return []abci.ValidatorUpdate{} } From 337f5026eb6b3efb72a55c766b085a18ea34e4dd Mon Sep 17 00:00:00 2001 From: Xiong Date: Wed, 24 May 2023 16:50:02 -0400 Subject: [PATCH 75/95] bug fix --- x/register/keeper/keeper.go | 57 +++++++++++++++++----------------- x/register/keeper/meta_node.go | 34 ++++++++++---------- 2 files changed, 46 insertions(+), 45 deletions(-) diff --git a/x/register/keeper/keeper.go b/x/register/keeper/keeper.go index d07d1822..c79ecd66 100644 --- a/x/register/keeper/keeper.go +++ b/x/register/keeper/keeper.go @@ -19,25 +19,22 @@ import ( regtypes "github.com/stratosnet/stratos-chain/x/register/types" ) -var ( - metaNodeBitMapIndexCacheStatus = types.CACHE_DIRTY - cacheMutex sync.RWMutex -) - // Keeper of the register store type Keeper struct { - storeKey sdk.StoreKey - cdc codec.Codec - paramSpace paramtypes.Subspace - accountKeeper types.AccountKeeper - bankKeeper types.BankKeeper - distrKeeper types.DistrKeeper - hooks types.RegisterHooks - resourceNodeCache map[string]cachedResourceNode - resourceNodeCacheList *list.List - metaNodeCache map[string]cachedMetaNode - metaNodeCacheList *list.List - metaNodeBitMapIndexCache map[string]int + storeKey sdk.StoreKey + cdc codec.Codec + paramSpace paramtypes.Subspace + accountKeeper types.AccountKeeper + bankKeeper types.BankKeeper + distrKeeper types.DistrKeeper + hooks types.RegisterHooks + resourceNodeCache map[string]cachedResourceNode + resourceNodeCacheList *list.List + metaNodeCache map[string]cachedMetaNode + metaNodeCacheList *list.List + metaNodeBitMapIndexCache map[string]int + metaNodeBitMapIndexCacheStatus types.CacheStatus + cacheMutex sync.RWMutex } // NewKeeper creates a register keeper @@ -45,18 +42,20 @@ func NewKeeper(cdc codec.Codec, key sdk.StoreKey, paramSpace paramtypes.Subspace accountKeeper types.AccountKeeper, bankKeeper types.BankKeeper, distrKeeper types.DistrKeeper) Keeper { keeper := Keeper{ - storeKey: key, - cdc: cdc, - paramSpace: paramSpace.WithKeyTable(types.ParamKeyTable()), - accountKeeper: accountKeeper, - bankKeeper: bankKeeper, - distrKeeper: distrKeeper, - hooks: nil, - resourceNodeCache: make(map[string]cachedResourceNode, resourceNodeCacheSize), - resourceNodeCacheList: list.New(), - metaNodeCache: make(map[string]cachedMetaNode, metaNodeCacheSize), - metaNodeCacheList: list.New(), - metaNodeBitMapIndexCache: make(map[string]int), + storeKey: key, + cdc: cdc, + paramSpace: paramSpace.WithKeyTable(types.ParamKeyTable()), + accountKeeper: accountKeeper, + bankKeeper: bankKeeper, + distrKeeper: distrKeeper, + hooks: nil, + resourceNodeCache: make(map[string]cachedResourceNode, resourceNodeCacheSize), + resourceNodeCacheList: list.New(), + metaNodeCache: make(map[string]cachedMetaNode, metaNodeCacheSize), + metaNodeCacheList: list.New(), + metaNodeBitMapIndexCache: make(map[string]int), + metaNodeBitMapIndexCacheStatus: types.CACHE_DIRTY, + cacheMutex: sync.RWMutex{}, } return keeper } diff --git a/x/register/keeper/meta_node.go b/x/register/keeper/meta_node.go index e3bb8c33..014852ba 100644 --- a/x/register/keeper/meta_node.go +++ b/x/register/keeper/meta_node.go @@ -556,8 +556,8 @@ func (k Keeper) OwnMetaNode(ctx sdk.Context, ownerAddr sdk.AccAddress, p2pAddr s func (k Keeper) GetMetaNodeBitMapIndex(ctx sdk.Context, networkAddr stratos.SdsAddress) (index int, err error) { k.UpdateMetaNodeBitMapIdxCache(ctx) - cacheMutex.RLock() - defer cacheMutex.RUnlock() + k.cacheMutex.RLock() + defer k.cacheMutex.RUnlock() index, ok := k.metaNodeBitMapIndexCache[networkAddr.String()] if !ok { @@ -571,29 +571,30 @@ func (k Keeper) GetMetaNodeBitMapIndex(ctx sdk.Context, networkAddr stratos.SdsA } func (k Keeper) AddMetaNodeToBitMapIdxCache(networkAddr stratos.SdsAddress) { - cacheMutex.Lock() - defer cacheMutex.Unlock() + k.cacheMutex.Lock() + defer k.cacheMutex.Unlock() k.metaNodeBitMapIndexCache[networkAddr.String()] = -1 - metaNodeBitMapIndexCacheStatus = types.CACHE_DIRTY + k.metaNodeBitMapIndexCacheStatus = types.CACHE_DIRTY } func (k Keeper) RemoveMetaNodeFromBitMapIdxCache(networkAddr stratos.SdsAddress) { - cacheMutex.Lock() - defer cacheMutex.Unlock() + k.cacheMutex.Lock() + defer k.cacheMutex.Unlock() delete(k.metaNodeBitMapIndexCache, networkAddr.String()) - metaNodeBitMapIndexCacheStatus = types.CACHE_DIRTY + k.metaNodeBitMapIndexCacheStatus = types.CACHE_DIRTY } func (k Keeper) UpdateMetaNodeBitMapIdxCache(ctx sdk.Context) { - cacheMutex.Lock() - defer cacheMutex.Unlock() + k.cacheMutex.Lock() - if metaNodeBitMapIndexCacheStatus == types.CACHE_NOT_DIRTY { + if k.metaNodeBitMapIndexCacheStatus == types.CACHE_NOT_DIRTY { + k.cacheMutex.Unlock() return } if len(k.metaNodeBitMapIndexCache) == 0 { + k.cacheMutex.Unlock() k.ReloadMetaNodeBitMapIdxCache(ctx) return } @@ -608,14 +609,15 @@ func (k Keeper) UpdateMetaNodeBitMapIdxCache(ctx sdk.Context) { for index, key := range keys { k.metaNodeBitMapIndexCache[key] = index } - metaNodeBitMapIndexCacheStatus = types.CACHE_NOT_DIRTY + k.metaNodeBitMapIndexCacheStatus = types.CACHE_NOT_DIRTY + k.cacheMutex.Unlock() } func (k Keeper) ReloadMetaNodeBitMapIdxCache(ctx sdk.Context) { - cacheMutex.Lock() - defer cacheMutex.Unlock() + k.cacheMutex.Lock() + defer k.cacheMutex.Unlock() - if metaNodeBitMapIndexCacheStatus == types.CACHE_NOT_DIRTY { + if k.metaNodeBitMapIndexCacheStatus == types.CACHE_NOT_DIRTY { return } keys := make([]string, 0) @@ -637,5 +639,5 @@ func (k Keeper) ReloadMetaNodeBitMapIdxCache(ctx sdk.Context) { for index, key := range keys { k.metaNodeBitMapIndexCache[key] = index } - metaNodeBitMapIndexCacheStatus = types.CACHE_NOT_DIRTY + k.metaNodeBitMapIndexCacheStatus = types.CACHE_NOT_DIRTY } From b5ce2dfde58a4f8003cd745ffc22b6957d8642f9 Mon Sep 17 00:00:00 2001 From: Xiong Date: Fri, 26 May 2023 17:17:28 -0400 Subject: [PATCH 76/95] staking reward only apply to validators, remove the traversal of resource nodes in volume report tx --- app/test_helpers.go | 60 ++++++- x/pot/app_benchmark_test.go | 302 ++++++++++++++++++++++++++++++++++++ x/pot/app_test.go | 4 +- x/pot/keeper/distribute.go | 117 ++------------ x/pot/types/distribute.go | 89 ++--------- 5 files changed, 389 insertions(+), 183 deletions(-) create mode 100644 x/pot/app_benchmark_test.go diff --git a/app/test_helpers.go b/app/test_helpers.go index 63bbeb0e..dd900ca2 100644 --- a/app/test_helpers.go +++ b/app/test_helpers.go @@ -10,6 +10,7 @@ import ( "testing" "time" + "github.com/stratosnet/stratos-chain/server/config" "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" @@ -44,7 +45,7 @@ import ( ) const ( - DefaultGenTxGas = 5000000 + DefaultGenTxGas = 50000000000 //SimAppChainID = "simulation-app" ) @@ -53,7 +54,7 @@ const ( var DefaultConsensusParams = &abci.ConsensusParams{ Block: &abci.BlockParams{ MaxBytes: 200000, - MaxGas: 2000000, + MaxGas: -1, }, Evidence: &tmproto.EvidenceParams{ MaxAgeNumBlocks: 302400, @@ -457,6 +458,61 @@ func SignCheckDeliver( return gInfo, res, err } +func SignCheckDeliverWithFee( + t *testing.T, txCfg client.TxConfig, app *bam.BaseApp, header tmproto.Header, msgs []sdk.Msg, + chainID string, accNums, accSeqs []uint64, expSimPass, expPass bool, priv ...cryptotypes.PrivKey, +) (sdk.GasInfo, *sdk.Result, error) { + + feeAmount := sdk.NewInt(int64(config.DefaultMinGasPrices)).Mul(sdk.NewInt(DefaultGenTxGas)) + + tx, err := GenTx( + txCfg, + msgs, + sdk.Coins{sdk.NewCoin(stratos.Wei, feeAmount)}, + DefaultGenTxGas, + chainID, + accNums, + accSeqs, + priv..., + ) + require.NoError(t, err) + txBytes, err := txCfg.TxEncoder()(tx) + require.Nil(t, err) + + // Must simulate now as CheckTx doesn't run Msgs anymore + _, res, err := app.Simulate(txBytes) + + if expSimPass { + require.NoError(t, err) + require.NotNil(t, res) + } else { + require.Error(t, err) + require.Nil(t, res) + } + + beginTime := time.Now() + + // Simulate a sending a transaction and committing a block + app.BeginBlock(abci.RequestBeginBlock{Header: header}) + gInfo, res, err := app.Deliver(txCfg.TxEncoder(), tx) + + if expPass { + require.NoError(t, err) + require.NotNil(t, res) + } else { + require.Error(t, err) + require.Nil(t, res) + } + + app.EndBlock(abci.RequestEndBlock{}) + app.Commit() + + endTime := time.Since(beginTime) + fmt.Println("##### time cost:", endTime) + + return gInfo, res, err +} + // GenSequenceOfTxs generates a set of signed transactions of messages, such // that they differ only by having the sequence numbers incremented between // every transaction. diff --git a/x/pot/app_benchmark_test.go b/x/pot/app_benchmark_test.go new file mode 100644 index 00000000..ae28ce7e --- /dev/null +++ b/x/pot/app_benchmark_test.go @@ -0,0 +1,302 @@ +package pot_test + +import ( + "fmt" + "testing" + "time" + + "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" + "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" + "github.com/stretchr/testify/require" + + abci "github.com/tendermint/tendermint/abci/types" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + tmtypes "github.com/tendermint/tendermint/types" + + sdk "github.com/cosmos/cosmos-sdk/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + + "github.com/stratosnet/stratos-chain/app" + "github.com/stratosnet/stratos-chain/crypto" + "github.com/stratosnet/stratos-chain/crypto/bls" + stratos "github.com/stratosnet/stratos-chain/types" + "github.com/stratosnet/stratos-chain/x/pot/types" + registertypes "github.com/stratosnet/stratos-chain/x/register/types" + sdstypes "github.com/stratosnet/stratos-chain/x/sds/types" +) + +const ( + testchainID = "testchain" + + reNodeCount = 1e5 +) + +type KeyInfo struct { + ed25519PrivKey *ed25519.PrivKey + secp256k1PrivKey *secp256k1.PrivKey +} + +func (k KeyInfo) P2PPubKey() cryptotypes.PubKey { + return k.ed25519PrivKey.PubKey() +} + +func (k KeyInfo) P2PAddressBech32() string { + addr := k.ed25519PrivKey.PubKey().Address() + return stratos.SdsAddress(addr).String() +} + +func (k KeyInfo) P2PAddress() stratos.SdsAddress { + addr := k.ed25519PrivKey.PubKey().Address() + return stratos.SdsAddress(addr) +} + +func (k KeyInfo) OwnerAddress() sdk.AccAddress { + addr := k.secp256k1PrivKey.PubKey().Address() + return sdk.AccAddress(addr) +} + +func (k KeyInfo) SignKey() *secp256k1.PrivKey { + return k.secp256k1PrivKey +} + +func NewKeyInfo() KeyInfo { + return KeyInfo{ + ed25519PrivKey: ed25519.GenPrivKey(), + secp256k1PrivKey: secp256k1.GenPrivKey(), + } +} + +var ( + keysMap = make(map[string]KeyInfo, 0) // map[bech32 P2PAddr]KeyInfo + keysList = make([]KeyInfo, 0) + accounts = make([]authtypes.GenesisAccount, 0) + balances = make([]banktypes.Balance, 0) + + accInitBalance = sdk.NewInt(100).Mul(sdk.NewInt(stratos.StosToWei)) + initFoundationDeposit = sdk.NewCoins(sdk.NewCoin(stratos.Utros, sdk.NewInt(40000000000000000))) + + nodeInitStake = sdk.NewInt(1 * stratos.StosToWei) + prepayAmt = sdk.NewCoins(stratos.NewCoin(sdk.NewInt(20).Mul(sdk.NewInt(stratos.StosToWei)))) + valP2PAddrBech32 string +) + +func TestVolumeReportBenchmark(t *testing.T) { + /********************* initialize mock app *********************/ + setupKeysAndAccBalance(reNodeCount) + createValidatorMsg, metaNodes, resourceNodes := setupNodesBenchmark() + + validators := make([]*tmtypes.Validator, 0) + valSet := tmtypes.NewValidatorSet(validators) + + //fmt.Println("##### accounts: ", accounts) + //fmt.Println("!!!!! balances: ", balances) + + stApp := app.SetupWithGenesisNodeSet(t, false, valSet, metaNodes, resourceNodes, accounts, testchainID, balances...) + accountKeeper := stApp.GetAccountKeeper() + + /********************* foundation account deposit *********************/ + header := tmproto.Header{Height: stApp.LastBlockHeight() + 1, ChainID: testchainID} + stApp.BeginBlock(abci.RequestBeginBlock{Header: header}) + ctx := stApp.BaseApp.NewContext(true, header) + + foundationDepositMsg := types.NewMsgFoundationDeposit(initFoundationDeposit, keysMap["foundationDepositorKey"].OwnerAddress()) + txGen := app.MakeTestEncodingConfig().TxConfig + + senderAcc := accountKeeper.GetAccount(ctx, keysMap["foundationDepositorKey"].OwnerAddress()) + accNum := senderAcc.GetAccountNumber() + accSeq := senderAcc.GetSequence() + _, _, err := app.SignCheckDeliverWithFee(t, txGen, stApp.BaseApp, header, []sdk.Msg{foundationDepositMsg}, testchainID, []uint64{accNum}, []uint64{accSeq}, true, true, keysMap["foundationDepositorKey"].secp256k1PrivKey) + require.NoError(t, err) + foundationAccountAddr := accountKeeper.GetModuleAddress(types.FoundationAccount) + app.CheckBalance(t, stApp, foundationAccountAddr, initFoundationDeposit) + + /********************* create validator with 50% commission *********************/ + header = tmproto.Header{Height: stApp.LastBlockHeight() + 1, ChainID: testchainID} + stApp.BeginBlock(abci.RequestBeginBlock{Header: header}) + ctx = stApp.BaseApp.NewContext(false, header) + + senderAcc = accountKeeper.GetAccount(ctx, keysMap[valP2PAddrBech32].OwnerAddress()) + accNum = senderAcc.GetAccountNumber() + accSeq = senderAcc.GetSequence() + _, _, err = app.SignCheckDeliverWithFee(t, txGen, stApp.BaseApp, header, []sdk.Msg{createValidatorMsg}, testchainID, []uint64{accNum}, []uint64{accSeq}, true, true, keysMap[valP2PAddrBech32].secp256k1PrivKey) + require.NoError(t, err) + + /********************* prepay *********************/ + header = tmproto.Header{Height: stApp.LastBlockHeight() + 1, ChainID: testchainID} + stApp.BeginBlock(abci.RequestBeginBlock{Header: header}) + ctx = stApp.BaseApp.NewContext(false, header) + prepayMsg := sdstypes.NewMsgPrepay(resourceNodes[0].OwnerAddress, resourceNodes[0].OwnerAddress, prepayAmt) + senderAcc = accountKeeper.GetAccount(ctx, keysMap[resourceNodes[0].NetworkAddress].OwnerAddress()) + + accNum = senderAcc.GetAccountNumber() + accSeq = senderAcc.GetSequence() + _, _, err = app.SignCheckDeliverWithFee(t, txGen, stApp.BaseApp, header, []sdk.Msg{prepayMsg}, testchainID, []uint64{accNum}, []uint64{accSeq}, true, true, keysMap[resourceNodes[0].NetworkAddress].secp256k1PrivKey) + require.NoError(t, err) + + /********************** commit **********************/ + header = tmproto.Header{Height: stApp.LastBlockHeight() + 1, ChainID: testchainID} + stApp.BeginBlock(abci.RequestBeginBlock{Header: header}) + ctx = stApp.BaseApp.NewContext(true, header) + + /********************* prepare tx data *********************/ + volumeReportMsg := setupMsgVolumeReportBenchmark(t, sdk.NewInt(1), metaNodes, resourceNodes) + + /********************* deliver tx *********************/ + idxOwnerAcc1 := accountKeeper.GetAccount(ctx, keysMap[metaNodes[0].NetworkAddress].OwnerAddress()) + ownerAccNum := idxOwnerAcc1.GetAccountNumber() + ownerAccSeq := idxOwnerAcc1.GetSequence() + + feePoolAccAddr := accountKeeper.GetModuleAddress(authtypes.FeeCollectorName) + require.NotNil(t, feePoolAccAddr) + + t.Log("--------------------------- deliver volumeReportMsg") + gInfo, _, err := app.SignCheckDeliverWithFee(t, txGen, stApp.BaseApp, header, []sdk.Msg{volumeReportMsg}, testchainID, []uint64{ownerAccNum}, []uint64{ownerAccSeq}, true, true, keysMap[metaNodes[0].NetworkAddress].secp256k1PrivKey) + require.NoError(t, err) + fmt.Println("##### volume nodes count:", len(volumeReportMsg.WalletVolumes)) + fmt.Println("##### gInfo:", gInfo.String()) +} + +func setupKeysAndAccBalance(resNodeCnt int) { + // 1 validator, 3 meta nodes + totalNodesCnt := resNodeCnt + 4 + + for i := 0; i < totalNodesCnt; i++ { + keyInfo := NewKeyInfo() + account := &authtypes.BaseAccount{ + Address: keyInfo.OwnerAddress().String(), + } + balance := banktypes.Balance{ + Address: keyInfo.OwnerAddress().String(), + Coins: sdk.Coins{stratos.NewCoin(accInitBalance)}, + } + + keysMap[keyInfo.P2PAddressBech32()] = keyInfo + keysList = append(keysList, keyInfo) + accounts = append(accounts, account) + balances = append(balances, balance) + + // 1st key is validator key + if i == 0 { + valP2PAddrBech32 = keyInfo.P2PAddressBech32() + } + + } + + foundationDepositorKey := NewKeyInfo() + foundationDepositorAcc := &authtypes.BaseAccount{Address: foundationDepositorKey.OwnerAddress().String()} + feeAmt, _ := sdk.NewIntFromString("50000000000000000000") + foundationDepositorBalance := banktypes.Balance{ + Address: foundationDepositorKey.OwnerAddress().String(), + Coins: append(initFoundationDeposit, sdk.NewCoin(stratos.Wei, feeAmt)), + } + keysMap["foundationDepositorKey"] = foundationDepositorKey + accounts = append(accounts, foundationDepositorAcc) + balances = append(balances, foundationDepositorBalance) +} + +func setupNodesBenchmark() (createValidatorMsg *stakingtypes.MsgCreateValidator, metaNodes []registertypes.MetaNode, resourceNodes []registertypes.ResourceNode) { + time, _ := time.Parse(time.RubyDate, "Fri Sep 24 10:37:13 -0400 2021") + nodeType := registertypes.STORAGE + + for idx, keyInfo := range keysList { + + if idx == 0 { + // first key is validator key + commission := stakingtypes.NewCommissionRates(sdk.NewDecWithPrec(5, 1), sdk.NewDecWithPrec(5, 1), sdk.NewDec(0)) + description := stakingtypes.NewDescription("foo_moniker", testchainID, "", "", "") + createValidatorMsg, _ = stakingtypes.NewMsgCreateValidator( + sdk.ValAddress(keyInfo.OwnerAddress()), + keyInfo.P2PPubKey(), + stratos.NewCoin(nodeInitStake), + description, + commission, + sdk.OneInt(), + ) + } else if idx < 4 { + // 1~3 keys are metaNode keys + metaNode, _ := registertypes.NewMetaNode( + keyInfo.P2PAddress(), + keyInfo.P2PPubKey(), + keyInfo.OwnerAddress(), + registertypes.NewDescription(keyInfo.P2PAddressBech32(), "", "", "", ""), + time, + ) + metaNode = metaNode.AddToken(nodeInitStake) + metaNode.Status = stakingtypes.Bonded + metaNode.Suspend = false + + metaNodes = append(metaNodes, metaNode) + } else { + resourceNode, _ := registertypes.NewResourceNode( + keyInfo.P2PAddress(), + keyInfo.P2PPubKey(), + keyInfo.OwnerAddress(), + registertypes.NewDescription(keyInfo.P2PAddressBech32(), "", "", "", ""), + nodeType, + time, + ) + resourceNode = resourceNode.AddToken(nodeInitStake) + resourceNode.EffectiveTokens = nodeInitStake + resourceNode.Status = stakingtypes.Bonded + resourceNode.Suspend = false + + resourceNodes = append(resourceNodes, resourceNode) + } + } + + return +} + +// initialize data of volume report +func setupMsgVolumeReportBenchmark(t *testing.T, epoch sdk.Int, metaNodes []registertypes.MetaNode, resourceNodes []registertypes.ResourceNode) *types.MsgVolumeReport { + rsNodeVolume := sdk.NewInt(50000) + + nodesVolume := make([]types.SingleWalletVolume, 0) + for _, rsNode := range resourceNodes { + ownerAddr := keysMap[rsNode.NetworkAddress].OwnerAddress() + volume := types.NewSingleWalletVolume(ownerAddr, rsNodeVolume) + nodesVolume = append(nodesVolume, volume) + } + + reporterNode := metaNodes[0] + reporterKey := keysMap[reporterNode.NetworkAddress] + + reporter := reporterKey.P2PAddress() + reportReference := "report for epoch " + epoch.String() + reporterOwner := reporterKey.OwnerAddress() + + signature := types.BLSSignatureInfo{} + volumeReportMsg := types.NewMsgVolumeReport(nodesVolume, reporter, epoch, reportReference, reporterOwner, signature) + + signBytes := volumeReportMsg.GetBLSSignBytes() + signBytesHash := crypto.Keccak256(signBytes) + + // set blsSignature + blsPrivKey1, blsPubKey1, err := bls.NewKeyPairFromBytes(keysMap[metaNodes[0].NetworkAddress].ed25519PrivKey.Bytes()) + require.NoError(t, err) + blsPrivKey2, blsPubKey2, err := bls.NewKeyPairFromBytes(keysMap[metaNodes[1].NetworkAddress].ed25519PrivKey.Bytes()) + require.NoError(t, err) + blsPrivKey3, blsPubKey3, err := bls.NewKeyPairFromBytes(keysMap[metaNodes[2].NetworkAddress].ed25519PrivKey.Bytes()) + require.NoError(t, err) + + blsSignature1, err := bls.Sign(signBytesHash, blsPrivKey1) + require.NoError(t, err) + blsSignature2, err := bls.Sign(signBytesHash, blsPrivKey2) + require.NoError(t, err) + blsSignature3, err := bls.Sign(signBytesHash, blsPrivKey3) + require.NoError(t, err) + finalBlsSignature, err := bls.AggregateSignatures(blsSignature1, blsSignature2, blsSignature3) + require.NoError(t, err) + + pubKeys := make([][]byte, 0) + pubKeys = append(pubKeys, blsPubKey1, blsPubKey2, blsPubKey3) + + signature = types.NewBLSSignatureInfo(pubKeys, finalBlsSignature, signBytesHash) + + volumeReportMsg.BLSSignature = signature + + return volumeReportMsg +} diff --git a/x/pot/app_test.go b/x/pot/app_test.go index b59845fb..6b98b826 100644 --- a/x/pot/app_test.go +++ b/x/pot/app_test.go @@ -575,6 +575,8 @@ func setupAccounts() ([]authtypes.GenesisAccount, []banktypes.Balance) { //idxNodeAcc1, } + feeAmt, _ := sdk.NewIntFromString("50000000000000000000") + balances := []banktypes.Balance{ { Address: resOwner1.String(), @@ -618,7 +620,7 @@ func setupAccounts() ([]authtypes.GenesisAccount, []banktypes.Balance) { //}, { Address: foundationDepositorAccAddr.String(), - Coins: foundationDeposit, + Coins: foundationDeposit.Add(sdk.NewCoin(stratos.Wei, feeAmt)), }, } return accs, balances diff --git a/x/pot/keeper/distribute.go b/x/pot/keeper/distribute.go index 8ce53d5e..8f392d28 100644 --- a/x/pot/keeper/distribute.go +++ b/x/pot/keeper/distribute.go @@ -93,10 +93,8 @@ func (k Keeper) CalcTrafficRewardInTotal( Mul(miningParam.MetaNodePercentageInBp.ToDec()). Quo(sdk.NewDec(10000)).TruncateInt() - stakeRewardToValidators, stakeRewardToResourceNodes, stakeRewardToMetaNodes := k.splitRewardByStake(ctx, stakeTrafficReward) - distributeGoal = distributeGoal.AddStakeTrafficRewardToValidator(sdk.NewCoin(k.BondDenom(ctx), stakeRewardToValidators)) - distributeGoal = distributeGoal.AddStakeTrafficRewardToResourceNode(sdk.NewCoin(k.BondDenom(ctx), stakeRewardToResourceNodes)) - distributeGoal = distributeGoal.AddStakeTrafficRewardToMetaNode(sdk.NewCoin(k.BondDenom(ctx), stakeRewardToMetaNodes)) + // all stake reward distribute to validators + distributeGoal = distributeGoal.AddStakeTrafficRewardToValidator(sdk.NewCoin(k.BondDenom(ctx), stakeTrafficReward)) distributeGoal = distributeGoal.AddTrafficRewardToResourceNode(sdk.NewCoin(k.BondDenom(ctx), trafficRewardToResourceNodes)) distributeGoal = distributeGoal.AddTrafficRewardToMetaNode(sdk.NewCoin(k.BondDenom(ctx), trafficRewardToMetaNodes)) @@ -152,10 +150,8 @@ func (k Keeper) CalcMiningRewardInTotal(ctx sdk.Context, distributeGoal types.Di Mul(miningParam.MetaNodePercentageInBp.ToDec()). Quo(sdk.NewDec(10000)).TruncateInt() - stakeRewardToValidators, stakeRewardToResourceNodes, stakeRewardToMetaNodes := k.splitRewardByStake(ctx, stakeMiningReward) - distributeGoal = distributeGoal.AddStakeMiningRewardToValidator(sdk.NewCoin(k.RewardDenom(ctx), stakeRewardToValidators)) - distributeGoal = distributeGoal.AddStakeMiningRewardToResourceNode(sdk.NewCoin(k.RewardDenom(ctx), stakeRewardToResourceNodes)) - distributeGoal = distributeGoal.AddStakeMiningRewardToMetaNode(sdk.NewCoin(k.RewardDenom(ctx), stakeRewardToMetaNodes)) + // all stake reward distribute to validators + distributeGoal = distributeGoal.AddStakeMiningRewardToValidator(sdk.NewCoin(k.RewardDenom(ctx), stakeMiningReward)) distributeGoal = distributeGoal.AddMiningRewardToResourceNode(sdk.NewCoin(k.RewardDenom(ctx), miningRewardToResourceNodes)) distributeGoal = distributeGoal.AddMiningRewardToMetaNode(sdk.NewCoin(k.RewardDenom(ctx), miningRewardToMetaNodes)) return distributeGoal, nil @@ -203,60 +199,7 @@ func (k Keeper) CalcRewardForResourceNode(ctx sdk.Context, totalConsumedNoz sdk. distributeGoal types.DistributeGoal, rewardDetailMap map[string]types.Reward, ) map[string]types.Reward { - // 1, calc stake reward for resource node by stake - totalStakeOfResourceNodes := k.registerKeeper.GetResourceNodeBondedToken(ctx).Amount - - resourceNodeIterator := k.registerKeeper.GetResourceNodeIterator(ctx) - defer resourceNodeIterator.Close() - for ; resourceNodeIterator.Valid(); resourceNodeIterator.Next() { - - node := regtypes.MustUnmarshalResourceNode(k.cdc, resourceNodeIterator.Value()) - if node.Status != stakingtypes.Bonded { - continue - } - - walletAddr, err := sdk.AccAddressFromBech32(node.OwnerAddress) - if err != nil { - continue - } - tokens, ok := sdk.NewIntFromString(node.Tokens.String()) - if !ok { - continue - } - - shareOfToken := tokens.ToDec().Quo(totalStakeOfResourceNodes.ToDec()) - - // stake reward from mining pool - stakeMiningReward := sdk.NewCoin(k.RewardDenom(ctx), - distributeGoal.StakeMiningRewardToResourceNode.Amount.ToDec(). - Mul(shareOfToken). - TruncateInt()) - - // stake reward from traffic pool, need to pay community tax - stakeTrafficRewardBeforeTax := distributeGoal.StakeTrafficRewardToResourceNode.Amount.ToDec(). - Mul(shareOfToken) - stakeTrafficRewardAfterTax, tax := k.CalcCommunityTax(ctx, stakeTrafficRewardBeforeTax) - - // update rewardDetailMap - if _, ok := rewardDetailMap[walletAddr.String()]; !ok { - reward := types.NewDefaultReward(walletAddr) - rewardDetailMap[walletAddr.String()] = reward - } - newReward := rewardDetailMap[walletAddr.String()] - newReward = newReward.AddRewardFromMiningPool(stakeMiningReward) - newReward = newReward.AddRewardFromTrafficPool(stakeTrafficRewardAfterTax) - rewardDetailMap[walletAddr.String()] = newReward - - // record value preparing for transfer - foundationToReward = foundationToReward. - Add(stakeMiningReward) - unissuedPrepayToReward = unissuedPrepayToReward. - Add(stakeTrafficRewardAfterTax) - unissuedPrepayToCommunityPool = unissuedPrepayToCommunityPool. - Add(tax) - } - - // 2, calc mining & traffic reward for resource node by traffic + // calc mining & traffic reward for resource node by traffic for _, walletTraffic := range trafficList { walletAddr, err := sdk.AccAddressFromBech32(walletTraffic.WalletAddress) if err != nil { @@ -303,7 +246,6 @@ func (k Keeper) CalcRewardForResourceNode(ctx sdk.Context, totalConsumedNoz sdk. func (k Keeper) CalcRewardForMetaNode(ctx sdk.Context, distributeGoalBalance types.DistributeGoal, rewardDetailMap map[string]types.Reward, ) map[string]types.Reward { - totalStakeOfMetaNodes := k.registerKeeper.GetMetaNodeBondedToken(ctx).Amount metaNodeCnt := k.registerKeeper.GetBondedMetaNodeCnt(ctx) mataNodeIterator := k.registerKeeper.GetMetaNodeIterator(ctx) @@ -319,34 +261,19 @@ func (k Keeper) CalcRewardForMetaNode(ctx sdk.Context, distributeGoalBalance typ if err != nil { continue } - tokens, ok := sdk.NewIntFromString(node.Tokens.String()) - if !ok { - continue - } - - shareOfToken := tokens.ToDec().Quo(totalStakeOfMetaNodes.ToDec()) - - // 1, calc stake reward for meta node by stake - stakeMiningReward := sdk.NewCoin(k.RewardDenom(ctx), - distributeGoalBalance.StakeMiningRewardToMetaNode.Amount.ToDec(). - Mul(shareOfToken). - TruncateInt()) - stakeTrafficReward := distributeGoalBalance.StakeTrafficRewardToMetaNode.Amount.ToDec(). - Mul(shareOfToken) - // 2, calc mining reward for meta node (equally distributed) + // 1, calc mining reward for meta node (equally distributed) miningRewardToMetaNode := sdk.NewCoin(k.RewardDenom(ctx), distributeGoalBalance.MiningRewardToMetaNode.Amount.ToDec(). Quo(metaNodeCnt.ToDec()). TruncateInt()) - // 3, calc traffic reward for meta node (equally distributed) + // 2, calc traffic reward for meta node (equally distributed) trafficRewardToMetaNode := distributeGoalBalance.TrafficRewardToMetaNode.Amount.ToDec(). Quo(metaNodeCnt.ToDec()) // reward from traffic pool need to pay community tax - rewardFromTrafficPoolBeforeTax := stakeTrafficReward.Add(trafficRewardToMetaNode) - rewardFromTrafficPoolAfterTax, tax := k.CalcCommunityTax(ctx, rewardFromTrafficPoolBeforeTax) + rewardFromTrafficPoolAfterTax, tax := k.CalcCommunityTax(ctx, trafficRewardToMetaNode) // update rewardDetailMap if _, ok := rewardDetailMap[walletAddr.String()]; !ok { @@ -354,13 +281,12 @@ func (k Keeper) CalcRewardForMetaNode(ctx sdk.Context, distributeGoalBalance typ rewardDetailMap[walletAddr.String()] = reward } newReward := rewardDetailMap[walletAddr.String()] - newReward = newReward.AddRewardFromMiningPool(stakeMiningReward.Add(miningRewardToMetaNode)) + newReward = newReward.AddRewardFromMiningPool(miningRewardToMetaNode) newReward = newReward.AddRewardFromTrafficPool(rewardFromTrafficPoolAfterTax) rewardDetailMap[walletAddr.String()] = newReward // record value preparing for transfer foundationToReward = foundationToReward. - Add(stakeMiningReward). Add(miningRewardToMetaNode) unissuedPrepayToReward = unissuedPrepayToReward. Add(rewardFromTrafficPoolAfterTax) @@ -381,31 +307,6 @@ func (k Keeper) GetTotalConsumedNoz(trafficList []types.SingleWalletVolume) sdk. return totalTraffic } -func (k Keeper) splitRewardByStake(ctx sdk.Context, totalReward sdk.Int, -) (validatorReward sdk.Int, resourceNodeReward sdk.Int, metaNodeReward sdk.Int) { - - validatorBondedTokens := k.stakingKeeper.TotalBondedTokens(ctx).ToDec() - resourceNodeBondedTokens := k.registerKeeper.GetResourceNodeBondedToken(ctx).Amount.ToDec() - metaNodeBondedTokens := k.registerKeeper.GetMetaNodeBondedToken(ctx).Amount.ToDec() - - totalBondedTokens := validatorBondedTokens.Add(resourceNodeBondedTokens).Add(metaNodeBondedTokens) - - validatorReward = totalReward.ToDec(). - Mul(validatorBondedTokens). - Quo(totalBondedTokens). - TruncateInt() - resourceNodeReward = totalReward.ToDec(). - Mul(resourceNodeBondedTokens). - Quo(totalBondedTokens). - TruncateInt() - metaNodeReward = totalReward.ToDec(). - Mul(metaNodeBondedTokens). - Quo(totalBondedTokens). - TruncateInt() - - return -} - func (k Keeper) transferTokensForDistribution(ctx sdk.Context) error { // [TLC] [FoundationAccount -> feeCollectorPool] Transfer mining reward to fee_pool for validators diff --git a/x/pot/types/distribute.go b/x/pot/types/distribute.go index 5836211e..e4ce2ed7 100644 --- a/x/pot/types/distribute.go +++ b/x/pot/types/distribute.go @@ -12,36 +12,25 @@ const ( ) type DistributeGoal struct { - StakeMiningRewardToValidator sdk.Coin `json:"stake_mining_reward_to_validator" yaml:"stake_mining_reward_to_validator"` // 20% mining reward * stakeOfAllValidators / totalStake - StakeTrafficRewardToValidator sdk.Coin `json:"stake_traffic_reward_to_validator" yaml:"stake_traffic_reward_to_validator"` // 20% traffic reward * stakeOfAllValidators / totalStake - - StakeMiningRewardToMetaNode sdk.Coin `json:"stake_mining_reward_to_meta_node" yaml:"stake_mining_reward_to_meta_node"` // 20% mining reward * stakeOfAllMetaNodes / totalStake - StakeTrafficRewardToMetaNode sdk.Coin `json:"stake_traffic_reward_to_meta_node" yaml:"stake_traffic_reward_to_meta_node"` // 20% traffic reward * stakeOfAllValidators / totalStake - MiningRewardToMetaNode sdk.Coin `json:"mining_reward_to_meta_node" yaml:"mining_reward_to_meta_node"` // 20% of mining reward, distribute equally - TrafficRewardToMetaNode sdk.Coin `json:"traffic_reward_to_meta_node" yaml:"traffic_reward_to_meta_node"` // 20% of traffic reward, distribute equally - - StakeMiningRewardToResourceNode sdk.Coin `json:"stake_mining_reward_to_resource_node" yaml:"stake_mining_reward_to_resource_node"` // 20% mining reward * stakeOfAllResourceNodes / totalStake - StakeTrafficRewardToResourceNode sdk.Coin `json:"stake_traffic_reward_to_resource_node" yaml:"stake_traffic_reward_to_resource_node"` // 20% traffic reward * stakeOfAllValidators / totalStake - MiningRewardToResourceNode sdk.Coin `json:"mining_reward_to_resource_node" yaml:"mining_reward_to_resource_node"` // 60% of mining reward, distribute by traffic contribution - TrafficRewardToResourceNode sdk.Coin `json:"traffic_reward_to_resource_node" yaml:"traffic_reward_to_resource_node"` // 60% of traffic reward, distribute by traffic contribution + StakeMiningRewardToValidator sdk.Coin `json:"stake_mining_reward_to_validator" yaml:"stake_mining_reward_to_validator"` // 20% mining reward + StakeTrafficRewardToValidator sdk.Coin `json:"stake_traffic_reward_to_validator" yaml:"stake_traffic_reward_to_validator"` // 20% traffic reward + MiningRewardToMetaNode sdk.Coin `json:"mining_reward_to_meta_node" yaml:"mining_reward_to_meta_node"` // 20% of mining reward, distribute equally + TrafficRewardToMetaNode sdk.Coin `json:"traffic_reward_to_meta_node" yaml:"traffic_reward_to_meta_node"` // 20% of traffic reward, distribute equally + MiningRewardToResourceNode sdk.Coin `json:"mining_reward_to_resource_node" yaml:"mining_reward_to_resource_node"` // 60% of mining reward, distribute by traffic contribution + TrafficRewardToResourceNode sdk.Coin `json:"traffic_reward_to_resource_node" yaml:"traffic_reward_to_resource_node"` // 60% of traffic reward, distribute by traffic contribution } func NewDistributeGoal( - stakeMiningRewardToValidator sdk.Coin, stakeMiningRewardToResourceNode sdk.Coin, stakeMiningRewardToMetaNode sdk.Coin, - stakeTrafficRewardToValidator sdk.Coin, stakeTrafficRewardToResourceNode sdk.Coin, stakeTrafficRewardToMetaNode sdk.Coin, - miningRewardToMetaNode sdk.Coin, trafficRewardToMetaNode sdk.Coin, miningRewardToResourceNode sdk.Coin, - trafficRewardToResourceNode sdk.Coin) DistributeGoal { + stakeMiningRewardToValidator sdk.Coin, stakeTrafficRewardToValidator sdk.Coin, miningRewardToMetaNode sdk.Coin, + trafficRewardToMetaNode sdk.Coin, miningRewardToResourceNode sdk.Coin, trafficRewardToResourceNode sdk.Coin) DistributeGoal { + return DistributeGoal{ - StakeMiningRewardToValidator: stakeMiningRewardToValidator, - StakeMiningRewardToResourceNode: stakeMiningRewardToResourceNode, - StakeMiningRewardToMetaNode: stakeMiningRewardToMetaNode, - StakeTrafficRewardToValidator: stakeTrafficRewardToValidator, - StakeTrafficRewardToResourceNode: stakeTrafficRewardToResourceNode, - StakeTrafficRewardToMetaNode: stakeTrafficRewardToMetaNode, - MiningRewardToMetaNode: miningRewardToMetaNode, - TrafficRewardToMetaNode: trafficRewardToMetaNode, - MiningRewardToResourceNode: miningRewardToResourceNode, - TrafficRewardToResourceNode: trafficRewardToResourceNode, + StakeMiningRewardToValidator: stakeMiningRewardToValidator, + StakeTrafficRewardToValidator: stakeTrafficRewardToValidator, + MiningRewardToMetaNode: miningRewardToMetaNode, + TrafficRewardToMetaNode: trafficRewardToMetaNode, + MiningRewardToResourceNode: miningRewardToResourceNode, + TrafficRewardToResourceNode: trafficRewardToResourceNode, } } @@ -53,10 +42,6 @@ func InitDistributeGoal() DistributeGoal { sdk.Coin{}, sdk.Coin{}, sdk.Coin{}, - sdk.Coin{}, - sdk.Coin{}, - sdk.Coin{}, - sdk.Coin{}, ) } @@ -69,23 +54,6 @@ func (d DistributeGoal) AddStakeMiningRewardToValidator(reward sdk.Coin) Distrib return d } -func (d DistributeGoal) AddStakeMiningRewardToResourceNode(reward sdk.Coin) DistributeGoal { - if d.StakeMiningRewardToResourceNode.IsEqual(sdk.Coin{}) { - d.StakeMiningRewardToResourceNode = reward - } else { - d.StakeMiningRewardToResourceNode = d.StakeMiningRewardToResourceNode.Add(reward) - } - return d -} - -func (d DistributeGoal) AddStakeMiningRewardToMetaNode(reward sdk.Coin) DistributeGoal { - if d.StakeMiningRewardToMetaNode.IsEqual(sdk.Coin{}) { - d.StakeMiningRewardToMetaNode = reward - } else { - d.StakeMiningRewardToMetaNode = d.StakeMiningRewardToMetaNode.Add(reward) - } - return d -} func (d DistributeGoal) AddStakeTrafficRewardToValidator(reward sdk.Coin) DistributeGoal { if d.StakeTrafficRewardToValidator.IsEqual(sdk.Coin{}) { d.StakeTrafficRewardToValidator = reward @@ -95,23 +63,6 @@ func (d DistributeGoal) AddStakeTrafficRewardToValidator(reward sdk.Coin) Distri return d } -func (d DistributeGoal) AddStakeTrafficRewardToResourceNode(reward sdk.Coin) DistributeGoal { - if d.StakeTrafficRewardToResourceNode.IsEqual(sdk.Coin{}) { - d.StakeTrafficRewardToResourceNode = reward - } else { - d.StakeTrafficRewardToResourceNode = d.StakeTrafficRewardToResourceNode.Add(reward) - } - return d -} - -func (d DistributeGoal) AddStakeTrafficRewardToMetaNode(reward sdk.Coin) DistributeGoal { - if d.StakeTrafficRewardToMetaNode.IsEqual(sdk.Coin{}) { - d.StakeTrafficRewardToMetaNode = reward - } else { - d.StakeTrafficRewardToMetaNode = d.StakeTrafficRewardToMetaNode.Add(reward) - } - return d -} func (d DistributeGoal) AddMiningRewardToMetaNode(reward sdk.Coin) DistributeGoal { if d.MiningRewardToMetaNode.IsEqual(sdk.Coin{}) { d.MiningRewardToMetaNode = reward @@ -128,6 +79,7 @@ func (d DistributeGoal) AddTrafficRewardToMetaNode(reward sdk.Coin) DistributeGo } return d } + func (d DistributeGoal) AddMiningRewardToResourceNode(reward sdk.Coin) DistributeGoal { if d.MiningRewardToResourceNode.IsEqual(sdk.Coin{}) { d.MiningRewardToResourceNode = reward @@ -136,6 +88,7 @@ func (d DistributeGoal) AddMiningRewardToResourceNode(reward sdk.Coin) Distribut } return d } + func (d DistributeGoal) AddTrafficRewardToResourceNode(reward sdk.Coin) DistributeGoal { if d.TrafficRewardToResourceNode.IsEqual(sdk.Coin{}) { d.TrafficRewardToResourceNode = reward @@ -150,23 +103,15 @@ func (d DistributeGoal) String() string { return fmt.Sprintf(`DistributeGoal:{ StakeMiningRewardToValidator: %s StakeTrafficRewardToValidator: %s - StakeMiningRewardToMetaNode: %s - StakeTrafficRewardToMetaNode: %s MiningRewardToMetaNode: %s TrafficRewardToMetaNode: %s - StakeMiningRewardToResourceNode: %s - StakeTrafficRewardToResourceNode: %s MiningRewardToResourceNode: %s TrafficRewardToResourceNode: %s }`, d.StakeMiningRewardToValidator, d.StakeTrafficRewardToValidator, - d.StakeMiningRewardToMetaNode, - d.StakeTrafficRewardToMetaNode, d.MiningRewardToMetaNode, d.TrafficRewardToMetaNode, - d.StakeMiningRewardToResourceNode, - d.StakeTrafficRewardToResourceNode, d.MiningRewardToResourceNode, d.TrafficRewardToResourceNode, ) From 815b0c600a2434aff2d7f8a5422fe87b51dca966 Mon Sep 17 00:00:00 2001 From: BoThe1K Date: Mon, 29 May 2023 13:50:44 +0200 Subject: [PATCH 77/95] Update tx pool loading + rfactor web3 rpc starting point --- app/app.go | 2 +- rpc/apis.go | 160 +++++++++++++---------------------------- rpc/backend/backend.go | 20 +++--- server/json_rpc.go | 10 ++- server/start.go | 12 ++-- x/evm/pool/tx_pool.go | 46 ++---------- 6 files changed, 82 insertions(+), 168 deletions(-) diff --git a/app/app.go b/app/app.go index 29c301b2..40191b70 100644 --- a/app/app.go +++ b/app/app.go @@ -193,7 +193,7 @@ var ( } ) -type EVMLKeeperApp interface { +type EVMKeeperApp interface { GetEVMKeeper() *evmkeeper.Keeper } diff --git a/rpc/apis.go b/rpc/apis.go index ca599896..6d89e610 100644 --- a/rpc/apis.go +++ b/rpc/apis.go @@ -3,8 +3,6 @@ package rpc import ( - "fmt" - "github.com/tendermint/tendermint/node" "github.com/cosmos/cosmos-sdk/client" @@ -46,121 +44,63 @@ const ( apiVersion = "1.0" ) -// APICreator creates the JSON-RPC API implementations. -type APICreator = func(*server.Context, *node.Node, *evmkeeper.Keeper, storetypes.MultiStore, client.Context) []rpc.API +// GetRPCAPIs returns the list of all APIs +func GetRPCAPIs(ctx *server.Context, tmNode *node.Node, evmKeeper *evmkeeper.Keeper, ms storetypes.MultiStore, clientCtx client.Context, selectedAPIs []string) ([]rpc.API, error) { + nonceLock := new(types.AddrLocker) + evmBackend, err := backend.NewBackend(ctx, tmNode, evmKeeper, ms, ctx.Logger, clientCtx) -// apiCreators defines the JSON-RPC API namespaces. -var apiCreators map[string]APICreator + if err != nil { + return []rpc.API{}, err + } -func init() { - apiCreators = map[string]APICreator{ - EthNamespace: func(ctx *server.Context, tmNode *node.Node, evmKeeper *evmkeeper.Keeper, ms storetypes.MultiStore, clientCtx client.Context) []rpc.API { - nonceLock := new(types.AddrLocker) - evmBackend := backend.NewBackend(ctx, tmNode, evmKeeper, ms, ctx.Logger, clientCtx) - return []rpc.API{ - { - Namespace: EthNamespace, - Version: apiVersion, - Service: eth.NewPublicAPI(ctx.Logger, clientCtx, evmBackend, nonceLock), - Public: true, - }, - { - Namespace: EthNamespace, - Version: apiVersion, - Service: filters.NewPublicAPI(ctx.Logger, clientCtx, tmNode.EventBus(), evmBackend), - Public: true, - }, - } + return []rpc.API{ + { + Namespace: EthNamespace, + Version: apiVersion, + Service: eth.NewPublicAPI(ctx.Logger, clientCtx, evmBackend, nonceLock), + Public: true, }, - Web3Namespace: func(*server.Context, *node.Node, *evmkeeper.Keeper, storetypes.MultiStore, client.Context) []rpc.API { - return []rpc.API{ - { - Namespace: Web3Namespace, - Version: apiVersion, - Service: web3.NewPublicAPI(), - Public: true, - }, - } + { + Namespace: EthNamespace, + Version: apiVersion, + Service: filters.NewPublicAPI(ctx.Logger, clientCtx, tmNode.EventBus(), evmBackend), + Public: true, }, - NetNamespace: func(ctx *server.Context, tmNode *node.Node, evmKeeper *evmkeeper.Keeper, ms storetypes.MultiStore, clientCtx client.Context) []rpc.API { - evmBackend := backend.NewBackend(ctx, tmNode, evmKeeper, ms, ctx.Logger, clientCtx) - return []rpc.API{ - { - Namespace: NetNamespace, - Version: apiVersion, - Service: net.NewPublicAPI(evmBackend), - Public: true, - }, - } + { + Namespace: Web3Namespace, + Version: apiVersion, + Service: web3.NewPublicAPI(), + Public: true, }, - PersonalNamespace: func(ctx *server.Context, tmNode *node.Node, evmKeeper *evmkeeper.Keeper, ms storetypes.MultiStore, clientCtx client.Context) []rpc.API { - evmBackend := backend.NewBackend(ctx, tmNode, evmKeeper, ms, ctx.Logger, clientCtx) - return []rpc.API{ - { - Namespace: PersonalNamespace, - Version: apiVersion, - Service: personal.NewAPI(ctx.Logger, clientCtx, evmBackend), - Public: false, - }, - } + { + Namespace: NetNamespace, + Version: apiVersion, + Service: net.NewPublicAPI(evmBackend), + Public: true, }, - TxPoolNamespace: func(ctx *server.Context, tmNode *node.Node, evmKeeper *evmkeeper.Keeper, ms storetypes.MultiStore, clientCtx client.Context) []rpc.API { - evmBackend := backend.NewBackend(ctx, tmNode, evmKeeper, ms, ctx.Logger, clientCtx) - return []rpc.API{ - { - Namespace: TxPoolNamespace, - Version: apiVersion, - Service: txpool.NewPublicAPI(ctx.Logger, clientCtx, evmBackend), - Public: true, - }, - } + { + Namespace: PersonalNamespace, + Version: apiVersion, + Service: personal.NewAPI(ctx.Logger, clientCtx, evmBackend), + Public: false, }, - DebugNamespace: func(ctx *server.Context, tmNode *node.Node, evmKeeper *evmkeeper.Keeper, ms storetypes.MultiStore, clientCtx client.Context) []rpc.API { - evmBackend := backend.NewBackend(ctx, tmNode, evmKeeper, ms, ctx.Logger, clientCtx) - return []rpc.API{ - { - Namespace: DebugNamespace, - Version: apiVersion, - Service: debug.NewAPI(ctx, evmBackend, clientCtx), - Public: true, - }, - } + { + Namespace: TxPoolNamespace, + Version: apiVersion, + Service: txpool.NewPublicAPI(ctx.Logger, clientCtx, evmBackend), + Public: true, }, - MinerNamespace: func(ctx *server.Context, tmNode *node.Node, evmKeeper *evmkeeper.Keeper, ms storetypes.MultiStore, clientCtx client.Context) []rpc.API { - evmBackend := backend.NewBackend(ctx, tmNode, evmKeeper, ms, ctx.Logger, clientCtx) - return []rpc.API{ - { - Namespace: MinerNamespace, - Version: apiVersion, - Service: miner.NewPrivateAPI(ctx, clientCtx, evmBackend), - Public: false, - }, - } + { + Namespace: DebugNamespace, + Version: apiVersion, + Service: debug.NewAPI(ctx, evmBackend, clientCtx), + Public: true, }, - } -} - -// GetRPCAPIs returns the list of all APIs -func GetRPCAPIs(ctx *server.Context, tmNode *node.Node, evmKeeper *evmkeeper.Keeper, ms storetypes.MultiStore, clientCtx client.Context, selectedAPIs []string) []rpc.API { - var apis []rpc.API - - for _, ns := range selectedAPIs { - if creator, ok := apiCreators[ns]; ok { - apis = append(apis, creator(ctx, tmNode, evmKeeper, ms, clientCtx)...) - } else { - ctx.Logger.Error("invalid namespace value", "namespace", ns) - } - } - - return apis -} - -// RegisterAPINamespace registers a new API namespace with the API creator. -// This function fails if the namespace is already registered. -func RegisterAPINamespace(ns string, creator APICreator) error { - if _, ok := apiCreators[ns]; ok { - return fmt.Errorf("duplicated api namespace %s", ns) - } - apiCreators[ns] = creator - return nil + { + Namespace: MinerNamespace, + Version: apiVersion, + Service: miner.NewPrivateAPI(ctx, clientCtx, evmBackend), + Public: false, + }, + }, nil } diff --git a/rpc/backend/backend.go b/rpc/backend/backend.go index 14bde7b1..039da512 100644 --- a/rpc/backend/backend.go +++ b/rpc/backend/backend.go @@ -122,23 +122,20 @@ type Backend struct { txPool *pool.TxPool } -var backend *Backend - // NewBackend creates a new Backend instance for cosmos and ethereum namespaces -func NewBackend(ctx *server.Context, tmNode *node.Node, evmkeeper *evmkeeper.Keeper, ms storetypes.MultiStore, logger log.Logger, clientCtx client.Context) *Backend { - // NOTE: As NewBackend called 6 times, we are caching for the first load - if backend != nil { - return backend - } +func NewBackend(ctx *server.Context, tmNode *node.Node, evmkeeper *evmkeeper.Keeper, ms storetypes.MultiStore, logger log.Logger, clientCtx client.Context) (*Backend, error) { appConf, err := config.GetConfig(ctx.Viper) if err != nil { - panic(err) + return nil, err } evmCtx := evm.NewContext(logger, ms, tmNode.BlockStore()) - txPool := pool.NewTxPool(core.DefaultTxPoolConfig, appConf, clientCtx, tmNode.Mempool(), evmkeeper, evmCtx) + txPool, err := pool.NewTxPool(core.DefaultTxPoolConfig, appConf, clientCtx, tmNode.Mempool(), evmkeeper, evmCtx) + if err != nil { + return nil, err + } - backend = &Backend{ + return &Backend{ ctx: context.Background(), clientCtx: clientCtx, tmNode: tmNode, @@ -148,8 +145,7 @@ func NewBackend(ctx *server.Context, tmNode *node.Node, evmkeeper *evmkeeper.Kee logger: logger.With("module", "backend"), cfg: appConf, txPool: txPool, - } - return backend + }, nil } func (b *Backend) GetTxPool() *pool.TxPool { diff --git a/server/json_rpc.go b/server/json_rpc.go index 2a67bad8..ebacf3fa 100644 --- a/server/json_rpc.go +++ b/server/json_rpc.go @@ -28,12 +28,18 @@ func StartJSONRPC(ctx *server.Context, tmNode *node.Node, evmKeeper *evmkeeper.K return nil })) - apis := rpc.GetRPCAPIs(ctx, tmNode, evmKeeper, ms, clientCtx, config.JSONRPC.API) + apis, err := rpc.GetRPCAPIs(ctx, tmNode, evmKeeper, ms, clientCtx, config.JSONRPC.API) + if err != nil { + return err + } + web3Srv := rpc.NewWeb3Server(config, logger) - err := web3Srv.StartHTTP(apis) + + err = web3Srv.StartHTTP(apis) if err != nil { return err } + err = web3Srv.StartWS(apis) if err != nil { return err diff --git a/server/start.go b/server/start.go index 582a7fbb..3f28c977 100644 --- a/server/start.go +++ b/server/start.go @@ -413,10 +413,14 @@ func startInProcess(ctx *server.Context, clientCtx client.Context, appCreator ty } if config.JSONRPC.Enable { - evmApp := app.(stosapp.EVMLKeeperApp) - - err = StartJSONRPC(ctx, tmNode, evmApp.GetEVMKeeper(), app.CommitMultiStore(), clientCtx, config) - if err != nil { + if err := StartJSONRPC( + ctx, + tmNode, + app.(stosapp.EVMKeeperApp).GetEVMKeeper(), + app.CommitMultiStore(), + clientCtx, + config, + ); err != nil { return err } } diff --git a/x/evm/pool/tx_pool.go b/x/evm/pool/tx_pool.go index 7bbe900d..c687aa07 100644 --- a/x/evm/pool/tx_pool.go +++ b/x/evm/pool/tx_pool.go @@ -57,7 +57,6 @@ type TxPool struct { signer types.Signer mempool mempl.Mempool mu sync.RWMutex - isReady bool // show the status for workload of the pool evmkeeper *evmkeeper.Keeper // Active keeper to get current state pendingNonces *txNoncer // Pending state tracking virtual nonces @@ -72,7 +71,7 @@ type TxPool struct { // NewTxPool creates a new transaction pool to gather, sort and filter inbound // transactions from the network. -func NewTxPool(config core.TxPoolConfig, srvCfg config.Config, clientCtx client.Context, mempool mempl.Mempool, evmkeeper *evmkeeper.Keeper, evmCtx *evm.Context) *TxPool { +func NewTxPool(config core.TxPoolConfig, srvCfg config.Config, clientCtx client.Context, mempool mempl.Mempool, evmkeeper *evmkeeper.Keeper, evmCtx *evm.Context) (*TxPool, error) { sdkCtx := evmCtx.GetSdkContext() params := evmkeeper.GetParams(sdkCtx) pool := &TxPool{ @@ -89,43 +88,16 @@ func NewTxPool(config core.TxPoolConfig, srvCfg config.Config, clientCtx client. all: newTxLookup(), } pool.pendingNonces = newTxNoncer(pool.evmCtx, pool.evmkeeper) - go pool.prepare() - go pool.eventLoop() - - return pool -} -// prepare executed only once and only for some dynamic initializations -func (pool *TxPool) prepare() { - if pool.isReady { - return + gasLimit, err := evmtypes.BlockMaxGasFromConsensusParams(nil) + if err != nil { + return nil, fmt.Errorf("failed to get tx pool current max gas: %w (possible DB not started?)", err) } + pool.currentMaxGas = uint64(gasLimit) - var ( - init = time.NewTicker(initInterval) - result = make(chan int64, 1) - ) - defer init.Stop() - - for { - select { - case gasLimit := <-result: - // setting pool dynamic vars - pool.currentMaxGas = uint64(gasLimit) - pool.isReady = true - log.Debug("Tx pool ready") - return + go pool.eventLoop() - // Handle init prepare - case <-init.C: - gasLimit, err := evmtypes.BlockMaxGasFromConsensusParams(nil) - if err != nil { - log.Error(err.Error()) - break - } - result <- gasLimit - } - } + return pool, nil } // eventLoop starting a main logic of tx pool, orchaestrator of queues @@ -342,10 +314,6 @@ func (pool *TxPool) broadcastTx(tx *types.Transaction) error { // pending promotion and execution. If the transaction is a replacement for an already // pending or queued one, it overwrites the previous transaction if its price is higher. func (pool *TxPool) Add(tx *types.Transaction) (replaced bool, err error) { - if !pool.isReady { - return false, fmt.Errorf("Tx pool is not loaded yet") - } - pool.mu.Lock() defer pool.mu.Unlock() From c3bb6a128224b71e867490ad9e292ab94ff5c292 Mon Sep 17 00:00:00 2001 From: Xiong Date: Mon, 29 May 2023 14:12:55 -0400 Subject: [PATCH 78/95] 1, Move reward distribution logic back to volumeReport tx. 2, Remove panic recovery in end block --- proto/stratos/pot/v1/genesis.proto | 17 +-- x/pot/abci.go | 28 ---- x/pot/app_test.go | 5 +- x/pot/genesis.go | 14 +- x/pot/keeper/keeper.go | 13 +- x/pot/keeper/store.go | 59 -------- x/pot/types/errors.go | 2 - x/pot/types/genesis.go | 8 - x/pot/types/genesis.pb.go | 232 ++++++----------------------- x/pot/types/key.go | 5 +- 10 files changed, 52 insertions(+), 331 deletions(-) diff --git a/proto/stratos/pot/v1/genesis.proto b/proto/stratos/pot/v1/genesis.proto index 3a23e44d..b3717a17 100644 --- a/proto/stratos/pot/v1/genesis.proto +++ b/proto/stratos/pot/v1/genesis.proto @@ -40,22 +40,7 @@ message GenesisState { (gogoproto.jsontag) = "individual_reward_info", (gogoproto.moretags) = "yaml:\"individual_reward_info\"" ]; - WalletVolumes undistributed_report = 7 [ - (gogoproto.nullable) = false, - (gogoproto.jsontag) = "undistributed_report", - (gogoproto.moretags) = "yaml:\"undistributed_report\"" - ]; - string undistributed_epoch = 8 [ - (gogoproto.nullable) = false, - (gogoproto.jsontag) = "undistributed_epoch", - (gogoproto.moretags) = "yaml:\"undistributed_epoch\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int" - ]; - bool is_ready_to_distribute = 9 [ - (gogoproto.jsontag) = "is_ready_to_distribute", - (gogoproto.moretags) = "yaml:\"is_ready_to_distribute\"" - ]; - string matured_epoch = 10 [ + string matured_epoch = 7 [ (gogoproto.nullable) = false, (gogoproto.jsontag) = "matured_epoch", (gogoproto.moretags) = "yaml:\"matured_epoch\"", diff --git a/x/pot/abci.go b/x/pot/abci.go index 3e11ea69..738a3821 100644 --- a/x/pot/abci.go +++ b/x/pot/abci.go @@ -7,7 +7,6 @@ import ( banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/stratosnet/stratos-chain/x/pot/keeper" - "github.com/stratosnet/stratos-chain/x/pot/types" ) // BeginBlocker check for infraction evidence or downtime of validators @@ -21,33 +20,6 @@ func EndBlocker(ctx sdk.Context, req abci.RequestEndBlock, k keeper.Keeper) []ab logger := k.Logger(ctx) - defer func() { - if r := recover(); r != nil { - logger.Error("Recovered from panic. ", "ErrMsg", r) - } - }() - - // Do not distribute rewards until the next block - if !k.GetIsReadyToDistribute(ctx) && k.GetUnDistributedEpoch(ctx).GT(sdk.ZeroInt()) { - k.SetIsReadyToDistribute(ctx, true) - } else { - // Start distribute reward if report found - walletVolumes, found := k.GetUnDistributedReport(ctx) - if found { - epoch := k.GetUnDistributedEpoch(ctx) - - //distribute POT reward - err := k.DistributePotReward(ctx, walletVolumes.Volumes, epoch) - if err != nil { - logger.Error("An error occurred while distributing the reward. ", "ErrMsg", err.Error()) - } - - // reset undistributed info after distribution - k.SetUnDistributedReport(ctx, types.WalletVolumes{}) - k.SetUnDistributedEpoch(ctx, sdk.ZeroInt()) - } - } - // mature reward err := k.RewardMatureAndSubSlashing(ctx) if err != nil { diff --git a/x/pot/app_test.go b/x/pot/app_test.go index 6b98b826..435543c9 100644 --- a/x/pot/app_test.go +++ b/x/pot/app_test.go @@ -388,12 +388,13 @@ func TestPotVolumeReportMsgs(t *testing.T) { require.NoError(t, err) /********************* commit & check result *********************/ - // reward distribution start at height = height + 1 where volume report tx executed + feeCollectorToFeePoolAtBeginBlock := bankKeeper.GetAllBalances(ctx, feePoolAccAddr) + header = tmproto.Header{Height: stApp.LastBlockHeight() + 1, ChainID: chainID} stApp.BeginBlock(abci.RequestBeginBlock{Header: header}) stApp.EndBlock(abci.RequestEndBlock{Height: header.Height}) stApp.Commit() - feeCollectorToFeePoolAtBeginBlock := bankKeeper.GetAllBalances(ctx, feePoolAccAddr) + header = tmproto.Header{Height: stApp.LastBlockHeight() + 1, ChainID: chainID} stApp.BeginBlock(abci.RequestBeginBlock{Header: header}) ctx = stApp.BaseApp.NewContext(true, header) diff --git a/x/pot/genesis.go b/x/pot/genesis.go index aa7500aa..b8637c94 100644 --- a/x/pot/genesis.go +++ b/x/pot/genesis.go @@ -2,6 +2,7 @@ package pot import ( sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/stratosnet/stratos-chain/x/pot/keeper" "github.com/stratosnet/stratos-chain/x/pot/types" ) @@ -37,9 +38,6 @@ func InitGenesis(ctx sdk.Context, keeper keeper.Keeper, data *types.GenesisState keeper.SetIndividualReward(ctx, walletAddr, data.LastDistributedEpoch.Add(sdk.NewInt(data.Params.MatureEpoch)), individual) } - keeper.SetUnDistributedReport(ctx, data.UndistributedReport) - keeper.SetUnDistributedEpoch(ctx, data.UndistributedEpoch) - keeper.SetIsReadyToDistribute(ctx, data.IsReadyToDistribute) keeper.SetMaturedEpoch(ctx, data.MaturedEpoch) } @@ -76,13 +74,6 @@ func ExportGenesis(ctx sdk.Context, keeper keeper.Keeper) (data *types.GenesisSt return false }) - unDistributedReport, found := keeper.GetUnDistributedReport(ctx) - if !found { - unDistributedReport = types.WalletVolumes{} - } - unDistributedEpoch := keeper.GetUnDistributedEpoch(ctx) - isReadyToDistribute := keeper.GetIsReadyToDistribute(ctx) - maturedEpoch := keeper.GetMaturedEpoch(ctx) return types.NewGenesisState( @@ -92,8 +83,5 @@ func ExportGenesis(ctx sdk.Context, keeper keeper.Keeper) (data *types.GenesisSt immatureTotalInfo, matureTotalInfo, individualRewardInfo, - unDistributedReport, - unDistributedEpoch, - isReadyToDistribute, maturedEpoch) } diff --git a/x/pot/keeper/keeper.go b/x/pot/keeper/keeper.go index 170de875..bcc7a3a6 100644 --- a/x/pot/keeper/keeper.go +++ b/x/pot/keeper/keeper.go @@ -58,19 +58,14 @@ func (k Keeper) Logger(ctx sdk.Context) log.Logger { func (k Keeper) VolumeReport(ctx sdk.Context, walletVolumes types.WalletVolumes, reporter stratos.SdsAddress, epoch sdk.Int, reportReference string, txHash string) (err error) { - // tx fail when unhandled epoch > 0 - if k.GetUnDistributedEpoch(ctx).GT(sdk.ZeroInt()) { - return types.ErrRewardDistributionNotComplete - } - //record volume report reportRecord := types.NewReportRecord(reporter, reportReference, txHash) k.SetVolumeReport(ctx, epoch, reportRecord) - // save for reward distribution in the EndBlock at height + 1 - k.SetIsReadyToDistribute(ctx, false) - k.SetUnDistributedEpoch(ctx, epoch) - k.SetUnDistributedReport(ctx, walletVolumes) + err = k.DistributePotReward(ctx, walletVolumes.GetVolumes(), epoch) + if err != nil { + return err + } return nil } diff --git a/x/pot/keeper/store.go b/x/pot/keeper/store.go index f802f623..bb488f37 100644 --- a/x/pot/keeper/store.go +++ b/x/pot/keeper/store.go @@ -1,8 +1,6 @@ package keeper import ( - gogotypes "github.com/gogo/protobuf/types" - db "github.com/tendermint/tm-db" storetypes "github.com/cosmos/cosmos-sdk/store/types" @@ -168,63 +166,6 @@ func (k Keeper) SetVolumeReport(ctx sdk.Context, epoch sdk.Int, reportRecord typ store.Set(storeKey, bz) } -func (k Keeper) GetUnDistributedReport(ctx sdk.Context) (volumes types.WalletVolumes, found bool) { - store := ctx.KVStore(k.storeKey) - bz := store.Get(types.UnDistributedReportKeyPrefix) - if bz == nil { - return volumes, false - } - k.cdc.MustUnmarshalLengthPrefixed(bz, &volumes) - - if volumes.Volumes == nil || len(volumes.Volumes) == 0 { - return volumes, false - } - found = true - return -} - -func (k Keeper) SetUnDistributedReport(ctx sdk.Context, volumes types.WalletVolumes) { - store := ctx.KVStore(k.storeKey) - b := k.cdc.MustMarshalLengthPrefixed(&volumes) - store.Set(types.UnDistributedReportKeyPrefix, b) -} - -func (k Keeper) GetUnDistributedEpoch(ctx sdk.Context) (epoch sdk.Int) { - store := ctx.KVStore(k.storeKey) - b := store.Get(types.UnDistributedEpochKeyPrefix) - if b == nil { - return sdk.ZeroInt() - } - intValue := stratos.Int{} - k.cdc.MustUnmarshalLengthPrefixed(b, &intValue) - epoch = *intValue.Value - return -} - -func (k Keeper) SetUnDistributedEpoch(ctx sdk.Context, epoch sdk.Int) { - store := ctx.KVStore(k.storeKey) - b := k.cdc.MustMarshalLengthPrefixed(&stratos.Int{Value: &epoch}) - store.Set(types.UnDistributedEpochKeyPrefix, b) -} - -func (k Keeper) GetIsReadyToDistribute(ctx sdk.Context) (isReady bool) { - store := ctx.KVStore(k.storeKey) - b := store.Get(types.IsReadyToDistributeKeyPrefix) - if b == nil { - return false - } - boolValue := gogotypes.BoolValue{} - k.cdc.MustUnmarshalLengthPrefixed(b, &boolValue) - isReady = boolValue.Value - return -} - -func (k Keeper) SetIsReadyToDistribute(ctx sdk.Context, isReady bool) { - store := ctx.KVStore(k.storeKey) - b := k.cdc.MustMarshalLengthPrefixed(&gogotypes.BoolValue{Value: isReady}) - store.Set(types.IsReadyToDistributeKeyPrefix, b) -} - func (k Keeper) GetMaturedEpoch(ctx sdk.Context) (epoch sdk.Int) { store := ctx.KVStore(k.storeKey) bz := store.Get(types.MaturedEpochKeyPrefix) diff --git a/x/pot/types/errors.go b/x/pot/types/errors.go index ef57c8f2..91a1c0ff 100644 --- a/x/pot/types/errors.go +++ b/x/pot/types/errors.go @@ -38,7 +38,6 @@ const ( codeErrWithdrawFailure codeErrFoundationDepositFailure codeErrSlashingResourceNodeFailure - codeErrRewardDistributionNotComplete codeErrVolumeReport codeErrLegacyWithdrawFailure codeErrReporterAddressOrOwner @@ -78,7 +77,6 @@ var ( ErrWithdrawFailure = sdkerrors.Register(ModuleName, codeErrWithdrawFailure, "failure during withdraw") ErrFoundationDepositFailure = sdkerrors.Register(ModuleName, codeErrFoundationDepositFailure, "failure during foundation deposit") ErrSlashingResourceNodeFailure = sdkerrors.Register(ModuleName, codeErrSlashingResourceNodeFailure, "failure during slashing resource node") - ErrRewardDistributionNotComplete = sdkerrors.Register(ModuleName, codeErrRewardDistributionNotComplete, "Reward distribution not completed") ErrVolumeReport = sdkerrors.Register(ModuleName, codeErrVolumeReport, "volume report failed") ErrLegacyWithdrawFailure = sdkerrors.Register(ModuleName, codeErrLegacyWithdrawFailure, "failure during legacyWithdraw") ErrReporterAddressOrOwner = sdkerrors.Register(ModuleName, codeErrReporterAddressOrOwner, "invalid reporter address or owner address") diff --git a/x/pot/types/genesis.go b/x/pot/types/genesis.go index 0d342e95..15e31fc5 100644 --- a/x/pot/types/genesis.go +++ b/x/pot/types/genesis.go @@ -2,13 +2,11 @@ package types import ( sdk "github.com/cosmos/cosmos-sdk/types" - //stratos "github.com/stratosnet/stratos-chain/types" ) // NewGenesisState creates a new GenesisState object func NewGenesisState(params Params, totalMinedToken sdk.Coin, lastDistributedEpoch sdk.Int, immatureTotalInfo []ImmatureTotal, matureTotalInfo []MatureTotal, individualRewardInfo []Reward, - undistributedReport WalletVolumes, undistributedEpoch sdk.Int, isReadyToDistribute bool, maturedEpoch sdk.Int, ) *GenesisState { @@ -19,9 +17,6 @@ func NewGenesisState(params Params, totalMinedToken sdk.Coin, lastDistributedEpo ImmatureTotalInfo: immatureTotalInfo, MatureTotalInfo: matureTotalInfo, IndividualRewardInfo: individualRewardInfo, - UndistributedReport: undistributedReport, - UndistributedEpoch: undistributedEpoch, - IsReadyToDistribute: isReadyToDistribute, MaturedEpoch: maturedEpoch, } } @@ -37,9 +32,6 @@ func DefaultGenesisState() *GenesisState { ImmatureTotalInfo: make([]ImmatureTotal, 0), MatureTotalInfo: make([]MatureTotal, 0), IndividualRewardInfo: make([]Reward, 0), - UndistributedReport: WalletVolumes{}, - UndistributedEpoch: sdk.ZeroInt(), - IsReadyToDistribute: false, MaturedEpoch: sdk.ZeroInt(), } } diff --git a/x/pot/types/genesis.pb.go b/x/pot/types/genesis.pb.go index a783daad..95187e80 100644 --- a/x/pot/types/genesis.pb.go +++ b/x/pot/types/genesis.pb.go @@ -33,10 +33,7 @@ type GenesisState struct { ImmatureTotalInfo []ImmatureTotal `protobuf:"bytes,4,rep,name=immature_total_info,json=immatureTotalInfo,proto3" json:"immature_total_info" yaml:"immature_total_info"` MatureTotalInfo []MatureTotal `protobuf:"bytes,5,rep,name=mature_total_info,json=matureTotalInfo,proto3" json:"mature_total_info" yaml:"mature_total_info"` IndividualRewardInfo []Reward `protobuf:"bytes,6,rep,name=individual_reward_info,json=individualRewardInfo,proto3" json:"individual_reward_info" yaml:"individual_reward_info"` - UndistributedReport WalletVolumes `protobuf:"bytes,7,opt,name=undistributed_report,json=undistributedReport,proto3" json:"undistributed_report" yaml:"undistributed_report"` - UndistributedEpoch github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,8,opt,name=undistributed_epoch,json=undistributedEpoch,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"undistributed_epoch" yaml:"undistributed_epoch"` - IsReadyToDistribute bool `protobuf:"varint,9,opt,name=is_ready_to_distribute,json=isReadyToDistribute,proto3" json:"is_ready_to_distribute" yaml:"is_ready_to_distribute"` - MaturedEpoch github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,10,opt,name=matured_epoch,json=maturedEpoch,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"matured_epoch" yaml:"matured_epoch"` + MaturedEpoch github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,7,opt,name=matured_epoch,json=maturedEpoch,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"matured_epoch" yaml:"matured_epoch"` } func (m *GenesisState) Reset() { *m = GenesisState{} } @@ -107,20 +104,6 @@ func (m *GenesisState) GetIndividualRewardInfo() []Reward { return nil } -func (m *GenesisState) GetUndistributedReport() WalletVolumes { - if m != nil { - return m.UndistributedReport - } - return WalletVolumes{} -} - -func (m *GenesisState) GetIsReadyToDistribute() bool { - if m != nil { - return m.IsReadyToDistribute - } - return false -} - type ImmatureTotal struct { WalletAddress string `protobuf:"bytes,1,opt,name=wallet_address,json=walletAddress,proto3" json:"wallet_address" yaml:"wallet_address"` Value github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=value,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"value"` @@ -234,54 +217,47 @@ func init() { func init() { proto.RegisterFile("stratos/pot/v1/genesis.proto", fileDescriptor_abdde08c2564316a) } var fileDescriptor_abdde08c2564316a = []byte{ - // 747 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x55, 0xcf, 0x4f, 0xd4, 0x4c, - 0x18, 0xde, 0xc2, 0x07, 0x1f, 0x0c, 0x2c, 0x84, 0xb2, 0xdf, 0xa6, 0x1f, 0xc8, 0x76, 0xd3, 0x83, - 0xd9, 0xc4, 0xd0, 0xba, 0x18, 0x0f, 0xca, 0xc1, 0x58, 0x35, 0x66, 0x0f, 0x44, 0x33, 0x12, 0x49, - 0xbc, 0x34, 0xb3, 0xdb, 0x61, 0x99, 0xd0, 0x76, 0x9a, 0xce, 0xec, 0x22, 0x09, 0xf1, 0xec, 0xc5, - 0xc4, 0x83, 0x77, 0xef, 0xde, 0xfc, 0x1f, 0x8c, 0xe1, 0xc8, 0xd1, 0x78, 0xa8, 0x06, 0x6e, 0x1c, - 0xf7, 0x2f, 0x30, 0x9d, 0x19, 0xd8, 0x5f, 0xc5, 0xc8, 0xd1, 0xd3, 0x6e, 0x9f, 0xe7, 0x9d, 0xe7, - 0x7d, 0xde, 0x1f, 0xd3, 0x82, 0x1b, 0x8c, 0x27, 0x88, 0x53, 0xe6, 0xc4, 0x94, 0x3b, 0xdd, 0xba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0xbb, 0xf2, 0x76, 0x56, 0xf6, 0xa7, 0x1f, 0x66, 0xed, 0x0f, 0xca, 0xce, 0x0e, 0x30, - 0x28, 0x95, 0xad, 0x2f, 0x1a, 0x98, 0xdb, 0xfa, 0xeb, 0xcb, 0x70, 0x1b, 0xc7, 0xa7, 0x15, 0xed, - 0xe4, 0xb4, 0xa2, 0xfd, 0x3c, 0xad, 0x68, 0xef, 0xcf, 0x2a, 0x85, 0x93, 0xb3, 0x4a, 0xe1, 0xdb, - 0x59, 0xa5, 0xf0, 0xca, 0x19, 0x90, 0x52, 0x77, 0x35, 0xc2, 0xfc, 0xe2, 0xef, 0x7a, 0x6b, 0x0f, - 0x91, 0xc8, 0x79, 0x2d, 0xbe, 0x8a, 0x42, 0xb7, 0x39, 0x2d, 0xbe, 0x8a, 0x77, 0x7e, 0x05, 0x00, - 0x00, 0xff, 0xff, 0xd8, 0xaa, 0xc0, 0x23, 0x95, 0x07, 0x00, 0x00, + // 636 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x94, 0x4f, 0x6b, 0xd4, 0x4e, + 0x18, 0xc7, 0x37, 0xed, 0xaf, 0x2d, 0x9d, 0x76, 0x5b, 0x9a, 0xdf, 0x5a, 0x62, 0xb5, 0x99, 0x92, + 0x83, 0x2c, 0x48, 0x13, 0xb7, 0xe2, 0x41, 0x2f, 0x62, 0x54, 0x64, 0x0f, 0x45, 0x89, 0x05, 0xc1, + 0x4b, 0x98, 0xdd, 0x4c, 0xb7, 0x43, 0x93, 0x4c, 0xc8, 0xcc, 0x6e, 0x2d, 0x14, 0xcf, 0x5e, 0x04, + 0x8f, 0xde, 0xbc, 0xfb, 0x3a, 0x44, 0x7a, 0xec, 0x51, 0x3c, 0x44, 0xe9, 0xde, 0xf6, 0x98, 0x57, + 0x20, 0x99, 0x99, 0x76, 0xff, 0xa5, 0xa2, 0x47, 0x4f, 0xc9, 0x3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6a, 0xca, 0x75, 0xcb, 0xab, 0x0d, 0x05, 0x69, + 0x29, 0x78, 0x4e, 0x40, 0x55, 0x22, 0x5e, 0x8c, 0xcc, 0x82, 0x18, 0x99, 0x57, 0x7f, 0x3d, 0x32, + 0xe3, 0x36, 0x79, 0x06, 0x6b, 0xa3, 0x4d, 0xb9, 0x1c, 0x90, 0x65, 0xb5, 0x16, 0x83, 0x61, 0x7d, + 0xd5, 0x40, 0x75, 0xec, 0xb6, 0x75, 0x0f, 0xac, 0x1c, 0xa1, 0x30, 0xc4, 0xdc, 0x47, 0x41, 0x90, + 0x62, 0x26, 0xbf, 0xd1, 0x45, 0xf7, 0xf6, 0x20, 0x83, 0x13, 0x4a, 0x9e, 0xc1, 0x6b, 0xb2, 0xc6, + 0x78, 0xdc, 0xf2, 0xaa, 0x32, 0xf0, 0x48, 0xae, 0x75, 0x04, 0xe6, 0x7a, 0x28, 0xec, 0x62, 0x63, + 0x46, 0x74, 0xf8, 0x37, 0x9f, 0xe4, 0x9d, 0xe2, 0xd8, 0x9f, 0x7f, 0xc0, 0xfa, 0x1f, 0x1c, 0xbb, + 0xd8, 0xc0, 0x3c, 0xe9, 0x6c, 0x7d, 0xd1, 0xc0, 0xd2, 0xee, 0x3f, 0x7f, 0x0c, 0xb7, 0x79, 0x7a, + 0x6e, 0x6a, 0x67, 0xe7, 0xa6, 0xf6, 0xf3, 0xdc, 0xd4, 0x3e, 0xf4, 0xcd, 0xca, 0x59, 0xdf, 0xac, + 0x7c, 0xeb, 0x9b, 0x95, 0xd7, 0xce, 0x88, 0x95, 0x1a, 0xd0, 0x18, 0xf3, 0x8b, 0xd7, 0xed, 0xf6, + 0x01, 0x22, 0xb1, 0xf3, 0x46, 0xfc, 0x7c, 0x85, 0x6f, 0x6b, 0x5e, 0xfc, 0x7c, 0xef, 0xfe, 0x0a, + 0x00, 0x00, 0xff, 0xff, 0x09, 0xda, 0xca, 0x79, 0xfc, 0x05, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -313,36 +289,6 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintGenesis(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x52 - if m.IsReadyToDistribute { - i-- - if m.IsReadyToDistribute { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x48 - } - { - size := m.UndistributedEpoch.Size() - i -= size - if _, err := m.UndistributedEpoch.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x42 - { - size, err := m.UndistributedReport.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- dAtA[i] = 0x3a if len(m.IndividualRewardInfo) > 0 { for iNdEx := len(m.IndividualRewardInfo) - 1; iNdEx >= 0; iNdEx-- { @@ -548,13 +494,6 @@ func (m *GenesisState) Size() (n int) { n += 1 + l + sovGenesis(uint64(l)) } } - l = m.UndistributedReport.Size() - n += 1 + l + sovGenesis(uint64(l)) - l = m.UndistributedEpoch.Size() - n += 1 + l + sovGenesis(uint64(l)) - if m.IsReadyToDistribute { - n += 2 - } l = m.MaturedEpoch.Size() n += 1 + l + sovGenesis(uint64(l)) return n @@ -836,93 +775,6 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { } iNdEx = postIndex case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UndistributedReport", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.UndistributedReport.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UndistributedEpoch", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - 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 ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.UndistributedEpoch.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsReadyToDistribute", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IsReadyToDistribute = bool(v != 0) - case 10: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MaturedEpoch", wireType) } diff --git a/x/pot/types/key.go b/x/pot/types/key.go index b4272a92..06e30bf3 100644 --- a/x/pot/types/key.go +++ b/x/pot/types/key.go @@ -25,10 +25,7 @@ var ( MatureTotalRewardKeyPrefix = []byte{0x04} // key: prefix{address} ImmatureTotalRewardKeyPrefix = []byte{0x05} // key: prefix{address} VolumeReportStoreKeyPrefix = []byte{0x06} // VolumeReportStoreKeyPrefix prefix for volumeReport store - UnDistributedReportKeyPrefix = []byte{0x07} // prefix for report need to be handled, after reward distribution, clear data - UnDistributedEpochKeyPrefix = []byte{0x08} // prefix for epoch need to be handled, after reward distribution, clear data - IsReadyToDistributeKeyPrefix = []byte{0x09} - MaturedEpochKeyPrefix = []byte{0x10} + MaturedEpochKeyPrefix = []byte{0x07} ) func VolumeReportStoreKey(epoch sdk.Int) []byte { From 07f16b3e93c1bb0c08742e8098b712ff1c345712 Mon Sep 17 00:00:00 2001 From: Xiong Date: Wed, 31 May 2023 11:57:31 -0400 Subject: [PATCH 79/95] stake renaming --- app/test_helpers.go | 4 +- proto/stratos/register/v1/genesis.proto | 8 +- proto/stratos/register/v1/query.proto | 89 +- proto/stratos/register/v1/register.proto | 14 +- proto/stratos/register/v1/tx.proto | 78 +- x/pot/app_test.go | 2 +- x/pot/keeper/distribute.go | 2 +- x/pot/keeper/keeper.go | 10 +- x/pot/keeper/slashing.go | 2 +- x/pot/types/expected_keepers.go | 6 +- x/register/allow_ed25519_gas_test.go | 74 -- x/register/app_test.go | 235 ---- x/register/client/cli/flags.go | 16 +- x/register/client/cli/query.go | 107 -- x/register/client/cli/tx.go | 60 +- x/register/client/rest/query.go | 24 +- x/register/client/rest/tx.go | 44 +- x/register/exported/exported.go | 4 +- x/register/genesis.go | 26 +- x/register/handler.go | 12 +- x/register/keeper/grpc_query.go | 111 +- x/register/keeper/keeper.go | 92 +- x/register/keeper/meta_node.go | 48 +- x/register/keeper/msg_server.go | 87 +- x/register/keeper/node_state_change.go | 91 -- x/register/keeper/params.go | 4 +- x/register/keeper/querier.go | 248 ++-- x/register/keeper/resource_node.go | 72 +- x/register/keeper/store.go | 42 +- x/register/register_test.go | 157 --- x/register/types/codec.go | 8 +- x/register/types/errors.go | 20 +- x/register/types/events.go | 42 +- x/register/types/genesis.go | 10 +- x/register/types/genesis.pb.go | 122 +- x/register/types/keys.go | 27 +- x/register/types/msg.go | 113 +- x/register/types/params.go | 18 +- x/register/types/querier.go | 136 +- x/register/types/query.pb.go | 1500 ++++++++++------------ x/register/types/query.pb.gw.go | 90 +- x/register/types/register.pb.go | 200 +-- x/register/types/tx.pb.go | 735 +++++------ x/register/types/tx.pb.gw.go | 136 +- x/sds/app_test.go | 18 +- x/sds/keeper/keeper.go | 4 +- x/sds/oz_price_test.go | 386 +++--- 47 files changed, 2249 insertions(+), 3085 deletions(-) delete mode 100644 x/register/allow_ed25519_gas_test.go delete mode 100644 x/register/app_test.go delete mode 100644 x/register/register_test.go diff --git a/app/test_helpers.go b/app/test_helpers.go index 63bbeb0e..9d5f7925 100644 --- a/app/test_helpers.go +++ b/app/test_helpers.go @@ -188,7 +188,7 @@ func SetupWithGenesisNodeSet(t *testing.T, }) initRemainingOzoneLimit = resNodeBondedAmt.ToDec(). - Quo(registertypes.DefaultStakeNozRate). + Quo(registertypes.DefaultDepositNozRate). TruncateInt() } @@ -209,7 +209,7 @@ func SetupWithGenesisNodeSet(t *testing.T, metaNodes, initRemainingOzoneLimit, make([]registertypes.Slashing, 0), - registertypes.DefaultStakeNozRate, + registertypes.DefaultDepositNozRate, ) genesisState[registertypes.ModuleName] = app.AppCodec().MustMarshalJSON(registerGenesis) diff --git a/proto/stratos/register/v1/genesis.proto b/proto/stratos/register/v1/genesis.proto index 1690ec9c..714c920f 100644 --- a/proto/stratos/register/v1/genesis.proto +++ b/proto/stratos/register/v1/genesis.proto @@ -39,12 +39,12 @@ message GenesisState { (gogoproto.jsontag) = "slashing", (gogoproto.moretags) = "yaml:\"slashing_info\"" ]; - string stake_noz_rate = 6 [ + string deposit_noz_rate = 6 [ (gogoproto.nullable) = false, - (gogoproto.jsontag) = "stake_noz_rate", - (gogoproto.moretags) = "yaml:\"stake_noz_rate\"", + (gogoproto.jsontag) = "deposit_noz_rate", + (gogoproto.moretags) = "yaml:\"deposit_noz_rate\"", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec" - ]; //fixed rate of stake over noz + ]; //fixed rate of deposit over noz } message GenesisMetaNode { diff --git a/proto/stratos/register/v1/query.proto b/proto/stratos/register/v1/query.proto index c32cfdb8..ebd4180c 100644 --- a/proto/stratos/register/v1/query.proto +++ b/proto/stratos/register/v1/query.proto @@ -31,19 +31,19 @@ service Query { option (google.api.http).get = "/stratos/register/v1/params"; } - // StakeByNode queries all staking info for given node network address. - rpc StakeByNode(QueryStakeByNodeRequest) returns (QueryStakeByNodeResponse) { - option (google.api.http).get = "/stratos/register/v1/stakes_node/{network_addr}/{query_type}"; + // DepositByNode queries all deposit info for given node network address. + rpc DepositByNode(QueryDepositByNodeRequest) returns (QueryDepositByNodeResponse) { + option (google.api.http).get = "/stratos/register/v1/deposit_by_node/{network_addr}/{query_type}"; } - // StakeByOwner queries all staking info for given owner address. - rpc StakeByOwner(QueryStakeByOwnerRequest) returns (QueryStakeByOwnerResponse) { - option (google.api.http).get = "/stratos/register/v1/stakes_owner/{owner_addr}"; + // DepositByOwner queries all deposit info for given owner address. + rpc DepositByOwner(QueryDepositByOwnerRequest) returns (QueryDepositByOwnerResponse) { + option (google.api.http).get = "/stratos/register/v1/deposit_by_owner/{owner_addr}"; } - // StakeTotal queries all staking info. - rpc StakeTotal(QueryTotalStakeRequest) returns (QueryTotalStakeResponse) { - option (google.api.http).get = "/stratos/register/v1/total_stakes"; + // DepositTotal queries all deposit info. + rpc DepositTotal(QueryDepositTotalRequest) returns (QueryDepositTotalResponse) { + option (google.api.http).get = "/stratos/register/v1/deposit_total"; } // BondedResourceNodeCount queries total number of ResourceNodes. @@ -81,42 +81,45 @@ message QueryMetaNodeResponse { MetaNode node = 1; } -// QueryStakeByNodeRequest is request type for the Query/StakeByNode RPC method -message QueryStakeByNodeRequest { +// QueryDepositByNodeRequest is request type for the Query/DepositByNode RPC method +message QueryDepositByNodeRequest { // network_addr defines the node network address to query for. - string network_addr = 1; - uint32 query_type = 2; + string network_addr = 1; + uint32 query_type = 2; } -// QueryStakeByNodeResponse is response type for the Query/StakeByNode RPC method -message QueryStakeByNodeResponse { - // staking_info defines the the staking_info info of the node. - StakingInfo staking_info = 1; +// QueryDepositByNodeResponse is response type for the Query/DepositByNode RPC method +message QueryDepositByNodeResponse { + // deposit_info defines the the deposit info of the node. + DepositInfo deposit_info = 1; } -// QueryStakeByOwnerRequest is request type for the Query/StakeByOwner RPC method -message QueryStakeByOwnerRequest { +// QueryDepositByOwnerRequest is request type for the Query/DepositByOwner RPC method +message QueryDepositByOwnerRequest { // owner_addr defines the owner address to query for. string owner_addr = 1; // pagination defines an optional pagination for the request. cosmos.base.query.v1beta1.PageRequest pagination = 2; } -// QueryStakeByOwnerResponse is response type for the Query/StakeByOwner RPC method -message QueryStakeByOwnerResponse { - // staking_infos defines the the node staking info of this owner. - repeated StakingInfo staking_infos = 1; +// QueryDepositByOwnerResponse is response type for the Query/DepositByOwner RPC method +message QueryDepositByOwnerResponse { + // deposit_infos defines the the node deposit info of this owner. + repeated DepositInfo deposit_infos = 1; // pagination defines an optional pagination for the request. cosmos.base.query.v1beta1.PageResponse pagination = 2; } -// QueryTotalStakeRequest is request type for the Query/TotalStake RPC method -message QueryTotalStakeRequest {} +// QueryDepositTotalRequest is request type for the Query/DepositTotal RPC method +message QueryDepositTotalRequest {} -// QueryTotalStakeResponse is response type for the Query/TotalStake RPC method -message QueryTotalStakeResponse { - // total_stakes defines the total staking info. - TotalStakesResponse total_stakes= 1; +// QueryDepositTotalResponse is response type for the Query/DepositTotal RPC method +message QueryDepositTotalResponse { + cosmos.base.v1beta1.Coin resource_nodes_total_deposit = 1; + cosmos.base.v1beta1.Coin meta_nodes_total_deposit = 2; + cosmos.base.v1beta1.Coin total_bonded_deposit = 3; + cosmos.base.v1beta1.Coin total_unbonded_deposit = 4; + cosmos.base.v1beta1.Coin total_unbonding_deposit = 5; } // QueryParamsRequest is request type for the Query/Params RPC method. @@ -146,15 +149,7 @@ message QueryBondedMetaNodeCountResponse { uint64 number = 1; } -message TotalStakesResponse { - cosmos.base.v1beta1.Coin resource_nodes_total_stake = 1; - cosmos.base.v1beta1.Coin meta_nodes_total_stake = 2; - cosmos.base.v1beta1.Coin total_bonded_stake = 3; - cosmos.base.v1beta1.Coin total_unbonded_stake = 4; - cosmos.base.v1beta1.Coin total_unbonding_stake = 5; -} - -message StakingInfo { +message DepositInfo { string network_address = 1 [ (gogoproto.jsontag) = "network_address", (gogoproto.moretags) = "yaml:\"network_address\"" @@ -196,19 +191,19 @@ message StakingInfo { (gogoproto.jsontag) = "node_type", (gogoproto.moretags) = "yaml:\"node_type\"" ]; - cosmos.base.v1beta1.Coin bonded_stake = 10 [ + cosmos.base.v1beta1.Coin bonded_deposit = 10 [ (gogoproto.nullable) = false, - (gogoproto.jsontag) = "bonded_stake", - (gogoproto.moretags) = "yaml:\"bonded_stake\"" + (gogoproto.jsontag) = "bonded_deposit", + (gogoproto.moretags) = "yaml:\"bonded_deposit\"" ]; - cosmos.base.v1beta1.Coin un_bonding_stake = 11 [ + cosmos.base.v1beta1.Coin un_bonding_deposit = 11 [ (gogoproto.nullable) = false, - (gogoproto.jsontag) = "un_bonding_stake", - (gogoproto.moretags) = "yaml:\"un_bonding_stake\"" + (gogoproto.jsontag) = "un_bonding_deposit", + (gogoproto.moretags) = "yaml:\"un_bonding_deposit\"" ]; - cosmos.base.v1beta1.Coin un_bonded_stake = 12 [ + cosmos.base.v1beta1.Coin un_bonded_deposit = 12 [ (gogoproto.nullable) = false, - (gogoproto.jsontag) = "un_bonded_stake", - (gogoproto.moretags) = "yaml:\"un_bonded_stake\"" + (gogoproto.jsontag) = "un_bonded_deposit", + (gogoproto.moretags) = "yaml:\"un_bonded_deposit\"" ]; } diff --git a/proto/stratos/register/v1/register.proto b/proto/stratos/register/v1/register.proto index 39146f40..a45b347b 100644 --- a/proto/stratos/register/v1/register.proto +++ b/proto/stratos/register/v1/register.proto @@ -37,16 +37,16 @@ message Params { (gogoproto.jsontag) = "resource_node_reg_enabled", (gogoproto.moretags) = "yaml:\"resource_node_reg_enabled\"" ]; - cosmos.base.v1beta1.Coin resource_node_min_stake = 6 [ + cosmos.base.v1beta1.Coin resource_node_min_deposit = 6 [ (gogoproto.nullable) = false, - (gogoproto.jsontag) = "resource_node_min_stake", - (gogoproto.moretags) = "yaml:\"resource_node_min_stake\"" + (gogoproto.jsontag) = "resource_node_min_deposit", + (gogoproto.moretags) = "yaml:\"resource_node_min_deposit\"" ]; google.protobuf.Duration voting_period = 7 [ - (gogoproto.nullable) = false, - (gogoproto.stdduration) = true, - (gogoproto.jsontag) = "voting_period", - (gogoproto.moretags) = "yaml:\"voting_period\"" + (gogoproto.nullable) = false, + (gogoproto.stdduration) = true, + (gogoproto.jsontag) = "voting_period", + (gogoproto.moretags) = "yaml:\"voting_period\"" ]; } diff --git a/proto/stratos/register/v1/tx.proto b/proto/stratos/register/v1/tx.proto index 64a6e83d..417d4418 100644 --- a/proto/stratos/register/v1/tx.proto +++ b/proto/stratos/register/v1/tx.proto @@ -24,11 +24,11 @@ service Msg { rpc HandleMsgUpdateResourceNode(MsgUpdateResourceNode) returns (MsgUpdateResourceNodeResponse) { option (google.api.http).post = "/stratos/register/v1/update_resource_node"; }; - rpc HandleMsgUpdateResourceNodeStake(MsgUpdateResourceNodeStake) returns (MsgUpdateResourceNodeStakeResponse) { - option (google.api.http).post = "/stratos/register/v1/update_resource_node_stake"; + rpc HandleMsgUpdateResourceNodeDeposit(MsgUpdateResourceNodeDeposit) returns (MsgUpdateResourceNodeDepositResponse) { + option (google.api.http).post = "/stratos/register/v1/update_resource_node_deposit"; }; - rpc HandleMsgUpdateEffectiveStake(MsgUpdateEffectiveStake) returns (MsgUpdateEffectiveStakeResponse) { - option (google.api.http).post = "/stratos/register/v1/update_effective_stake"; + rpc HandleMsgUpdateEffectiveDeposit(MsgUpdateEffectiveDeposit) returns (MsgUpdateEffectiveDepositResponse) { + option (google.api.http).post = "/stratos/register/v1/update_effective_deposit"; }; rpc HandleMsgCreateMetaNode(MsgCreateMetaNode) returns (MsgCreateMetaNodeResponse) { @@ -40,14 +40,14 @@ service Msg { rpc HandleMsgUpdateMetaNode(MsgUpdateMetaNode) returns (MsgUpdateMetaNodeResponse) { option (google.api.http).post = "/stratos/register/v1/update_meta_node"; }; - rpc HandleMsgUpdateMetaNodeStake(MsgUpdateMetaNodeStake) returns (MsgUpdateMetaNodeStakeResponse) { - option (google.api.http).post = "/stratos/register/v1/update_meta_node_stake"; + rpc HandleMsgUpdateMetaNodeDeposit(MsgUpdateMetaNodeDeposit) returns (MsgUpdateMetaNodeDepositResponse) { + option (google.api.http).post = "/stratos/register/v1/update_meta_node_deposit"; }; rpc HandleMsgMetaNodeRegistrationVote(MsgMetaNodeRegistrationVote) returns (MsgMetaNodeRegistrationVoteResponse) { option (google.api.http).post = "/stratos/register/v1/meta_node_registration_vote"; }; - rpc HandleMsgWithdrawMetaNodeRegistrationStake(MsgWithdrawMetaNodeRegistrationStake) returns (MsgWithdrawMetaNodeRegistrationStakeResponse) { - option (google.api.http).post = "/stratos/register/v1/withdraw_meta_node_registration_stake"; + rpc HandleMsgWithdrawMetaNodeRegistrationDeposit(MsgWithdrawMetaNodeRegistrationDeposit) returns (MsgWithdrawMetaNodeRegistrationDepositResponse) { + option (google.api.http).post = "/stratos/register/v1/withdraw_meta_node_registration_deposit"; }; } @@ -184,7 +184,7 @@ message MsgUpdateMetaNode { (gogoproto.jsontag) = "network_address", (gogoproto.moretags) = "yaml:\"network_address\"" ]; - string owner_address = 3 [ + string owner_address = 3 [ (gogoproto.jsontag) = "owner_address", (gogoproto.moretags) = "yaml:\"owner_address\"" ]; @@ -194,8 +194,8 @@ message MsgUpdateMetaNode { message MsgUpdateMetaNodeResponse {} -// MsgUpdateResourceNodeStake defines a SDK message for updating the stake of an existing resource node. -message MsgUpdateResourceNodeStake { +// MsgUpdateResourceNodeDeposit defines a SDK message for updating the deposit of an existing resource node. +message MsgUpdateResourceNodeDeposit { string network_address = 1 [ (gogoproto.jsontag) = "network_address", (gogoproto.moretags) = "yaml:\"network_address\"" @@ -204,18 +204,18 @@ message MsgUpdateResourceNodeStake { (gogoproto.jsontag) = "owner_address", (gogoproto.moretags) = "yaml:\"owner_address\"" ]; - cosmos.base.v1beta1.Coin stake_delta = 4 [ + cosmos.base.v1beta1.Coin deposit_delta = 3 [ (gogoproto.nullable) = false, - (gogoproto.jsontag) = "stake_delta", - (gogoproto.moretags) = "yaml:\"stake_delta\"" + (gogoproto.jsontag) = "deposit_delta", + (gogoproto.moretags) = "yaml:\"deposit_delta\"" ]; } -// MsgUpdateResourceNodeStakeResponse defines the Msg/UpdateResourceNodeStake response type. -message MsgUpdateResourceNodeStakeResponse {} +// MsgUpdateResourceNodeDepositResponse defines the Msg/UpdateResourceNodeDeposit response type. +message MsgUpdateResourceNodeDepositResponse {} -// MsgUpdateEffectiveStake defines a SDK message for updating the effective stake of an existing resource node. -message MsgUpdateEffectiveStake { +// MsgUpdateEffectiveDeposit defines a SDK message for updating the effective deposit of an existing resource node. +message MsgUpdateEffectiveDeposit { option (gogoproto.goproto_getters) = false; repeated string reporters = 1 [ @@ -238,12 +238,12 @@ message MsgUpdateEffectiveStake { ]; } -// MsgUpdateEffectiveStakeResponse defines the Msg/UpdateEffectiveStake response type. -message MsgUpdateEffectiveStakeResponse {} +// MsgUpdateEffectiveDepositResponse defines the Msg/UpdateEffectiveDeposit response type. +message MsgUpdateEffectiveDepositResponse {} -// MsgUpdateMetaNodeStake defines a SDK message for updating the stake of an existing meta node. -message MsgUpdateMetaNodeStake { +// MsgUpdateMetaNodeDeposit defines a SDK message for updating the deposit of an existing meta node. +message MsgUpdateMetaNodeDeposit { string network_address = 1 [ (gogoproto.jsontag) = "network_address", (gogoproto.moretags) = "yaml:\"network_address\"" @@ -252,27 +252,27 @@ message MsgUpdateMetaNodeStake { (gogoproto.jsontag) = "owner_address", (gogoproto.moretags) = "yaml:\"owner_address\"" ]; - bool incr_stake = 3 [ - (gogoproto.jsontag) = "incr_stake", - (gogoproto.moretags) = "yaml:\"incr_stake\"" + bool incr_deposit = 3 [ + (gogoproto.jsontag) = "incr_deposit", + (gogoproto.moretags) = "yaml:\"incr_deposit\"" ]; - cosmos.base.v1beta1.Coin stake_delta = 4 [ + cosmos.base.v1beta1.Coin deposit_delta = 4 [ (gogoproto.nullable) = false, - (gogoproto.jsontag) = "stake_delta", - (gogoproto.moretags) = "yaml:\"stake_delta\"" + (gogoproto.jsontag) = "deposit_delta", + (gogoproto.moretags) = "yaml:\"deposit_delta\"" ]; } -// MsgUpdateResourceNodeStakeResponse defines the Msg/UpdateResourceNodeStake response type. -message MsgUpdateMetaNodeStakeResponse {} +// MsgUpdateMetaNodeDepositResponse defines the Msg/UpdateMetaNodeDeposit response type. +message MsgUpdateMetaNodeDepositResponse {} // MsgMetaNodeRegistrationVote defines a SDK message for registration vote of an existing meta node. message MsgMetaNodeRegistrationVote { - string candidate_network_address = 1 [ + string candidate_network_address = 1 [ (gogoproto.jsontag) = "candidate_network_address", (gogoproto.moretags) = "yaml:\"candidate_network_address\"" ]; // node address of meta node - string candidate_owner_address = 2 [ + string candidate_owner_address = 2 [ (gogoproto.jsontag) = "candidate_owner_address", (gogoproto.moretags) = "yaml:\"candidate_owner_address\"" ]; // owner address of meta node @@ -284,7 +284,7 @@ message MsgMetaNodeRegistrationVote { (gogoproto.jsontag) = "voter_network_address", (gogoproto.moretags) = "yaml:\"voter_network_address\"" ]; // address of voter (other existed meta node) - string voter_owner_address = 5 [ + string voter_owner_address = 5 [ (gogoproto.jsontag) = "voter_owner_address", (gogoproto.moretags) = "yaml:\"voter_owner_address\"" ]; // address of owner of the voter (other existed meta node) @@ -293,17 +293,17 @@ message MsgMetaNodeRegistrationVote { // MsgMetaNodeRegistrationVoteResponse defines the Msg/MetaNodeRegistrationVote response type. message MsgMetaNodeRegistrationVoteResponse {} -// MsgWithdrawMetaNodeRegistrationStake defines a SDK message for withdrawing registration stake of meta node. -message MsgWithdrawMetaNodeRegistrationStake { - string network_address = 1 [ +// MsgWithdrawMetaNodeRegistrationDeposit defines a SDK message for withdrawing registration deposit of meta node. +message MsgWithdrawMetaNodeRegistrationDeposit { + string network_address = 1 [ (gogoproto.jsontag) = "network_address", (gogoproto.moretags) = "yaml:\"network_address\"" ]; // node address of meta node - string owner_address = 2 [ + string owner_address = 2 [ (gogoproto.jsontag) = "owner_address", (gogoproto.moretags) = "yaml:\"owner_address\"" ]; // owner address of meta node } -// MsgWithdrawMetaNodeRegistrationStakeResponse defines the Msg/WithdrawMetaNodeRegistrationStake response type. -message MsgWithdrawMetaNodeRegistrationStakeResponse {} +// MsgWithdrawMetaNodeRegistrationDepositResponse defines the Msg/WithdrawMetaNodeRegistrationDeposit response type. +message MsgWithdrawMetaNodeRegistrationDepositResponse {} diff --git a/x/pot/app_test.go b/x/pot/app_test.go index b59845fb..dce4914b 100644 --- a/x/pot/app_test.go +++ b/x/pot/app_test.go @@ -312,7 +312,7 @@ func TestPotVolumeReportMsgs(t *testing.T) { /********************* print info *********************/ t.Log("epoch " + volumeReportMsg.Epoch.String()) - S := registerKeeper.GetInitialGenesisStakeTotal(ctx).ToDec() + S := registerKeeper.GetInitialGenesisDepositTotal(ctx).ToDec() Pt := registerKeeper.GetTotalUnissuedPrepay(ctx).Amount.ToDec() Y := totalConsumedNoz Lt := registerKeeper.GetRemainingOzoneLimit(ctx).ToDec() diff --git a/x/pot/keeper/distribute.go b/x/pot/keeper/distribute.go index 8ce53d5e..1c1e4275 100644 --- a/x/pot/keeper/distribute.go +++ b/x/pot/keeper/distribute.go @@ -110,7 +110,7 @@ func (k Keeper) CalcTrafficRewardInTotal( // the total generated traffic rewards as [R] // R = (S + Pt) * Y / (Lt + Y) func (k Keeper) GetTrafficReward(ctx sdk.Context, totalConsumedNoz sdk.Dec) (result sdk.Dec) { - St := k.registerKeeper.GetEffectiveTotalStake(ctx).ToDec() + St := k.registerKeeper.GetEffectiveTotalDeposit(ctx).ToDec() if St.Equal(sdk.ZeroDec()) { ctx.Logger().Info("effective genesis deposit by all resource nodes and meta nodes is 0") } diff --git a/x/pot/keeper/keeper.go b/x/pot/keeper/keeper.go index 170de875..cd4ac00c 100644 --- a/x/pot/keeper/keeper.go +++ b/x/pot/keeper/keeper.go @@ -150,17 +150,17 @@ func (k Keeper) RestoreTotalSupply(ctx sdk.Context) (minter sdk.AccAddress, mint } func (k Keeper) GetCirculationSupply(ctx sdk.Context) (circulationSupply sdk.Coins) { - // total supply - validator staking - resource node staking - mining pool - prepay + // total supply - validator deposit - resource node deposit - mining pool - prepay totalSupply := k.bankKeeper.GetSupply(ctx, k.BondDenom(ctx)) validatorBondedPoolAcc := k.accountKeeper.GetModuleAddress(stakingtypes.BondedPoolName) validatorStaking := k.bankKeeper.GetBalance(ctx, validatorBondedPoolAcc, k.BondDenom(ctx)) resourceNodeBondedPoolAcc := k.accountKeeper.GetModuleAddress(registertypes.ResourceNodeBondedPool) - resourceNodeStaking := k.bankKeeper.GetBalance(ctx, resourceNodeBondedPoolAcc, k.BondDenom(ctx)) + resourceNodeDeposit := k.bankKeeper.GetBalance(ctx, resourceNodeBondedPoolAcc, k.BondDenom(ctx)) metaNodeBondedPoolAcc := k.accountKeeper.GetModuleAddress(registertypes.MetaNodeNotBondedPool) - metaNodeStaking := k.bankKeeper.GetBalance(ctx, metaNodeBondedPoolAcc, k.BondDenom(ctx)) + metaNodeDeposit := k.bankKeeper.GetBalance(ctx, metaNodeBondedPoolAcc, k.BondDenom(ctx)) miningPoolAcc := k.accountKeeper.GetModuleAddress(types.FoundationAccount) miningPool := k.bankKeeper.GetBalance(ctx, miningPoolAcc, k.BondDenom(ctx)) @@ -170,8 +170,8 @@ func (k Keeper) GetCirculationSupply(ctx sdk.Context) (circulationSupply sdk.Coi circulationSupplyStos := totalSupply. Sub(validatorStaking). - Sub(resourceNodeStaking). - Sub(metaNodeStaking). + Sub(resourceNodeDeposit). + Sub(metaNodeDeposit). Sub(miningPool). Sub(unissuedPrepay) diff --git a/x/pot/keeper/slashing.go b/x/pot/keeper/slashing.go index eaa0528f..6726b62f 100644 --- a/x/pot/keeper/slashing.go +++ b/x/pot/keeper/slashing.go @@ -42,7 +42,7 @@ func (k Keeper) SlashingResourceNode(ctx sdk.Context, p2pAddr stratos.SdsAddress if toBeSuspended { effectiveStakeChange := sdk.ZeroInt().Sub(node.EffectiveTokens) node.EffectiveTokens = sdk.ZeroInt() - k.registerKeeper.DecreaseOzoneLimitBySubtractStake(ctx, effectiveStakeChange.Abs()) + k.registerKeeper.DecreaseOzoneLimitBySubtractDeposit(ctx, effectiveStakeChange.Abs()) } k.registerKeeper.SetResourceNode(ctx, node) diff --git a/x/pot/types/expected_keepers.go b/x/pot/types/expected_keepers.go index 2ab0992e..658d811a 100644 --- a/x/pot/types/expected_keepers.go +++ b/x/pot/types/expected_keepers.go @@ -41,14 +41,14 @@ type RegisterKeeper interface { GetResourceNodeBondedToken(ctx sdk.Context) (token sdk.Coin) GetMetaNodeBondedToken(ctx sdk.Context) (token sdk.Coin) - GetEffectiveTotalStake(ctx sdk.Context) (stake sdk.Int) + GetEffectiveTotalDeposit(ctx sdk.Context) (deposit sdk.Int) GetResourceNodeIterator(ctx sdk.Context) sdk.Iterator GetMetaNodeIterator(ctx sdk.Context) sdk.Iterator GetBondedMetaNodeCnt(ctx sdk.Context) sdk.Int - DecreaseOzoneLimitBySubtractStake(ctx sdk.Context, stake sdk.Int) (ozoneLimitChange sdk.Int) - IncreaseOzoneLimitByAddStake(ctx sdk.Context, stake sdk.Int) (ozoneLimitChange sdk.Int) + DecreaseOzoneLimitBySubtractDeposit(ctx sdk.Context, deposit sdk.Int) (ozoneLimitChange sdk.Int) + IncreaseOzoneLimitByAddDeposit(ctx sdk.Context, deposit sdk.Int) (ozoneLimitChange sdk.Int) GetUnbondingNodeBalance(ctx sdk.Context, networkAddr stratos.SdsAddress) sdk.Int NozSupply(ctx sdk.Context) (remaining, total sdk.Int) diff --git a/x/register/allow_ed25519_gas_test.go b/x/register/allow_ed25519_gas_test.go deleted file mode 100644 index 4b75d451..00000000 --- a/x/register/allow_ed25519_gas_test.go +++ /dev/null @@ -1,74 +0,0 @@ -package register - -// -//import ( -// "testing" -// -// sdk "github.com/cosmos/cosmos-sdk/types" -// "github.com/cosmos/cosmos-sdk/x/mock" -// "github.com/stratosnet/stratos-chain/x/register/types" -// abci "github.com/tendermint/tendermint/abci/types" -//) -// -//func TestRegister(t *testing.T) { -// -// /********************* initialize mock app *********************/ -// //SetConfig() -// //mApp, k, accountKeeper, bankKeeper, stakingKeeper, registerKeeper := getMockApp(t) -// mApp, k, _, _ := getMockApp(t) -// accounts := setupAccounts(mApp) -// mock.SetGenesis(mApp, accounts) -// -// header := abci.Header{} -// ctx := mApp.BaseApp.NewContext(true, header) -// -// /********************* sign twice and send register resource node msg *********************/ -// -// header = abci.Header{Height: mApp.LastBlockHeight() + 1} -// ctx = mApp.BaseApp.NewContext(true, header) -// -// registerResNodeMsg := types.NewMsgCreateResourceNode( -// resNodeNetworkId3, -// resNodePubKey3, -// sdk.NewCoin(k.BondDenom(ctx), resNodeInitStake), -// resOwnerAddr3, -// NewDescription("sds://resourceNode3", "", "", "", ""), -// types.STORAGE, -// ) -// t.Log("registerResNodeMsg: ", registerResNodeMsg) -// -// resOwnerAcc3 := mApp.accountKeeper.GetAccount(ctx, resOwnerAddr3) -// accNumOwner := resOwnerAcc3.GetAccountNumber() -// t.Log("accNumOwner: ", accNumOwner) -// accSeqOwner := resOwnerAcc3.GetSequence() -// t.Log("accSeqOwner: ", accSeqOwner) -// t.Log("resOwnerPrivKey3: ", resOwnerPrivKey3) -// t.Log("resNodePrivKey3: ", resNodePrivKey3) -// t.Log("resOwnerPubKey3: ", resOwnerPrivKey3.PubKey()) -// t.Log("resNodePubKey3: ", resNodePubKey3) -// -// accNumNode := resOwnerAcc3.GetAccountNumber() -// t.Log("accNumNode: ", accNumNode) -// accSeqNode := resOwnerAcc3.GetSequence() -// t.Log("accSeqNode: ", accSeqNode) -// -// gasInfo, result, e := mock.SignCheckDeliver( -// t, -// mApp.Cdc, -// mApp.BaseApp, -// header, -// []sdk.Msg{registerResNodeMsg}, -// []uint64{accNumOwner, accNumNode}, -// []uint64{accSeqOwner, accSeqNode}, -// true, -// true, -// resOwnerPrivKey3, -// ) -// -// if e != nil { -// return -// } -// -// t.Log("gasInfo: ", gasInfo) -// t.Log("Result: ", result) -//} diff --git a/x/register/app_test.go b/x/register/app_test.go deleted file mode 100644 index 39c077b5..00000000 --- a/x/register/app_test.go +++ /dev/null @@ -1,235 +0,0 @@ -package register - -// -//import ( -// "os" -// "testing" -// -// sdk "github.com/cosmos/cosmos-sdk/types" -// "github.com/cosmos/cosmos-sdk/x/auth" -// "github.com/cosmos/cosmos-sdk/x/auth/ante" -// "github.com/cosmos/cosmos-sdk/x/bank" -// "github.com/cosmos/cosmos-sdk/x/mock" -// "github.com/cosmos/cosmos-sdk/x/staking" -// "github.com/cosmos/cosmos-sdk/x/supply" -// supplyexported "github.com/cosmos/cosmos-sdk/x/supply/exported" -// "github.com/stratosnet/stratos-chain/helpers" -// stratos "github.com/stratosnet/stratos-chain/types" -// "github.com/stratosnet/stratos-chain/x/register/types" -// "github.com/stretchr/testify/require" -// abci "github.com/tendermint/tendermint/abci/types" -//) -// -//func TestMain(m *testing.M) { -// config := stratos.GetConfig() -// config.Seal() -// exitVal := m.Run() -// os.Exit(exitVal) -//} -// -//func Test(t *testing.T) { -// -// /********************* initialize mock app *********************/ -// //mApp, k, accountKeeper, bankKeeper, stakingKeeper, registerKeeper := getMockApp(t) -// mApp, k, _, _ := getMockApp(t) -// accounts := setupAccounts(mApp) -// mock.SetGenesis(mApp, accounts) -// -// header := abci.Header{} -// ctx := mApp.BaseApp.NewContext(true, header) -// -// //2 bonded resource node, 1 bonded indexing node, 1 unBonded indexing node initialized by genesis -// resBondedToken := k.GetResourceNodeBondedToken(ctx) -// require.EqualValues(t, resBondedToken, sdk.NewCoin(k.BondDenom(ctx), resNodeInitStake.Add(resNodeInitStake))) -// resNotBondedToken := k.GetResourceNodeNotBondedToken(ctx) -// require.EqualValues(t, resNotBondedToken, sdk.NewCoin(k.BondDenom(ctx), sdk.ZeroInt())) -// idxBondedToken := k.GetIndexingNodeBondedToken(ctx) -// require.EqualValues(t, idxBondedToken, sdk.NewCoin(k.BondDenom(ctx), idxNodeInitStake)) -// idxNotBondedToken := k.GetIndexingNodeNotBondedToken(ctx) -// require.EqualValues(t, idxNotBondedToken, sdk.NewCoin(k.BondDenom(ctx), idxNodeInitStake)) -// -// /********************* send register resource node msg *********************/ -// header = abci.Header{Height: mApp.LastBlockHeight() + 1} -// ctx = mApp.BaseApp.NewContext(true, header) -// registerResNodeMsg := types.NewMsgCreateResourceNode(resNodeNetworkId2, resNodePubKey2, sdk.NewCoin(k.BondDenom(ctx), resNodeInitStake), resOwnerAddr2, NewDescription("sds://resourceNode2", "", "", "", ""), 4) -// resNodeOwnerAcc2 := mApp.accountKeeper.GetAccount(ctx, resOwnerAddr2) -// accNumOwner := resNodeOwnerAcc2.GetAccountNumber() -// accSeqOwner := resNodeOwnerAcc2.GetSequence() -// -// resNodeAcc2 := mApp.accountKeeper.GetAccount(ctx, resNodeAddr2) -// accNumNode := resNodeAcc2.GetAccountNumber() -// accSeqNode := resNodeAcc2.GetSequence() -// -// mock.SignCheckDeliver(t, mApp.Cdc, mApp.BaseApp, header, []sdk.Msg{registerResNodeMsg}, []uint64{accNumOwner, accNumNode}, []uint64{accSeqOwner, accSeqNode}, true, true, resOwnerPrivKey2) -// -// /*-------------------- commit & check result --------------------*/ -// header = abci.Header{Height: mApp.LastBlockHeight() + 1} -// ctx = mApp.BaseApp.NewContext(true, header) -// -// resBondedToken = k.GetResourceNodeBondedToken(ctx) -// require.EqualValues(t, resBondedToken, sdk.NewCoin(k.BondDenom(ctx), resNodeInitStake.Add(resNodeInitStake).Add(resNodeInitStake))) -// resNotBondedToken = k.GetResourceNodeNotBondedToken(ctx) -// require.EqualValues(t, resNotBondedToken, sdk.NewCoin(k.BondDenom(ctx), sdk.ZeroInt())) -// idxBondedToken = k.GetIndexingNodeBondedToken(ctx) -// require.EqualValues(t, idxBondedToken, sdk.NewCoin(k.BondDenom(ctx), idxNodeInitStake)) -// idxNotBondedToken = k.GetIndexingNodeNotBondedToken(ctx) -// require.EqualValues(t, idxNotBondedToken, sdk.NewCoin(k.BondDenom(ctx), idxNodeInitStake)) -// -// /********************* send register indexing node msg *********************/ -// header = abci.Header{Height: mApp.LastBlockHeight() + 1} -// ctx = mApp.BaseApp.NewContext(true, header) -// registerIdxNodeMsg := types.NewMsgCreateIndexingNode(idxNodeNetworkId3, idxNodePubKey3, sdk.NewCoin(k.BondDenom(ctx), idxNodeInitStake), idxOwnerAddr3, NewDescription("sds://indexingNode3", "", "", "", "")) -// idxOwnerAcc3 := mApp.accountKeeper.GetAccount(ctx, idxOwnerAddr3) -// accNumOwner = idxOwnerAcc3.GetAccountNumber() -// accSeqOwner = idxOwnerAcc3.GetSequence() -// -// idxNodeAcc3 := mApp.accountKeeper.GetAccount(ctx, idxNodeAddr3) -// accNumNode = idxNodeAcc3.GetAccountNumber() -// accSeqNode = idxNodeAcc3.GetSequence() -// -// mock.SignCheckDeliver(t, mApp.Cdc, mApp.BaseApp, header, []sdk.Msg{registerIdxNodeMsg}, []uint64{accNumOwner, accNumNode}, []uint64{accSeqOwner, accSeqNode}, true, true, idxOwnerPrivKey3) -// -// /*-------------------- commit & check result, stake should be stored in the not bonded pool --------------------*/ -// header = abci.Header{Height: mApp.LastBlockHeight() + 1} -// ctx = mApp.BaseApp.NewContext(true, header) -// -// resBondedToken = k.GetResourceNodeBondedToken(ctx) -// require.EqualValues(t, resBondedToken, sdk.NewCoin(k.BondDenom(ctx), resNodeInitStake.Add(resNodeInitStake).Add(resNodeInitStake))) -// resNotBondedToken = k.GetResourceNodeNotBondedToken(ctx) -// require.EqualValues(t, resNotBondedToken, sdk.NewCoin(k.BondDenom(ctx), sdk.ZeroInt())) -// idxBondedToken = k.GetIndexingNodeBondedToken(ctx) -// require.EqualValues(t, idxBondedToken, sdk.NewCoin(k.BondDenom(ctx), idxNodeInitStake)) -// idxNotBondedToken = k.GetIndexingNodeNotBondedToken(ctx) -// require.EqualValues(t, idxNotBondedToken, sdk.NewCoin(k.BondDenom(ctx), idxNodeInitStake.Add(idxNodeInitStake))) -// -// /********************* deliver tx to vote *********************/ -// header = abci.Header{Height: mApp.LastBlockHeight() + 1} -// ctx = mApp.BaseApp.NewContext(true, header) -// voteMsg := types.NewMsgIndexingNodeRegistrationVote(idxNodeNetworkId3, idxOwnerAddr3, types.Approve, idxNodeNetworkId1, idxOwnerAddr1) -// idxOwnerAcc1 := mApp.accountKeeper.GetAccount(ctx, idxOwnerAddr1) -// accNumOwner = idxOwnerAcc1.GetAccountNumber() -// accSeqOwner = idxOwnerAcc1.GetSequence() -// -// mock.SignCheckDeliver(t, mApp.Cdc, mApp.BaseApp, header, []sdk.Msg{voteMsg}, []uint64{accNumOwner}, []uint64{accSeqOwner}, true, true, idxOwnerPrivKey1) -// -// /*-------------------- commit & check result, stake should be transferred to the bonded pool --------------------*/ -// header = abci.Header{Height: mApp.LastBlockHeight() + 1} -// ctx = mApp.BaseApp.NewContext(true, header) -// -// resBondedToken = k.GetResourceNodeBondedToken(ctx) -// require.EqualValues(t, resBondedToken, sdk.NewCoin(k.BondDenom(ctx), resNodeInitStake.Add(resNodeInitStake).Add(resNodeInitStake))) -// resNotBondedToken = k.GetResourceNodeNotBondedToken(ctx) -// require.EqualValues(t, resNotBondedToken, sdk.NewCoin(k.BondDenom(ctx), sdk.ZeroInt())) -// idxBondedToken = k.GetIndexingNodeBondedToken(ctx) -// require.EqualValues(t, idxBondedToken, sdk.NewCoin(k.BondDenom(ctx), idxNodeInitStake.Add(idxNodeInitStake))) -// idxNotBondedToken = k.GetIndexingNodeNotBondedToken(ctx) -// require.EqualValues(t, idxNotBondedToken, sdk.NewCoin(k.BondDenom(ctx), idxNodeInitStake)) -// -//} -// -//func getMockApp(t *testing.T) (*mock.App, Keeper, bank.Keeper, supply.Keeper) { -// mApp := mock.NewApp() -// -// RegisterCodec(mApp.Cdc) -// bank.RegisterCodec(mApp.Cdc) -// supply.RegisterCodec(mApp.Cdc) -// staking.RegisterCodec(mApp.Cdc) -// -// keySupply := sdk.NewKVStoreKey(supply.StoreKey) -// keyStaking := sdk.NewKVStoreKey(staking.StoreKey) -// keyRegister := sdk.NewKVStoreKey(StoreKey) -// -// feeCollector := supply.NewEmptyModuleAccount(auth.FeeCollectorName) -// notBondedPool := supply.NewEmptyModuleAccount(staking.NotBondedPoolName, supply.Burner, supply.Staking) -// bondPool := supply.NewEmptyModuleAccount(staking.BondedPoolName, supply.Burner, supply.Staking) -// -// blacklistedAddrs := make(map[string]bool) -// blacklistedAddrs[feeCollector.GetAddress().String()] = true -// blacklistedAddrs[notBondedPool.GetAddress().String()] = true -// blacklistedAddrs[bondPool.GetAddress().String()] = true -// -// bankKeeper := bank.NewBaseKeeper(mApp.accountKeeper, mApp.ParamsKeeper.Subspace(bank.DefaultParamspace), blacklistedAddrs) -// maccPerms := map[string][]string{ -// auth.FeeCollectorName: {"fee_collector"}, -// staking.NotBondedPoolName: {supply.Burner, supply.Staking}, -// staking.BondedPoolName: {supply.Burner, supply.Staking}, -// } -// supplyKeeper := supply.NewKeeper(mApp.Cdc, keySupply, mApp.accountKeeper, bankKeeper, maccPerms) -// stakingKeeper := staking.NewKeeper(mApp.Cdc, keyStaking, supplyKeeper, mApp.ParamsKeeper.Subspace(staking.DefaultParamspace)) -// keeper := NewKeeper(mApp.Cdc, keyRegister, mApp.ParamsKeeper.Subspace(DefaultParamSpace), mApp.accountKeeper, bankKeeper) -// -// anteHandler := ante.NewAnteHandler(mApp.accountKeeper, supplyKeeper, helpers.StSigVerificationGasConsumer) -// mApp.SetAnteHandler(anteHandler) -// -// mApp.Router().AddRoute(bank.RouterKey, bank.NewHandler(bankKeeper)) -// mApp.Router().AddRoute(staking.RouterKey, staking.NewHandler(stakingKeeper)) -// mApp.Router().AddRoute(RouterKey, NewHandler(keeper)) -// mApp.SetEndBlocker(getEndBlocker(keeper)) -// mApp.SetInitChainer(getInitChainer(mApp, keeper, mApp.accountKeeper, supplyKeeper, -// []supplyexported.ModuleAccountI{feeCollector, notBondedPool, bondPool}, stakingKeeper, bankKeeper)) -// -// err := mApp.CompleteSetup(keyStaking, keySupply, keyRegister) -// require.NoError(t, err) -// -// return mApp, keeper, bankKeeper, supplyKeeper -//} -// -//// getInitChainer initializes the chainer of the mock app and sets the genesis -//// state. It returns an empty ResponseInitChain. -//func getInitChainer(mapp *mock.App, keeper Keeper, accountKeeper auth.accountKeeper, supplyKeeper supply.Keeper, -// blacklistedAddrs []supplyexported.ModuleAccountI, stakingKeeper staking.Keeper, bankKeeper bank.Keeper) sdk.InitChainer { -// return func(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain { -// // set module accounts -// for _, macc := range blacklistedAddrs { -// supplyKeeper.SetModuleAccount(ctx, macc) -// } -// mapp.InitChainer(ctx, req) -// -// // set module accounts -// for _, macc := range blacklistedAddrs { -// supplyKeeper.SetModuleAccount(ctx, macc) -// } -// stakingGenesis := staking.NewGenesisState(staking.NewParams(staking.DefaultUnbondingTime, staking.DefaultMaxValidators, staking.DefaultMaxEntries, 0, "wei"), nil, nil) -// totalSupply := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(100000000000000))) -// supplyKeeper.SetSupply(ctx, supply.NewSupply(totalSupply)) -// -// // set module accounts -// for _, macc := range blacklistedAddrs { -// supplyKeeper.SetModuleAccount(ctx, macc) -// } -// validators := staking.InitGenesis(ctx, stakingKeeper, accountKeeper, supplyKeeper, stakingGenesis) -// bankGenesis := bank.NewGenesisState(true) -// bank.InitGenesis(ctx, bankKeeper, bankGenesis) -// -// resourceNodes := setupAllResourceNodes() -// indexingNodes := setupAllIndexingNodes() -// -// registerGenesis := NewGenesisState( -// DefaultParams(), -// resourceNodes, -// indexingNodes, -// initialNOzonePrice, -// sdk.ZeroInt(), -// make([]Slashing, 0), -// ) -// -// InitGenesis(ctx, keeper, registerGenesis) -// -// return abci.ResponseInitChain{ -// Validators: validators, -// } -// } -// -//} -// -//// getEndBlocker returns a staking endblocker. -//func getEndBlocker(keeper Keeper) sdk.EndBlocker { -// //return func(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock { -// // validatorUpdates := keeper.stakingKeeper.BlockValidatorUpdates(ctx) -// // -// // return abci.ResponseEndBlock{ -// // ValidatorUpdates: validatorUpdates, -// // } -// //} -// return nil -//} diff --git a/x/register/client/cli/flags.go b/x/register/client/cli/flags.go index bf695018..76b0d47e 100644 --- a/x/register/client/cli/flags.go +++ b/x/register/client/cli/flags.go @@ -5,11 +5,11 @@ import ( ) const ( - FlagPubKey = "pubkey" - FlagAmount = "amount" - FlagStakeDelta = "stake-delta" - FlagIncrStake = "incr-stake" - FlagNodeType = "node-type" + FlagPubKey = "pubkey" + FlagAmount = "amount" + FlagDepositDelta = "deposit-delta" + FlagIncrDeposit = "incr-deposit" + FlagNodeType = "node-type" FlagMoniker = "moniker" FlagIdentity = "identity" @@ -64,11 +64,11 @@ func flagSetNodeType() *flag.FlagSet { return fs } -func flagSetStakeUpdate() *flag.FlagSet { +func flagSetDepositUpdate() *flag.FlagSet { fs := flag.NewFlagSet("", flag.ContinueOnError) - fs.String(FlagStakeDelta, "", "Stake change of coins to be made (always positive like 100000wei)") - fs.String(FlagIncrStake, "", "Boolean indicator of increase/decrease of stake delta, true for increase and false for decrease") + fs.String(FlagDepositDelta, "", "Deposit change of coins to be made (always positive like 100000wei)") + fs.String(FlagIncrDeposit, "", "Boolean indicator of increase/decrease of deposit delta, true for increase and false for decrease") return fs } diff --git a/x/register/client/cli/query.go b/x/register/client/cli/query.go index 8bed7dfc..fb2f4c81 100644 --- a/x/register/client/cli/query.go +++ b/x/register/client/cli/query.go @@ -224,112 +224,5 @@ $ %s query register get-meta-node --network-address=stsds1faej5w4q6hgnt0ft598dlm _ = cmd.MarkFlagRequired(FlagNetworkAddress) flags.AddQueryFlagsToCmd(cmd) - //cmd.Flags().String(FlagNetworkAddress, "", "(optional) The network address of the node") return cmd } - -// -//// GetResNodesByNetworkAddr queries all resource nodes by multiple network IDs (sep: ";") -//func GetResNodesByNetworkAddr(cliCtx context.CLIContext, queryRoute string) (res string, err error) { -// queryFlagNetworkAddr := viper.GetString(FlagNetworkAddress) -// queryByFlagNetworkAddrList := strings.Split(queryFlagNetworkAddr, ";") -// for _, v := range queryByFlagNetworkAddrList { -// resp, _, err := QueryResourceNode(cliCtx, queryRoute, v) -// if err != nil { -// return "null", err -// } -// res += string(resp) + ";" -// } -// return res[:len(res)-1], nil -//} -// -//// QueryResourceNode queries resource node by network addr -//func QueryResourceNode(cliCtx context.CLIContext, queryRoute, networkAddr string) ([]byte, int64, error) { -// route := fmt.Sprintf("custom/%s/%s", queryRoute, keeper.QueryResourceNodeByNetworkAddr) -// sdsAddress, err := stratos.SdsAddressFromBech32(networkAddr) -// if err != nil { -// return []byte{}, 0, sdkerrors.Wrap(types.ErrInvalidNetworkAddr, "Missing network address") -// } -// -// params := types.NewQueryNodesParams(1, 1, sdsAddress, "", nil) -// bz, err := cliCtx.Codec.MarshalJSON(params) -// if err != nil { -// return []byte{}, 0, sdkerrors.Wrap(types.ErrInvalidNetworkAddr, "Missing network address") -// } -// return cliCtx.QueryWithData(route, bz) -//} -// -//// GetCmdQueryMetaNodeList implements the query all meta nodes by network id command. -//func GetCmdQueryMetaNodeList(queryRoute string, cdc *codec.Codec) *cobra.Command { -// cmd := &cobra.Command{ -// Use: "get-meta-nodes [flags]", // []byte -// Short: "Query all meta nodes", -// Long: strings.TrimSpace( -// fmt.Sprintf(`Query all meta nodes`), -// ), -// RunE: func(cmd *cobra.Command, args []string) error { -// inBuf := bufio.NewReader(cmd.InOrStdin()) -// cliCtx := context.NewCLIContextWithInput(inBuf).WithCodec(cdc) -// -// // query all meta nodes by network address -// queryFlagNetworkAddr := viper.GetString(FlagNetworkAddress) -// if queryFlagNetworkAddr == "" { -// return sdkerrors.Wrap(types.ErrInvalidNetworkAddr, "Missing network address") -// } -// resp, err := GetIndNodesByNetworkAddr(cliCtx, queryRoute) -// if err != nil { -// return err -// } -// return cliCtx.PrintOutput(resp) -// -// }, -// } -// cmd.Flags().String(FlagNetworkAddress, "", "(optional) The network address of the node") -// -// return cmd -//} -// -//// GetIndNodesByNetworkAddr queries all meta nodes by multiple network addrs (sep: ";") -//func GetIndNodesByNetworkAddr(cliCtx context.CLIContext, queryRoute string) (res string, err error) { -// queryFlagNetworkAddr := viper.GetString(FlagNetworkAddress) -// queryByFlagNetworkAddrList := strings.Split(queryFlagNetworkAddr, ";") -// for _, v := range queryByFlagNetworkAddrList { -// resp, _, err := QueryMetaNodes(cliCtx, queryRoute, v) -// if err != nil { -// return "null", err -// } -// res += string(resp) + ";" -// } -// return res[:len(res)-1], nil -//} -// -//// QueryMetaNodes queries all meta nodes -//func QueryMetaNodes(cliCtx context.CLIContext, queryRoute, networkAddr string) ([]byte, int64, error) { -// route := fmt.Sprintf("custom/%s/%s", queryRoute, keeper.QueryMetaNodeByNetworkAddr) -// sdsAddress, err := stratos.SdsAddressFromBech32(networkAddr) -// if err != nil { -// return []byte{}, 0, sdkerrors.Wrap(types.ErrInvalidNetworkAddr, "Missing network address") -// } -// -// params := types.NewQueryNodesParams(1, 1, sdsAddress, "", nil) -// bz, err := cliCtx.Codec.MarshalJSON(params) -// if err != nil { -// return []byte{}, 0, sdkerrors.Wrap(types.ErrInvalidNetworkAddr, "Missing network address") -// } -// return cliCtx.QueryWithData(route, bz) -//} -// -//// Route returns the message routing key for the staking module. -//func (am AppModule) Route() sdk.Route { -// return sdk.NewRoute(types.RouterKey, NewHandler(am.keeper)) -//} -// -//// QuerierRoute returns the staking module's querier route name. -//func (AppModule) QuerierRoute() string { -// return types.QuerierRoute -//} -// -//// LegacyQuerierHandler returns the staking module sdk.Querier. -//func (am AppModule) LegacyQuerierHandler(legacyQuerierCdc *codec.LegacyAmino) sdk.Querier { -// return keeper.NewQuerier(am.keeper, legacyQuerierCdc) -//} diff --git a/x/register/client/cli/tx.go b/x/register/client/cli/tx.go index 67d4b756..011a42ba 100644 --- a/x/register/client/cli/tx.go +++ b/x/register/client/cli/tx.go @@ -27,12 +27,12 @@ func NewTxCmd() *cobra.Command { CreateResourceNodeCmd(), RemoveResourceNodeCmd(), UpdateResourceNodeCmd(), - UpdateResourceNodeStakeCmd(), + UpdateResourceNodeDepositCmd(), CreateMetaNodeCmd(), RemoveMetaNodeCmd(), UpdateMetaNodeCmd(), - UpdateMetaNodeStakeCmd(), + UpdateMetaNodeDepositCmd(), MetaNodeRegistrationVoteCmd(), ) @@ -245,11 +245,11 @@ func UpdateMetaNodeCmd() *cobra.Command { return cmd } -// UpdateResourceNodeStakeCmd will add/subtract resource node's stake. -func UpdateResourceNodeStakeCmd() *cobra.Command { +// UpdateResourceNodeDepositCmd will add/subtract resource node's deposit. +func UpdateResourceNodeDepositCmd() *cobra.Command { cmd := &cobra.Command{ - Use: "update-resource-node-stake [flags]", - Short: "update resource node's stake", + Use: "update-resource-node-deposit [flags]", + Short: "update resource node's deposit", RunE: func(cmd *cobra.Command, args []string) error { clientCtx, err := client.GetClientTxContext(cmd) if err != nil { @@ -258,7 +258,7 @@ func UpdateResourceNodeStakeCmd() *cobra.Command { txf := tx.NewFactoryCLI(clientCtx, cmd.Flags()). WithTxConfig(clientCtx.TxConfig).WithAccountRetriever(clientCtx.AccountRetriever) - txf, msg, err := newBuildUpdateResourceNodeStakeMsg(clientCtx, txf, cmd.Flags()) + txf, msg, err := newBuildUpdateResourceNodeDepositMsg(clientCtx, txf, cmd.Flags()) if err != nil { return err } @@ -268,21 +268,21 @@ func UpdateResourceNodeStakeCmd() *cobra.Command { } cmd.Flags().AddFlagSet(flagSetNetworkAddress()) - cmd.Flags().AddFlagSet(flagSetStakeUpdate()) + cmd.Flags().AddFlagSet(flagSetDepositUpdate()) flags.AddTxFlagsToCmd(cmd) _ = cmd.MarkFlagRequired(flags.FlagFrom) - _ = cmd.MarkFlagRequired(FlagStakeDelta) + _ = cmd.MarkFlagRequired(FlagDepositDelta) _ = cmd.MarkFlagRequired(FlagNetworkAddress) return cmd } -// UpdateMetaNodeStakeCmd will add/subtract meta node's stake. -func UpdateMetaNodeStakeCmd() *cobra.Command { +// UpdateMetaNodeDepositCmd will add/subtract meta node's deposit. +func UpdateMetaNodeDepositCmd() *cobra.Command { cmd := &cobra.Command{ - Use: "update-meta-node-stake [flags]", - Short: "update meta node's stake", + Use: "update-meta-node-deposit [flags]", + Short: "update meta node's deposit", RunE: func(cmd *cobra.Command, args []string) error { clientCtx, err := client.GetClientTxContext(cmd) if err != nil { @@ -291,7 +291,7 @@ func UpdateMetaNodeStakeCmd() *cobra.Command { txf := tx.NewFactoryCLI(clientCtx, cmd.Flags()). WithTxConfig(clientCtx.TxConfig).WithAccountRetriever(clientCtx.AccountRetriever) - txf, msg, err := newBuildUpdateMetaNodeStakeMsg(clientCtx, txf, cmd.Flags()) + txf, msg, err := newBuildUpdateMetaNodeDepositMsg(clientCtx, txf, cmd.Flags()) if err != nil { return err } @@ -301,13 +301,13 @@ func UpdateMetaNodeStakeCmd() *cobra.Command { } cmd.Flags().AddFlagSet(flagSetNetworkAddress()) - cmd.Flags().AddFlagSet(flagSetStakeUpdate()) + cmd.Flags().AddFlagSet(flagSetDepositUpdate()) flags.AddTxFlagsToCmd(cmd) _ = cmd.MarkFlagRequired(flags.FlagFrom) - _ = cmd.MarkFlagRequired(FlagStakeDelta) - _ = cmd.MarkFlagRequired(FlagIncrStake) + _ = cmd.MarkFlagRequired(FlagDepositDelta) + _ = cmd.MarkFlagRequired(FlagIncrDeposit) _ = cmd.MarkFlagRequired(FlagNetworkAddress) return cmd } @@ -529,13 +529,15 @@ func newBuildUpdateMetaNodeMsg(clientCtx client.Context, txf tx.Factory, fs *fla return txf, msg, nil } -// newBuildUpdateResourceNodeStakeMsg makes a new UpdateResourceNodeStakeMsg. -func newBuildUpdateResourceNodeStakeMsg(clientCtx client.Context, txf tx.Factory, fs *flag.FlagSet) (tx.Factory, *types.MsgUpdateResourceNodeStake, error) { - stakeDeltaStr, err := fs.GetString(FlagStakeDelta) +// newBuildUpdateResourceNodeDepositMsg makes a new MsgUpdateResourceNodeDeposit. +func newBuildUpdateResourceNodeDepositMsg(clientCtx client.Context, txf tx.Factory, fs *flag.FlagSet) ( + tx.Factory, *types.MsgUpdateResourceNodeDeposit, error) { + + depositDeltaStr, err := fs.GetString(FlagDepositDelta) if err != nil { return txf, nil, err } - stakeDelta, err := sdk.ParseCoinNormalized(stakeDeltaStr) + depositDelta, err := sdk.ParseCoinNormalized(depositDeltaStr) if err != nil { return txf, nil, err } @@ -548,26 +550,26 @@ func newBuildUpdateResourceNodeStakeMsg(clientCtx client.Context, txf tx.Factory ownerAddr := clientCtx.GetFromAddress() - msg := types.NewMsgUpdateResourceNodeStake(networkAddr, ownerAddr, stakeDelta) + msg := types.NewMsgUpdateResourceNodeDeposit(networkAddr, ownerAddr, depositDelta) return txf, msg, nil } -// newBuildUpdateMetaNodeStakeMsg makes a new UpdateMetaNodeStakeMsg. -func newBuildUpdateMetaNodeStakeMsg(clientCtx client.Context, txf tx.Factory, fs *flag.FlagSet) (tx.Factory, *types.MsgUpdateMetaNodeStake, error) { - stakeDeltaStr, err := fs.GetString(FlagStakeDelta) +// newBuildUpdateMetaNodeDepositMsg makes a new MsgUpdateMetaNodeDeposit. +func newBuildUpdateMetaNodeDepositMsg(clientCtx client.Context, txf tx.Factory, fs *flag.FlagSet) (tx.Factory, *types.MsgUpdateMetaNodeDeposit, error) { + depositDeltaStr, err := fs.GetString(FlagDepositDelta) if err != nil { return txf, nil, err } - stakeDelta, err := sdk.ParseCoinNormalized(stakeDeltaStr) + depositDelta, err := sdk.ParseCoinNormalized(depositDeltaStr) if err != nil { return txf, nil, err } - incrStakeStr, err := fs.GetString(FlagIncrStake) + incrDepositStr, err := fs.GetString(FlagIncrDeposit) if err != nil { return txf, nil, err } - incrStake, err := strconv.ParseBool(incrStakeStr) + incrDeposit, err := strconv.ParseBool(incrDepositStr) if err != nil { return txf, nil, err } @@ -580,7 +582,7 @@ func newBuildUpdateMetaNodeStakeMsg(clientCtx client.Context, txf tx.Factory, fs ownerAddr := clientCtx.GetFromAddress() - msg := types.NewMsgUpdateMetaNodeStake(networkAddr, ownerAddr, stakeDelta, incrStake) + msg := types.NewMsgUpdateMetaNodeDeposit(networkAddr, ownerAddr, depositDelta, incrDeposit) return txf, msg, nil } diff --git a/x/register/client/rest/query.go b/x/register/client/rest/query.go index b214a1b8..25e8e1b4 100644 --- a/x/register/client/rest/query.go +++ b/x/register/client/rest/query.go @@ -5,11 +5,13 @@ import ( "net/http" "strconv" + "github.com/gorilla/mux" + "github.com/cosmos/cosmos-sdk/client" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/query" "github.com/cosmos/cosmos-sdk/types/rest" - "github.com/gorilla/mux" + stratos "github.com/stratosnet/stratos-chain/types" "github.com/stratosnet/stratos-chain/x/register/keeper" "github.com/stratosnet/stratos-chain/x/register/types" @@ -18,9 +20,9 @@ import ( func registerQueryRoutes(clientCtx client.Context, r *mux.Router) { r.HandleFunc("/register/resource-node/{nodeAddress}", nodesWithParamsFn(clientCtx, keeper.QueryResourceNodeByNetworkAddr)).Methods("GET") r.HandleFunc("/register/meta-node/{nodeAddress}", nodesWithParamsFn(clientCtx, keeper.QueryMetaNodeByNetworkAddr)).Methods("GET") - r.HandleFunc("/register/staking", nodeStakingHandlerFn(clientCtx, keeper.QueryNodesTotalStakes)).Methods("GET") - r.HandleFunc("/register/staking/address/{nodeAddress}", nodeStakingByNodeAddressFn(clientCtx, keeper.QueryNodeStakeByNodeAddr)).Methods("GET") - r.HandleFunc("/register/staking/owner/{ownerAddress}", nodeStakingByOwnerFn(clientCtx, keeper.QueryNodeStakeByOwner)).Methods("GET") + r.HandleFunc("/register/deposit", nodeDepositHandlerFn(clientCtx, keeper.QueryNodesDepositTotal)).Methods("GET") + r.HandleFunc("/register/deposit/address/{nodeAddress}", nodeDepositByNodeAddressFn(clientCtx, keeper.QueryNodeDepositByNodeAddr)).Methods("GET") + r.HandleFunc("/register/deposit/owner/{ownerAddress}", nodeDepositByOwnerFn(clientCtx, keeper.QueryNodeDepositByOwner)).Methods("GET") r.HandleFunc("/register/params", registerParamsHandlerFn(clientCtx, keeper.QueryRegisterParams)).Methods("GET") r.HandleFunc("/register/resource-count", resourceNodesCountFn(clientCtx, keeper.QueryResourceNodesCount)).Methods("GET") r.HandleFunc("/register/meta-count", metaNodesCountFn(clientCtx, keeper.QueryMetaNodesCount)).Methods("GET") @@ -145,8 +147,8 @@ func nodesWithParamsFn(clientCtx client.Context, queryPath string) http.HandlerF } } -// GET request handler to query nodes total staking info -func nodeStakingHandlerFn(clientCtx client.Context, queryPath string) http.HandlerFunc { +// GET request handler to query nodes total deposit info +func nodeDepositHandlerFn(clientCtx client.Context, queryPath string) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { cliCtx, ok := rest.ParseQueryHeightOrReturnBadRequest(w, clientCtx, r) @@ -165,8 +167,8 @@ func nodeStakingHandlerFn(clientCtx client.Context, queryPath string) http.Handl } } -// GET request handler to query node staking info -func nodeStakingByNodeAddressFn(cliCtx client.Context, queryPath string) http.HandlerFunc { +// GET request handler to query node deposit info +func nodeDepositByNodeAddressFn(cliCtx client.Context, queryPath string) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { NodeAddrStr := mux.Vars(r)["nodeAddress"] @@ -194,7 +196,7 @@ func nodeStakingByNodeAddressFn(cliCtx client.Context, queryPath string) http.Ha queryType = 0 } - params := types.NewQueryNodeStakingParams(nodeAddress, queryType) + params := types.NewQueryNodeDepositParams(nodeAddress, queryType) bz, err := cliCtx.LegacyAmino.MarshalJSON(params) if rest.CheckBadRequestError(w, err) { return @@ -214,8 +216,8 @@ func nodeStakingByNodeAddressFn(cliCtx client.Context, queryPath string) http.Ha } } -// GET request handler to query nodes staking info by Node wallet address -func nodeStakingByOwnerFn(cliCtx client.Context, queryPath string) http.HandlerFunc { +// GET request handler to query nodes deposit info by Node wallet address +func nodeDepositByOwnerFn(cliCtx client.Context, queryPath string) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { ownerAddressStr := mux.Vars(r)["ownerAddress"] diff --git a/x/register/client/rest/tx.go b/x/register/client/rest/tx.go index e5e9c119..7b545686 100644 --- a/x/register/client/rest/tx.go +++ b/x/register/client/rest/tx.go @@ -28,12 +28,12 @@ func registerTxHandlers(cliCtx client.Context, r *mux.Router) { postUpdateResourceNodeHandlerFn(cliCtx), ).Methods("POST") r.HandleFunc( - "/register/updateResourceNodeStake", - postUpdateResourceNodeStakeHandlerFn(cliCtx), + "/register/updateResourceNodeDeposit", + postUpdateResourceNodeDepositHandlerFn(cliCtx), ).Methods("POST") r.HandleFunc( - "/register/updateEffectiveStake", - postUpdateEffectiveStakeHandlerFn(cliCtx), + "/register/updateEffectiveDeposit", + postUpdateEffectiveDepositHandlerFn(cliCtx), ).Methods("POST") r.HandleFunc( @@ -49,8 +49,8 @@ func registerTxHandlers(cliCtx client.Context, r *mux.Router) { postUpdateMetaNodeHandlerFn(cliCtx), ).Methods("POST") r.HandleFunc( - "/register/updateMetaNodeStake", - postUpdateMetaNodeStakeHandlerFn(cliCtx), + "/register/updateMetaNodeDeposit", + postUpdateMetaNodeDepositHandlerFn(cliCtx), ).Methods("POST") r.HandleFunc( "/register/metaNodeRegVote", @@ -80,13 +80,13 @@ type ( NetworkAddress string `json:"network_address" yaml:"network_address"` } - UpdateResourceNodeStakeRequest struct { + UpdateResourceNodeDepositRequest struct { BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"` NetworkAddress string `json:"network_address" yaml:"network_address"` - StakeDelta sdk.Coin `json:"stake_delta" yaml:"stake_delta"` + DepositDelta sdk.Coin `json:"deposit_delta" yaml:"deposit_delta"` } - UpdateEffectiveStakeRequest struct { + UpdateEffectiveDepositRequest struct { BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"` Reporters []stratos.SdsAddress `json:"reporters" yaml:"reporters"` // reporter(sp node) p2p address ReporterOwner []sdk.AccAddress `json:"reporter_owner" yaml:"reporter_owner"` // report(sp node) wallet address @@ -115,11 +115,11 @@ type ( NetworkAddress string `json:"network_address" yaml:"network_address"` } - UpdateMetaNodeStakeRequest struct { + UpdateMetaNodeDepositRequest struct { BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"` NetworkAddress string `json:"network_address" yaml:"network_address"` - StakeDelta sdk.Coin `json:"stake_delta" yaml:"stake_delta"` - IncrStake string `json:"incr_stake" yaml:"incr_stake"` + DepositDelta sdk.Coin `json:"deposit_delta" yaml:"deposit_delta"` + IncrDeposit string `json:"incr_deposit" yaml:"incr_deposit"` } MetaNodeRegVoteRequest struct { @@ -328,9 +328,9 @@ func postUpdateResourceNodeHandlerFn(cliCtx client.Context) http.HandlerFunc { } } -func postUpdateResourceNodeStakeHandlerFn(cliCtx client.Context) http.HandlerFunc { +func postUpdateResourceNodeDepositHandlerFn(cliCtx client.Context) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { - var req UpdateResourceNodeStakeRequest + var req UpdateResourceNodeDepositRequest if !rest.ReadRESTReq(w, r, cliCtx.LegacyAmino, &req) { return @@ -353,7 +353,7 @@ func postUpdateResourceNodeStakeHandlerFn(cliCtx client.Context) http.HandlerFun return } - msg := types.NewMsgUpdateResourceNodeStake(networkAddr, ownerAddr, req.StakeDelta) + msg := types.NewMsgUpdateResourceNodeDeposit(networkAddr, ownerAddr, req.DepositDelta) if err := msg.ValidateBasic(); err != nil { rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) return @@ -363,9 +363,9 @@ func postUpdateResourceNodeStakeHandlerFn(cliCtx client.Context) http.HandlerFun } } -func postUpdateEffectiveStakeHandlerFn(cliCtx client.Context) http.HandlerFunc { +func postUpdateEffectiveDepositHandlerFn(cliCtx client.Context) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { - var req UpdateEffectiveStakeRequest + var req UpdateEffectiveDepositRequest if !rest.ReadRESTReq(w, r, cliCtx.LegacyAmino, &req) { return @@ -382,7 +382,7 @@ func postUpdateEffectiveStakeHandlerFn(cliCtx client.Context) http.HandlerFunc { return } - msg := types.NewMsgUpdateEffectiveStake(req.Reporters, req.ReporterOwner, networkAddr, req.EffectiveTokens) + msg := types.NewMsgUpdateEffectiveDeposit(req.Reporters, req.ReporterOwner, networkAddr, req.EffectiveTokens) if err := msg.ValidateBasic(); err != nil { rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) return @@ -427,9 +427,9 @@ func postUpdateMetaNodeHandlerFn(cliCtx client.Context) http.HandlerFunc { } } -func postUpdateMetaNodeStakeHandlerFn(cliCtx client.Context) http.HandlerFunc { +func postUpdateMetaNodeDepositHandlerFn(cliCtx client.Context) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { - var req UpdateMetaNodeStakeRequest + var req UpdateMetaNodeDepositRequest if !rest.ReadRESTReq(w, r, cliCtx.LegacyAmino, &req) { return @@ -452,12 +452,12 @@ func postUpdateMetaNodeStakeHandlerFn(cliCtx client.Context) http.HandlerFunc { return } - incrStake, err := strconv.ParseBool(req.IncrStake) + incrDeposit, err := strconv.ParseBool(req.IncrDeposit) if err != nil { rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) return } - msg := types.NewMsgUpdateMetaNodeStake(networkAddr, ownerAddr, req.StakeDelta, incrStake) + msg := types.NewMsgUpdateMetaNodeDeposit(networkAddr, ownerAddr, req.DepositDelta, incrDeposit) if err := msg.ValidateBasic(); err != nil { rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) return diff --git a/x/register/exported/exported.go b/x/register/exported/exported.go index d8d2809e..5f9802c2 100644 --- a/x/register/exported/exported.go +++ b/x/register/exported/exported.go @@ -14,7 +14,7 @@ type ResourceNodeI interface { GetStatus() stakingtypes.BondStatus // status of the node GetPubKey() cryptotypes.PubKey // pubkey of the node GetNetworkAddr() stratos.SdsAddress // network address of the node - GetTokens() sdk.Int // staking tokens of the node + GetTokens() sdk.Int // deposit tokens of the node GetOwnerAddr() sdk.AccAddress // owner address of the node GetNodeType() string // node type } @@ -26,6 +26,6 @@ type MetaNodeI interface { GetStatus() stakingtypes.BondStatus // status of the node GetPubKey() cryptotypes.PubKey // pubkey of the node GetNetworkAddr() stratos.SdsAddress // network address of the node - GetTokens() sdk.Int // staking tokens of the node + GetTokens() sdk.Int // deposit tokens of the node GetOwnerAddr() sdk.AccAddress // owner address of the node } diff --git a/x/register/genesis.go b/x/register/genesis.go index 16fa6dca..9df50981 100644 --- a/x/register/genesis.go +++ b/x/register/genesis.go @@ -18,7 +18,7 @@ func InitGenesis(ctx sdk.Context, keeper keeper.Keeper, data *types.GenesisState keeper.GetMetaNodeNotBondedToken(ctx).IsZero() && keeper.GetMetaNodeBondedToken(ctx).IsZero() - initialStakeTotal := sdk.ZeroInt() + initialDepositTotal := sdk.ZeroInt() lenOfGenesisBondedResourceNode := int64(0) for _, resourceNode := range data.GetResourceNodes() { @@ -30,7 +30,7 @@ func InitGenesis(ctx sdk.Context, keeper keeper.Keeper, data *types.GenesisState case stakingtypes.Bonded: lenOfGenesisBondedResourceNode++ if !resourceNode.Suspend { - initialStakeTotal = initialStakeTotal.Add(resourceNode.EffectiveTokens) + initialDepositTotal = initialDepositTotal.Add(resourceNode.EffectiveTokens) } if freshStart { amount := sdk.NewCoin(keeper.BondDenom(ctx), resourceNode.Tokens) @@ -65,7 +65,7 @@ func InitGenesis(ctx sdk.Context, keeper keeper.Keeper, data *types.GenesisState case stakingtypes.Bonded: lenOfGenesisBondedMetaNode++ if !metaNode.Suspend { - initialStakeTotal = initialStakeTotal.Add(metaNode.Tokens) + initialDepositTotal = initialDepositTotal.Add(metaNode.Tokens) } if freshStart { amount := sdk.NewCoin(keeper.BondDenom(ctx), metaNode.Tokens) @@ -91,14 +91,14 @@ func InitGenesis(ctx sdk.Context, keeper keeper.Keeper, data *types.GenesisState keeper.SetBondedMetaNodeCnt(ctx, sdk.NewInt(lenOfGenesisBondedMetaNode)) totalUnissuedPrepay := keeper.GetTotalUnissuedPrepay(ctx).Amount - keeper.SetInitialGenesisStakeTotal(ctx, initialStakeTotal) - keeper.SetEffectiveTotalStake(ctx, initialStakeTotal) - stakeNozRate := sdk.ZeroDec() - stakeNozRate = stakeNozRate.Add(data.StakeNozRate) - keeper.SetStakeNozRate(ctx, stakeNozRate) - - // calc total noz supply with EffectiveGenesisStakeTotal and stakeNozRate - totalNozSupply := initialStakeTotal.ToDec().Quo(stakeNozRate).TruncateInt() + keeper.SetInitialGenesisDepositTotal(ctx, initialDepositTotal) + keeper.SetEffectiveTotalDeposit(ctx, initialDepositTotal) + depositNozRate := sdk.ZeroDec() + depositNozRate = depositNozRate.Add(data.DepositNozRate) + keeper.SetDepositNozRate(ctx, depositNozRate) + + // calc total noz supply with EffectiveGenesisDepositTotal and depositNozRate + totalNozSupply := initialDepositTotal.ToDec().Quo(depositNozRate).TruncateInt() initOzoneLimit := sdk.ZeroInt() if freshStart && totalUnissuedPrepay.Equal(sdk.ZeroInt()) { // fresh start @@ -132,7 +132,7 @@ func ExportGenesis(ctx sdk.Context, keeper keeper.Keeper) (data *types.GenesisSt resourceNodes := keeper.GetAllResourceNodes(ctx) metaNodes := keeper.GetAllMetaNodes(ctx) remainingNozLimit := keeper.GetRemainingOzoneLimit(ctx) - stakeNozRate := keeper.GetStakeNozRate(ctx) + depositNozRate := keeper.GetDepositNozRate(ctx) var slashingInfo []types.Slashing keeper.IteratorSlashingInfo(ctx, func(walletAddress sdk.AccAddress, val sdk.Int) (stop bool) { @@ -143,5 +143,5 @@ func ExportGenesis(ctx sdk.Context, keeper keeper.Keeper) (data *types.GenesisSt return false }) - return types.NewGenesisState(params, resourceNodes, metaNodes, remainingNozLimit, slashingInfo, stakeNozRate) + return types.NewGenesisState(params, resourceNodes, metaNodes, remainingNozLimit, slashingInfo, depositNozRate) } diff --git a/x/register/handler.go b/x/register/handler.go index 95367f50..915e0fe4 100644 --- a/x/register/handler.go +++ b/x/register/handler.go @@ -25,11 +25,11 @@ func NewHandler(k keeper.Keeper) sdk.Handler { case *types.MsgUpdateResourceNode: res, err := msgServer.HandleMsgUpdateResourceNode(sdk.WrapSDKContext(ctx), msg) return sdk.WrapServiceResult(ctx, res, err) - case *types.MsgUpdateResourceNodeStake: - res, err := msgServer.HandleMsgUpdateResourceNodeStake(sdk.WrapSDKContext(ctx), msg) + case *types.MsgUpdateResourceNodeDeposit: + res, err := msgServer.HandleMsgUpdateResourceNodeDeposit(sdk.WrapSDKContext(ctx), msg) return sdk.WrapServiceResult(ctx, res, err) - case *types.MsgUpdateEffectiveStake: - res, err := msgServer.HandleMsgUpdateEffectiveStake(sdk.WrapSDKContext(ctx), msg) + case *types.MsgUpdateEffectiveDeposit: + res, err := msgServer.HandleMsgUpdateEffectiveDeposit(sdk.WrapSDKContext(ctx), msg) return sdk.WrapServiceResult(ctx, res, err) case *types.MsgCreateMetaNode: @@ -41,8 +41,8 @@ func NewHandler(k keeper.Keeper) sdk.Handler { case *types.MsgUpdateMetaNode: res, err := msgServer.HandleMsgUpdateMetaNode(sdk.WrapSDKContext(ctx), msg) return sdk.WrapServiceResult(ctx, res, err) - case *types.MsgUpdateMetaNodeStake: - res, err := msgServer.HandleMsgUpdateMetaNodeStake(sdk.WrapSDKContext(ctx), msg) + case *types.MsgUpdateMetaNodeDeposit: + res, err := msgServer.HandleMsgUpdateMetaNodeDeposit(sdk.WrapSDKContext(ctx), msg) return sdk.WrapServiceResult(ctx, res, err) case *types.MsgMetaNodeRegistrationVote: res, err := msgServer.HandleMsgMetaNodeRegistrationVote(sdk.WrapSDKContext(ctx), msg) diff --git a/x/register/keeper/grpc_query.go b/x/register/keeper/grpc_query.go index 6cd67c10..1e083967 100644 --- a/x/register/keeper/grpc_query.go +++ b/x/register/keeper/grpc_query.go @@ -88,43 +88,43 @@ func (q Querier) BondedMetaNodeCount(c context.Context, _ *types.QueryBondedMeta return &types.QueryBondedMetaNodeCountResponse{Number: uint64(number)}, nil } -func (q Querier) StakeByNode(c context.Context, req *types.QueryStakeByNodeRequest) (*types.QueryStakeByNodeResponse, error) { +func (q Querier) DepositByNode(c context.Context, req *types.QueryDepositByNodeRequest) (*types.QueryDepositByNodeResponse, error) { if req == nil { - return &types.QueryStakeByNodeResponse{}, status.Errorf(codes.InvalidArgument, "empty request") + return &types.QueryDepositByNodeResponse{}, status.Errorf(codes.InvalidArgument, "empty request") } if req.GetNetworkAddr() == "" { - return &types.QueryStakeByNodeResponse{}, status.Error(codes.InvalidArgument, "node network address cannot be empty") + return &types.QueryDepositByNodeResponse{}, status.Error(codes.InvalidArgument, "node network address cannot be empty") } ctx := sdk.UnwrapSDKContext(c) queryType := req.GetQueryType() networkAddr, err := stratos.SdsAddressFromBech32(req.GetNetworkAddr()) if err != nil { - return &types.QueryStakeByNodeResponse{}, err + return &types.QueryDepositByNodeResponse{}, err } - stakingInfo := types.StakingInfo{} + depositInfo := types.DepositInfo{} if queryType == types.QueryType_All || queryType == types.QueryType_SP { metaNode, found := q.GetMetaNode(ctx, networkAddr) if found { - // Adding meta node staking info + // Adding meta node deposit info networkAddr, _ := stratos.SdsAddressFromBech32(metaNode.GetNetworkAddress()) - unBondingStake, unBondedStake, bondedStake, err := q.getNodeStakes( + unBondingDeposit, unBondedDeposit, bondedDeposit, err := q.getNodeDeposit( ctx, metaNode.GetStatus(), networkAddr, metaNode.Tokens, ) if err != nil { - return &types.QueryStakeByNodeResponse{}, err + return &types.QueryDepositByNodeResponse{}, err } if !metaNode.Equal(types.MetaNode{}) { - stakingInfo = types.NewStakingInfoByMetaNodeAddr( + depositInfo = types.NewDepositInfoByMetaNodeAddr( metaNode, - unBondingStake, - unBondedStake, - bondedStake, + unBondingDeposit, + unBondedDeposit, + bondedDeposit, ) } } @@ -133,13 +133,13 @@ func (q Querier) StakeByNode(c context.Context, req *types.QueryStakeByNodeReque if queryType == types.QueryType_All || queryType == types.QueryType_PP { networkAddr, err := stratos.SdsAddressFromBech32(req.GetNetworkAddr()) if err != nil { - return &types.QueryStakeByNodeResponse{}, err + return &types.QueryDepositByNodeResponse{}, err } resourceNode, found := q.GetResourceNode(ctx, networkAddr) if found { - // Adding resource node staking info + // Adding resource node deposit info networkAddr, _ := stratos.SdsAddressFromBech32(resourceNode.GetNetworkAddress()) - unBondingStake, unBondedStake, bondedStake, err := q.getNodeStakes( + unBondingDeposit, unBondedDeposit, bondedDeposit, err := q.getNodeDeposit( ctx, resourceNode.GetStatus(), networkAddr, @@ -149,36 +149,36 @@ func (q Querier) StakeByNode(c context.Context, req *types.QueryStakeByNodeReque return nil, err } if !resourceNode.Equal(types.ResourceNode{}) { - stakingInfo = types.NewStakingInfoByResourceNodeAddr( + depositInfo = types.NewDepositInfoByResourceNodeAddr( resourceNode, - unBondingStake, - unBondedStake, - bondedStake, + unBondingDeposit, + unBondedDeposit, + bondedDeposit, ) } } } - return &types.QueryStakeByNodeResponse{StakingInfo: &stakingInfo}, nil + return &types.QueryDepositByNodeResponse{DepositInfo: &depositInfo}, nil } -func (q Querier) StakeByOwner(c context.Context, req *types.QueryStakeByOwnerRequest) (*types.QueryStakeByOwnerResponse, error) { +func (q Querier) DepositByOwner(c context.Context, req *types.QueryDepositByOwnerRequest) (*types.QueryDepositByOwnerResponse, error) { if req == nil { - return &types.QueryStakeByOwnerResponse{}, status.Errorf(codes.InvalidArgument, "empty request") + return &types.QueryDepositByOwnerResponse{}, status.Errorf(codes.InvalidArgument, "empty request") } if req.GetOwnerAddr() == "" { - return &types.QueryStakeByOwnerResponse{}, status.Error(codes.InvalidArgument, "owner address cannot be empty") + return &types.QueryDepositByOwnerResponse{}, status.Error(codes.InvalidArgument, "owner address cannot be empty") } ctx := sdk.UnwrapSDKContext(c) ownerAddr, er := sdk.AccAddressFromBech32(req.GetOwnerAddr()) if er != nil { - return &types.QueryStakeByOwnerResponse{}, er + return &types.QueryDepositByOwnerResponse{}, er } store := ctx.KVStore(q.storeKey) - var stakingInfoResponses []*types.StakingInfo + var depositInfoResponses []*types.DepositInfo // get resource nodes var resourceNodes types.ResourceNodes @@ -198,17 +198,17 @@ func (q Querier) StakeByOwner(c context.Context, req *types.QueryStakeByOwnerReq }) if err != nil { - return &types.QueryStakeByOwnerResponse{}, status.Error(codes.Internal, err.Error()) + return &types.QueryDepositByOwnerResponse{}, status.Error(codes.Internal, err.Error()) } - stakingInfoResponses, err = StakingInfosToStakingResourceNodes(ctx, q.Keeper, resourceNodes) + depositInfoResponses, err = GetDepositInfosByResourceNodes(ctx, q.Keeper, resourceNodes) if err != nil { return nil, status.Error(codes.Internal, err.Error()) } // Continue to get meta nodes if req.Pagination.Limit < resourceNodesPageRes.Total { - resourceNodesPageRes.Total = uint64(len(stakingInfoResponses)) - return &types.QueryStakeByOwnerResponse{StakingInfos: stakingInfoResponses, Pagination: resourceNodesPageRes}, nil + resourceNodesPageRes.Total = uint64(len(depositInfoResponses)) + return &types.QueryDepositByOwnerResponse{DepositInfos: depositInfoResponses, Pagination: resourceNodesPageRes}, nil } @@ -237,43 +237,44 @@ func (q Querier) StakeByOwner(c context.Context, req *types.QueryStakeByOwnerReq }) if err != nil { - return &types.QueryStakeByOwnerResponse{}, status.Error(codes.Internal, err.Error()) + return &types.QueryDepositByOwnerResponse{}, status.Error(codes.Internal, err.Error()) } - metaNodesStakingInfoResponses, err := StakingInfosToStakingMetaNodes(ctx, q.Keeper, metaNodes) + metaNodesDepositInfoResponses, err := GetDepositInfosByMetaNodes(ctx, q.Keeper, metaNodes) if err != nil { return nil, status.Error(codes.Internal, err.Error()) } - stakingInfoResponses = append(stakingInfoResponses, metaNodesStakingInfoResponses...) + depositInfoResponses = append(depositInfoResponses, metaNodesDepositInfoResponses...) PageRes := resourceNodesPageRes - PageRes.Total = uint64(len(stakingInfoResponses)) - return &types.QueryStakeByOwnerResponse{StakingInfos: stakingInfoResponses, Pagination: PageRes}, nil + PageRes.Total = uint64(len(depositInfoResponses)) + return &types.QueryDepositByOwnerResponse{DepositInfos: depositInfoResponses, Pagination: PageRes}, nil } -func (q Querier) StakeTotal(c context.Context, _ *types.QueryTotalStakeRequest) (*types.QueryTotalStakeResponse, error) { +func (q Querier) DepositTotal(c context.Context, _ *types.QueryDepositTotalRequest) (*types.QueryDepositTotalResponse, error) { ctx := sdk.UnwrapSDKContext(c) - totalBondedStakeOfResourceNodes := q.GetResourceNodeBondedToken(ctx).Amount - totalBondedStakeOfMetaNodes := q.GetMetaNodeBondedToken(ctx).Amount - - totalUnbondedStakeOfResourceNodes := q.GetResourceNodeNotBondedToken(ctx).Amount - totalUnbondedStakeOfMetaNodes := q.GetMetaNodeNotBondedToken(ctx).Amount - - totalStakeOfResourceNodes := totalBondedStakeOfResourceNodes.Add(totalUnbondedStakeOfResourceNodes) - totalStakeOfMetaNodes := totalBondedStakeOfMetaNodes.Add(totalUnbondedStakeOfMetaNodes) - - totalBondedStake := totalBondedStakeOfResourceNodes.Add(totalBondedStakeOfMetaNodes) - totalUnbondedStake := totalUnbondedStakeOfResourceNodes.Add(totalUnbondedStakeOfMetaNodes) - totalUnbondingStake := q.GetAllUnbondingNodesTotalBalance(ctx) - totalUnbondedStake = totalUnbondedStake.Sub(totalUnbondingStake) - res := types.NewQueryNodesStakingInfo( - totalStakeOfResourceNodes, - totalStakeOfMetaNodes, - totalBondedStake, - totalUnbondedStake, - totalUnbondingStake, + totalBondedDepositOfResourceNodes := q.GetResourceNodeBondedToken(ctx).Amount + totalBondedDepositOfMetaNodes := q.GetMetaNodeBondedToken(ctx).Amount + + totalUnbondedDepositOfResourceNodes := q.GetResourceNodeNotBondedToken(ctx).Amount + totalUnbondedDepositOfMetaNodes := q.GetMetaNodeNotBondedToken(ctx).Amount + + totalDepositOfResourceNodes := totalBondedDepositOfResourceNodes.Add(totalUnbondedDepositOfResourceNodes) + totalDepositOfMetaNodes := totalBondedDepositOfMetaNodes.Add(totalUnbondedDepositOfMetaNodes) + + totalBondedDeposit := totalBondedDepositOfResourceNodes.Add(totalBondedDepositOfMetaNodes) + totalUnbondedDeposit := totalUnbondedDepositOfResourceNodes.Add(totalUnbondedDepositOfMetaNodes) + totalUnbondingDeposit := q.GetAllUnbondingNodesTotalBalance(ctx) + totalUnbondedDeposit = totalUnbondedDeposit.Sub(totalUnbondingDeposit) + res := types.NewQueryDepositTotalInfo( + q.BondDenom(ctx), + totalDepositOfResourceNodes, + totalDepositOfMetaNodes, + totalBondedDeposit, + totalUnbondedDeposit, + totalUnbondingDeposit, ) - return &types.QueryTotalStakeResponse{TotalStakes: res}, nil + return res, nil } diff --git a/x/register/keeper/keeper.go b/x/register/keeper/keeper.go index c79ecd66..0df0267a 100644 --- a/x/register/keeper/keeper.go +++ b/x/register/keeper/keeper.go @@ -90,55 +90,55 @@ func (k Keeper) GetTotalUnissuedPrepay(ctx sdk.Context) (totalUnissuedPrepay sdk return k.bankKeeper.GetBalance(ctx, totalUnissuedPrepayAccAddr, k.BondDenom(ctx)) } -func (k Keeper) IncreaseOzoneLimitByAddStake(ctx sdk.Context, stake sdk.Int) (ozoneLimitChange sdk.Int) { - // get remainingOzoneLimit before adding stake +func (k Keeper) IncreaseOzoneLimitByAddDeposit(ctx sdk.Context, deposit sdk.Int) (ozoneLimitChange sdk.Int) { + // get remainingOzoneLimit before adding deposit remainingBefore := k.GetRemainingOzoneLimit(ctx) - stakeNozRate := k.GetStakeNozRate(ctx) + depositNozRate := k.GetDepositNozRate(ctx) - // update effectiveTotalStake - effectiveTotalStakeBefore := k.GetEffectiveTotalStake(ctx) - effectiveTotalStakeAfter := effectiveTotalStakeBefore.Add(stake) - k.SetEffectiveTotalStake(ctx, effectiveTotalStakeAfter) + // update effectiveTotalDeposit + effectiveTotalDepositBefore := k.GetEffectiveTotalDeposit(ctx) + effectiveTotalDepositAfter := effectiveTotalDepositBefore.Add(deposit) + k.SetEffectiveTotalDeposit(ctx, effectiveTotalDepositAfter) - effectiveGenesisDeposit := effectiveTotalStakeBefore.ToDec() //wei + effectiveGenesisDeposit := effectiveTotalDepositBefore.ToDec() //wei if effectiveGenesisDeposit.Equal(sdk.ZeroDec()) { ctx.Logger().Info("effectiveGenesisDeposit is zero, increase ozone limit failed") return sdk.ZeroInt() } - limitToAdd := stake.ToDec().Quo(stakeNozRate) + limitToAdd := deposit.ToDec().Quo(depositNozRate) k.SetRemainingOzoneLimit(ctx, remainingBefore.ToDec().Add(limitToAdd).TruncateInt()) - //ctx.Logger().Debug("----- IncreaseOzoneLimitByAddStake, ", - // "effectiveTotalStakeBefore=", effectiveTotalStakeBefore.String(), - // "effectiveTotalStakeAfter=", effectiveTotalStakeAfter.String(), + //ctx.Logger().Debug("----- IncreaseOzoneLimitByAddDeposit, ", + // "effectiveTotalDepositBefore=", effectiveTotalDepositBefore.String(), + // "effectiveTotalDepositAfter=", effectiveTotalDepositAfter.String(), // "remainingBefore=", remainingBefore.String(), // "remainingAfter=", k.GetRemainingOzoneLimit(ctx).String(), //) return limitToAdd.TruncateInt() } -func (k Keeper) DecreaseOzoneLimitBySubtractStake(ctx sdk.Context, stake sdk.Int) (ozoneLimitChange sdk.Int) { - // get remainingOzoneLimit before adding stake +func (k Keeper) DecreaseOzoneLimitBySubtractDeposit(ctx sdk.Context, deposit sdk.Int) (ozoneLimitChange sdk.Int) { + // get remainingOzoneLimit before adding deposit remainingBefore := k.GetRemainingOzoneLimit(ctx) - stakeNozRate := k.GetStakeNozRate(ctx) + depositNozRate := k.GetDepositNozRate(ctx) - // update effectiveTotalStake - effectiveTotalStakeBefore := k.GetEffectiveTotalStake(ctx) - effectiveTotalStakeAfter := effectiveTotalStakeBefore.Sub(stake) - k.SetEffectiveTotalStake(ctx, effectiveTotalStakeAfter) + // update effectiveTotalDeposit + effectiveTotalDepositBefore := k.GetEffectiveTotalDeposit(ctx) + effectiveTotalDepositAfter := effectiveTotalDepositBefore.Sub(deposit) + k.SetEffectiveTotalDeposit(ctx, effectiveTotalDepositAfter) - effectiveGenesisDeposit := effectiveTotalStakeBefore.ToDec() //wei + effectiveGenesisDeposit := effectiveTotalDepositBefore.ToDec() //wei if effectiveGenesisDeposit.Equal(sdk.ZeroDec()) { ctx.Logger().Info("effectiveGenesisDeposit is zero, increase ozone limit failed") return sdk.ZeroInt() } - limitToSub := stake.ToDec().Quo(stakeNozRate) + limitToSub := deposit.ToDec().Quo(depositNozRate) k.SetRemainingOzoneLimit(ctx, remainingBefore.ToDec().Sub(limitToSub).TruncateInt()) - //ctx.Logger().Debug("----- DecreaseOzoneLimitBySubtractStake, ", - // "effectiveTotalStakeBefore=", effectiveTotalStakeBefore.String(), - // "effectiveTotalStakeAfter=", effectiveTotalStakeAfter.String(), + //ctx.Logger().Debug("----- DecreaseOzoneLimitBySubtractDeposit, ", + // "effectiveTotalDepositBefore=", effectiveTotalDepositBefore.String(), + // "effectiveTotalDepositAfter=", effectiveTotalDepositAfter.String(), // "remainingBefore=", remainingBefore.String(), // "remainingAfter=", k.GetRemainingOzoneLimit(ctx).String(), //) @@ -241,7 +241,7 @@ func (k Keeper) CompleteUnbondingWithAmount(ctx sdk.Context, networkAddrBech32 s // track undelegation only when remaining or truncated shares are non-zero if !entry.Balance.IsZero() { amt := sdk.NewCoin(bondDenom, *entry.Balance) - err := k.subtractUBDNodeStake(ctx, ubd, amt) + err := k.subtractUBDNodeDeposit(ctx, ubd, amt) if err != nil { return nil, false, err } @@ -261,7 +261,7 @@ func (k Keeper) CompleteUnbondingWithAmount(ctx sdk.Context, networkAddrBech32 s return balances, ubd.IsMetaNode, nil } -func (k Keeper) subtractUBDNodeStake(ctx sdk.Context, ubd types.UnbondingNode, tokenToSub sdk.Coin) error { +func (k Keeper) subtractUBDNodeDeposit(ctx sdk.Context, ubd types.UnbondingNode, tokenToSub sdk.Coin) error { // case of meta node networkAddr, err := stratos.SdsAddressFromBech32(ubd.GetNetworkAddr()) if err != nil { @@ -272,19 +272,19 @@ func (k Keeper) subtractUBDNodeStake(ctx sdk.Context, ubd types.UnbondingNode, t if !found { return types.ErrNoMetaNodeFound } - return k.SubtractMetaNodeStake(ctx, metaNode, tokenToSub) + return k.SubtractMetaNodeDeposit(ctx, metaNode, tokenToSub) } // case of resource node resourceNode, found := k.GetResourceNode(ctx, networkAddr) if !found { return types.ErrNoMetaNodeFound } - return k.SubtractResourceNodeStake(ctx, resourceNode, tokenToSub) + return k.SubtractResourceNodeDeposit(ctx, resourceNode, tokenToSub) } // Unbond all tokens of resource node func (k Keeper) UnbondResourceNode(ctx sdk.Context, networkAddr stratos.SdsAddress, ownerAddr sdk.AccAddress, -) (stakeToRemove sdk.Int, unbondingMatureTime time.Time, err error) { +) (depositToRemove sdk.Int, unbondingMatureTime time.Time, err error) { resourceNode, found := k.GetResourceNode(ctx, networkAddr) if !found { @@ -297,7 +297,7 @@ func (k Keeper) UnbondResourceNode(ctx sdk.Context, networkAddr stratos.SdsAddre if resourceNode.GetStatus() != stakingtypes.Bonded { return sdk.ZeroInt(), time.Time{}, types.ErrInvalidNodeStat } - // suspended node cannot be unbonded (avoid dup stake decrease with node suspension) + // suspended node cannot be unbonded (avoid dup deposit decrease with node suspension) if resourceNode.GetSuspend() { return sdk.ZeroInt(), time.Time{}, types.ErrInvalidSuspensionStatForUnbondNode } @@ -306,16 +306,16 @@ func (k Keeper) UnbondResourceNode(ctx sdk.Context, networkAddr stratos.SdsAddre } // check if node_token - unbonding_token > 0 - unbondingStake := k.GetUnbondingNodeBalance(ctx, networkAddr) - stakeToRemove = resourceNode.Tokens.Sub(unbondingStake) - if stakeToRemove.LTE(sdk.ZeroInt()) { + unbondingDeposit := k.GetUnbondingNodeBalance(ctx, networkAddr) + depositToRemove = resourceNode.Tokens.Sub(unbondingDeposit) + if depositToRemove.LTE(sdk.ZeroInt()) { return sdk.ZeroInt(), time.Time{}, types.ErrInsufficientBalance } unbondingMatureTime = calcUnbondingMatureTime(ctx, resourceNode.Status, resourceNode.CreationTime, k.UnbondingThreasholdTime(ctx), k.UnbondingCompletionTime(ctx)) // transfer the node tokens to the not bonded pool - k.bondedToUnbonding(ctx, resourceNode, false, sdk.NewCoin(k.BondDenom(ctx), stakeToRemove)) + k.bondedToUnbonding(ctx, resourceNode, false, sdk.NewCoin(k.BondDenom(ctx), depositToRemove)) // change node status to unbonding if unbonding all available tokens resourceNode.Status = stakingtypes.Unbonding k.SetResourceNode(ctx, resourceNode) @@ -328,13 +328,13 @@ func (k Keeper) UnbondResourceNode(ctx sdk.Context, networkAddr stratos.SdsAddre ctx.Logger().Info(fmt.Sprintf("Calculating mature time: creationTime[%s], threasholdTime[%s], completionTime[%s], matureTime[%s]", resourceNode.CreationTime, k.UnbondingThreasholdTime(ctx), k.UnbondingCompletionTime(ctx), unbondingMatureTime, )) - unbondingNode := k.SetUnbondingNodeEntry(ctx, networkAddr, false, ctx.BlockHeight(), unbondingMatureTime, stakeToRemove) + unbondingNode := k.SetUnbondingNodeEntry(ctx, networkAddr, false, ctx.BlockHeight(), unbondingMatureTime, depositToRemove) // Add to unbonding node queue k.InsertUnbondingNodeQueue(ctx, unbondingNode, unbondingMatureTime) ctx.Logger().Info("Unbonding resource node " + unbondingNode.String() + "\n after mature time" + unbondingMatureTime.String()) - return stakeToRemove, unbondingMatureTime, nil + return depositToRemove, unbondingMatureTime, nil } func (k Keeper) UnbondMetaNode(ctx sdk.Context, metaNode types.MetaNode, amt sdk.Int, @@ -357,15 +357,15 @@ func (k Keeper) UnbondMetaNode(ctx sdk.Context, metaNode types.MetaNode, amt sdk return sdk.ZeroInt(), time.Time{}, types.ErrNoOwnerAccountFound } - // suspended node cannot be unbonded (avoid dup stake decrease with node suspension) + // suspended node cannot be unbonded (avoid dup deposit decrease with node suspension) if metaNode.Suspend { return sdk.ZeroInt(), time.Time{}, types.ErrInvalidSuspensionStatForUnbondNode } // check if node_token - unbonding_token > amt_to_unbond - unbondingStake := k.GetUnbondingNodeBalance(ctx, networkAddr) - availableStake := metaNode.Tokens.Sub(unbondingStake) - if availableStake.LT(amt) { + unbondingDeposit := k.GetUnbondingNodeBalance(ctx, networkAddr) + availableDeposit := metaNode.Tokens.Sub(unbondingDeposit) + if availableDeposit.LT(amt) { return sdk.ZeroInt(), time.Time{}, types.ErrInsufficientBalance } @@ -385,10 +385,10 @@ func (k Keeper) UnbondMetaNode(ctx sdk.Context, metaNode types.MetaNode, amt sdk // transfer the node tokens to the not bonded pool k.bondedToUnbonding(ctx, metaNode, true, coin) // adjust ozone limit - ozoneLimitChange = k.DecreaseOzoneLimitBySubtractStake(ctx, amt) + ozoneLimitChange = k.DecreaseOzoneLimitBySubtractDeposit(ctx, amt) } // change node status to unbonding if unbonding all available tokens - if amt.Equal(availableStake) { + if amt.Equal(availableDeposit) { metaNode.Status = stakingtypes.Unbonding // decrease meta node count v := k.GetBondedMetaNodeCnt(ctx) @@ -448,7 +448,7 @@ func (k Keeper) GetUnbondingNodeBalance(ctx sdk.Context, networkAddr stratos.Sds // CurrNozPrice calcs current noz price func (k Keeper) CurrNozPrice(ctx sdk.Context) sdk.Dec { - St := k.GetEffectiveTotalStake(ctx) + St := k.GetEffectiveTotalDeposit(ctx) Pt := k.GetTotalUnissuedPrepay(ctx).Amount Lt := k.GetRemainingOzoneLimit(ctx) currNozPrice := (St.Add(Pt)).ToDec(). @@ -459,8 +459,8 @@ func (k Keeper) CurrNozPrice(ctx sdk.Context) sdk.Dec { // NozSupply calc remaining/total supply for noz func (k Keeper) NozSupply(ctx sdk.Context) (remaining, total sdk.Int) { remaining = k.GetRemainingOzoneLimit(ctx) // Lt - stakeNozRate := k.GetStakeNozRate(ctx) - St := k.GetEffectiveTotalStake(ctx) - total = St.ToDec().Quo(stakeNozRate).TruncateInt() + depositNozRate := k.GetDepositNozRate(ctx) + St := k.GetEffectiveTotalDeposit(ctx) + total = St.ToDec().Quo(depositNozRate).TruncateInt() return remaining, total } diff --git a/x/register/keeper/meta_node.go b/x/register/keeper/meta_node.go index 014852ba..8ee85da7 100644 --- a/x/register/keeper/meta_node.go +++ b/x/register/keeper/meta_node.go @@ -103,7 +103,7 @@ func (k Keeper) GetAllValidMetaNodes(ctx sdk.Context) (metaNodes []types.MetaNod } func (k Keeper) RegisterMetaNode(ctx sdk.Context, networkAddr stratos.SdsAddress, pubKey cryptotypes.PubKey, ownerAddr sdk.AccAddress, - description types.Description, stake sdk.Coin) (ozoneLimitChange sdk.Int, err error) { + description types.Description, deposit sdk.Coin) (ozoneLimitChange sdk.Int, err error) { if _, found := k.GetMetaNode(ctx, networkAddr); found { ctx.Logger().Error("Meta node already exist") @@ -114,7 +114,7 @@ func (k Keeper) RegisterMetaNode(ctx sdk.Context, networkAddr stratos.SdsAddress return ozoneLimitChange, types.ErrResourceNodePubKeyExists } - if stake.GetDenom() != k.BondDenom(ctx) { + if deposit.GetDenom() != k.BondDenom(ctx) { return ozoneLimitChange, types.ErrBadDenom } @@ -122,7 +122,7 @@ func (k Keeper) RegisterMetaNode(ctx sdk.Context, networkAddr stratos.SdsAddress if err != nil { return ozoneLimitChange, err } - ozoneLimitChange, err = k.AddMetaNodeStake(ctx, metaNode, stake) + ozoneLimitChange, err = k.AddMetaNodeDeposit(ctx, metaNode, deposit) if err != nil { return ozoneLimitChange, err } @@ -138,8 +138,8 @@ func (k Keeper) RegisterMetaNode(ctx sdk.Context, networkAddr stratos.SdsAddress return ozoneLimitChange, nil } -// AddMetaNodeStake Update the tokens of an existing meta node -func (k Keeper) AddMetaNodeStake(ctx sdk.Context, metaNode types.MetaNode, tokenToAdd sdk.Coin, +// AddMetaNodeDeposit Update the tokens of an existing meta node +func (k Keeper) AddMetaNodeDeposit(ctx sdk.Context, metaNode types.MetaNode, tokenToAdd sdk.Coin, ) (ozoneLimitChange sdk.Int, err error) { coins := sdk.NewCoins(tokenToAdd) @@ -175,7 +175,7 @@ func (k Keeper) AddMetaNodeStake(ctx sdk.Context, metaNode types.MetaNode, token k.SetMetaNode(ctx, metaNode) if !metaNode.Suspend { - ozoneLimitChange = k.IncreaseOzoneLimitByAddStake(ctx, tokenToAdd.Amount) + ozoneLimitChange = k.IncreaseOzoneLimitByAddDeposit(ctx, tokenToAdd.Amount) } else { // if node is currently suspended, ozone limit will be increased upon unsuspension instead of NOW ozoneLimitChange = sdk.ZeroInt() @@ -204,8 +204,8 @@ func (k Keeper) RemoveTokenFromPoolWhileUnbondingMetaNode(ctx sdk.Context, metaN return nil } -// SubtractMetaNodeStake Update the tokens of an existing meta node -func (k Keeper) SubtractMetaNodeStake(ctx sdk.Context, metaNode types.MetaNode, tokenToSub sdk.Coin) error { +// SubtractMetaNodeDeposit Update the tokens of an existing meta node +func (k Keeper) SubtractMetaNodeDeposit(ctx sdk.Context, metaNode types.MetaNode, tokenToSub sdk.Coin) error { networkAddr, err := stratos.SdsAddressFromBech32(metaNode.GetNetworkAddress()) if err != nil { return types.ErrInvalidNetworkAddr @@ -256,11 +256,11 @@ func (k Keeper) SubtractMetaNodeStake(ctx sdk.Context, metaNode types.MetaNode, } metaNode = metaNode.SubToken(tokenToSub.Amount) - newStake := metaNode.Tokens + newDeposit := metaNode.Tokens k.SetMetaNode(ctx, metaNode) - if newStake.IsZero() { + if newDeposit.IsZero() { err = k.removeMetaNode(ctx, networkAddr) if err != nil { return err @@ -320,7 +320,7 @@ func (k Keeper) GetMetaNodeListByMoniker(ctx sdk.Context, moniker string) (resou return resourceNodes, nil } -func (k Keeper) WithdrawMetaNodeRegistrationStake(ctx sdk.Context, networkAddr stratos.SdsAddress, ownerAddr sdk.AccAddress) ( +func (k Keeper) WithdrawMetaNodeRegistrationDeposit(ctx sdk.Context, networkAddr stratos.SdsAddress, ownerAddr sdk.AccAddress) ( unbondingMatureTime time.Time, err error) { node, found := k.GetMetaNode(ctx, networkAddr) @@ -338,10 +338,10 @@ func (k Keeper) WithdrawMetaNodeRegistrationStake(ctx sdk.Context, networkAddr s if node.Status != stakingtypes.Unbonded || !node.Suspend || votePool.IsVotePassed { return time.Time{}, types.ErrInvalidNodeStat } - // check available_stake (node_token - unbonding_token > amt_to_withdraw) - unbondingStake := k.GetUnbondingNodeBalance(ctx, networkAddr) - availableStake := node.Tokens.Sub(unbondingStake) - if availableStake.LTE(sdk.ZeroInt()) { + // check available_deposit (node_token - unbonding_token > amt_to_withdraw) + unbondingDeposit := k.GetUnbondingNodeBalance(ctx, networkAddr) + availableDeposit := node.Tokens.Sub(unbondingDeposit) + if availableDeposit.LTE(sdk.ZeroInt()) { return time.Time{}, types.ErrInsufficientBalance } if k.HasMaxUnbondingNodeEntries(ctx, networkAddr) { @@ -350,12 +350,12 @@ func (k Keeper) WithdrawMetaNodeRegistrationStake(ctx sdk.Context, networkAddr s unbondingMatureTime = calcUnbondingMatureTime(ctx, node.Status, node.CreationTime, k.UnbondingThreasholdTime(ctx), k.UnbondingCompletionTime(ctx)) // Set the unbonding mature time and completion height appropriately - unbondingNode := k.SetUnbondingNodeEntry(ctx, networkAddr, true, ctx.BlockHeight(), unbondingMatureTime, availableStake) + unbondingNode := k.SetUnbondingNodeEntry(ctx, networkAddr, true, ctx.BlockHeight(), unbondingMatureTime, availableDeposit) // Add to unbonding node queue k.InsertUnbondingNodeQueue(ctx, unbondingNode, unbondingMatureTime) ctx.Logger().Info("Unbonding meta node " + unbondingNode.String() + "\n after mature time" + unbondingMatureTime.String()) - // all stake is being unbonded, update status to Unbonding + // all deposit is being unbonded, update status to Unbonding node.Status = stakingtypes.Unbonding k.SetMetaNode(ctx, node) @@ -427,12 +427,12 @@ func (k Keeper) HandleVoteForMetaNodeRegistration(ctx sdk.Context, candidateNetw networkAddr, _ := stratos.SdsAddressFromBech32(candidateNode.GetNetworkAddress()) k.AddMetaNodeToBitMapIdxCache(networkAddr) // increase ozone limit after vote is approved - _ = k.IncreaseOzoneLimitByAddStake(ctx, candidateNode.Tokens) + _ = k.IncreaseOzoneLimitByAddDeposit(ctx, candidateNode.Tokens) // increase mata node count v := k.GetBondedMetaNodeCnt(ctx) count := v.Add(sdk.NewInt(1)) k.SetBondedMetaNodeCnt(ctx, count) - // move stake from not bonded pool to bonded pool + // move deposit from not bonded pool to bonded pool tokenToBond := sdk.NewCoin(k.BondDenom(ctx), candidateNode.Tokens) // sub coins from not bonded pool nBondedMetaAccountAddr := k.accountKeeper.GetModuleAddress(types.MetaNodeNotBondedPool) @@ -478,10 +478,10 @@ func (k Keeper) UpdateMetaNode(ctx sdk.Context, description types.Description, return nil } -func (k Keeper) UpdateMetaNodeStake(ctx sdk.Context, networkAddr stratos.SdsAddress, ownerAddr sdk.AccAddress, stakeDelta sdk.Coin, incrStake bool) ( +func (k Keeper) UpdateMetaNodeDeposit(ctx sdk.Context, networkAddr stratos.SdsAddress, ownerAddr sdk.AccAddress, depositDelta sdk.Coin, incrDeposit bool) ( ozoneLimitChange sdk.Int, unbondingMatureTime time.Time, err error) { - if stakeDelta.GetDenom() != k.BondDenom(ctx) { + if depositDelta.GetDenom() != k.BondDenom(ctx) { return sdk.ZeroInt(), time.Time{}, types.ErrBadDenom } @@ -495,15 +495,15 @@ func (k Keeper) UpdateMetaNodeStake(ctx sdk.Context, networkAddr stratos.SdsAddr return sdk.ZeroInt(), time.Time{}, types.ErrInvalidOwnerAddr } - if incrStake { + if incrDeposit { blockTime := ctx.BlockHeader().Time - ozoneLimitChange, err = k.AddMetaNodeStake(ctx, node, stakeDelta) + ozoneLimitChange, err = k.AddMetaNodeDeposit(ctx, node, depositDelta) if err != nil { return sdk.ZeroInt(), time.Time{}, err } return ozoneLimitChange, blockTime, nil } else { - ozoneLimitChange, completionTime, err := k.UnbondMetaNode(ctx, node, stakeDelta.Amount) + ozoneLimitChange, completionTime, err := k.UnbondMetaNode(ctx, node, depositDelta.Amount) if err != nil { return sdk.ZeroInt(), time.Time{}, err } diff --git a/x/register/keeper/msg_server.go b/x/register/keeper/msg_server.go index bfa507cc..325c3327 100644 --- a/x/register/keeper/msg_server.go +++ b/x/register/keeper/msg_server.go @@ -10,6 +10,7 @@ import ( cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + stratos "github.com/stratosnet/stratos-chain/types" "github.com/stratosnet/stratos-chain/x/register/types" ) @@ -62,7 +63,7 @@ func (k msgServer) HandleMsgCreateResourceNode(goCtx context.Context, msg *types sdk.NewAttribute(types.AttributeKeyNetworkAddress, msg.NetworkAddress), sdk.NewAttribute(types.AttributeKeyPubKey, hex.EncodeToString(pk.Bytes())), sdk.NewAttribute(types.AttributeKeyOZoneLimitChanges, ozoneLimitChange.String()), - sdk.NewAttribute(types.AttributeKeyInitialStake, msg.Value.String()), + sdk.NewAttribute(types.AttributeKeyInitialDeposit, msg.Value.String()), ), sdk.NewEvent( sdk.EventTypeMessage, @@ -126,7 +127,7 @@ func (k msgServer) HandleMsgRemoveResourceNode(goCtx context.Context, msg *types return &types.MsgRemoveResourceNodeResponse{}, sdkerrors.Wrap(types.ErrInvalidOwnerAddr, err.Error()) } - stakeToRemove, completionTime, err := k.UnbondResourceNode(ctx, p2pAddress, ownerAddress) + depositToRemove, completionTime, err := k.UnbondResourceNode(ctx, p2pAddress, ownerAddress) if err != nil { return &types.MsgRemoveResourceNodeResponse{}, sdkerrors.Wrap(types.ErrUnbondResourceNode, err.Error()) } @@ -136,7 +137,7 @@ func (k msgServer) HandleMsgRemoveResourceNode(goCtx context.Context, msg *types types.EventTypeUnbondingResourceNode, sdk.NewAttribute(sdk.AttributeKeySender, msg.OwnerAddress), sdk.NewAttribute(types.AttributeKeyResourceNode, msg.ResourceNodeAddress), - sdk.NewAttribute(types.AttributeKeyStakeToRemove, sdk.NewCoin(k.BondDenom(ctx), stakeToRemove).String()), + sdk.NewAttribute(types.AttributeKeyDepositToRemove, sdk.NewCoin(k.BondDenom(ctx), depositToRemove).String()), sdk.NewAttribute(types.AttributeKeyUnbondingMatureTime, completionTime.Format(time.RFC3339)), ), sdk.NewEvent( @@ -163,13 +164,13 @@ func (k msgServer) HandleMsgRemoveMetaNode(goCtx context.Context, msg *types.Msg return &types.MsgRemoveMetaNodeResponse{}, types.ErrInvalidOwnerAddr } - unbondingStake := k.GetUnbondingNodeBalance(ctx, p2pAddress) - availableStake := metaNode.Tokens.Sub(unbondingStake) - if availableStake.LTE(sdk.ZeroInt()) { + unbondingDeposit := k.GetUnbondingNodeBalance(ctx, p2pAddress) + availableDeposit := metaNode.Tokens.Sub(unbondingDeposit) + if availableDeposit.LTE(sdk.ZeroInt()) { return &types.MsgRemoveMetaNodeResponse{}, types.ErrInsufficientBalance } - ozoneLimitChange, completionTime, err := k.UnbondMetaNode(ctx, metaNode, availableStake) + ozoneLimitChange, completionTime, err := k.UnbondMetaNode(ctx, metaNode, availableDeposit) if err != nil { return &types.MsgRemoveMetaNodeResponse{}, sdkerrors.Wrap(types.ErrUnbondMetaNode, err.Error()) } @@ -236,26 +237,28 @@ func (k msgServer) HandleMsgMetaNodeRegistrationVote(goCtx context.Context, msg return &types.MsgMetaNodeRegistrationVoteResponse{}, nil } -func (k msgServer) HandleMsgWithdrawMetaNodeRegistrationStake(goCtx context.Context, msg *types.MsgWithdrawMetaNodeRegistrationStake) (*types.MsgWithdrawMetaNodeRegistrationStakeResponse, error) { +func (k msgServer) HandleMsgWithdrawMetaNodeRegistrationDeposit(goCtx context.Context, msg *types.MsgWithdrawMetaNodeRegistrationDeposit) ( + *types.MsgWithdrawMetaNodeRegistrationDepositResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) networkAddr, err := stratos.SdsAddressFromBech32(msg.GetNetworkAddress()) if err != nil { - return &types.MsgWithdrawMetaNodeRegistrationStakeResponse{}, sdkerrors.Wrap(types.ErrInvalidNetworkAddr, err.Error()) + return &types.MsgWithdrawMetaNodeRegistrationDepositResponse{}, sdkerrors.Wrap(types.ErrInvalidNetworkAddr, err.Error()) } ownerAddr, err := sdk.AccAddressFromBech32(msg.GetOwnerAddress()) if err != nil { - return &types.MsgWithdrawMetaNodeRegistrationStakeResponse{}, types.ErrInvalidOwnerAddr + return &types.MsgWithdrawMetaNodeRegistrationDepositResponse{}, types.ErrInvalidOwnerAddr } - completionTime, err := k.WithdrawMetaNodeRegistrationStake(ctx, networkAddr, ownerAddr) + completionTime, err := k.WithdrawMetaNodeRegistrationDeposit(ctx, networkAddr, ownerAddr) if err != nil { - return &types.MsgWithdrawMetaNodeRegistrationStakeResponse{}, sdkerrors.Wrap(types.ErrUnbondMetaNode, err.Error()) + return &types.MsgWithdrawMetaNodeRegistrationDepositResponse{}, sdkerrors.Wrap(types.ErrUnbondMetaNode, err.Error()) } ctx.EventManager().EmitEvents(sdk.Events{ sdk.NewEvent( - types.EventTypeWithdrawMetaNodeRegistrationStake, + types.EventTypeWithdrawMetaNodeRegistrationDeposit, sdk.NewAttribute(sdk.AttributeKeySender, msg.OwnerAddress), sdk.NewAttribute(types.AttributeKeyNetworkAddress, msg.NetworkAddress), sdk.NewAttribute(types.AttributeKeyUnbondingMatureTime, completionTime.Format(time.RFC3339)), @@ -267,7 +270,7 @@ func (k msgServer) HandleMsgWithdrawMetaNodeRegistrationStake(goCtx context.Cont ), }) - return &types.MsgWithdrawMetaNodeRegistrationStakeResponse{}, nil + return &types.MsgWithdrawMetaNodeRegistrationDepositResponse{}, nil } func (k msgServer) HandleMsgUpdateResourceNode(goCtx context.Context, msg *types.MsgUpdateResourceNode) (*types.MsgUpdateResourceNodeResponse, error) { @@ -301,34 +304,34 @@ func (k msgServer) HandleMsgUpdateResourceNode(goCtx context.Context, msg *types return &types.MsgUpdateResourceNodeResponse{}, nil } -func (k msgServer) HandleMsgUpdateResourceNodeStake(goCtx context.Context, msg *types.MsgUpdateResourceNodeStake) ( - *types.MsgUpdateResourceNodeStakeResponse, error) { +func (k msgServer) HandleMsgUpdateResourceNodeDeposit(goCtx context.Context, msg *types.MsgUpdateResourceNodeDeposit) ( + *types.MsgUpdateResourceNodeDepositResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) networkAddr, err := stratos.SdsAddressFromBech32(msg.NetworkAddress) if err != nil { - return &types.MsgUpdateResourceNodeStakeResponse{}, sdkerrors.Wrap(types.ErrInvalidNetworkAddr, err.Error()) + return &types.MsgUpdateResourceNodeDepositResponse{}, sdkerrors.Wrap(types.ErrInvalidNetworkAddr, err.Error()) } ownerAddress, err := sdk.AccAddressFromBech32(msg.OwnerAddress) if err != nil { - return &types.MsgUpdateResourceNodeStakeResponse{}, sdkerrors.Wrap(types.ErrInvalidOwnerAddr, err.Error()) + return &types.MsgUpdateResourceNodeDepositResponse{}, sdkerrors.Wrap(types.ErrInvalidOwnerAddr, err.Error()) } ozoneLimitChange, availableTokenAmtBefore, availableTokenAmtAfter, completionTime, node, err := - k.UpdateResourceNodeStake(ctx, networkAddr, ownerAddress, msg.GetStakeDelta()) + k.UpdateResourceNodeDeposit(ctx, networkAddr, ownerAddress, msg.GetDepositDelta()) if err != nil { - return nil, sdkerrors.Wrap(types.ErrUpdateResourceNodeStake, err.Error()) + return nil, sdkerrors.Wrap(types.ErrUpdateResourceNodeDeposit, err.Error()) } ctx.EventManager().EmitEvents(sdk.Events{ sdk.NewEvent( - types.EventTypeUpdateResourceNodeStake, + types.EventTypeUpdateResourceNodeDeposit, sdk.NewAttribute(sdk.AttributeKeySender, msg.OwnerAddress), sdk.NewAttribute(types.AttributeKeyNetworkAddress, msg.NetworkAddress), - sdk.NewAttribute(types.AttributeKeyStakeDelta, msg.StakeDelta.String()), - sdk.NewAttribute(types.AttributeKeyCurrentStake, sdk.NewCoin(k.BondDenom(ctx), node.Tokens).String()), + sdk.NewAttribute(types.AttributeKeyDepositDelta, msg.DepositDelta.String()), + sdk.NewAttribute(types.AttributeKeyCurrentDeposit, sdk.NewCoin(k.BondDenom(ctx), node.Tokens).String()), sdk.NewAttribute(types.AttributeKeyAvailableTokenBefore, sdk.NewCoin(k.BondDenom(ctx), availableTokenAmtBefore).String()), sdk.NewAttribute(types.AttributeKeyAvailableTokenAfter, sdk.NewCoin(k.BondDenom(ctx), availableTokenAmtAfter).String()), sdk.NewAttribute(types.AttributeKeyOZoneLimitChanges, ozoneLimitChange.String()), @@ -340,14 +343,14 @@ func (k msgServer) HandleMsgUpdateResourceNodeStake(goCtx context.Context, msg * sdk.NewAttribute(sdk.AttributeKeySender, msg.OwnerAddress), ), }) - return &types.MsgUpdateResourceNodeStakeResponse{}, nil + return &types.MsgUpdateResourceNodeDepositResponse{}, nil } -func (k msgServer) HandleMsgUpdateEffectiveStake(goCtx context.Context, msg *types.MsgUpdateEffectiveStake) (*types.MsgUpdateEffectiveStakeResponse, error) { +func (k msgServer) HandleMsgUpdateEffectiveDeposit(goCtx context.Context, msg *types.MsgUpdateEffectiveDeposit) (*types.MsgUpdateEffectiveDepositResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) if len(msg.Reporters) == 0 || len(msg.ReporterOwner) == 0 { - return &types.MsgUpdateEffectiveStakeResponse{}, types.ErrReporterAddressOrOwner + return &types.MsgUpdateEffectiveDepositResponse{}, types.ErrReporterAddressOrOwner } reporterOwners := msg.ReporterOwner @@ -369,27 +372,27 @@ func (k msgServer) HandleMsgUpdateEffectiveStake(goCtx context.Context, msg *typ networkAddr, err := stratos.SdsAddressFromBech32(msg.NetworkAddress) if err != nil { - return &types.MsgUpdateEffectiveStakeResponse{}, sdkerrors.Wrap(types.ErrInvalidNetworkAddr, err.Error()) + return &types.MsgUpdateEffectiveDepositResponse{}, sdkerrors.Wrap(types.ErrInvalidNetworkAddr, err.Error()) } if msg.EffectiveTokens.LTE(sdk.NewInt(0)) { - return &types.MsgUpdateEffectiveStakeResponse{}, errors.New("effective tokens should be greater than 0") + return &types.MsgUpdateEffectiveDepositResponse{}, errors.New("effective tokens should be greater than 0") } - _, _, isUnsuspendedDuringUpdate, err := k.UpdateEffectiveStake(ctx, networkAddr, msg.EffectiveTokens) + _, _, isUnsuspendedDuringUpdate, err := k.UpdateEffectiveDeposit(ctx, networkAddr, msg.EffectiveTokens) if err != nil { - return nil, sdkerrors.Wrap(types.ErrUpdateResourceNodeStake, err.Error()) + return nil, sdkerrors.Wrap(types.ErrUpdateResourceNodeDeposit, err.Error()) } ctx.EventManager().EmitEvents(sdk.Events{ sdk.NewEvent( - types.EventTypeUpdateEffectiveStake, + types.EventTypeUpdateEffectiveDeposit, sdk.NewAttribute(types.AttributeKeyNetworkAddress, msg.NetworkAddress), - sdk.NewAttribute(types.AttributeKeyEffectiveStakeAfter, msg.EffectiveTokens.String()), + sdk.NewAttribute(types.AttributeKeyEffectiveDepositAfter, msg.EffectiveTokens.String()), sdk.NewAttribute(types.AttributeKeyIsUnsuspended, strconv.FormatBool(isUnsuspendedDuringUpdate)), ), }) - return &types.MsgUpdateEffectiveStakeResponse{}, nil + return &types.MsgUpdateEffectiveDepositResponse{}, nil } func (k msgServer) HandleMsgUpdateMetaNode(goCtx context.Context, msg *types.MsgUpdateMetaNode) (*types.MsgUpdateMetaNodeResponse, error) { @@ -424,30 +427,32 @@ func (k msgServer) HandleMsgUpdateMetaNode(goCtx context.Context, msg *types.Msg return &types.MsgUpdateMetaNodeResponse{}, nil } -func (k msgServer) HandleMsgUpdateMetaNodeStake(goCtx context.Context, msg *types.MsgUpdateMetaNodeStake) (*types.MsgUpdateMetaNodeStakeResponse, error) { +func (k msgServer) HandleMsgUpdateMetaNodeDeposit(goCtx context.Context, msg *types.MsgUpdateMetaNodeDeposit) ( + *types.MsgUpdateMetaNodeDepositResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) networkAddr, err := stratos.SdsAddressFromBech32(msg.NetworkAddress) if err != nil { - return &types.MsgUpdateMetaNodeStakeResponse{}, sdkerrors.Wrap(types.ErrInvalidNetworkAddr, err.Error()) + return &types.MsgUpdateMetaNodeDepositResponse{}, sdkerrors.Wrap(types.ErrInvalidNetworkAddr, err.Error()) } ownerAddress, err := sdk.AccAddressFromBech32(msg.OwnerAddress) if err != nil { - return &types.MsgUpdateMetaNodeStakeResponse{}, sdkerrors.Wrap(types.ErrInvalidOwnerAddr, err.Error()) + return &types.MsgUpdateMetaNodeDepositResponse{}, sdkerrors.Wrap(types.ErrInvalidOwnerAddr, err.Error()) } - ozoneLimitChange, completionTime, err := k.UpdateMetaNodeStake(ctx, networkAddr, ownerAddress, msg.GetStakeDelta(), msg.IncrStake) + ozoneLimitChange, completionTime, err := k.UpdateMetaNodeDeposit(ctx, networkAddr, ownerAddress, msg.GetDepositDelta(), msg.IncrDeposit) if err != nil { - return nil, sdkerrors.Wrap(types.ErrUpdateMetaNodeStake, err.Error()) + return nil, sdkerrors.Wrap(types.ErrUpdateMetaNodeDeposit, err.Error()) } ctx.EventManager().EmitEvents(sdk.Events{ sdk.NewEvent( - types.EventTypeUpdateMetaNodeStake, + types.EventTypeUpdateMetaNodeDeposit, sdk.NewAttribute(sdk.AttributeKeySender, msg.OwnerAddress), sdk.NewAttribute(types.AttributeKeyNetworkAddress, msg.NetworkAddress), - sdk.NewAttribute(types.AttributeKeyIncrStake, strconv.FormatBool(msg.IncrStake)), + sdk.NewAttribute(types.AttributeKeyIncrDeposit, strconv.FormatBool(msg.IncrDeposit)), sdk.NewAttribute(types.AttributeKeyOZoneLimitChanges, ozoneLimitChange.String()), sdk.NewAttribute(types.AttributeKeyUnbondingMatureTime, completionTime.Format(time.RFC3339)), ), @@ -457,5 +462,5 @@ func (k msgServer) HandleMsgUpdateMetaNodeStake(goCtx context.Context, msg *type sdk.NewAttribute(sdk.AttributeKeySender, msg.OwnerAddress), ), }) - return &types.MsgUpdateMetaNodeStakeResponse{}, nil + return &types.MsgUpdateMetaNodeDepositResponse{}, nil } diff --git a/x/register/keeper/node_state_change.go b/x/register/keeper/node_state_change.go index c9555ee0..8f3a1d67 100644 --- a/x/register/keeper/node_state_change.go +++ b/x/register/keeper/node_state_change.go @@ -63,24 +63,6 @@ func (k Keeper) bondedToUnbonding(ctx sdk.Context, node interface{}, isMetaNode } } -//// switches a Node from unbonding state to unbonded state -//func (k Keeper) unbondingToUnbonded(ctx sdk.Context, node interface{}, isMetaNode bool) interface{} { -// switch isMetaNode { -// case true: -// temp := node.(types.MetaNode) -// if temp.GetStatus() != stakingtypes.Unbonding { -// panic(fmt.Sprintf("bad state transition unbondingToBonded, metaNode: %v\n", temp)) -// } -// return k.completeUnbondingNode(ctx, temp, isMetaNode) -// default: -// temp := node.(types.ResourceNode) -// if temp.GetStatus() != stakingtypes.Unbonding { -// panic(fmt.Sprintf("bad state transition unbondingToBonded, resourceNode: %v\n", temp)) -// } -// return k.completeUnbondingNode(ctx, temp, isMetaNode) -// } -//} - // perform all the store operations for when a Node begins unbonding func (k Keeper) beginUnbondingResourceNode(ctx sdk.Context, resourceNode *types.ResourceNode, coin *sdk.Coin) *types.ResourceNode { // set node stat to unbonding, remove token from bonded pool, add token into NotBondedPool @@ -145,76 +127,3 @@ func (k Keeper) completeUnbondingNode(ctx sdk.Context, node interface{}, isMetaN return temp } } - -//// Returns a concatenated list of all the timeslices before currTime, and deletes the timeslices from the queue -//func (k Keeper) GetAllMatureUBDNodeQueue(ctx sdk.Context, currTime time.Time) (matureNetworkAddrs []string) { -// // gets an iterator for all timeslices from time 0 until the current Blockheader time -// ubdTimesliceIterator := k.UnbondingNodeQueueIterator(ctx, ctx.BlockHeader().Time) -// defer ubdTimesliceIterator.Close() -// -// for ; ubdTimesliceIterator.Valid(); ubdTimesliceIterator.Next() { -// addrValue := stratos.SdsAddresses{} -// k.cdc.MustUnmarshalLengthPrefixed(ubdTimesliceIterator.Value(), &addrValue) -// timeSlice := addrValue.GetAddresses() -// matureNetworkAddrs = append(matureNetworkAddrs, timeSlice...) -// } -// -// return matureNetworkAddrs -//} - -//// Unbonds all the unbonding validators that have finished their unbonding period -//func (k Keeper) UnbondAllMatureUBDNodeQueue(ctx sdk.Context) { -// store := ctx.KVStore(k.storeKey) -// nodeTimesliceIterator := k.UnbondingNodeQueueIterator(ctx, ctx.BlockHeader().Time) -// defer nodeTimesliceIterator.Close() -// -// for ; nodeTimesliceIterator.Valid(); nodeTimesliceIterator.Next() { -// addrValue := stratos.SdsAddresses{} -// k.cdc.MustUnmarshalLengthPrefixed(nodeTimesliceIterator.Value(), &addrValue) -// timeSlice := addrValue.GetAddresses() -// -// for _, networkAddr := range timeSlice { -// ubdNetworkAddr, err := stratos.SdsAddressFromBech32(networkAddr) -// if err != nil { -// panic("network address in the unbonding queue is invalid") -// } -// -// ubd, found := k.GetUnbondingNode(ctx, ubdNetworkAddr) -// if !found { -// panic("node in the unbonding queue was not found") -// } -// -// if ubd.IsMetaNode { -// node, found := k.GetMetaNode(ctx, ubdNetworkAddr) -// if !found { -// panic("cannot find meta node " + ubd.NetworkAddr) -// } -// if node.GetStatus() != stakingtypes.Unbonding { -// panic("unexpected node in unbonding queue; status was not unbonding") -// } -// k.unbondingToUnbonded(ctx, node, ubd.IsMetaNode) -// k.removeMetaNode(ctx, ubdNetworkAddr) -// _, found1 := k.GetMetaNode(ctx, ubdNetworkAddr) -// if found1 { -// ctx.Logger().Info("Removed meta node with addr " + ubd.NetworkAddr) -// } -// } else { -// node, found := k.GetResourceNode(ctx, ubdNetworkAddr) -// if !found { -// panic("cannot find resource node " + ubd.NetworkAddr) -// } -// if node.GetStatus() != stakingtypes.Unbonding { -// panic("unexpected node in unbonding queue; status was not unbonding") -// } -// k.unbondingToUnbonded(ctx, node, ubd.IsMetaNode) -// k.removeResourceNode(ctx, ubdNetworkAddr) -// _, found1 := k.GetResourceNode(ctx, ubdNetworkAddr) -// if found1 { -// ctx.Logger().Info("Removed resource node with addr " + ubd.NetworkAddr) -// } -// -// } -// } -// store.Delete(nodeTimesliceIterator.Key()) -// } -//} diff --git a/x/register/keeper/params.go b/x/register/keeper/params.go index 3a5352d1..2d20f2e8 100644 --- a/x/register/keeper/params.go +++ b/x/register/keeper/params.go @@ -49,8 +49,8 @@ func (k Keeper) ResourceNodeRegEnabled(ctx sdk.Context) (res bool) { return } -func (k Keeper) ResourceNodeMinStake(ctx sdk.Context) (res sdk.Coin) { - k.paramSpace.Get(ctx, types.KeyResourceNodeMinStake, &res) +func (k Keeper) ResourceNodeMinDeposit(ctx sdk.Context) (res sdk.Coin) { + k.paramSpace.Get(ctx, types.KeyResourceNodeMinDeposit, &res) return } diff --git a/x/register/keeper/querier.go b/x/register/keeper/querier.go index 3305cf51..1b727d59 100644 --- a/x/register/keeper/querier.go +++ b/x/register/keeper/querier.go @@ -3,30 +3,30 @@ package keeper import ( "fmt" - "github.com/cosmos/cosmos-sdk/codec" - "github.com/cosmos/cosmos-sdk/store/prefix" - storetypes "github.com/cosmos/cosmos-sdk/store/types" - pagiquery "github.com/cosmos/cosmos-sdk/types/query" - stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - stratos "github.com/stratosnet/stratos-chain/types" - "github.com/stratosnet/stratos-chain/x/register/types" - db "github.com/tendermint/tm-db" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - // this line is used by starport scaffolding # 1 abci "github.com/tendermint/tendermint/abci/types" + db "github.com/tendermint/tm-db" + "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/store/prefix" + storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + pagiquery "github.com/cosmos/cosmos-sdk/types/query" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + + stratos "github.com/stratosnet/stratos-chain/types" + "github.com/stratosnet/stratos-chain/x/register/types" ) const ( QueryResourceNodeByNetworkAddr = "resource-node" QueryMetaNodeByNetworkAddr = "meta_node" - QueryNodesTotalStakes = "nodes_total_stakes" - QueryNodeStakeByNodeAddr = "node_stakes" - QueryNodeStakeByOwner = "node_stakes_by_owner" + QueryNodesDepositTotal = "nodes_deposit_total" + QueryNodeDepositByNodeAddr = "node_deposit_by_addr" + QueryNodeDepositByOwner = "node_deposit_by_owner" QueryRegisterParams = "register_params" QueryResourceNodesCount = "resource_nodes_count" QueryMetaNodesCount = "meta_nodes_count" @@ -40,12 +40,12 @@ func NewQuerier(k Keeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier { return getResourceNodeByNetworkAddr(ctx, req, k, legacyQuerierCdc) case QueryMetaNodeByNetworkAddr: return getMetaNodeNetworkAddr(ctx, req, k, legacyQuerierCdc) - case QueryNodesTotalStakes: - return getNodesStakingInfo(ctx, req, k, legacyQuerierCdc) - case QueryNodeStakeByNodeAddr: - return getStakingInfoByNodeAddr(ctx, req, k, legacyQuerierCdc) - case QueryNodeStakeByOwner: - return getStakingInfoByOwnerAddr(ctx, req, k, legacyQuerierCdc) + case QueryNodesDepositTotal: + return getNodesDepositTotalInfo(ctx, req, k, legacyQuerierCdc) + case QueryNodeDepositByNodeAddr: + return getDepositInfoByNodeAddr(ctx, req, k, legacyQuerierCdc) + case QueryNodeDepositByOwner: + return getDepositInfoByOwnerAddr(ctx, req, k, legacyQuerierCdc) case QueryRegisterParams: return getRegisterParams(ctx, req, k, legacyQuerierCdc) case QueryResourceNodesCount: @@ -139,28 +139,29 @@ func getMetaNodeNetworkAddr(ctx sdk.Context, req abci.RequestQuery, k Keeper, le return bz, nil } -// Iteration for querying total stakes of resource/meta nodes -func getNodesStakingInfo(ctx sdk.Context, _ abci.RequestQuery, k Keeper, legacyQuerierCdc *codec.LegacyAmino) ([]byte, error) { - - totalBondedStakeOfResourceNodes := k.GetResourceNodeBondedToken(ctx).Amount - totalBondedStakeOfMetaNodes := k.GetMetaNodeBondedToken(ctx).Amount - - totalUnbondedStakeOfResourceNodes := k.GetResourceNodeNotBondedToken(ctx).Amount - totalUnbondedStakeOfMetaNodes := k.GetMetaNodeNotBondedToken(ctx).Amount - - totalStakeOfResourceNodes := totalBondedStakeOfResourceNodes.Add(totalUnbondedStakeOfResourceNodes) - totalStakeOfMetaNodes := totalBondedStakeOfMetaNodes.Add(totalUnbondedStakeOfMetaNodes) - - totalBondedStake := totalBondedStakeOfResourceNodes.Add(totalBondedStakeOfMetaNodes) - totalUnbondedStake := totalUnbondedStakeOfResourceNodes.Add(totalUnbondedStakeOfMetaNodes) - totalUnbondingStake := k.GetAllUnbondingNodesTotalBalance(ctx) - totalUnbondedStake = totalUnbondedStake.Sub(totalUnbondingStake) - res := types.NewQueryNodesStakingInfo( - totalStakeOfResourceNodes, - totalStakeOfMetaNodes, - totalBondedStake, - totalUnbondedStake, - totalUnbondingStake, +// Query total deposit of all resource/meta nodes +func getNodesDepositTotalInfo(ctx sdk.Context, _ abci.RequestQuery, k Keeper, legacyQuerierCdc *codec.LegacyAmino) ([]byte, error) { + + totalBondedDepositOfResourceNodes := k.GetResourceNodeBondedToken(ctx).Amount + totalBondedDepositOfMetaNodes := k.GetMetaNodeBondedToken(ctx).Amount + + totalUnbondedDepositOfResourceNodes := k.GetResourceNodeNotBondedToken(ctx).Amount + totalUnbondedDepositOfMetaNodes := k.GetMetaNodeNotBondedToken(ctx).Amount + + totalDepositOfResourceNodes := totalBondedDepositOfResourceNodes.Add(totalUnbondedDepositOfResourceNodes) + totalDepositOfMetaNodes := totalBondedDepositOfMetaNodes.Add(totalUnbondedDepositOfMetaNodes) + + totalBondedDeposit := totalBondedDepositOfResourceNodes.Add(totalBondedDepositOfMetaNodes) + totalUnbondedDeposit := totalUnbondedDepositOfResourceNodes.Add(totalUnbondedDepositOfMetaNodes) + totalUnbondingDeposit := k.GetAllUnbondingNodesTotalBalance(ctx) + totalUnbondedDeposit = totalUnbondedDeposit.Sub(totalUnbondingDeposit) + res := types.NewQueryDepositTotalInfo( + k.BondDenom(ctx), + totalDepositOfResourceNodes, + totalDepositOfMetaNodes, + totalBondedDeposit, + totalUnbondedDeposit, + totalUnbondingDeposit, ) bz, err := codec.MarshalJSONIndent(legacyQuerierCdc, res) if err != nil { @@ -170,12 +171,11 @@ func getNodesStakingInfo(ctx sdk.Context, _ abci.RequestQuery, k Keeper, legacyQ return bz, nil } -// -func getStakingInfoByNodeAddr(ctx sdk.Context, req abci.RequestQuery, k Keeper, legacyQuerierCdc *codec.LegacyAmino) ([]byte, error) { +func getDepositInfoByNodeAddr(ctx sdk.Context, req abci.RequestQuery, k Keeper, legacyQuerierCdc *codec.LegacyAmino) ([]byte, error) { var ( bz []byte - params types.QueryNodeStakingParams - stakingInfo types.StakingInfo + params types.QueryNodeDepositParams + depositInfo types.DepositInfo ) err := legacyQuerierCdc.UnmarshalJSON(req.Data, ¶ms) @@ -188,9 +188,9 @@ func getStakingInfoByNodeAddr(ctx sdk.Context, req abci.RequestQuery, k Keeper, if queryType == types.QueryType_All || queryType == types.QueryType_SP { metaNode, found := k.GetMetaNode(ctx, params.AccAddr) if found { - // Adding meta node staking info + // Adding meta node deposit info networkAddr, _ := stratos.SdsAddressFromBech32(metaNode.GetNetworkAddress()) - unBondingStake, unBondedStake, bondedStake, err := k.getNodeStakes( + unBondingDeposit, unBondedDeposit, bondedDeposit, err := k.getNodeDeposit( ctx, metaNode.GetStatus(), networkAddr, @@ -200,13 +200,13 @@ func getStakingInfoByNodeAddr(ctx sdk.Context, req abci.RequestQuery, k Keeper, return nil, err } if !metaNode.Equal(types.MetaNode{}) { - stakingInfo = types.NewStakingInfoByMetaNodeAddr( + depositInfo = types.NewDepositInfoByMetaNodeAddr( metaNode, - unBondingStake, - unBondedStake, - bondedStake, + unBondingDeposit, + unBondedDeposit, + bondedDeposit, ) - bzMeta, err := codec.MarshalJSONIndent(legacyQuerierCdc, stakingInfo) + bzMeta, err := codec.MarshalJSONIndent(legacyQuerierCdc, depositInfo) if err != nil { return nil, sdkerrors.Wrap(sdkerrors.ErrJSONMarshal, err.Error()) } @@ -218,9 +218,9 @@ func getStakingInfoByNodeAddr(ctx sdk.Context, req abci.RequestQuery, k Keeper, if queryType == types.QueryType_All || queryType == types.QueryType_PP { resourceNode, found := k.GetResourceNode(ctx, params.AccAddr) if found { - // Adding resource node staking info + // Adding resource node deposit info networkAddr, _ := stratos.SdsAddressFromBech32(resourceNode.GetNetworkAddress()) - unBondingStake, unBondedStake, bondedStake, err := k.getNodeStakes( + unBondingDeposit, unBondedDeposit, bondedDeposit, err := k.getNodeDeposit( ctx, resourceNode.GetStatus(), networkAddr, @@ -230,13 +230,13 @@ func getStakingInfoByNodeAddr(ctx sdk.Context, req abci.RequestQuery, k Keeper, return nil, err } if !resourceNode.Equal(types.ResourceNode{}) { - stakingInfo = types.NewStakingInfoByResourceNodeAddr( + depositInfo = types.NewDepositInfoByResourceNodeAddr( resourceNode, - unBondingStake, - unBondedStake, - bondedStake, + unBondingDeposit, + unBondedDeposit, + bondedDeposit, ) - bzResource, err := codec.MarshalJSONIndent(legacyQuerierCdc, stakingInfo) + bzResource, err := codec.MarshalJSONIndent(legacyQuerierCdc, depositInfo) if err != nil { return nil, sdkerrors.Wrap(sdkerrors.ErrJSONMarshal, err.Error()) } @@ -248,11 +248,12 @@ func getStakingInfoByNodeAddr(ctx sdk.Context, req abci.RequestQuery, k Keeper, return bz, nil } -func getStakingInfoByOwnerAddr(ctx sdk.Context, req abci.RequestQuery, k Keeper, legacyQuerierCdc *codec.LegacyAmino) (result []byte, err error) { +func getDepositInfoByOwnerAddr(ctx sdk.Context, req abci.RequestQuery, k Keeper, legacyQuerierCdc *codec.LegacyAmino) ( + result []byte, err error) { + var ( - params types.QueryNodesParams - //stakingInfo types.StakingInfo - stakingInfoResponses types.StakingInfos + params types.QueryNodesParams + depositInfoResponses types.DepositInfos ) if req.Data == nil { @@ -299,22 +300,22 @@ func getStakingInfoByOwnerAddr(ctx sdk.Context, req abci.RequestQuery, k Keeper, if err != nil { return nil, status.Error(codes.Internal, err.Error()) } - stakingInfoResponses, err = StakingInfosResourceNodes(ctx, k, resourceNodes) + depositInfoResponses, err = DepositInfosResourceNodes(ctx, k, resourceNodes) if err != nil { return nil, status.Error(codes.Internal, err.Error()) } // Continue to get meta nodes if PageRequest.Limit < resourceNodesPageRes.Total { - resourceNodesPageRes.Total = uint64(len(stakingInfoResponses)) - result, err = codec.MarshalJSONIndent(legacyQuerierCdc, stakingInfoResponses) + resourceNodesPageRes.Total = uint64(len(depositInfoResponses)) + result, err = codec.MarshalJSONIndent(legacyQuerierCdc, depositInfoResponses) if err != nil { return nil, sdkerrors.Wrap(sdkerrors.ErrJSONMarshal, err.Error()) } return result, nil } - metaNodesPageLimit := limit - uint64(len(stakingInfoResponses)) + metaNodesPageLimit := limit - uint64(len(depositInfoResponses)) metaNodesPageOffset := uint64(0) if offset > resourceNodesPageRes.Total { @@ -341,39 +342,41 @@ func getStakingInfoByOwnerAddr(ctx sdk.Context, req abci.RequestQuery, k Keeper, return nil, status.Error(codes.Internal, err.Error()) } - metaNodesStakingInfoResponses, err := StakingInfosMetaNodes(ctx, k, metaNodes) + metaNodesDepositInfoResponses, err := DepositInfosMetaNodes(ctx, k, metaNodes) if err != nil { return nil, status.Error(codes.Internal, err.Error()) } - stakingInfoResponses = append(stakingInfoResponses, metaNodesStakingInfoResponses...) + depositInfoResponses = append(depositInfoResponses, metaNodesDepositInfoResponses...) PageRes := resourceNodesPageRes - PageRes.Total = uint64(len(stakingInfoResponses)) - result, err = codec.MarshalJSONIndent(legacyQuerierCdc, stakingInfoResponses) + PageRes.Total = uint64(len(depositInfoResponses)) + result, err = codec.MarshalJSONIndent(legacyQuerierCdc, depositInfoResponses) if err != nil { return nil, sdkerrors.Wrap(sdkerrors.ErrJSONMarshal, err.Error()) } return result, nil } -func (k Keeper) getNodeStakes(ctx sdk.Context, bondStatus stakingtypes.BondStatus, nodeAddress stratos.SdsAddress, tokens sdk.Int) (unbondingStake, unbondedStake, bondedStake sdk.Int, err error) { - unbondingStake = sdk.NewInt(0) - unbondedStake = sdk.NewInt(0) - bondedStake = sdk.NewInt(0) +func (k Keeper) getNodeDeposit(ctx sdk.Context, bondStatus stakingtypes.BondStatus, nodeAddress stratos.SdsAddress, tokens sdk.Int) ( + unbondingDeposit, unbondedDeposit, bondedDeposit sdk.Int, err error) { + + unbondingDeposit = sdk.NewInt(0) + unbondedDeposit = sdk.NewInt(0) + bondedDeposit = sdk.NewInt(0) switch bondStatus { case stakingtypes.Unbonding: - unbondingStake = k.GetUnbondingNodeBalance(ctx, nodeAddress) + unbondingDeposit = k.GetUnbondingNodeBalance(ctx, nodeAddress) case stakingtypes.Unbonded: - unbondedStake = tokens + unbondedDeposit = tokens case stakingtypes.Bonded: - bondedStake = tokens + bondedDeposit = tokens default: err := fmt.Sprintf("Invalid status of node %s, expected Bonded, Unbonded, or Unbonding, got %s", nodeAddress.String(), bondStatus) return sdk.Int{}, sdk.Int{}, sdk.Int{}, sdkerrors.Wrap(sdkerrors.ErrPanic, err) } - return unbondingStake, unbondedStake, bondedStake, nil + return unbondingDeposit, unbondedDeposit, bondedDeposit, nil } func GetIterator(prefixStore storetypes.KVStore, start []byte, reverse bool) db.Iterator { @@ -392,7 +395,6 @@ func GetIterator(prefixStore storetypes.KVStore, start []byte, reverse bool) db. return prefixStore.Iterator(start, nil) } -// Iteration for querying total stakes of resource/meta nodes func FilteredPaginate(cdc codec.Codec, prefixStore storetypes.KVStore, queryOwnerAddr sdk.AccAddress, @@ -547,128 +549,128 @@ func FilteredPaginate(cdc codec.Codec, return res, nil } -// StakingInfosResourceNodes Iteration for querying StakingInfos of resource nodes by owner(cmd and rest) -func StakingInfosResourceNodes( +// DepositInfosResourceNodes Iteration for querying DepositInfos of resource nodes by owner(cmd and rest) +func DepositInfosResourceNodes( ctx sdk.Context, k Keeper, resourceNodes types.ResourceNodes, -) (types.StakingInfos, error) { - res := types.StakingInfos{} - resp := make([]*types.StakingInfo, len(resourceNodes)) +) (types.DepositInfos, error) { + res := types.DepositInfos{} + resp := make([]*types.DepositInfo, len(resourceNodes)) for i, resourceNode := range resourceNodes { - stakingInfoResp, err := StakingInfoToStakingInfoResourceNode(ctx, k, resourceNode) + depositInfo, err := GetDepositInfoByResourceNode(ctx, k, resourceNode) if err != nil { return nil, err } - resp[i] = &stakingInfoResp + resp[i] = &depositInfo res = append(res, *resp[i]) } return res, nil } -// StakingInfosMetaNodes Iteration for querying StakingInfos of meta nodes by owner(cmd and rest) -func StakingInfosMetaNodes( +// DepositInfosMetaNodes Iteration for querying DepositInfos of meta nodes by owner(cmd and rest) +func DepositInfosMetaNodes( ctx sdk.Context, k Keeper, metaNodes types.MetaNodes, -) (types.StakingInfos, error) { - res := types.StakingInfos{} - resp := make([]*types.StakingInfo, len(metaNodes)) +) (types.DepositInfos, error) { + res := types.DepositInfos{} + resp := make([]*types.DepositInfo, len(metaNodes)) for i, metaNode := range metaNodes { - stakingInfoResp, err := StakingInfoToStakingInfoMetaNode(ctx, k, metaNode) + depositInfo, err := GetDepositInfoByMetaNode(ctx, k, metaNode) if err != nil { return nil, err } - resp[i] = &stakingInfoResp + resp[i] = &depositInfo res = append(res, *resp[i]) } return res, nil } -// StakingInfosToStakingResourceNodes Iteration for querying StakingInfos of resource nodes by owner(grpc) -func StakingInfosToStakingResourceNodes( +// GetDepositInfosByResourceNodes Iteration for querying DepositInfos of resource nodes by owner(grpc) +func GetDepositInfosByResourceNodes( ctx sdk.Context, k Keeper, resourceNodes types.ResourceNodes, -) ([]*types.StakingInfo, error) { - resp := make([]*types.StakingInfo, len(resourceNodes)) +) ([]*types.DepositInfo, error) { + resp := make([]*types.DepositInfo, len(resourceNodes)) for i, resourceNode := range resourceNodes { - stakingInfoResp, err := StakingInfoToStakingInfoResourceNode(ctx, k, resourceNode) + depositInfo, err := GetDepositInfoByResourceNode(ctx, k, resourceNode) if err != nil { return nil, err } - resp[i] = &stakingInfoResp + resp[i] = &depositInfo } return resp, nil } -// StakingInfosToStakingMetaNodes Iteration for querying StakingInfos of meta nodes by owner(grpc) -func StakingInfosToStakingMetaNodes( +// GetDepositInfosByMetaNodes Iteration for querying DepositInfos of meta nodes by owner(grpc) +func GetDepositInfosByMetaNodes( ctx sdk.Context, k Keeper, metaNodes types.MetaNodes, -) ([]*types.StakingInfo, error) { +) ([]*types.DepositInfo, error) { - resp := make([]*types.StakingInfo, len(metaNodes)) + resp := make([]*types.DepositInfo, len(metaNodes)) for i, metaNode := range metaNodes { - stakingInfoResp, err := StakingInfoToStakingInfoMetaNode(ctx, k, metaNode) + depositInfo, err := GetDepositInfoByMetaNode(ctx, k, metaNode) if err != nil { return nil, err } - resp[i] = &stakingInfoResp + resp[i] = &depositInfo } return resp, nil } -func StakingInfoToStakingInfoResourceNode(ctx sdk.Context, k Keeper, node types.ResourceNode) (types.StakingInfo, error) { +func GetDepositInfoByResourceNode(ctx sdk.Context, k Keeper, node types.ResourceNode) (types.DepositInfo, error) { networkAddr, _ := stratos.SdsAddressFromBech32(node.GetNetworkAddress()) - stakingInfo := types.StakingInfo{} - unBondingStake, unBondedStake, bondedStake, er := k.getNodeStakes( + depositInfo := types.DepositInfo{} + unBondingDeposit, unBondedDeposit, bondedDeposit, er := k.getNodeDeposit( ctx, node.GetStatus(), networkAddr, node.Tokens, ) if er != nil { - return stakingInfo, er + return depositInfo, er } if !node.Equal(types.ResourceNode{}) { - stakingInfo = types.NewStakingInfoByResourceNodeAddr( + depositInfo = types.NewDepositInfoByResourceNodeAddr( node, - unBondingStake, - unBondedStake, - bondedStake, + unBondingDeposit, + unBondedDeposit, + bondedDeposit, ) } - return stakingInfo, nil + return depositInfo, nil } -func StakingInfoToStakingInfoMetaNode(ctx sdk.Context, k Keeper, node types.MetaNode) (types.StakingInfo, error) { +func GetDepositInfoByMetaNode(ctx sdk.Context, k Keeper, node types.MetaNode) (types.DepositInfo, error) { networkAddr, _ := stratos.SdsAddressFromBech32(node.GetNetworkAddress()) - stakingInfo := types.StakingInfo{} - unBondingStake, unBondedStake, bondedStake, er := k.getNodeStakes( + depositInfo := types.DepositInfo{} + unBondingDeposit, unBondedDeposit, bondedDeposit, er := k.getNodeDeposit( ctx, node.GetStatus(), networkAddr, node.Tokens, ) if er != nil { - return stakingInfo, er + return depositInfo, er } if !node.Equal(types.MetaNode{}) { - stakingInfo = types.NewStakingInfoByMetaNodeAddr( + depositInfo = types.NewDepositInfoByMetaNodeAddr( node, - unBondingStake, - unBondedStake, - bondedStake, + unBondingDeposit, + unBondedDeposit, + bondedDeposit, ) } - return stakingInfo, nil + return depositInfo, nil } diff --git a/x/register/keeper/resource_node.go b/x/register/keeper/resource_node.go index deb00921..0738a6c8 100644 --- a/x/register/keeper/resource_node.go +++ b/x/register/keeper/resource_node.go @@ -89,8 +89,8 @@ func (k Keeper) GetResourceNodeIterator(ctx sdk.Context) sdk.Iterator { return iterator } -// AddResourceNodeStake Update the tokens of an existing resource node -func (k Keeper) AddResourceNodeStake(ctx sdk.Context, resourceNode types.ResourceNode, tokenToAdd sdk.Coin, +// AddResourceNodeDeposit Update the tokens of an existing resource node +func (k Keeper) AddResourceNodeDeposit(ctx sdk.Context, resourceNode types.ResourceNode, tokenToAdd sdk.Coin, ) (ozoneLimitChange, availableTokenAmtBefore, availableTokenAmtAfter sdk.Int, err error) { needAddCount := true @@ -102,8 +102,8 @@ func (k Keeper) AddResourceNodeStake(ctx sdk.Context, resourceNode types.Resourc if found && nodeStored.IsBonded() { needAddCount = false } - unbondingStake := k.GetUnbondingNodeBalance(ctx, networkAddr) - availableTokenAmtBefore = resourceNode.Tokens.Sub(unbondingStake) + unbondingDeposit := k.GetUnbondingNodeBalance(ctx, networkAddr) + availableTokenAmtBefore = resourceNode.Tokens.Sub(unbondingDeposit) coins := sdk.NewCoins(tokenToAdd) @@ -139,7 +139,7 @@ func (k Keeper) AddResourceNodeStake(ctx sdk.Context, resourceNode types.Resourc resourceNode = resourceNode.AddToken(tokenToAdd.Amount) //resourceNode.Suspend = false - // set status from unBonded to bonded & move stake from not bonded token pool to bonded token pool + // set status from unBonded to bonded & move deposit from not bonded token pool to bonded token pool // since resource node registration does not require voting for now if resourceNode.Status == stakingtypes.Unbonded { resourceNode.Status = stakingtypes.Bonded @@ -194,8 +194,8 @@ func (k Keeper) RemoveTokenFromPoolWhileUnbondingResourceNode(ctx sdk.Context, r return nil } -// SubtractResourceNodeStake Update the tokens of an existing resource node -func (k Keeper) SubtractResourceNodeStake(ctx sdk.Context, resourceNode types.ResourceNode, tokenToSub sdk.Coin) error { +// SubtractResourceNodeDeposit Update the tokens of an existing resource node +func (k Keeper) SubtractResourceNodeDeposit(ctx sdk.Context, resourceNode types.ResourceNode, tokenToSub sdk.Coin) error { networkAddr, err := stratos.SdsAddressFromBech32(resourceNode.GetNetworkAddress()) if err != nil { return types.ErrInvalidNetworkAddr @@ -247,11 +247,11 @@ func (k Keeper) SubtractResourceNodeStake(ctx sdk.Context, resourceNode types.Re } resourceNode = resourceNode.SubToken(tokenToSub.Amount) - newStake := resourceNode.Tokens + newDeposit := resourceNode.Tokens k.SetResourceNode(ctx, resourceNode) - if newStake.IsZero() { + if newDeposit.IsZero() { err = k.removeResourceNode(ctx, networkAddr) if err != nil { return err @@ -279,7 +279,7 @@ func (k Keeper) removeResourceNode(ctx sdk.Context, addr stratos.SdsAddress) err } func (k Keeper) RegisterResourceNode(ctx sdk.Context, networkAddr stratos.SdsAddress, pubKey cryptotypes.PubKey, ownerAddr sdk.AccAddress, - description types.Description, nodeType types.NodeType, stake sdk.Coin) (ozoneLimitChange sdk.Int, err error) { + description types.Description, nodeType types.NodeType, deposit sdk.Coin) (ozoneLimitChange sdk.Int, err error) { if _, found := k.GetResourceNode(ctx, networkAddr); found { ctx.Logger().Error("Resource node already exist") @@ -290,18 +290,18 @@ func (k Keeper) RegisterResourceNode(ctx sdk.Context, networkAddr stratos.SdsAdd return ozoneLimitChange, types.ErrMetaNodePubKeyExists } - if stake.GetDenom() != k.BondDenom(ctx) { + if deposit.GetDenom() != k.BondDenom(ctx) { return ozoneLimitChange, types.ErrBadDenom } - if stake.IsLT(k.ResourceNodeMinStake(ctx)) { - return ozoneLimitChange, types.ErrInsufficientStake + if deposit.IsLT(k.ResourceNodeMinDeposit(ctx)) { + return ozoneLimitChange, types.ErrInsufficientDeposit } resourceNode, err := types.NewResourceNode(networkAddr, pubKey, ownerAddr, description, nodeType, ctx.BlockHeader().Time) if err != nil { return ozoneLimitChange, err } - ozoneLimitChange, _, _, err = k.AddResourceNodeStake(ctx, resourceNode, stake) + ozoneLimitChange, _, _, err = k.AddResourceNodeDeposit(ctx, resourceNode, deposit) return ozoneLimitChange, err } @@ -328,11 +328,11 @@ func (k Keeper) UpdateResourceNode(ctx sdk.Context, description types.Descriptio return nil } -// Add stake only -func (k Keeper) UpdateResourceNodeStake(ctx sdk.Context, networkAddr stratos.SdsAddress, ownerAddr sdk.AccAddress, stakeDelta sdk.Coin) ( +// Add deposit only +func (k Keeper) UpdateResourceNodeDeposit(ctx sdk.Context, networkAddr stratos.SdsAddress, ownerAddr sdk.AccAddress, depositDelta sdk.Coin) ( ozoneLimitChange, availableTokenAmtBefore, availableTokenAmtAfter sdk.Int, completionTime time.Time, resourcenode types.ResourceNode, err error) { - if stakeDelta.GetDenom() != k.BondDenom(ctx) { + if depositDelta.GetDenom() != k.BondDenom(ctx) { return sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroInt(), time.Time{}, types.ResourceNode{}, types.ErrBadDenom } @@ -347,49 +347,49 @@ func (k Keeper) UpdateResourceNodeStake(ctx sdk.Context, networkAddr stratos.Sds } completionTime = ctx.BlockHeader().Time - ozoneLimitChange, availableTokenAmtBefore, availableTokenAmtAfter, err = k.AddResourceNodeStake(ctx, node, stakeDelta) + ozoneLimitChange, availableTokenAmtBefore, availableTokenAmtAfter, err = k.AddResourceNodeDeposit(ctx, node, depositDelta) if err != nil { return sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroInt(), time.Time{}, types.ResourceNode{}, err } return ozoneLimitChange, availableTokenAmtBefore, availableTokenAmtAfter, completionTime, node, nil } -func (k Keeper) UpdateEffectiveStake(ctx sdk.Context, networkAddr stratos.SdsAddress, effectiveStakeAfter sdk.Int) ( - ozoneLimitChange, effectiveStakeChange sdk.Int, isUnsuspendedDuringUpdate bool, err error) { +func (k Keeper) UpdateEffectiveDeposit(ctx sdk.Context, networkAddr stratos.SdsAddress, effectiveDepositAfter sdk.Int) ( + ozoneLimitChange, effectiveDepositChange sdk.Int, isUnsuspendedDuringUpdate bool, err error) { node, found := k.GetResourceNode(ctx, networkAddr) if !found { return sdk.ZeroInt(), sdk.ZeroInt(), false, types.ErrNoResourceNodeFound } - // before calc ozone limit change, get unbonding stake and calc effective stake to trigger ozLimit change - unbondingStake := k.GetUnbondingNodeBalance(ctx, networkAddr) - // no effective stake after subtracting unbonding stake - if node.Tokens.LTE(unbondingStake) { + // before calc ozone limit change, get unbonding deposit and calc effective deposit to trigger ozLimit change + unbondingDeposit := k.GetUnbondingNodeBalance(ctx, networkAddr) + // no effective deposit after subtracting unbonding deposit + if node.Tokens.LTE(unbondingDeposit) { return sdk.ZeroInt(), sdk.ZeroInt(), false, types.ErrInsufficientBalance } - availableStake := node.Tokens.Sub(unbondingStake) - if availableStake.LT(effectiveStakeAfter) { + availableDeposit := node.Tokens.Sub(unbondingDeposit) + if availableDeposit.LT(effectiveDepositAfter) { return sdk.ZeroInt(), sdk.ZeroInt(), false, types.ErrInsufficientBalance } - isUnsuspendedDuringUpdate = node.Suspend == true && node.EffectiveTokens.Equal(sdk.ZeroInt()) && effectiveStakeAfter.GT(sdk.ZeroInt()) + isUnsuspendedDuringUpdate = node.Suspend == true && node.EffectiveTokens.Equal(sdk.ZeroInt()) && effectiveDepositAfter.GT(sdk.ZeroInt()) - effectiveStakeBefore := sdk.NewInt(0).Add(node.EffectiveTokens) - effectiveStakeChange = effectiveStakeAfter.Sub(effectiveStakeBefore) + effectiveDepositBefore := sdk.NewInt(0).Add(node.EffectiveTokens) + effectiveDepositChange = effectiveDepositAfter.Sub(effectiveDepositBefore) - node.EffectiveTokens = effectiveStakeAfter - // effectiveStakeAfter > 0 means node.Suspend = false + node.EffectiveTokens = effectiveDepositAfter + // effectiveDepositAfter > 0 means node.Suspend = false node.Suspend = false k.SetResourceNode(ctx, node) - if effectiveStakeChange.IsNegative() && k.IsUnbondable(ctx, effectiveStakeChange.Abs()) { - ozoneLimitChange = k.DecreaseOzoneLimitBySubtractStake(ctx, effectiveStakeChange.Abs()) + if effectiveDepositChange.IsNegative() && k.IsUnbondable(ctx, effectiveDepositChange.Abs()) { + ozoneLimitChange = k.DecreaseOzoneLimitBySubtractDeposit(ctx, effectiveDepositChange.Abs()) } - if effectiveStakeChange.IsPositive() { - ozoneLimitChange = k.IncreaseOzoneLimitByAddStake(ctx, effectiveStakeChange) + if effectiveDepositChange.IsPositive() { + ozoneLimitChange = k.IncreaseOzoneLimitByAddDeposit(ctx, effectiveDepositChange) } - return ozoneLimitChange, effectiveStakeChange, isUnsuspendedDuringUpdate, nil + return ozoneLimitChange, effectiveDepositChange, isUnsuspendedDuringUpdate, nil } func (k Keeper) GetResourceNodeBondedToken(ctx sdk.Context) (token sdk.Coin) { diff --git a/x/register/keeper/store.go b/x/register/keeper/store.go index 5578b5b0..bcd353bc 100644 --- a/x/register/keeper/store.go +++ b/x/register/keeper/store.go @@ -9,21 +9,21 @@ import ( "github.com/stratosnet/stratos-chain/x/register/types" ) -func (k Keeper) SetInitialGenesisStakeTotal(ctx sdk.Context, stake sdk.Int) { +func (k Keeper) SetInitialGenesisDepositTotal(ctx sdk.Context, deposit sdk.Int) { store := ctx.KVStore(k.storeKey) - b := k.cdc.MustMarshalLengthPrefixed(&stratos.Int{Value: &stake}) - store.Set(types.InitialGenesisStakeTotalKey, b) + b := k.cdc.MustMarshalLengthPrefixed(&stratos.Int{Value: &deposit}) + store.Set(types.InitialGenesisDepositTotalKey, b) } -func (k Keeper) GetInitialGenesisStakeTotal(ctx sdk.Context) (stake sdk.Int) { +func (k Keeper) GetInitialGenesisDepositTotal(ctx sdk.Context) (deposit sdk.Int) { store := ctx.KVStore(k.storeKey) - b := store.Get(types.InitialGenesisStakeTotalKey) + b := store.Get(types.InitialGenesisDepositTotalKey) if b == nil { return sdk.ZeroInt() } value := stratos.Int{} k.cdc.MustUnmarshalLengthPrefixed(b, &value) - stake = *value.Value + deposit = *value.Value return } @@ -47,8 +47,8 @@ func (k Keeper) GetRemainingOzoneLimit(ctx sdk.Context) (value sdk.Int) { func (k Keeper) IsUnbondable(ctx sdk.Context, unbondAmt sdk.Int) bool { remaining := k.GetRemainingOzoneLimit(ctx) - stakeNozRate := k.GetStakeNozRate(ctx) - return remaining.ToDec().GTE(unbondAmt.ToDec().Quo(stakeNozRate)) + depositNozRate := k.GetDepositNozRate(ctx) + return remaining.ToDec().GTE(unbondAmt.ToDec().Quo(depositNozRate)) } // SetUnbondingNode sets the unbonding node @@ -168,39 +168,39 @@ func (k Keeper) GetMetaNodeRegistrationVotePool(ctx sdk.Context, nodeAddr strato return votePool, true } -func (k Keeper) SetEffectiveTotalStake(ctx sdk.Context, stake sdk.Int) { +func (k Keeper) SetEffectiveTotalDeposit(ctx sdk.Context, deposit sdk.Int) { store := ctx.KVStore(k.storeKey) - bz := k.cdc.MustMarshalLengthPrefixed(&stratos.Int{Value: &stake}) - store.Set(types.EffectiveGenesisStakeTotalKey, bz) + bz := k.cdc.MustMarshalLengthPrefixed(&stratos.Int{Value: &deposit}) + store.Set(types.EffectiveGenesisDepositTotalKey, bz) } -func (k Keeper) GetEffectiveTotalStake(ctx sdk.Context) (stake sdk.Int) { +func (k Keeper) GetEffectiveTotalDeposit(ctx sdk.Context) (deposit sdk.Int) { store := ctx.KVStore(k.storeKey) - bz := store.Get(types.EffectiveGenesisStakeTotalKey) + bz := store.Get(types.EffectiveGenesisDepositTotalKey) if bz == nil { return sdk.ZeroInt() } intValue := stratos.Int{} k.cdc.MustUnmarshalLengthPrefixed(bz, &intValue) - stake = *intValue.Value + deposit = *intValue.Value return } -func (k Keeper) SetStakeNozRate(ctx sdk.Context, stakeNozRate sdk.Dec) { +func (k Keeper) SetDepositNozRate(ctx sdk.Context, depositNozRate sdk.Dec) { store := ctx.KVStore(k.storeKey) - bz := k.cdc.MustMarshalLengthPrefixed(&stratos.Dec{Value: &stakeNozRate}) - store.Set(types.StakeNozRateKey, bz) + bz := k.cdc.MustMarshalLengthPrefixed(&stratos.Dec{Value: &depositNozRate}) + store.Set(types.DepositNozRateKey, bz) } -func (k Keeper) GetStakeNozRate(ctx sdk.Context) (stakeNozRate sdk.Dec) { +func (k Keeper) GetDepositNozRate(ctx sdk.Context) (depositNozRate sdk.Dec) { store := ctx.KVStore(k.storeKey) - bz := store.Get(types.StakeNozRateKey) + bz := store.Get(types.DepositNozRateKey) if bz == nil { - panic("Stored stake noz rate should not be nil") + panic("Stored deposit noz rate should not be nil") } decValue := stratos.Dec{} k.cdc.MustUnmarshalLengthPrefixed(bz, &decValue) - stakeNozRate = *decValue.Value + depositNozRate = *decValue.Value return } diff --git a/x/register/register_test.go b/x/register/register_test.go deleted file mode 100644 index 74b22079..00000000 --- a/x/register/register_test.go +++ /dev/null @@ -1,157 +0,0 @@ -package register - -// -//import ( -// "time" -// -// sdk "github.com/cosmos/cosmos-sdk/types" -// "github.com/cosmos/cosmos-sdk/x/auth" -// authexported "github.com/cosmos/cosmos-sdk/x/auth/exported" -// "github.com/cosmos/cosmos-sdk/x/mock" -// stratos "github.com/stratosnet/stratos-chain/types" -// "github.com/tendermint/tendermint/crypto/ed25519" -// "github.com/tendermint/tendermint/crypto/secp256k1" -//) -// -//var ( -// resOwnerPrivKey1 = secp256k1.GenPrivKey() -// resOwnerPrivKey2 = secp256k1.GenPrivKey() -// //resOwnerPrivKey3 = ed25519.GenPrivKey() -// resOwnerPrivKey3 = secp256k1.GenPrivKey() -// idxOwnerPrivKey1 = secp256k1.GenPrivKey() -// idxOwnerPrivKey2 = secp256k1.GenPrivKey() -// idxOwnerPrivKey3 = secp256k1.GenPrivKey() -// -// resOwnerAddr1 = sdk.AccAddress(resOwnerPrivKey1.PubKey().Address()) -// resOwnerAddr2 = sdk.AccAddress(resOwnerPrivKey2.PubKey().Address()) -// resOwnerAddr3 = sdk.AccAddress(resOwnerPrivKey3.PubKey().Address()) -// idxOwnerAddr1 = sdk.AccAddress(idxOwnerPrivKey1.PubKey().Address()) -// idxOwnerAddr2 = sdk.AccAddress(idxOwnerPrivKey2.PubKey().Address()) -// idxOwnerAddr3 = sdk.AccAddress(idxOwnerPrivKey3.PubKey().Address()) -// -// resOwnerInitBalance = sdk.NewInt(1000000000000) -// idxOwnerInitBalance = sdk.NewInt(1000000000000) -// -// resNodePrivKey1 = secp256k1.GenPrivKey() -// resNodePrivKey2 = secp256k1.GenPrivKey() -// resNodePrivKey3 = ed25519.GenPrivKey() -// //resNodePrivKey3 = secp256k1.GenPrivKey() -// idxNodePrivKey1 = secp256k1.GenPrivKey() -// idxNodePrivKey2 = secp256k1.GenPrivKey() -// idxNodePrivKey3 = secp256k1.GenPrivKey() -// -// resNodePubKey1 = resNodePrivKey1.PubKey() -// resNodePubKey2 = resNodePrivKey2.PubKey() -// resNodePubKey3 = resNodePrivKey3.PubKey() -// idxNodePubKey1 = idxNodePrivKey1.PubKey() -// idxNodePubKey2 = idxNodePrivKey2.PubKey() -// idxNodePubKey3 = idxNodePrivKey3.PubKey() -// -// resNodeAddr1 = sdk.AccAddress(resNodePubKey1.Address()) -// resNodeAddr2 = sdk.AccAddress(resNodePubKey2.Address()) -// resNodeAddr3 = sdk.AccAddress(resNodePubKey3.Address()) -// idxNodeAddr1 = sdk.AccAddress(idxNodePubKey1.Address()) -// idxNodeAddr2 = sdk.AccAddress(idxNodePubKey2.Address()) -// idxNodeAddr3 = sdk.AccAddress(idxNodePubKey3.Address()) -// -// resNodeNetworkId1 = stratos.SdsAddress(resNodePubKey1.Address()) -// resNodeNetworkId2 = stratos.SdsAddress(resNodePubKey2.Address()) -// resNodeNetworkId3 = stratos.SdsAddress(resNodePubKey3.Address()) -// idxNodeNetworkId1 = stratos.SdsAddress(idxNodePubKey1.Address()) -// idxNodeNetworkId2 = stratos.SdsAddress(idxNodePubKey2.Address()) -// idxNodeNetworkId3 = stratos.SdsAddress(idxNodePubKey3.Address()) -// -// resNodeInitStake = sdk.NewInt(10000000000) -// idxNodeInitStake = sdk.NewInt(10000000000) -// initialNOzonePrice = sdk.NewDec(1000000) // 0.001 gwei -> 1 noz -//) -// -//func setupAllResourceNodes() []ResourceNode { -// time, _ := time.Parse(time.RubyDate, "Fri Sep 24 10:37:13 -0400 2021") -// resourceNode1 := NewResourceNode(resNodeNetworkId1, resNodePubKey1, resOwnerAddr1, NewDescription("sds://resourceNode1", "", "", "", ""), 4, time) -// resourceNode1 = resourceNode1.AddToken(resNodeInitStake) -// resourceNode1.Status = sdk.Bonded -// -// resourceNode3 := NewResourceNode(resNodeNetworkId3, resNodePubKey3, resOwnerAddr3, NewDescription("sds://resourceNode3", "", "", "", ""), 4, time) -// resourceNode3 = resourceNode3.AddToken(resNodeInitStake) -// resourceNode3.Status = sdk.Bonded -// -// var resourceNodes []ResourceNode -// resourceNodes = append(resourceNodes, resourceNode1, resourceNode3) -// return resourceNodes -//} -// -//func setupAllIndexingNodes() []IndexingNode { -// var indexingNodes []IndexingNode -// time, _ := time.Parse(time.RubyDate, "Fri Sep 24 10:37:13 -0400 2021") -// indexingNode1 := NewIndexingNode(stratos.SdsAddress(idxNodeAddr1), idxNodePubKey1, idxOwnerAddr1, NewDescription("sds://indexingNode1", "", "", "", ""), time) -// indexingNode2 := NewIndexingNode(stratos.SdsAddress(idxNodeAddr2), idxNodePubKey2, idxOwnerAddr2, NewDescription("sds://indexingNode2", "", "", "", ""), time) -// -// indexingNode1 = indexingNode1.AddToken(idxNodeInitStake) -// indexingNode2 = indexingNode2.AddToken(idxNodeInitStake) -// -// indexingNode1.Status = sdk.Bonded -// indexingNode2.Status = sdk.Unbonded -// -// indexingNodes = append(indexingNodes, indexingNode1) -// indexingNodes = append(indexingNodes, indexingNode2) -// -// return indexingNodes -// -//} -// -//func setupAccounts(mApp *mock.App) []authexported.Account { -// //************************** setup resource nodes owners' accounts ************************** -// resOwnerAcc1 := &auth.BaseAccount{ -// Address: resOwnerAddr1, -// Coins: sdk.Coins{sdk.NewCoin("wei", resOwnerInitBalance)}, -// } -// resOwnerAcc2 := &auth.BaseAccount{ -// Address: resOwnerAddr2, -// Coins: sdk.Coins{sdk.NewCoin("wei", resOwnerInitBalance)}, -// } -// -// resOwnerAcc3 := &auth.BaseAccount{ -// Address: resOwnerAddr3, -// Coins: sdk.Coins{sdk.NewCoin("wei", resOwnerInitBalance)}, -// } -// -// idxOwnerAcc1 := &auth.BaseAccount{ -// Address: idxOwnerAddr1, -// Coins: sdk.Coins{sdk.NewCoin("wei", idxOwnerInitBalance)}, -// } -// idxOwnerAcc2 := &auth.BaseAccount{ -// Address: idxOwnerAddr2, -// Coins: sdk.Coins{sdk.NewCoin("wei", idxOwnerInitBalance)}, -// } -// idxOwnerAcc3 := &auth.BaseAccount{ -// Address: idxOwnerAddr3, -// Coins: sdk.Coins{sdk.NewCoin("wei", idxOwnerInitBalance)}, -// } -// -// resNodeAcc2 := &auth.BaseAccount{ -// Address: resNodeAddr2, -// Coins: sdk.Coins{sdk.NewCoin("wei", sdk.ZeroInt())}, -// } -// -// resNodeAcc3 := &auth.BaseAccount{ -// Address: resNodeAddr3, -// Coins: sdk.Coins{sdk.NewCoin("wei", sdk.ZeroInt())}, -// } -// -// idxNodeAcc1 := &auth.BaseAccount{ -// Address: idxNodeAddr1, -// Coins: sdk.Coins{sdk.NewCoin("wei", sdk.ZeroInt())}, -// } -// -// idxNodeAcc3 := &auth.BaseAccount{ -// Address: idxNodeAddr3, -// Coins: sdk.Coins{sdk.NewCoin("wei", sdk.ZeroInt())}, -// } -// -// accs := []authexported.Account{ -// resOwnerAcc1, resOwnerAcc2, resOwnerAcc3, idxOwnerAcc1, idxOwnerAcc2, idxOwnerAcc3, resNodeAcc2, resNodeAcc3, idxNodeAcc1, idxNodeAcc3, -// } -// -// return accs -//} diff --git a/x/register/types/codec.go b/x/register/types/codec.go index 597adfaa..04f141cb 100644 --- a/x/register/types/codec.go +++ b/x/register/types/codec.go @@ -14,12 +14,12 @@ func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { cdc.RegisterConcrete(MsgCreateResourceNode{}, "register/CreateResourceNodeTx", nil) cdc.RegisterConcrete(MsgRemoveResourceNode{}, "register/RemoveResourceNodeTx", nil) cdc.RegisterConcrete(MsgUpdateResourceNode{}, "register/UpdateResourceNodeTx", nil) - cdc.RegisterConcrete(MsgUpdateResourceNodeStake{}, "register/UpdateResourceNodeStakeTx", nil) + cdc.RegisterConcrete(MsgUpdateResourceNodeDeposit{}, "register/UpdateResourceNodeDepositTx", nil) cdc.RegisterConcrete(MsgCreateMetaNode{}, "register/CreateMetaNodeTx", nil) cdc.RegisterConcrete(MsgRemoveMetaNode{}, "register/RemoveMetaNodeTx", nil) cdc.RegisterConcrete(MsgUpdateMetaNode{}, "register/UpdateMetaNodeTx", nil) - cdc.RegisterConcrete(MsgUpdateMetaNodeStake{}, "register/UpdateMetaNodeStakeTx", nil) + cdc.RegisterConcrete(MsgUpdateMetaNodeDeposit{}, "register/UpdateMetaNodeDepositTx", nil) cdc.RegisterConcrete(MsgMetaNodeRegistrationVote{}, "register/MsgMetaNodeRegistrationVote", nil) } @@ -29,11 +29,11 @@ func RegisterInterfaces(registry types.InterfaceRegistry) { &MsgCreateResourceNode{}, &MsgRemoveResourceNode{}, &MsgUpdateResourceNode{}, - &MsgUpdateResourceNodeStake{}, + &MsgUpdateResourceNodeDeposit{}, &MsgCreateMetaNode{}, &MsgRemoveResourceNode{}, &MsgUpdateMetaNode{}, - &MsgUpdateMetaNodeStake{}, + &MsgUpdateMetaNodeDeposit{}, &MsgMetaNodeRegistrationVote{}, ) registry.RegisterImplementations( diff --git a/x/register/types/errors.go b/x/register/types/errors.go index 7900f60f..de11deb1 100644 --- a/x/register/types/errors.go +++ b/x/register/types/errors.go @@ -14,7 +14,7 @@ const ( codeErrEmptyResourceNodeAddr codeErrEmptyMetaNodeAddr codeErrBadDenom - codeErrInsufficientStake + codeErrInsufficientDeposit codeErrResourceNodePubKeyExists codeErrMetaNodePubKeyExists codeErrNoResourceNodeFound @@ -44,9 +44,9 @@ const ( codeErrNoUnbondingNode codeErrMaxUnbondingNodeEntries codeErrUnbondingNode - codeErrStakeNozRate + codeErrDepositNozRate codeErrRemainingNozLimit - codeErrInvalidStakeChange + codeErrInvalidDepositChange codeErrInvalidNodeType codeErrUnknownAccountAddress codeErrUnknownPubKey @@ -57,8 +57,8 @@ const ( codeErrUnbondMetaNode codeErrUpdateResourceNode codeErrUpdateMetaNode - codeErrUpdateResourceNodeStake - codeErrUpdateMetaNodeStake + codeErrUpdateResourceNodeDeposit + codeErrUpdateMetaNodeDeposit codeErrVoteMetaNode codeErrResourceNodeRegDisabled codeErrInvalidSuspensionStatForUnbondNode @@ -77,7 +77,7 @@ var ( ErrEmptyResourceNodeAddr = sdkerrors.Register(ModuleName, codeErrEmptyResourceNodeAddr, "missing resource node address") ErrEmptyMetaNodeAddr = sdkerrors.Register(ModuleName, codeErrEmptyMetaNodeAddr, "missing Meta node address") ErrBadDenom = sdkerrors.Register(ModuleName, codeErrBadDenom, "invalid coin denomination") - ErrInsufficientStake = sdkerrors.Register(ModuleName, codeErrInsufficientStake, "insufficient stake") + ErrInsufficientDeposit = sdkerrors.Register(ModuleName, codeErrInsufficientDeposit, "insufficient deposit") ErrResourceNodePubKeyExists = sdkerrors.Register(ModuleName, codeErrResourceNodePubKeyExists, "resource node already exist for this pubkey; must use new resource node pubkey") ErrMetaNodePubKeyExists = sdkerrors.Register(ModuleName, codeErrMetaNodePubKeyExists, "meta node already exist for this pubkey; must use new meta node pubkey") ErrNoResourceNodeFound = sdkerrors.Register(ModuleName, codeErrNoResourceNodeFound, "resource node does not exist") @@ -107,9 +107,9 @@ var ( ErrNoUnbondingNode = sdkerrors.Register(ModuleName, codeErrNoUnbondingNode, "no unbonding node found") ErrMaxUnbondingNodeEntries = sdkerrors.Register(ModuleName, codeErrMaxUnbondingNodeEntries, "too many unbonding node entries for networkAddr tuple") ErrUnbondingNode = sdkerrors.Register(ModuleName, codeErrUnbondingNode, "changes cannot be made to an unbonding node") - ErrStakeNozRate = sdkerrors.Register(ModuleName, codeErrStakeNozRate, "stake noz rate must be positive") + ErrDepositNozRate = sdkerrors.Register(ModuleName, codeErrDepositNozRate, "deposit noz rate must be positive") ErrRemainingNozLimit = sdkerrors.Register(ModuleName, codeErrRemainingNozLimit, "remaining Noz Limit must be non-negative") - ErrInvalidStakeChange = sdkerrors.Register(ModuleName, codeErrInvalidStakeChange, "invalid change for stake") + ErrInvalidDepositChange = sdkerrors.Register(ModuleName, codeErrInvalidDepositChange, "invalid change for deposit") ErrInvalidNodeType = sdkerrors.Register(ModuleName, codeErrInvalidNodeType, "invalid node type") ErrUnknownAccountAddress = sdkerrors.Register(ModuleName, codeErrUnknownAccountAddress, "account address does not exist") ErrUnknownPubKey = sdkerrors.Register(ModuleName, codeErrUnknownPubKey, "unknown pubKey ") @@ -120,8 +120,8 @@ var ( ErrUnbondMetaNode = sdkerrors.Register(ModuleName, codeErrUnbondMetaNode, "failed to unbond meta node") ErrUpdateResourceNode = sdkerrors.Register(ModuleName, codeErrUpdateResourceNode, "failed to update resource node") ErrUpdateMetaNode = sdkerrors.Register(ModuleName, codeErrUpdateMetaNode, "failed to update meta node") - ErrUpdateResourceNodeStake = sdkerrors.Register(ModuleName, codeErrUpdateResourceNodeStake, "failed to update stake for resource node") - ErrUpdateMetaNodeStake = sdkerrors.Register(ModuleName, codeErrUpdateMetaNodeStake, "failed to update stake for meta node") + ErrUpdateResourceNodeDeposit = sdkerrors.Register(ModuleName, codeErrUpdateResourceNodeDeposit, "failed to update deposit for resource node") + ErrUpdateMetaNodeDeposit = sdkerrors.Register(ModuleName, codeErrUpdateMetaNodeDeposit, "failed to update deposit for meta node") ErrVoteMetaNode = sdkerrors.Register(ModuleName, codeErrVoteMetaNode, "failed to vote meta node") ErrResourceNodeRegDisabled = sdkerrors.Register(ModuleName, codeErrResourceNodeRegDisabled, "resource node registration is disabled") ErrInvalidSuspensionStatForUnbondNode = sdkerrors.Register(ModuleName, codeErrInvalidSuspensionStatForUnbondNode, "cannot unbond a suspended node") diff --git a/x/register/types/events.go b/x/register/types/events.go index 05fc47e6..82c3a6f3 100644 --- a/x/register/types/events.go +++ b/x/register/types/events.go @@ -4,17 +4,17 @@ const ( EventTypeCompleteUnbondingResourceNode = "complete_unbonding_resource_node" EventTypeCompleteUnbondingMetaNode = "complete_unbonding_meta_node" - EventTypeCreateResourceNode = "create_resource_node" - EventTypeUnbondingResourceNode = "unbonding_resource_node" - EventTypeUpdateResourceNode = "update_resource_node" - EventTypeUpdateResourceNodeStake = "update_resource_node_stake" - EventTypeUpdateEffectiveStake = "update_effective_stake" - EventTypeCreateMetaNode = "create_meta_node" - EventTypeUnbondingMetaNode = "unbonding_Meta_node" - EventTypeUpdateMetaNode = "update_meta_node" - EventTypeUpdateMetaNodeStake = "update_meta_node_stake" - EventTypeMetaNodeRegistrationVote = "meta_node_reg_vote" - EventTypeWithdrawMetaNodeRegistrationStake = "withdraw_meta_node_reg_stake" + EventTypeCreateResourceNode = "create_resource_node" + EventTypeUnbondingResourceNode = "unbonding_resource_node" + EventTypeUpdateResourceNode = "update_resource_node" + EventTypeUpdateResourceNodeDeposit = "update_resource_node_deposit" + EventTypeUpdateEffectiveDeposit = "update_effective_deposit" + EventTypeCreateMetaNode = "create_meta_node" + EventTypeUnbondingMetaNode = "unbonding_Meta_node" + EventTypeUpdateMetaNode = "update_meta_node" + EventTypeUpdateMetaNodeDeposit = "update_meta_node_deposit" + EventTypeMetaNodeRegistrationVote = "meta_node_reg_vote" + EventTypeWithdrawMetaNodeRegistrationDeposit = "withdraw_meta_node_reg_deposit" AttributeKeyResourceNode = "resource_node" AttributeKeyMetaNode = "meta_node" @@ -26,16 +26,16 @@ const ( AttributeKeyUnbondingMatureTime = "unbonding_mature_time" - AttributeKeyOZoneLimitChanges = "ozone_limit_changes" - AttributeKeyInitialStake = "initial_stake" - AttributeKeyCurrentStake = "current_stake" - AttributeKeyAvailableTokenBefore = "available_token_before" - AttributeKeyAvailableTokenAfter = "available_token_after" - AttributeKeyStakeDelta = "stake_delta" - AttributeKeyStakeToRemove = "stake_to_remove" - AttributeKeyIncrStake = "incr_stake" - AttributeKeyEffectiveStakeAfter = "effective_stake_after" - AttributeKeyIsUnsuspended = "is_unsuspended" + AttributeKeyOZoneLimitChanges = "ozone_limit_changes" + AttributeKeyInitialDeposit = "initial_deposit" + AttributeKeyCurrentDeposit = "current_deposit" + AttributeKeyAvailableTokenBefore = "available_token_before" + AttributeKeyAvailableTokenAfter = "available_token_after" + AttributeKeyDepositDelta = "deposit_delta" + AttributeKeyDepositToRemove = "deposit_to_remove" + AttributeKeyIncrDeposit = "incr_deposit" + AttributeKeyEffectiveDepositAfter = "effective_deposit_after" + AttributeKeyIsUnsuspended = "is_unsuspended" AttributeValueCategory = ModuleName ) diff --git a/x/register/types/genesis.go b/x/register/types/genesis.go index a84d037f..2d9adfd4 100644 --- a/x/register/types/genesis.go +++ b/x/register/types/genesis.go @@ -17,7 +17,7 @@ func NewGenesisState(params Params, metaNodes MetaNodes, remainingNozLimit sdk.Int, slashingInfo []Slashing, - stakeNozRate sdk.Dec, + depositNozRate sdk.Dec, ) *GenesisState { return &GenesisState{ Params: params, @@ -25,7 +25,7 @@ func NewGenesisState(params Params, MetaNodes: metaNodes, RemainingNozLimit: remainingNozLimit, Slashing: slashingInfo, - StakeNozRate: stakeNozRate, + DepositNozRate: depositNozRate, } } @@ -37,7 +37,7 @@ func DefaultGenesisState() *GenesisState { MetaNodes: MetaNodes{}, RemainingNozLimit: DefaultRemainingNozLimit, Slashing: make([]Slashing, 0), - StakeNozRate: DefaultStakeNozRate, + DepositNozRate: DefaultDepositNozRate, } } @@ -68,8 +68,8 @@ func ValidateGenesis(data GenesisState) error { return ErrRemainingNozLimit } - if (data.StakeNozRate).LTE(sdk.ZeroDec()) { - return ErrStakeNozRate + if (data.DepositNozRate).LTE(sdk.ZeroDec()) { + return ErrDepositNozRate } return nil } diff --git a/x/register/types/genesis.pb.go b/x/register/types/genesis.pb.go index 04fc73f6..a387271a 100644 --- a/x/register/types/genesis.pb.go +++ b/x/register/types/genesis.pb.go @@ -34,7 +34,7 @@ type GenesisState struct { MetaNodes MetaNodes `protobuf:"bytes,3,rep,name=meta_nodes,json=metaNodes,proto3,castrepeated=MetaNodes" json:"meta_nodes" yaml:"meta_nodes"` RemainingNozLimit github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,4,opt,name=remaining_noz_limit,json=remainingNozLimit,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"remaining_noz_limit" yaml:"remaining_noz_limit"` Slashing []Slashing `protobuf:"bytes,5,rep,name=slashing,proto3" json:"slashing" yaml:"slashing_info"` - StakeNozRate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,6,opt,name=stake_noz_rate,json=stakeNozRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"stake_noz_rate" yaml:"stake_noz_rate"` + DepositNozRate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,6,opt,name=deposit_noz_rate,json=depositNozRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"deposit_noz_rate" yaml:"deposit_noz_rate"` } func (m *GenesisState) Reset() { *m = GenesisState{} } @@ -251,61 +251,61 @@ func init() { func init() { proto.RegisterFile("stratos/register/v1/genesis.proto", fileDescriptor_5bdab54ebea9e48e) } var fileDescriptor_5bdab54ebea9e48e = []byte{ - // 849 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0x4f, 0x6f, 0x1b, 0x45, - 0x14, 0xcf, 0x36, 0x8d, 0x9b, 0x4c, 0x62, 0x57, 0xdd, 0x06, 0xb4, 0x49, 0x55, 0x8f, 0x3b, 0x42, - 0xc8, 0x15, 0xca, 0xae, 0x92, 0x54, 0x42, 0xe2, 0x44, 0x57, 0x95, 0x10, 0x02, 0xac, 0x6a, 0x82, - 0x40, 0x70, 0xb1, 0xc6, 0xeb, 0xe9, 0x66, 0x65, 0xef, 0x8c, 0x35, 0x33, 0x4e, 0x70, 0x2e, 0xdc, - 0xb9, 0x80, 0xc4, 0xb7, 0xe0, 0xcc, 0x87, 0xa8, 0x38, 0x55, 0x9c, 0x10, 0x87, 0x01, 0x92, 0x9b, - 0x8f, 0xfb, 0x09, 0xd0, 0xce, 0xcc, 0xda, 0xeb, 0x60, 0x21, 0xf5, 0xe4, 0x79, 0xbf, 0xf7, 0x7b, - 0x7f, 0xe6, 0xed, 0xef, 0x8d, 0xc1, 0x13, 0xa9, 0x04, 0x51, 0x5c, 0x46, 0x82, 0xa6, 0x99, 0x54, - 0x54, 0x44, 0x17, 0xc7, 0x51, 0x4a, 0x19, 0x95, 0x99, 0x0c, 0x27, 0x82, 0x2b, 0xee, 0x3f, 0x74, - 0x94, 0xb0, 0xa2, 0x84, 0x17, 0xc7, 0x87, 0x07, 0x29, 0xe7, 0xe9, 0x98, 0x46, 0x86, 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- 0xc2, 0x7b, 0xc6, 0xae, 0x26, 0x9f, 0x83, 0xdd, 0x21, 0x95, 0x89, 0xc8, 0x26, 0x2a, 0xe3, 0x2c, - 0xb8, 0x67, 0xc6, 0xdf, 0x59, 0x2b, 0xe7, 0x17, 0x4b, 0x5e, 0xfc, 0xd4, 0x29, 0xba, 0x1e, 0x5c, - 0x68, 0xe8, 0xdb, 0x8a, 0x35, 0x10, 0xe1, 0x3a, 0x05, 0xfd, 0xe8, 0x81, 0xed, 0x6a, 0x2d, 0x7c, - 0x0c, 0x5a, 0x97, 0x64, 0x3c, 0xa6, 0xea, 0x96, 0x98, 0x3e, 0x28, 0x45, 0xbb, 0xea, 0x59, 0x8a, - 0x76, 0x15, 0x47, 0xb8, 0x69, 0x81, 0xea, 0x3e, 0x11, 0xd8, 0xba, 0x20, 0xe3, 0x29, 0x35, 0x42, - 0xda, 0x8c, 0x0f, 0xe6, 0x1a, 0x5a, 0xa0, 0xd0, 0x70, 0xcf, 0x66, 0x30, 0x26, 0xc2, 0x16, 0x8e, - 0x7b, 0xaf, 0xaf, 0xdb, 0xde, 0x9b, 0xeb, 0xb6, 0xf7, 0xf7, 0x75, 0xdb, 0xfb, 0xe9, 0xa6, 0xbd, - 0xf1, 0xe6, 0xa6, 0xbd, 0xf1, 0xc7, 0x4d, 0x7b, 0xe3, 0xdb, 0x67, 0xb5, 0x0d, 0x73, 0xf3, 0x60, - 0x54, 0x55, 0xc7, 0xa3, 0xe4, 0x9c, 0x64, 0x2c, 0xfa, 0x6e, 0xf9, 0x37, 0x61, 0x76, 0x6e, 0xd0, - 0x30, 0x92, 0x3d, 0xfd, 0x37, 0x00, 0x00, 0xff, 0xff, 0xa7, 0xc5, 0x78, 0x0b, 0xf1, 0x06, 0x00, - 0x00, + // 857 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0x4f, 0x6b, 0x1b, 0x47, + 0x14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, 0x4b, 0x32, 0x18, 0x50, 0xb9, 0x32, 0x4c, + 0x1f, 0x4d, 0xdf, 0xaf, 0x65, 0xcf, 0xfc, 0xfd, 0x5a, 0xc6, 0x11, 0xae, 0x1b, 0xc0, 0xdd, 0x27, + 0x02, 0x5b, 0x17, 0x64, 0x30, 0xa2, 0x7a, 0x90, 0x36, 0xe3, 0x83, 0x89, 0x82, 0x06, 0xa8, 0x14, + 0xdc, 0x33, 0x19, 0xb4, 0x89, 0xb0, 0x81, 0xe3, 0xce, 0xeb, 0xeb, 0xa6, 0xf7, 0xe6, 0xba, 0xe9, + 0xfd, 0x7b, 0xdd, 0xf4, 0x7e, 0xb9, 0x69, 0x6e, 0xbc, 0xb9, 0x69, 0x6e, 0xfc, 0x75, 0xd3, 0xdc, + 0xf8, 0xee, 0xd9, 0xc2, 0x9e, 0xd9, 0x7e, 0x30, 0x2a, 0xdd, 0xf1, 0x28, 0x39, 0x27, 0x39, 0x8b, + 0x7e, 0x98, 0xff, 0x5f, 0xe8, 0xcd, 0xeb, 0xd5, 0xf4, 0xc8, 0x9e, 0xfe, 0x17, 0x00, 0x00, 0xff, + 0xff, 0xbf, 0x81, 0xbc, 0x44, 0xfa, 0x06, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -329,9 +329,9 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { var l int _ = l { - size := m.StakeNozRate.Size() + size := m.DepositNozRate.Size() i -= size - if _, err := m.StakeNozRate.MarshalTo(dAtA[i:]); err != nil { + if _, err := m.DepositNozRate.MarshalTo(dAtA[i:]); err != nil { return 0, err } i = encodeVarintGenesis(dAtA, i, uint64(size)) @@ -558,7 +558,7 @@ func (m *GenesisState) Size() (n int) { n += 1 + l + sovGenesis(uint64(l)) } } - l = m.StakeNozRate.Size() + l = m.DepositNozRate.Size() n += 1 + l + sovGenesis(uint64(l)) return n } @@ -818,7 +818,7 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StakeNozRate", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DepositNozRate", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -846,7 +846,7 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.StakeNozRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.DepositNozRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/x/register/types/keys.go b/x/register/types/keys.go index 45709bc5..ff356ce6 100644 --- a/x/register/types/keys.go +++ b/x/register/types/keys.go @@ -30,21 +30,18 @@ const ( ) var ( - ResourceNodeKey = []byte{0x01} // prefix for each key to a resource node - MetaNodeKey = []byte{0x02} // prefix for each key to a meta node - MetaNodeRegistrationVotesKey = []byte{0x03} // prefix for each key to the vote for meta node registration - UpperBoundOfTotalOzoneKey = []byte{0x04} - SlashingPrefix = []byte{0x05} - InitialGenesisStakeTotalKey = []byte{0x06} // key of initial genesis deposit by all resource nodes and meta nodes at t=0 - NOzonePriceKey = []byte{0x07} // key of effective noz price - MetaNodeCntKey = []byte{0x08} // the number of all meta nodes - ResourceNodeCntKey = []byte{0x09} // the number of all resource nodes - EffectiveGenesisStakeTotalKey = []byte{0x10} // key of effective(ongoing) genesis deposit by all resource nodes and meta nodes at time t - - UBDNodeKey = []byte{0x11} // prefix for each key to an unbonding node - UBDNodeQueueKey = []byte{0x12} // prefix for the timestamps in unbonding node queue - - StakeNozRateKey = []byte{0x13} // key of fixed rate of stake unit over Noz unit + ResourceNodeKey = []byte{0x01} // prefix for each key to a resource node + MetaNodeKey = []byte{0x02} // prefix for each key to a meta node + MetaNodeRegistrationVotesKey = []byte{0x03} // prefix for each key to the vote for meta node registration + UpperBoundOfTotalOzoneKey = []byte{0x04} + SlashingPrefix = []byte{0x05} + InitialGenesisDepositTotalKey = []byte{0x06} // key of initial genesis deposit by all resource nodes and meta nodes at t=0 + DepositNozRateKey = []byte{0x07} // key of fixed rate of deposit unit over Noz unit + MetaNodeCntKey = []byte{0x08} // the number of all meta nodes + ResourceNodeCntKey = []byte{0x09} // the number of all resource nodes + EffectiveGenesisDepositTotalKey = []byte{0x10} // key of effective(ongoing) genesis deposit by all resource nodes and meta nodes at time t + UBDNodeKey = []byte{0x11} // prefix for each key to an unbonding node + UBDNodeQueueKey = []byte{0x12} // prefix for the timestamps in unbonding node queue ) diff --git a/x/register/types/msg.go b/x/register/types/msg.go index abf268e0..1a7cfa38 100644 --- a/x/register/types/msg.go +++ b/x/register/types/msg.go @@ -4,6 +4,7 @@ import ( codectypes "github.com/cosmos/cosmos-sdk/codec/types" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" + stratos "github.com/stratosnet/stratos-chain/types" ) @@ -12,28 +13,28 @@ var ( _ sdk.Msg = &MsgCreateResourceNode{} _ sdk.Msg = &MsgRemoveResourceNode{} _ sdk.Msg = &MsgUpdateResourceNode{} - _ sdk.Msg = &MsgUpdateResourceNodeStake{} - _ sdk.Msg = &MsgUpdateEffectiveStake{} + _ sdk.Msg = &MsgUpdateResourceNodeDeposit{} + _ sdk.Msg = &MsgUpdateEffectiveDeposit{} _ sdk.Msg = &MsgCreateMetaNode{} _ sdk.Msg = &MsgRemoveMetaNode{} _ sdk.Msg = &MsgUpdateMetaNode{} - _ sdk.Msg = &MsgUpdateMetaNodeStake{} + _ sdk.Msg = &MsgUpdateMetaNodeDeposit{} _ sdk.Msg = &MsgMetaNodeRegistrationVote{} ) // message type and route constants const ( - TypeMsgCreateResourceNode = "create_resource_node" - TypeMsgRemoveResourceNode = "remove_resource_node" - TypeMsgUpdateResourceNode = "update_resource_node" - TypeMsgUpdateResourceNodeStake = "update_resource_node_stake" - TypeMsgUpdateEffectiveStake = "update_effective_stake" - TypeMsgCreateMetaNode = "create_meta_node" - TypeMsgRemoveMetaNode = "remove_meta_node" - TypeMsgUpdateMetaNode = "update_meta_node" - TypeMsgUpdateMetaNodeStake = "update_meta_node_stake" - TypeMsgMetaNodeRegistrationVote = "meta_node_registration_vote" - TypeMsgWithdrawMetaNodeRegistrationStake = "withdraw_meta_node_registration_stake" + TypeMsgCreateResourceNode = "create_resource_node" + TypeMsgRemoveResourceNode = "remove_resource_node" + TypeMsgUpdateResourceNode = "update_resource_node" + TypeMsgUpdateResourceNodeDeposit = "update_resource_node_deposit" + TypeMsgUpdateEffectiveDeposit = "update_effective_deposit" + TypeMsgCreateMetaNode = "create_meta_node" + TypeMsgRemoveMetaNode = "remove_meta_node" + TypeMsgUpdateMetaNode = "update_meta_node" + TypeMsgUpdateMetaNodeDeposit = "update_meta_node_deposit" + TypeMsgMetaNodeRegistrationVote = "meta_node_registration_vote" + TypeMsgWithdrawMetaNodeRegistrationDeposit = "withdraw_meta_node_registration_deposit" ) // NewMsgCreateResourceNode NewMsg creates a new Msg instance @@ -370,23 +371,23 @@ func (msg MsgUpdateResourceNode) ValidateBasic() error { return nil } -func NewMsgUpdateResourceNodeStake(networkAddress stratos.SdsAddress, ownerAddress sdk.AccAddress, - stakeDelta sdk.Coin) *MsgUpdateResourceNodeStake { - return &MsgUpdateResourceNodeStake{ +func NewMsgUpdateResourceNodeDeposit(networkAddress stratos.SdsAddress, ownerAddress sdk.AccAddress, + depositDelta sdk.Coin) *MsgUpdateResourceNodeDeposit { + return &MsgUpdateResourceNodeDeposit{ NetworkAddress: networkAddress.String(), OwnerAddress: ownerAddress.String(), - StakeDelta: stakeDelta, + DepositDelta: depositDelta, } } // Route implements the sdk.Msg interface. -func (msg MsgUpdateResourceNodeStake) Route() string { return RouterKey } +func (msg MsgUpdateResourceNodeDeposit) Route() string { return RouterKey } // Type implements the sdk.Msg interface. -func (msg MsgUpdateResourceNodeStake) Type() string { return TypeMsgUpdateResourceNodeStake } +func (msg MsgUpdateResourceNodeDeposit) Type() string { return TypeMsgUpdateResourceNodeDeposit } // GetSigners implements the sdk.Msg interface. -func (msg MsgUpdateResourceNodeStake) GetSigners() []sdk.AccAddress { +func (msg MsgUpdateResourceNodeDeposit) GetSigners() []sdk.AccAddress { addr, err := sdk.AccAddressFromBech32(msg.OwnerAddress) if err != nil { panic(err) @@ -395,13 +396,13 @@ func (msg MsgUpdateResourceNodeStake) GetSigners() []sdk.AccAddress { } // GetSignBytes implements the sdk.Msg interface. -func (msg MsgUpdateResourceNodeStake) GetSignBytes() []byte { +func (msg MsgUpdateResourceNodeDeposit) GetSignBytes() []byte { bz := ModuleCdc.MustMarshalJSON(&msg) return sdk.MustSortJSON(bz) } // ValidateBasic implements the sdk.Msg interface. -func (msg MsgUpdateResourceNodeStake) ValidateBasic() error { +func (msg MsgUpdateResourceNodeDeposit) ValidateBasic() error { netAddr, err := stratos.SdsAddressFromBech32(msg.NetworkAddress) if err != nil { return ErrInvalidNetworkAddr @@ -418,8 +419,8 @@ func (msg MsgUpdateResourceNodeStake) ValidateBasic() error { return ErrEmptyOwnerAddr } - if msg.StakeDelta.Amount.LTE(sdk.ZeroInt()) { - return ErrInvalidStakeChange + if msg.DepositDelta.Amount.LTE(sdk.ZeroInt()) { + return ErrInvalidDepositChange } return nil } @@ -480,24 +481,24 @@ func (msg MsgUpdateMetaNode) ValidateBasic() error { return nil } -func NewMsgUpdateMetaNodeStake(networkAddress stratos.SdsAddress, ownerAddress sdk.AccAddress, - stakeDelta sdk.Coin, incrStake bool) *MsgUpdateMetaNodeStake { - return &MsgUpdateMetaNodeStake{ +func NewMsgUpdateMetaNodeDeposit(networkAddress stratos.SdsAddress, ownerAddress sdk.AccAddress, + depositDelta sdk.Coin, incrDeposit bool) *MsgUpdateMetaNodeDeposit { + return &MsgUpdateMetaNodeDeposit{ NetworkAddress: networkAddress.String(), OwnerAddress: ownerAddress.String(), - StakeDelta: stakeDelta, - IncrStake: incrStake, + DepositDelta: depositDelta, + IncrDeposit: incrDeposit, } } // Route implements the sdk.Msg interface. -func (msg MsgUpdateMetaNodeStake) Route() string { return RouterKey } +func (msg MsgUpdateMetaNodeDeposit) Route() string { return RouterKey } // Type implements the sdk.Msg interface. -func (msg MsgUpdateMetaNodeStake) Type() string { return TypeMsgUpdateMetaNodeStake } +func (msg MsgUpdateMetaNodeDeposit) Type() string { return TypeMsgUpdateMetaNodeDeposit } // GetSigners implements the sdk.Msg interface. -func (msg MsgUpdateMetaNodeStake) GetSigners() []sdk.AccAddress { +func (msg MsgUpdateMetaNodeDeposit) GetSigners() []sdk.AccAddress { addr, err := sdk.AccAddressFromBech32(msg.OwnerAddress) if err != nil { panic(err) @@ -506,13 +507,13 @@ func (msg MsgUpdateMetaNodeStake) GetSigners() []sdk.AccAddress { } // GetSignBytes implements the sdk.Msg interface. -func (msg MsgUpdateMetaNodeStake) GetSignBytes() []byte { +func (msg MsgUpdateMetaNodeDeposit) GetSignBytes() []byte { bz := ModuleCdc.MustMarshalJSON(&msg) return sdk.MustSortJSON(bz) } // ValidateBasic implements the sdk.Msg interface. -func (msg MsgUpdateMetaNodeStake) ValidateBasic() error { +func (msg MsgUpdateMetaNodeDeposit) ValidateBasic() error { netAddr, err := stratos.SdsAddressFromBech32(msg.NetworkAddress) if err != nil { return ErrInvalidNetworkAddr @@ -529,8 +530,8 @@ func (msg MsgUpdateMetaNodeStake) ValidateBasic() error { return ErrEmptyOwnerAddr } - if msg.StakeDelta.Amount.LTE(sdk.ZeroInt()) { - return ErrInvalidStakeChange + if msg.DepositDelta.Amount.LTE(sdk.ZeroInt()) { + return ErrInvalidDepositChange } return nil } @@ -603,8 +604,8 @@ func (msg MsgMetaNodeRegistrationVote) GetSigners() []sdk.AccAddress { return []sdk.AccAddress{addr.Bytes()} } -func NewMsgUpdateEffectiveStake(reporters []stratos.SdsAddress, reporterOwner []sdk.AccAddress, - networkAddress stratos.SdsAddress, newEffectiveStake sdk.Int) *MsgUpdateEffectiveStake { +func NewMsgUpdateEffectiveDeposit(reporters []stratos.SdsAddress, reporterOwner []sdk.AccAddress, + networkAddress stratos.SdsAddress, newEffectiveDeposit sdk.Int) *MsgUpdateEffectiveDeposit { reporterStrSlice := make([]string, 0) for _, reporter := range reporters { @@ -615,23 +616,23 @@ func NewMsgUpdateEffectiveStake(reporters []stratos.SdsAddress, reporterOwner [] for _, reporterOwner := range reporterOwner { reporterOwnerStrSlice = append(reporterOwnerStrSlice, reporterOwner.String()) } - return &MsgUpdateEffectiveStake{ + return &MsgUpdateEffectiveDeposit{ Reporters: reporterStrSlice, ReporterOwner: reporterOwnerStrSlice, NetworkAddress: networkAddress.String(), - EffectiveTokens: newEffectiveStake, + EffectiveTokens: newEffectiveDeposit, } } -func (m MsgUpdateEffectiveStake) Route() string { +func (m MsgUpdateEffectiveDeposit) Route() string { return RouterKey } -func (m MsgUpdateEffectiveStake) Type() string { - return "update_effective_stake" +func (m MsgUpdateEffectiveDeposit) Type() string { + return TypeMsgUpdateEffectiveDeposit } -func (m MsgUpdateEffectiveStake) ValidateBasic() error { +func (m MsgUpdateEffectiveDeposit) ValidateBasic() error { if len(m.NetworkAddress) == 0 { return ErrInvalidNetworkAddr } @@ -660,12 +661,12 @@ func (m MsgUpdateEffectiveStake) ValidateBasic() error { return nil } -func (m MsgUpdateEffectiveStake) GetSignBytes() []byte { +func (m MsgUpdateEffectiveDeposit) GetSignBytes() []byte { bz := ModuleCdc.MustMarshalJSON(m) return sdk.MustSortJSON(bz) } -func (m MsgUpdateEffectiveStake) GetSigners() []sdk.AccAddress { +func (m MsgUpdateEffectiveDeposit) GetSigners() []sdk.AccAddress { var addrs []sdk.AccAddress for _, owner := range m.ReporterOwner { reporterOwner, err := sdk.AccAddressFromBech32(owner) @@ -675,25 +676,25 @@ func (m MsgUpdateEffectiveStake) GetSigners() []sdk.AccAddress { addrs = append(addrs, reporterOwner) } if len(addrs) == 0 { - panic("no valid signer for MsgUpdateEffectiveStake") + panic("no valid signer for MsgUpdateEffectiveDeposit") } return addrs } -func NewMsgWithdrawMetaNodeRegistrationStake(networkAddress stratos.SdsAddress, ownerAddress sdk.AccAddress) *MsgWithdrawMetaNodeRegistrationStake { - return &MsgWithdrawMetaNodeRegistrationStake{ +func NewMsgWithdrawMetaNodeRegistrationDeposit(networkAddress stratos.SdsAddress, ownerAddress sdk.AccAddress) *MsgWithdrawMetaNodeRegistrationDeposit { + return &MsgWithdrawMetaNodeRegistrationDeposit{ NetworkAddress: networkAddress.String(), OwnerAddress: ownerAddress.String(), } } -func (mmsg MsgWithdrawMetaNodeRegistrationStake) Route() string { return RouterKey } +func (mmsg MsgWithdrawMetaNodeRegistrationDeposit) Route() string { return RouterKey } -func (msg MsgWithdrawMetaNodeRegistrationStake) Type() string { - return TypeMsgWithdrawMetaNodeRegistrationStake +func (msg MsgWithdrawMetaNodeRegistrationDeposit) Type() string { + return TypeMsgWithdrawMetaNodeRegistrationDeposit } -func (msg MsgWithdrawMetaNodeRegistrationStake) ValidateBasic() error { +func (msg MsgWithdrawMetaNodeRegistrationDeposit) ValidateBasic() error { ownerAddr, err := sdk.AccAddressFromBech32(msg.OwnerAddress) if err != nil { return ErrInvalidOwnerAddr @@ -704,12 +705,12 @@ func (msg MsgWithdrawMetaNodeRegistrationStake) ValidateBasic() error { return nil } -func (msg MsgWithdrawMetaNodeRegistrationStake) GetSignBytes() []byte { +func (msg MsgWithdrawMetaNodeRegistrationDeposit) GetSignBytes() []byte { bz := ModuleCdc.MustMarshalJSON(&msg) return sdk.MustSortJSON(bz) } -func (msg MsgWithdrawMetaNodeRegistrationStake) GetSigners() []sdk.AccAddress { +func (msg MsgWithdrawMetaNodeRegistrationDeposit) GetSigners() []sdk.AccAddress { addr, err := sdk.AccAddressFromBech32(msg.OwnerAddress) if err != nil { panic(err) diff --git a/x/register/types/params.go b/x/register/types/params.go index 6b8f8ff5..c90aeb3f 100644 --- a/x/register/types/params.go +++ b/x/register/types/params.go @@ -28,15 +28,15 @@ var ( KeyUnbondingCompletionTime = []byte("UnbondingCompletionTime") KeyMaxEntries = []byte("MaxEntries") KeyResourceNodeRegEnabled = []byte("ResourceNodeRegEnabled") - KeyResourceNodeMinStake = []byte("ResourceNodeMinStake") + KeyResourceNodeMinDeposit = []byte("ResourceNodeMinDeposit") KeyVotingPeriod = []byte("VotingPeriod") DefaultUnbondingThreasholdTime = 180 * 24 * time.Hour // threashold for unbonding - by default 180 days DefaultUnbondingCompletionTime = 14 * 24 * time.Hour // lead time to complete unbonding - by default 14 days DefaultVotingPeriod = 7 * 24 * time.Hour // expiration time of registration voting - by default 7 days - DefaultStakeNozRate = sdk.NewDec(1000000) // 0.001gwei -> 1noz = 1000000wei -> 1noz + DefaultDepositNozRate = sdk.NewDec(1000000) // 0.001gwei -> 1noz = 1000000wei -> 1noz DefaultRemainingNozLimit = sdk.NewInt(0) - DefaultResourceNodeMinStake = sdk.NewCoin(DefaultBondDenom, sdk.NewInt(1e18)) + DefaultResourceNodeMinDeposit = sdk.NewCoin(DefaultBondDenom, sdk.NewInt(1e18)) ) // ParamKeyTable returns the parameter key table. @@ -46,7 +46,7 @@ func ParamKeyTable() paramtypes.KeyTable { // NewParams creates a new Params object func NewParams(bondDenom string, threashold, completion time.Duration, maxEntries uint32, - resourceNodeRegEnabled bool, resourceNodeMinStake sdk.Coin, votingPeriod time.Duration) Params { + resourceNodeRegEnabled bool, resourceNodeMinDeposit sdk.Coin, votingPeriod time.Duration) Params { return Params{ BondDenom: bondDenom, @@ -54,7 +54,7 @@ func NewParams(bondDenom string, threashold, completion time.Duration, maxEntrie UnbondingCompletionTime: completion, MaxEntries: maxEntries, ResourceNodeRegEnabled: resourceNodeRegEnabled, - ResourceNodeMinStake: resourceNodeMinStake, + ResourceNodeMinDeposit: resourceNodeMinDeposit, VotingPeriod: votingPeriod, } } @@ -67,7 +67,7 @@ func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { paramtypes.NewParamSetPair(KeyUnbondingCompletionTime, &p.UnbondingCompletionTime, validateUnbondingCompletionTime), paramtypes.NewParamSetPair(KeyMaxEntries, &p.MaxEntries, validateMaxEntries), paramtypes.NewParamSetPair(KeyResourceNodeRegEnabled, &p.ResourceNodeRegEnabled, validateResourceNodeRegEnabled), - paramtypes.NewParamSetPair(KeyResourceNodeMinStake, &p.ResourceNodeMinStake, validateResourceNodeMinStake), + paramtypes.NewParamSetPair(KeyResourceNodeMinDeposit, &p.ResourceNodeMinDeposit, validateResourceNodeMinDeposit), paramtypes.NewParamSetPair(KeyVotingPeriod, &p.VotingPeriod, validateVotingPeriod), } } @@ -88,7 +88,7 @@ func (p Params) Validate() error { if err := validateResourceNodeRegEnabled(p.ResourceNodeRegEnabled); err != nil { return err } - if err := validateResourceNodeMinStake(p.ResourceNodeMinStake); err != nil { + if err := validateResourceNodeMinDeposit(p.ResourceNodeMinDeposit); err != nil { return err } if err := validateVotingPeriod(p.VotingPeriod); err != nil { @@ -105,7 +105,7 @@ func DefaultParams() Params { DefaultUnbondingCompletionTime, DefaultMaxEntries, DefaultResourceNodeRegEnabled, - DefaultResourceNodeMinStake, + DefaultResourceNodeMinDeposit, DefaultVotingPeriod, ) } @@ -174,7 +174,7 @@ func validateResourceNodeRegEnabled(i interface{}) error { return nil } -func validateResourceNodeMinStake(i interface{}) error { +func validateResourceNodeMinDeposit(i interface{}) error { _, ok := i.(sdk.Coin) if !ok { return fmt.Errorf("invalid parameter type: %T", i) diff --git a/x/register/types/querier.go b/x/register/types/querier.go index 183f019c..a53b9bd9 100644 --- a/x/register/types/querier.go +++ b/x/register/types/querier.go @@ -34,99 +34,101 @@ func NewQueryNodesParams(networkAddr stratos.SdsAddress, moniker string, ownerAd } } -type QueryNodeStakingParams struct { +type QueryNodeDepositParams struct { AccAddr stratos.SdsAddress QueryType int64 //0:All(Default) 1: MetaNode; 2: ResourceNode } -// NewQueryNodeStakingParams creates a new instance of QueryNodesParams -func NewQueryNodeStakingParams(nodeAddr stratos.SdsAddress, queryType int64) QueryNodeStakingParams { - return QueryNodeStakingParams{ +// NewQueryNodeDepositParams creates a new instance of QueryNodesParams +func NewQueryNodeDepositParams(nodeAddr stratos.SdsAddress, queryType int64) QueryNodeDepositParams { + return QueryNodeDepositParams{ AccAddr: nodeAddr, QueryType: queryType, } } -// NewQueryNodesStakingInfo creates a new instance of TotalStakesResponse -func NewQueryNodesStakingInfo(ResourceNodeTotalStake, MetaNodeTotalStake, totalBondedStake, totalUnbondedStake, totalUnbondingStake sdk.Int) *TotalStakesResponse { - resValue := sdk.NewCoin(DefaultBondDenom, ResourceNodeTotalStake) - metaValue := sdk.NewCoin(DefaultBondDenom, MetaNodeTotalStake) - bonedValue := sdk.NewCoin(DefaultBondDenom, totalBondedStake) - unBondedValue := sdk.NewCoin(DefaultBondDenom, totalUnbondedStake) - unBondingValue := sdk.NewCoin(DefaultBondDenom, totalUnbondingStake) - - return &TotalStakesResponse{ - ResourceNodesTotalStake: &resValue, - MetaNodesTotalStake: &metaValue, - TotalBondedStake: &bonedValue, - TotalUnbondedStake: &unBondedValue, - TotalUnbondingStake: &unBondingValue, +// NewQueryDepositTotalInfo creates a new instance of QueryDepositTotalResponse +func NewQueryDepositTotalInfo(bondDenom string, ResourceNodeTotalDeposit, MetaNodeTotalDeposit, totalBondedDeposit, + totalUnbondedDeposit, totalUnbondingDeposit sdk.Int) *QueryDepositTotalResponse { + + resValue := sdk.NewCoin(bondDenom, ResourceNodeTotalDeposit) + metaValue := sdk.NewCoin(bondDenom, MetaNodeTotalDeposit) + bonedValue := sdk.NewCoin(bondDenom, totalBondedDeposit) + unBondedValue := sdk.NewCoin(bondDenom, totalUnbondedDeposit) + unBondingValue := sdk.NewCoin(bondDenom, totalUnbondingDeposit) + + return &QueryDepositTotalResponse{ + ResourceNodesTotalDeposit: &resValue, + MetaNodesTotalDeposit: &metaValue, + TotalBondedDeposit: &bonedValue, + TotalUnbondedDeposit: &unBondedValue, + TotalUnbondingDeposit: &unBondingValue, } } -// NewStakingInfoByResourceNodeAddr creates a new instance of StakingInfoByNodeAddr -func NewStakingInfoByResourceNodeAddr( +// NewDepositInfoByResourceNodeAddr creates a new instance of DepositInfoByNodeAddr +func NewDepositInfoByResourceNodeAddr( resourceNode ResourceNode, - unBondingStake sdk.Int, - unBondedStake sdk.Int, - bondedStake sdk.Int, - -) StakingInfo { - bonedValue := sdk.NewCoin(DefaultBondDenom, bondedStake) - unBondedValue := sdk.NewCoin(DefaultBondDenom, unBondedStake) - unBondingValue := sdk.NewCoin(DefaultBondDenom, unBondingStake) - - return StakingInfo{ - NetworkAddress: resourceNode.GetNetworkAddress(), - Pubkey: resourceNode.GetPubkey(), - Suspend: resourceNode.GetSuspend(), - Status: resourceNode.GetStatus(), - Tokens: resourceNode.Tokens, - OwnerAddress: resourceNode.GetOwnerAddress(), - Description: resourceNode.GetDescription(), - NodeType: resourceNode.GetNodeType(), - CreationTime: resourceNode.GetCreationTime(), - UnBondingStake: unBondingValue, - UnBondedStake: unBondedValue, - BondedStake: bonedValue, + unBondingDeposit sdk.Int, + unBondedDeposit sdk.Int, + bondedDeposit sdk.Int, + +) DepositInfo { + bonedValue := sdk.NewCoin(DefaultBondDenom, bondedDeposit) + unBondedValue := sdk.NewCoin(DefaultBondDenom, unBondedDeposit) + unBondingValue := sdk.NewCoin(DefaultBondDenom, unBondingDeposit) + + return DepositInfo{ + NetworkAddress: resourceNode.GetNetworkAddress(), + Pubkey: resourceNode.GetPubkey(), + Suspend: resourceNode.GetSuspend(), + Status: resourceNode.GetStatus(), + Tokens: resourceNode.Tokens, + OwnerAddress: resourceNode.GetOwnerAddress(), + Description: resourceNode.GetDescription(), + NodeType: resourceNode.GetNodeType(), + CreationTime: resourceNode.GetCreationTime(), + UnBondingDeposit: unBondingValue, + UnBondedDeposit: unBondedValue, + BondedDeposit: bonedValue, } } -// NewStakingInfoByMetaNodeAddr creates a new instance of StakingInfoByNodeAddr -func NewStakingInfoByMetaNodeAddr( +// NewDepositInfoByMetaNodeAddr creates a new instance of DepositInfoByNodeAddr +func NewDepositInfoByMetaNodeAddr( metaNode MetaNode, - unBondingStake sdk.Int, - unBondedStake sdk.Int, - bondedStake sdk.Int, -) StakingInfo { - bonedValue := sdk.NewCoin(DefaultBondDenom, bondedStake) - unBondedValue := sdk.NewCoin(DefaultBondDenom, unBondedStake) - unBondingValue := sdk.NewCoin(DefaultBondDenom, unBondingStake) - return StakingInfo{ - NetworkAddress: metaNode.GetNetworkAddress(), - Pubkey: metaNode.GetPubkey(), - Suspend: metaNode.Suspend, - Status: metaNode.Status, - Tokens: metaNode.Tokens, - OwnerAddress: metaNode.GetOwnerAddress(), - Description: metaNode.Description, - NodeType: uint32(0), - CreationTime: metaNode.CreationTime, - UnBondingStake: unBondingValue, - UnBondedStake: unBondedValue, - BondedStake: bonedValue, + unBondingDeposit sdk.Int, + unBondedDeposit sdk.Int, + bondedDeposit sdk.Int, +) DepositInfo { + bonedValue := sdk.NewCoin(DefaultBondDenom, bondedDeposit) + unBondedValue := sdk.NewCoin(DefaultBondDenom, unBondedDeposit) + unBondingValue := sdk.NewCoin(DefaultBondDenom, unBondingDeposit) + return DepositInfo{ + NetworkAddress: metaNode.GetNetworkAddress(), + Pubkey: metaNode.GetPubkey(), + Suspend: metaNode.Suspend, + Status: metaNode.Status, + Tokens: metaNode.Tokens, + OwnerAddress: metaNode.GetOwnerAddress(), + Description: metaNode.Description, + NodeType: uint32(0), + CreationTime: metaNode.CreationTime, + UnBondingDeposit: unBondingValue, + UnBondedDeposit: unBondedValue, + BondedDeposit: bonedValue, } } -type StakingInfos []StakingInfo +type DepositInfos []DepositInfo // UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces -func (v StakingInfo) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { +func (v DepositInfo) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { var pk cryptotypes.PubKey return unpacker.UnpackAny(v.Pubkey, &pk) } -func (v StakingInfos) UnpackInterfaces(c codectypes.AnyUnpacker) error { +func (v DepositInfos) UnpackInterfaces(c codectypes.AnyUnpacker) error { for i := range v { if err := v[i].UnpackInterfaces(c); err != nil { return err diff --git a/x/register/types/query.pb.go b/x/register/types/query.pb.go index 6df0275f..8d72a836 100644 --- a/x/register/types/query.pb.go +++ b/x/register/types/query.pb.go @@ -223,25 +223,25 @@ func (m *QueryMetaNodeResponse) GetNode() *MetaNode { return nil } -// QueryStakeByNodeRequest is request type for the Query/StakeByNode RPC method -type QueryStakeByNodeRequest struct { +// QueryDepositByNodeRequest is request type for the Query/DepositByNode RPC method +type QueryDepositByNodeRequest struct { // network_addr defines the node network address to query for. NetworkAddr string `protobuf:"bytes,1,opt,name=network_addr,json=networkAddr,proto3" json:"network_addr,omitempty"` QueryType uint32 `protobuf:"varint,2,opt,name=query_type,json=queryType,proto3" json:"query_type,omitempty"` } -func (m *QueryStakeByNodeRequest) Reset() { *m = QueryStakeByNodeRequest{} } -func (m *QueryStakeByNodeRequest) String() string { return proto.CompactTextString(m) } -func (*QueryStakeByNodeRequest) ProtoMessage() {} -func (*QueryStakeByNodeRequest) Descriptor() ([]byte, []int) { +func (m *QueryDepositByNodeRequest) Reset() { *m = QueryDepositByNodeRequest{} } +func (m *QueryDepositByNodeRequest) String() string { return proto.CompactTextString(m) } +func (*QueryDepositByNodeRequest) ProtoMessage() {} +func (*QueryDepositByNodeRequest) Descriptor() ([]byte, []int) { return fileDescriptor_59a612d1da8c0670, []int{4} } -func (m *QueryStakeByNodeRequest) XXX_Unmarshal(b []byte) error { +func (m *QueryDepositByNodeRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryStakeByNodeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryDepositByNodeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryStakeByNodeRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryDepositByNodeRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -251,50 +251,50 @@ func (m *QueryStakeByNodeRequest) XXX_Marshal(b []byte, deterministic bool) ([]b return b[:n], nil } } -func (m *QueryStakeByNodeRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryStakeByNodeRequest.Merge(m, src) +func (m *QueryDepositByNodeRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryDepositByNodeRequest.Merge(m, src) } -func (m *QueryStakeByNodeRequest) XXX_Size() int { +func (m *QueryDepositByNodeRequest) XXX_Size() int { return m.Size() } -func (m *QueryStakeByNodeRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryStakeByNodeRequest.DiscardUnknown(m) +func (m *QueryDepositByNodeRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryDepositByNodeRequest.DiscardUnknown(m) } -var xxx_messageInfo_QueryStakeByNodeRequest proto.InternalMessageInfo +var xxx_messageInfo_QueryDepositByNodeRequest proto.InternalMessageInfo -func (m *QueryStakeByNodeRequest) GetNetworkAddr() string { +func (m *QueryDepositByNodeRequest) GetNetworkAddr() string { if m != nil { return m.NetworkAddr } return "" } -func (m *QueryStakeByNodeRequest) GetQueryType() uint32 { +func (m *QueryDepositByNodeRequest) GetQueryType() uint32 { if m != nil { return m.QueryType } return 0 } -// QueryStakeByNodeResponse is response type for the Query/StakeByNode RPC method -type QueryStakeByNodeResponse struct { - // staking_info defines the the staking_info info of the node. - StakingInfo *StakingInfo `protobuf:"bytes,1,opt,name=staking_info,json=stakingInfo,proto3" json:"staking_info,omitempty"` +// QueryDepositByNodeResponse is response type for the Query/DepositByNode RPC method +type QueryDepositByNodeResponse struct { + // deposit_info defines the the deposit info of the node. + DepositInfo *DepositInfo `protobuf:"bytes,1,opt,name=deposit_info,json=depositInfo,proto3" json:"deposit_info,omitempty"` } -func (m *QueryStakeByNodeResponse) Reset() { *m = QueryStakeByNodeResponse{} } -func (m *QueryStakeByNodeResponse) String() string { return proto.CompactTextString(m) } -func (*QueryStakeByNodeResponse) ProtoMessage() {} -func (*QueryStakeByNodeResponse) Descriptor() ([]byte, []int) { +func (m *QueryDepositByNodeResponse) Reset() { *m = QueryDepositByNodeResponse{} } +func (m *QueryDepositByNodeResponse) String() string { return proto.CompactTextString(m) } +func (*QueryDepositByNodeResponse) ProtoMessage() {} +func (*QueryDepositByNodeResponse) Descriptor() ([]byte, []int) { return fileDescriptor_59a612d1da8c0670, []int{5} } -func (m *QueryStakeByNodeResponse) XXX_Unmarshal(b []byte) error { +func (m *QueryDepositByNodeResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryStakeByNodeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryDepositByNodeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryStakeByNodeResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryDepositByNodeResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -304,45 +304,45 @@ func (m *QueryStakeByNodeResponse) XXX_Marshal(b []byte, deterministic bool) ([] return b[:n], nil } } -func (m *QueryStakeByNodeResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryStakeByNodeResponse.Merge(m, src) +func (m *QueryDepositByNodeResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryDepositByNodeResponse.Merge(m, src) } -func (m *QueryStakeByNodeResponse) XXX_Size() int { +func (m *QueryDepositByNodeResponse) XXX_Size() int { return m.Size() } -func (m *QueryStakeByNodeResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryStakeByNodeResponse.DiscardUnknown(m) +func (m *QueryDepositByNodeResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryDepositByNodeResponse.DiscardUnknown(m) } -var xxx_messageInfo_QueryStakeByNodeResponse proto.InternalMessageInfo +var xxx_messageInfo_QueryDepositByNodeResponse proto.InternalMessageInfo -func (m *QueryStakeByNodeResponse) GetStakingInfo() *StakingInfo { +func (m *QueryDepositByNodeResponse) GetDepositInfo() *DepositInfo { if m != nil { - return m.StakingInfo + return m.DepositInfo } return nil } -// QueryStakeByOwnerRequest is request type for the Query/StakeByOwner RPC method -type QueryStakeByOwnerRequest struct { +// QueryDepositByOwnerRequest is request type for the Query/DepositByOwner RPC method +type QueryDepositByOwnerRequest struct { // owner_addr defines the owner address to query for. OwnerAddr string `protobuf:"bytes,1,opt,name=owner_addr,json=ownerAddr,proto3" json:"owner_addr,omitempty"` // pagination defines an optional pagination for the request. Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } -func (m *QueryStakeByOwnerRequest) Reset() { *m = QueryStakeByOwnerRequest{} } -func (m *QueryStakeByOwnerRequest) String() string { return proto.CompactTextString(m) } -func (*QueryStakeByOwnerRequest) ProtoMessage() {} -func (*QueryStakeByOwnerRequest) Descriptor() ([]byte, []int) { +func (m *QueryDepositByOwnerRequest) Reset() { *m = QueryDepositByOwnerRequest{} } +func (m *QueryDepositByOwnerRequest) String() string { return proto.CompactTextString(m) } +func (*QueryDepositByOwnerRequest) ProtoMessage() {} +func (*QueryDepositByOwnerRequest) Descriptor() ([]byte, []int) { return fileDescriptor_59a612d1da8c0670, []int{6} } -func (m *QueryStakeByOwnerRequest) XXX_Unmarshal(b []byte) error { +func (m *QueryDepositByOwnerRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryStakeByOwnerRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryDepositByOwnerRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryStakeByOwnerRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryDepositByOwnerRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -352,52 +352,52 @@ func (m *QueryStakeByOwnerRequest) XXX_Marshal(b []byte, deterministic bool) ([] return b[:n], nil } } -func (m *QueryStakeByOwnerRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryStakeByOwnerRequest.Merge(m, src) +func (m *QueryDepositByOwnerRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryDepositByOwnerRequest.Merge(m, src) } -func (m *QueryStakeByOwnerRequest) XXX_Size() int { +func (m *QueryDepositByOwnerRequest) XXX_Size() int { return m.Size() } -func (m *QueryStakeByOwnerRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryStakeByOwnerRequest.DiscardUnknown(m) +func (m *QueryDepositByOwnerRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryDepositByOwnerRequest.DiscardUnknown(m) } -var xxx_messageInfo_QueryStakeByOwnerRequest proto.InternalMessageInfo +var xxx_messageInfo_QueryDepositByOwnerRequest proto.InternalMessageInfo -func (m *QueryStakeByOwnerRequest) GetOwnerAddr() string { +func (m *QueryDepositByOwnerRequest) GetOwnerAddr() string { if m != nil { return m.OwnerAddr } return "" } -func (m *QueryStakeByOwnerRequest) GetPagination() *query.PageRequest { +func (m *QueryDepositByOwnerRequest) GetPagination() *query.PageRequest { if m != nil { return m.Pagination } return nil } -// QueryStakeByOwnerResponse is response type for the Query/StakeByOwner RPC method -type QueryStakeByOwnerResponse struct { - // staking_infos defines the the node staking info of this owner. - StakingInfos []*StakingInfo `protobuf:"bytes,1,rep,name=staking_infos,json=stakingInfos,proto3" json:"staking_infos,omitempty"` +// QueryDepositByOwnerResponse is response type for the Query/DepositByOwner RPC method +type QueryDepositByOwnerResponse struct { + // deposit_infos defines the the node deposit info of this owner. + DepositInfos []*DepositInfo `protobuf:"bytes,1,rep,name=deposit_infos,json=depositInfos,proto3" json:"deposit_infos,omitempty"` // pagination defines an optional pagination for the request. Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } -func (m *QueryStakeByOwnerResponse) Reset() { *m = QueryStakeByOwnerResponse{} } -func (m *QueryStakeByOwnerResponse) String() string { return proto.CompactTextString(m) } -func (*QueryStakeByOwnerResponse) ProtoMessage() {} -func (*QueryStakeByOwnerResponse) Descriptor() ([]byte, []int) { +func (m *QueryDepositByOwnerResponse) Reset() { *m = QueryDepositByOwnerResponse{} } +func (m *QueryDepositByOwnerResponse) String() string { return proto.CompactTextString(m) } +func (*QueryDepositByOwnerResponse) ProtoMessage() {} +func (*QueryDepositByOwnerResponse) Descriptor() ([]byte, []int) { return fileDescriptor_59a612d1da8c0670, []int{7} } -func (m *QueryStakeByOwnerResponse) XXX_Unmarshal(b []byte) error { +func (m *QueryDepositByOwnerResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryStakeByOwnerResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryDepositByOwnerResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryStakeByOwnerResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryDepositByOwnerResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -407,48 +407,48 @@ func (m *QueryStakeByOwnerResponse) XXX_Marshal(b []byte, deterministic bool) ([ return b[:n], nil } } -func (m *QueryStakeByOwnerResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryStakeByOwnerResponse.Merge(m, src) +func (m *QueryDepositByOwnerResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryDepositByOwnerResponse.Merge(m, src) } -func (m *QueryStakeByOwnerResponse) XXX_Size() int { +func (m *QueryDepositByOwnerResponse) XXX_Size() int { return m.Size() } -func (m *QueryStakeByOwnerResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryStakeByOwnerResponse.DiscardUnknown(m) +func (m *QueryDepositByOwnerResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryDepositByOwnerResponse.DiscardUnknown(m) } -var xxx_messageInfo_QueryStakeByOwnerResponse proto.InternalMessageInfo +var xxx_messageInfo_QueryDepositByOwnerResponse proto.InternalMessageInfo -func (m *QueryStakeByOwnerResponse) GetStakingInfos() []*StakingInfo { +func (m *QueryDepositByOwnerResponse) GetDepositInfos() []*DepositInfo { if m != nil { - return m.StakingInfos + return m.DepositInfos } return nil } -func (m *QueryStakeByOwnerResponse) GetPagination() *query.PageResponse { +func (m *QueryDepositByOwnerResponse) GetPagination() *query.PageResponse { if m != nil { return m.Pagination } return nil } -// QueryTotalStakeRequest is request type for the Query/TotalStake RPC method -type QueryTotalStakeRequest struct { +// QueryDepositTotalRequest is request type for the Query/DepositTotal RPC method +type QueryDepositTotalRequest struct { } -func (m *QueryTotalStakeRequest) Reset() { *m = QueryTotalStakeRequest{} } -func (m *QueryTotalStakeRequest) String() string { return proto.CompactTextString(m) } -func (*QueryTotalStakeRequest) ProtoMessage() {} -func (*QueryTotalStakeRequest) Descriptor() ([]byte, []int) { +func (m *QueryDepositTotalRequest) Reset() { *m = QueryDepositTotalRequest{} } +func (m *QueryDepositTotalRequest) String() string { return proto.CompactTextString(m) } +func (*QueryDepositTotalRequest) ProtoMessage() {} +func (*QueryDepositTotalRequest) Descriptor() ([]byte, []int) { return fileDescriptor_59a612d1da8c0670, []int{8} } -func (m *QueryTotalStakeRequest) XXX_Unmarshal(b []byte) error { +func (m *QueryDepositTotalRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryTotalStakeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryDepositTotalRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryTotalStakeRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryDepositTotalRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -458,36 +458,39 @@ func (m *QueryTotalStakeRequest) XXX_Marshal(b []byte, deterministic bool) ([]by return b[:n], nil } } -func (m *QueryTotalStakeRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryTotalStakeRequest.Merge(m, src) +func (m *QueryDepositTotalRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryDepositTotalRequest.Merge(m, src) } -func (m *QueryTotalStakeRequest) XXX_Size() int { +func (m *QueryDepositTotalRequest) XXX_Size() int { return m.Size() } -func (m *QueryTotalStakeRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryTotalStakeRequest.DiscardUnknown(m) +func (m *QueryDepositTotalRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryDepositTotalRequest.DiscardUnknown(m) } -var xxx_messageInfo_QueryTotalStakeRequest proto.InternalMessageInfo +var xxx_messageInfo_QueryDepositTotalRequest proto.InternalMessageInfo -// QueryTotalStakeResponse is response type for the Query/TotalStake RPC method -type QueryTotalStakeResponse struct { - // total_stakes defines the total staking info. - TotalStakes *TotalStakesResponse `protobuf:"bytes,1,opt,name=total_stakes,json=totalStakes,proto3" json:"total_stakes,omitempty"` +// QueryDepositTotalResponse is response type for the Query/DepositTotal RPC method +type QueryDepositTotalResponse struct { + ResourceNodesTotalDeposit *types.Coin `protobuf:"bytes,1,opt,name=resource_nodes_total_deposit,json=resourceNodesTotalDeposit,proto3" json:"resource_nodes_total_deposit,omitempty"` + MetaNodesTotalDeposit *types.Coin `protobuf:"bytes,2,opt,name=meta_nodes_total_deposit,json=metaNodesTotalDeposit,proto3" json:"meta_nodes_total_deposit,omitempty"` + TotalBondedDeposit *types.Coin `protobuf:"bytes,3,opt,name=total_bonded_deposit,json=totalBondedDeposit,proto3" json:"total_bonded_deposit,omitempty"` + TotalUnbondedDeposit *types.Coin `protobuf:"bytes,4,opt,name=total_unbonded_deposit,json=totalUnbondedDeposit,proto3" json:"total_unbonded_deposit,omitempty"` + TotalUnbondingDeposit *types.Coin `protobuf:"bytes,5,opt,name=total_unbonding_deposit,json=totalUnbondingDeposit,proto3" json:"total_unbonding_deposit,omitempty"` } -func (m *QueryTotalStakeResponse) Reset() { *m = QueryTotalStakeResponse{} } -func (m *QueryTotalStakeResponse) String() string { return proto.CompactTextString(m) } -func (*QueryTotalStakeResponse) ProtoMessage() {} -func (*QueryTotalStakeResponse) Descriptor() ([]byte, []int) { +func (m *QueryDepositTotalResponse) Reset() { *m = QueryDepositTotalResponse{} } +func (m *QueryDepositTotalResponse) String() string { return proto.CompactTextString(m) } +func (*QueryDepositTotalResponse) ProtoMessage() {} +func (*QueryDepositTotalResponse) Descriptor() ([]byte, []int) { return fileDescriptor_59a612d1da8c0670, []int{9} } -func (m *QueryTotalStakeResponse) XXX_Unmarshal(b []byte) error { +func (m *QueryDepositTotalResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryTotalStakeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryDepositTotalResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryTotalStakeResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryDepositTotalResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -497,21 +500,49 @@ func (m *QueryTotalStakeResponse) XXX_Marshal(b []byte, deterministic bool) ([]b return b[:n], nil } } -func (m *QueryTotalStakeResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryTotalStakeResponse.Merge(m, src) +func (m *QueryDepositTotalResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryDepositTotalResponse.Merge(m, src) } -func (m *QueryTotalStakeResponse) XXX_Size() int { +func (m *QueryDepositTotalResponse) XXX_Size() int { return m.Size() } -func (m *QueryTotalStakeResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryTotalStakeResponse.DiscardUnknown(m) +func (m *QueryDepositTotalResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryDepositTotalResponse.DiscardUnknown(m) } -var xxx_messageInfo_QueryTotalStakeResponse proto.InternalMessageInfo +var xxx_messageInfo_QueryDepositTotalResponse proto.InternalMessageInfo -func (m *QueryTotalStakeResponse) GetTotalStakes() *TotalStakesResponse { +func (m *QueryDepositTotalResponse) GetResourceNodesTotalDeposit() *types.Coin { if m != nil { - return m.TotalStakes + return m.ResourceNodesTotalDeposit + } + return nil +} + +func (m *QueryDepositTotalResponse) GetMetaNodesTotalDeposit() *types.Coin { + if m != nil { + return m.MetaNodesTotalDeposit + } + return nil +} + +func (m *QueryDepositTotalResponse) GetTotalBondedDeposit() *types.Coin { + if m != nil { + return m.TotalBondedDeposit + } + return nil +} + +func (m *QueryDepositTotalResponse) GetTotalUnbondedDeposit() *types.Coin { + if m != nil { + return m.TotalUnbondedDeposit + } + return nil +} + +func (m *QueryDepositTotalResponse) GetTotalUnbondingDeposit() *types.Coin { + if m != nil { + return m.TotalUnbondingDeposit } return nil } @@ -765,109 +796,33 @@ func (m *QueryBondedMetaNodeCountResponse) GetNumber() uint64 { return 0 } -type TotalStakesResponse struct { - ResourceNodesTotalStake *types.Coin `protobuf:"bytes,1,opt,name=resource_nodes_total_stake,json=resourceNodesTotalStake,proto3" json:"resource_nodes_total_stake,omitempty"` - MetaNodesTotalStake *types.Coin `protobuf:"bytes,2,opt,name=meta_nodes_total_stake,json=metaNodesTotalStake,proto3" json:"meta_nodes_total_stake,omitempty"` - TotalBondedStake *types.Coin `protobuf:"bytes,3,opt,name=total_bonded_stake,json=totalBondedStake,proto3" json:"total_bonded_stake,omitempty"` - TotalUnbondedStake *types.Coin `protobuf:"bytes,4,opt,name=total_unbonded_stake,json=totalUnbondedStake,proto3" json:"total_unbonded_stake,omitempty"` - TotalUnbondingStake *types.Coin `protobuf:"bytes,5,opt,name=total_unbonding_stake,json=totalUnbondingStake,proto3" json:"total_unbonding_stake,omitempty"` -} - -func (m *TotalStakesResponse) Reset() { *m = TotalStakesResponse{} } -func (m *TotalStakesResponse) String() string { return proto.CompactTextString(m) } -func (*TotalStakesResponse) ProtoMessage() {} -func (*TotalStakesResponse) Descriptor() ([]byte, []int) { +type DepositInfo struct { + NetworkAddress string `protobuf:"bytes,1,opt,name=network_address,json=networkAddress,proto3" json:"network_address" yaml:"network_address"` + Pubkey *types1.Any `protobuf:"bytes,2,opt,name=pubkey,proto3" json:"pubkey" yaml:"pubkey"` + Suspend bool `protobuf:"varint,3,opt,name=suspend,proto3" json:"suspend" yaml:"suspend"` + Status types2.BondStatus `protobuf:"varint,4,opt,name=status,proto3,enum=cosmos.staking.v1beta1.BondStatus" json:"status" yaml:"status"` + Tokens github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,5,opt,name=tokens,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"tokens" yaml:"tokens"` + OwnerAddress string `protobuf:"bytes,6,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address" yaml:"owner_address"` + Description Description `protobuf:"bytes,7,opt,name=description,proto3" json:"description" yaml:"description"` + CreationTime time.Time `protobuf:"bytes,8,opt,name=creation_time,json=creationTime,proto3,stdtime" json:"creation_time" yaml:"creation_time"` + NodeType uint32 `protobuf:"varint,9,opt,name=node_type,json=nodeType,proto3" json:"node_type" yaml:"node_type"` + BondedDeposit types.Coin `protobuf:"bytes,10,opt,name=bonded_deposit,json=bondedDeposit,proto3" json:"bonded_deposit" yaml:"bonded_deposit"` + UnBondingDeposit types.Coin `protobuf:"bytes,11,opt,name=un_bonding_deposit,json=unBondingDeposit,proto3" json:"un_bonding_deposit" yaml:"un_bonding_deposit"` + UnBondedDeposit types.Coin `protobuf:"bytes,12,opt,name=un_bonded_deposit,json=unBondedDeposit,proto3" json:"un_bonded_deposit" yaml:"un_bonded_deposit"` +} + +func (m *DepositInfo) Reset() { *m = DepositInfo{} } +func (m *DepositInfo) String() string { return proto.CompactTextString(m) } +func (*DepositInfo) ProtoMessage() {} +func (*DepositInfo) Descriptor() ([]byte, []int) { return fileDescriptor_59a612d1da8c0670, []int{16} } -func (m *TotalStakesResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TotalStakesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TotalStakesResponse.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 *TotalStakesResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_TotalStakesResponse.Merge(m, src) -} -func (m *TotalStakesResponse) XXX_Size() int { - return m.Size() -} -func (m *TotalStakesResponse) XXX_DiscardUnknown() { - xxx_messageInfo_TotalStakesResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_TotalStakesResponse proto.InternalMessageInfo - -func (m *TotalStakesResponse) GetResourceNodesTotalStake() *types.Coin { - if m != nil { - return m.ResourceNodesTotalStake - } - return nil -} - -func (m *TotalStakesResponse) GetMetaNodesTotalStake() *types.Coin { - if m != nil { - return m.MetaNodesTotalStake - } - return nil -} - -func (m *TotalStakesResponse) GetTotalBondedStake() *types.Coin { - if m != nil { - return m.TotalBondedStake - } - return nil -} - -func (m *TotalStakesResponse) GetTotalUnbondedStake() *types.Coin { - if m != nil { - return m.TotalUnbondedStake - } - return nil -} - -func (m *TotalStakesResponse) GetTotalUnbondingStake() *types.Coin { - if m != nil { - return m.TotalUnbondingStake - } - return nil -} - -type StakingInfo struct { - NetworkAddress string `protobuf:"bytes,1,opt,name=network_address,json=networkAddress,proto3" json:"network_address" yaml:"network_address"` - Pubkey *types1.Any `protobuf:"bytes,2,opt,name=pubkey,proto3" json:"pubkey" yaml:"pubkey"` - Suspend bool `protobuf:"varint,3,opt,name=suspend,proto3" json:"suspend" yaml:"suspend"` - Status types2.BondStatus `protobuf:"varint,4,opt,name=status,proto3,enum=cosmos.staking.v1beta1.BondStatus" json:"status" yaml:"status"` - Tokens github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,5,opt,name=tokens,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"tokens" yaml:"tokens"` - OwnerAddress string `protobuf:"bytes,6,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address" yaml:"owner_address"` - Description Description `protobuf:"bytes,7,opt,name=description,proto3" json:"description" yaml:"description"` - CreationTime time.Time `protobuf:"bytes,8,opt,name=creation_time,json=creationTime,proto3,stdtime" json:"creation_time" yaml:"creation_time"` - NodeType uint32 `protobuf:"varint,9,opt,name=node_type,json=nodeType,proto3" json:"node_type" yaml:"node_type"` - BondedStake types.Coin `protobuf:"bytes,10,opt,name=bonded_stake,json=bondedStake,proto3" json:"bonded_stake" yaml:"bonded_stake"` - UnBondingStake types.Coin `protobuf:"bytes,11,opt,name=un_bonding_stake,json=unBondingStake,proto3" json:"un_bonding_stake" yaml:"un_bonding_stake"` - UnBondedStake types.Coin `protobuf:"bytes,12,opt,name=un_bonded_stake,json=unBondedStake,proto3" json:"un_bonded_stake" yaml:"un_bonded_stake"` -} - -func (m *StakingInfo) Reset() { *m = StakingInfo{} } -func (m *StakingInfo) String() string { return proto.CompactTextString(m) } -func (*StakingInfo) ProtoMessage() {} -func (*StakingInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_59a612d1da8c0670, []int{17} -} -func (m *StakingInfo) XXX_Unmarshal(b []byte) error { +func (m *DepositInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *StakingInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *DepositInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_StakingInfo.Marshal(b, m, deterministic) + return xxx_messageInfo_DepositInfo.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -877,91 +832,91 @@ func (m *StakingInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return b[:n], nil } } -func (m *StakingInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_StakingInfo.Merge(m, src) +func (m *DepositInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_DepositInfo.Merge(m, src) } -func (m *StakingInfo) XXX_Size() int { +func (m *DepositInfo) XXX_Size() int { return m.Size() } -func (m *StakingInfo) XXX_DiscardUnknown() { - xxx_messageInfo_StakingInfo.DiscardUnknown(m) +func (m *DepositInfo) XXX_DiscardUnknown() { + xxx_messageInfo_DepositInfo.DiscardUnknown(m) } -var xxx_messageInfo_StakingInfo proto.InternalMessageInfo +var xxx_messageInfo_DepositInfo proto.InternalMessageInfo -func (m *StakingInfo) GetNetworkAddress() string { +func (m *DepositInfo) GetNetworkAddress() string { if m != nil { return m.NetworkAddress } return "" } -func (m *StakingInfo) GetPubkey() *types1.Any { +func (m *DepositInfo) GetPubkey() *types1.Any { if m != nil { return m.Pubkey } return nil } -func (m *StakingInfo) GetSuspend() bool { +func (m *DepositInfo) GetSuspend() bool { if m != nil { return m.Suspend } return false } -func (m *StakingInfo) GetStatus() types2.BondStatus { +func (m *DepositInfo) GetStatus() types2.BondStatus { if m != nil { return m.Status } return types2.Unspecified } -func (m *StakingInfo) GetOwnerAddress() string { +func (m *DepositInfo) GetOwnerAddress() string { if m != nil { return m.OwnerAddress } return "" } -func (m *StakingInfo) GetDescription() Description { +func (m *DepositInfo) GetDescription() Description { if m != nil { return m.Description } return Description{} } -func (m *StakingInfo) GetCreationTime() time.Time { +func (m *DepositInfo) GetCreationTime() time.Time { if m != nil { return m.CreationTime } return time.Time{} } -func (m *StakingInfo) GetNodeType() uint32 { +func (m *DepositInfo) GetNodeType() uint32 { if m != nil { return m.NodeType } return 0 } -func (m *StakingInfo) GetBondedStake() types.Coin { +func (m *DepositInfo) GetBondedDeposit() types.Coin { if m != nil { - return m.BondedStake + return m.BondedDeposit } return types.Coin{} } -func (m *StakingInfo) GetUnBondingStake() types.Coin { +func (m *DepositInfo) GetUnBondingDeposit() types.Coin { if m != nil { - return m.UnBondingStake + return m.UnBondingDeposit } return types.Coin{} } -func (m *StakingInfo) GetUnBondedStake() types.Coin { +func (m *DepositInfo) GetUnBondedDeposit() types.Coin { if m != nil { - return m.UnBondedStake + return m.UnBondedDeposit } return types.Coin{} } @@ -971,120 +926,117 @@ func init() { proto.RegisterType((*QueryResourceNodeResponse)(nil), "stratos.register.v1.QueryResourceNodeResponse") proto.RegisterType((*QueryMetaNodeRequest)(nil), "stratos.register.v1.QueryMetaNodeRequest") proto.RegisterType((*QueryMetaNodeResponse)(nil), "stratos.register.v1.QueryMetaNodeResponse") - proto.RegisterType((*QueryStakeByNodeRequest)(nil), "stratos.register.v1.QueryStakeByNodeRequest") - proto.RegisterType((*QueryStakeByNodeResponse)(nil), "stratos.register.v1.QueryStakeByNodeResponse") - proto.RegisterType((*QueryStakeByOwnerRequest)(nil), "stratos.register.v1.QueryStakeByOwnerRequest") - proto.RegisterType((*QueryStakeByOwnerResponse)(nil), "stratos.register.v1.QueryStakeByOwnerResponse") - proto.RegisterType((*QueryTotalStakeRequest)(nil), "stratos.register.v1.QueryTotalStakeRequest") - proto.RegisterType((*QueryTotalStakeResponse)(nil), "stratos.register.v1.QueryTotalStakeResponse") + proto.RegisterType((*QueryDepositByNodeRequest)(nil), "stratos.register.v1.QueryDepositByNodeRequest") + proto.RegisterType((*QueryDepositByNodeResponse)(nil), "stratos.register.v1.QueryDepositByNodeResponse") + proto.RegisterType((*QueryDepositByOwnerRequest)(nil), "stratos.register.v1.QueryDepositByOwnerRequest") + proto.RegisterType((*QueryDepositByOwnerResponse)(nil), "stratos.register.v1.QueryDepositByOwnerResponse") + proto.RegisterType((*QueryDepositTotalRequest)(nil), "stratos.register.v1.QueryDepositTotalRequest") + proto.RegisterType((*QueryDepositTotalResponse)(nil), "stratos.register.v1.QueryDepositTotalResponse") proto.RegisterType((*QueryParamsRequest)(nil), "stratos.register.v1.QueryParamsRequest") proto.RegisterType((*QueryParamsResponse)(nil), "stratos.register.v1.QueryParamsResponse") proto.RegisterType((*QueryBondedResourceNodeCountRequest)(nil), "stratos.register.v1.QueryBondedResourceNodeCountRequest") proto.RegisterType((*QueryBondedResourceNodeCountResponse)(nil), "stratos.register.v1.QueryBondedResourceNodeCountResponse") proto.RegisterType((*QueryBondedMetaNodeCountRequest)(nil), "stratos.register.v1.QueryBondedMetaNodeCountRequest") proto.RegisterType((*QueryBondedMetaNodeCountResponse)(nil), "stratos.register.v1.QueryBondedMetaNodeCountResponse") - proto.RegisterType((*TotalStakesResponse)(nil), "stratos.register.v1.TotalStakesResponse") - proto.RegisterType((*StakingInfo)(nil), "stratos.register.v1.StakingInfo") + proto.RegisterType((*DepositInfo)(nil), "stratos.register.v1.DepositInfo") } func init() { proto.RegisterFile("stratos/register/v1/query.proto", fileDescriptor_59a612d1da8c0670) } var fileDescriptor_59a612d1da8c0670 = []byte{ - // 1497 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x57, 0xcf, 0x6f, 0x13, 0xc7, - 0x17, 0xcf, 0xf2, 0x23, 0xc4, 0xcf, 0x4e, 0x40, 0x93, 0x90, 0x04, 0xf3, 0x8d, 0x37, 0x59, 0xf8, - 0x42, 0x02, 0x78, 0xb7, 0x49, 0xa0, 0x2d, 0xa8, 0x45, 0xc2, 0xd0, 0x22, 0x40, 0xa4, 0x74, 0xa1, - 0x54, 0x6a, 0x0f, 0xd6, 0xda, 0x9e, 0x18, 0x2b, 0x78, 0xd7, 0xec, 0xcc, 0x02, 0x16, 0x42, 0x6a, - 0x7b, 0xed, 0x05, 0xb5, 0xa7, 0x5e, 0x2b, 0x55, 0xea, 0x8f, 0x4b, 0x0f, 0x55, 0xff, 0x06, 0xd4, - 0x13, 0x52, 0x2f, 0x55, 0x0f, 0xdb, 0x0a, 0x7a, 0xca, 0xd1, 0x7f, 0x41, 0xb5, 0x33, 0x6f, 0xb3, - 0xb3, 0xce, 0x3a, 0x0e, 0x3d, 0x79, 0xe7, 0xcd, 0x7b, 0x9f, 0xf7, 0x79, 0xf3, 0xde, 0xcc, 0x7b, - 0x06, 0x9d, 0x71, 0xdf, 0xe1, 0x1e, 0xb3, 0x7c, 0xda, 0x6c, 0x31, 0x4e, 0x7d, 0xeb, 0xe1, 0xb2, - 0xf5, 0x20, 0xa0, 0x7e, 0xd7, 0x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- 0x3f, 0x6a, 0x30, 0x99, 0x31, 0xe8, 0x92, 0xb3, 0xc3, 0x5c, 0x67, 0x8d, 0xce, 0xc5, 0x73, 0xaf, - 0x69, 0xb5, 0x2b, 0xb2, 0x2c, 0x26, 0x5b, 0x59, 0x7b, 0xfe, 0xb2, 0xa4, 0xbd, 0x78, 0x59, 0xd2, - 0xfe, 0x7e, 0x59, 0xd2, 0x9e, 0xbd, 0x2a, 0x8d, 0xbc, 0x78, 0x55, 0x1a, 0xf9, 0xe3, 0x55, 0x69, - 0xe4, 0x93, 0xb3, 0xca, 0x74, 0x81, 0x18, 0x2e, 0xe5, 0xf1, 0x67, 0xb9, 0x7e, 0xcf, 0x69, 0xb9, - 0xd6, 0xe3, 0x04, 0x56, 0xcc, 0x1b, 0xb5, 0x51, 0xd1, 0x6a, 0x57, 0xff, 0x0d, 0x00, 0x00, 0xff, - 0xff, 0x75, 0x9f, 0x0c, 0x74, 0xc1, 0x11, 0x00, 0x00, + // 1470 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0xcb, 0x8f, 0xd3, 0x56, + 0x17, 0x1f, 0xf3, 0x08, 0x93, 0x9b, 0x64, 0xe0, 0xbb, 0x04, 0xc8, 0x78, 0x98, 0x78, 0xc6, 0xf0, + 0xf1, 0x92, 0xc6, 0x66, 0x06, 0xf8, 0xf8, 0x40, 0x2a, 0x2a, 0xa6, 0x2f, 0x40, 0xe5, 0xe1, 0xd2, + 0x56, 0x42, 0xaa, 0x22, 0x27, 0xbe, 0x04, 0x6b, 0xc8, 0xbd, 0xc6, 0xd7, 0x86, 0x46, 0x14, 0x09, + 0xb5, 0xff, 0x00, 0x52, 0x57, 0xdd, 0x77, 0xd3, 0x4a, 0x55, 0x37, 0x55, 0x17, 0x55, 0x77, 0xdd, + 0xa0, 0xae, 0x90, 0xba, 0xa9, 0xba, 0x70, 0x2b, 0xe8, 0x6a,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xb1, 0xc9, 0xfd, 0x88, 0xf0, 0x10, 0x2f, 0xa3, 0x2a, 0x25, 0xe1, 0x43, 0x16, 0xac, 0xb7, + 0x1c, 0xd7, 0x0d, 0x1a, 0xca, 0x92, 0x72, 0xac, 0x6c, 0x57, 0x40, 0x76, 0xd1, 0x75, 0x03, 0xdd, + 0x46, 0xf3, 0x05, 0xee, 0xdc, 0x67, 0x94, 0x13, 0x7c, 0x06, 0xed, 0xa0, 0xcc, 0x25, 0xc2, 0xaf, + 0xb2, 0xb6, 0x6c, 0x14, 0x3c, 0x90, 0x91, 0x73, 0x14, 0xe6, 0xfa, 0x39, 0x54, 0x17, 0x98, 0xef, + 0x93, 0xd0, 0x79, 0x4d, 0x3a, 0x57, 0xd0, 0xbe, 0x31, 0x57, 0xa0, 0xb2, 0x9a, 0xa3, 0xb2, 0x58, + 0x48, 0x65, 0xe8, 0x24, 0x69, 0x7c, 0x02, 0xa9, 0xbd, 0x45, 0x7c, 0xc6, 0xbd, 0xd0, 0xea, 0xbf, + 0x1e, 0x17, 0xbc, 0x88, 0x90, 0x78, 0xe5, 0x56, 0xd8, 0xf7, 0x49, 0x63, 0xdb, 0x92, 0x72, 0xac, + 0x66, 0x97, 0x85, 0xe4, 0x56, 0xdf, 0x27, 0xba, 0x83, 0xd4, 0x22, 0x78, 0xe0, 0x7b, 0x09, 0x55, + 0x5d, 0xa9, 0x68, 0x79, 0xf4, 0x0e, 0x03, 0xde, 0x4b, 0x85, 0xbc, 0x01, 0xe1, 0x32, 0xbd, 0xc3, + 0xec, 0x8a, 0x3b, 0x3a, 0xe8, 0x5f, 0x28, 0xe3, 0x31, 0xae, 0x3f, 0xa4, 0x24, 0x48, 0x73, 0x58, + 0x44, 0x88, 0x25, 0xe7, 0x6c, 0x06, 0x65, 0x21, 0x11, 0xfc, 0xdf, 0x41, 0x68, 0x54, 0x97, 0x82, + 0x7f, 0x65, 0xed, 0x88, 0x01, 0x25, 0x9d, 0x14, 0xa6, 0x21, 0xbf, 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 0x81, 0xfc, 0x11, 0x41, 0x7e, 0x09, 0x37, 0x8b, 0x0b, 0xd8, + 0x6f, 0xc9, 0xfd, 0x09, 0x7f, 0xab, 0xa0, 0xbd, 0x05, 0x7b, 0x17, 0x3e, 0x3d, 0x29, 0x74, 0xd1, + 0x26, 0xa7, 0x9e, 0x79, 0x4d, 0xaf, 0xa9, 0xc8, 0xf2, 0x94, 0xac, 0x75, 0xed, 0xd9, 0x8b, 0xa6, + 0xf2, 0xfc, 0x45, 0x53, 0xf9, 0xeb, 0x45, 0x53, 0x79, 0xfa, 0xb2, 0x39, 0xf3, 0xfc, 0x65, 0x73, + 0xe6, 0xf7, 0x97, 0xcd, 0x99, 0xdb, 0xa7, 0x33, 0x1b, 0x09, 0x60, 0x50, 0x12, 0xa6, 0x7f, 0x57, + 0x3a, 0x77, 0x1d, 0x8f, 0x9a, 0x9f, 0x8e, 0x60, 0xc5, 0x8e, 0xd2, 0x2e, 0x89, 0xf1, 0x7c, 0xea, + 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xbc, 0x8a, 0x48, 0x6c, 0xb1, 0x11, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1105,12 +1057,12 @@ type QueryClient interface { MetaNode(ctx context.Context, in *QueryMetaNodeRequest, opts ...grpc.CallOption) (*QueryMetaNodeResponse, error) // Params queries Register module Params info. Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) - // StakeByNode queries all staking info for given node network address. - StakeByNode(ctx context.Context, in *QueryStakeByNodeRequest, opts ...grpc.CallOption) (*QueryStakeByNodeResponse, error) - // StakeByOwner queries all staking info for given owner address. - StakeByOwner(ctx context.Context, in *QueryStakeByOwnerRequest, opts ...grpc.CallOption) (*QueryStakeByOwnerResponse, error) - // StakeTotal queries all staking info. - StakeTotal(ctx context.Context, in *QueryTotalStakeRequest, opts ...grpc.CallOption) (*QueryTotalStakeResponse, error) + // DepositByNode queries all deposit info for given node network address. + DepositByNode(ctx context.Context, in *QueryDepositByNodeRequest, opts ...grpc.CallOption) (*QueryDepositByNodeResponse, error) + // DepositByOwner queries all deposit info for given owner address. + DepositByOwner(ctx context.Context, in *QueryDepositByOwnerRequest, opts ...grpc.CallOption) (*QueryDepositByOwnerResponse, error) + // DepositTotal queries all deposit info. + DepositTotal(ctx context.Context, in *QueryDepositTotalRequest, opts ...grpc.CallOption) (*QueryDepositTotalResponse, error) // BondedResourceNodeCount queries total number of ResourceNodes. BondedResourceNodeCount(ctx context.Context, in *QueryBondedResourceNodeCountRequest, opts ...grpc.CallOption) (*QueryBondedResourceNodeCountResponse, error) // BondedMetaNodeCount queries total number of MetaNodes. @@ -1152,27 +1104,27 @@ func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts . return out, nil } -func (c *queryClient) StakeByNode(ctx context.Context, in *QueryStakeByNodeRequest, opts ...grpc.CallOption) (*QueryStakeByNodeResponse, error) { - out := new(QueryStakeByNodeResponse) - err := c.cc.Invoke(ctx, "/stratos.register.v1.Query/StakeByNode", in, out, opts...) +func (c *queryClient) DepositByNode(ctx context.Context, in *QueryDepositByNodeRequest, opts ...grpc.CallOption) (*QueryDepositByNodeResponse, error) { + out := new(QueryDepositByNodeResponse) + err := c.cc.Invoke(ctx, "/stratos.register.v1.Query/DepositByNode", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *queryClient) StakeByOwner(ctx context.Context, in *QueryStakeByOwnerRequest, opts ...grpc.CallOption) (*QueryStakeByOwnerResponse, error) { - out := new(QueryStakeByOwnerResponse) - err := c.cc.Invoke(ctx, "/stratos.register.v1.Query/StakeByOwner", in, out, opts...) +func (c *queryClient) DepositByOwner(ctx context.Context, in *QueryDepositByOwnerRequest, opts ...grpc.CallOption) (*QueryDepositByOwnerResponse, error) { + out := new(QueryDepositByOwnerResponse) + err := c.cc.Invoke(ctx, "/stratos.register.v1.Query/DepositByOwner", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *queryClient) StakeTotal(ctx context.Context, in *QueryTotalStakeRequest, opts ...grpc.CallOption) (*QueryTotalStakeResponse, error) { - out := new(QueryTotalStakeResponse) - err := c.cc.Invoke(ctx, "/stratos.register.v1.Query/StakeTotal", in, out, opts...) +func (c *queryClient) DepositTotal(ctx context.Context, in *QueryDepositTotalRequest, opts ...grpc.CallOption) (*QueryDepositTotalResponse, error) { + out := new(QueryDepositTotalResponse) + err := c.cc.Invoke(ctx, "/stratos.register.v1.Query/DepositTotal", in, out, opts...) if err != nil { return nil, err } @@ -1205,12 +1157,12 @@ type QueryServer interface { MetaNode(context.Context, *QueryMetaNodeRequest) (*QueryMetaNodeResponse, error) // Params queries Register module Params info. Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) - // StakeByNode queries all staking info for given node network address. - StakeByNode(context.Context, *QueryStakeByNodeRequest) (*QueryStakeByNodeResponse, error) - // StakeByOwner queries all staking info for given owner address. - StakeByOwner(context.Context, *QueryStakeByOwnerRequest) (*QueryStakeByOwnerResponse, error) - // StakeTotal queries all staking info. - StakeTotal(context.Context, *QueryTotalStakeRequest) (*QueryTotalStakeResponse, error) + // DepositByNode queries all deposit info for given node network address. + DepositByNode(context.Context, *QueryDepositByNodeRequest) (*QueryDepositByNodeResponse, error) + // DepositByOwner queries all deposit info for given owner address. + DepositByOwner(context.Context, *QueryDepositByOwnerRequest) (*QueryDepositByOwnerResponse, error) + // DepositTotal queries all deposit info. + DepositTotal(context.Context, *QueryDepositTotalRequest) (*QueryDepositTotalResponse, error) // BondedResourceNodeCount queries total number of ResourceNodes. BondedResourceNodeCount(context.Context, *QueryBondedResourceNodeCountRequest) (*QueryBondedResourceNodeCountResponse, error) // BondedMetaNodeCount queries total number of MetaNodes. @@ -1230,14 +1182,14 @@ func (*UnimplementedQueryServer) MetaNode(ctx context.Context, req *QueryMetaNod func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") } -func (*UnimplementedQueryServer) StakeByNode(ctx context.Context, req *QueryStakeByNodeRequest) (*QueryStakeByNodeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method StakeByNode not implemented") +func (*UnimplementedQueryServer) DepositByNode(ctx context.Context, req *QueryDepositByNodeRequest) (*QueryDepositByNodeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DepositByNode not implemented") } -func (*UnimplementedQueryServer) StakeByOwner(ctx context.Context, req *QueryStakeByOwnerRequest) (*QueryStakeByOwnerResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method StakeByOwner not implemented") +func (*UnimplementedQueryServer) DepositByOwner(ctx context.Context, req *QueryDepositByOwnerRequest) (*QueryDepositByOwnerResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DepositByOwner not implemented") } -func (*UnimplementedQueryServer) StakeTotal(ctx context.Context, req *QueryTotalStakeRequest) (*QueryTotalStakeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method StakeTotal not implemented") +func (*UnimplementedQueryServer) DepositTotal(ctx context.Context, req *QueryDepositTotalRequest) (*QueryDepositTotalResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DepositTotal not implemented") } func (*UnimplementedQueryServer) BondedResourceNodeCount(ctx context.Context, req *QueryBondedResourceNodeCountRequest) (*QueryBondedResourceNodeCountResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method BondedResourceNodeCount not implemented") @@ -1304,56 +1256,56 @@ func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interf return interceptor(ctx, in, info, handler) } -func _Query_StakeByNode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryStakeByNodeRequest) +func _Query_DepositByNode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryDepositByNodeRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(QueryServer).StakeByNode(ctx, in) + return srv.(QueryServer).DepositByNode(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/stratos.register.v1.Query/StakeByNode", + FullMethod: "/stratos.register.v1.Query/DepositByNode", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).StakeByNode(ctx, req.(*QueryStakeByNodeRequest)) + return srv.(QueryServer).DepositByNode(ctx, req.(*QueryDepositByNodeRequest)) } return interceptor(ctx, in, info, handler) } -func _Query_StakeByOwner_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryStakeByOwnerRequest) +func _Query_DepositByOwner_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryDepositByOwnerRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(QueryServer).StakeByOwner(ctx, in) + return srv.(QueryServer).DepositByOwner(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/stratos.register.v1.Query/StakeByOwner", + FullMethod: "/stratos.register.v1.Query/DepositByOwner", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).StakeByOwner(ctx, req.(*QueryStakeByOwnerRequest)) + return srv.(QueryServer).DepositByOwner(ctx, req.(*QueryDepositByOwnerRequest)) } return interceptor(ctx, in, info, handler) } -func _Query_StakeTotal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryTotalStakeRequest) +func _Query_DepositTotal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryDepositTotalRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(QueryServer).StakeTotal(ctx, in) + return srv.(QueryServer).DepositTotal(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/stratos.register.v1.Query/StakeTotal", + FullMethod: "/stratos.register.v1.Query/DepositTotal", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).StakeTotal(ctx, req.(*QueryTotalStakeRequest)) + return srv.(QueryServer).DepositTotal(ctx, req.(*QueryDepositTotalRequest)) } return interceptor(ctx, in, info, handler) } @@ -1411,16 +1363,16 @@ var _Query_serviceDesc = grpc.ServiceDesc{ Handler: _Query_Params_Handler, }, { - MethodName: "StakeByNode", - Handler: _Query_StakeByNode_Handler, + MethodName: "DepositByNode", + Handler: _Query_DepositByNode_Handler, }, { - MethodName: "StakeByOwner", - Handler: _Query_StakeByOwner_Handler, + MethodName: "DepositByOwner", + Handler: _Query_DepositByOwner_Handler, }, { - MethodName: "StakeTotal", - Handler: _Query_StakeTotal_Handler, + MethodName: "DepositTotal", + Handler: _Query_DepositTotal_Handler, }, { MethodName: "BondedResourceNodeCount", @@ -1565,7 +1517,7 @@ func (m *QueryMetaNodeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *QueryStakeByNodeRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryDepositByNodeRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1575,12 +1527,12 @@ func (m *QueryStakeByNodeRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryStakeByNodeRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryDepositByNodeRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryStakeByNodeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryDepositByNodeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1600,7 +1552,7 @@ func (m *QueryStakeByNodeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } -func (m *QueryStakeByNodeResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryDepositByNodeResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1610,19 +1562,19 @@ func (m *QueryStakeByNodeResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryStakeByNodeResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryDepositByNodeResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryStakeByNodeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryDepositByNodeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.StakingInfo != nil { + if m.DepositInfo != nil { { - size, err := m.StakingInfo.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.DepositInfo.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -1635,7 +1587,7 @@ func (m *QueryStakeByNodeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error return len(dAtA) - i, nil } -func (m *QueryStakeByOwnerRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryDepositByOwnerRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1645,12 +1597,12 @@ func (m *QueryStakeByOwnerRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryStakeByOwnerRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryDepositByOwnerRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryStakeByOwnerRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryDepositByOwnerRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1677,7 +1629,7 @@ func (m *QueryStakeByOwnerRequest) MarshalToSizedBuffer(dAtA []byte) (int, error return len(dAtA) - i, nil } -func (m *QueryStakeByOwnerResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryDepositByOwnerResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1687,12 +1639,12 @@ func (m *QueryStakeByOwnerResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryStakeByOwnerResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryDepositByOwnerResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryStakeByOwnerResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryDepositByOwnerResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1709,10 +1661,10 @@ func (m *QueryStakeByOwnerResponse) MarshalToSizedBuffer(dAtA []byte) (int, erro i-- dAtA[i] = 0x12 } - if len(m.StakingInfos) > 0 { - for iNdEx := len(m.StakingInfos) - 1; iNdEx >= 0; iNdEx-- { + if len(m.DepositInfos) > 0 { + for iNdEx := len(m.DepositInfos) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.StakingInfos[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.DepositInfos[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -1726,7 +1678,7 @@ func (m *QueryStakeByOwnerResponse) MarshalToSizedBuffer(dAtA []byte) (int, erro return len(dAtA) - i, nil } -func (m *QueryTotalStakeRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryDepositTotalRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1736,12 +1688,12 @@ func (m *QueryTotalStakeRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryTotalStakeRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryDepositTotalRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryTotalStakeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryDepositTotalRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1749,7 +1701,7 @@ func (m *QueryTotalStakeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } -func (m *QueryTotalStakeResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryDepositTotalResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1759,19 +1711,67 @@ func (m *QueryTotalStakeResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryTotalStakeResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryDepositTotalResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryTotalStakeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryDepositTotalResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.TotalStakes != nil { + if m.TotalUnbondingDeposit != nil { + { + size, err := m.TotalUnbondingDeposit.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + if m.TotalUnbondedDeposit != nil { + { + size, err := m.TotalUnbondedDeposit.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if m.TotalBondedDeposit != nil { + { + size, err := m.TotalBondedDeposit.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.MetaNodesTotalDeposit != nil { + { + size, err := m.MetaNodesTotalDeposit.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.ResourceNodesTotalDeposit != nil { { - size, err := m.TotalStakes.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.ResourceNodesTotalDeposit.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -1944,90 +1944,7 @@ func (m *QueryBondedMetaNodeCountResponse) MarshalToSizedBuffer(dAtA []byte) (in return len(dAtA) - i, nil } -func (m *TotalStakesResponse) 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 *TotalStakesResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TotalStakesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.TotalUnbondingStake != nil { - { - size, err := m.TotalUnbondingStake.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - if m.TotalUnbondedStake != nil { - { - size, err := m.TotalUnbondedStake.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.TotalBondedStake != nil { - { - size, err := m.TotalBondedStake.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.MetaNodesTotalStake != nil { - { - size, err := m.MetaNodesTotalStake.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.ResourceNodesTotalStake != nil { - { - size, err := m.ResourceNodesTotalStake.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *StakingInfo) Marshal() (dAtA []byte, err error) { +func (m *DepositInfo) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2037,18 +1954,18 @@ func (m *StakingInfo) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *StakingInfo) MarshalTo(dAtA []byte) (int, error) { +func (m *DepositInfo) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *StakingInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *DepositInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l { - size, err := m.UnBondedStake.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.UnBondedDeposit.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -2058,7 +1975,7 @@ func (m *StakingInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x62 { - size, err := m.UnBondingStake.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.UnBondingDeposit.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -2068,7 +1985,7 @@ func (m *StakingInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x5a { - size, err := m.BondedStake.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.BondedDeposit.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -2082,12 +1999,12 @@ func (m *StakingInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x48 } - n16, err16 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.CreationTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.CreationTime):]) - if err16 != nil { - return 0, err16 + n15, err15 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.CreationTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.CreationTime):]) + if err15 != nil { + return 0, err15 } - i -= n16 - i = encodeVarintQuery(dAtA, i, uint64(n16)) + i -= n15 + i = encodeVarintQuery(dAtA, i, uint64(n15)) i-- dAtA[i] = 0x42 { @@ -2217,7 +2134,7 @@ func (m *QueryMetaNodeResponse) Size() (n int) { return n } -func (m *QueryStakeByNodeRequest) Size() (n int) { +func (m *QueryDepositByNodeRequest) Size() (n int) { if m == nil { return 0 } @@ -2233,20 +2150,20 @@ func (m *QueryStakeByNodeRequest) Size() (n int) { return n } -func (m *QueryStakeByNodeResponse) Size() (n int) { +func (m *QueryDepositByNodeResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l - if m.StakingInfo != nil { - l = m.StakingInfo.Size() + if m.DepositInfo != nil { + l = m.DepositInfo.Size() n += 1 + l + sovQuery(uint64(l)) } return n } -func (m *QueryStakeByOwnerRequest) Size() (n int) { +func (m *QueryDepositByOwnerRequest) Size() (n int) { if m == nil { return 0 } @@ -2263,14 +2180,14 @@ func (m *QueryStakeByOwnerRequest) Size() (n int) { return n } -func (m *QueryStakeByOwnerResponse) Size() (n int) { +func (m *QueryDepositByOwnerResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l - if len(m.StakingInfos) > 0 { - for _, e := range m.StakingInfos { + if len(m.DepositInfos) > 0 { + for _, e := range m.DepositInfos { l = e.Size() n += 1 + l + sovQuery(uint64(l)) } @@ -2282,7 +2199,7 @@ func (m *QueryStakeByOwnerResponse) Size() (n int) { return n } -func (m *QueryTotalStakeRequest) Size() (n int) { +func (m *QueryDepositTotalRequest) Size() (n int) { if m == nil { return 0 } @@ -2291,14 +2208,30 @@ func (m *QueryTotalStakeRequest) Size() (n int) { return n } -func (m *QueryTotalStakeResponse) Size() (n int) { +func (m *QueryDepositTotalResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l - if m.TotalStakes != nil { - l = m.TotalStakes.Size() + if m.ResourceNodesTotalDeposit != nil { + l = m.ResourceNodesTotalDeposit.Size() + n += 1 + l + sovQuery(uint64(l)) + } + if m.MetaNodesTotalDeposit != nil { + l = m.MetaNodesTotalDeposit.Size() + n += 1 + l + sovQuery(uint64(l)) + } + if m.TotalBondedDeposit != nil { + l = m.TotalBondedDeposit.Size() + n += 1 + l + sovQuery(uint64(l)) + } + if m.TotalUnbondedDeposit != nil { + l = m.TotalUnbondedDeposit.Size() + n += 1 + l + sovQuery(uint64(l)) + } + if m.TotalUnbondingDeposit != nil { + l = m.TotalUnbondingDeposit.Size() n += 1 + l + sovQuery(uint64(l)) } return n @@ -2368,36 +2301,7 @@ func (m *QueryBondedMetaNodeCountResponse) Size() (n int) { return n } -func (m *TotalStakesResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ResourceNodesTotalStake != nil { - l = m.ResourceNodesTotalStake.Size() - n += 1 + l + sovQuery(uint64(l)) - } - if m.MetaNodesTotalStake != nil { - l = m.MetaNodesTotalStake.Size() - n += 1 + l + sovQuery(uint64(l)) - } - if m.TotalBondedStake != nil { - l = m.TotalBondedStake.Size() - n += 1 + l + sovQuery(uint64(l)) - } - if m.TotalUnbondedStake != nil { - l = m.TotalUnbondedStake.Size() - n += 1 + l + sovQuery(uint64(l)) - } - if m.TotalUnbondingStake != nil { - l = m.TotalUnbondingStake.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *StakingInfo) Size() (n int) { +func (m *DepositInfo) Size() (n int) { if m == nil { return 0 } @@ -2430,11 +2334,11 @@ func (m *StakingInfo) Size() (n int) { if m.NodeType != 0 { n += 1 + sovQuery(uint64(m.NodeType)) } - l = m.BondedStake.Size() + l = m.BondedDeposit.Size() n += 1 + l + sovQuery(uint64(l)) - l = m.UnBondingStake.Size() + l = m.UnBondingDeposit.Size() n += 1 + l + sovQuery(uint64(l)) - l = m.UnBondedStake.Size() + l = m.UnBondedDeposit.Size() n += 1 + l + sovQuery(uint64(l)) return n } @@ -2781,7 +2685,7 @@ func (m *QueryMetaNodeResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryStakeByNodeRequest) Unmarshal(dAtA []byte) error { +func (m *QueryDepositByNodeRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2804,10 +2708,10 @@ func (m *QueryStakeByNodeRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryStakeByNodeRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryDepositByNodeRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryStakeByNodeRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryDepositByNodeRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -2882,7 +2786,7 @@ func (m *QueryStakeByNodeRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryStakeByNodeResponse) Unmarshal(dAtA []byte) error { +func (m *QueryDepositByNodeResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2905,15 +2809,15 @@ func (m *QueryStakeByNodeResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryStakeByNodeResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryDepositByNodeResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryStakeByNodeResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryDepositByNodeResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StakingInfo", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DepositInfo", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2940,10 +2844,10 @@ func (m *QueryStakeByNodeResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.StakingInfo == nil { - m.StakingInfo = &StakingInfo{} + if m.DepositInfo == nil { + m.DepositInfo = &DepositInfo{} } - if err := m.StakingInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.DepositInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -2968,7 +2872,7 @@ func (m *QueryStakeByNodeResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryStakeByOwnerRequest) Unmarshal(dAtA []byte) error { +func (m *QueryDepositByOwnerRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2991,10 +2895,10 @@ func (m *QueryStakeByOwnerRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryStakeByOwnerRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryDepositByOwnerRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryStakeByOwnerRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryDepositByOwnerRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3086,7 +2990,7 @@ func (m *QueryStakeByOwnerRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryStakeByOwnerResponse) Unmarshal(dAtA []byte) error { +func (m *QueryDepositByOwnerResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3109,15 +3013,15 @@ func (m *QueryStakeByOwnerResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryStakeByOwnerResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryDepositByOwnerResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryStakeByOwnerResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryDepositByOwnerResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StakingInfos", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DepositInfos", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3144,8 +3048,8 @@ func (m *QueryStakeByOwnerResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.StakingInfos = append(m.StakingInfos, &StakingInfo{}) - if err := m.StakingInfos[len(m.StakingInfos)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.DepositInfos = append(m.DepositInfos, &DepositInfo{}) + if err := m.DepositInfos[len(m.DepositInfos)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -3206,7 +3110,7 @@ func (m *QueryStakeByOwnerResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryTotalStakeRequest) Unmarshal(dAtA []byte) error { +func (m *QueryDepositTotalRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3229,10 +3133,10 @@ func (m *QueryTotalStakeRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryTotalStakeRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryDepositTotalRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryTotalStakeRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryDepositTotalRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -3256,7 +3160,7 @@ func (m *QueryTotalStakeRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryTotalStakeResponse) Unmarshal(dAtA []byte) error { +func (m *QueryDepositTotalResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3279,15 +3183,15 @@ func (m *QueryTotalStakeResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryTotalStakeResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryDepositTotalResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryTotalStakeResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryDepositTotalResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TotalStakes", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ResourceNodesTotalDeposit", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3314,116 +3218,124 @@ func (m *QueryTotalStakeResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.TotalStakes == nil { - m.TotalStakes = &TotalStakesResponse{} + if m.ResourceNodesTotalDeposit == nil { + m.ResourceNodesTotalDeposit = &types.Coin{} } - if err := m.TotalStakes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.ResourceNodesTotalDeposit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MetaNodesTotalDeposit", wireType) } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF + if msglen < 0 { + return ErrInvalidLengthQuery } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryParamsRequest) 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 ErrIntOverflowQuery + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery } - if iNdEx >= l { + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + if m.MetaNodesTotalDeposit == nil { + m.MetaNodesTotalDeposit = &types.Coin{} } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryParamsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { + if err := m.MetaNodesTotalDeposit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } - if (skippy < 0) || (iNdEx+skippy) < 0 { + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TotalBondedDeposit", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { return ErrInvalidLengthQuery } - if (iNdEx + skippy) > l { + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { return io.ErrUnexpectedEOF } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryParamsResponse) 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 ErrIntOverflowQuery + if m.TotalBondedDeposit == nil { + m.TotalBondedDeposit = &types.Coin{} } - if iNdEx >= l { + if err := m.TotalBondedDeposit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TotalUnbondedDeposit", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + if m.TotalUnbondedDeposit == nil { + m.TotalUnbondedDeposit = &types.Coin{} } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryParamsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + if err := m.TotalUnbondedDeposit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TotalUnbondingDeposit", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3450,10 +3362,10 @@ func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Params == nil { - m.Params = &Params{} + if m.TotalUnbondingDeposit == nil { + m.TotalUnbondingDeposit = &types.Coin{} } - if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.TotalUnbondingDeposit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -3478,7 +3390,7 @@ func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryBondedResourceNodeCountRequest) Unmarshal(dAtA []byte) error { +func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3501,10 +3413,10 @@ func (m *QueryBondedResourceNodeCountRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryBondedResourceNodeCountRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryParamsRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryBondedResourceNodeCountRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -3528,7 +3440,7 @@ func (m *QueryBondedResourceNodeCountRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryBondedResourceNodeCountResponse) Unmarshal(dAtA []byte) error { +func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3551,17 +3463,17 @@ func (m *QueryBondedResourceNodeCountResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryBondedResourceNodeCountResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryParamsResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryBondedResourceNodeCountResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Number", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) } - m.Number = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -3571,11 +3483,28 @@ func (m *QueryBondedResourceNodeCountResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Number |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Params == nil { + m.Params = &Params{} + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -3597,7 +3526,7 @@ func (m *QueryBondedResourceNodeCountResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryBondedMetaNodeCountRequest) Unmarshal(dAtA []byte) error { +func (m *QueryBondedResourceNodeCountRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3620,10 +3549,10 @@ func (m *QueryBondedMetaNodeCountRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryBondedMetaNodeCountRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryBondedResourceNodeCountRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryBondedMetaNodeCountRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryBondedResourceNodeCountRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -3647,7 +3576,7 @@ func (m *QueryBondedMetaNodeCountRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryBondedMetaNodeCountResponse) Unmarshal(dAtA []byte) error { +func (m *QueryBondedResourceNodeCountResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3670,10 +3599,10 @@ func (m *QueryBondedMetaNodeCountResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryBondedMetaNodeCountResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryBondedResourceNodeCountResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryBondedMetaNodeCountResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryBondedResourceNodeCountResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3716,7 +3645,7 @@ func (m *QueryBondedMetaNodeCountResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *TotalStakesResponse) Unmarshal(dAtA []byte) error { +func (m *QueryBondedMetaNodeCountRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3739,161 +3668,67 @@ func (m *TotalStakesResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: TotalStakesResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryBondedMetaNodeCountRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: TotalStakesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryBondedMetaNodeCountRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceNodesTotalStake", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ResourceNodesTotalStake == nil { - m.ResourceNodesTotalStake = &types.Coin{} - } - if err := m.ResourceNodesTotalStake.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MetaNodesTotalStake", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.MetaNodesTotalStake == nil { - m.MetaNodesTotalStake = &types.Coin{} - } - if err := m.MetaNodesTotalStake.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { return err } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TotalBondedStake", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthQuery } - if postIndex > l { + if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - if m.TotalBondedStake == nil { - m.TotalBondedStake = &types.Coin{} - } - if err := m.TotalBondedStake.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TotalUnbondedStake", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryBondedMetaNodeCountResponse) 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 ErrIntOverflowQuery } - if postIndex > l { + if iNdEx >= l { return io.ErrUnexpectedEOF } - if m.TotalUnbondedStake == nil { - m.TotalUnbondedStake = &types.Coin{} - } - if err := m.TotalUnbondedStake.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TotalUnbondingStake", wireType) + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryBondedMetaNodeCountResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryBondedMetaNodeCountResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Number", wireType) } - var msglen int + m.Number = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -3903,28 +3738,11 @@ func (m *TotalStakesResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.Number |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.TotalUnbondingStake == nil { - m.TotalUnbondingStake = &types.Coin{} - } - if err := m.TotalUnbondingStake.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -3946,7 +3764,7 @@ func (m *TotalStakesResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *StakingInfo) Unmarshal(dAtA []byte) error { +func (m *DepositInfo) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3969,10 +3787,10 @@ func (m *StakingInfo) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: StakingInfo: wiretype end group for non-group") + return fmt.Errorf("proto: DepositInfo: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: StakingInfo: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DepositInfo: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -4235,7 +4053,7 @@ func (m *StakingInfo) Unmarshal(dAtA []byte) error { } case 10: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BondedStake", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field BondedDeposit", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4262,13 +4080,13 @@ func (m *StakingInfo) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.BondedStake.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.BondedDeposit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 11: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UnBondingStake", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field UnBondingDeposit", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4295,13 +4113,13 @@ func (m *StakingInfo) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.UnBondingStake.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.UnBondingDeposit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 12: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UnBondedStake", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field UnBondedDeposit", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4328,7 +4146,7 @@ func (m *StakingInfo) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.UnBondedStake.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.UnBondedDeposit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/x/register/types/query.pb.gw.go b/x/register/types/query.pb.gw.go index c6751f77..ad991daa 100644 --- a/x/register/types/query.pb.gw.go +++ b/x/register/types/query.pb.gw.go @@ -157,8 +157,8 @@ func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshal } -func request_Query_StakeByNode_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryStakeByNodeRequest +func request_Query_DepositByNode_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryDepositByNodeRequest var metadata runtime.ServerMetadata var ( @@ -190,13 +190,13 @@ func request_Query_StakeByNode_0(ctx context.Context, marshaler runtime.Marshale return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "query_type", err) } - msg, err := client.StakeByNode(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.DepositByNode(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_Query_StakeByNode_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryStakeByNodeRequest +func local_request_Query_DepositByNode_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryDepositByNodeRequest var metadata runtime.ServerMetadata var ( @@ -228,17 +228,17 @@ func local_request_Query_StakeByNode_0(ctx context.Context, marshaler runtime.Ma return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "query_type", err) } - msg, err := server.StakeByNode(ctx, &protoReq) + msg, err := server.DepositByNode(ctx, &protoReq) return msg, metadata, err } var ( - filter_Query_StakeByOwner_0 = &utilities.DoubleArray{Encoding: map[string]int{"owner_addr": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} + filter_Query_DepositByOwner_0 = &utilities.DoubleArray{Encoding: map[string]int{"owner_addr": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} ) -func request_Query_StakeByOwner_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryStakeByOwnerRequest +func request_Query_DepositByOwner_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryDepositByOwnerRequest var metadata runtime.ServerMetadata var ( @@ -262,17 +262,17 @@ func request_Query_StakeByOwner_0(ctx context.Context, marshaler runtime.Marshal if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_StakeByOwner_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_DepositByOwner_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.StakeByOwner(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.DepositByOwner(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_Query_StakeByOwner_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryStakeByOwnerRequest +func local_request_Query_DepositByOwner_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryDepositByOwnerRequest var metadata runtime.ServerMetadata var ( @@ -296,29 +296,29 @@ func local_request_Query_StakeByOwner_0(ctx context.Context, marshaler runtime.M if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_StakeByOwner_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_DepositByOwner_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.StakeByOwner(ctx, &protoReq) + msg, err := server.DepositByOwner(ctx, &protoReq) return msg, metadata, err } -func request_Query_StakeTotal_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryTotalStakeRequest +func request_Query_DepositTotal_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryDepositTotalRequest var metadata runtime.ServerMetadata - msg, err := client.StakeTotal(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.DepositTotal(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_Query_StakeTotal_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryTotalStakeRequest +func local_request_Query_DepositTotal_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryDepositTotalRequest var metadata runtime.ServerMetadata - msg, err := server.StakeTotal(ctx, &protoReq) + msg, err := server.DepositTotal(ctx, &protoReq) return msg, metadata, err } @@ -425,7 +425,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) - mux.Handle("GET", pattern_Query_StakeByNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_DepositByNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -434,18 +434,18 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_StakeByNode_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_DepositByNode_0(rctx, inboundMarshaler, server, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Query_StakeByNode_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_DepositByNode_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_Query_StakeByOwner_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_DepositByOwner_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -454,18 +454,18 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_StakeByOwner_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_DepositByOwner_0(rctx, inboundMarshaler, server, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Query_StakeByOwner_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_DepositByOwner_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_Query_StakeTotal_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_DepositTotal_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -474,14 +474,14 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_StakeTotal_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_DepositTotal_0(rctx, inboundMarshaler, server, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Query_StakeTotal_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_DepositTotal_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -626,7 +626,7 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) - mux.Handle("GET", pattern_Query_StakeByNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_DepositByNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -635,18 +635,18 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_StakeByNode_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Query_DepositByNode_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Query_StakeByNode_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_DepositByNode_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_Query_StakeByOwner_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_DepositByOwner_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -655,18 +655,18 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_StakeByOwner_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Query_DepositByOwner_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Query_StakeByOwner_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_DepositByOwner_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_Query_StakeTotal_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_DepositTotal_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -675,14 +675,14 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_StakeTotal_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Query_DepositTotal_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Query_StakeTotal_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_DepositTotal_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -736,11 +736,11 @@ var ( pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"stratos", "register", "v1", "params"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Query_StakeByNode_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 1, 0, 4, 1, 5, 5}, []string{"stratos", "register", "v1", "stakes_node", "network_addr", "query_type"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_DepositByNode_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 1, 0, 4, 1, 5, 5}, []string{"stratos", "register", "v1", "deposit_by_node", "network_addr", "query_type"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Query_StakeByOwner_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"stratos", "register", "v1", "stakes_owner", "owner_addr"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_DepositByOwner_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"stratos", "register", "v1", "deposit_by_owner", "owner_addr"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Query_StakeTotal_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"stratos", "register", "v1", "total_stakes"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_DepositTotal_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"stratos", "register", "v1", "deposit_total"}, "", runtime.AssumeColonVerbOpt(true))) pattern_Query_BondedResourceNodeCount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"stratos", "register", "v1", "pp_number"}, "", runtime.AssumeColonVerbOpt(true))) @@ -754,11 +754,11 @@ var ( forward_Query_Params_0 = runtime.ForwardResponseMessage - forward_Query_StakeByNode_0 = runtime.ForwardResponseMessage + forward_Query_DepositByNode_0 = runtime.ForwardResponseMessage - forward_Query_StakeByOwner_0 = runtime.ForwardResponseMessage + forward_Query_DepositByOwner_0 = runtime.ForwardResponseMessage - forward_Query_StakeTotal_0 = runtime.ForwardResponseMessage + forward_Query_DepositTotal_0 = runtime.ForwardResponseMessage forward_Query_BondedResourceNodeCount_0 = runtime.ForwardResponseMessage diff --git a/x/register/types/register.pb.go b/x/register/types/register.pb.go index 186cf081..42a93bb7 100644 --- a/x/register/types/register.pb.go +++ b/x/register/types/register.pb.go @@ -40,7 +40,7 @@ type Params struct { UnbondingCompletionTime time.Duration `protobuf:"bytes,3,opt,name=unbonding_completion_time,json=unbondingCompletionTime,proto3,stdduration" json:"unbonding_completion_time" yaml:"unbonding_completion_time"` MaxEntries uint32 `protobuf:"varint,4,opt,name=max_entries,json=maxEntries,proto3" json:"max_entries" yaml:"max_entries",omitempty` ResourceNodeRegEnabled bool `protobuf:"varint,5,opt,name=resource_node_reg_enabled,json=resourceNodeRegEnabled,proto3" json:"resource_node_reg_enabled" yaml:"resource_node_reg_enabled"` - ResourceNodeMinStake types.Coin `protobuf:"bytes,6,opt,name=resource_node_min_stake,json=resourceNodeMinStake,proto3" json:"resource_node_min_stake" yaml:"resource_node_min_stake"` + ResourceNodeMinDeposit types.Coin `protobuf:"bytes,6,opt,name=resource_node_min_deposit,json=resourceNodeMinDeposit,proto3" json:"resource_node_min_deposit" yaml:"resource_node_min_deposit"` VotingPeriod time.Duration `protobuf:"bytes,7,opt,name=voting_period,json=votingPeriod,proto3,stdduration" json:"voting_period" yaml:"voting_period"` } @@ -112,9 +112,9 @@ func (m *Params) GetResourceNodeRegEnabled() bool { return false } -func (m *Params) GetResourceNodeMinStake() types.Coin { +func (m *Params) GetResourceNodeMinDeposit() types.Coin { if m != nil { - return m.ResourceNodeMinStake + return m.ResourceNodeMinDeposit } return types.Coin{} } @@ -604,99 +604,99 @@ func init() { } var fileDescriptor_fef1e3aeec8499d6 = []byte{ - // 1467 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0xcd, 0x6f, 0xd4, 0x46, - 0x1b, 0x8f, 0x13, 0x48, 0x36, 0xb3, 0xf9, 0xe0, 0x35, 0x79, 0x61, 0xc3, 0xcb, 0xbb, 0xb3, 0xb8, - 0x1f, 0x04, 0xb5, 0xd9, 0x55, 0xa0, 0x52, 0x55, 0x0e, 0x95, 0x62, 0xa0, 0x2d, 0xb4, 0xa0, 0xd4, - 0xa4, 0x20, 0x55, 0xaa, 0xdc, 0x59, 0x7b, 0xd8, 0x0c, 0x59, 0x7b, 0x5c, 0xcf, 0xec, 0x92, 0x95, - 0x7a, 0xa8, 0xd4, 0x0b, 0x47, 0xa4, 0x5e, 0x38, 0xf2, 0x47, 0xf4, 0x6f, 0xa8, 0x28, 0x27, 0x8e, - 0x55, 0x0f, 0x6e, 0x05, 0x97, 0x6a, 0x7b, 0xf3, 0xa5, 0xd7, 0xca, 0xf3, 0x61, 0x7b, 0x9d, 0x44, - 0x88, 0x4a, 0x9c, 0xca, 0x29, 0x7e, 0x7e, 0xbf, 0x67, 0x9e, 0x0f, 0x3f, 0x1f, 0xde, 0x09, 0xb0, - 0x18, 0x8f, 0x11, 0xa7, 0xac, 0x13, 0xe3, 0x1e, 0x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, 0xd6, 0x75, 0xcd, 0x4b, 0xc7, 0x0a, 0x3f, - 0x25, 0x50, 0x16, 0x01, 0x48, 0x44, 0xec, 0xd1, 0xcf, 0xc1, 0x12, 0x61, 0xee, 0x90, 0x72, 0xec, - 0x46, 0x88, 0xb1, 0xfc, 0x77, 0xdb, 0x3b, 0xe3, 0x04, 0x56, 0x98, 0x34, 0x81, 0xff, 0x95, 0x16, - 0x27, 0x71, 0xcb, 0x59, 0x20, 0x4c, 0x14, 0x4a, 0x8a, 0xdf, 0xcf, 0x80, 0x7a, 0xa9, 0x23, 0xb3, - 0x6d, 0x10, 0xd0, 0x90, 0xec, 0xe2, 0x58, 0x95, 0x4c, 0x6c, 0x03, 0x05, 0x15, 0xdb, 0x40, 0x01, - 0x96, 0xa3, 0x29, 0xf3, 0x0a, 0xa8, 0x11, 0x1f, 0x87, 0x9c, 0x70, 0xb9, 0xab, 0xe4, 0x30, 0xe5, - 0x58, 0x9a, 0xc0, 0x55, 0x15, 0x8f, 0x42, 0xca, 0xbf, 0x53, 0x73, 0x35, 0x73, 0x13, 0xcc, 0xdd, - 0xc3, 0x5d, 0x46, 0xb8, 0xfc, 0x1d, 0x2e, 0xab, 0xab, 0xa1, 0x34, 0x81, 0x0d, 0x69, 0x44, 0x01, - 0x65, 0x1b, 0x5a, 0xc9, 0xf4, 0xc1, 0x31, 0x86, 0xbd, 0x41, 0x4c, 0xf8, 0xc8, 0xf5, 0x68, 0xc8, - 0x91, 0xc7, 0x45, 0x59, 0xe6, 0xed, 0x0f, 0xb2, 0xf5, 0x5f, 0xe5, 0xd2, 0x04, 0x9e, 0x51, 0x7b, - 0xa8, 0xc2, 0x94, 0xad, 0x2f, 0x6b, 0xf2, 0x92, 0xe4, 0xb2, 0x40, 0x7d, 0xcc, 0x11, 0xe9, 0xeb, - 0x2d, 0x25, 0x02, 0x55, 0x50, 0x11, 0xa8, 0x02, 0x26, 0x02, 0x55, 0x58, 0x69, 0xa2, 0xee, 0x4f, - 0x83, 0x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2, 0x6f, 0x3c, 0x7e, 0xd6, 0x34, 0x9e, 0x3e, - 0x6b, 0x1a, 0xbf, 0x3f, 0x6b, 0x1a, 0x0f, 0x9e, 0x37, 0xa7, 0x9e, 0x3e, 0x6f, 0x4e, 0xfd, 0xf2, - 0xbc, 0x39, 0xf5, 0xe5, 0x7b, 0x25, 0x3f, 0xaa, 0x83, 0x42, 0xcc, 0xf5, 0xe3, 0xba, 0xb7, 0x83, - 0x48, 0xd8, 0xd9, 0x2b, 0xfe, 0x3d, 0x23, 0x3c, 0x77, 0x67, 0x45, 0x31, 0x2e, 0xfc, 0x1d, 0x00, - 0x00, 0xff, 0xff, 0x43, 0xc2, 0xd0, 0x60, 0xbf, 0x11, 0x00, 0x00, + // 1465 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0xcf, 0x6f, 0xd4, 0x46, + 0x1b, 0x8e, 0x13, 0x48, 0x36, 0xb3, 0xf9, 0xc1, 0x67, 0xf2, 0xc1, 0x86, 0x8f, 0x2f, 0x13, 0xe6, + 0xfb, 0x5a, 0x82, 0xda, 0xec, 0x2a, 0x50, 0xa9, 0x2a, 0x87, 0x4a, 0x31, 0x49, 0x5b, 0x68, 0x41, + 0xa9, 0x9b, 0x82, 0x54, 0xa9, 0x72, 0x67, 0xed, 0x61, 0x33, 0x64, 0xed, 0x71, 0x3d, 0xb3, 0x4b, + 0x56, 0xea, 0xa1, 0x52, 0x2f, 0x1c, 0x39, 0x22, 0xf5, 0xc2, 0x1f, 0xd1, 0xbf, 0xa1, 0xa2, 0x9c, + 0x38, 0x56, 0x3d, 0xb8, 0x15, 0x5c, 0xaa, 0x3d, 0xba, 0x87, 0x5e, 0x2b, 0xcf, 0x8f, 0xb5, 0xd7, + 0x21, 0x42, 0x54, 0xe2, 0x54, 0x4e, 0xf1, 0x3c, 0xcf, 0x3b, 0xef, 0xfb, 0x8e, 0xdf, 0xe7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, 0x38, 0x15, 0x8d, 0x69, 0xfd, 0xca, + 0xb5, 0xba, 0x73, 0x3d, 0x37, 0xb5, 0x58, 0x9b, 0x57, 0x18, 0x8d, 0x9c, 0x6d, 0xf3, 0xca, 0x8f, + 0xf4, 0x71, 0x54, 0x76, 0x25, 0x93, 0x4a, 0x76, 0xd7, 0x69, 0xb4, 0xa5, 0x08, 0xfb, 0x6b, 0x30, + 0xdf, 0x67, 0x22, 0xaf, 0x52, 0x4c, 0x12, 0xca, 0x82, 0xc6, 0xcc, 0x8b, 0x34, 0xb0, 0xa1, 0x13, + 0x1a, 0xdf, 0x97, 0xa5, 0x70, 0x49, 0x25, 0x31, 0x06, 0xab, 0x5a, 0xcf, 0x29, 0x6c, 0x47, 0x41, + 0x3f, 0xce, 0x80, 0x39, 0xb7, 0x94, 0x8d, 0x7d, 0x13, 0x2c, 0x46, 0x44, 0xdc, 0x65, 0xc9, 0xbe, + 0x87, 0x83, 0x20, 0x21, 0x9c, 0xeb, 0x06, 0x5c, 0x1f, 0xa6, 0xb0, 0x4a, 0x65, 0x29, 0x3c, 0xa5, + 0x02, 0x55, 0x08, 0xe4, 0x2e, 0x68, 0x64, 0x53, 0x01, 0x36, 0x06, 0xd3, 0x71, 0xaf, 0xbd, 0x4f, + 0x06, 0xba, 0xf7, 0x96, 0x0e, 0x1d, 0x6a, 0x33, 0x1a, 0x38, 0x97, 0x86, 0x29, 0xd4, 0x76, 0x59, + 0x0a, 0xe7, 0x95, 0x6f, 0xb5, 0x46, 0x8f, 0x7f, 0x58, 0x5f, 0xd2, 0x95, 0xf1, 0x93, 0x41, 0x2c, + 0x58, 0x73, 0xa7, 0xd7, 0xfe, 0x98, 0x0c, 0x5c, 0xbd, 0xc1, 0x7e, 0x17, 0xcc, 0xf0, 0x1e, 0x8f, + 0x49, 0x14, 0xc8, 0xe6, 0xa9, 0x39, 0xff, 0x1d, 0xa6, 0xd0, 0x40, 0x59, 0x0a, 0x17, 0x94, 0x3b, + 0x0d, 0x20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 0x8a, 0x88, + 0xba, 0x98, 0xa3, 0x48, 0x86, 0x72, 0x6e, 0x3c, 0x7a, 0xba, 0x62, 0x3d, 0x79, 0xba, 0x62, 0xfd, + 0xf6, 0x74, 0xc5, 0xba, 0xff, 0x6c, 0x65, 0xe2, 0xc9, 0xb3, 0x95, 0x89, 0x9f, 0x9f, 0xad, 0x4c, + 0x7c, 0xf1, 0x4e, 0x29, 0x8e, 0x56, 0x50, 0x44, 0x84, 0x79, 0x5c, 0xf7, 0xf7, 0x30, 0x8d, 0x5a, + 0x07, 0xc5, 0xbf, 0x69, 0x64, 0xe4, 0xf6, 0xb4, 0x2c, 0xc6, 0xa5, 0xbf, 0x02, 0x00, 0x00, 0xff, + 0xff, 0xb4, 0x59, 0x8d, 0xfe, 0xc7, 0x11, 0x00, 0x00, } func (this *ResourceNode) Equal(that interface{}) bool { @@ -860,7 +860,7 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x3a { - size, err := m.ResourceNodeMinStake.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.ResourceNodeMinDeposit.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -1378,7 +1378,7 @@ func (m *Params) Size() (n int) { if m.ResourceNodeRegEnabled { n += 2 } - l = m.ResourceNodeMinStake.Size() + l = m.ResourceNodeMinDeposit.Size() n += 1 + l + sovRegister(uint64(l)) l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.VotingPeriod) n += 1 + l + sovRegister(uint64(l)) @@ -1733,7 +1733,7 @@ func (m *Params) Unmarshal(dAtA []byte) error { m.ResourceNodeRegEnabled = bool(v != 0) case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceNodeMinStake", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ResourceNodeMinDeposit", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -1760,7 +1760,7 @@ func (m *Params) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ResourceNodeMinStake.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.ResourceNodeMinDeposit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/x/register/types/tx.pb.go b/x/register/types/tx.pb.go index df293a80..f4a44726 100644 --- a/x/register/types/tx.pb.go +++ b/x/register/types/tx.pb.go @@ -653,25 +653,25 @@ func (m *MsgUpdateMetaNodeResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgUpdateMetaNodeResponse proto.InternalMessageInfo -// MsgUpdateResourceNodeStake defines a SDK message for updating the stake of an existing resource node. -type MsgUpdateResourceNodeStake struct { +// MsgUpdateResourceNodeDeposit defines a SDK message for updating the deposit of an existing resource node. +type MsgUpdateResourceNodeDeposit struct { NetworkAddress string `protobuf:"bytes,1,opt,name=network_address,json=networkAddress,proto3" json:"network_address" yaml:"network_address"` OwnerAddress string `protobuf:"bytes,2,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address" yaml:"owner_address"` - StakeDelta types1.Coin `protobuf:"bytes,4,opt,name=stake_delta,json=stakeDelta,proto3" json:"stake_delta" yaml:"stake_delta"` + DepositDelta types1.Coin `protobuf:"bytes,3,opt,name=deposit_delta,json=depositDelta,proto3" json:"deposit_delta" yaml:"deposit_delta"` } -func (m *MsgUpdateResourceNodeStake) Reset() { *m = MsgUpdateResourceNodeStake{} } -func (m *MsgUpdateResourceNodeStake) String() string { return proto.CompactTextString(m) } -func (*MsgUpdateResourceNodeStake) ProtoMessage() {} -func (*MsgUpdateResourceNodeStake) Descriptor() ([]byte, []int) { +func (m *MsgUpdateResourceNodeDeposit) Reset() { *m = MsgUpdateResourceNodeDeposit{} } +func (m *MsgUpdateResourceNodeDeposit) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateResourceNodeDeposit) ProtoMessage() {} +func (*MsgUpdateResourceNodeDeposit) Descriptor() ([]byte, []int) { return fileDescriptor_75d4b90d7a185a31, []int{12} } -func (m *MsgUpdateResourceNodeStake) XXX_Unmarshal(b []byte) error { +func (m *MsgUpdateResourceNodeDeposit) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgUpdateResourceNodeStake) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgUpdateResourceNodeDeposit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgUpdateResourceNodeStake.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgUpdateResourceNodeDeposit.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -681,55 +681,55 @@ func (m *MsgUpdateResourceNodeStake) XXX_Marshal(b []byte, deterministic bool) ( return b[:n], nil } } -func (m *MsgUpdateResourceNodeStake) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgUpdateResourceNodeStake.Merge(m, src) +func (m *MsgUpdateResourceNodeDeposit) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateResourceNodeDeposit.Merge(m, src) } -func (m *MsgUpdateResourceNodeStake) XXX_Size() int { +func (m *MsgUpdateResourceNodeDeposit) XXX_Size() int { return m.Size() } -func (m *MsgUpdateResourceNodeStake) XXX_DiscardUnknown() { - xxx_messageInfo_MsgUpdateResourceNodeStake.DiscardUnknown(m) +func (m *MsgUpdateResourceNodeDeposit) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateResourceNodeDeposit.DiscardUnknown(m) } -var xxx_messageInfo_MsgUpdateResourceNodeStake proto.InternalMessageInfo +var xxx_messageInfo_MsgUpdateResourceNodeDeposit proto.InternalMessageInfo -func (m *MsgUpdateResourceNodeStake) GetNetworkAddress() string { +func (m *MsgUpdateResourceNodeDeposit) GetNetworkAddress() string { if m != nil { return m.NetworkAddress } return "" } -func (m *MsgUpdateResourceNodeStake) GetOwnerAddress() string { +func (m *MsgUpdateResourceNodeDeposit) GetOwnerAddress() string { if m != nil { return m.OwnerAddress } return "" } -func (m *MsgUpdateResourceNodeStake) GetStakeDelta() types1.Coin { +func (m *MsgUpdateResourceNodeDeposit) GetDepositDelta() types1.Coin { if m != nil { - return m.StakeDelta + return m.DepositDelta } return types1.Coin{} } -// MsgUpdateResourceNodeStakeResponse defines the Msg/UpdateResourceNodeStake response type. -type MsgUpdateResourceNodeStakeResponse struct { +// MsgUpdateResourceNodeDepositResponse defines the Msg/UpdateResourceNodeDeposit response type. +type MsgUpdateResourceNodeDepositResponse struct { } -func (m *MsgUpdateResourceNodeStakeResponse) Reset() { *m = MsgUpdateResourceNodeStakeResponse{} } -func (m *MsgUpdateResourceNodeStakeResponse) String() string { return proto.CompactTextString(m) } -func (*MsgUpdateResourceNodeStakeResponse) ProtoMessage() {} -func (*MsgUpdateResourceNodeStakeResponse) Descriptor() ([]byte, []int) { +func (m *MsgUpdateResourceNodeDepositResponse) Reset() { *m = MsgUpdateResourceNodeDepositResponse{} } +func (m *MsgUpdateResourceNodeDepositResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateResourceNodeDepositResponse) ProtoMessage() {} +func (*MsgUpdateResourceNodeDepositResponse) Descriptor() ([]byte, []int) { return fileDescriptor_75d4b90d7a185a31, []int{13} } -func (m *MsgUpdateResourceNodeStakeResponse) XXX_Unmarshal(b []byte) error { +func (m *MsgUpdateResourceNodeDepositResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgUpdateResourceNodeStakeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgUpdateResourceNodeDepositResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgUpdateResourceNodeStakeResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgUpdateResourceNodeDepositResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -739,38 +739,38 @@ func (m *MsgUpdateResourceNodeStakeResponse) XXX_Marshal(b []byte, deterministic return b[:n], nil } } -func (m *MsgUpdateResourceNodeStakeResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgUpdateResourceNodeStakeResponse.Merge(m, src) +func (m *MsgUpdateResourceNodeDepositResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateResourceNodeDepositResponse.Merge(m, src) } -func (m *MsgUpdateResourceNodeStakeResponse) XXX_Size() int { +func (m *MsgUpdateResourceNodeDepositResponse) XXX_Size() int { return m.Size() } -func (m *MsgUpdateResourceNodeStakeResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgUpdateResourceNodeStakeResponse.DiscardUnknown(m) +func (m *MsgUpdateResourceNodeDepositResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateResourceNodeDepositResponse.DiscardUnknown(m) } -var xxx_messageInfo_MsgUpdateResourceNodeStakeResponse proto.InternalMessageInfo +var xxx_messageInfo_MsgUpdateResourceNodeDepositResponse proto.InternalMessageInfo -// MsgUpdateEffectiveStake defines a SDK message for updating the effective stake of an existing resource node. -type MsgUpdateEffectiveStake struct { +// MsgUpdateEffectiveDeposit defines a SDK message for updating the effective deposit of an existing resource node. +type MsgUpdateEffectiveDeposit struct { Reporters []string `protobuf:"bytes,1,rep,name=reporters,proto3" json:"reporters" yaml:"reporters"` ReporterOwner []string `protobuf:"bytes,2,rep,name=reporter_owner,json=reporterOwner,proto3" json:"reporter_owner" yaml:"reporter_owner"` NetworkAddress string `protobuf:"bytes,3,opt,name=network_address,json=networkAddress,proto3" json:"network_address" yaml:"network_address"` EffectiveTokens github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,4,opt,name=effective_tokens,json=effectiveTokens,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"effective_tokens" yaml:"effective_tokens"` } -func (m *MsgUpdateEffectiveStake) Reset() { *m = MsgUpdateEffectiveStake{} } -func (m *MsgUpdateEffectiveStake) String() string { return proto.CompactTextString(m) } -func (*MsgUpdateEffectiveStake) ProtoMessage() {} -func (*MsgUpdateEffectiveStake) Descriptor() ([]byte, []int) { +func (m *MsgUpdateEffectiveDeposit) Reset() { *m = MsgUpdateEffectiveDeposit{} } +func (m *MsgUpdateEffectiveDeposit) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateEffectiveDeposit) ProtoMessage() {} +func (*MsgUpdateEffectiveDeposit) Descriptor() ([]byte, []int) { return fileDescriptor_75d4b90d7a185a31, []int{14} } -func (m *MsgUpdateEffectiveStake) XXX_Unmarshal(b []byte) error { +func (m *MsgUpdateEffectiveDeposit) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgUpdateEffectiveStake) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgUpdateEffectiveDeposit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgUpdateEffectiveStake.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgUpdateEffectiveDeposit.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -780,34 +780,34 @@ func (m *MsgUpdateEffectiveStake) XXX_Marshal(b []byte, deterministic bool) ([]b return b[:n], nil } } -func (m *MsgUpdateEffectiveStake) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgUpdateEffectiveStake.Merge(m, src) +func (m *MsgUpdateEffectiveDeposit) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateEffectiveDeposit.Merge(m, src) } -func (m *MsgUpdateEffectiveStake) XXX_Size() int { +func (m *MsgUpdateEffectiveDeposit) XXX_Size() int { return m.Size() } -func (m *MsgUpdateEffectiveStake) XXX_DiscardUnknown() { - xxx_messageInfo_MsgUpdateEffectiveStake.DiscardUnknown(m) +func (m *MsgUpdateEffectiveDeposit) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateEffectiveDeposit.DiscardUnknown(m) } -var xxx_messageInfo_MsgUpdateEffectiveStake proto.InternalMessageInfo +var xxx_messageInfo_MsgUpdateEffectiveDeposit proto.InternalMessageInfo -// MsgUpdateEffectiveStakeResponse defines the Msg/UpdateEffectiveStake response type. -type MsgUpdateEffectiveStakeResponse struct { +// MsgUpdateEffectiveDepositResponse defines the Msg/UpdateEffectiveDeposit response type. +type MsgUpdateEffectiveDepositResponse struct { } -func (m *MsgUpdateEffectiveStakeResponse) Reset() { *m = MsgUpdateEffectiveStakeResponse{} } -func (m *MsgUpdateEffectiveStakeResponse) String() string { return proto.CompactTextString(m) } -func (*MsgUpdateEffectiveStakeResponse) ProtoMessage() {} -func (*MsgUpdateEffectiveStakeResponse) Descriptor() ([]byte, []int) { +func (m *MsgUpdateEffectiveDepositResponse) Reset() { *m = MsgUpdateEffectiveDepositResponse{} } +func (m *MsgUpdateEffectiveDepositResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateEffectiveDepositResponse) ProtoMessage() {} +func (*MsgUpdateEffectiveDepositResponse) Descriptor() ([]byte, []int) { return fileDescriptor_75d4b90d7a185a31, []int{15} } -func (m *MsgUpdateEffectiveStakeResponse) XXX_Unmarshal(b []byte) error { +func (m *MsgUpdateEffectiveDepositResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgUpdateEffectiveStakeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgUpdateEffectiveDepositResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgUpdateEffectiveStakeResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgUpdateEffectiveDepositResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -817,38 +817,38 @@ func (m *MsgUpdateEffectiveStakeResponse) XXX_Marshal(b []byte, deterministic bo return b[:n], nil } } -func (m *MsgUpdateEffectiveStakeResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgUpdateEffectiveStakeResponse.Merge(m, src) +func (m *MsgUpdateEffectiveDepositResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateEffectiveDepositResponse.Merge(m, src) } -func (m *MsgUpdateEffectiveStakeResponse) XXX_Size() int { +func (m *MsgUpdateEffectiveDepositResponse) XXX_Size() int { return m.Size() } -func (m *MsgUpdateEffectiveStakeResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgUpdateEffectiveStakeResponse.DiscardUnknown(m) +func (m *MsgUpdateEffectiveDepositResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateEffectiveDepositResponse.DiscardUnknown(m) } -var xxx_messageInfo_MsgUpdateEffectiveStakeResponse proto.InternalMessageInfo +var xxx_messageInfo_MsgUpdateEffectiveDepositResponse proto.InternalMessageInfo -// MsgUpdateMetaNodeStake defines a SDK message for updating the stake of an existing meta node. -type MsgUpdateMetaNodeStake struct { +// MsgUpdateMetaNodeDeposit defines a SDK message for updating the deposit of an existing meta node. +type MsgUpdateMetaNodeDeposit struct { NetworkAddress string `protobuf:"bytes,1,opt,name=network_address,json=networkAddress,proto3" json:"network_address" yaml:"network_address"` OwnerAddress string `protobuf:"bytes,2,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address" yaml:"owner_address"` - IncrStake bool `protobuf:"varint,3,opt,name=incr_stake,json=incrStake,proto3" json:"incr_stake" yaml:"incr_stake"` - StakeDelta types1.Coin `protobuf:"bytes,4,opt,name=stake_delta,json=stakeDelta,proto3" json:"stake_delta" yaml:"stake_delta"` + IncrDeposit bool `protobuf:"varint,3,opt,name=incr_deposit,json=incrDeposit,proto3" json:"incr_deposit" yaml:"incr_deposit"` + DepositDelta types1.Coin `protobuf:"bytes,4,opt,name=deposit_delta,json=depositDelta,proto3" json:"deposit_delta" yaml:"deposit_delta"` } -func (m *MsgUpdateMetaNodeStake) Reset() { *m = MsgUpdateMetaNodeStake{} } -func (m *MsgUpdateMetaNodeStake) String() string { return proto.CompactTextString(m) } -func (*MsgUpdateMetaNodeStake) ProtoMessage() {} -func (*MsgUpdateMetaNodeStake) Descriptor() ([]byte, []int) { +func (m *MsgUpdateMetaNodeDeposit) Reset() { *m = MsgUpdateMetaNodeDeposit{} } +func (m *MsgUpdateMetaNodeDeposit) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateMetaNodeDeposit) ProtoMessage() {} +func (*MsgUpdateMetaNodeDeposit) Descriptor() ([]byte, []int) { return fileDescriptor_75d4b90d7a185a31, []int{16} } -func (m *MsgUpdateMetaNodeStake) XXX_Unmarshal(b []byte) error { +func (m *MsgUpdateMetaNodeDeposit) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgUpdateMetaNodeStake) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgUpdateMetaNodeDeposit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgUpdateMetaNodeStake.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgUpdateMetaNodeDeposit.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -858,62 +858,62 @@ func (m *MsgUpdateMetaNodeStake) XXX_Marshal(b []byte, deterministic bool) ([]by return b[:n], nil } } -func (m *MsgUpdateMetaNodeStake) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgUpdateMetaNodeStake.Merge(m, src) +func (m *MsgUpdateMetaNodeDeposit) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateMetaNodeDeposit.Merge(m, src) } -func (m *MsgUpdateMetaNodeStake) XXX_Size() int { +func (m *MsgUpdateMetaNodeDeposit) XXX_Size() int { return m.Size() } -func (m *MsgUpdateMetaNodeStake) XXX_DiscardUnknown() { - xxx_messageInfo_MsgUpdateMetaNodeStake.DiscardUnknown(m) +func (m *MsgUpdateMetaNodeDeposit) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateMetaNodeDeposit.DiscardUnknown(m) } -var xxx_messageInfo_MsgUpdateMetaNodeStake proto.InternalMessageInfo +var xxx_messageInfo_MsgUpdateMetaNodeDeposit proto.InternalMessageInfo -func (m *MsgUpdateMetaNodeStake) GetNetworkAddress() string { +func (m *MsgUpdateMetaNodeDeposit) GetNetworkAddress() string { if m != nil { return m.NetworkAddress } return "" } -func (m *MsgUpdateMetaNodeStake) GetOwnerAddress() string { +func (m *MsgUpdateMetaNodeDeposit) GetOwnerAddress() string { if m != nil { return m.OwnerAddress } return "" } -func (m *MsgUpdateMetaNodeStake) GetIncrStake() bool { +func (m *MsgUpdateMetaNodeDeposit) GetIncrDeposit() bool { if m != nil { - return m.IncrStake + return m.IncrDeposit } return false } -func (m *MsgUpdateMetaNodeStake) GetStakeDelta() types1.Coin { +func (m *MsgUpdateMetaNodeDeposit) GetDepositDelta() types1.Coin { if m != nil { - return m.StakeDelta + return m.DepositDelta } return types1.Coin{} } -// MsgUpdateResourceNodeStakeResponse defines the Msg/UpdateResourceNodeStake response type. -type MsgUpdateMetaNodeStakeResponse struct { +// MsgUpdateMetaNodeDepositResponse defines the Msg/UpdateMetaNodeDeposit response type. +type MsgUpdateMetaNodeDepositResponse struct { } -func (m *MsgUpdateMetaNodeStakeResponse) Reset() { *m = MsgUpdateMetaNodeStakeResponse{} } -func (m *MsgUpdateMetaNodeStakeResponse) String() string { return proto.CompactTextString(m) } -func (*MsgUpdateMetaNodeStakeResponse) ProtoMessage() {} -func (*MsgUpdateMetaNodeStakeResponse) Descriptor() ([]byte, []int) { +func (m *MsgUpdateMetaNodeDepositResponse) Reset() { *m = MsgUpdateMetaNodeDepositResponse{} } +func (m *MsgUpdateMetaNodeDepositResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateMetaNodeDepositResponse) ProtoMessage() {} +func (*MsgUpdateMetaNodeDepositResponse) Descriptor() ([]byte, []int) { return fileDescriptor_75d4b90d7a185a31, []int{17} } -func (m *MsgUpdateMetaNodeStakeResponse) XXX_Unmarshal(b []byte) error { +func (m *MsgUpdateMetaNodeDepositResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgUpdateMetaNodeStakeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgUpdateMetaNodeDepositResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgUpdateMetaNodeStakeResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgUpdateMetaNodeDepositResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -923,17 +923,17 @@ func (m *MsgUpdateMetaNodeStakeResponse) XXX_Marshal(b []byte, deterministic boo return b[:n], nil } } -func (m *MsgUpdateMetaNodeStakeResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgUpdateMetaNodeStakeResponse.Merge(m, src) +func (m *MsgUpdateMetaNodeDepositResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateMetaNodeDepositResponse.Merge(m, src) } -func (m *MsgUpdateMetaNodeStakeResponse) XXX_Size() int { +func (m *MsgUpdateMetaNodeDepositResponse) XXX_Size() int { return m.Size() } -func (m *MsgUpdateMetaNodeStakeResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgUpdateMetaNodeStakeResponse.DiscardUnknown(m) +func (m *MsgUpdateMetaNodeDepositResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateMetaNodeDepositResponse.DiscardUnknown(m) } -var xxx_messageInfo_MsgUpdateMetaNodeStakeResponse proto.InternalMessageInfo +var xxx_messageInfo_MsgUpdateMetaNodeDepositResponse proto.InternalMessageInfo // MsgMetaNodeRegistrationVote defines a SDK message for registration vote of an existing meta node. type MsgMetaNodeRegistrationVote struct { @@ -1049,24 +1049,26 @@ func (m *MsgMetaNodeRegistrationVoteResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgMetaNodeRegistrationVoteResponse proto.InternalMessageInfo -// MsgWithdrawMetaNodeRegistrationStake defines a SDK message for withdrawing registration stake of meta node. -type MsgWithdrawMetaNodeRegistrationStake struct { +// MsgWithdrawMetaNodeRegistrationDeposit defines a SDK message for withdrawing registration deposit of meta node. +type MsgWithdrawMetaNodeRegistrationDeposit struct { NetworkAddress string `protobuf:"bytes,1,opt,name=network_address,json=networkAddress,proto3" json:"network_address" yaml:"network_address"` OwnerAddress string `protobuf:"bytes,2,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address" yaml:"owner_address"` } -func (m *MsgWithdrawMetaNodeRegistrationStake) Reset() { *m = MsgWithdrawMetaNodeRegistrationStake{} } -func (m *MsgWithdrawMetaNodeRegistrationStake) String() string { return proto.CompactTextString(m) } -func (*MsgWithdrawMetaNodeRegistrationStake) ProtoMessage() {} -func (*MsgWithdrawMetaNodeRegistrationStake) Descriptor() ([]byte, []int) { +func (m *MsgWithdrawMetaNodeRegistrationDeposit) Reset() { + *m = MsgWithdrawMetaNodeRegistrationDeposit{} +} +func (m *MsgWithdrawMetaNodeRegistrationDeposit) String() string { return proto.CompactTextString(m) } +func (*MsgWithdrawMetaNodeRegistrationDeposit) ProtoMessage() {} +func (*MsgWithdrawMetaNodeRegistrationDeposit) Descriptor() ([]byte, []int) { return fileDescriptor_75d4b90d7a185a31, []int{20} } -func (m *MsgWithdrawMetaNodeRegistrationStake) XXX_Unmarshal(b []byte) error { +func (m *MsgWithdrawMetaNodeRegistrationDeposit) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgWithdrawMetaNodeRegistrationStake) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgWithdrawMetaNodeRegistrationDeposit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgWithdrawMetaNodeRegistrationStake.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgWithdrawMetaNodeRegistrationDeposit.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -1076,52 +1078,52 @@ func (m *MsgWithdrawMetaNodeRegistrationStake) XXX_Marshal(b []byte, determinist return b[:n], nil } } -func (m *MsgWithdrawMetaNodeRegistrationStake) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgWithdrawMetaNodeRegistrationStake.Merge(m, src) +func (m *MsgWithdrawMetaNodeRegistrationDeposit) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgWithdrawMetaNodeRegistrationDeposit.Merge(m, src) } -func (m *MsgWithdrawMetaNodeRegistrationStake) XXX_Size() int { +func (m *MsgWithdrawMetaNodeRegistrationDeposit) XXX_Size() int { return m.Size() } -func (m *MsgWithdrawMetaNodeRegistrationStake) XXX_DiscardUnknown() { - xxx_messageInfo_MsgWithdrawMetaNodeRegistrationStake.DiscardUnknown(m) +func (m *MsgWithdrawMetaNodeRegistrationDeposit) XXX_DiscardUnknown() { + xxx_messageInfo_MsgWithdrawMetaNodeRegistrationDeposit.DiscardUnknown(m) } -var xxx_messageInfo_MsgWithdrawMetaNodeRegistrationStake proto.InternalMessageInfo +var xxx_messageInfo_MsgWithdrawMetaNodeRegistrationDeposit proto.InternalMessageInfo -func (m *MsgWithdrawMetaNodeRegistrationStake) GetNetworkAddress() string { +func (m *MsgWithdrawMetaNodeRegistrationDeposit) GetNetworkAddress() string { if m != nil { return m.NetworkAddress } return "" } -func (m *MsgWithdrawMetaNodeRegistrationStake) GetOwnerAddress() string { +func (m *MsgWithdrawMetaNodeRegistrationDeposit) GetOwnerAddress() string { if m != nil { return m.OwnerAddress } return "" } -// MsgWithdrawMetaNodeRegistrationStakeResponse defines the Msg/WithdrawMetaNodeRegistrationStake response type. -type MsgWithdrawMetaNodeRegistrationStakeResponse struct { +// MsgWithdrawMetaNodeRegistrationDepositResponse defines the Msg/WithdrawMetaNodeRegistrationDeposit response type. +type MsgWithdrawMetaNodeRegistrationDepositResponse struct { } -func (m *MsgWithdrawMetaNodeRegistrationStakeResponse) Reset() { - *m = MsgWithdrawMetaNodeRegistrationStakeResponse{} +func (m *MsgWithdrawMetaNodeRegistrationDepositResponse) Reset() { + *m = MsgWithdrawMetaNodeRegistrationDepositResponse{} } -func (m *MsgWithdrawMetaNodeRegistrationStakeResponse) String() string { +func (m *MsgWithdrawMetaNodeRegistrationDepositResponse) String() string { return proto.CompactTextString(m) } -func (*MsgWithdrawMetaNodeRegistrationStakeResponse) ProtoMessage() {} -func (*MsgWithdrawMetaNodeRegistrationStakeResponse) Descriptor() ([]byte, []int) { +func (*MsgWithdrawMetaNodeRegistrationDepositResponse) ProtoMessage() {} +func (*MsgWithdrawMetaNodeRegistrationDepositResponse) Descriptor() ([]byte, []int) { return fileDescriptor_75d4b90d7a185a31, []int{21} } -func (m *MsgWithdrawMetaNodeRegistrationStakeResponse) XXX_Unmarshal(b []byte) error { +func (m *MsgWithdrawMetaNodeRegistrationDepositResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgWithdrawMetaNodeRegistrationStakeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgWithdrawMetaNodeRegistrationDepositResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgWithdrawMetaNodeRegistrationStakeResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgWithdrawMetaNodeRegistrationDepositResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -1131,17 +1133,17 @@ func (m *MsgWithdrawMetaNodeRegistrationStakeResponse) XXX_Marshal(b []byte, det return b[:n], nil } } -func (m *MsgWithdrawMetaNodeRegistrationStakeResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgWithdrawMetaNodeRegistrationStakeResponse.Merge(m, src) +func (m *MsgWithdrawMetaNodeRegistrationDepositResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgWithdrawMetaNodeRegistrationDepositResponse.Merge(m, src) } -func (m *MsgWithdrawMetaNodeRegistrationStakeResponse) XXX_Size() int { +func (m *MsgWithdrawMetaNodeRegistrationDepositResponse) XXX_Size() int { return m.Size() } -func (m *MsgWithdrawMetaNodeRegistrationStakeResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgWithdrawMetaNodeRegistrationStakeResponse.DiscardUnknown(m) +func (m *MsgWithdrawMetaNodeRegistrationDepositResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgWithdrawMetaNodeRegistrationDepositResponse.DiscardUnknown(m) } -var xxx_messageInfo_MsgWithdrawMetaNodeRegistrationStakeResponse proto.InternalMessageInfo +var xxx_messageInfo_MsgWithdrawMetaNodeRegistrationDepositResponse proto.InternalMessageInfo func init() { proto.RegisterType((*MsgCreateResourceNode)(nil), "stratos.register.v1.MsgCreateResourceNode") @@ -1156,116 +1158,117 @@ func init() { proto.RegisterType((*MsgUpdateResourceNodeResponse)(nil), "stratos.register.v1.MsgUpdateResourceNodeResponse") proto.RegisterType((*MsgUpdateMetaNode)(nil), "stratos.register.v1.MsgUpdateMetaNode") proto.RegisterType((*MsgUpdateMetaNodeResponse)(nil), "stratos.register.v1.MsgUpdateMetaNodeResponse") - proto.RegisterType((*MsgUpdateResourceNodeStake)(nil), "stratos.register.v1.MsgUpdateResourceNodeStake") - proto.RegisterType((*MsgUpdateResourceNodeStakeResponse)(nil), "stratos.register.v1.MsgUpdateResourceNodeStakeResponse") - proto.RegisterType((*MsgUpdateEffectiveStake)(nil), "stratos.register.v1.MsgUpdateEffectiveStake") - proto.RegisterType((*MsgUpdateEffectiveStakeResponse)(nil), "stratos.register.v1.MsgUpdateEffectiveStakeResponse") - proto.RegisterType((*MsgUpdateMetaNodeStake)(nil), "stratos.register.v1.MsgUpdateMetaNodeStake") - proto.RegisterType((*MsgUpdateMetaNodeStakeResponse)(nil), "stratos.register.v1.MsgUpdateMetaNodeStakeResponse") + proto.RegisterType((*MsgUpdateResourceNodeDeposit)(nil), "stratos.register.v1.MsgUpdateResourceNodeDeposit") + proto.RegisterType((*MsgUpdateResourceNodeDepositResponse)(nil), "stratos.register.v1.MsgUpdateResourceNodeDepositResponse") + proto.RegisterType((*MsgUpdateEffectiveDeposit)(nil), "stratos.register.v1.MsgUpdateEffectiveDeposit") + proto.RegisterType((*MsgUpdateEffectiveDepositResponse)(nil), "stratos.register.v1.MsgUpdateEffectiveDepositResponse") + proto.RegisterType((*MsgUpdateMetaNodeDeposit)(nil), "stratos.register.v1.MsgUpdateMetaNodeDeposit") + proto.RegisterType((*MsgUpdateMetaNodeDepositResponse)(nil), "stratos.register.v1.MsgUpdateMetaNodeDepositResponse") proto.RegisterType((*MsgMetaNodeRegistrationVote)(nil), "stratos.register.v1.MsgMetaNodeRegistrationVote") proto.RegisterType((*MsgMetaNodeRegistrationVoteResponse)(nil), "stratos.register.v1.MsgMetaNodeRegistrationVoteResponse") - proto.RegisterType((*MsgWithdrawMetaNodeRegistrationStake)(nil), "stratos.register.v1.MsgWithdrawMetaNodeRegistrationStake") - proto.RegisterType((*MsgWithdrawMetaNodeRegistrationStakeResponse)(nil), "stratos.register.v1.MsgWithdrawMetaNodeRegistrationStakeResponse") + proto.RegisterType((*MsgWithdrawMetaNodeRegistrationDeposit)(nil), "stratos.register.v1.MsgWithdrawMetaNodeRegistrationDeposit") + proto.RegisterType((*MsgWithdrawMetaNodeRegistrationDepositResponse)(nil), "stratos.register.v1.MsgWithdrawMetaNodeRegistrationDepositResponse") } func init() { proto.RegisterFile("stratos/register/v1/tx.proto", fileDescriptor_75d4b90d7a185a31) } var fileDescriptor_75d4b90d7a185a31 = []byte{ - // 1503 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0xcb, 0x6f, 0x1b, 0x45, - 0x18, 0xcf, 0x3a, 0x69, 0x69, 0xa6, 0x4d, 0xd3, 0xb8, 0x49, 0xe3, 0xb8, 0x89, 0xc7, 0x9d, 0xb6, - 0x21, 0x6d, 0x9a, 0xdd, 0x3a, 0x29, 0xea, 0x43, 0x3c, 0x14, 0xb7, 0x48, 0x20, 0x94, 0x14, 0x2d, - 0xa5,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 0x26, 0x1b, 0x39, 0x14, 0x16, 0x39, 0xca, 0x44, 0x13, 0xa4, 0x4e, 0x0b, - 0xdd, 0x7a, 0x98, 0xbb, 0x0e, 0x08, 0x54, 0x95, 0x38, 0x16, 0x5f, 0xb3, 0x29, 0x4c, 0x32, 0x71, - 0x28, 0x2c, 0x44, 0x97, 0x8e, 0x30, 0x3b, 0x25, 0x34, 0x57, 0xfb, 0x29, 0x3e, 0x0f, 0x5e, 0x22, - 0xed, 0xa6, 0xee, 0x1e, 0x73, 0x9c, 0xdf, 0x39, 0x9b, 0x42, 0x5f, 0xe4, 0x50, 0x78, 0xd0, 0x2b, - 0x13, 0x2e, 0x40, 0xaa, 0xaf, 0x72, 0x6f, 0xa3, 0x5d, 0xe2, 0xee, 0x04, 0xd1, 0x54, 0x8d, 0x04, - 0xb7, 0xd1, 0x58, 0x83, 0xe0, 0x36, 0x1a, 0xab, 0x46, 0xea, 0x61, 0x26, 0x8f, 0xa4, 0x07, 0x03, - 0x2e, 0x8e, 0xa4, 0x66, 0x0f, 0x5b, 0xec, 0x15, 0x9b, 0xc2, 0x38, 0xb5, 0x43, 0x61, 0xbe, 0x7f, - 0xa9, 0x48, 0x4a, 0x26, 0x98, 0xb4, 0x3f, 0x1d, 0xe8, 0x24, 0x38, 0x9e, 0x52, 0x23, 0xa2, 0x96, - 0x7e, 0x96, 0xc0, 0x89, 0x35, 0xb3, 0xf1, 0x41, 0xd3, 0xba, 0x55, 0x37, 0xb4, 0xad, 0x38, 0xfb, - 0xe7, 0xaa, 0xd3, 0x91, 0x0c, 0xce, 0xec, 0x24, 0x1e, 0x3f, 0x01, 0xcb, 0xff, 0x8c, 0x83, 0xe1, - 0x35, 0xb3, 0x91, 0xfd, 0x5a, 0x02, 0x47, 0xdf, 0xd2, 0xf4, 0xfa, 0x26, 0x8e, 0xff, 0xea, 0x71, - 0x3a, 0xf6, 0xd2, 0x14, 0x6b, 0x9b, 0x5f, 0xde, 0xb9, 0xad, 0x20, 0xa2, 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e8, 0xd1, 0x1d, 0x40, 0xfc, 0x56, 0x02, 0xb3, 0x09, 0x10, 0x79, 0x89, 0x2e, - 0xee, 0x6c, 0x7d, 0x5e, 0xa1, 0x2b, 0xbb, 0x30, 0xde, 0x5d, 0x81, 0x06, 0xdf, 0x63, 0x78, 0x81, - 0xfe, 0x28, 0x81, 0x63, 0x02, 0x77, 0xe2, 0xbd, 0xec, 0x6c, 0x12, 0x9e, 0x24, 0x8f, 0xfc, 0x85, - 0xdd, 0x7a, 0x88, 0x30, 0x2e, 0xb0, 0x30, 0x96, 0xd1, 0xd9, 0xd8, 0x30, 0x02, 0xfc, 0x46, 0xdf, - 0x04, 0x15, 0xf7, 0x16, 0x91, 0x7d, 0x24, 0x81, 0xd3, 0x22, 0x96, 0xed, 0xef, 0x05, 0x17, 0x93, - 0x20, 0x6e, 0xeb, 0x9a, 0x5f, 0x7d, 0x6c, 0x57, 0x11, 0x66, 0x99, 0x85, 0xf9, 0x2a, 0xba, 0x14, - 0x1b, 0xe6, 0x96, 0x37, 0x4f, 0x25, 0x21, 0x5e, 0x46, 0x5e, 0x79, 0xfd, 0xde, 0x83, 0x82, 0x74, - 0xff, 0x41, 0x41, 0xfa, 0xf3, 0x41, 0x41, 0xfa, 0xe4, 0x61, 0x61, 0xe8, 0xfe, 0xc3, 0xc2, 0xd0, - 0x6f, 0x0f, 0x0b, 0x43, 0x1f, 0x9e, 0xeb, 0x7b, 0x89, 0x79, 0xf3, 0xeb, 0xd8, 0xf2, 0xff, 0x2e, - 0xd5, 0x6e, 0x69, 0x4d, 0x5d, 0xb9, 0x1d, 0x2c, 0xc9, 0xde, 0x66, 0xd5, 0xbd, 0xec, 0x73, 0xf3, - 0xca, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x54, 0xac, 0x09, 0x1a, 0x23, 0x1a, 0x00, 0x00, + // 1510 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0x4d, 0x6c, 0x1b, 0x45, + 0x14, 0xce, 0x3a, 0x69, 0x69, 0xa6, 0x49, 0x7f, 0x9c, 0x84, 0x3a, 0x6e, 0xea, 0x49, 0xa7, 0x34, + 0x4d, 0x29, 0xde, 0xad, 0x53, 0x0a, 0x6d, 0x81, 0xa2, 0xba, 0x41, 0xe2, 0x47, 0x49, 0xd1, 0xaa, + 0x14, 0x09, 0xa9, 0xb2, 0xd6, 0xf6, 0xd4, 0x5d, 0x25, 0xde, 0xb1, 0x76, 0xd7, 0x4e, 0x7d, 0xe0, + 0xc2, 0xa9, 0x47, 0x24, 0x4e, 0x9c, 0x28, 0x1c, 0x39, 0x71, 0x80, 0x23, 0x12, 0xe2, 0x54, 0x90, + 0x90, 0x2a, 0x21, 0x21, 0x84, 0xc4, 0x08, 0xb5, 0x9c, 0xf6, 0xc0, 0x61, 0x0f, 0xdc, 0x90, 0xd0, + 0xce, 0xec, 0xce, 0x7a, 0xd7, 0xbb, 0x5b, 0x87, 0x36, 0x87, 0xa2, 0x9e, 0xec, 0x79, 0x3f, 0x33, + 0xdf, 0xfb, 0xde, 0x7b, 0xb3, 0x33, 0x03, 0x16, 0x2c, 0xdb, 0xd4, 0x6c, 0x62, 0x29, 0x26, 0x6e, + 0xe9, 0x96, 0x8d, 0x4d, 0xa5, 0x57, 0x51, 0xec, 0x5b, 0x72, 0xc7, 0x24, 0x36, 0xc9, 0xcf, 0xf8, + 0x5a, 0x39, 0xd0, 0xca, 0xbd, 0x4a, 0x71, 0xb6, 0x45, 0x5a, 0x84, 0xe9, 0x15, 0xef, 0x1f, 0x37, + 0x2d, 0xce, 0xb7, 0x08, 0x69, 0x6d, 0x62, 0x85, 0x8d, 0xea, 0xdd, 0x1b, 0x8a, 0x66, 0xf4, 0x7d, + 0xd5, 0x82, 0xaf, 0xd2, 0x3a, 0xba, 0xa2, 0x19, 0x06, 0xb1, 0x35, 0x5b, 0x27, 0x86, 0x15, 0x38, + 0x36, 0x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b, 0xe1, 0x98, 0x43, 0x21, 0xb7, 0x77, 0x29, 0x9c, + 0xe2, 0x2b, 0xb1, 0x21, 0x52, 0xb9, 0x38, 0xbf, 0x0e, 0xa6, 0xc9, 0x96, 0x81, 0x4d, 0x41, 0xc4, + 0x04, 0x23, 0xe2, 0xa4, 0x43, 0x61, 0x54, 0xe1, 0x52, 0x38, 0xcb, 0x27, 0x88, 0x88, 0x91, 0x3a, + 0xc5, 0xc6, 0x01, 0x05, 0x6d, 0xb0, 0xb7, 0x89, 0xad, 0x86, 0xa9, 0x77, 0xbc, 0x4c, 0x17, 0x76, + 0x31, 0x94, 0x8b, 0x72, 0x42, 0x35, 0xc9, 0xab, 0xa1, 0x5d, 0xf5, 0xa4, 0x0f, 0x76, 0xd0, 0xd9, + 0xa5, 0x30, 0xcf, 0x57, 0x1c, 0x10, 0x22, 0x75, 0xd0, 0x24, 0x7f, 0x11, 0x4c, 0x1a, 0xa4, 0x89, + 0x6b, 0x76, 0xbf, 0x83, 0x0b, 0xbb, 0x17, 0xa5, 0xe5, 0xe9, 0xea, 0x51, 0x87, 0xc2, 0x50, 0xe8, + 0x52, 0x78, 0xc0, 0xcf, 0x5e, 0x20, 0x42, 0xea, 0x1e, 0xef, 0xff, 0x55, 0xef, 0x2f, 0x04, 0x47, + 0x12, 0x4b, 0x44, 0xc5, 0x56, 0x87, 0x18, 0x16, 0x46, 0xbf, 0x8f, 0x83, 0x83, 0xc2, 0x62, 0x0d, + 0xdb, 0xda, 0xd3, 0x02, 0xfa, 0x3f, 0x15, 0x10, 0x3a, 0x0c, 0xe6, 0x87, 0xd2, 0x2b, 0x92, 0xff, + 0x8b, 0xc4, 0x76, 0x10, 0x15, 0xb7, 0x49, 0x2f, 0xba, 0x83, 0xb4, 0xc1, 0x9c, 0xe9, 0x8f, 0x6b, + 0xac, 0xb0, 0xa2, 0x65, 0x70, 0xde, 0xa1, 0x30, 0xd9, 0xc0, 0xa5, 0x70, 0x81, 0x63, 0x4a, 0x54, + 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0x09, 0xa8, 0x65, 0x06, 0xf5, + 0x04, 0x3a, 0x9e, 0xd5, 0x9f, 0xe2, 0x3e, 0x1f, 0x85, 0x18, 0x7b, 0x30, 0x58, 0xca, 0xee, 0xb5, + 0x87, 0x43, 0x4c, 0xb9, 0xbc, 0x67, 0x43, 0xf4, 0xfb, 0x31, 0x05, 0x62, 0xec, 0x7e, 0xb9, 0x94, + 0x9d, 0xd0, 0x87, 0x43, 0x4c, 0xb9, 0x83, 0x65, 0x43, 0xf4, 0x13, 0x1e, 0x42, 0xfc, 0x56, 0x02, + 0xa5, 0x14, 0x88, 0x41, 0xa9, 0x96, 0x47, 0x43, 0x10, 0x54, 0xea, 0xd9, 0x6d, 0x99, 0x6f, 0xaf, + 0x50, 0xc3, 0xd7, 0x9c, 0xa0, 0x50, 0x7f, 0x90, 0xc0, 0x51, 0x81, 0x3f, 0xf5, 0xcc, 0x76, 0x3a, + 0x0d, 0x53, 0x9a, 0x47, 0xf1, 0xdc, 0x76, 0x3d, 0x44, 0x20, 0xe7, 0x58, 0x20, 0x2b, 0xe8, 0x74, + 0x62, 0x20, 0x61, 0x04, 0xe6, 0xc0, 0x04, 0x35, 0xef, 0x84, 0x91, 0xff, 0x5b, 0x02, 0x2f, 0x88, + 0x58, 0x46, 0x39, 0x33, 0xbc, 0x92, 0x06, 0x72, 0x04, 0xe7, 0xe2, 0xe5, 0x47, 0x70, 0x16, 0xc1, + 0xae, 0xb2, 0x60, 0x2f, 0xa2, 0x57, 0x13, 0x83, 0xdd, 0xf2, 0x67, 0xaa, 0xa5, 0x44, 0xed, 0x27, + 0xb1, 0xba, 0x7e, 0xf7, 0x7e, 0x49, 0xba, 0x77, 0xbf, 0x24, 0xfd, 0x71, 0xbf, 0x24, 0x7d, 0xfc, + 0xa0, 0x34, 0x76, 0xef, 0x41, 0x69, 0xec, 0xd7, 0x07, 0xa5, 0xb1, 0x0f, 0x5e, 0x1c, 0xb8, 0xc3, + 0xf9, 0x2b, 0x18, 0xd8, 0x0e, 0xfe, 0x96, 0x1b, 0x37, 0x35, 0xdd, 0x50, 0x6e, 0x85, 0x8b, 0xb2, + 0x5b, 0x5d, 0x7d, 0x37, 0x7b, 0xb6, 0x3e, 0xf3, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x51, 0xa7, + 0x65, 0x3b, 0x6b, 0x1a, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1284,14 +1287,14 @@ type MsgClient interface { HandleMsgCreateResourceNode(ctx context.Context, in *MsgCreateResourceNode, opts ...grpc.CallOption) (*MsgCreateResourceNodeResponse, error) HandleMsgRemoveResourceNode(ctx context.Context, in *MsgRemoveResourceNode, opts ...grpc.CallOption) (*MsgRemoveResourceNodeResponse, error) HandleMsgUpdateResourceNode(ctx context.Context, in *MsgUpdateResourceNode, opts ...grpc.CallOption) (*MsgUpdateResourceNodeResponse, error) - HandleMsgUpdateResourceNodeStake(ctx context.Context, in *MsgUpdateResourceNodeStake, opts ...grpc.CallOption) (*MsgUpdateResourceNodeStakeResponse, error) - HandleMsgUpdateEffectiveStake(ctx context.Context, in *MsgUpdateEffectiveStake, opts ...grpc.CallOption) (*MsgUpdateEffectiveStakeResponse, error) + HandleMsgUpdateResourceNodeDeposit(ctx context.Context, in *MsgUpdateResourceNodeDeposit, opts ...grpc.CallOption) (*MsgUpdateResourceNodeDepositResponse, error) + HandleMsgUpdateEffectiveDeposit(ctx context.Context, in *MsgUpdateEffectiveDeposit, opts ...grpc.CallOption) (*MsgUpdateEffectiveDepositResponse, error) HandleMsgCreateMetaNode(ctx context.Context, in *MsgCreateMetaNode, opts ...grpc.CallOption) (*MsgCreateMetaNodeResponse, error) HandleMsgRemoveMetaNode(ctx context.Context, in *MsgRemoveMetaNode, opts ...grpc.CallOption) (*MsgRemoveMetaNodeResponse, error) HandleMsgUpdateMetaNode(ctx context.Context, in *MsgUpdateMetaNode, opts ...grpc.CallOption) (*MsgUpdateMetaNodeResponse, error) - HandleMsgUpdateMetaNodeStake(ctx context.Context, in *MsgUpdateMetaNodeStake, opts ...grpc.CallOption) (*MsgUpdateMetaNodeStakeResponse, error) + HandleMsgUpdateMetaNodeDeposit(ctx context.Context, in *MsgUpdateMetaNodeDeposit, opts ...grpc.CallOption) (*MsgUpdateMetaNodeDepositResponse, error) HandleMsgMetaNodeRegistrationVote(ctx context.Context, in *MsgMetaNodeRegistrationVote, opts ...grpc.CallOption) (*MsgMetaNodeRegistrationVoteResponse, error) - HandleMsgWithdrawMetaNodeRegistrationStake(ctx context.Context, in *MsgWithdrawMetaNodeRegistrationStake, opts ...grpc.CallOption) (*MsgWithdrawMetaNodeRegistrationStakeResponse, error) + HandleMsgWithdrawMetaNodeRegistrationDeposit(ctx context.Context, in *MsgWithdrawMetaNodeRegistrationDeposit, opts ...grpc.CallOption) (*MsgWithdrawMetaNodeRegistrationDepositResponse, error) } type msgClient struct { @@ -1329,18 +1332,18 @@ func (c *msgClient) HandleMsgUpdateResourceNode(ctx context.Context, in *MsgUpda return out, nil } -func (c *msgClient) HandleMsgUpdateResourceNodeStake(ctx context.Context, in *MsgUpdateResourceNodeStake, opts ...grpc.CallOption) (*MsgUpdateResourceNodeStakeResponse, error) { - out := new(MsgUpdateResourceNodeStakeResponse) - err := c.cc.Invoke(ctx, "/stratos.register.v1.Msg/HandleMsgUpdateResourceNodeStake", in, out, opts...) +func (c *msgClient) HandleMsgUpdateResourceNodeDeposit(ctx context.Context, in *MsgUpdateResourceNodeDeposit, opts ...grpc.CallOption) (*MsgUpdateResourceNodeDepositResponse, error) { + out := new(MsgUpdateResourceNodeDepositResponse) + err := c.cc.Invoke(ctx, "/stratos.register.v1.Msg/HandleMsgUpdateResourceNodeDeposit", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *msgClient) HandleMsgUpdateEffectiveStake(ctx context.Context, in *MsgUpdateEffectiveStake, opts ...grpc.CallOption) (*MsgUpdateEffectiveStakeResponse, error) { - out := new(MsgUpdateEffectiveStakeResponse) - err := c.cc.Invoke(ctx, "/stratos.register.v1.Msg/HandleMsgUpdateEffectiveStake", in, out, opts...) +func (c *msgClient) HandleMsgUpdateEffectiveDeposit(ctx context.Context, in *MsgUpdateEffectiveDeposit, opts ...grpc.CallOption) (*MsgUpdateEffectiveDepositResponse, error) { + out := new(MsgUpdateEffectiveDepositResponse) + err := c.cc.Invoke(ctx, "/stratos.register.v1.Msg/HandleMsgUpdateEffectiveDeposit", in, out, opts...) if err != nil { return nil, err } @@ -1374,9 +1377,9 @@ func (c *msgClient) HandleMsgUpdateMetaNode(ctx context.Context, in *MsgUpdateMe return out, nil } -func (c *msgClient) HandleMsgUpdateMetaNodeStake(ctx context.Context, in *MsgUpdateMetaNodeStake, opts ...grpc.CallOption) (*MsgUpdateMetaNodeStakeResponse, error) { - out := new(MsgUpdateMetaNodeStakeResponse) - err := c.cc.Invoke(ctx, "/stratos.register.v1.Msg/HandleMsgUpdateMetaNodeStake", in, out, opts...) +func (c *msgClient) HandleMsgUpdateMetaNodeDeposit(ctx context.Context, in *MsgUpdateMetaNodeDeposit, opts ...grpc.CallOption) (*MsgUpdateMetaNodeDepositResponse, error) { + out := new(MsgUpdateMetaNodeDepositResponse) + err := c.cc.Invoke(ctx, "/stratos.register.v1.Msg/HandleMsgUpdateMetaNodeDeposit", in, out, opts...) if err != nil { return nil, err } @@ -1392,9 +1395,9 @@ func (c *msgClient) HandleMsgMetaNodeRegistrationVote(ctx context.Context, in *M return out, nil } -func (c *msgClient) HandleMsgWithdrawMetaNodeRegistrationStake(ctx context.Context, in *MsgWithdrawMetaNodeRegistrationStake, opts ...grpc.CallOption) (*MsgWithdrawMetaNodeRegistrationStakeResponse, error) { - out := new(MsgWithdrawMetaNodeRegistrationStakeResponse) - err := c.cc.Invoke(ctx, "/stratos.register.v1.Msg/HandleMsgWithdrawMetaNodeRegistrationStake", in, out, opts...) +func (c *msgClient) HandleMsgWithdrawMetaNodeRegistrationDeposit(ctx context.Context, in *MsgWithdrawMetaNodeRegistrationDeposit, opts ...grpc.CallOption) (*MsgWithdrawMetaNodeRegistrationDepositResponse, error) { + out := new(MsgWithdrawMetaNodeRegistrationDepositResponse) + err := c.cc.Invoke(ctx, "/stratos.register.v1.Msg/HandleMsgWithdrawMetaNodeRegistrationDeposit", in, out, opts...) if err != nil { return nil, err } @@ -1407,14 +1410,14 @@ type MsgServer interface { HandleMsgCreateResourceNode(context.Context, *MsgCreateResourceNode) (*MsgCreateResourceNodeResponse, error) HandleMsgRemoveResourceNode(context.Context, *MsgRemoveResourceNode) (*MsgRemoveResourceNodeResponse, error) HandleMsgUpdateResourceNode(context.Context, *MsgUpdateResourceNode) (*MsgUpdateResourceNodeResponse, error) - HandleMsgUpdateResourceNodeStake(context.Context, *MsgUpdateResourceNodeStake) (*MsgUpdateResourceNodeStakeResponse, error) - HandleMsgUpdateEffectiveStake(context.Context, *MsgUpdateEffectiveStake) (*MsgUpdateEffectiveStakeResponse, error) + HandleMsgUpdateResourceNodeDeposit(context.Context, *MsgUpdateResourceNodeDeposit) (*MsgUpdateResourceNodeDepositResponse, error) + HandleMsgUpdateEffectiveDeposit(context.Context, *MsgUpdateEffectiveDeposit) (*MsgUpdateEffectiveDepositResponse, error) HandleMsgCreateMetaNode(context.Context, *MsgCreateMetaNode) (*MsgCreateMetaNodeResponse, error) HandleMsgRemoveMetaNode(context.Context, *MsgRemoveMetaNode) (*MsgRemoveMetaNodeResponse, error) HandleMsgUpdateMetaNode(context.Context, *MsgUpdateMetaNode) (*MsgUpdateMetaNodeResponse, error) - HandleMsgUpdateMetaNodeStake(context.Context, *MsgUpdateMetaNodeStake) (*MsgUpdateMetaNodeStakeResponse, error) + HandleMsgUpdateMetaNodeDeposit(context.Context, *MsgUpdateMetaNodeDeposit) (*MsgUpdateMetaNodeDepositResponse, error) HandleMsgMetaNodeRegistrationVote(context.Context, *MsgMetaNodeRegistrationVote) (*MsgMetaNodeRegistrationVoteResponse, error) - HandleMsgWithdrawMetaNodeRegistrationStake(context.Context, *MsgWithdrawMetaNodeRegistrationStake) (*MsgWithdrawMetaNodeRegistrationStakeResponse, error) + HandleMsgWithdrawMetaNodeRegistrationDeposit(context.Context, *MsgWithdrawMetaNodeRegistrationDeposit) (*MsgWithdrawMetaNodeRegistrationDepositResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. @@ -1430,11 +1433,11 @@ func (*UnimplementedMsgServer) HandleMsgRemoveResourceNode(ctx context.Context, func (*UnimplementedMsgServer) HandleMsgUpdateResourceNode(ctx context.Context, req *MsgUpdateResourceNode) (*MsgUpdateResourceNodeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method HandleMsgUpdateResourceNode not implemented") } -func (*UnimplementedMsgServer) HandleMsgUpdateResourceNodeStake(ctx context.Context, req *MsgUpdateResourceNodeStake) (*MsgUpdateResourceNodeStakeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method HandleMsgUpdateResourceNodeStake not implemented") +func (*UnimplementedMsgServer) HandleMsgUpdateResourceNodeDeposit(ctx context.Context, req *MsgUpdateResourceNodeDeposit) (*MsgUpdateResourceNodeDepositResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method HandleMsgUpdateResourceNodeDeposit not implemented") } -func (*UnimplementedMsgServer) HandleMsgUpdateEffectiveStake(ctx context.Context, req *MsgUpdateEffectiveStake) (*MsgUpdateEffectiveStakeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method HandleMsgUpdateEffectiveStake not implemented") +func (*UnimplementedMsgServer) HandleMsgUpdateEffectiveDeposit(ctx context.Context, req *MsgUpdateEffectiveDeposit) (*MsgUpdateEffectiveDepositResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method HandleMsgUpdateEffectiveDeposit not implemented") } func (*UnimplementedMsgServer) HandleMsgCreateMetaNode(ctx context.Context, req *MsgCreateMetaNode) (*MsgCreateMetaNodeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method HandleMsgCreateMetaNode not implemented") @@ -1445,14 +1448,14 @@ func (*UnimplementedMsgServer) HandleMsgRemoveMetaNode(ctx context.Context, req func (*UnimplementedMsgServer) HandleMsgUpdateMetaNode(ctx context.Context, req *MsgUpdateMetaNode) (*MsgUpdateMetaNodeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method HandleMsgUpdateMetaNode not implemented") } -func (*UnimplementedMsgServer) HandleMsgUpdateMetaNodeStake(ctx context.Context, req *MsgUpdateMetaNodeStake) (*MsgUpdateMetaNodeStakeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method HandleMsgUpdateMetaNodeStake not implemented") +func (*UnimplementedMsgServer) HandleMsgUpdateMetaNodeDeposit(ctx context.Context, req *MsgUpdateMetaNodeDeposit) (*MsgUpdateMetaNodeDepositResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method HandleMsgUpdateMetaNodeDeposit not implemented") } func (*UnimplementedMsgServer) HandleMsgMetaNodeRegistrationVote(ctx context.Context, req *MsgMetaNodeRegistrationVote) (*MsgMetaNodeRegistrationVoteResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method HandleMsgMetaNodeRegistrationVote not implemented") } -func (*UnimplementedMsgServer) HandleMsgWithdrawMetaNodeRegistrationStake(ctx context.Context, req *MsgWithdrawMetaNodeRegistrationStake) (*MsgWithdrawMetaNodeRegistrationStakeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method HandleMsgWithdrawMetaNodeRegistrationStake not implemented") +func (*UnimplementedMsgServer) HandleMsgWithdrawMetaNodeRegistrationDeposit(ctx context.Context, req *MsgWithdrawMetaNodeRegistrationDeposit) (*MsgWithdrawMetaNodeRegistrationDepositResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method HandleMsgWithdrawMetaNodeRegistrationDeposit not implemented") } func RegisterMsgServer(s grpc1.Server, srv MsgServer) { @@ -1513,38 +1516,38 @@ func _Msg_HandleMsgUpdateResourceNode_Handler(srv interface{}, ctx context.Conte return interceptor(ctx, in, info, handler) } -func _Msg_HandleMsgUpdateResourceNodeStake_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgUpdateResourceNodeStake) +func _Msg_HandleMsgUpdateResourceNodeDeposit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateResourceNodeDeposit) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MsgServer).HandleMsgUpdateResourceNodeStake(ctx, in) + return srv.(MsgServer).HandleMsgUpdateResourceNodeDeposit(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/stratos.register.v1.Msg/HandleMsgUpdateResourceNodeStake", + FullMethod: "/stratos.register.v1.Msg/HandleMsgUpdateResourceNodeDeposit", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).HandleMsgUpdateResourceNodeStake(ctx, req.(*MsgUpdateResourceNodeStake)) + return srv.(MsgServer).HandleMsgUpdateResourceNodeDeposit(ctx, req.(*MsgUpdateResourceNodeDeposit)) } return interceptor(ctx, in, info, handler) } -func _Msg_HandleMsgUpdateEffectiveStake_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgUpdateEffectiveStake) +func _Msg_HandleMsgUpdateEffectiveDeposit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateEffectiveDeposit) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MsgServer).HandleMsgUpdateEffectiveStake(ctx, in) + return srv.(MsgServer).HandleMsgUpdateEffectiveDeposit(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/stratos.register.v1.Msg/HandleMsgUpdateEffectiveStake", + FullMethod: "/stratos.register.v1.Msg/HandleMsgUpdateEffectiveDeposit", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).HandleMsgUpdateEffectiveStake(ctx, req.(*MsgUpdateEffectiveStake)) + return srv.(MsgServer).HandleMsgUpdateEffectiveDeposit(ctx, req.(*MsgUpdateEffectiveDeposit)) } return interceptor(ctx, in, info, handler) } @@ -1603,20 +1606,20 @@ func _Msg_HandleMsgUpdateMetaNode_Handler(srv interface{}, ctx context.Context, return interceptor(ctx, in, info, handler) } -func _Msg_HandleMsgUpdateMetaNodeStake_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgUpdateMetaNodeStake) +func _Msg_HandleMsgUpdateMetaNodeDeposit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateMetaNodeDeposit) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MsgServer).HandleMsgUpdateMetaNodeStake(ctx, in) + return srv.(MsgServer).HandleMsgUpdateMetaNodeDeposit(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/stratos.register.v1.Msg/HandleMsgUpdateMetaNodeStake", + FullMethod: "/stratos.register.v1.Msg/HandleMsgUpdateMetaNodeDeposit", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).HandleMsgUpdateMetaNodeStake(ctx, req.(*MsgUpdateMetaNodeStake)) + return srv.(MsgServer).HandleMsgUpdateMetaNodeDeposit(ctx, req.(*MsgUpdateMetaNodeDeposit)) } return interceptor(ctx, in, info, handler) } @@ -1639,20 +1642,20 @@ func _Msg_HandleMsgMetaNodeRegistrationVote_Handler(srv interface{}, ctx context return interceptor(ctx, in, info, handler) } -func _Msg_HandleMsgWithdrawMetaNodeRegistrationStake_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgWithdrawMetaNodeRegistrationStake) +func _Msg_HandleMsgWithdrawMetaNodeRegistrationDeposit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgWithdrawMetaNodeRegistrationDeposit) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MsgServer).HandleMsgWithdrawMetaNodeRegistrationStake(ctx, in) + return srv.(MsgServer).HandleMsgWithdrawMetaNodeRegistrationDeposit(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/stratos.register.v1.Msg/HandleMsgWithdrawMetaNodeRegistrationStake", + FullMethod: "/stratos.register.v1.Msg/HandleMsgWithdrawMetaNodeRegistrationDeposit", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).HandleMsgWithdrawMetaNodeRegistrationStake(ctx, req.(*MsgWithdrawMetaNodeRegistrationStake)) + return srv.(MsgServer).HandleMsgWithdrawMetaNodeRegistrationDeposit(ctx, req.(*MsgWithdrawMetaNodeRegistrationDeposit)) } return interceptor(ctx, in, info, handler) } @@ -1674,12 +1677,12 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ Handler: _Msg_HandleMsgUpdateResourceNode_Handler, }, { - MethodName: "HandleMsgUpdateResourceNodeStake", - Handler: _Msg_HandleMsgUpdateResourceNodeStake_Handler, + MethodName: "HandleMsgUpdateResourceNodeDeposit", + Handler: _Msg_HandleMsgUpdateResourceNodeDeposit_Handler, }, { - MethodName: "HandleMsgUpdateEffectiveStake", - Handler: _Msg_HandleMsgUpdateEffectiveStake_Handler, + MethodName: "HandleMsgUpdateEffectiveDeposit", + Handler: _Msg_HandleMsgUpdateEffectiveDeposit_Handler, }, { MethodName: "HandleMsgCreateMetaNode", @@ -1694,16 +1697,16 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ Handler: _Msg_HandleMsgUpdateMetaNode_Handler, }, { - MethodName: "HandleMsgUpdateMetaNodeStake", - Handler: _Msg_HandleMsgUpdateMetaNodeStake_Handler, + MethodName: "HandleMsgUpdateMetaNodeDeposit", + Handler: _Msg_HandleMsgUpdateMetaNodeDeposit_Handler, }, { MethodName: "HandleMsgMetaNodeRegistrationVote", Handler: _Msg_HandleMsgMetaNodeRegistrationVote_Handler, }, { - MethodName: "HandleMsgWithdrawMetaNodeRegistrationStake", - Handler: _Msg_HandleMsgWithdrawMetaNodeRegistrationStake_Handler, + MethodName: "HandleMsgWithdrawMetaNodeRegistrationDeposit", + Handler: _Msg_HandleMsgWithdrawMetaNodeRegistrationDeposit_Handler, }, }, Streams: []grpc.StreamDesc{}, @@ -2164,7 +2167,7 @@ func (m *MsgUpdateMetaNodeResponse) MarshalToSizedBuffer(dAtA []byte) (int, erro return len(dAtA) - i, nil } -func (m *MsgUpdateResourceNodeStake) Marshal() (dAtA []byte, err error) { +func (m *MsgUpdateResourceNodeDeposit) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2174,18 +2177,18 @@ func (m *MsgUpdateResourceNodeStake) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgUpdateResourceNodeStake) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgUpdateResourceNodeDeposit) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgUpdateResourceNodeStake) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgUpdateResourceNodeDeposit) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l { - size, err := m.StakeDelta.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.DepositDelta.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -2193,7 +2196,7 @@ func (m *MsgUpdateResourceNodeStake) MarshalToSizedBuffer(dAtA []byte) (int, err i = encodeVarintTx(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x22 + dAtA[i] = 0x1a if len(m.OwnerAddress) > 0 { i -= len(m.OwnerAddress) copy(dAtA[i:], m.OwnerAddress) @@ -2211,7 +2214,7 @@ func (m *MsgUpdateResourceNodeStake) MarshalToSizedBuffer(dAtA []byte) (int, err return len(dAtA) - i, nil } -func (m *MsgUpdateResourceNodeStakeResponse) Marshal() (dAtA []byte, err error) { +func (m *MsgUpdateResourceNodeDepositResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2221,12 +2224,12 @@ func (m *MsgUpdateResourceNodeStakeResponse) Marshal() (dAtA []byte, err error) return dAtA[:n], nil } -func (m *MsgUpdateResourceNodeStakeResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgUpdateResourceNodeDepositResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgUpdateResourceNodeStakeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgUpdateResourceNodeDepositResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2234,7 +2237,7 @@ func (m *MsgUpdateResourceNodeStakeResponse) MarshalToSizedBuffer(dAtA []byte) ( return len(dAtA) - i, nil } -func (m *MsgUpdateEffectiveStake) Marshal() (dAtA []byte, err error) { +func (m *MsgUpdateEffectiveDeposit) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2244,12 +2247,12 @@ func (m *MsgUpdateEffectiveStake) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgUpdateEffectiveStake) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgUpdateEffectiveDeposit) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgUpdateEffectiveStake) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgUpdateEffectiveDeposit) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2292,7 +2295,7 @@ func (m *MsgUpdateEffectiveStake) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } -func (m *MsgUpdateEffectiveStakeResponse) Marshal() (dAtA []byte, err error) { +func (m *MsgUpdateEffectiveDepositResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2302,12 +2305,12 @@ func (m *MsgUpdateEffectiveStakeResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgUpdateEffectiveStakeResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgUpdateEffectiveDepositResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgUpdateEffectiveStakeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgUpdateEffectiveDepositResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2315,7 +2318,7 @@ func (m *MsgUpdateEffectiveStakeResponse) MarshalToSizedBuffer(dAtA []byte) (int return len(dAtA) - i, nil } -func (m *MsgUpdateMetaNodeStake) Marshal() (dAtA []byte, err error) { +func (m *MsgUpdateMetaNodeDeposit) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2325,18 +2328,18 @@ func (m *MsgUpdateMetaNodeStake) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgUpdateMetaNodeStake) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgUpdateMetaNodeDeposit) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgUpdateMetaNodeStake) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgUpdateMetaNodeDeposit) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l { - size, err := m.StakeDelta.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.DepositDelta.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -2345,9 +2348,9 @@ func (m *MsgUpdateMetaNodeStake) MarshalToSizedBuffer(dAtA []byte) (int, error) } i-- dAtA[i] = 0x22 - if m.IncrStake { + if m.IncrDeposit { i-- - if m.IncrStake { + if m.IncrDeposit { dAtA[i] = 1 } else { dAtA[i] = 0 @@ -2372,7 +2375,7 @@ func (m *MsgUpdateMetaNodeStake) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } -func (m *MsgUpdateMetaNodeStakeResponse) Marshal() (dAtA []byte, err error) { +func (m *MsgUpdateMetaNodeDepositResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2382,12 +2385,12 @@ func (m *MsgUpdateMetaNodeStakeResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgUpdateMetaNodeStakeResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgUpdateMetaNodeDepositResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgUpdateMetaNodeStakeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgUpdateMetaNodeDepositResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2479,7 +2482,7 @@ func (m *MsgMetaNodeRegistrationVoteResponse) MarshalToSizedBuffer(dAtA []byte) return len(dAtA) - i, nil } -func (m *MsgWithdrawMetaNodeRegistrationStake) Marshal() (dAtA []byte, err error) { +func (m *MsgWithdrawMetaNodeRegistrationDeposit) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2489,12 +2492,12 @@ func (m *MsgWithdrawMetaNodeRegistrationStake) Marshal() (dAtA []byte, err error return dAtA[:n], nil } -func (m *MsgWithdrawMetaNodeRegistrationStake) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgWithdrawMetaNodeRegistrationDeposit) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgWithdrawMetaNodeRegistrationStake) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgWithdrawMetaNodeRegistrationDeposit) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2516,7 +2519,7 @@ func (m *MsgWithdrawMetaNodeRegistrationStake) MarshalToSizedBuffer(dAtA []byte) return len(dAtA) - i, nil } -func (m *MsgWithdrawMetaNodeRegistrationStakeResponse) Marshal() (dAtA []byte, err error) { +func (m *MsgWithdrawMetaNodeRegistrationDepositResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2526,12 +2529,12 @@ func (m *MsgWithdrawMetaNodeRegistrationStakeResponse) Marshal() (dAtA []byte, e return dAtA[:n], nil } -func (m *MsgWithdrawMetaNodeRegistrationStakeResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgWithdrawMetaNodeRegistrationDepositResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgWithdrawMetaNodeRegistrationStakeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgWithdrawMetaNodeRegistrationDepositResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2732,7 +2735,7 @@ func (m *MsgUpdateMetaNodeResponse) Size() (n int) { return n } -func (m *MsgUpdateResourceNodeStake) Size() (n int) { +func (m *MsgUpdateResourceNodeDeposit) Size() (n int) { if m == nil { return 0 } @@ -2746,12 +2749,12 @@ func (m *MsgUpdateResourceNodeStake) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = m.StakeDelta.Size() + l = m.DepositDelta.Size() n += 1 + l + sovTx(uint64(l)) return n } -func (m *MsgUpdateResourceNodeStakeResponse) Size() (n int) { +func (m *MsgUpdateResourceNodeDepositResponse) Size() (n int) { if m == nil { return 0 } @@ -2760,7 +2763,7 @@ func (m *MsgUpdateResourceNodeStakeResponse) Size() (n int) { return n } -func (m *MsgUpdateEffectiveStake) Size() (n int) { +func (m *MsgUpdateEffectiveDeposit) Size() (n int) { if m == nil { return 0 } @@ -2787,7 +2790,7 @@ func (m *MsgUpdateEffectiveStake) Size() (n int) { return n } -func (m *MsgUpdateEffectiveStakeResponse) Size() (n int) { +func (m *MsgUpdateEffectiveDepositResponse) Size() (n int) { if m == nil { return 0 } @@ -2796,7 +2799,7 @@ func (m *MsgUpdateEffectiveStakeResponse) Size() (n int) { return n } -func (m *MsgUpdateMetaNodeStake) Size() (n int) { +func (m *MsgUpdateMetaNodeDeposit) Size() (n int) { if m == nil { return 0 } @@ -2810,15 +2813,15 @@ func (m *MsgUpdateMetaNodeStake) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - if m.IncrStake { + if m.IncrDeposit { n += 2 } - l = m.StakeDelta.Size() + l = m.DepositDelta.Size() n += 1 + l + sovTx(uint64(l)) return n } -func (m *MsgUpdateMetaNodeStakeResponse) Size() (n int) { +func (m *MsgUpdateMetaNodeDepositResponse) Size() (n int) { if m == nil { return 0 } @@ -2864,7 +2867,7 @@ func (m *MsgMetaNodeRegistrationVoteResponse) Size() (n int) { return n } -func (m *MsgWithdrawMetaNodeRegistrationStake) Size() (n int) { +func (m *MsgWithdrawMetaNodeRegistrationDeposit) Size() (n int) { if m == nil { return 0 } @@ -2881,7 +2884,7 @@ func (m *MsgWithdrawMetaNodeRegistrationStake) Size() (n int) { return n } -func (m *MsgWithdrawMetaNodeRegistrationStakeResponse) Size() (n int) { +func (m *MsgWithdrawMetaNodeRegistrationDepositResponse) Size() (n int) { if m == nil { return 0 } @@ -4188,7 +4191,7 @@ func (m *MsgUpdateMetaNodeResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgUpdateResourceNodeStake) Unmarshal(dAtA []byte) error { +func (m *MsgUpdateResourceNodeDeposit) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4211,10 +4214,10 @@ func (m *MsgUpdateResourceNodeStake) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgUpdateResourceNodeStake: wiretype end group for non-group") + return fmt.Errorf("proto: MsgUpdateResourceNodeDeposit: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateResourceNodeStake: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgUpdateResourceNodeDeposit: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -4281,9 +4284,9 @@ func (m *MsgUpdateResourceNodeStake) Unmarshal(dAtA []byte) error { } m.OwnerAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StakeDelta", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DepositDelta", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4310,7 +4313,7 @@ func (m *MsgUpdateResourceNodeStake) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.StakeDelta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.DepositDelta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -4335,7 +4338,7 @@ func (m *MsgUpdateResourceNodeStake) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgUpdateResourceNodeStakeResponse) Unmarshal(dAtA []byte) error { +func (m *MsgUpdateResourceNodeDepositResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4358,10 +4361,10 @@ func (m *MsgUpdateResourceNodeStakeResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgUpdateResourceNodeStakeResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgUpdateResourceNodeDepositResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateResourceNodeStakeResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgUpdateResourceNodeDepositResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -4385,7 +4388,7 @@ func (m *MsgUpdateResourceNodeStakeResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgUpdateEffectiveStake) Unmarshal(dAtA []byte) error { +func (m *MsgUpdateEffectiveDeposit) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4408,10 +4411,10 @@ func (m *MsgUpdateEffectiveStake) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgUpdateEffectiveStake: wiretype end group for non-group") + return fmt.Errorf("proto: MsgUpdateEffectiveDeposit: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateEffectiveStake: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgUpdateEffectiveDeposit: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -4565,7 +4568,7 @@ func (m *MsgUpdateEffectiveStake) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgUpdateEffectiveStakeResponse) Unmarshal(dAtA []byte) error { +func (m *MsgUpdateEffectiveDepositResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4588,10 +4591,10 @@ func (m *MsgUpdateEffectiveStakeResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgUpdateEffectiveStakeResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgUpdateEffectiveDepositResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateEffectiveStakeResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgUpdateEffectiveDepositResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -4615,7 +4618,7 @@ func (m *MsgUpdateEffectiveStakeResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgUpdateMetaNodeStake) Unmarshal(dAtA []byte) error { +func (m *MsgUpdateMetaNodeDeposit) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4638,10 +4641,10 @@ func (m *MsgUpdateMetaNodeStake) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgUpdateMetaNodeStake: wiretype end group for non-group") + return fmt.Errorf("proto: MsgUpdateMetaNodeDeposit: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateMetaNodeStake: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgUpdateMetaNodeDeposit: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -4710,7 +4713,7 @@ func (m *MsgUpdateMetaNodeStake) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 3: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IncrStake", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field IncrDeposit", wireType) } var v int for shift := uint(0); ; shift += 7 { @@ -4727,10 +4730,10 @@ func (m *MsgUpdateMetaNodeStake) Unmarshal(dAtA []byte) error { break } } - m.IncrStake = bool(v != 0) + m.IncrDeposit = bool(v != 0) case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StakeDelta", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DepositDelta", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4757,7 +4760,7 @@ func (m *MsgUpdateMetaNodeStake) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.StakeDelta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.DepositDelta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -4782,7 +4785,7 @@ func (m *MsgUpdateMetaNodeStake) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgUpdateMetaNodeStakeResponse) Unmarshal(dAtA []byte) error { +func (m *MsgUpdateMetaNodeDepositResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4805,10 +4808,10 @@ func (m *MsgUpdateMetaNodeStakeResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgUpdateMetaNodeStakeResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgUpdateMetaNodeDepositResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateMetaNodeStakeResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgUpdateMetaNodeDepositResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -5080,7 +5083,7 @@ func (m *MsgMetaNodeRegistrationVoteResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgWithdrawMetaNodeRegistrationStake) Unmarshal(dAtA []byte) error { +func (m *MsgWithdrawMetaNodeRegistrationDeposit) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5103,10 +5106,10 @@ func (m *MsgWithdrawMetaNodeRegistrationStake) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgWithdrawMetaNodeRegistrationStake: wiretype end group for non-group") + return fmt.Errorf("proto: MsgWithdrawMetaNodeRegistrationDeposit: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgWithdrawMetaNodeRegistrationStake: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgWithdrawMetaNodeRegistrationDeposit: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -5194,7 +5197,7 @@ func (m *MsgWithdrawMetaNodeRegistrationStake) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgWithdrawMetaNodeRegistrationStakeResponse) Unmarshal(dAtA []byte) error { +func (m *MsgWithdrawMetaNodeRegistrationDepositResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5217,10 +5220,10 @@ func (m *MsgWithdrawMetaNodeRegistrationStakeResponse) Unmarshal(dAtA []byte) er fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgWithdrawMetaNodeRegistrationStakeResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgWithdrawMetaNodeRegistrationDepositResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgWithdrawMetaNodeRegistrationStakeResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgWithdrawMetaNodeRegistrationDepositResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: diff --git a/x/register/types/tx.pb.gw.go b/x/register/types/tx.pb.gw.go index 856dc803..b4149c07 100644 --- a/x/register/types/tx.pb.gw.go +++ b/x/register/types/tx.pb.gw.go @@ -140,73 +140,73 @@ func local_request_Msg_HandleMsgUpdateResourceNode_0(ctx context.Context, marsha } var ( - filter_Msg_HandleMsgUpdateResourceNodeStake_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} + filter_Msg_HandleMsgUpdateResourceNodeDeposit_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) -func request_Msg_HandleMsgUpdateResourceNodeStake_0(ctx context.Context, marshaler runtime.Marshaler, client MsgClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq MsgUpdateResourceNodeStake +func request_Msg_HandleMsgUpdateResourceNodeDeposit_0(ctx context.Context, marshaler runtime.Marshaler, client MsgClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq MsgUpdateResourceNodeDeposit var metadata runtime.ServerMetadata if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_HandleMsgUpdateResourceNodeStake_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_HandleMsgUpdateResourceNodeDeposit_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.HandleMsgUpdateResourceNodeStake(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.HandleMsgUpdateResourceNodeDeposit(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_Msg_HandleMsgUpdateResourceNodeStake_0(ctx context.Context, marshaler runtime.Marshaler, server MsgServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq MsgUpdateResourceNodeStake +func local_request_Msg_HandleMsgUpdateResourceNodeDeposit_0(ctx context.Context, marshaler runtime.Marshaler, server MsgServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq MsgUpdateResourceNodeDeposit var metadata runtime.ServerMetadata if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_HandleMsgUpdateResourceNodeStake_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_HandleMsgUpdateResourceNodeDeposit_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.HandleMsgUpdateResourceNodeStake(ctx, &protoReq) + msg, err := server.HandleMsgUpdateResourceNodeDeposit(ctx, &protoReq) return msg, metadata, err } var ( - filter_Msg_HandleMsgUpdateEffectiveStake_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} + filter_Msg_HandleMsgUpdateEffectiveDeposit_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) -func request_Msg_HandleMsgUpdateEffectiveStake_0(ctx context.Context, marshaler runtime.Marshaler, client MsgClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq MsgUpdateEffectiveStake +func request_Msg_HandleMsgUpdateEffectiveDeposit_0(ctx context.Context, marshaler runtime.Marshaler, client MsgClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq MsgUpdateEffectiveDeposit var metadata runtime.ServerMetadata if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_HandleMsgUpdateEffectiveStake_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_HandleMsgUpdateEffectiveDeposit_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.HandleMsgUpdateEffectiveStake(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.HandleMsgUpdateEffectiveDeposit(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_Msg_HandleMsgUpdateEffectiveStake_0(ctx context.Context, marshaler runtime.Marshaler, server MsgServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq MsgUpdateEffectiveStake +func local_request_Msg_HandleMsgUpdateEffectiveDeposit_0(ctx context.Context, marshaler runtime.Marshaler, server MsgServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq MsgUpdateEffectiveDeposit var metadata runtime.ServerMetadata if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_HandleMsgUpdateEffectiveStake_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_HandleMsgUpdateEffectiveDeposit_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.HandleMsgUpdateEffectiveStake(ctx, &protoReq) + msg, err := server.HandleMsgUpdateEffectiveDeposit(ctx, &protoReq) return msg, metadata, err } @@ -320,37 +320,37 @@ func local_request_Msg_HandleMsgUpdateMetaNode_0(ctx context.Context, marshaler } var ( - filter_Msg_HandleMsgUpdateMetaNodeStake_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} + filter_Msg_HandleMsgUpdateMetaNodeDeposit_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) -func request_Msg_HandleMsgUpdateMetaNodeStake_0(ctx context.Context, marshaler runtime.Marshaler, client MsgClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq MsgUpdateMetaNodeStake +func request_Msg_HandleMsgUpdateMetaNodeDeposit_0(ctx context.Context, marshaler runtime.Marshaler, client MsgClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq MsgUpdateMetaNodeDeposit var metadata runtime.ServerMetadata if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_HandleMsgUpdateMetaNodeStake_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_HandleMsgUpdateMetaNodeDeposit_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.HandleMsgUpdateMetaNodeStake(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.HandleMsgUpdateMetaNodeDeposit(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_Msg_HandleMsgUpdateMetaNodeStake_0(ctx context.Context, marshaler runtime.Marshaler, server MsgServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq MsgUpdateMetaNodeStake +func local_request_Msg_HandleMsgUpdateMetaNodeDeposit_0(ctx context.Context, marshaler runtime.Marshaler, server MsgServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq MsgUpdateMetaNodeDeposit var metadata runtime.ServerMetadata if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_HandleMsgUpdateMetaNodeStake_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_HandleMsgUpdateMetaNodeDeposit_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.HandleMsgUpdateMetaNodeStake(ctx, &protoReq) + msg, err := server.HandleMsgUpdateMetaNodeDeposit(ctx, &protoReq) return msg, metadata, err } @@ -392,37 +392,37 @@ func local_request_Msg_HandleMsgMetaNodeRegistrationVote_0(ctx context.Context, } var ( - filter_Msg_HandleMsgWithdrawMetaNodeRegistrationStake_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} + filter_Msg_HandleMsgWithdrawMetaNodeRegistrationDeposit_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) -func request_Msg_HandleMsgWithdrawMetaNodeRegistrationStake_0(ctx context.Context, marshaler runtime.Marshaler, client MsgClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq MsgWithdrawMetaNodeRegistrationStake +func request_Msg_HandleMsgWithdrawMetaNodeRegistrationDeposit_0(ctx context.Context, marshaler runtime.Marshaler, client MsgClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq MsgWithdrawMetaNodeRegistrationDeposit var metadata runtime.ServerMetadata if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_HandleMsgWithdrawMetaNodeRegistrationStake_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_HandleMsgWithdrawMetaNodeRegistrationDeposit_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.HandleMsgWithdrawMetaNodeRegistrationStake(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.HandleMsgWithdrawMetaNodeRegistrationDeposit(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_Msg_HandleMsgWithdrawMetaNodeRegistrationStake_0(ctx context.Context, marshaler runtime.Marshaler, server MsgServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq MsgWithdrawMetaNodeRegistrationStake +func local_request_Msg_HandleMsgWithdrawMetaNodeRegistrationDeposit_0(ctx context.Context, marshaler runtime.Marshaler, server MsgServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq MsgWithdrawMetaNodeRegistrationDeposit var metadata runtime.ServerMetadata if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_HandleMsgWithdrawMetaNodeRegistrationStake_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_HandleMsgWithdrawMetaNodeRegistrationDeposit_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.HandleMsgWithdrawMetaNodeRegistrationStake(ctx, &protoReq) + msg, err := server.HandleMsgWithdrawMetaNodeRegistrationDeposit(ctx, &protoReq) return msg, metadata, err } @@ -493,7 +493,7 @@ func RegisterMsgHandlerServer(ctx context.Context, mux *runtime.ServeMux, server }) - mux.Handle("POST", pattern_Msg_HandleMsgUpdateResourceNodeStake_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_Msg_HandleMsgUpdateResourceNodeDeposit_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -502,18 +502,18 @@ func RegisterMsgHandlerServer(ctx context.Context, mux *runtime.ServeMux, server runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Msg_HandleMsgUpdateResourceNodeStake_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Msg_HandleMsgUpdateResourceNodeDeposit_0(rctx, inboundMarshaler, server, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Msg_HandleMsgUpdateResourceNodeStake_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Msg_HandleMsgUpdateResourceNodeDeposit_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_Msg_HandleMsgUpdateEffectiveStake_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_Msg_HandleMsgUpdateEffectiveDeposit_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -522,14 +522,14 @@ func RegisterMsgHandlerServer(ctx context.Context, mux *runtime.ServeMux, server runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Msg_HandleMsgUpdateEffectiveStake_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Msg_HandleMsgUpdateEffectiveDeposit_0(rctx, inboundMarshaler, server, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Msg_HandleMsgUpdateEffectiveStake_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Msg_HandleMsgUpdateEffectiveDeposit_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -593,7 +593,7 @@ func RegisterMsgHandlerServer(ctx context.Context, mux *runtime.ServeMux, server }) - mux.Handle("POST", pattern_Msg_HandleMsgUpdateMetaNodeStake_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_Msg_HandleMsgUpdateMetaNodeDeposit_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -602,14 +602,14 @@ func RegisterMsgHandlerServer(ctx context.Context, mux *runtime.ServeMux, server runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Msg_HandleMsgUpdateMetaNodeStake_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Msg_HandleMsgUpdateMetaNodeDeposit_0(rctx, inboundMarshaler, server, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Msg_HandleMsgUpdateMetaNodeStake_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Msg_HandleMsgUpdateMetaNodeDeposit_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -633,7 +633,7 @@ func RegisterMsgHandlerServer(ctx context.Context, mux *runtime.ServeMux, server }) - mux.Handle("POST", pattern_Msg_HandleMsgWithdrawMetaNodeRegistrationStake_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_Msg_HandleMsgWithdrawMetaNodeRegistrationDeposit_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -642,14 +642,14 @@ func RegisterMsgHandlerServer(ctx context.Context, mux *runtime.ServeMux, server runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Msg_HandleMsgWithdrawMetaNodeRegistrationStake_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Msg_HandleMsgWithdrawMetaNodeRegistrationDeposit_0(rctx, inboundMarshaler, server, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Msg_HandleMsgWithdrawMetaNodeRegistrationStake_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Msg_HandleMsgWithdrawMetaNodeRegistrationDeposit_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -754,7 +754,7 @@ func RegisterMsgHandlerClient(ctx context.Context, mux *runtime.ServeMux, client }) - mux.Handle("POST", pattern_Msg_HandleMsgUpdateResourceNodeStake_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_Msg_HandleMsgUpdateResourceNodeDeposit_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -763,18 +763,18 @@ func RegisterMsgHandlerClient(ctx context.Context, mux *runtime.ServeMux, client runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Msg_HandleMsgUpdateResourceNodeStake_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Msg_HandleMsgUpdateResourceNodeDeposit_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Msg_HandleMsgUpdateResourceNodeStake_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Msg_HandleMsgUpdateResourceNodeDeposit_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_Msg_HandleMsgUpdateEffectiveStake_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_Msg_HandleMsgUpdateEffectiveDeposit_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -783,14 +783,14 @@ func RegisterMsgHandlerClient(ctx context.Context, mux *runtime.ServeMux, client runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Msg_HandleMsgUpdateEffectiveStake_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Msg_HandleMsgUpdateEffectiveDeposit_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Msg_HandleMsgUpdateEffectiveStake_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Msg_HandleMsgUpdateEffectiveDeposit_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -854,7 +854,7 @@ func RegisterMsgHandlerClient(ctx context.Context, mux *runtime.ServeMux, client }) - mux.Handle("POST", pattern_Msg_HandleMsgUpdateMetaNodeStake_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_Msg_HandleMsgUpdateMetaNodeDeposit_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -863,14 +863,14 @@ func RegisterMsgHandlerClient(ctx context.Context, mux *runtime.ServeMux, client runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Msg_HandleMsgUpdateMetaNodeStake_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Msg_HandleMsgUpdateMetaNodeDeposit_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Msg_HandleMsgUpdateMetaNodeStake_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Msg_HandleMsgUpdateMetaNodeDeposit_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -894,7 +894,7 @@ func RegisterMsgHandlerClient(ctx context.Context, mux *runtime.ServeMux, client }) - mux.Handle("POST", pattern_Msg_HandleMsgWithdrawMetaNodeRegistrationStake_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_Msg_HandleMsgWithdrawMetaNodeRegistrationDeposit_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -903,14 +903,14 @@ func RegisterMsgHandlerClient(ctx context.Context, mux *runtime.ServeMux, client runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Msg_HandleMsgWithdrawMetaNodeRegistrationStake_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Msg_HandleMsgWithdrawMetaNodeRegistrationDeposit_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Msg_HandleMsgWithdrawMetaNodeRegistrationStake_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Msg_HandleMsgWithdrawMetaNodeRegistrationDeposit_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -924,9 +924,9 @@ var ( pattern_Msg_HandleMsgUpdateResourceNode_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"stratos", "register", "v1", "update_resource_node"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Msg_HandleMsgUpdateResourceNodeStake_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"stratos", "register", "v1", "update_resource_node_stake"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Msg_HandleMsgUpdateResourceNodeDeposit_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"stratos", "register", "v1", "update_resource_node_deposit"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Msg_HandleMsgUpdateEffectiveStake_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"stratos", "register", "v1", "update_effective_stake"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Msg_HandleMsgUpdateEffectiveDeposit_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"stratos", "register", "v1", "update_effective_deposit"}, "", runtime.AssumeColonVerbOpt(true))) pattern_Msg_HandleMsgCreateMetaNode_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"stratos", "register", "v1", "create_meta_node"}, "", runtime.AssumeColonVerbOpt(true))) @@ -934,11 +934,11 @@ var ( pattern_Msg_HandleMsgUpdateMetaNode_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"stratos", "register", "v1", "update_meta_node"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Msg_HandleMsgUpdateMetaNodeStake_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"stratos", "register", "v1", "update_meta_node_stake"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Msg_HandleMsgUpdateMetaNodeDeposit_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"stratos", "register", "v1", "update_meta_node_deposit"}, "", runtime.AssumeColonVerbOpt(true))) pattern_Msg_HandleMsgMetaNodeRegistrationVote_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"stratos", "register", "v1", "meta_node_registration_vote"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Msg_HandleMsgWithdrawMetaNodeRegistrationStake_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"stratos", "register", "v1", "withdraw_meta_node_registration_stake"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Msg_HandleMsgWithdrawMetaNodeRegistrationDeposit_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"stratos", "register", "v1", "withdraw_meta_node_registration_deposit"}, "", runtime.AssumeColonVerbOpt(true))) ) var ( @@ -948,9 +948,9 @@ var ( forward_Msg_HandleMsgUpdateResourceNode_0 = runtime.ForwardResponseMessage - forward_Msg_HandleMsgUpdateResourceNodeStake_0 = runtime.ForwardResponseMessage + forward_Msg_HandleMsgUpdateResourceNodeDeposit_0 = runtime.ForwardResponseMessage - forward_Msg_HandleMsgUpdateEffectiveStake_0 = runtime.ForwardResponseMessage + forward_Msg_HandleMsgUpdateEffectiveDeposit_0 = runtime.ForwardResponseMessage forward_Msg_HandleMsgCreateMetaNode_0 = runtime.ForwardResponseMessage @@ -958,9 +958,9 @@ var ( forward_Msg_HandleMsgUpdateMetaNode_0 = runtime.ForwardResponseMessage - forward_Msg_HandleMsgUpdateMetaNodeStake_0 = runtime.ForwardResponseMessage + forward_Msg_HandleMsgUpdateMetaNodeDeposit_0 = runtime.ForwardResponseMessage forward_Msg_HandleMsgMetaNodeRegistrationVote_0 = runtime.ForwardResponseMessage - forward_Msg_HandleMsgWithdrawMetaNodeRegistrationStake_0 = runtime.ForwardResponseMessage + forward_Msg_HandleMsgWithdrawMetaNodeRegistrationDeposit_0 = runtime.ForwardResponseMessage ) diff --git a/x/sds/app_test.go b/x/sds/app_test.go index 6b64ddb7..e60343c9 100644 --- a/x/sds/app_test.go +++ b/x/sds/app_test.go @@ -82,7 +82,7 @@ package sds // ctx := mApp.BaseApp.NewContext(true, header) // // initialStakeTotal := sdk.NewInt(43000000000000) -// registerKeeper.SetInitialGenesisStakeTotal(ctx, initialStakeTotal) +// registerKeeper.SetInitialGenesisDepositTotal(ctx, initialStakeTotal) // // // setup resource nodes // time, _ := time.Parse(time.RubyDate, "Fri Sep 24 10:37:13 -0400 2021") @@ -105,7 +105,7 @@ package sds // tmpResourceNode.Tokens = val // tmpResourceNode.Status = sdk.Bonded // tmpResourceNode.OwnerAddress = accs[i%5].GetAddress() -// ozoneLimitChange, _ := registerKeeper.AddResourceNodeStake(ctx, tmpResourceNode, sdk.NewCoin("wei", val)) +// ozoneLimitChange, _ := registerKeeper.AddResourceNodeDeposit(ctx, tmpResourceNode, sdk.NewCoin("wei", val)) // log.Printf("Add resourceNode #%v(stake=%v), ozone limit increases by %v, remaining ozone limit is %v", i, resourceNodeStake, ozoneLimitChange, registerKeeper.GetRemainingOzoneLimit(ctx)) // // doPrepay // randomPurchase := sdk.NewInt(int64(rand.Float64() * 100 * 1000000000)) @@ -125,7 +125,7 @@ package sds // ctx := mApp.BaseApp.NewContext(true, header) // // initialStakeTotal := sdk.NewInt(43000000000000) -// registerKeeper.SetInitialGenesisStakeTotal(ctx, initialStakeTotal) +// registerKeeper.SetInitialGenesisDepositTotal(ctx, initialStakeTotal) // // // setup resource nodes // time, _ := time.Parse(time.RubyDate, "Fri Sep 24 10:37:13 -0400 2021") @@ -148,7 +148,7 @@ package sds // tmpResourceNode.Tokens = val // tmpResourceNode.Status = sdk.Bonded // tmpResourceNode.OwnerAddress = accs[i%5].GetAddress() -// ozoneLimitChange, _ := registerKeeper.AddResourceNodeStake(ctx, tmpResourceNode, sdk.NewCoin("wei", val)) +// ozoneLimitChange, _ := registerKeeper.AddResourceNodeDeposit(ctx, tmpResourceNode, sdk.NewCoin("wei", val)) // log.Printf("Add resourceNode #%v(stake=%v), ozone limit increases by %v, remaining ozone limit is %v", i, resourceNodeStake, ozoneLimitChange, registerKeeper.GetRemainingOzoneLimit(ctx)) // // doPrepay // purchased, _ := k.Prepay(ctx, accs[i%5].GetAddress(), sdk.NewCoins(sdk.NewCoin("wei", sdk.NewInt(10000000000)))) @@ -166,7 +166,7 @@ package sds // ctx := mApp.BaseApp.NewContext(true, header) // // initialStakeTotal := sdk.NewInt(43000000000000) -// registerKeeper.SetInitialGenesisStakeTotal(ctx, initialStakeTotal) +// registerKeeper.SetInitialGenesisDepositTotal(ctx, initialStakeTotal) // // // setup resource nodes // time, _ := time.Parse(time.RubyDate, "Fri Sep 24 10:37:13 -0400 2021") @@ -190,7 +190,7 @@ package sds // tmpResourceNode.Tokens = val // tmpResourceNode.Status = sdk.Bonded // tmpResourceNode.OwnerAddress = accs[i%5].GetAddress() -// ozoneLimitChange, _ := registerKeeper.AddResourceNodeStake(ctx, tmpResourceNode, sdk.NewCoin("wei", val)) +// ozoneLimitChange, _ := registerKeeper.AddResourceNodeDeposit(ctx, tmpResourceNode, sdk.NewCoin("wei", val)) // log.Printf("Add resourceNode #%v(stake=%v), ozone limit increases by %v, remaining ozone limit is %v", i, resourceNodeStake, ozoneLimitChange, registerKeeper.GetRemainingOzoneLimit(ctx)) // // doPrepay // purchased, _ := k.Prepay(ctx, accs[i%5].GetAddress(), sdk.NewCoins(sdk.NewCoin("wei", sdk.NewInt(10000000000)))) @@ -232,11 +232,11 @@ package sds // initLt := sdk.NewInt(43000) // initPt := sdk.NewCoin(keeper.BondDenom(ctx), sdk.ZeroInt()) // -// keeper.registerKeeper.SetInitialGenesisStakeTotal(ctx, initS) +// keeper.registerKeeper.SetInitialGenesisDepositTotal(ctx, initS) // keeper.registerKeeper.SetTotalUnissuedPrepay(ctx, initPt) // keeper.registerKeeper.SetRemainingOzoneLimit(ctx, initLt) // -// log.Printf("==== init stake total is %v", keeper.registerKeeper.GetInitialGenesisStakeTotal(ctx)) +// log.Printf("==== init stake total is %v", keeper.registerKeeper.GetInitialGenesisDepositTotal(ctx)) // log.Printf("==== init prepay is %v", keeper.registerKeeper.GetTotalUnissuedPrepay(ctx)) // log.Printf("==== ozone limit is %v\n\n", keeper.registerKeeper.GetRemainingOzoneLimit(ctx)) // @@ -247,7 +247,7 @@ package sds // } // // for i, val := range prepaySeq { -// S := keeper.registerKeeper.GetInitialGenesisStakeTotal(ctx) +// S := keeper.registerKeeper.GetInitialGenesisDepositTotal(ctx) // Pt := keeper.registerKeeper.GetTotalUnissuedPrepay(ctx).Amount // Lt := keeper.registerKeeper.GetRemainingOzoneLimit(ctx) // diff --git a/x/sds/keeper/keeper.go b/x/sds/keeper/keeper.go index 0e70f093..53ae09f0 100644 --- a/x/sds/keeper/keeper.go +++ b/x/sds/keeper/keeper.go @@ -88,7 +88,7 @@ func (k Keeper) FileUpload(ctx sdk.Context, fileHash string, reporter stratos.Sd // [X] is the total amount of STOS token prepaid by user at time t // the total amount of Ozone the user gets = Lt * X / (S + Pt + X) func (k Keeper) purchaseNozAndSubCoins(ctx sdk.Context, from sdk.AccAddress, amount sdk.Int) (sdk.Int, error) { - St := k.registerKeeper.GetEffectiveTotalStake(ctx) + St := k.registerKeeper.GetEffectiveTotalDeposit(ctx) Pt := k.registerKeeper.GetTotalUnissuedPrepay(ctx).Amount Lt := k.registerKeeper.GetRemainingOzoneLimit(ctx) @@ -119,7 +119,7 @@ func (k Keeper) purchaseNozAndSubCoins(ctx sdk.Context, from sdk.AccAddress, amo func (k Keeper) simulatePurchaseNoz(ctx sdk.Context, coins sdk.Coins) sdk.Int { amount := coins.AmountOf(k.BondDenom(ctx)) - St := k.registerKeeper.GetEffectiveTotalStake(ctx) + St := k.registerKeeper.GetEffectiveTotalDeposit(ctx) Pt := k.registerKeeper.GetTotalUnissuedPrepay(ctx).Amount Lt := k.registerKeeper.GetRemainingOzoneLimit(ctx) purchased := Lt.ToDec(). diff --git a/x/sds/oz_price_test.go b/x/sds/oz_price_test.go index 739fdb26..ce1592ff 100644 --- a/x/sds/oz_price_test.go +++ b/x/sds/oz_price_test.go @@ -39,15 +39,15 @@ Test scenarios: */ const ( - chainID = "testchain_1-1" - stos2wei = stratos.StosToWei - StosToWeiSuffix = "000000000000000000" // 1 Stos = 1e18 wei - rewardDenom = stratos.Utros - stakeNozRateStr = "100000" + chainID = "testchain_1-1" + stos2wei = stratos.StosToWei + StosToWeiSuffix = "000000000000000000" // 1 Stos = 1e18 wei + rewardDenom = stratos.Utros + depositNozRateStr = "100000" ) var ( - stakeNozRateInt, _ = sdk.NewIntFromString(stakeNozRateStr) + depositNozRateInt, _ = sdk.NewIntFromString(depositNozRateStr) paramSpecificMinedReward = sdk.NewCoins(stratos.NewCoinInt64(160000000000)) paramSpecificEpoch = sdk.NewInt(10) @@ -85,55 +85,55 @@ var ( idxOwner2 = sdk.AccAddress(idxOwnerPrivKey2.PubKey().Address()) idxOwner3 = sdk.AccAddress(idxOwnerPrivKey3.PubKey().Address()) - resNodeInitialStakeForMultipleNodes, _ = sdk.NewIntFromString("3" + StosToWeiSuffix) - //resNodeInitialStakeForMultipleNodes = sdk.NewInt(3 * stos2wei) - - resNodePubKey1 = ed25519.GenPrivKey().PubKey() - resNodeAddr1 = sdk.AccAddress(resNodePubKey1.Address()) - resNodeNetworkId1 = stratos.SdsAddress(resNodePubKey1.Address()) - resNodeInitialStake1, _ = sdk.NewIntFromString("3" + StosToWeiSuffix) - //resNodeInitialStake1 = sdk.NewInt(3 * stos2wei) - - resNodePubKey2 = ed25519.GenPrivKey().PubKey() - resNodeAddr2 = sdk.AccAddress(resNodePubKey2.Address()) - resNodeNetworkId2 = stratos.SdsAddress(resNodePubKey2.Address()) - resNodeInitialStake2, _ = sdk.NewIntFromString("3" + StosToWeiSuffix) - //resNodeInitialStake2 = sdk.NewInt(3 * stos2wei) - - resNodePubKey3 = ed25519.GenPrivKey().PubKey() - resNodeAddr3 = sdk.AccAddress(resNodePubKey3.Address()) - resNodeNetworkId3 = stratos.SdsAddress(resNodePubKey3.Address()) - resNodeInitialStake3, _ = sdk.NewIntFromString("3" + StosToWeiSuffix) - //resNodeInitialStake3 = sdk.NewInt(3 * stos2wei) - - resNodePubKey4 = ed25519.GenPrivKey().PubKey() - resNodeAddr4 = sdk.AccAddress(resNodePubKey4.Address()) - resNodeNetworkId4 = stratos.SdsAddress(resNodePubKey4.Address()) - resNodeInitialStake4 = sdk.NewInt(3 * stos2wei) - - resNodePubKey5 = ed25519.GenPrivKey().PubKey() - resNodeAddr5 = sdk.AccAddress(resNodePubKey5.Address()) - resNodeNetworkId5 = stratos.SdsAddress(resNodePubKey5.Address()) - resNodeInitialStake5 = sdk.NewInt(3 * stos2wei) - - idxNodePrivKey1 = ed25519.GenPrivKey() - idxNodePubKey1 = idxNodePrivKey1.PubKey() - idxNodeAddr1 = sdk.AccAddress(idxNodePubKey1.Address()) - idxNodeNetworkId1 = stratos.SdsAddress(idxNodePubKey1.Address()) - idxNodeInitialStake1, _ = sdk.NewIntFromString("5" + StosToWeiSuffix) - //idxNodeInitialStake1 = sdk.NewInt(5 * stos2wei) - - idxNodePubKey2 = ed25519.GenPrivKey().PubKey() - idxNodeAddr2 = sdk.AccAddress(idxNodePubKey2.Address()) - idxNodeNetworkId2 = stratos.SdsAddress(idxNodePubKey2.Address()) - idxNodeInitialStake2, _ = sdk.NewIntFromString("5" + StosToWeiSuffix) - //idxNodeInitialStake2 = sdk.NewInt(5 * stos2wei) - - idxNodePubKey3 = ed25519.GenPrivKey().PubKey() - idxNodeAddr3 = sdk.AccAddress(idxNodePubKey3.Address()) - idxNodeNetworkId3 = stratos.SdsAddress(idxNodePubKey3.Address()) - idxNodeInitialStake3, _ = sdk.NewIntFromString("5" + StosToWeiSuffix) - //idxNodeInitialStake3 = sdk.NewInt(5 * stos2wei) + resNodeInitialDepositForMultipleNodes, _ = sdk.NewIntFromString("3" + StosToWeiSuffix) + //resNodeInitialDepositForMultipleNodes = sdk.NewInt(3 * stos2wei) + + resNodePubKey1 = ed25519.GenPrivKey().PubKey() + resNodeAddr1 = sdk.AccAddress(resNodePubKey1.Address()) + resNodeNetworkId1 = stratos.SdsAddress(resNodePubKey1.Address()) + resNodeInitialDeposit1, _ = sdk.NewIntFromString("3" + StosToWeiSuffix) + //resNodeInitialDeposit1 = sdk.NewInt(3 * stos2wei) + + resNodePubKey2 = ed25519.GenPrivKey().PubKey() + resNodeAddr2 = sdk.AccAddress(resNodePubKey2.Address()) + resNodeNetworkId2 = stratos.SdsAddress(resNodePubKey2.Address()) + resNodeInitialDeposit2, _ = sdk.NewIntFromString("3" + StosToWeiSuffix) + //resNodeInitialDeposit2 = sdk.NewInt(3 * stos2wei) + + resNodePubKey3 = ed25519.GenPrivKey().PubKey() + resNodeAddr3 = sdk.AccAddress(resNodePubKey3.Address()) + resNodeNetworkId3 = stratos.SdsAddress(resNodePubKey3.Address()) + resNodeInitialDeposit3, _ = sdk.NewIntFromString("3" + StosToWeiSuffix) + //resNodeInitialDeposit3 = sdk.NewInt(3 * stos2wei) + + resNodePubKey4 = ed25519.GenPrivKey().PubKey() + resNodeAddr4 = sdk.AccAddress(resNodePubKey4.Address()) + resNodeNetworkId4 = stratos.SdsAddress(resNodePubKey4.Address()) + resNodeInitialDeposit4 = sdk.NewInt(3 * stos2wei) + + resNodePubKey5 = ed25519.GenPrivKey().PubKey() + resNodeAddr5 = sdk.AccAddress(resNodePubKey5.Address()) + resNodeNetworkId5 = stratos.SdsAddress(resNodePubKey5.Address()) + resNodeInitialDeposit5 = sdk.NewInt(3 * stos2wei) + + idxNodePrivKey1 = ed25519.GenPrivKey() + idxNodePubKey1 = idxNodePrivKey1.PubKey() + idxNodeAddr1 = sdk.AccAddress(idxNodePubKey1.Address()) + idxNodeNetworkId1 = stratos.SdsAddress(idxNodePubKey1.Address()) + idxNodeInitialDeposit1, _ = sdk.NewIntFromString("5" + StosToWeiSuffix) + //idxNodeInitialDeposit1 = sdk.NewInt(5 * stos2wei) + + idxNodePubKey2 = ed25519.GenPrivKey().PubKey() + idxNodeAddr2 = sdk.AccAddress(idxNodePubKey2.Address()) + idxNodeNetworkId2 = stratos.SdsAddress(idxNodePubKey2.Address()) + idxNodeInitialDeposit2, _ = sdk.NewIntFromString("5" + StosToWeiSuffix) + //idxNodeInitialDeposit2 = sdk.NewInt(5 * stos2wei) + + idxNodePubKey3 = ed25519.GenPrivKey().PubKey() + idxNodeAddr3 = sdk.AccAddress(idxNodePubKey3.Address()) + idxNodeNetworkId3 = stratos.SdsAddress(idxNodePubKey3.Address()) + idxNodeInitialDeposit3, _ = sdk.NewIntFromString("5" + StosToWeiSuffix) + //idxNodeInitialDeposit3 = sdk.NewInt(5 * stos2wei) valOpPrivKey1 = secp256k1.GenPrivKey() valOpPubKey1 = valOpPrivKey1.PubKey() @@ -146,13 +146,13 @@ var ( ) type NozPriceFactors struct { - NOzonePrice sdk.Dec - InitialTotalStakes sdk.Int - EffectiveTotalStakes sdk.Int - TotalUnissuedPrepay sdk.Int - StakeAndPrepay sdk.Int - OzoneLimit sdk.Int - NozSupply sdk.Int + NOzonePrice sdk.Dec + InitialTotalDeposit sdk.Int + EffectiveTotalDeposit sdk.Int + TotalUnissuedPrepay sdk.Int + DepositAndPrepay sdk.Int + OzoneLimit sdk.Int + NozSupply sdk.Int } func TestPriceCurve(t *testing.T) { @@ -160,40 +160,40 @@ func TestPriceCurve(t *testing.T) { NUM_TESTS := 100 initFactorsBefore := &NozPriceFactors{ - NOzonePrice: nozPrice, - InitialTotalStakes: initialTotalStakesStore, - EffectiveTotalStakes: initialTotalStakesStore, - TotalUnissuedPrepay: totalUnissuedPrepayStore, - StakeAndPrepay: initialTotalStakesStore.Add(totalUnissuedPrepayStore), - OzoneLimit: initialTotalStakesStore.ToDec().Quo(nozPrice).TruncateInt(), - NozSupply: initialTotalStakesStore.ToDec().Quo(stakeNozRateInt.ToDec()).TruncateInt(), + NOzonePrice: nozPrice, + InitialTotalDeposit: initialTotalDepositStore, + EffectiveTotalDeposit: initialTotalDepositStore, + TotalUnissuedPrepay: totalUnissuedPrepayStore, + DepositAndPrepay: initialTotalDepositStore.Add(totalUnissuedPrepayStore), + OzoneLimit: initialTotalDepositStore.ToDec().Quo(nozPrice).TruncateInt(), + NozSupply: initialTotalDepositStore.ToDec().Quo(depositNozRateInt.ToDec()).TruncateInt(), } initFactorsBefore, _, _ = simulatePriceChange(t, &PriceChangeEvent{ - stakeDelta: sdk.ZeroInt(), + depositDelta: sdk.ZeroInt(), unissuedPrepayDelta: sdk.ZeroInt(), }, initFactorsBefore) - stakeChangePerm := rand.Perm(NUM_TESTS) + depositChangePerm := rand.Perm(NUM_TESTS) prepayChangePerm := rand.Perm(NUM_TESTS) for i := 0; i < NUM_TESTS; i++ { - tempStakeSign := 1 + tempDepositSign := 1 if i > 50 && rand.Intn(5) >= 3 { - tempStakeSign = -1 + tempDepositSign = -1 } tempPrepaySign := 1 if i > 50 && rand.Intn(5) >= 3 { tempPrepaySign = -1 } - stakeDeltaChange, _ := sdk.NewIntFromString(strconv.Itoa(stakeChangePerm[i]) + StosToWeiSuffix) + depositDeltaChange, _ := sdk.NewIntFromString(strconv.Itoa(depositChangePerm[i]) + StosToWeiSuffix) unissuedPrepayDeltaChange, _ := sdk.NewIntFromString(strconv.Itoa(prepayChangePerm[i]) + StosToWeiSuffix) change := &PriceChangeEvent{ - stakeDelta: stakeDeltaChange.Mul(sdk.NewInt(int64(tempStakeSign))), + depositDelta: depositDeltaChange.Mul(sdk.NewInt(int64(tempDepositSign))), unissuedPrepayDelta: unissuedPrepayDeltaChange.Mul(sdk.NewInt(int64(tempPrepaySign))), } - t.Logf("\nstakeDeltaOri: %d, unissuedPrepayDeltaOri: %d\n", stakeChangePerm[i], prepayChangePerm[i]) - t.Logf("\nstakeDelta: %v, unissuedPrepayDelta: %v\n", change.stakeDelta.String(), change.unissuedPrepayDelta.String()) + t.Logf("\ndepositDeltaOri: %d, unissuedPrepayDeltaOri: %d\n", depositChangePerm[i], prepayChangePerm[i]) + t.Logf("\ndepositDelta: %v, unissuedPrepayDelta: %v\n", change.depositDelta.String(), change.unissuedPrepayDelta.String()) initFactorsBefore, _, _ = simulatePriceChange(t, change, initFactorsBefore) } } @@ -209,7 +209,7 @@ func TestOzPriceChange(t *testing.T) { //resourceNodes := setupAllResourceNodes() resourceNodes := make([]registertypes.ResourceNode, 0) - stApp := app.SetupWithGenesisNodeSet(t, true, valSet, metaNodes, resourceNodes, accs, totalUnissuedPrepay, chainID, balances...) + stApp := app.SetupWithGenesisNodeSet(t, true, valSet, metaNodes, resourceNodes, accs, chainID, balances...) accountKeeper := stApp.GetAccountKeeper() bankKeeper := stApp.GetBankKeeper() @@ -260,13 +260,13 @@ func TestOzPriceChange(t *testing.T) { _, nozSupply := registerKeeper.NozSupply(ctx) nozPriceFactorsSeq0, nozPricePercentage, ozoneLimitPercentage := printCurrNozPrice(t, ctx, registerKeeper, NozPriceFactors{ - NOzonePrice: registerKeeper.CurrNozPrice(ctx), - InitialTotalStakes: registerKeeper.GetInitialGenesisStakeTotal(ctx), - EffectiveTotalStakes: registerKeeper.GetEffectiveTotalStake(ctx), - TotalUnissuedPrepay: registerKeeper.GetTotalUnissuedPrepay(ctx).Amount, - StakeAndPrepay: registerKeeper.GetInitialGenesisStakeTotal(ctx).Add(registerKeeper.GetTotalUnissuedPrepay(ctx).Amount), - OzoneLimit: registerKeeper.GetRemainingOzoneLimit(ctx), - NozSupply: nozSupply, + NOzonePrice: registerKeeper.CurrNozPrice(ctx), + InitialTotalDeposit: registerKeeper.GetInitialGenesisDepositTotal(ctx), + EffectiveTotalDeposit: registerKeeper.GetEffectiveTotalDeposit(ctx), + TotalUnissuedPrepay: registerKeeper.GetTotalUnissuedPrepay(ctx).Amount, + DepositAndPrepay: registerKeeper.GetInitialGenesisDepositTotal(ctx).Add(registerKeeper.GetTotalUnissuedPrepay(ctx).Amount), + OzoneLimit: registerKeeper.GetRemainingOzoneLimit(ctx), + NozSupply: nozSupply, }) // start testing @@ -385,7 +385,7 @@ func TestOzPriceChange(t *testing.T) { /********************* print info *********************/ t.Log("epoch " + volumeReportMsg.Epoch.String()) - St := registerKeeper.GetEffectiveTotalStake(ctx).ToDec() + St := registerKeeper.GetEffectiveTotalDeposit(ctx).ToDec() Pt := registerKeeper.GetTotalUnissuedPrepay(ctx).Amount.ToDec() Y := totalConsumedNoz Lt := registerKeeper.GetRemainingOzoneLimit(ctx).ToDec() @@ -579,7 +579,7 @@ func setupMsgVolumeReport(newEpoch int64) *pottypes.MsgVolumeReport { volume2 := pottypes.NewSingleWalletVolume(resOwner2, resourceNodeVolume2) volume3 := pottypes.NewSingleWalletVolume(resOwner3, resourceNodeVolume3) - nodesVolume := []*pottypes.SingleWalletVolume{volume1, volume2, volume3} + nodesVolume := []pottypes.SingleWalletVolume{volume1, volume2, volume3} reporter := idxNodeNetworkId1 epoch := sdk.NewInt(newEpoch) reportReference := "report for epoch " + epoch.String() @@ -645,7 +645,7 @@ func setupMsgRemoveResourceNode(i int, resNodeNetworkId stratos.SdsAddress, resO } func setupMsgCreateResourceNode(i int, resNodeNetworkId stratos.SdsAddress, resNodePubKey cryptotypes.PubKey, resOwner sdk.AccAddress) *registertypes.MsgCreateResourceNode { nodeType := uint32(registertypes.STORAGE) - createResourceNodeMsg, _ := registertypes.NewMsgCreateResourceNode(resNodeNetworkId, resNodePubKey, sdk.NewCoin(stratos.Wei, resNodeInitialStakeForMultipleNodes), resOwner, registertypes.NewDescription("sds://resourceNode"+strconv.Itoa(i+1), "", "", "", ""), nodeType) + createResourceNodeMsg, _ := registertypes.NewMsgCreateResourceNode(resNodeNetworkId, resNodePubKey, sdk.NewCoin(stratos.Wei, resNodeInitialDepositForMultipleNodes), resOwner, registertypes.NewDescription("sds://resourceNode"+strconv.Itoa(i+1), "", "", "", ""), nodeType) return createResourceNodeMsg } @@ -660,63 +660,63 @@ func setupUnsuspendMsgByIndex(i int, resNodeNetworkId stratos.SdsAddress, resNod func setupMsgCreateResourceNode1() *registertypes.MsgCreateResourceNode { nodeType := uint32(registertypes.STORAGE) - createResourceNodeMsg, _ := registertypes.NewMsgCreateResourceNode(resNodeNetworkId1, resNodePubKey1, sdk.NewCoin(stratos.Wei, resNodeInitialStake1), resOwner1, registertypes.NewDescription("sds://resourceNode1", "", "", "", ""), nodeType) + createResourceNodeMsg, _ := registertypes.NewMsgCreateResourceNode(resNodeNetworkId1, resNodePubKey1, sdk.NewCoin(stratos.Wei, resNodeInitialDeposit1), resOwner1, registertypes.NewDescription("sds://resourceNode1", "", "", "", ""), nodeType) return createResourceNodeMsg } func setupMsgCreateResourceNode2() *registertypes.MsgCreateResourceNode { nodeType := uint32(registertypes.STORAGE) - createResourceNodeMsg, _ := registertypes.NewMsgCreateResourceNode(resNodeNetworkId2, resNodePubKey2, sdk.NewCoin(stratos.Wei, resNodeInitialStake2), resOwner2, registertypes.NewDescription("sds://resourceNode2", "", "", "", ""), nodeType) + createResourceNodeMsg, _ := registertypes.NewMsgCreateResourceNode(resNodeNetworkId2, resNodePubKey2, sdk.NewCoin(stratos.Wei, resNodeInitialDeposit2), resOwner2, registertypes.NewDescription("sds://resourceNode2", "", "", "", ""), nodeType) return createResourceNodeMsg } func setupMsgCreateResourceNode3() *registertypes.MsgCreateResourceNode { nodeType := uint32(registertypes.STORAGE) - createResourceNodeMsg, _ := registertypes.NewMsgCreateResourceNode(resNodeNetworkId3, resNodePubKey3, sdk.NewCoin(stratos.Wei, resNodeInitialStake3), resOwner3, registertypes.NewDescription("sds://resourceNode3", "", "", "", ""), nodeType) + createResourceNodeMsg, _ := registertypes.NewMsgCreateResourceNode(resNodeNetworkId3, resNodePubKey3, sdk.NewCoin(stratos.Wei, resNodeInitialDeposit3), resOwner3, registertypes.NewDescription("sds://resourceNode3", "", "", "", ""), nodeType) return createResourceNodeMsg } func setupMsgCreateResourceNode4() *registertypes.MsgCreateResourceNode { nodeType := uint32(registertypes.STORAGE) - createResourceNodeMsg, _ := registertypes.NewMsgCreateResourceNode(resNodeNetworkId4, resNodePubKey4, sdk.NewCoin(stratos.Wei, resNodeInitialStake4), resOwner4, registertypes.NewDescription("sds://resourceNode4", "", "", "", ""), nodeType) + createResourceNodeMsg, _ := registertypes.NewMsgCreateResourceNode(resNodeNetworkId4, resNodePubKey4, sdk.NewCoin(stratos.Wei, resNodeInitialDeposit4), resOwner4, registertypes.NewDescription("sds://resourceNode4", "", "", "", ""), nodeType) return createResourceNodeMsg } func setupMsgCreateResourceNode5() *registertypes.MsgCreateResourceNode { nodeType := uint32(registertypes.STORAGE) - createResourceNodeMsg, _ := registertypes.NewMsgCreateResourceNode(resNodeNetworkId5, resNodePubKey5, sdk.NewCoin(stratos.Wei, resNodeInitialStake5), resOwner5, registertypes.NewDescription("sds://resourceNode5", "", "", "", ""), nodeType) + createResourceNodeMsg, _ := registertypes.NewMsgCreateResourceNode(resNodeNetworkId5, resNodePubKey5, sdk.NewCoin(stratos.Wei, resNodeInitialDeposit5), resOwner5, registertypes.NewDescription("sds://resourceNode5", "", "", "", ""), nodeType) return createResourceNodeMsg } func printCurrNozPrice(t *testing.T, ctx sdk.Context, registerKeeper registerKeeper.Keeper, nozPriceFactorsBefore NozPriceFactors) (NozPriceFactors, sdk.Dec, sdk.Dec) { nozPriceFactorsAfter := NozPriceFactors{} - nozPriceFactorsAfter.InitialTotalStakes = registerKeeper.GetInitialGenesisStakeTotal(ctx) - nozPriceFactorsAfter.EffectiveTotalStakes = registerKeeper.GetEffectiveTotalStake(ctx) + nozPriceFactorsAfter.InitialTotalDeposit = registerKeeper.GetInitialGenesisDepositTotal(ctx) + nozPriceFactorsAfter.EffectiveTotalDeposit = registerKeeper.GetEffectiveTotalDeposit(ctx) nozPriceFactorsAfter.TotalUnissuedPrepay = registerKeeper.GetTotalUnissuedPrepay(ctx).Amount - nozPriceFactorsAfter.StakeAndPrepay = nozPriceFactorsAfter.InitialTotalStakes.Add(nozPriceFactorsAfter.TotalUnissuedPrepay) + nozPriceFactorsAfter.DepositAndPrepay = nozPriceFactorsAfter.InitialTotalDeposit.Add(nozPriceFactorsAfter.TotalUnissuedPrepay) nozPriceFactorsAfter.OzoneLimit = registerKeeper.GetRemainingOzoneLimit(ctx) nozPriceFactorsAfter.NOzonePrice = registerKeeper.CurrNozPrice(ctx) _, nozPriceFactorsAfter.NozSupply = registerKeeper.NozSupply(ctx) nozPriceDelta := nozPriceFactorsAfter.NOzonePrice.Sub(nozPriceFactorsBefore.NOzonePrice) - initialTotalStakesDelta := nozPriceFactorsAfter.InitialTotalStakes.Sub(nozPriceFactorsBefore.InitialTotalStakes) - effectiveTotalStakesDelta := nozPriceFactorsAfter.EffectiveTotalStakes.Sub(nozPriceFactorsBefore.EffectiveTotalStakes) + initialTotalDepositDelta := nozPriceFactorsAfter.InitialTotalDeposit.Sub(nozPriceFactorsBefore.InitialTotalDeposit) + effectiveTotalDepositDelta := nozPriceFactorsAfter.EffectiveTotalDeposit.Sub(nozPriceFactorsBefore.EffectiveTotalDeposit) totalUnissuedPrepayDelta := nozPriceFactorsAfter.TotalUnissuedPrepay.Sub(nozPriceFactorsBefore.TotalUnissuedPrepay) - stakeAndPrepayDelta := nozPriceFactorsAfter.StakeAndPrepay.Sub(nozPriceFactorsBefore.StakeAndPrepay) + depositAndPrepayDelta := nozPriceFactorsAfter.DepositAndPrepay.Sub(nozPriceFactorsBefore.DepositAndPrepay) ozoneLimitDelta := nozPriceFactorsAfter.OzoneLimit.Sub(nozPriceFactorsBefore.OzoneLimit) nozSupplyDelta := nozPriceFactorsAfter.NozSupply.Sub(nozPriceFactorsBefore.NozSupply) nozPricePercentage := nozPriceDelta.Quo(nozPriceFactorsBefore.NOzonePrice).MulInt(sdk.NewInt(100)) - //initialTotalStakesPercentage := initialTotalStakesDelta.Quo(nozPriceFactorsBefore.InitialTotalStakes) - //effectiveTotalStakesPercentage := effectiveTotalStakesDelta.Quo(nozPriceFactorsBefore.EffectiveTotalStakes) + //initialTotalDepositPercentage := initialTotalDepositDelta.Quo(nozPriceFactorsBefore.InitialTotalDeposit) + //effectiveTotalDepositPercentage := effectiveTotalDepositDelta.Quo(nozPriceFactorsBefore.EffectiveTotalDeposit) //totalUnissuedPrepayPercentage := totalUnissuedPrepayDelta.Quo(nozPriceFactorsBefore.TotalUnissuedPrepay) - //stakeAndPrepayPercentage := stakeAndPrepayDelta.Quo(nozPriceFactorsBefore.StakeAndPrepay) + //depositAndPrepayPercentage := depositAndPrepayDelta.Quo(nozPriceFactorsBefore.DepositAndPrepay) ozoneLimitPercentage := ozoneLimitDelta.ToDec().Quo(nozPriceFactorsBefore.OzoneLimit.ToDec()).MulInt(sdk.NewInt(100)) t.Log("===>>>>>>>>>>>>>> Current noz Price ===>>>>>>>>>>>>>>") t.Log("NOzonePrice: " + nozPriceFactorsAfter.NOzonePrice.String() + "(delta: " + nozPriceDelta.String() + ", " + nozPricePercentage.String()[:5] + "%)") - t.Log("InitialTotalStakes: " + nozPriceFactorsAfter.InitialTotalStakes.String() + "(delta: " + initialTotalStakesDelta.String() + ")") - t.Log("EffectiveTotalStakes: " + nozPriceFactorsAfter.EffectiveTotalStakes.String() + "(delta: " + effectiveTotalStakesDelta.String() + ")") + t.Log("InitialTotalDeposit: " + nozPriceFactorsAfter.InitialTotalDeposit.String() + "(delta: " + initialTotalDepositDelta.String() + ")") + t.Log("EffectiveTotalDeposit: " + nozPriceFactorsAfter.EffectiveTotalDeposit.String() + "(delta: " + effectiveTotalDepositDelta.String() + ")") t.Log("TotalUnissuedPrepay: " + nozPriceFactorsAfter.TotalUnissuedPrepay.String() + "(delta: " + totalUnissuedPrepayDelta.String() + ")") - t.Log("InitialTotalStakes+TotalUnissuedPrepay: " + nozPriceFactorsAfter.StakeAndPrepay.String() + "(delta: " + stakeAndPrepayDelta.String() + ")") + t.Log("InitialTotalDeposit+TotalUnissuedPrepay: " + nozPriceFactorsAfter.DepositAndPrepay.String() + "(delta: " + depositAndPrepayDelta.String() + ")") t.Log("OzoneLimit: " + nozPriceFactorsAfter.OzoneLimit.String() + "(delta: " + ozoneLimitDelta.String() + ", " + ozoneLimitPercentage.String()[:5] + "%)") t.Log("NozSupply: " + nozPriceFactorsAfter.NozSupply.String() + "(delta: " + nozSupplyDelta.String() + ")") @@ -859,35 +859,35 @@ func setupAccounts() ([]authtypes.GenesisAccount, []banktypes.Balance) { balances := []banktypes.Balance{ { Address: resOwner1.String(), - Coins: sdk.Coins{stratos.NewCoin(resNodeInitialStake1.Add(depositForSendingTx))}, + Coins: sdk.Coins{stratos.NewCoin(resNodeInitialDeposit1.Add(depositForSendingTx))}, }, { Address: resOwner2.String(), - Coins: sdk.Coins{stratos.NewCoin(resNodeInitialStake2)}, + Coins: sdk.Coins{stratos.NewCoin(resNodeInitialDeposit2)}, }, { Address: resOwner3.String(), - Coins: sdk.Coins{stratos.NewCoin(resNodeInitialStake3)}, + Coins: sdk.Coins{stratos.NewCoin(resNodeInitialDeposit3)}, }, { Address: resOwner4.String(), - Coins: sdk.Coins{stratos.NewCoin(resNodeInitialStake4)}, + Coins: sdk.Coins{stratos.NewCoin(resNodeInitialDeposit4)}, }, { Address: resOwner5.String(), - Coins: sdk.Coins{stratos.NewCoin(resNodeInitialStake5)}, + Coins: sdk.Coins{stratos.NewCoin(resNodeInitialDeposit5)}, }, { Address: idxOwner1.String(), - Coins: sdk.Coins{stratos.NewCoin(idxNodeInitialStake1)}, + Coins: sdk.Coins{stratos.NewCoin(idxNodeInitialDeposit1)}, }, { Address: idxOwner2.String(), - Coins: sdk.Coins{stratos.NewCoin(idxNodeInitialStake2)}, + Coins: sdk.Coins{stratos.NewCoin(idxNodeInitialDeposit2)}, }, { Address: idxOwner3.String(), - Coins: sdk.Coins{stratos.NewCoin(idxNodeInitialStake3)}, + Coins: sdk.Coins{stratos.NewCoin(idxNodeInitialDeposit3)}, }, { Address: valOpAccAddr1.String(), @@ -938,15 +938,15 @@ func setupAccountsMultipleResNodes(resOwners []sdk.AccAddress) ([]authtypes.Gene balances := []banktypes.Balance{ { Address: idxOwner1.String(), - Coins: sdk.Coins{stratos.NewCoin(idxNodeInitialStake1)}, + Coins: sdk.Coins{stratos.NewCoin(idxNodeInitialDeposit1)}, }, { Address: idxOwner2.String(), - Coins: sdk.Coins{stratos.NewCoin(idxNodeInitialStake2)}, + Coins: sdk.Coins{stratos.NewCoin(idxNodeInitialDeposit2)}, }, { Address: idxOwner3.String(), - Coins: sdk.Coins{stratos.NewCoin(idxNodeInitialStake3)}, + Coins: sdk.Coins{stratos.NewCoin(idxNodeInitialDeposit3)}, }, { Address: valOpAccAddr1.String(), @@ -966,7 +966,7 @@ func setupAccountsMultipleResNodes(resOwners []sdk.AccAddress) ([]authtypes.Gene accs = append(accs, resOwnerAcc) balances = append(balances, banktypes.Balance{ Address: resOwnerAcc.Address, - Coins: sdk.Coins{stratos.NewCoin(resNodeInitialStakeForMultipleNodes.Add(depositForSendingTx))}, + Coins: sdk.Coins{stratos.NewCoin(resNodeInitialDepositForMultipleNodes.Add(depositForSendingTx))}, }) } @@ -983,11 +983,11 @@ func setupAllResourceNodes() []registertypes.ResourceNode { resourceNode4, _ := registertypes.NewResourceNode(resNodeNetworkId4, resNodePubKey4, resOwner4, registertypes.NewDescription("sds://resourceNode4", "", "", "", ""), nodeType, time) resourceNode5, _ := registertypes.NewResourceNode(resNodeNetworkId5, resNodePubKey5, resOwner5, registertypes.NewDescription("sds://resourceNode5", "", "", "", ""), nodeType, time) - resourceNode1 = resourceNode1.AddToken(resNodeInitialStake1) - resourceNode2 = resourceNode2.AddToken(resNodeInitialStake2) - resourceNode3 = resourceNode3.AddToken(resNodeInitialStake3) - resourceNode4 = resourceNode4.AddToken(resNodeInitialStake4) - resourceNode5 = resourceNode5.AddToken(resNodeInitialStake5) + resourceNode1 = resourceNode1.AddToken(resNodeInitialDeposit1) + resourceNode2 = resourceNode2.AddToken(resNodeInitialDeposit2) + resourceNode3 = resourceNode3.AddToken(resNodeInitialDeposit3) + resourceNode4 = resourceNode4.AddToken(resNodeInitialDeposit4) + resourceNode5 = resourceNode5.AddToken(resNodeInitialDeposit5) resourceNode1.Status = stakingtypes.Bonded resourceNode2.Status = stakingtypes.Bonded @@ -1019,7 +1019,7 @@ func setupMultipleResourceNodes(resOwnerPrivKeys []*secp256k1.PrivKey, resNodePu for i, _ := range resOwnerPrivKeys { resourceNodeTmp, _ := registertypes.NewResourceNode(resNodeNetworkIds[i], resNodePubKeys[i], resOwners[i], registertypes.NewDescription("sds://resourceNode"+strconv.Itoa(i+1), "", "", "", ""), nodeType, time) - resourceNodeTmp = resourceNodeTmp.AddToken(resNodeInitialStakeForMultipleNodes) + resourceNodeTmp = resourceNodeTmp.AddToken(resNodeInitialDepositForMultipleNodes) resourceNodeTmp.Status = stakingtypes.Bonded resourceNodes = append(resourceNodes, resourceNodeTmp) } @@ -1039,9 +1039,9 @@ func setupAllMetaNodes() []registertypes.MetaNode { indexingNode2.Suspend = false indexingNode3.Suspend = false - indexingNode1 = indexingNode1.AddToken(idxNodeInitialStake1) - indexingNode2 = indexingNode2.AddToken(idxNodeInitialStake2) - indexingNode3 = indexingNode3.AddToken(idxNodeInitialStake3) + indexingNode1 = indexingNode1.AddToken(idxNodeInitialDeposit1) + indexingNode2 = indexingNode2.AddToken(idxNodeInitialDeposit2) + indexingNode3 = indexingNode3.AddToken(idxNodeInitialDeposit3) indexingNode1.Status = stakingtypes.Bonded indexingNode2.Status = stakingtypes.Bonded @@ -1055,37 +1055,37 @@ func setupAllMetaNodes() []registertypes.MetaNode { } var ( - initialTotalStakesStore = sdk.NewInt(1500000000000) - effectiveTotalStakesStore = sdk.NewInt(1500000000000) - remainOzoneLimitStore = sdk.NewInt(1500000000000000) - totalUnissuedPrepayStore = sdk.ZeroInt() - nozPrice = sdk.NewDecWithPrec(1000000, 9) + initialTotalDepositStore = sdk.NewInt(1500000000000) + effectiveTotalDepositStore = sdk.NewInt(1500000000000) + remainOzoneLimitStore = sdk.NewInt(1500000000000000) + totalUnissuedPrepayStore = sdk.ZeroInt() + nozPrice = sdk.NewDecWithPrec(1000000, 9) //priceChangeChan = make(chan PriceChangeEvent, 0) ) type PriceChangeEvent struct { - stakeDelta sdk.Int + depositDelta sdk.Int unissuedPrepayDelta sdk.Int } func simulatePriceChange(t *testing.T, priceChangeEvent *PriceChangeEvent, nozPriceFactorsBefore *NozPriceFactors) (*NozPriceFactors, sdk.Dec, sdk.Dec) { nozPriceFactorsAfter := &NozPriceFactors{} - nozPriceFactorsAfter.InitialTotalStakes = nozPriceFactorsBefore.InitialTotalStakes + nozPriceFactorsAfter.InitialTotalDeposit = nozPriceFactorsBefore.InitialTotalDeposit nozPriceFactorsAfter.TotalUnissuedPrepay = nozPriceFactorsBefore.TotalUnissuedPrepay.Add(priceChangeEvent.unissuedPrepayDelta) - nozPriceFactorsAfter.StakeAndPrepay = nozPriceFactorsAfter.InitialTotalStakes.Add(nozPriceFactorsAfter.TotalUnissuedPrepay) - nozPriceFactorsAfter.EffectiveTotalStakes = nozPriceFactorsBefore.EffectiveTotalStakes.Add(priceChangeEvent.stakeDelta) + nozPriceFactorsAfter.DepositAndPrepay = nozPriceFactorsAfter.InitialTotalDeposit.Add(nozPriceFactorsAfter.TotalUnissuedPrepay) + nozPriceFactorsAfter.EffectiveTotalDeposit = nozPriceFactorsBefore.EffectiveTotalDeposit.Add(priceChangeEvent.depositDelta) deltaNozLimit := sdk.ZeroInt() nozPriceFactorsAfter.NozSupply = nozPriceFactorsBefore.NozSupply - if !priceChangeEvent.stakeDelta.Equal(sdk.ZeroInt()) { - ozoneLimitChangeByStake := priceChangeEvent.stakeDelta.ToDec().Quo(stakeNozRateInt.ToDec()).TruncateInt() - //ozoneLimitChangeByStake := nozPriceFactorsBefore.OzoneLimit.ToDec().Quo(nozPriceFactorsBefore.InitialTotalStakes.ToDec()).Mul(priceChangeEvent.stakeDelta.ToDec()).TruncateInt() - deltaNozLimit = deltaNozLimit.Add(ozoneLimitChangeByStake) - nozPriceFactorsAfter.NozSupply = nozPriceFactorsBefore.NozSupply.Add(ozoneLimitChangeByStake) + if !priceChangeEvent.depositDelta.Equal(sdk.ZeroInt()) { + ozoneLimitChangeByDeposit := priceChangeEvent.depositDelta.ToDec().Quo(depositNozRateInt.ToDec()).TruncateInt() + //ozoneLimitChangeByDeposit := nozPriceFactorsBefore.OzoneLimit.ToDec().Quo(nozPriceFactorsBefore.InitialTotalDeposit.ToDec()).Mul(priceChangeEvent.depositDelta.ToDec()).TruncateInt() + deltaNozLimit = deltaNozLimit.Add(ozoneLimitChangeByDeposit) + nozPriceFactorsAfter.NozSupply = nozPriceFactorsBefore.NozSupply.Add(ozoneLimitChangeByDeposit) } if !priceChangeEvent.unissuedPrepayDelta.Equal(sdk.ZeroInt()) { ozoneLimitChangeByPrepay := nozPriceFactorsBefore.OzoneLimit.ToDec(). Mul(priceChangeEvent.unissuedPrepayDelta.ToDec()). - Quo(nozPriceFactorsBefore.EffectiveTotalStakes.Add(nozPriceFactorsBefore.TotalUnissuedPrepay).Add(priceChangeEvent.unissuedPrepayDelta).ToDec()). + Quo(nozPriceFactorsBefore.EffectiveTotalDeposit.Add(nozPriceFactorsBefore.TotalUnissuedPrepay).Add(priceChangeEvent.unissuedPrepayDelta).ToDec()). TruncateInt() //Sub(nozPriceFactorsBefore.OzoneLimit) if priceChangeEvent.unissuedPrepayDelta.GT(sdk.ZeroInt()) { @@ -1099,30 +1099,30 @@ func simulatePriceChange(t *testing.T, priceChangeEvent *PriceChangeEvent, nozPr nozPriceFactorsAfter.OzoneLimit = nozPriceFactorsBefore.OzoneLimit.Add(deltaNozLimit) - nozPriceFactorsAfter.NOzonePrice = nozPriceFactorsAfter.StakeAndPrepay.ToDec().Quo(nozPriceFactorsAfter.OzoneLimit.ToDec()) - nozPriceFactorsAfter.EffectiveTotalStakes = nozPriceFactorsBefore.EffectiveTotalStakes.Add(priceChangeEvent.stakeDelta) + nozPriceFactorsAfter.NOzonePrice = nozPriceFactorsAfter.DepositAndPrepay.ToDec().Quo(nozPriceFactorsAfter.OzoneLimit.ToDec()) + nozPriceFactorsAfter.EffectiveTotalDeposit = nozPriceFactorsBefore.EffectiveTotalDeposit.Add(priceChangeEvent.depositDelta) nozPriceDelta := nozPriceFactorsAfter.NOzonePrice.Sub(nozPriceFactorsBefore.NOzonePrice) - initialTotalStakesDelta := nozPriceFactorsAfter.InitialTotalStakes.Sub(nozPriceFactorsBefore.InitialTotalStakes) - effectiveTotalStakesDelta := nozPriceFactorsAfter.EffectiveTotalStakes.Sub(nozPriceFactorsBefore.EffectiveTotalStakes) + initialTotalDepositDelta := nozPriceFactorsAfter.InitialTotalDeposit.Sub(nozPriceFactorsBefore.InitialTotalDeposit) + effectiveTotalDepositDelta := nozPriceFactorsAfter.EffectiveTotalDeposit.Sub(nozPriceFactorsBefore.EffectiveTotalDeposit) totalUnissuedPrepayDelta := nozPriceFactorsAfter.TotalUnissuedPrepay.Sub(nozPriceFactorsBefore.TotalUnissuedPrepay) - stakeAndPrepayDelta := nozPriceFactorsAfter.StakeAndPrepay.Sub(nozPriceFactorsBefore.StakeAndPrepay) + depositAndPrepayDelta := nozPriceFactorsAfter.DepositAndPrepay.Sub(nozPriceFactorsBefore.DepositAndPrepay) ozoneLimitDelta := nozPriceFactorsAfter.OzoneLimit.Sub(nozPriceFactorsBefore.OzoneLimit) nozSupplyDelta := nozPriceFactorsAfter.NozSupply.Sub(nozPriceFactorsBefore.NozSupply) nozPricePercentage := nozPriceDelta.Quo(nozPriceFactorsBefore.NOzonePrice).MulInt(sdk.NewInt(100)) - //initialTotalStakesPercentage := initialTotalStakesDelta.Quo(nozPriceFactorsBefore.InitialTotalStakes) - //effectiveTotalStakesPercentage := effectiveTotalStakesDelta.Quo(nozPriceFactorsBefore.EffectiveTotalStakes) + //initialTotalDepositPercentage := initialTotalDepositDelta.Quo(nozPriceFactorsBefore.InitialTotalDeposit) + //effectiveTotalDepositPercentage := effectiveTotalDepositDelta.Quo(nozPriceFactorsBefore.EffectiveTotalDeposit) //totalUnissuedPrepayPercentage := totalUnissuedPrepayDelta.Quo(nozPriceFactorsBefore.TotalUnissuedPrepay) - //stakeAndPrepayPercentage := stakeAndPrepayDelta.Quo(nozPriceFactorsBefore.StakeAndPrepay) + //depositAndPrepayPercentage := depositAndPrepayDelta.Quo(nozPriceFactorsBefore.DepositAndPrepay) ozoneLimitPercentage := ozoneLimitDelta.ToDec().Quo(nozPriceFactorsBefore.OzoneLimit.ToDec()).MulInt(sdk.NewInt(100)) t.Log("===>>>>>>>>>>>>>> Current noz Price ===>>>>>>>>>>>>>>") t.Log("NOzonePrice: " + nozPriceFactorsAfter.NOzonePrice.String() + "(delta: " + nozPriceDelta.String() + ", " + nozPricePercentage.String()[:5] + "%)") - t.Log("InitialTotalStakes: " + nozPriceFactorsAfter.InitialTotalStakes.String() + "(delta: " + initialTotalStakesDelta.String() + ")") - t.Log("EffectiveTotalStakes: " + nozPriceFactorsAfter.EffectiveTotalStakes.String() + "(delta: " + effectiveTotalStakesDelta.String() + ")") + t.Log("InitialTotalDeposit: " + nozPriceFactorsAfter.InitialTotalDeposit.String() + "(delta: " + initialTotalDepositDelta.String() + ")") + t.Log("EffectiveTotalDeposit: " + nozPriceFactorsAfter.EffectiveTotalDeposit.String() + "(delta: " + effectiveTotalDepositDelta.String() + ")") t.Log("TotalUnissuedPrepay: " + nozPriceFactorsAfter.TotalUnissuedPrepay.String() + "(delta: " + totalUnissuedPrepayDelta.String() + ")") - t.Log("InitialTotalStakes+TotalUnissuedPrepay: " + nozPriceFactorsAfter.StakeAndPrepay.String() + "(delta: " + stakeAndPrepayDelta.String() + ")") + t.Log("InitialTotalDeposit+TotalUnissuedPrepay: " + nozPriceFactorsAfter.DepositAndPrepay.String() + "(delta: " + depositAndPrepayDelta.String() + ")") t.Log("OzoneLimit: " + nozPriceFactorsAfter.OzoneLimit.String() + "(delta: " + ozoneLimitDelta.String() + ", " + ozoneLimitPercentage.String()[:5] + "%)") t.Log("NozSupply: " + nozPriceFactorsAfter.NozSupply.String() + "(delta: " + nozSupplyDelta.String() + ")") @@ -1142,7 +1142,7 @@ func TestOzPriceChangePrepay(t *testing.T) { //resourceNodes := setupAllResourceNodes() resourceNodes := make([]registertypes.ResourceNode, 0) - stApp := app.SetupWithGenesisNodeSet(t, true, valSet, metaNodes, resourceNodes, accs, totalUnissuedPrepay, chainID, balances...) + stApp := app.SetupWithGenesisNodeSet(t, true, valSet, metaNodes, resourceNodes, accs, chainID, balances...) accountKeeper := stApp.GetAccountKeeper() //bankKeeper := stApp.GetBankKeeper() @@ -1191,13 +1191,13 @@ func TestOzPriceChangePrepay(t *testing.T) { require.True(sdk.IntEq(t, valInitialStake, validator.BondedTokens())) _, nozSupply := registerKeeper.NozSupply(ctx) nozPriceFactorsSeq0, nozPricePercentage, ozoneLimitPercentage := printCurrNozPrice(t, ctx, registerKeeper, NozPriceFactors{ - NOzonePrice: registerKeeper.CurrNozPrice(ctx), - InitialTotalStakes: registerKeeper.GetInitialGenesisStakeTotal(ctx), - EffectiveTotalStakes: registerKeeper.GetEffectiveTotalStake(ctx), - TotalUnissuedPrepay: registerKeeper.GetTotalUnissuedPrepay(ctx).Amount, - StakeAndPrepay: registerKeeper.GetInitialGenesisStakeTotal(ctx).Add(registerKeeper.GetTotalUnissuedPrepay(ctx).Amount), - OzoneLimit: registerKeeper.GetRemainingOzoneLimit(ctx), - NozSupply: nozSupply, + NOzonePrice: registerKeeper.CurrNozPrice(ctx), + InitialTotalDeposit: registerKeeper.GetInitialGenesisDepositTotal(ctx), + EffectiveTotalDeposit: registerKeeper.GetEffectiveTotalDeposit(ctx), + TotalUnissuedPrepay: registerKeeper.GetTotalUnissuedPrepay(ctx).Amount, + DepositAndPrepay: registerKeeper.GetInitialGenesisDepositTotal(ctx).Add(registerKeeper.GetTotalUnissuedPrepay(ctx).Amount), + OzoneLimit: registerKeeper.GetRemainingOzoneLimit(ctx), + NozSupply: nozSupply, }) // start testing @@ -1245,7 +1245,7 @@ func TestOzPriceChangeVolumeReport(t *testing.T) { //resourceNodes := setupAllResourceNodes() resourceNodes := make([]registertypes.ResourceNode, 0) - stApp := app.SetupWithGenesisNodeSet(t, true, valSet, metaNodes, resourceNodes, accs, totalUnissuedPrepay, chainID, balances...) + stApp := app.SetupWithGenesisNodeSet(t, true, valSet, metaNodes, resourceNodes, accs, chainID, balances...) accountKeeper := stApp.GetAccountKeeper() bankKeeper := stApp.GetBankKeeper() @@ -1295,13 +1295,13 @@ func TestOzPriceChangeVolumeReport(t *testing.T) { require.True(sdk.IntEq(t, valInitialStake, validator.BondedTokens())) _, nozSupply := registerKeeper.NozSupply(ctx) nozPriceFactorsSeq0, nozPricePercentage, ozoneLimitPercentage := printCurrNozPrice(t, ctx, registerKeeper, NozPriceFactors{ - NOzonePrice: registerKeeper.CurrNozPrice(ctx), - InitialTotalStakes: registerKeeper.GetInitialGenesisStakeTotal(ctx), - EffectiveTotalStakes: registerKeeper.GetEffectiveTotalStake(ctx), - TotalUnissuedPrepay: registerKeeper.GetTotalUnissuedPrepay(ctx).Amount, - StakeAndPrepay: registerKeeper.GetInitialGenesisStakeTotal(ctx).Add(registerKeeper.GetTotalUnissuedPrepay(ctx).Amount), - OzoneLimit: registerKeeper.GetRemainingOzoneLimit(ctx), - NozSupply: nozSupply, + NOzonePrice: registerKeeper.CurrNozPrice(ctx), + InitialTotalDeposit: registerKeeper.GetInitialGenesisDepositTotal(ctx), + EffectiveTotalDeposit: registerKeeper.GetEffectiveTotalDeposit(ctx), + TotalUnissuedPrepay: registerKeeper.GetTotalUnissuedPrepay(ctx).Amount, + DepositAndPrepay: registerKeeper.GetInitialGenesisDepositTotal(ctx).Add(registerKeeper.GetTotalUnissuedPrepay(ctx).Amount), + OzoneLimit: registerKeeper.GetRemainingOzoneLimit(ctx), + NozSupply: nozSupply, }) // start testing @@ -1347,7 +1347,7 @@ func TestOzPriceChangeVolumeReport(t *testing.T) { /********************* print info *********************/ t.Log("epoch " + volumeReportMsg.Epoch.String()) - S := registerKeeper.GetInitialGenesisStakeTotal(ctx).ToDec() + S := registerKeeper.GetInitialGenesisDepositTotal(ctx).ToDec() Pt := registerKeeper.GetTotalUnissuedPrepay(ctx).Amount.ToDec() Y := totalConsumedNoz Lt := registerKeeper.GetRemainingOzoneLimit(ctx).ToDec() @@ -1470,7 +1470,7 @@ func TestOzPriceChangeAddMultipleResourceNodeAndThenRemove(t *testing.T) { //resourceNodes := setupAllResourceNodes() resourceNodes := make([]registertypes.ResourceNode, 0) - stApp := app.SetupWithGenesisNodeSet(t, true, valSet, metaNodes, resourceNodes, accs, totalUnissuedPrepay, chainID, balances...) + stApp := app.SetupWithGenesisNodeSet(t, true, valSet, metaNodes, resourceNodes, accs, chainID, balances...) accountKeeper := stApp.GetAccountKeeper() //bankKeeper := stApp.GetBankKeeper() @@ -1520,10 +1520,10 @@ func TestOzPriceChangeAddMultipleResourceNodeAndThenRemove(t *testing.T) { _, nozSupply := registerKeeper.NozSupply(ctx) //nozPriceFactorsSeq0, nozPricePercentage, ozoneLimitPercentage := printCurrNozPrice(t, ctx, registerKeeper, NozPriceFactors{ // NOzonePrice: registerKeeper.CurrNozPrice(ctx), - // InitialTotalStakes: registerKeeper.GetInitialGenesisStakeTotal(ctx), - // EffectiveTotalStakes: registerKeeper.GetEffectiveTotalStake(ctx), + // InitialTotalDeposit: registerKeeper.GetInitialGenesisDepositTotal(ctx), + // EffectiveTotalDeposit: registerKeeper.GetEffectiveTotalDeposit(ctx), // TotalUnissuedPrepay: registerKeeper.GetTotalUnissuedPrepay(ctx).Amount, - // StakeAndPrepay: registerKeeper.GetInitialGenesisStakeTotal(ctx).Add(registerKeeper.GetTotalUnissuedPrepay(ctx).Amount), + // DepositAndPrepay: registerKeeper.GetInitialGenesisDepositTotal(ctx).Add(registerKeeper.GetTotalUnissuedPrepay(ctx).Amount), // OzoneLimit: registerKeeper.GetRemainingOzoneLimit(ctx), // NozSupply: nozSupply, //}) @@ -1546,13 +1546,13 @@ func TestOzPriceChangeAddMultipleResourceNodeAndThenRemove(t *testing.T) { ctx = stApp.BaseApp.NewContext(true, header) nozPriceFactorsSeq0, nozPricePercentage, ozoneLimitPercentage := printCurrNozPrice(t, ctx, registerKeeper, NozPriceFactors{ - NOzonePrice: registerKeeper.CurrNozPrice(ctx), - InitialTotalStakes: registerKeeper.GetInitialGenesisStakeTotal(ctx), - EffectiveTotalStakes: registerKeeper.GetEffectiveTotalStake(ctx), - TotalUnissuedPrepay: registerKeeper.GetTotalUnissuedPrepay(ctx).Amount, - StakeAndPrepay: registerKeeper.GetInitialGenesisStakeTotal(ctx).Add(registerKeeper.GetTotalUnissuedPrepay(ctx).Amount), - OzoneLimit: registerKeeper.GetRemainingOzoneLimit(ctx), - NozSupply: nozSupply, + NOzonePrice: registerKeeper.CurrNozPrice(ctx), + InitialTotalDeposit: registerKeeper.GetInitialGenesisDepositTotal(ctx), + EffectiveTotalDeposit: registerKeeper.GetEffectiveTotalDeposit(ctx), + TotalUnissuedPrepay: registerKeeper.GetTotalUnissuedPrepay(ctx).Amount, + DepositAndPrepay: registerKeeper.GetInitialGenesisDepositTotal(ctx).Add(registerKeeper.GetTotalUnissuedPrepay(ctx).Amount), + OzoneLimit: registerKeeper.GetRemainingOzoneLimit(ctx), + NozSupply: nozSupply, }) priceBefore := nozPriceFactorsSeq0 priceAfter := nozPriceFactorsSeq0 @@ -1670,7 +1670,7 @@ func TestOzPriceChangeRemoveMultipleResourceNodeAfterGenesis(t *testing.T) { metaNodes := setupAllMetaNodes() resourceNodes := setupMultipleResourceNodes(resOwnerPrivKeys, resOwnerPubkeys, resOwners, resNodeNetworkIds) - stApp := app.SetupWithGenesisNodeSet(t, true, valSet, metaNodes, resourceNodes, accs, totalUnissuedPrepay, chainID, balances...) + stApp := app.SetupWithGenesisNodeSet(t, true, valSet, metaNodes, resourceNodes, accs, chainID, balances...) accountKeeper := stApp.GetAccountKeeper() //bankKeeper := stApp.GetBankKeeper() @@ -1720,10 +1720,10 @@ func TestOzPriceChangeRemoveMultipleResourceNodeAfterGenesis(t *testing.T) { _, nozSupply := registerKeeper.NozSupply(ctx) //nozPriceFactorsSeq0, nozPricePercentage, ozoneLimitPercentage := printCurrNozPrice(t, ctx, registerKeeper, NozPriceFactors{ // NOzonePrice: registerKeeper.CurrNozPrice(ctx), - // InitialTotalStakes: registerKeeper.GetInitialGenesisStakeTotal(ctx), - // EffectiveTotalStakes: registerKeeper.GetEffectiveTotalStake(ctx), + // InitialTotalDeposit: registerKeeper.GetInitialGenesisDepositTotal(ctx), + // EffectiveTotalDeposit: registerKeeper.GetEffectiveTotalDeposit(ctx), // TotalUnissuedPrepay: registerKeeper.GetTotalUnissuedPrepay(ctx).Amount, - // StakeAndPrepay: registerKeeper.GetInitialGenesisStakeTotal(ctx).Add(registerKeeper.GetTotalUnissuedPrepay(ctx).Amount), + // DepositAndPrepay: registerKeeper.GetInitialGenesisDepositTotal(ctx).Add(registerKeeper.GetTotalUnissuedPrepay(ctx).Amount), // OzoneLimit: registerKeeper.GetRemainingOzoneLimit(ctx), // NozSupply: nozSupply, //}) @@ -1763,13 +1763,13 @@ func TestOzPriceChangeRemoveMultipleResourceNodeAfterGenesis(t *testing.T) { ctx = stApp.BaseApp.NewContext(true, header) nozPriceFactorsSeq0, nozPricePercentage, ozoneLimitPercentage := printCurrNozPrice(t, ctx, registerKeeper, NozPriceFactors{ - NOzonePrice: registerKeeper.CurrNozPrice(ctx), - InitialTotalStakes: registerKeeper.GetInitialGenesisStakeTotal(ctx), - EffectiveTotalStakes: registerKeeper.GetEffectiveTotalStake(ctx), - TotalUnissuedPrepay: registerKeeper.GetTotalUnissuedPrepay(ctx).Amount, - StakeAndPrepay: registerKeeper.GetInitialGenesisStakeTotal(ctx).Add(registerKeeper.GetTotalUnissuedPrepay(ctx).Amount), - OzoneLimit: registerKeeper.GetRemainingOzoneLimit(ctx), - NozSupply: nozSupply, + NOzonePrice: registerKeeper.CurrNozPrice(ctx), + InitialTotalDeposit: registerKeeper.GetInitialGenesisDepositTotal(ctx), + EffectiveTotalDeposit: registerKeeper.GetEffectiveTotalDeposit(ctx), + TotalUnissuedPrepay: registerKeeper.GetTotalUnissuedPrepay(ctx).Amount, + DepositAndPrepay: registerKeeper.GetInitialGenesisDepositTotal(ctx).Add(registerKeeper.GetTotalUnissuedPrepay(ctx).Amount), + OzoneLimit: registerKeeper.GetRemainingOzoneLimit(ctx), + NozSupply: nozSupply, }) priceBefore := nozPriceFactorsSeq0 @@ -1818,10 +1818,10 @@ func TestOzPriceChangeRemoveMultipleResourceNodeAfterGenesis(t *testing.T) { } func exportToCSV(t *testing.T, factors []NozPriceFactors) { - t.Logf("\n%v, %v, %v, %v, %v, %v, %v", "Index", "InitialTotalStake", "TotalUnissuedPrepay", "StakeAndPrepay", + t.Logf("\n%v, %v, %v, %v, %v, %v, %v", "Index", "InitialTotalDeposit", "TotalUnissuedPrepay", "DepositAndPrepay", "NOzonePrice", "RemainingOzoneLimit", "TotalNozSupply") for i, factor := range factors { - t.Logf("\n%v, %v, %v, %v, %v, %v, %v", i+1, factor.InitialTotalStakes.String(), factor.TotalUnissuedPrepay.String(), factor.StakeAndPrepay.String(), + t.Logf("\n%v, %v, %v, %v, %v, %v, %v", i+1, factor.InitialTotalDeposit.String(), factor.TotalUnissuedPrepay.String(), factor.DepositAndPrepay.String(), factor.NOzonePrice.String(), factor.OzoneLimit.String(), factor.NozSupply.String()) } t.Log("\n") From 24b324ca81620f950038c52aeff739b97dd8a680 Mon Sep 17 00:00:00 2001 From: Xiong Date: Thu, 1 Jun 2023 16:39:10 -0400 Subject: [PATCH 80/95] update --- x/pot/app_benchmark_test.go | 10 +- x/pot/app_test.go | 34 +-- x/pot/keeper/slashing.go | 8 +- x/sds/app_test.go | 552 ------------------------------------ x/sds/sds_test.go | 336 ---------------------- 5 files changed, 26 insertions(+), 914 deletions(-) delete mode 100644 x/sds/app_test.go delete mode 100644 x/sds/sds_test.go diff --git a/x/pot/app_benchmark_test.go b/x/pot/app_benchmark_test.go index ae28ce7e..7782fb01 100644 --- a/x/pot/app_benchmark_test.go +++ b/x/pot/app_benchmark_test.go @@ -78,7 +78,7 @@ var ( accInitBalance = sdk.NewInt(100).Mul(sdk.NewInt(stratos.StosToWei)) initFoundationDeposit = sdk.NewCoins(sdk.NewCoin(stratos.Utros, sdk.NewInt(40000000000000000))) - nodeInitStake = sdk.NewInt(1 * stratos.StosToWei) + nodeInitDeposit = sdk.NewInt(1 * stratos.StosToWei) prepayAmt = sdk.NewCoins(stratos.NewCoin(sdk.NewInt(20).Mul(sdk.NewInt(stratos.StosToWei)))) valP2PAddrBech32 string ) @@ -210,7 +210,7 @@ func setupNodesBenchmark() (createValidatorMsg *stakingtypes.MsgCreateValidator, createValidatorMsg, _ = stakingtypes.NewMsgCreateValidator( sdk.ValAddress(keyInfo.OwnerAddress()), keyInfo.P2PPubKey(), - stratos.NewCoin(nodeInitStake), + stratos.NewCoin(nodeInitDeposit), description, commission, sdk.OneInt(), @@ -224,7 +224,7 @@ func setupNodesBenchmark() (createValidatorMsg *stakingtypes.MsgCreateValidator, registertypes.NewDescription(keyInfo.P2PAddressBech32(), "", "", "", ""), time, ) - metaNode = metaNode.AddToken(nodeInitStake) + metaNode = metaNode.AddToken(nodeInitDeposit) metaNode.Status = stakingtypes.Bonded metaNode.Suspend = false @@ -238,8 +238,8 @@ func setupNodesBenchmark() (createValidatorMsg *stakingtypes.MsgCreateValidator, nodeType, time, ) - resourceNode = resourceNode.AddToken(nodeInitStake) - resourceNode.EffectiveTokens = nodeInitStake + resourceNode = resourceNode.AddToken(nodeInitDeposit) + resourceNode.EffectiveTokens = nodeInitDeposit resourceNode.Status = stakingtypes.Bonded resourceNode.Suspend = false diff --git a/x/pot/app_test.go b/x/pot/app_test.go index 077e978f..8d06ee9f 100644 --- a/x/pot/app_test.go +++ b/x/pot/app_test.go @@ -59,8 +59,8 @@ var ( foundationDepositorAccAddr = sdk.AccAddress(foundationDepositorPrivKey.PubKey().Address()) foundationDeposit = sdk.NewCoins(sdk.NewCoin(rewardDenom, sdk.NewInt(40000000000000000))) - nodeInitialStake = sdk.NewInt(1 * stratos.StosToWei) - initBalance = sdk.NewInt(100).Mul(sdk.NewInt(stratos.StosToWei)) + nodeInitialDeposit = sdk.NewInt(1 * stratos.StosToWei) + initBalance = sdk.NewInt(100).Mul(sdk.NewInt(stratos.StosToWei)) // wallet private keys resOwnerPrivKey1 = secp256k1.GenPrivKey() @@ -227,7 +227,7 @@ func TestPotVolumeReportMsgs(t *testing.T) { commission := stakingtypes.NewCommissionRates(sdk.NewDecWithPrec(5, 1), sdk.NewDecWithPrec(5, 1), sdk.NewDec(0)) description := stakingtypes.NewDescription("foo_moniker", chainID, "", "", "") - createValidatorMsg, err := stakingtypes.NewMsgCreateValidator(valOpValAddr1, valConsPubk1, stratos.NewCoin(nodeInitialStake), description, commission, sdk.OneInt()) + createValidatorMsg, err := stakingtypes.NewMsgCreateValidator(valOpValAddr1, valConsPubk1, stratos.NewCoin(nodeInitialDeposit), description, commission, sdk.OneInt()) senderAcc = accountKeeper.GetAccount(ctx, valOpAccAddr1) accNum = senderAcc.GetAccountNumber() @@ -253,7 +253,7 @@ func TestPotVolumeReportMsgs(t *testing.T) { validator := checkValidator(t, stApp, valOpValAddr1, true) require.Equal(t, stakingtypes.Bonded, validator.Status) - require.True(sdk.IntEq(t, nodeInitialStake, validator.BondedTokens())) + require.True(sdk.IntEq(t, nodeInitialDeposit, validator.BondedTokens())) /********************** loop sending volume report **********************/ var i int64 @@ -637,17 +637,17 @@ func setupAllResourceNodes() []registertypes.ResourceNode { resourceNode4, _ := registertypes.NewResourceNode(resNodeP2PAddr4, resNodeP2PPubKey4, resOwner4, registertypes.NewDescription("resourceNode4", "", "", "", ""), nodeType, time) resourceNode5, _ := registertypes.NewResourceNode(resNodeP2PAddr5, resNodeP2PPubKey5, resOwner5, registertypes.NewDescription("resourceNode5", "", "", "", ""), nodeType, time) - resourceNode1 = resourceNode1.AddToken(nodeInitialStake) - resourceNode2 = resourceNode2.AddToken(nodeInitialStake) - resourceNode3 = resourceNode3.AddToken(nodeInitialStake) - resourceNode4 = resourceNode4.AddToken(nodeInitialStake) - resourceNode5 = resourceNode5.AddToken(nodeInitialStake) + resourceNode1 = resourceNode1.AddToken(nodeInitialDeposit) + resourceNode2 = resourceNode2.AddToken(nodeInitialDeposit) + resourceNode3 = resourceNode3.AddToken(nodeInitialDeposit) + resourceNode4 = resourceNode4.AddToken(nodeInitialDeposit) + resourceNode5 = resourceNode5.AddToken(nodeInitialDeposit) - resourceNode1.EffectiveTokens = nodeInitialStake - resourceNode2.EffectiveTokens = nodeInitialStake - resourceNode3.EffectiveTokens = nodeInitialStake - resourceNode4.EffectiveTokens = nodeInitialStake - resourceNode5.EffectiveTokens = nodeInitialStake + resourceNode1.EffectiveTokens = nodeInitialDeposit + resourceNode2.EffectiveTokens = nodeInitialDeposit + resourceNode3.EffectiveTokens = nodeInitialDeposit + resourceNode4.EffectiveTokens = nodeInitialDeposit + resourceNode5.EffectiveTokens = nodeInitialDeposit resourceNode1.Status = stakingtypes.Bonded resourceNode2.Status = stakingtypes.Bonded @@ -678,9 +678,9 @@ func setupAllMetaNodes() []registertypes.MetaNode { indexingNode2, _ := registertypes.NewMetaNode(metaNodeP2PAddr2, metaNodeP2PPubKey2, metaOwner2, registertypes.NewDescription("indexingNode2", "", "", "", ""), time) indexingNode3, _ := registertypes.NewMetaNode(metaNodeP2PAddr3, metaNodeP2PPubKey3, metaOwner3, registertypes.NewDescription("indexingNode3", "", "", "", ""), time) - indexingNode1 = indexingNode1.AddToken(nodeInitialStake) - indexingNode2 = indexingNode2.AddToken(nodeInitialStake) - indexingNode3 = indexingNode3.AddToken(nodeInitialStake) + indexingNode1 = indexingNode1.AddToken(nodeInitialDeposit) + indexingNode2 = indexingNode2.AddToken(nodeInitialDeposit) + indexingNode3 = indexingNode3.AddToken(nodeInitialDeposit) indexingNode1.Status = stakingtypes.Bonded indexingNode2.Status = stakingtypes.Bonded diff --git a/x/pot/keeper/slashing.go b/x/pot/keeper/slashing.go index 6726b62f..9f379b6e 100644 --- a/x/pot/keeper/slashing.go +++ b/x/pot/keeper/slashing.go @@ -12,8 +12,8 @@ This function only record slashing amount. Deduct slashing amount when: 1, calculate upcoming mature reward, deduct from mature_total & upcoming mature reward. -2, unstaking meta node. -3, unstaking resource node. +2, meta node decrease deposit . +3, resource node decrease deposit . */ func (k Keeper) SlashingResourceNode(ctx sdk.Context, p2pAddr stratos.SdsAddress, walletAddr sdk.AccAddress, nozAmt sdk.Int, suspend bool) (tokenAmt sdk.Int, nodeType registertypes.NodeType, err error) { @@ -40,9 +40,9 @@ func (k Keeper) SlashingResourceNode(ctx sdk.Context, p2pAddr stratos.SdsAddress // directly change oz limit while node being suspended if toBeSuspended { - effectiveStakeChange := sdk.ZeroInt().Sub(node.EffectiveTokens) + effectiveDepositChange := sdk.ZeroInt().Sub(node.EffectiveTokens) node.EffectiveTokens = sdk.ZeroInt() - k.registerKeeper.DecreaseOzoneLimitBySubtractDeposit(ctx, effectiveStakeChange.Abs()) + k.registerKeeper.DecreaseOzoneLimitBySubtractDeposit(ctx, effectiveDepositChange.Abs()) } k.registerKeeper.SetResourceNode(ctx, node) diff --git a/x/sds/app_test.go b/x/sds/app_test.go deleted file mode 100644 index e60343c9..00000000 --- a/x/sds/app_test.go +++ /dev/null @@ -1,552 +0,0 @@ -package sds - -// -//import ( -// "log" -// "math/rand" -// "os" -// "strconv" -// "testing" -// "time" -// -// sdk "github.com/cosmos/cosmos-sdk/types" -// "github.com/cosmos/cosmos-sdk/x/auth" -// "github.com/cosmos/cosmos-sdk/x/bank" -// "github.com/cosmos/cosmos-sdk/x/mock" -// "github.com/cosmos/cosmos-sdk/x/staking" -// "github.com/cosmos/cosmos-sdk/x/supply" -// supplyexported "github.com/cosmos/cosmos-sdk/x/supply/exported" -// stratos "github.com/stratosnet/stratos-chain/types" -// "github.com/stratosnet/stratos-chain/x/pot" -// pottypes "github.com/stratosnet/stratos-chain/x/pot/types" -// "github.com/stratosnet/stratos-chain/x/register" -// regtypes "github.com/stratosnet/stratos-chain/x/register/types" -// "github.com/stratosnet/stratos-chain/x/sds/types" -// "github.com/stretchr/testify/require" -// abci "github.com/tendermint/tendermint/abci/types" -// "github.com/tendermint/tendermint/crypto/ed25519" -//) -// -//var ( -// paramSpecificMinedReward = sdk.NewInt(160000000000) -// paramSpecificEpoch = sdk.NewInt(100) -// -// ppNodeOwner1 = sdk.AccAddress(ed25519.GenPrivKey().PubKey().Address()) -// ppNodeOwner2 = sdk.AccAddress(ed25519.GenPrivKey().PubKey().Address()) -// ppNodeOwner3 = sdk.AccAddress(ed25519.GenPrivKey().PubKey().Address()) -// ppNodeOwner4 = sdk.AccAddress(ed25519.GenPrivKey().PubKey().Address()) -// ppNodeOwnerNew = sdk.AccAddress(ed25519.GenPrivKey().PubKey().Address()) -// -// ppNodePubKey1 = ed25519.GenPrivKey().PubKey() -// ppNodeAddr1 = sdk.AccAddress(ppNodePubKey1.Address()) -// ppNodeNetworkId1 = stratos.SdsAddress(ppNodePubKey1.Address()) -// ppInitialStake1 = sdk.NewInt(100000000) -// -// ppNodePubKey2 = ed25519.GenPrivKey().PubKey() -// ppNodeAddr2 = sdk.AccAddress(ppNodePubKey2.Address()) -// ppNodeNetworkId2 = stratos.SdsAddress(ppNodePubKey2.Address()) -// ppInitialStake2 = sdk.NewInt(100000000) -// -// ppNodePubKey3 = ed25519.GenPrivKey().PubKey() -// ppNodeAddr3 = sdk.AccAddress(ppNodePubKey3.Address()) -// ppNodeNetworkId3 = stratos.SdsAddress(ppNodePubKey3.Address()) -// ppInitialStake3 = sdk.NewInt(100000000) -// -// ppNodePubKey4 = ed25519.GenPrivKey().PubKey() -// ppNodeAddr4 = sdk.AccAddress(ppNodePubKey4.Address()) -// ppNodeNetworkId4 = stratos.SdsAddress(ppNodePubKey4.Address()) -// ppInitialStake4 = sdk.NewInt(100000000) -// -// ppNodePubKeyNew = ed25519.GenPrivKey().PubKey() -// ppNodeAddrNew = sdk.AccAddress(ppNodePubKeyNew.Address()) -// ppNodeNetworkIdNew = stratos.SdsAddress(ppNodePubKeyNew.Address()) -// ppNodeStakeNew = sdk.NewInt(100000000) -//) -// -//func TestMain(m *testing.M) { -// config := stratos.GetConfig() -// config.Seal() -// exitVal := m.Run() -// os.Exit(exitVal) -//} -// -//func TestRandomPurchasedNoz(t *testing.T) { -// /********************* initialize mock app *********************/ -// -// mApp, k, _, registerKeeper, _ := getMockAppPrepay(t) -// accs := setupAccounts(mApp) -// mock.SetGenesis(mApp, accs) -// //mock.CheckBalance(t, mApp, foundationAccAddr, foundationDeposit) -// -// header := abci.Header{Height: mApp.LastBlockHeight() + 1} -// ctx := mApp.BaseApp.NewContext(true, header) -// -// initialStakeTotal := sdk.NewInt(43000000000000) -// registerKeeper.SetInitialGenesisDepositTotal(ctx, initialStakeTotal) -// -// // setup resource nodes -// time, _ := time.Parse(time.RubyDate, "Fri Sep 24 10:37:13 -0400 2021") -// -// resourceNodeStake := sdk.NewInt(19000000000000) -// resouceNodeTokens := make([]sdk.Int, 0) -// numNodes := 10 -// for i := 0; i < numNodes; i++ { -// resouceNodeTokens = append(resouceNodeTokens, resourceNodeStake) -// } -// -// log.Printf("Before: initial stake supply is %v \n\n", initialStakeTotal) -// initialNOzonePrice := registerKeeper.GetInitialNOzonePrice(ctx) -// log.Printf("Before: initial nozone price is %v \n\n", initialNOzonePrice) -// initOzoneLimit := initialStakeTotal.ToDec().Quo(initialNOzonePrice).TruncateInt() -// registerKeeper.SetRemainingOzoneLimit(ctx, initOzoneLimit) -// log.Printf("Before: remaining ozone limit is %v \n\n", registerKeeper.GetRemainingOzoneLimit(ctx)) -// for i, val := range resouceNodeTokens { -// tmpResourceNode := regtypes.NewResourceNode(ppNodeNetworkId1, ppNodePubKey1, ppNodeOwner1, regtypes.NewDescription("sds://resourceNode"+strconv.Itoa(i+1), "", "", "", ""), 4, time) -// tmpResourceNode.Tokens = val -// tmpResourceNode.Status = sdk.Bonded -// tmpResourceNode.OwnerAddress = accs[i%5].GetAddress() -// ozoneLimitChange, _ := registerKeeper.AddResourceNodeDeposit(ctx, tmpResourceNode, sdk.NewCoin("wei", val)) -// log.Printf("Add resourceNode #%v(stake=%v), ozone limit increases by %v, remaining ozone limit is %v", i, resourceNodeStake, ozoneLimitChange, registerKeeper.GetRemainingOzoneLimit(ctx)) -// // doPrepay -// randomPurchase := sdk.NewInt(int64(rand.Float64() * 100 * 1000000000)) -// purchased, _ := k.Prepay(ctx, accs[i%5].GetAddress(), sdk.NewCoins(sdk.NewCoin("wei", randomPurchase))) -// log.Printf("%v Noz purchased by %v wei, remaining ozone limit drops to %v", purchased, randomPurchase, registerKeeper.GetRemainingOzoneLimit(ctx)) -// } -//} -// -//func TestPurchasedNoz(t *testing.T) { -// /********************* initialize mock app *********************/ -// mApp, k, _, registerKeeper, _ := getMockAppPrepay(t) -// accs := setupAccounts(mApp) -// mock.SetGenesis(mApp, accs) -// //mock.CheckBalance(t, mApp, foundationAccAddr, foundationDeposit) -// -// header := abci.Header{Height: mApp.LastBlockHeight() + 1} -// ctx := mApp.BaseApp.NewContext(true, header) -// -// initialStakeTotal := sdk.NewInt(43000000000000) -// registerKeeper.SetInitialGenesisDepositTotal(ctx, initialStakeTotal) -// -// // setup resource nodes -// time, _ := time.Parse(time.RubyDate, "Fri Sep 24 10:37:13 -0400 2021") -// -// resourceNodeStake := sdk.NewInt(19000000000000) -// resouceNodeTokens := make([]sdk.Int, 0) -// numNodes := 10 -// for i := 0; i < numNodes; i++ { -// resouceNodeTokens = append(resouceNodeTokens, resourceNodeStake) -// } -// -// log.Printf("Before: initial stake supply is %v \n\n", initialStakeTotal) -// initialNOzonePrice := registerKeeper.GetInitialNOzonePrice(ctx) -// log.Printf("Before: initial nozone price is %v \n\n", initialNOzonePrice) -// initOzoneLimit := initialStakeTotal.ToDec().Quo(initialNOzonePrice).TruncateInt() -// registerKeeper.SetRemainingOzoneLimit(ctx, initOzoneLimit) -// log.Printf("Before: remaining ozone limit is %v \n\n", registerKeeper.GetRemainingOzoneLimit(ctx)) -// for i, val := range resouceNodeTokens { -// tmpResourceNode := regtypes.NewResourceNode(ppNodeNetworkId1, ppNodePubKey1, ppNodeOwner1, regtypes.NewDescription("sds://resourceNode"+strconv.Itoa(i+1), "", "", "", ""), 4, time) -// tmpResourceNode.Tokens = val -// tmpResourceNode.Status = sdk.Bonded -// tmpResourceNode.OwnerAddress = accs[i%5].GetAddress() -// ozoneLimitChange, _ := registerKeeper.AddResourceNodeDeposit(ctx, tmpResourceNode, sdk.NewCoin("wei", val)) -// log.Printf("Add resourceNode #%v(stake=%v), ozone limit increases by %v, remaining ozone limit is %v", i, resourceNodeStake, ozoneLimitChange, registerKeeper.GetRemainingOzoneLimit(ctx)) -// // doPrepay -// purchased, _ := k.Prepay(ctx, accs[i%5].GetAddress(), sdk.NewCoins(sdk.NewCoin("wei", sdk.NewInt(10000000000)))) -// log.Printf("%v Noz purchased by 10 stos, remaining ozone limit drops to %v", purchased, registerKeeper.GetRemainingOzoneLimit(ctx)) -// } -//} -// -//func TestOzoneLimitChange(t *testing.T) { -// /********************* initialize mock app *********************/ -// mApp, k, _, registerKeeper, _ := getMockApp(t) -// accs := setupAccounts(mApp) -// mock.SetGenesis(mApp, accs) -// -// header := abci.Header{Height: mApp.LastBlockHeight() + 1} -// ctx := mApp.BaseApp.NewContext(true, header) -// -// initialStakeTotal := sdk.NewInt(43000000000000) -// registerKeeper.SetInitialGenesisDepositTotal(ctx, initialStakeTotal) -// -// // setup resource nodes -// time, _ := time.Parse(time.RubyDate, "Fri Sep 24 10:37:13 -0400 2021") -// -// resourceNodeStake := sdk.NewInt(19000000000000) -// resouceNodeTokens := make([]sdk.Int, 0) -// numNodes := 10 -// for i := 0; i < numNodes; i++ { -// resouceNodeTokens = append(resouceNodeTokens, resourceNodeStake) -// } -// -// //init pp nodes. -// log.Printf("Before: initial stake supply is %v \n\n", initialStakeTotal) -// initialNOzonePrice := registerKeeper.GetInitialNOzonePrice(ctx) -// log.Printf("Before: initial nozone price is %v \n\n", initialNOzonePrice) -// //initOzoneLimit := initialStakeTotal.ToDec().Quo(initialNOzonePrice.ToDec()).TruncateInt() -// //registerKeeper.SetRemainingOzoneLimit(ctx, initOzoneLimit) -// log.Printf("Before: remaining ozone limit is %v \n\n", registerKeeper.GetRemainingOzoneLimit(ctx)) -// for i, val := range resouceNodeTokens { -// tmpResourceNode := regtypes.NewResourceNode(ppNodeNetworkId1, ppNodePubKey1, ppNodeOwner1, regtypes.NewDescription("sds://resourceNode"+strconv.Itoa(i+1), "", "", "", ""), 4, time) -// tmpResourceNode.Tokens = val -// tmpResourceNode.Status = sdk.Bonded -// tmpResourceNode.OwnerAddress = accs[i%5].GetAddress() -// ozoneLimitChange, _ := registerKeeper.AddResourceNodeDeposit(ctx, tmpResourceNode, sdk.NewCoin("wei", val)) -// log.Printf("Add resourceNode #%v(stake=%v), ozone limit increases by %v, remaining ozone limit is %v", i, resourceNodeStake, ozoneLimitChange, registerKeeper.GetRemainingOzoneLimit(ctx)) -// // doPrepay -// purchased, _ := k.Prepay(ctx, accs[i%5].GetAddress(), sdk.NewCoins(sdk.NewCoin("wei", sdk.NewInt(10000000000)))) -// log.Printf("%v noz purchased by 10 stos", purchased) -// } -//} -// -//func TestSdsMsgs(t *testing.T) { -// -// /********************* initialize mock app *********************/ -// mApp, keeper, _, _, _ := getMockApp(t) -// accs := setupAccounts(mApp) -// mock.SetGenesis(mApp, accs) -// //mock.CheckBalance(t, mApp, foundationAccAddr, foundationDeposit) -// -// ///********************* create fileUpload msg *********************/ -// log.Print("====== Testing MsgFileUpload ======") -// //fileHash, _ := hex.DecodeString(testFileHashHex) -// fileUploadMsg := types.NewMsgUpload(testFileHashHex, sdsAccAddr1, stratos.SdsAddress(spP2pAddr), sdsAccAddr2) -// headerUpload := abci.Header{Height: mApp.LastBlockHeight() + 1} -// mock.SignCheckDeliver(t, mApp.Cdc, mApp.BaseApp, headerUpload, []sdk.Msg{fileUploadMsg}, []uint64{18}, []uint64{0}, true, true, sdsAccPrivKey1) -// coin := sdk.NewCoin(DefaultDenom, spNodeInitialStakeIdx1) -// mock.CheckBalance(t, mApp, spNodeAddrIdx1, sdk.Coins{coin}) -// ///********************* create prepay msg *********************/ -// log.Print("====== Testing MsgPrepay ======") -// coinToPrepay := sdk.NewCoin(DefaultDenom, prepayAmt) -// prepayMsg := types.NewMsgPrepay(sdsAccAddr3, sdk.NewCoins(coinToPrepay)) -// headerPrepay := abci.Header{Height: mApp.LastBlockHeight() + 1} -// mock.SignCheckDeliver(t, mApp.Cdc, mApp.BaseApp, headerPrepay, []sdk.Msg{prepayMsg}, []uint64{20}, []uint64{0}, true, true, sdsAccPrivKey3) -// newBalanceInt := sdsAccBal3.Sub(prepayAmt) -// newBalanceCoin := sdk.NewCoin(DefaultDenom, newBalanceInt) -// mock.CheckBalance(t, mApp, sdsAccAddr3, sdk.NewCoins(newBalanceCoin)) -// -// ///********************* test nozPrice *********************/ -// header := abci.Header{Height: mApp.LastBlockHeight() + 1} -// ctx := mApp.BaseApp.NewContext(true, header) -// log.Print("====== Testing nozPrice ======\n\n") -// initS := sdk.NewInt(43000) -// initLt := sdk.NewInt(43000) -// initPt := sdk.NewCoin(keeper.BondDenom(ctx), sdk.ZeroInt()) -// -// keeper.registerKeeper.SetInitialGenesisDepositTotal(ctx, initS) -// keeper.registerKeeper.SetTotalUnissuedPrepay(ctx, initPt) -// keeper.registerKeeper.SetRemainingOzoneLimit(ctx, initLt) -// -// log.Printf("==== init stake total is %v", keeper.registerKeeper.GetInitialGenesisDepositTotal(ctx)) -// log.Printf("==== init prepay is %v", keeper.registerKeeper.GetTotalUnissuedPrepay(ctx)) -// log.Printf("==== ozone limit is %v\n\n", keeper.registerKeeper.GetRemainingOzoneLimit(ctx)) -// -// numPrepay := 5 -// prepaySeq := make([]sdk.Int, 0) -// for i := 0; i < numPrepay; i++ { -// prepaySeq = append(prepaySeq, sdk.NewInt(19000)) -// } -// -// for i, val := range prepaySeq { -// S := keeper.registerKeeper.GetInitialGenesisDepositTotal(ctx) -// Pt := keeper.registerKeeper.GetTotalUnissuedPrepay(ctx).Amount -// Lt := keeper.registerKeeper.GetRemainingOzoneLimit(ctx) -// -// nozPriceBefore := S.ToDec().Add(Pt.ToDec()).Quo(Lt.ToDec()).TruncateInt() -// -// nozPurchased := Lt.ToDec(). -// Mul(val.ToDec()). -// Quo((S. -// Add(Pt). -// Add(val)).ToDec()). -// TruncateInt() -// -// nozPriceAfter := S.ToDec().Add(Pt.ToDec()).Add(val.ToDec()).Quo(Lt.ToDec().Sub(nozPurchased.ToDec())).TruncateInt() -// -// Pt = Pt.Add(val) -// Lt = Lt.Sub(nozPurchased) -// keeper.registerKeeper.SetTotalUnissuedPrepay(ctx, sdk.NewCoin(keeper.BondDenom(ctx), Pt)) -// keeper.registerKeeper.SetRemainingOzoneLimit(ctx, Lt) -// log.Printf("---- prepay #%v: %v wei----", i, val) -// log.Printf("nozPriceBefore is %v", nozPriceBefore) -// log.Printf("nozPurchased is %v", nozPurchased) -// log.Printf("nozPriceAfter is %v", nozPriceAfter) -// log.Printf("New Pt is %v", Pt) -// log.Printf("New Lt is %v", Lt) -// log.Print("\n") -// } -//} -// -//func getMockApp(t *testing.T) (*mock.App, Keeper, bank.Keeper, register.Keeper, pot.Keeper) { -// mApp := mock.NewApp() -// -// RegisterCodec(mApp.Cdc) -// supply.RegisterCodec(mApp.Cdc) -// staking.RegisterCodec(mApp.Cdc) -// register.RegisterCodec(mApp.Cdc) -// pot.RegisterCodec(mApp.Cdc) -// -// //keyAcc := sdk.NewKVStoreKey(auth.StoreKey) -// keySupply := sdk.NewKVStoreKey(supply.StoreKey) -// keyStaking := sdk.NewKVStoreKey(staking.StoreKey) -// keyRegister := sdk.NewKVStoreKey(register.StoreKey) -// keyPot := sdk.NewKVStoreKey(pot.StoreKey) -// keySds := sdk.NewKVStoreKey(StoreKey) -// -// //db := dbm.NewMemDB() -// //ms := store.NewCommitMultiStore(db) -// // -// //ms.MountStoreWithDB(keyAcc, sdk.StoreTypeIAVL, db) -// //ms.MountStoreWithDB(keySupply, sdk.StoreTypeIAVL, db) -// //ms.MountStoreWithDB(keyStaking, sdk.StoreTypeIAVL, db) -// //ms.MountStoreWithDB(keyRegister, sdk.StoreTypeIAVL, db) -// //ms.MountStoreWithDB(keyPot, sdk.StoreTypeIAVL, db) -// //err := ms.LoadLatestVersion() -// //require.Nil(t, err) -// -// feeCollector := supply.NewEmptyModuleAccount(auth.FeeCollectorName) -// notBondedPool := supply.NewEmptyModuleAccount(staking.NotBondedPoolName, supply.Burner, supply.Staking) -// bondPool := supply.NewEmptyModuleAccount(staking.BondedPoolName, supply.Burner, supply.Staking) -// -// blacklistedAddrs := make(map[string]bool) -// blacklistedAddrs[feeCollector.GetAddress().String()] = true -// blacklistedAddrs[notBondedPool.GetAddress().String()] = true -// blacklistedAddrs[bondPool.GetAddress().String()] = true -// -// bankKeeper := bank.NewBaseKeeper(mApp.accountKeeper, mApp.ParamsKeeper.Subspace(bank.DefaultParamspace), blacklistedAddrs) -// maccPerms := map[string][]string{ -// auth.FeeCollectorName: {"fee_collector"}, -// staking.NotBondedPoolName: {supply.Burner, supply.Staking}, -// staking.BondedPoolName: {supply.Burner, supply.Staking}, -// } -// supplyKeeper := supply.NewKeeper(mApp.Cdc, keySupply, mApp.accountKeeper, bankKeeper, maccPerms) -// stakingKeeper := staking.NewKeeper(mApp.Cdc, keyStaking, supplyKeeper, mApp.ParamsKeeper.Subspace(staking.DefaultParamspace)) -// registerKeeper := register.NewKeeper(mApp.Cdc, keyRegister, mApp.ParamsKeeper.Subspace(register.DefaultParamSpace), mApp.accountKeeper, bankKeeper) -// potKeeper := pot.NewKeeper(mApp.Cdc, keyPot, mApp.ParamsKeeper.Subspace(pot.DefaultParamSpace), auth.FeeCollectorName, bankKeeper, supplyKeeper, mApp.accountKeeper, stakingKeeper, registerKeeper) -// keeper := NewKeeper(mApp.Cdc, keySds, mApp.ParamsKeeper.Subspace(DefaultParamSpace), bankKeeper, registerKeeper, potKeeper) -// -// mApp.Router().AddRoute(staking.RouterKey, staking.NewHandler(stakingKeeper)) -// mApp.Router().AddRoute(RouterKey, NewHandler(keeper)) -// mApp.SetEndBlocker(getEndBlocker(keeper)) -// mApp.SetInitChainer(getInitChainer(mApp, keeper, mApp.accountKeeper, supplyKeeper, -// []supplyexported.ModuleAccountI{feeCollector, notBondedPool, bondPool}, stakingKeeper, registerKeeper, potKeeper)) -// -// err := mApp.CompleteSetup(keySds, keyStaking, keySupply, keyRegister, keyPot) -// require.NoError(t, err) -// -// return mApp, keeper, bankKeeper, registerKeeper, potKeeper -//} -// -//func getMockAppPrepay(t *testing.T) (*mock.App, Keeper, bank.Keeper, register.Keeper, pot.Keeper) { -// mApp := mock.NewApp() -// -// RegisterCodec(mApp.Cdc) -// supply.RegisterCodec(mApp.Cdc) -// staking.RegisterCodec(mApp.Cdc) -// register.RegisterCodec(mApp.Cdc) -// pot.RegisterCodec(mApp.Cdc) -// -// //keyAcc := sdk.NewKVStoreKey(auth.StoreKey) -// keySupply := sdk.NewKVStoreKey(supply.StoreKey) -// keyStaking := sdk.NewKVStoreKey(staking.StoreKey) -// keyRegister := sdk.NewKVStoreKey(register.StoreKey) -// keyPot := sdk.NewKVStoreKey(pot.StoreKey) -// keySds := sdk.NewKVStoreKey(StoreKey) -// -// //db := dbm.NewMemDB() -// //ms := store.NewCommitMultiStore(db) -// // -// //ms.MountStoreWithDB(keyAcc, sdk.StoreTypeIAVL, db) -// //ms.MountStoreWithDB(keySupply, sdk.StoreTypeIAVL, db) -// //ms.MountStoreWithDB(keyStaking, sdk.StoreTypeIAVL, db) -// //ms.MountStoreWithDB(keyRegister, sdk.StoreTypeIAVL, db) -// //ms.MountStoreWithDB(keyPot, sdk.StoreTypeIAVL, db) -// //ms.MountStoreWithDB(keySds, sdk.StoreTypeIAVL, db) -// //err := ms.LoadLatestVersion() -// //require.Nil(t, err) -// -// //ctx := sdk.NewContext(ms, abci.Header{ChainID: "foochainid"}, false, tmtLog.NewNopLogger()) -// -// feeCollector := supply.NewEmptyModuleAccount(auth.FeeCollectorName) -// notBondedPool := supply.NewEmptyModuleAccount(staking.NotBondedPoolName, supply.Burner, supply.Staking) -// bondPool := supply.NewEmptyModuleAccount(staking.BondedPoolName, supply.Burner, supply.Staking) -// foundationAccount := supply.NewEmptyModuleAccount(pot.FoundationAccount) -// -// blacklistedAddrs := make(map[string]bool) -// blacklistedAddrs[feeCollector.GetAddress().String()] = true -// blacklistedAddrs[notBondedPool.GetAddress().String()] = true -// blacklistedAddrs[bondPool.GetAddress().String()] = true -// blacklistedAddrs[foundationAccount.GetAddress().String()] = true -// -// //accountKeeper := auth.NewAccountKeeper(mApp.Cdc, keyAcc, mApp.ParamsKeeper.Subspace(auth.DefaultParamspace), auth.ProtoBaseAccount) -// bankKeeper := bank.NewBaseKeeper(mApp.accountKeeper, mApp.ParamsKeeper.Subspace(bank.DefaultParamspace), blacklistedAddrs) -// maccPerms := map[string][]string{ -// auth.FeeCollectorName: {"fee_collector"}, -// staking.NotBondedPoolName: {supply.Burner, supply.Staking}, -// staking.BondedPoolName: {supply.Burner, supply.Staking}, -// } -// supplyKeeper := supply.NewKeeper(mApp.Cdc, keySupply, mApp.accountKeeper, bankKeeper, maccPerms) -// stakingKeeper := staking.NewKeeper(mApp.Cdc, keyStaking, supplyKeeper, mApp.ParamsKeeper.Subspace(staking.DefaultParamspace)) -// registerKeeper := register.NewKeeper(mApp.Cdc, keyRegister, mApp.ParamsKeeper.Subspace(register.DefaultParamSpace), mApp.accountKeeper, bankKeeper) -// potKeeper := pot.NewKeeper(mApp.Cdc, keyPot, mApp.ParamsKeeper.Subspace(pot.DefaultParamSpace), auth.FeeCollectorName, bankKeeper, supplyKeeper, mApp.accountKeeper, stakingKeeper, registerKeeper) -// -// keeper := NewKeeper(mApp.Cdc, keySds, mApp.ParamsKeeper.Subspace(DefaultParamSpace), bankKeeper, registerKeeper, potKeeper) -// -// mApp.Router().AddRoute(staking.RouterKey, staking.NewHandler(stakingKeeper)) -// mApp.Router().AddRoute(RouterKey, NewHandler(keeper)) -// mApp.SetEndBlocker(getEndBlocker(keeper)) -// mApp.SetInitChainer(getInitChainerTestPurchase(mApp, keeper, mApp.accountKeeper, supplyKeeper, -// []supplyexported.ModuleAccountI{feeCollector, notBondedPool, bondPool}, stakingKeeper, registerKeeper, potKeeper)) -// -// err := mApp.CompleteSetup(keySds, keyStaking, keySupply, keyRegister, keyPot) -// require.NoError(t, err) -// -// return mApp, keeper, bankKeeper, registerKeeper, potKeeper -//} -// -//// getInitChainer initializes the chainer of the mock app and sets the genesis -//// state. It returns an empty ResponseInitChain. -//func getInitChainer(mapp *mock.App, keeper Keeper, accountKeeper auth.accountKeeper, supplyKeeper supply.Keeper, -// blacklistedAddrs []supplyexported.ModuleAccountI, stakingKeeper staking.Keeper, registerKeeper register.Keeper, potKeeper pot.Keeper) sdk.InitChainer { -// return func(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain { -// // set module accounts -// for _, macc := range blacklistedAddrs { -// supplyKeeper.SetModuleAccount(ctx, macc) -// } -// -// mapp.InitChainer(ctx, req) -// -// resourceNodes := setupAllResourceNodes() -// indexingNodes := setupAllIndexingNodes() -// -// registerGenesis := register.NewGenesisState( -// register.DefaultParams(), -// resourceNodes, -// indexingNodes, -// initialNOzonePrice, -// sdk.ZeroInt(), -// make([]register.Slashing, 0), -// ) -// -// register.InitGenesis(ctx, registerKeeper, registerGenesis) -// -// // set module accounts -// for _, macc := range blacklistedAddrs { -// supplyKeeper.SetModuleAccount(ctx, macc) -// } -// -// stakingGenesis := staking.NewGenesisState(staking.NewParams(staking.DefaultUnbondingTime, staking.DefaultMaxValidators, staking.DefaultMaxEntries, 0, DefaultDenom), nil, nil) -// -// totalSupply := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(100000000000000))) -// supplyKeeper.SetSupply(ctx, supply.NewSupply(totalSupply)) -// -// // set module accounts -// for _, macc := range blacklistedAddrs { -// supplyKeeper.SetModuleAccount(ctx, macc) -// } -// -// validators := staking.InitGenesis(ctx, stakingKeeper, accountKeeper, supplyKeeper, stakingGenesis) -// -// //preset -// registerKeeper.SetRemainingOzoneLimit(ctx, remainingOzoneLimit) -// registerKeeper.SetTotalUnissuedPrepay(ctx, totalUnissuedPrepay) -// -// //pot genesis data load -// pot.InitGenesis(ctx, potKeeper, pot.NewGenesisState( -// pottypes.DefaultParams(), -// sdk.NewCoin(pottypes.DefaultRewardDenom, sdk.ZeroInt()), -// 0, -// make([]pottypes.ImmatureTotal, 0), -// make([]pottypes.MatureTotal, 0), -// make([]pottypes.Reward, 0), -// )) -// -// // init bank genesis -// keeper.bankKeeper.SetSendEnabled(ctx, true) -// -// InitGenesis(ctx, keeper, NewGenesisState(types.DefaultParams(), nil)) -// -// return abci.ResponseInitChain{ -// Validators: validators, -// } -// } -//} -// -//// getInitChainer initializes the chainer of the mock app and sets the genesis -//// state. It returns an empty ResponseInitChain. -//func getInitChainerTestPurchase(mapp *mock.App, keeper Keeper, accountKeeper auth.accountKeeper, supplyKeeper supply.Keeper, -// blacklistedAddrs []supplyexported.ModuleAccountI, stakingKeeper staking.Keeper, registerKeeper register.Keeper, potKeeper pot.Keeper) sdk.InitChainer { -// return func(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain { -// // set module accounts -// for _, macc := range blacklistedAddrs { -// supplyKeeper.SetModuleAccount(ctx, macc) -// } -// -// mapp.InitChainer(ctx, req) -// -// //resourceNodes := setupAllResourceNodes() -// indexingNodes := setupAllIndexingNodes() -// -// registerGenesis := register.NewGenesisState( -// register.DefaultParams(), -// nil, -// indexingNodes, -// initialNOzonePriceTestPurchase, -// sdk.ZeroInt(), -// make([]register.Slashing, 0), -// ) -// -// register.InitGenesis(ctx, registerKeeper, registerGenesis) -// -// // set module accounts -// for _, macc := range blacklistedAddrs { -// supplyKeeper.SetModuleAccount(ctx, macc) -// } -// -// stakingGenesis := staking.NewGenesisState(staking.NewParams(staking.DefaultUnbondingTime, staking.DefaultMaxValidators, staking.DefaultMaxEntries, 0, DefaultDenom), nil, nil) -// -// totalSupply := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(100000000000000))) -// supplyKeeper.SetSupply(ctx, supply.NewSupply(totalSupply)) -// -// // set module accounts -// for _, macc := range blacklistedAddrs { -// supplyKeeper.SetModuleAccount(ctx, macc) -// } -// -// validators := staking.InitGenesis(ctx, stakingKeeper, accountKeeper, supplyKeeper, stakingGenesis) -// -// //preset -// registerKeeper.SetRemainingOzoneLimit(ctx, remainingOzoneLimitTestPurchase) -// -// //pot genesis data load -// pot.InitGenesis(ctx, potKeeper, pot.NewGenesisState( -// pottypes.DefaultParams(), -// sdk.NewCoin(pottypes.DefaultRewardDenom, sdk.ZeroInt()), -// 0, -// make([]pottypes.ImmatureTotal, 0), -// make([]pottypes.MatureTotal, 0), -// make([]pottypes.Reward, 0), -// )) -// -// registerKeeper.SetTotalUnissuedPrepay(ctx, sdk.NewCoin(potKeeper.BondDenom(ctx), totalUnissuedPrepayTestPurchase)) -// // init bank genesis -// keeper.bankKeeper.SetSendEnabled(ctx, true) -// -// InitGenesis(ctx, keeper, NewGenesisState(types.DefaultParams(), nil)) -// -// return abci.ResponseInitChain{ -// Validators: validators, -// } -// } -//} -// -//// getEndBlocker returns a staking endblocker. -//func getEndBlocker(keeper Keeper) sdk.EndBlocker { -// return func(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock { -// validatorUpdates := keeper.potKeeper.stakingKeeper.BlockValidatorUpdates(ctx) -// -// return abci.ResponseEndBlock{ -// ValidatorUpdates: validatorUpdates, -// } -// } -// return nil -//} diff --git a/x/sds/sds_test.go b/x/sds/sds_test.go deleted file mode 100644 index a2b3f976..00000000 --- a/x/sds/sds_test.go +++ /dev/null @@ -1,336 +0,0 @@ -package sds - -// -//import ( -// "fmt" -// "time" -// -// sdk "github.com/cosmos/cosmos-sdk/types" -// "github.com/cosmos/cosmos-sdk/x/auth" -// authexported "github.com/cosmos/cosmos-sdk/x/auth/exported" -// "github.com/cosmos/cosmos-sdk/x/mock" -// stratos "github.com/stratosnet/stratos-chain/types" -// "github.com/stratosnet/stratos-chain/x/register" -// abci "github.com/tendermint/tendermint/abci/types" -// "github.com/tendermint/tendermint/crypto" -// "github.com/tendermint/tendermint/crypto/ed25519" -// "github.com/tendermint/tendermint/crypto/secp256k1" -//) -// -//const ( -// chainID = "" -// DefaultDenom = "wei" -// stos2wei = 1000000000 -//) -// -//var ( -// testFileHashHex = "c03661732294feb49caf6dc16c7cbb2534986d73" -// -// resourceNodeVolume1 = sdk.NewInt(500000000000) -// resourceNodeVolume2 = sdk.NewInt(300000000000) -// resourceNodeVolume3 = sdk.NewInt(200000000000) -// prepayAmt = sdk.NewInt(2 * stos2wei) -// -// depositForSendingTx, _ = sdk.NewIntFromString("100000000000000000000000000000") -// initialNOzonePrice = sdk.NewDec(1000000) // 0.001 gwei -> 1 noz -// totalUnissuedPrepayVal, _ = sdk.NewIntFromString("100000000000000000") -// totalUnissuedPrepay = sdk.NewCoin("wei", totalUnissuedPrepayVal) -// remainingOzoneLimit, _ = sdk.NewIntFromString("500000000000000000000") -// totalUnissuedPrepayTestPurchase, _ = sdk.NewIntFromString("0") -// remainingOzoneLimitTestPurchase, _ = sdk.NewIntFromString("100000000000") -// initialNOzonePriceTestPurchase = sdk.NewDecWithPrec(1000000, 9) // 0.001 wei -> 1 noz -// -// foundationDeposit = sdk.NewInt(40000000000000000) -// -// resOwnerPrivKey1 = secp256k1.GenPrivKey() -// resOwnerPrivKey2 = secp256k1.GenPrivKey() -// resOwnerPrivKey3 = secp256k1.GenPrivKey() -// resOwnerPrivKey4 = secp256k1.GenPrivKey() -// resOwnerPrivKey5 = secp256k1.GenPrivKey() -// idxOwnerPrivKey1 = secp256k1.GenPrivKey() -// idxOwnerPrivKey2 = secp256k1.GenPrivKey() -// idxOwnerPrivKey3 = secp256k1.GenPrivKey() -// -// resOwner1 = sdk.AccAddress(resOwnerPrivKey1.PubKey().Address()) -// resOwner2 = sdk.AccAddress(resOwnerPrivKey2.PubKey().Address()) -// resOwner3 = sdk.AccAddress(resOwnerPrivKey3.PubKey().Address()) -// resOwner4 = sdk.AccAddress(resOwnerPrivKey4.PubKey().Address()) -// resOwner5 = sdk.AccAddress(resOwnerPrivKey5.PubKey().Address()) -// idxOwner1 = sdk.AccAddress(idxOwnerPrivKey1.PubKey().Address()) -// idxOwner2 = sdk.AccAddress(idxOwnerPrivKey2.PubKey().Address()) -// idxOwner3 = sdk.AccAddress(idxOwnerPrivKey3.PubKey().Address()) -// -// pubKeyRes1 = secp256k1.GenPrivKey().PubKey() -// addrRes1 = sdk.AccAddress(pubKeyRes1.Address()) -// initialStakeRes1 = sdk.NewInt(3 * stos2wei) -// initialStakeRes1TestPurchase = sdk.NewInt(100000000000) -// -// pubKeyRes2 = secp256k1.GenPrivKey().PubKey() -// addrRes2 = sdk.AccAddress(pubKeyRes2.Address()) -// initialStakeRes2 = sdk.NewInt(3 * stos2wei) -// -// pubKeyRes3 = secp256k1.GenPrivKey().PubKey() -// addrRes3 = sdk.AccAddress(pubKeyRes3.Address()) -// initialStakeRes3 = sdk.NewInt(3 * stos2wei) -// -// pubKeyRes4 = secp256k1.GenPrivKey().PubKey() -// addrRes4 = sdk.AccAddress(pubKeyRes4.Address()) -// initialStakeRes4 = sdk.NewInt(3 * stos2wei) -// -// pubKeyRes5 = secp256k1.GenPrivKey().PubKey() -// addrRes5 = sdk.AccAddress(pubKeyRes5.Address()) -// initialStakeRes5 = sdk.NewInt(3 * stos2wei) -// -// privKeyIdx1 = ed25519.GenPrivKey() -// pubKeyIdx1 = privKeyIdx1.PubKey() -// addrIdx1 = stratos.SdsAddress(pubKeyIdx1.Address()) -// initialStakeIdx1 = sdk.NewInt(5 * stos2wei) -// initialStakeIdx1TestPurchase = sdk.NewInt(100 * stos2wei) -// -// pubKeyIdx2 = ed25519.GenPrivKey().PubKey() -// addrIdx2 = stratos.SdsAddress(pubKeyIdx2.Address()) -// initialStakeIdx2 = sdk.NewInt(5 * stos2wei) -// -// pubKeyIdx3 = ed25519.GenPrivKey().PubKey() -// addrIdx3 = stratos.SdsAddress(pubKeyIdx3.Address()) -// initialStakeIdx3 = sdk.NewInt(5 * stos2wei) -// -// valOpPrivKey1 = secp256k1.GenPrivKey() -// valOpPubKey1 = valOpPrivKey1.PubKey() -// valOpValAddr1 = sdk.ValAddress(valOpPubKey1.Address()) -// valOpAccAddr1 = sdk.AccAddress(valOpPubKey1.Address()) -// -// valConsPrivKey1 = secp256k1.GenPrivKey() -// valConsPubk1 = valConsPrivKey1.PubKey() -// valInitialStake = sdk.NewInt(15 * stos2wei) -// -// // accs for sds module -// sdsAccPrivKey1 = secp256k1.GenPrivKey() -// sdsAccPubKey1 = sdsAccPrivKey1.PubKey() -// sdsAccAddr1 = sdk.AccAddress(sdsAccPubKey1.Address()) -// sdsAccBal1 = sdk.NewInt(100 * stos2wei) -// initialStakeSdsIdx1 = sdk.NewInt(5 * stos2wei) -// -// sdsAccPrivKey2 = secp256k1.GenPrivKey() -// sdsAccPubKey2 = sdsAccPrivKey2.PubKey() -// sdsAccAddr2 = sdk.AccAddress(sdsAccPubKey2.Address()) -// sdsAccBal2 = sdk.NewInt(100 * stos2wei) -// -// sdsAccPrivKey3 = secp256k1.GenPrivKey() -// sdsAccPubKey3 = sdsAccPrivKey3.PubKey() -// sdsAccAddr3 = sdk.AccAddress(sdsAccPubKey3.Address()) -// sdsAccBal3 = sdk.NewInt(100 * stos2wei) -// -// // sp node used in sds module -// spNodePrivKeyIdx1 = secp256k1.GenPrivKey() -// spNodePubKeyIdx1 = spNodePrivKeyIdx1.PubKey() -// spNodeAddrIdx1 = sdk.AccAddress(spNodePubKeyIdx1.Address()) -// spNodeInitialStakeIdx1 = sdk.NewInt(5 * stos2wei) -// spP2pAddr = ed25519.GenPrivKey().PubKey().Address() -//) -// -//func setupAccounts(mApp *mock.App) []authexported.Account { -// -// str, _ := stratos.Bech32ifyPubKey(stratos.Bech32PubKeyTypeSdsP2PPub, sdsAccPubKey1) -// fmt.Println("sdsAccPubKey1=" + str) -// -// //************************** setup resource nodes owners' accounts ************************** -// resOwnerAcc1 := &auth.BaseAccount{ -// Address: resOwner1, -// Coins: sdk.Coins{sdk.NewCoin(DefaultDenom, sdk.NewInt(10000000000000000))}, -// } -// resOwnerAcc2 := &auth.BaseAccount{ -// Address: resOwner2, -// Coins: sdk.Coins{sdk.NewCoin(DefaultDenom, sdk.NewInt(10000000000000000))}, -// } -// resOwnerAcc3 := &auth.BaseAccount{ -// Address: resOwner3, -// Coins: sdk.Coins{sdk.NewCoin(DefaultDenom, sdk.NewInt(10000000000000000))}, -// } -// resOwnerAcc4 := &auth.BaseAccount{ -// Address: resOwner4, -// Coins: sdk.Coins{sdk.NewCoin(DefaultDenom, sdk.NewInt(10000000000000000))}, -// } -// resOwnerAcc5 := &auth.BaseAccount{ -// Address: resOwner5, -// Coins: sdk.Coins{sdk.NewCoin(DefaultDenom, sdk.NewInt(10000000000000000))}, -// } -// -// //************************** setup indexing nodes owners' accounts ************************** -// idxOwnerAcc1 := &auth.BaseAccount{ -// Address: idxOwner1, -// Coins: sdk.Coins{sdk.NewCoin(DefaultDenom, sdk.ZeroInt())}, -// } -// idxOwnerAcc2 := &auth.BaseAccount{ -// Address: idxOwner2, -// Coins: sdk.Coins{sdk.NewCoin(DefaultDenom, sdk.ZeroInt())}, -// } -// idxOwnerAcc3 := &auth.BaseAccount{ -// Address: idxOwner3, -// Coins: sdk.Coins{sdk.NewCoin(DefaultDenom, sdk.ZeroInt())}, -// } -// -// //************************** setup validator delegators' accounts ************************** -// valOwnerAcc1 := &auth.BaseAccount{ -// Address: valOpAccAddr1, -// Coins: sdk.Coins{sdk.NewCoin(DefaultDenom, valInitialStake)}, -// } -// -// //************************** setup resource nodes' accounts ************************** -// resNodeAcc1 := &auth.BaseAccount{ -// Address: addrRes1, -// Coins: sdk.Coins{sdk.NewCoin(DefaultDenom, initialStakeRes1)}, -// } -// resNodeAcc2 := &auth.BaseAccount{ -// Address: addrRes2, -// Coins: sdk.Coins{sdk.NewCoin(DefaultDenom, initialStakeRes2)}, -// } -// resNodeAcc3 := &auth.BaseAccount{ -// Address: addrRes3, -// Coins: sdk.Coins{sdk.NewCoin(DefaultDenom, initialStakeRes3)}, -// } -// resNodeAcc4 := &auth.BaseAccount{ -// Address: addrRes4, -// Coins: sdk.Coins{sdk.NewCoin(DefaultDenom, initialStakeRes4)}, -// } -// resNodeAcc5 := &auth.BaseAccount{ -// Address: addrRes5, -// Coins: sdk.Coins{sdk.NewCoin(DefaultDenom, initialStakeRes5)}, -// } -// -// //************************** setup indexing nodes' accounts ************************** -// idxNodeAcc1 := &auth.BaseAccount{ -// Address: idxOwner1, -// Coins: sdk.Coins{sdk.NewCoin(DefaultDenom, initialStakeIdx1.Add(depositForSendingTx))}, -// } -// idxNodeAcc2 := &auth.BaseAccount{ -// Address: idxOwner2, -// Coins: sdk.Coins{sdk.NewCoin(DefaultDenom, initialStakeIdx2)}, -// } -// idxNodeAcc3 := &auth.BaseAccount{ -// Address: idxOwner3, -// Coins: sdk.Coins{sdk.NewCoin(DefaultDenom, initialStakeIdx3)}, -// } -// spNodeIdxNodeAcc1 := &auth.BaseAccount{ -// Address: spNodeAddrIdx1, -// Coins: sdk.Coins{sdk.NewCoin(DefaultDenom, spNodeInitialStakeIdx1)}, -// } -// -// //************************** setup sds module's accounts ************************** -// sdsAcc1 := &auth.BaseAccount{ // sp node owner -// Address: sdsAccAddr1, -// Coins: sdk.Coins{sdk.NewCoin(DefaultDenom, sdsAccBal1)}, -// } -// sdsAcc2 := &auth.BaseAccount{ -// Address: sdsAccAddr2, -// Coins: sdk.Coins{sdk.NewCoin(DefaultDenom, sdsAccBal2)}, -// } -// sdsAcc3 := &auth.BaseAccount{ -// Address: sdsAccAddr3, -// Coins: sdk.Coins{sdk.NewCoin(DefaultDenom, sdsAccBal3)}, -// } -// -// // the sequence of the account list is related to the value of parameter "accNums" of mock.SignCheckDeliver() method -// accs := []authexported.Account{ -// resOwnerAcc1, resOwnerAcc2, resOwnerAcc3, resOwnerAcc4, resOwnerAcc5, -// idxOwnerAcc1, idxOwnerAcc2, idxOwnerAcc3, -// valOwnerAcc1, -// resNodeAcc1, resNodeAcc2, resNodeAcc3, resNodeAcc4, resNodeAcc5, -// idxNodeAcc1, idxNodeAcc2, idxNodeAcc3, spNodeIdxNodeAcc1, -// sdsAcc1, sdsAcc2, sdsAcc3, -// } -// -// ctx1 := mApp.BaseApp.NewContext(true, abci.Header{}) -// ctx1.Logger().Info("resNodeAcc1 -> " + resNodeAcc1.String()) -// ctx1.Logger().Info("resNodeAcc2 -> " + resNodeAcc2.String()) -// ctx1.Logger().Info("resNodeAcc3 -> " + resNodeAcc3.String()) -// ctx1.Logger().Info("resNodeAcc4 -> " + resNodeAcc4.String()) -// ctx1.Logger().Info("resNodeAcc5 -> " + resNodeAcc5.String()) -// ctx1.Logger().Info("idxNodeAcc1 -> " + idxNodeAcc1.String()) -// ctx1.Logger().Info("idxNodeAcc2 -> " + idxNodeAcc2.String()) -// ctx1.Logger().Info("idxNodeAcc3 -> " + idxNodeAcc3.String()) -// ctx1.Logger().Info("spNodeIdxNodeAcc1 -> " + spNodeIdxNodeAcc1.String()) -// //ctx1.Logger().Info("foundationAcc -> " + foundationAcc.String()) -// ctx1.Logger().Info("sdsAcc1 -> " + sdsAcc1.String()) -// ctx1.Logger().Info("sdsAcc2 -> " + sdsAcc2.String()) -// ctx1.Logger().Info("sdsAcc3 -> " + sdsAcc3.String()) -// -// return accs -//} -// -//func setupAllResourceNodes() []register.ResourceNode { -// time, _ := time.Parse(time.RubyDate, "Fri Sep 24 10:37:13 -0400 2021") -// resourceNode1 := register.NewResourceNode(stratos.SdsAddress(addrRes1), pubKeyRes1, resOwner1, register.NewDescription("sds://resourceNode1", "", "", "", ""), 4, time) -// resourceNode2 := register.NewResourceNode(stratos.SdsAddress(addrRes2), pubKeyRes2, resOwner2, register.NewDescription("sds://resourceNode2", "", "", "", ""), 4, time) -// resourceNode3 := register.NewResourceNode(stratos.SdsAddress(addrRes3), pubKeyRes3, resOwner3, register.NewDescription("sds://resourceNode3", "", "", "", ""), 4, time) -// resourceNode4 := register.NewResourceNode(stratos.SdsAddress(addrRes4), pubKeyRes4, resOwner4, register.NewDescription("sds://resourceNode4", "", "", "", ""), 4, time) -// resourceNode5 := register.NewResourceNode(stratos.SdsAddress(addrRes5), pubKeyRes5, resOwner5, register.NewDescription("sds://resourceNode5", "", "", "", ""), 4, time) -// -// resourceNode1 = resourceNode1.AddToken(initialStakeRes1) -// resourceNode2 = resourceNode2.AddToken(initialStakeRes2) -// resourceNode3 = resourceNode3.AddToken(initialStakeRes3) -// resourceNode4 = resourceNode4.AddToken(initialStakeRes4) -// resourceNode5 = resourceNode5.AddToken(initialStakeRes5) -// -// var resourceNodes []register.ResourceNode -// resourceNodes = append(resourceNodes, resourceNode1) -// resourceNodes = append(resourceNodes, resourceNode2) -// resourceNodes = append(resourceNodes, resourceNode3) -// resourceNodes = append(resourceNodes, resourceNode4) -// resourceNodes = append(resourceNodes, resourceNode5) -// return resourceNodes -//} -// -//func setupAllIndexingNodes() []register.IndexingNode { -// var indexingNodes []register.IndexingNode -// -// time, _ := time.Parse(time.RubyDate, "Fri Sep 24 10:37:13 -0400 2021") -// indexingNode1 := register.NewIndexingNode(stratos.SdsAddress(addrIdx1), pubKeyIdx1, idxOwner1, register.NewDescription("sds://indexingNode1", "", "", "", ""), time) -// indexingNode2 := register.NewIndexingNode(stratos.SdsAddress(addrIdx2), pubKeyIdx2, idxOwner2, register.NewDescription("sds://indexingNode2", "", "", "", ""), time) -// indexingNode3 := register.NewIndexingNode(stratos.SdsAddress(addrIdx2), pubKeyIdx3, idxOwner3, register.NewDescription("sds://indexingNode3", "", "", "", ""), time) -// spNodeIndexingNode1 := register.NewIndexingNode(stratos.SdsAddress(addrIdx2), spNodePubKeyIdx1, sdsAccAddr1, register.NewDescription("sds://sdsIndexingNode1", "", "", "", ""), time) -// -// indexingNode1 = indexingNode1.AddToken(initialStakeIdx1) -// indexingNode2 = indexingNode2.AddToken(initialStakeIdx2) -// indexingNode3 = indexingNode3.AddToken(initialStakeIdx3) -// spNodeIndexingNode1 = spNodeIndexingNode1.AddToken(spNodeInitialStakeIdx1) -// -// indexingNode1.Status = sdk.Bonded -// indexingNode2.Status = sdk.Bonded -// indexingNode3.Status = sdk.Bonded -// spNodeIndexingNode1.Status = sdk.Bonded -// -// indexingNodes = append(indexingNodes, indexingNode1) -// indexingNodes = append(indexingNodes, indexingNode2) -// indexingNodes = append(indexingNodes, indexingNode3) -// indexingNodes = append(indexingNodes, spNodeIndexingNode1) -// -// return indexingNodes -// -//} -// -//// GenTx generates a signed mock transaction. -//func GenTx(msgs []sdk.Msg, accnums []uint64, seq []uint64, priv ...crypto.PrivKey) auth.StdTx { -// // Make the transaction free -// fee := auth.StdFee{ -// Amount: sdk.NewCoins(sdk.NewInt64Coin("foocoin", 0)), -// Gas: 300000, -// } -// -// sigs := make([]auth.StdSignature, len(priv)) -// memo := "testmemotestmemo" -// -// for i, p := range priv { -// sig, err := p.Sign(auth.StdSignBytes(chainID, accnums[i], seq[i], fee, msgs, memo)) -// if err != nil { -// panic(err) -// } -// -// sigs[i] = auth.StdSignature{ -// PubKey: p.PubKey(), -// Signature: sig, -// } -// } -// -// return auth.NewStdTx(msgs, fee, sigs, memo) -//} From aba9bfba453fb3fc28bf1378f1b8c392e6b6e698 Mon Sep 17 00:00:00 2001 From: Xixiong Chen <60588630+Xiong-stratos@users.noreply.github.com> Date: Thu, 1 Jun 2023 17:50:28 -0400 Subject: [PATCH 81/95] Fix incorrect default value usage (#277) --- x/pot/genesis.go | 4 ++-- x/register/keeper/grpc_query.go | 2 ++ x/register/keeper/keeper.go | 2 +- x/register/keeper/meta_node.go | 4 ++-- x/register/keeper/querier.go | 4 ++++ x/register/keeper/resource_node.go | 4 ++-- x/register/types/querier.go | 14 ++++++++------ 7 files changed, 21 insertions(+), 13 deletions(-) diff --git a/x/pot/genesis.go b/x/pot/genesis.go index b8637c94..9826de97 100644 --- a/x/pot/genesis.go +++ b/x/pot/genesis.go @@ -56,8 +56,8 @@ func ExportGenesis(ctx sdk.Context, keeper keeper.Keeper) (data *types.GenesisSt immatureTotal := types.NewImmatureTotal(walletAddress, reward) immatureTotalInfo = append(immatureTotalInfo, immatureTotal) - miningReward := sdk.NewCoins(sdk.NewCoin(types.DefaultRewardDenom, reward.AmountOf(types.DefaultRewardDenom))) - trafficReward := sdk.NewCoins(sdk.NewCoin(types.DefaultBondDenom, reward.AmountOf(types.DefaultBondDenom))) + miningReward := sdk.NewCoins(sdk.NewCoin(keeper.RewardDenom(ctx), reward.AmountOf(keeper.RewardDenom(ctx)))) + trafficReward := sdk.NewCoins(sdk.NewCoin(keeper.BondDenom(ctx), reward.AmountOf(keeper.BondDenom(ctx)))) individualReward := types.NewReward(walletAddress, miningReward, trafficReward) individualRewardInfo = append(individualRewardInfo, individualReward) diff --git a/x/register/keeper/grpc_query.go b/x/register/keeper/grpc_query.go index 1e083967..9c7a73c4 100644 --- a/x/register/keeper/grpc_query.go +++ b/x/register/keeper/grpc_query.go @@ -121,6 +121,7 @@ func (q Querier) DepositByNode(c context.Context, req *types.QueryDepositByNodeR } if !metaNode.Equal(types.MetaNode{}) { depositInfo = types.NewDepositInfoByMetaNodeAddr( + q.BondDenom(ctx), metaNode, unBondingDeposit, unBondedDeposit, @@ -150,6 +151,7 @@ func (q Querier) DepositByNode(c context.Context, req *types.QueryDepositByNodeR } if !resourceNode.Equal(types.ResourceNode{}) { depositInfo = types.NewDepositInfoByResourceNodeAddr( + q.BondDenom(ctx), resourceNode, unBondingDeposit, unBondedDeposit, diff --git a/x/register/keeper/keeper.go b/x/register/keeper/keeper.go index 0df0267a..e4a9a0c7 100644 --- a/x/register/keeper/keeper.go +++ b/x/register/keeper/keeper.go @@ -83,7 +83,7 @@ func (k Keeper) GetTotalUnissuedPrepay(ctx sdk.Context) (totalUnissuedPrepay sdk if totalUnissuedPrepayAccAddr == nil { ctx.Logger().Error("account address for total unissued prepay does not exist.") return sdk.Coin{ - Denom: types.DefaultBondDenom, + Denom: k.BondDenom(ctx), Amount: sdk.ZeroInt(), } } diff --git a/x/register/keeper/meta_node.go b/x/register/keeper/meta_node.go index 8ee85da7..bb2c7879 100644 --- a/x/register/keeper/meta_node.go +++ b/x/register/keeper/meta_node.go @@ -516,7 +516,7 @@ func (k Keeper) GetMetaNodeBondedToken(ctx sdk.Context) (token sdk.Coin) { if metaNodeBondedAccAddr == nil { ctx.Logger().Error("account address for meta node bonded pool does not exist.") return sdk.Coin{ - Denom: types.DefaultBondDenom, + Denom: k.BondDenom(ctx), Amount: sdk.ZeroInt(), } } @@ -528,7 +528,7 @@ func (k Keeper) GetMetaNodeNotBondedToken(ctx sdk.Context) (token sdk.Coin) { if metaNodeNotBondedAccAddr == nil { ctx.Logger().Error("account address for meta node Not bonded pool does not exist.") return sdk.Coin{ - Denom: types.DefaultBondDenom, + Denom: k.BondDenom(ctx), Amount: sdk.ZeroInt(), } } diff --git a/x/register/keeper/querier.go b/x/register/keeper/querier.go index 1b727d59..5d5c99a8 100644 --- a/x/register/keeper/querier.go +++ b/x/register/keeper/querier.go @@ -201,6 +201,7 @@ func getDepositInfoByNodeAddr(ctx sdk.Context, req abci.RequestQuery, k Keeper, } if !metaNode.Equal(types.MetaNode{}) { depositInfo = types.NewDepositInfoByMetaNodeAddr( + k.BondDenom(ctx), metaNode, unBondingDeposit, unBondedDeposit, @@ -231,6 +232,7 @@ func getDepositInfoByNodeAddr(ctx sdk.Context, req abci.RequestQuery, k Keeper, } if !resourceNode.Equal(types.ResourceNode{}) { depositInfo = types.NewDepositInfoByResourceNodeAddr( + k.BondDenom(ctx), resourceNode, unBondingDeposit, unBondedDeposit, @@ -642,6 +644,7 @@ func GetDepositInfoByResourceNode(ctx sdk.Context, k Keeper, node types.Resource if !node.Equal(types.ResourceNode{}) { depositInfo = types.NewDepositInfoByResourceNodeAddr( + k.BondDenom(ctx), node, unBondingDeposit, unBondedDeposit, @@ -666,6 +669,7 @@ func GetDepositInfoByMetaNode(ctx sdk.Context, k Keeper, node types.MetaNode) (t if !node.Equal(types.MetaNode{}) { depositInfo = types.NewDepositInfoByMetaNodeAddr( + k.BondDenom(ctx), node, unBondingDeposit, unBondedDeposit, diff --git a/x/register/keeper/resource_node.go b/x/register/keeper/resource_node.go index 0738a6c8..e3775669 100644 --- a/x/register/keeper/resource_node.go +++ b/x/register/keeper/resource_node.go @@ -397,7 +397,7 @@ func (k Keeper) GetResourceNodeBondedToken(ctx sdk.Context) (token sdk.Coin) { if resourceNodeBondedAccAddr == nil { ctx.Logger().Error("account address for resource node bonded pool does not exist.") return sdk.Coin{ - Denom: types.DefaultBondDenom, + Denom: k.BondDenom(ctx), Amount: sdk.ZeroInt(), } } @@ -409,7 +409,7 @@ func (k Keeper) GetResourceNodeNotBondedToken(ctx sdk.Context) (token sdk.Coin) if resourceNodeNotBondedAccAddr == nil { ctx.Logger().Error("account address for resource node Not bonded pool does not exist.") return sdk.Coin{ - Denom: types.DefaultBondDenom, + Denom: k.BondDenom(ctx), Amount: sdk.ZeroInt(), } } diff --git a/x/register/types/querier.go b/x/register/types/querier.go index a53b9bd9..5758281c 100644 --- a/x/register/types/querier.go +++ b/x/register/types/querier.go @@ -68,15 +68,16 @@ func NewQueryDepositTotalInfo(bondDenom string, ResourceNodeTotalDeposit, MetaNo // NewDepositInfoByResourceNodeAddr creates a new instance of DepositInfoByNodeAddr func NewDepositInfoByResourceNodeAddr( + bondDenom string, resourceNode ResourceNode, unBondingDeposit sdk.Int, unBondedDeposit sdk.Int, bondedDeposit sdk.Int, ) DepositInfo { - bonedValue := sdk.NewCoin(DefaultBondDenom, bondedDeposit) - unBondedValue := sdk.NewCoin(DefaultBondDenom, unBondedDeposit) - unBondingValue := sdk.NewCoin(DefaultBondDenom, unBondingDeposit) + bonedValue := sdk.NewCoin(bondDenom, bondedDeposit) + unBondedValue := sdk.NewCoin(bondDenom, unBondedDeposit) + unBondingValue := sdk.NewCoin(bondDenom, unBondingDeposit) return DepositInfo{ NetworkAddress: resourceNode.GetNetworkAddress(), @@ -96,14 +97,15 @@ func NewDepositInfoByResourceNodeAddr( // NewDepositInfoByMetaNodeAddr creates a new instance of DepositInfoByNodeAddr func NewDepositInfoByMetaNodeAddr( + bondDenom string, metaNode MetaNode, unBondingDeposit sdk.Int, unBondedDeposit sdk.Int, bondedDeposit sdk.Int, ) DepositInfo { - bonedValue := sdk.NewCoin(DefaultBondDenom, bondedDeposit) - unBondedValue := sdk.NewCoin(DefaultBondDenom, unBondedDeposit) - unBondingValue := sdk.NewCoin(DefaultBondDenom, unBondingDeposit) + bonedValue := sdk.NewCoin(bondDenom, bondedDeposit) + unBondedValue := sdk.NewCoin(bondDenom, unBondedDeposit) + unBondingValue := sdk.NewCoin(bondDenom, unBondingDeposit) return DepositInfo{ NetworkAddress: metaNode.GetNetworkAddress(), Pubkey: metaNode.GetPubkey(), From cb038186f683a78d7afe9deeb2fe78616772f272 Mon Sep 17 00:00:00 2001 From: Xixiong Chen <60588630+Xiong-stratos@users.noreply.github.com> Date: Thu, 1 Jun 2023 17:55:22 -0400 Subject: [PATCH 82/95] remove resource/meta node cache to prevent concurrent issue. (#278) Co-authored-by: alexstratos <58865166+alexstratos@users.noreply.github.com> --- x/register/keeper/keeper.go | 9 ------- x/register/keeper/meta_node.go | 39 ------------------------------ x/register/keeper/resource_node.go | 39 ------------------------------ 3 files changed, 87 deletions(-) diff --git a/x/register/keeper/keeper.go b/x/register/keeper/keeper.go index e4a9a0c7..137c2b4a 100644 --- a/x/register/keeper/keeper.go +++ b/x/register/keeper/keeper.go @@ -1,7 +1,6 @@ package keeper import ( - "container/list" "errors" "fmt" "sync" @@ -28,10 +27,6 @@ type Keeper struct { bankKeeper types.BankKeeper distrKeeper types.DistrKeeper hooks types.RegisterHooks - resourceNodeCache map[string]cachedResourceNode - resourceNodeCacheList *list.List - metaNodeCache map[string]cachedMetaNode - metaNodeCacheList *list.List metaNodeBitMapIndexCache map[string]int metaNodeBitMapIndexCacheStatus types.CacheStatus cacheMutex sync.RWMutex @@ -49,10 +44,6 @@ func NewKeeper(cdc codec.Codec, key sdk.StoreKey, paramSpace paramtypes.Subspace bankKeeper: bankKeeper, distrKeeper: distrKeeper, hooks: nil, - resourceNodeCache: make(map[string]cachedResourceNode, resourceNodeCacheSize), - resourceNodeCacheList: list.New(), - metaNodeCache: make(map[string]cachedMetaNode, metaNodeCacheSize), - metaNodeCacheList: list.New(), metaNodeBitMapIndexCache: make(map[string]int), metaNodeBitMapIndexCacheStatus: types.CACHE_DIRTY, cacheMutex: sync.RWMutex{}, diff --git a/x/register/keeper/meta_node.go b/x/register/keeper/meta_node.go index bb2c7879..d2d7d9be 100644 --- a/x/register/keeper/meta_node.go +++ b/x/register/keeper/meta_node.go @@ -15,26 +15,6 @@ import ( "github.com/stratosnet/stratos-chain/x/register/types" ) -const ( - metaNodeCacheSize = 500 -) - -// Cache the proto decoding of meta nodes, as it can be the case that repeated slashing calls -// cause many calls to getMetaNode, which were shown to throttle the state machine in our -// simulation. Note this is quite biased though, as the simulator does more slashes than a -// live chain should, however we require the slashing to be fast as no one pays gas for it. -type cachedMetaNode struct { - metaNode types.MetaNode - marshalled string // marshalled proto bytes for the MetaNode object (not address) -} - -func newCachedMetaNode(metaNode types.MetaNode, marshalled string) cachedMetaNode { - return cachedMetaNode{ - metaNode: metaNode, - marshalled: marshalled, - } -} - // getMetaNode get a single meta node func (k Keeper) GetMetaNode(ctx sdk.Context, p2pAddress stratos.SdsAddress) (metaNode types.MetaNode, found bool) { store := ctx.KVStore(k.storeKey) @@ -42,25 +22,6 @@ func (k Keeper) GetMetaNode(ctx sdk.Context, p2pAddress stratos.SdsAddress) (met if value == nil { return metaNode, false } - - // If these proto encoded bytes are in the cache, return the cached meta node - strValue := string(value) - if val, ok := k.metaNodeCache[strValue]; ok { - valToReturn := val.metaNode - return valToReturn, true - } - - // proto bytes weren't found in cache, so unmarshal and add it to the cache - metaNode = types.MustUnmarshalMetaNode(k.cdc, value) - cachedVal := newCachedMetaNode(metaNode, strValue) - k.metaNodeCache[strValue] = newCachedMetaNode(metaNode, strValue) - k.metaNodeCacheList.PushBack(cachedVal) - - // if the cache is too big, pop off the last element from it - if k.metaNodeCacheList.Len() > metaNodeCacheSize { - valToRemove := k.metaNodeCacheList.Remove(k.metaNodeCacheList.Front()).(cachedMetaNode) - delete(k.metaNodeCache, valToRemove.marshalled) - } metaNode = types.MustUnmarshalMetaNode(k.cdc, value) return metaNode, true } diff --git a/x/register/keeper/resource_node.go b/x/register/keeper/resource_node.go index e3775669..39405cf1 100644 --- a/x/register/keeper/resource_node.go +++ b/x/register/keeper/resource_node.go @@ -11,52 +11,13 @@ import ( "github.com/stratosnet/stratos-chain/x/register/types" ) -const resourceNodeCacheSize = 500 - -// Cache the proto decoding of resource nodes, as it can be the case that repeated slashing calls -// cause many calls to GetResourceNode, which were shown to throttle the state machine in our -// simulation. Note this is quite biased though, as the simulator does more slashes than a -// live chain should, however we require the slashing to be fast as no one pays gas for it. -type cachedResourceNode struct { - resourceNode types.ResourceNode - marshalled string // marshalled proto bytes for the ResourceNode object (not address) -} - -func newCachedResourceNode(resourceNode types.ResourceNode, marshalled string) cachedResourceNode { - return cachedResourceNode{ - resourceNode: resourceNode, - marshalled: marshalled, - } -} - // GetResourceNode get a single resource node func (k Keeper) GetResourceNode(ctx sdk.Context, p2pAddress stratos.SdsAddress) (resourceNode types.ResourceNode, found bool) { store := ctx.KVStore(k.storeKey) value := store.Get(types.GetResourceNodeKey(p2pAddress)) - if value == nil { return resourceNode, false } - - // If these proto encoded bytes are in the cache, return the cached resource node - strValue := string(value) - if val, ok := k.resourceNodeCache[strValue]; ok { - valToReturn := val.resourceNode - return valToReturn, true - } - - // proto bytes weren't found in cache, so proto unmarshal and add it to the cache - resourceNode = types.MustUnmarshalResourceNode(k.cdc, value) - cachedVal := newCachedResourceNode(resourceNode, strValue) - k.resourceNodeCache[strValue] = newCachedResourceNode(resourceNode, strValue) - k.resourceNodeCacheList.PushBack(cachedVal) - - // if the cache is too big, pop off the last element from it - if k.resourceNodeCacheList.Len() > resourceNodeCacheSize { - valToRemove := k.resourceNodeCacheList.Remove(k.resourceNodeCacheList.Front()).(cachedResourceNode) - delete(k.resourceNodeCache, valToRemove.marshalled) - } - resourceNode = types.MustUnmarshalResourceNode(k.cdc, value) return resourceNode, true } From b05d09e8fc7e45e36fa7340d25561d57610e3fa5 Mon Sep 17 00:00:00 2001 From: BoThe1K <121880388+BoThe1K@users.noreply.github.com> Date: Fri, 2 Jun 2023 16:29:23 +0200 Subject: [PATCH 83/95] Qb 1816 - implement proxy, add prepay (#265) * First test * Update with working test deploy * Add cli * Add genesis deployments * Update proxy owner * Add VM intrpreter * Add PREPAY opcode and test impl * Updat before state change checks * First state machine dsign * Add prpay with new keeper statedb * Rm revert from func * Refactor + some add hoc test + keeper mrge * Update test * Fix keeper issue * Rm comment, change gas for prepay fn --- .gitignore | 1 + app/ante/eth.go | 3 +- app/ante/interfaces.go | 2 +- app/app.go | 18 +- core/statedb/journal.go | 133 + core/statedb/state_object.go | 94 + core/statedb/statedb.go | 165 + core/statedb/types.go | 59 + go.mod | 5 +- go.sum | 7 +- package.json | 19 + packages/gov/.eslintignore | 4 + packages/gov/.eslintrc.js | 24 + packages/gov/.gitignore | 11 + packages/gov/.npmignore | 3 + packages/gov/.prettierignore | 5 + packages/gov/.solhint.json | 15 + packages/gov/README.md | 14 + packages/gov/contracts/Prepay.sol | 48 + .../gov/contracts/mock/PrepayMockOverride.sol | 46 + packages/gov/contracts/versions/Version0.sol | 11 + packages/gov/contracts/versions/Version1.sol | 11 + packages/gov/hardhat.config.ts | 41 + packages/gov/package.json | 42 + packages/gov/test/Prepay.test.ts | 38 + packages/gov/tsconfig.json | 11 + packages/tsconfig.package.json | 38 + proto/stratos/evm/v1/evm.proto | 26 + proto/stratos/evm/v1/proposal.proto | 21 + rpc/namespaces/ethereum/debug/api.go | 15 +- rpc/namespaces/ethereum/eth/api.go | 2 +- types/config.go | 3 +- x/evm/client/cli/tx.go | 99 + x/evm/client/proposal_handler.go | 25 + x/evm/keeper/abci.go | 11 + x/evm/keeper/grpc_query.go | 20 +- x/evm/keeper/keeper.go | 61 +- x/evm/keeper/proposal.go | 305 + x/evm/keeper/state_transition.go | 77 +- x/evm/keeper/store.go | 42 + x/evm/proposal_handler.go | 28 + x/evm/simulation/genesis.go | 4 +- x/evm/statedb/statedb.go | 36 +- x/evm/tracers/js/goja.go | 8 +- x/evm/tracers/logger/access_list_tracer.go | 184 + x/evm/tracers/logger/gen_structlog.go | 110 + x/evm/tracers/logger/logger.go | 464 + x/evm/tracers/logger/logger_json.go | 104 + x/evm/tracers/native/4byte.go | 21 +- x/evm/tracers/native/call.go | 4 +- x/evm/tracers/native/noop.go | 4 +- x/evm/tracers/native/prestate.go | 4 +- x/evm/tracers/native/revertreason.go | 4 +- x/evm/tracers/native/tracer.go | 10 +- x/evm/{types/tracer.go => tracers/tracers.go} | 82 +- x/evm/types/codec.go | 12 + x/evm/types/contracts.go | 23 + x/evm/types/evm.pb.go | 1011 ++- x/evm/types/interfaces.go | 14 +- x/evm/types/params.go | 107 +- x/evm/types/proposal.go | 79 + x/evm/types/proposal.pb.go | 487 ++ x/evm/vm/analysis.go | 118 + x/evm/vm/common.go | 82 + x/evm/vm/contract.go | 194 + x/evm/vm/contracts.go | 1043 +++ x/evm/vm/doc.go | 24 + x/evm/vm/eips.go | 194 + x/evm/vm/errors.go | 72 + x/evm/vm/evm.go | 630 ++ x/evm/vm/gas.go | 59 + x/evm/vm/gas_table.go | 458 + x/evm/vm/instructions.go | 1017 +++ x/evm/vm/interface.go | 106 + x/evm/vm/interpreter.go | 258 + x/evm/vm/jump_table.go | 1062 +++ x/evm/vm/keeper_amplifier.go | 28 + x/evm/vm/logger.go | 44 + x/evm/vm/memory.go | 105 + x/evm/vm/memory_table.go | 128 + x/evm/vm/opcodes.go | 562 ++ x/evm/vm/operations_acl.go | 244 + x/evm/vm/stack.go | 82 + x/evm/vm/stack_table.go | 42 + x/evm/vm/verifier.go | 39 + x/register/keeper/store.go | 20 + x/register/keeper/store_new.go | 35 + x/sds/keeper/keeper.go | 23 +- yarn.lock | 7594 +++++++++++++++++ 89 files changed, 18415 insertions(+), 223 deletions(-) create mode 100644 core/statedb/journal.go create mode 100644 core/statedb/state_object.go create mode 100644 core/statedb/statedb.go create mode 100644 core/statedb/types.go create mode 100644 package.json create mode 100644 packages/gov/.eslintignore create mode 100644 packages/gov/.eslintrc.js create mode 100644 packages/gov/.gitignore create mode 100644 packages/gov/.npmignore create mode 100644 packages/gov/.prettierignore create mode 100644 packages/gov/.solhint.json create mode 100644 packages/gov/README.md create mode 100644 packages/gov/contracts/Prepay.sol create mode 100644 packages/gov/contracts/mock/PrepayMockOverride.sol create mode 100644 packages/gov/contracts/versions/Version0.sol create mode 100644 packages/gov/contracts/versions/Version1.sol create mode 100644 packages/gov/hardhat.config.ts create mode 100644 packages/gov/package.json create mode 100644 packages/gov/test/Prepay.test.ts create mode 100644 packages/gov/tsconfig.json create mode 100644 packages/tsconfig.package.json create mode 100644 proto/stratos/evm/v1/proposal.proto create mode 100644 x/evm/client/proposal_handler.go create mode 100644 x/evm/keeper/proposal.go create mode 100644 x/evm/keeper/store.go create mode 100644 x/evm/proposal_handler.go create mode 100644 x/evm/tracers/logger/access_list_tracer.go create mode 100644 x/evm/tracers/logger/gen_structlog.go create mode 100644 x/evm/tracers/logger/logger.go create mode 100644 x/evm/tracers/logger/logger_json.go rename x/evm/{types/tracer.go => tracers/tracers.go} (64%) create mode 100644 x/evm/types/contracts.go create mode 100644 x/evm/types/proposal.go create mode 100644 x/evm/types/proposal.pb.go create mode 100644 x/evm/vm/analysis.go create mode 100644 x/evm/vm/common.go create mode 100644 x/evm/vm/contract.go create mode 100644 x/evm/vm/contracts.go create mode 100644 x/evm/vm/doc.go create mode 100644 x/evm/vm/eips.go create mode 100644 x/evm/vm/errors.go create mode 100644 x/evm/vm/evm.go create mode 100644 x/evm/vm/gas.go create mode 100644 x/evm/vm/gas_table.go create mode 100644 x/evm/vm/instructions.go create mode 100644 x/evm/vm/interface.go create mode 100644 x/evm/vm/interpreter.go create mode 100644 x/evm/vm/jump_table.go create mode 100644 x/evm/vm/keeper_amplifier.go create mode 100644 x/evm/vm/logger.go create mode 100644 x/evm/vm/memory.go create mode 100644 x/evm/vm/memory_table.go create mode 100644 x/evm/vm/opcodes.go create mode 100644 x/evm/vm/operations_acl.go create mode 100644 x/evm/vm/stack.go create mode 100644 x/evm/vm/stack_table.go create mode 100644 x/evm/vm/verifier.go create mode 100644 x/register/keeper/store_new.go create mode 100644 yarn.lock diff --git a/.gitignore b/.gitignore index 62dfce57..2693ff77 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ playground.go /tmp-swagger-gen/ /github.com/ .DS_Store +node_modules/ diff --git a/app/ante/eth.go b/app/ante/eth.go index 71add19b..45ac713b 100644 --- a/app/ante/eth.go +++ b/app/ante/eth.go @@ -14,6 +14,7 @@ import ( stratos "github.com/stratosnet/stratos-chain/types" evmkeeper "github.com/stratosnet/stratos-chain/x/evm/keeper" "github.com/stratosnet/stratos-chain/x/evm/statedb" + "github.com/stratosnet/stratos-chain/x/evm/tracers" evmtypes "github.com/stratosnet/stratos-chain/x/evm/types" ) @@ -312,7 +313,7 @@ func (ctd CanTransferDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate BaseFee: baseFee, } stateDB := statedb.New(ctx, ctd.evmKeeper, statedb.NewEmptyTxConfig(common.BytesToHash(ctx.HeaderHash().Bytes()))) - evm := ctd.evmKeeper.NewEVM(ctx, coreMsg, cfg, evmtypes.NewNoOpTracer(), stateDB) + evm := ctd.evmKeeper.NewEVM(ctx, coreMsg, cfg, tracers.NewNoOpTracer(), stateDB) // check that caller has enough balance to cover asset transfer for **topmost** call // NOTE: here the gas consumed is from the context with the infinite gas meter diff --git a/app/ante/interfaces.go b/app/ante/interfaces.go index 89369928..b11dda54 100644 --- a/app/ante/interfaces.go +++ b/app/ante/interfaces.go @@ -9,11 +9,11 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core" - "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/params" "github.com/stratosnet/stratos-chain/x/evm/statedb" evmtypes "github.com/stratosnet/stratos-chain/x/evm/types" + "github.com/stratosnet/stratos-chain/x/evm/vm" ) // AccountKeeper defines the contract needed for AccountKeeper related APIs. diff --git a/app/app.go b/app/app.go index 29c301b2..a107735a 100644 --- a/app/app.go +++ b/app/app.go @@ -96,6 +96,7 @@ import ( srvflags "github.com/stratosnet/stratos-chain/server/flags" stratos "github.com/stratosnet/stratos-chain/types" "github.com/stratosnet/stratos-chain/x/evm" + evmclient "github.com/stratosnet/stratos-chain/x/evm/client" evmrest "github.com/stratosnet/stratos-chain/x/evm/client/rest" evmkeeper "github.com/stratosnet/stratos-chain/x/evm/keeper" evmtypes "github.com/stratosnet/stratos-chain/x/evm/types" @@ -136,6 +137,7 @@ var ( upgradeclient.CancelProposalHandler, ibcclientclient.UpdateClientProposalHandler, ibcclientclient.UpgradeProposalHandler, + evmclient.EVMChangeProxyImplementationHandler, ), params.AppModuleBasic{}, crisis.AppModuleBasic{}, @@ -187,8 +189,9 @@ var ( // module accounts that are allowed to receive tokens allowedReceivingModAcc = map[string]bool{ - distrtypes.ModuleName: true, - authtypes.FeeCollectorName: true, + distrtypes.ModuleName: true, + authtypes.FeeCollectorName: true, + registertypes.TotalUnissuedPrepay: true, //pot.FoundationAccount: true, } ) @@ -357,8 +360,7 @@ func NewInitApp( tracer := cast.ToString(appOpts.Get(srvflags.EVMTracer)) app.evmKeeper = evmkeeper.NewKeeper( appCodec, keys[evmtypes.StoreKey], tKeys[evmtypes.TransientKey], app.GetSubspace(evmtypes.ModuleName), - app.accountKeeper, app.bankKeeper, app.stakingKeeper, - tracer, + app.accountKeeper, app.bankKeeper, app.stakingKeeper, nil, tracer, ) // Create IBC Keeper @@ -371,7 +373,8 @@ func NewInitApp( AddRoute(paramproposal.RouterKey, params.NewParamChangeProposalHandler(app.paramsKeeper)). AddRoute(distrtypes.RouterKey, distr.NewCommunityPoolSpendProposalHandler(app.distrKeeper)). AddRoute(upgradetypes.RouterKey, upgrade.NewSoftwareUpgradeProposalHandler(app.upgradeKeeper)). - AddRoute(ibchost.RouterKey, ibcclient.NewClientProposalHandler(app.ibcKeeper.ClientKeeper)) + AddRoute(ibchost.RouterKey, ibcclient.NewClientProposalHandler(app.ibcKeeper.ClientKeeper)). + AddRoute(evmtypes.RouterKey, evm.NewEVMChangeProposalHandler(app.evmKeeper)) govKeeper := govkeeper.NewKeeper( appCodec, keys[govtypes.StoreKey], app.GetSubspace(govtypes.ModuleName), app.accountKeeper, app.bankKeeper, @@ -437,6 +440,11 @@ func NewInitApp( app.potKeeper, ) + // required because of weird order( + // possible solution is to make all keepers as pointers, hovewer this could break something + app.evmKeeper.SetRegisterKeeper(&app.registerKeeper) + app.evmKeeper.SetSdsKeeper(&app.sdsKeeper) + /**** Module Options ****/ // NOTE: we may consider parsing `appOpts` inside module constructors. For the moment diff --git a/core/statedb/journal.go b/core/statedb/journal.go new file mode 100644 index 00000000..d55b748e --- /dev/null +++ b/core/statedb/journal.go @@ -0,0 +1,133 @@ +package statedb + +import ( + "bytes" + "sort" + + sdk "github.com/cosmos/cosmos-sdk/types" +) + +type dirtyObj struct { + storeKey sdk.StoreKey + key StorageKey +} + +func (do *dirtyObj) ObjKey() []byte { + return append([]byte(do.storeKey.Name()), do.key[:]...) +} + +// journalEntry is a modification entry in the state change journal that can be +// reverted on demand. +type journalEntry interface { + // revert undoes the changes introduced by this journal entry. + revert(*KeestateDB) + + // dirtied returns the key modified by this journal entry. + dirtied() *dirtyObj +} + +// journal contains the list of state modifications applied since the last state +// commit. These are tracked to be able to be reverted in the case of an execution +// exception or request for reversal. +type journal struct { + entries []journalEntry // Current changes tracked by the journal + dirties map[sdk.StoreKey]map[StorageKey]int // Dirty accounts and the number of changes +} + +// newJournal creates a new initialized journal. +func newJournal() *journal { + return &journal{ + dirties: make(map[sdk.StoreKey]map[StorageKey]int), + } +} + +// sortedDirties sort the dirty addresses for deterministic iteration +func (j *journal) sortedDirties() []*dirtyObj { + keys := make([]*dirtyObj, 0) + t := 0 + for i := range j.dirties { + for k := range j.dirties[i] { + keys = append(keys, &dirtyObj{ + storeKey: i, + key: k, + }) + t++ + } + } + sort.Slice(keys, func(i, j int) bool { + return bytes.Compare(keys[i].ObjKey(), keys[j].ObjKey()) < 0 + }) + return keys +} + +// append inserts a new modification entry to the end of the change journal. +func (j *journal) append(entry journalEntry) { + j.entries = append(j.entries, entry) + if dirty := entry.dirtied(); dirty != nil { + if _, ok := j.dirties[dirty.storeKey]; !ok { + j.dirties[dirty.storeKey] = make(map[StorageKey]int) + } + j.dirties[dirty.storeKey][dirty.key]++ + } +} + +// revert undoes a batch of journalled modifications along with any reverted +// dirty handling too. +func (j *journal) revert(statedb *KeestateDB, snapshot int) { + for i := len(j.entries) - 1; i >= snapshot; i-- { + // Undo the changes made by the operation + j.entries[i].revert(statedb) + + // Drop any dirty tracking induced by the change + if dirty := j.entries[i].dirtied(); dirty != nil { + if j.dirties[dirty.storeKey][dirty.key]--; j.dirties[dirty.storeKey][dirty.key] == 0 { + delete(j.dirties[dirty.storeKey], dirty.key) + } + } + } + j.entries = j.entries[:snapshot] +} + +// length returns the current number of entries in the journal. +func (j *journal) length() int { + return len(j.entries) +} + +type ( + storageChange struct { + storeKey sdk.StoreKey + key StorageKey + prevalue StorageValue + } + createObjectChange struct { + storeKey sdk.StoreKey + key StorageKey + } + resetObjectChange struct { + prev *stateObject + } +) + +func (ch storageChange) revert(s *KeestateDB) { + s.getStateObject(ch.storeKey, []byte(ch.key)).SetState(ch.prevalue.Result()) +} + +func (ch storageChange) dirtied() *dirtyObj { + return &dirtyObj{storeKey: ch.storeKey, key: ch.key} +} + +func (ch createObjectChange) revert(s *KeestateDB) { + delete(s.stateObjects[ch.storeKey], ch.key) +} + +func (ch createObjectChange) dirtied() *dirtyObj { + return &dirtyObj{storeKey: ch.storeKey, key: ch.key} +} + +func (ch resetObjectChange) revert(s *KeestateDB) { + s.setStateObject(ch.prev) +} + +func (ch resetObjectChange) dirtied() *dirtyObj { + return nil +} diff --git a/core/statedb/state_object.go b/core/statedb/state_object.go new file mode 100644 index 00000000..2075a779 --- /dev/null +++ b/core/statedb/state_object.go @@ -0,0 +1,94 @@ +package statedb + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" +) + +// stateObject is the state of an acount +type stateObject struct { + ctx sdk.Context + db *KeestateDB + + storeKey sdk.StoreKey + key StorageKey + value StorageValue + + // state storage + originStorage Storage + dirtyStorage Storage +} + +// newObject creates a state object. +func newObject(db *KeestateDB, storeKey sdk.StoreKey, key StorageKey) *stateObject { + so := &stateObject{ + ctx: db.ctx, + db: db, + storeKey: storeKey, + key: key, + originStorage: make(Storage), + dirtyStorage: make(Storage), + } + if value := so.read(); value.Result() != nil { + so.value = value + } + return so +} + +func (s stateObject) read() StorageValue { + value := s.ctx.KVStore(s.storeKey).Get([]byte(s.key)) + if value != nil { + return NewStorageValue(value) + } + return StorageValue{} +} + +func (s stateObject) store(value StorageValue) { + store := s.ctx.KVStore(s.storeKey) + if value.IsNil() { + store.Delete([]byte(s.key)) + } else { + store.Set([]byte(s.key), value.Result()) + } +} + +// GetCommittedState query the committed state +func (s *stateObject) GetCommittedState() StorageValue { + if value, cached := s.originStorage[s.key]; cached { + return value + } + // If no live objects are available, load it from indexdb + value := s.read() + if value.IsNil() { + return StorageValue{} + } + s.originStorage[s.key] = value + return value +} + +// GetState query the current state (including dirty state) +func (s *stateObject) GetState() StorageValue { + if value, dirty := s.dirtyStorage[s.key]; dirty { + return value + } + return s.GetCommittedState() +} + +// SetState sets the contract state +func (s *stateObject) SetState(value []byte) { + // If the new value is the same as old, don't set + prev := s.GetState() + if prev.Eq(value) { + return + } + // New value is different, update and journal the change + s.db.journal.append(storageChange{ + storeKey: s.storeKey, + key: s.key, + prevalue: prev, + }) + s.setState(value) +} + +func (s *stateObject) setState(value []byte) { + s.dirtyStorage[s.key] = NewStorageValue(value) +} diff --git a/core/statedb/statedb.go b/core/statedb/statedb.go new file mode 100644 index 00000000..1f4c6fe9 --- /dev/null +++ b/core/statedb/statedb.go @@ -0,0 +1,165 @@ +package statedb + +import ( + "fmt" + "sort" + + sdk "github.com/cosmos/cosmos-sdk/types" +) + +// revision is the identifier of a version of state. +// it consists of an auto-increment id and a journal index. +// it's safer to use than using journal index alone. +type revision struct { + id int + journalIndex int +} + +type KeestateDB struct { + ctx sdk.Context + + // Journal of state modifications. This is the backbone of + // Snapshot and RevertToSnapshot. + journal *journal + validRevisions []revision + nextRevisionID int + + stateObjects map[sdk.StoreKey]map[StorageKey]*stateObject +} + +// New creates a new state from a given trie. +func New(ctx sdk.Context) *KeestateDB { + return &KeestateDB{ + ctx: ctx, + journal: newJournal(), + stateObjects: make(map[sdk.StoreKey]map[StorageKey]*stateObject), + } +} + +func (ks *KeestateDB) getStateObject(storeKey sdk.StoreKey, key []byte) *stateObject { + skey := StorageKey(key) + // Prefer live objects if any is available + if obj := ks.stateObjects[storeKey][skey]; obj != nil { + return obj + } + + // Insert into the live set + obj := newObject(ks, storeKey, skey) + if obj.value.IsNil() { + // if not, means issue with db, return nil obj + return nil + } + ks.setStateObject(obj) + return obj +} + +func (ks *KeestateDB) getOrNewStateObject(storeKey sdk.StoreKey, key []byte) *stateObject { + stateObject := ks.getStateObject(storeKey, key) + if stateObject == nil { + stateObject, _ = ks.createObject(storeKey, key) + } + return stateObject +} + +func (ks *KeestateDB) setStateObject(object *stateObject) { + if _, ok := ks.stateObjects[object.storeKey]; !ok { + ks.stateObjects[object.storeKey] = make(map[StorageKey]*stateObject) + } + ks.stateObjects[object.storeKey][object.key] = object +} + +func (ks *KeestateDB) createObject(storeKey sdk.StoreKey, key []byte) (newobj, prev *stateObject) { + prev = ks.getStateObject(storeKey, key) + + skey := StorageKey(key) + newobj = newObject(ks, storeKey, skey) + if prev == nil { + ks.journal.append(createObjectChange{storeKey, skey}) + } else { + ks.journal.append(resetObjectChange{prev: prev}) + } + ks.setStateObject(newobj) + if prev != nil { + return newobj, prev + } + return newobj, nil +} + +// SetState sets the keeper state. +func (ks *KeestateDB) SetState(storeKey sdk.StoreKey, key, value []byte) { + stateObject := ks.getOrNewStateObject(storeKey, key) + if stateObject != nil { + stateObject.SetState(value) + } +} + +// GetState retrieves a value from the given key's storage trie. +func (ks *KeestateDB) GetState(storeKey sdk.StoreKey, key []byte) []byte { + stateObject := ks.getStateObject(storeKey, key) + if stateObject != nil { + stateValue := stateObject.GetState() + if !stateValue.IsNil() { + return stateValue.Result() + } + } + return nil +} + +// GetCommittedState retrieves a value from the given key's committed storage trie. +func (ks *KeestateDB) GetCommittedState(storeKey sdk.StoreKey, key []byte) []byte { + stateObject := ks.getStateObject(storeKey, key) + if stateObject != nil { + stateValue := stateObject.GetCommittedState() + if !stateValue.IsNil() { + return stateValue.Result() + } + } + return nil +} + +// Commit all changes to a storage trie +func (ks *KeestateDB) Commit() error { + for _, dirtyObj := range ks.journal.sortedDirties() { + obj := ks.stateObjects[dirtyObj.storeKey][dirtyObj.key] + for _, key := range obj.dirtyStorage.SortedKeys() { + value := obj.dirtyStorage[key] + origin := obj.originStorage[key] + // Skip noop changes, persist actual changes + if value.Eq(origin.Result()) { + continue + } + obj.store(value) + } + } + // no need to clean up as it will be always on fresh ctx + return nil +} + +// Snapshot returns an identifier for the current revision of the state. +func (ks *KeestateDB) Snapshot() int { + id := ks.nextRevisionID + ks.nextRevisionID++ + ks.validRevisions = append(ks.validRevisions, revision{id, ks.journal.length()}) + return id +} + +// RevertToSnapshot reverts all state changes made since the given revision. +func (ks *KeestateDB) RevertToSnapshot(revid int) { + // Find the snapshot in the stack of valid snapshots. + idx := sort.Search(len(ks.validRevisions), func(i int) bool { + return ks.validRevisions[i].id >= revid + }) + if idx == len(ks.validRevisions) || ks.validRevisions[idx].id != revid { + panic(fmt.Errorf("revision id %v cannot be reverted", revid)) + } + snapshot := ks.validRevisions[idx].journalIndex + + // Replay the journal to undo changes and remove invalidated snapshots + ks.journal.revert(ks, snapshot) + ks.validRevisions = ks.validRevisions[:idx] +} + +// GetSdkCtx returns current cosmos sdk context +func (ks *KeestateDB) GetSdkCtx() sdk.Context { + return ks.ctx +} diff --git a/core/statedb/types.go b/core/statedb/types.go new file mode 100644 index 00000000..f1c60ee8 --- /dev/null +++ b/core/statedb/types.go @@ -0,0 +1,59 @@ +package statedb + +import ( + "bytes" + "sort" + "strings" +) + +type StorageKey string + +func (sk StorageKey) Len() int { + return len(sk) +} + +type StorageValue struct { + value []byte +} + +func (sv *StorageValue) Result() []byte { + return sv.value +} + +func (sv *StorageValue) Eq(v []byte) bool { + if sv.IsNil() && v == nil { + return true + } + if sv.IsNil() && v != nil { + return false + } + if !sv.IsNil() && v == nil { + return false + } + return bytes.Equal(sv.value, v) +} + +func (sv *StorageValue) IsNil() bool { + return sv.value == nil +} + +func NewStorageValue(v []byte) StorageValue { + return StorageValue{value: v} +} + +// Storage represents in-memory cache/buffer of contract storage. +type Storage map[StorageKey]StorageValue + +// SortedKeys sort the keys for deterministic iteration +func (s Storage) SortedKeys() []StorageKey { + keys := make([]StorageKey, len(s)) + i := 0 + for k := range s { + keys[i] = k + i++ + } + sort.Slice(keys, func(i, j int) bool { + return strings.Compare(string(keys[i]), string(keys[j])) < 0 + }) + return keys +} diff --git a/go.mod b/go.mod index d3c11406..93c528ac 100644 --- a/go.mod +++ b/go.mod @@ -6,9 +6,9 @@ require ( github.com/Nik-U/pbc v0.0.0-20181205041846-3e516ca0c5d6 github.com/btcsuite/btcd v0.23.4 github.com/btcsuite/btcd/btcutil v1.1.2 - github.com/cosmos/cosmos-sdk v0.45.9 + github.com/cosmos/cosmos-sdk v0.45.10 github.com/cosmos/go-bip39 v1.0.0 - github.com/cosmos/ibc-go/v3 v3.0.0 + github.com/cosmos/ibc-go/v3 v3.4.0 github.com/davecgh/go-spew v1.1.1 github.com/dop251/goja v0.0.0-20220405120441-9037c2b61cbf github.com/ethereum/go-ethereum v1.10.26 @@ -80,7 +80,6 @@ require ( github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.5.1 // indirect github.com/go-ole/go-ole v1.2.1 // indirect - github.com/go-playground/validator/v10 v10.4.1 // indirect github.com/go-sourcemap/sourcemap v2.1.3+incompatible // indirect github.com/go-stack/stack v1.8.0 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect diff --git a/go.sum b/go.sum index 0b47294f..ceeeb008 100644 --- a/go.sum +++ b/go.sum @@ -184,8 +184,8 @@ github.com/cosmos/gorocksdb v1.2.0 h1:d0l3jJG8M4hBouIZq0mDUHZ+zjOx044J3nGRskwTb4 github.com/cosmos/gorocksdb v1.2.0/go.mod h1:aaKvKItm514hKfNJpUJXnnOWeBnk2GL4+Qw9NHizILw= github.com/cosmos/iavl v0.19.4 h1:t82sN+Y0WeqxDLJRSpNd8YFX5URIrT+p8n6oJbJ2Dok= github.com/cosmos/iavl v0.19.4/go.mod h1:X9PKD3J0iFxdmgNLa7b2LYWdsGd90ToV5cAONApkEPw= -github.com/cosmos/ibc-go/v3 v3.0.0 h1:XUNplHVS51Q2gMnTFsFsH9QJ7flsovMamnltKbEgPQ4= -github.com/cosmos/ibc-go/v3 v3.0.0/go.mod h1:Mb+1NXiPOLd+CPFlOC6BKeAUaxXlhuWenMmRiUiSmwY= +github.com/cosmos/ibc-go/v3 v3.4.0 h1:ha3cqEG36pqMWqA1D+kxDWBTZXpeFMd/aZIQF7I0xro= +github.com/cosmos/ibc-go/v3 v3.4.0/go.mod h1:VwB/vWu4ysT5DN2aF78d17LYmx3omSAdq6gpKvM7XRA= github.com/cosmos/keyring v1.1.7-0.20210622111912-ef00f8ac3d76 h1:DdzS1m6o/pCqeZ8VOAit/gyATedRgjvkVI+UCrLpyuU= github.com/cosmos/keyring v1.1.7-0.20210622111912-ef00f8ac3d76/go.mod h1:0mkLWIoZuQ7uBoospo5Q9zIpqq6rYCPJDSUdeCJvPM8= github.com/cosmos/ledger-cosmos-go v0.12.2 h1:/XYaBlE2BJxtvpkHiBm97gFGSGmYGKunKyF3nNqAXZA= @@ -277,8 +277,8 @@ github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= +github.com/gin-gonic/gin v1.6.3 h1:ahKqKTFpO5KTPHxWZjEdPScmYaGtLo8Y4DMHoEsnp14= github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= -github.com/gin-gonic/gin v1.7.0 h1:jGB9xAJQ12AIGNB4HguylppmDK1Am9ppF7XnGXXJuoU= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -305,7 +305,6 @@ github.com/go-playground/universal-translator v0.17.0 h1:icxd5fm+REJzpZx7ZfpaD87 github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= github.com/go-playground/validator/v10 v10.4.1 h1:pH2c5ADXtd66mxoE0Zm9SUhxE20r7aM3F26W0hOn+GE= -github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4= github.com/go-sourcemap/sourcemap v2.1.2+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= github.com/go-sourcemap/sourcemap v2.1.3+incompatible h1:W1iEw64niKVGogNgBN3ePyLFfuisuzeidWPMPWmECqU= github.com/go-sourcemap/sourcemap v2.1.3+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= diff --git a/package.json b/package.json new file mode 100644 index 00000000..abe60ead --- /dev/null +++ b/package.json @@ -0,0 +1,19 @@ +{ + "name": "@stratosnet/stratos-chain", + "private": true, + "workspaces": [ + "packages/gov" + ], + "scripts": { + "gov": "yarn workspace @stratosnet/stratos-chain-gov hh", + "compile": "yarn gov compile", + "test": "yarn gov test" + }, + "packageManager": "yarn@3.2.0", + "version": "1.0.0", + "description": "Stratoschain base launcher for workspace packages", + "main": "index.js", + "repository": "https://github.com/stratosnet/stratos-chain.git", + "author": "BoThe1K ", + "license": "MIT OR Apache-2.0" +} \ No newline at end of file diff --git a/packages/gov/.eslintignore b/packages/gov/.eslintignore new file mode 100644 index 00000000..85f5562a --- /dev/null +++ b/packages/gov/.eslintignore @@ -0,0 +1,4 @@ +node_modules +artifacts +cache +coverage diff --git a/packages/gov/.eslintrc.js b/packages/gov/.eslintrc.js new file mode 100644 index 00000000..98ce1937 --- /dev/null +++ b/packages/gov/.eslintrc.js @@ -0,0 +1,24 @@ +module.exports = { + env: { + browser: false, + es2021: true, + mocha: true, + node: true, + }, + plugins: ["@typescript-eslint"], + extends: [ + "standard", + "plugin:prettier/recommended", + "plugin:node/recommended", + ], + parser: "@typescript-eslint/parser", + parserOptions: { + ecmaVersion: 12, + }, + rules: { + "node/no-unsupported-features/es-syntax": [ + "error", + { ignores: ["modules"] }, + ], + }, +}; diff --git a/packages/gov/.gitignore b/packages/gov/.gitignore new file mode 100644 index 00000000..00dad773 --- /dev/null +++ b/packages/gov/.gitignore @@ -0,0 +1,11 @@ +node_modules +.env +coverage +coverage.json +typechain +typechain-types + +# Hardhat files +cache +artifacts + diff --git a/packages/gov/.npmignore b/packages/gov/.npmignore new file mode 100644 index 00000000..dc037817 --- /dev/null +++ b/packages/gov/.npmignore @@ -0,0 +1,3 @@ +hardhat.config.ts +scripts +test diff --git a/packages/gov/.prettierignore b/packages/gov/.prettierignore new file mode 100644 index 00000000..f268596e --- /dev/null +++ b/packages/gov/.prettierignore @@ -0,0 +1,5 @@ +node_modules +artifacts +cache +coverage* +gasReporterOutput.json diff --git a/packages/gov/.solhint.json b/packages/gov/.solhint.json new file mode 100644 index 00000000..ec2551c5 --- /dev/null +++ b/packages/gov/.solhint.json @@ -0,0 +1,15 @@ +{ + "extends": "solhint:recommended", + "rules": { + "compiler-version": [ + "error", + "^0.8.18" + ], + "func-visibility": [ + "warn", + { + "ignoreConstructors": true + } + ] + } +} \ No newline at end of file diff --git a/packages/gov/README.md b/packages/gov/README.md new file mode 100644 index 00000000..5b7cba6f --- /dev/null +++ b/packages/gov/README.md @@ -0,0 +1,14 @@ +# Stratos chain gov contracts + +This contracts relatd to gov mechanics via proxy calls like: + - Prepay + +Try running some of the following tasks: + +```shell +npx hardhat help +npx hardhat test +REPORT_GAS=true npx hardhat test +npx hardhat node +npx hardhat run scripts/deploy.ts +``` diff --git a/packages/gov/contracts/Prepay.sol b/packages/gov/contracts/Prepay.sol new file mode 100644 index 00000000..7987ca25 --- /dev/null +++ b/packages/gov/contracts/Prepay.sol @@ -0,0 +1,48 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.8.18; + +import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; + +import "./versions/Version0.sol"; + +contract Prepay is Version0, OwnableUpgradeable { + event PrepayCreated( + address indexed sender, + address indexed beneficiery, + uint256 indexed amount, + uint256 purchased + ); + + // ----- proxy ------ + uint256[49] private __gap; + + // ===== fallbacks ===== + + receive() external payable {} + + // Initialize function for proxy constructor. Must be used atomically + function initialize() public initializer { + // proxy inits + __Context_init_unchained(); + __Ownable_init_unchained(); + } + + function prepay() external payable { + uint256 amount = msg.value; + require(amount != 0, "P: ZERO_AMOUNT"); + + uint256[1] memory input; + input[0] = uint256(uint160(msg.sender)); + + uint256[1] memory output; + + assembly { + if iszero(call(not(0), 0xf1, amount, input, 0x20, output, 0x20)) { + revert(0x0, 0x0) + } + } + + emit PrepayCreated(address(this), msg.sender, amount, output[0]); + } +} diff --git a/packages/gov/contracts/mock/PrepayMockOverride.sol b/packages/gov/contracts/mock/PrepayMockOverride.sol new file mode 100644 index 00000000..361a8289 --- /dev/null +++ b/packages/gov/contracts/mock/PrepayMockOverride.sol @@ -0,0 +1,46 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.8.18; + +import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; + +import "../versions/Version1.sol"; + +contract PrepayMockOverride is Version1, OwnableUpgradeable { + event PrepayCreated( + address indexed sender, + address indexed beneficiery, + uint256 indexed amount, + uint256 purchased + ); + + address public EXECUTOR; + uint8 public IS_TEST; + + // ----- proxy ------ + uint256[47] private __gap; + + // ===== fallbacks ===== + + receive() external payable {} + + function upgrade() public { + require( + _msgSender() == 0x1000000000000000000000000000000000000000, + "PMO: WRONG_SENDER" + ); + IS_TEST = 1; + EXECUTOR = _msgSender(); + } + + // Initialize function for proxy constructor. Must be used atomically + function initialize() public initializer { + // proxy inits + __Context_init_unchained(); + __Ownable_init_unchained(); + } + + function prepay() external { + emit PrepayCreated(address(this), msg.sender, 0, 0); + } +} diff --git a/packages/gov/contracts/versions/Version0.sol b/packages/gov/contracts/versions/Version0.sol new file mode 100644 index 00000000..cfa9f152 --- /dev/null +++ b/packages/gov/contracts/versions/Version0.sol @@ -0,0 +1,11 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.8.0; + +/** + * @title Version0 + * @notice Version getter for contracts + **/ +contract Version0 { + uint8 public constant VERSION = 0; +} diff --git a/packages/gov/contracts/versions/Version1.sol b/packages/gov/contracts/versions/Version1.sol new file mode 100644 index 00000000..28b6a25e --- /dev/null +++ b/packages/gov/contracts/versions/Version1.sol @@ -0,0 +1,11 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.8.0; + +/** + * @title Version1 + * @notice Version getter for contracts + **/ +contract Version1 { + uint8 public constant VERSION = 1; +} diff --git a/packages/gov/hardhat.config.ts b/packages/gov/hardhat.config.ts new file mode 100644 index 00000000..52325a7b --- /dev/null +++ b/packages/gov/hardhat.config.ts @@ -0,0 +1,41 @@ +import { HardhatUserConfig, task } from "hardhat/config"; + +import "@nomicfoundation/hardhat-toolbox"; +import "hardhat-gas-reporter"; +import "hardhat-deploy"; +import "@nomiclabs/hardhat-ethers"; + +task("accounts", "Prints the list of accounts", async (taskArgs, hre) => { + const accounts = await hre.ethers.getSigners(); + + for (const account of accounts) { + console.log(account.address); + } +}); + +const config: HardhatUserConfig = { + solidity: "0.8.18", + contractSizer: { + alphaSort: true, + disambiguatePaths: false, + runOnCompile: true, + strict: true, + }, + networks: { + localnet: { + url: "http://localhost:8545", + accounts: { + mnemonic: "test test test test test test test test test test test junk", + }, + loggingEnabled: true, + }, + }, + namedAccounts: { + tester: 0, + }, + mocha: { + timeout: 100000000 + }, +}; + +export default config; diff --git a/packages/gov/package.json b/packages/gov/package.json new file mode 100644 index 00000000..9649ca8f --- /dev/null +++ b/packages/gov/package.json @@ -0,0 +1,42 @@ +{ + "name": "@stratosnet/stratos-chain-gov", + "description": "Gov contracts", + "version": "1.0.0", + "main": "index.js", + "directories": { + "hh": "hh" + }, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "MIT", + "devDependencies": { + "@ethersproject/abi": "^5.4.7", + "@ethersproject/providers": "^5.4.7", + "@nomicfoundation/hardhat-chai-matchers": "^1.0.0", + "@nomicfoundation/hardhat-network-helpers": "^1.0.0", + "@nomicfoundation/hardhat-toolbox": "^2.0.0", + "@nomiclabs/hardhat-ethers": "npm:hardhat-deploy-ethers", + "@nomiclabs/hardhat-etherscan": "^3.0.0", + "@openzeppelin/contracts": "^4.8.3", + "@openzeppelin/contracts-upgradeable": "^4.8.3", + "@openzeppelin/hardhat-upgrades": "^1.23.1", + "@openzeppelin/test-helpers": "^0.5.16", + "@typechain/ethers-v5": "^10.1.0", + "@typechain/hardhat": "^6.1.2", + "@types/chai": "^4.2.0", + "@types/mocha": ">=9.1.0", + "@types/node": ">=12.0.0", + "chai": "^4.2.0", + "ethers": "5.7.2", + "hardhat": "^2.11.1", + "hardhat-deploy": "^0.11.29", + "hardhat-gas-reporter": "^1.0.8", + "hardhat-shorthand": "^1.0.0", + "solidity-coverage": "^0.8.0", + "ts-node": ">=8.0.0", + "typechain": "^8.1.0", + "typescript": ">=4.5.0" + } +} diff --git a/packages/gov/test/Prepay.test.ts b/packages/gov/test/Prepay.test.ts new file mode 100644 index 00000000..8d81894b --- /dev/null +++ b/packages/gov/test/Prepay.test.ts @@ -0,0 +1,38 @@ +import { ethers } from "hardhat" +import { Prepay } from "../typechain-types"; +import { expect } from "chai"; + +describe("Prepay local test", () => { + + // could be changed + const prepayContractAddress = '0x1000000000000000000000000000000000010101'; + const totalUnissuedPrepayAddress = '0xa2776119cb0503aaa30f11b6d3fb1b6ba539c61d'; + + const prepayValue = ethers.utils.parseUnits('1', 'gwei'); + const purchased = ethers.utils.parseUnits('999', 'wei') + + it("should prepay be executed", async () => { + const signer = await ethers.getNamedSigner("tester"); + + console.group('1. Unissued address check') + const balanceBefore = await ethers.provider.getBalance(totalUnissuedPrepayAddress); + console.log("Checking balance before next step for unissued address:", balanceBefore.toString()); + console.groupEnd(); + + console.group('2. Preparations for prepay') + const contract: Prepay = await ethers.getContractAt("Prepay", prepayContractAddress, signer); + console.log(`Executing prepay with "${prepayValue.toString()}" ETH on proxy contract "${prepayContractAddress}"...`) + const tx = contract.prepay({ value: prepayValue }); + + await expect(tx).to + .emit(contract, "PrepayCreated") + .withArgs(contract.address, signer.address, prepayValue, purchased); + + console.log(`Completed, result: "${(await tx).hash}"`); + + const balanceAfter = await ethers.provider.getBalance(totalUnissuedPrepayAddress); + console.log("Checking balance after next step for unissued address:", balanceAfter.toString()); + expect(balanceAfter).to.be.eq(balanceBefore.add(purchased)); + console.groupEnd(); + }) +}) diff --git a/packages/gov/tsconfig.json b/packages/gov/tsconfig.json new file mode 100644 index 00000000..574e785c --- /dev/null +++ b/packages/gov/tsconfig.json @@ -0,0 +1,11 @@ +{ + "compilerOptions": { + "target": "es2020", + "module": "commonjs", + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "strict": true, + "skipLibCheck": true, + "resolveJsonModule": true + } +} diff --git a/packages/tsconfig.package.json b/packages/tsconfig.package.json new file mode 100644 index 00000000..5f06d36d --- /dev/null +++ b/packages/tsconfig.package.json @@ -0,0 +1,38 @@ +{ + "exclude": [ + "**/dist/**", + "**/node_modules/**", + "**/test/**" + ], + "compilerOptions": { + "composite": true, + "declaration": true, + "declarationMap": true, + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "lib": [ + "es2015", + "es5", + "dom" + ], + "module": "commonjs", + "moduleResolution": "node", + "noEmitOnError": true, + "noFallthroughCasesInSwitch": true, + "noImplicitAny": false, + "noImplicitReturns": false, + "noUnusedLocals": true, + "preserveSymlinks": true, + "preserveWatchOutput": true, + "pretty": false, + "resolveJsonModule": true, + "sourceMap": true, + "target": "es6", + "strict": true + }, + "references": [ + { + "path": "./gov" + }, + ] +} \ No newline at end of file diff --git a/proto/stratos/evm/v1/evm.proto b/proto/stratos/evm/v1/evm.proto index 8d5dfe35..e308cb32 100644 --- a/proto/stratos/evm/v1/evm.proto +++ b/proto/stratos/evm/v1/evm.proto @@ -28,6 +28,10 @@ message Params { (gogoproto.moretags) = "yaml:\"fee_market_params\"", (gogoproto.nullable) = false ]; + ProxyProposalParams proxy_proposal_params = 7 [ + (gogoproto.moretags) = "yaml:\"proxy_proposal_params\"", + (gogoproto.nullable) = false + ]; } // ChainConfig defines the Ethereum ChainConfig parameters using *sdk.Int values @@ -261,4 +265,26 @@ message FeeMarketParams { (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false ]; +} + +message ProxyContractInitState { + // height where it should be applied + uint64 height = 1; + // address of proxy contract + string address = 2; + // solidity compiled code + string bin = 3; + // initializer method data + string init = 4; +} + +// Params defines default proxy addresses for futur gov contracts update +message ProxyProposalParams { + // consensus address as msg.sender, used to define admin authority, could be simply zero address or custom + // basically it is an owner of evrything. resposible to add proxies and update proxies implementations + string consensus_address = 1; + // proxy owner who basically the owner of proxy contract (for Ownable purpose, not admin) + string proxy_owner_address = 2; + // proxy contracts name per address reservations + map contracts = 3; } \ No newline at end of file diff --git a/proto/stratos/evm/v1/proposal.proto b/proto/stratos/evm/v1/proposal.proto new file mode 100644 index 00000000..6ec3ebbc --- /dev/null +++ b/proto/stratos/evm/v1/proposal.proto @@ -0,0 +1,21 @@ +syntax = "proto3"; +package stratos.evm.v1; + +import "gogoproto/gogo.proto"; + +option go_package = "github.com/stratosnet/stratos-chain/x/evm/types"; + +// UpdateImplmentationProposal used to update implemntation for genesis proxies +message UpdateImplmentationProposal { + // proxy address where data will be executed + string proxy_address = 1; + // implmentation address as API for a storage + string implementation_address = 2; + // data for execution + bytes data = 3; + // value for proxy func call + string value = 4 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.customname) = "Amount" + ]; +} \ No newline at end of file diff --git a/rpc/namespaces/ethereum/debug/api.go b/rpc/namespaces/ethereum/debug/api.go index 6ec028d4..89743869 100644 --- a/rpc/namespaces/ethereum/debug/api.go +++ b/rpc/namespaces/ethereum/debug/api.go @@ -16,11 +16,8 @@ import ( "time" "github.com/davecgh/go-spew/spew" - "github.com/ethereum/go-ethereum/eth/tracers" stderrors "github.com/pkg/errors" - "github.com/ethereum/go-ethereum/eth/tracers/logger" - "github.com/tendermint/tendermint/libs/log" tmrpctypes "github.com/tendermint/tendermint/rpc/core/types" @@ -36,7 +33,9 @@ import ( "github.com/stratosnet/stratos-chain/rpc/backend" rpctypes "github.com/stratosnet/stratos-chain/rpc/types" + "github.com/stratosnet/stratos-chain/x/evm/tracers" jstracers "github.com/stratosnet/stratos-chain/x/evm/tracers/js" + "github.com/stratosnet/stratos-chain/x/evm/tracers/logger" nativetracers "github.com/stratosnet/stratos-chain/x/evm/tracers/native" evmtypes "github.com/stratosnet/stratos-chain/x/evm/types" tmrpccore "github.com/tendermint/tendermint/rpc/core" @@ -197,7 +196,7 @@ func (a *API) TraceTransaction(ctx context.Context, hash common.Hash, config *tr // TraceBlockByNumber returns the structured logs created during the execution of // EVM and returns them as a JSON object. -func (a *API) TraceBlockByNumber(height rpctypes.BlockNumber, config *evmtypes.TraceConfig) ([]*evmtypes.TxTraceResult, error) { +func (a *API) TraceBlockByNumber(height rpctypes.BlockNumber, config *evmtypes.TraceConfig) ([]*tracers.TxTraceResult, error) { a.logger.Debug("debug_traceBlockByNumber", "height", height) if height == 0 { return nil, errors.New("genesis is not traceable") @@ -214,7 +213,7 @@ func (a *API) TraceBlockByNumber(height rpctypes.BlockNumber, config *evmtypes.T // TraceBlockByHash returns the structured logs created during the execution of // EVM and returns them as a JSON object. -func (a *API) TraceBlockByHash(hash common.Hash, config *evmtypes.TraceConfig) ([]*evmtypes.TxTraceResult, error) { +func (a *API) TraceBlockByHash(hash common.Hash, config *evmtypes.TraceConfig) ([]*tracers.TxTraceResult, error) { a.logger.Debug("debug_traceBlockByHash", "hash", hash) // Get Tendermint Block resBlock, err := a.backend.GetTendermintBlockByHash(hash) @@ -234,13 +233,13 @@ func (a *API) TraceBlockByHash(hash common.Hash, config *evmtypes.TraceConfig) ( // traceBlock configures a new tracer according to the provided configuration, and // executes all the transactions contained within. The return value will be one item // per transaction, dependent on the requested tracer. -func (a *API) traceBlock(height rpctypes.BlockNumber, config *evmtypes.TraceConfig, block *tmrpctypes.ResultBlock) ([]*evmtypes.TxTraceResult, error) { +func (a *API) traceBlock(height rpctypes.BlockNumber, config *evmtypes.TraceConfig, block *tmrpctypes.ResultBlock) ([]*tracers.TxTraceResult, error) { txs := block.Block.Txs txsLength := len(txs) if txsLength == 0 { // If there are no transactions return empty array - return []*evmtypes.TxTraceResult{}, nil + return []*tracers.TxTraceResult{}, nil } txDecoder := a.clientCtx.TxConfig.TxDecoder() @@ -288,7 +287,7 @@ func (a *API) traceBlock(height rpctypes.BlockNumber, config *evmtypes.TraceConf return nil, err } - decodedResults := make([]*evmtypes.TxTraceResult, txsLength) + decodedResults := make([]*tracers.TxTraceResult, txsLength) if err := json.Unmarshal(res.Data, &decodedResults); err != nil { return nil, err } diff --git a/rpc/namespaces/ethereum/eth/api.go b/rpc/namespaces/ethereum/eth/api.go index 047e2fb8..49ad7f2c 100644 --- a/rpc/namespaces/ethereum/eth/api.go +++ b/rpc/namespaces/ethereum/eth/api.go @@ -628,7 +628,7 @@ func (e *PublicAPI) doCall( // return if requested block height is greater than the current one or chain not synced if resBlock == nil || resBlock.Block == nil { - return nil, nil + return nil, fmt.Errorf("block not found '%d'", blockNr.Int64()) } sdkCtx, err := e.backend.GetEVMContext().GetSdkContextWithHeader(&resBlock.Block.Header) diff --git a/types/config.go b/types/config.go index 63251490..8116e5fb 100644 --- a/types/config.go +++ b/types/config.go @@ -91,7 +91,8 @@ func (config *Config) SetBech32PrefixForAccount(addressPrefix, pubKeyPrefix stri } // SetBech32PrefixForValidator builds the Config with Bech32 addressPrefix and publKeyPrefix for validators -// and returns the config instance +// +// and returns the config instance func (config *Config) SetBech32PrefixForValidator(addressPrefix, pubKeyPrefix string) { sdkConfig := sdk.GetConfig() sdkConfig.SetBech32PrefixForValidator(addressPrefix, pubKeyPrefix) diff --git a/x/evm/client/cli/tx.go b/x/evm/client/cli/tx.go index 466fd98e..b99366ea 100644 --- a/x/evm/client/cli/tx.go +++ b/x/evm/client/cli/tx.go @@ -11,7 +11,12 @@ import ( "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/input" + "github.com/cosmos/cosmos-sdk/client/tx" + sdk "github.com/cosmos/cosmos-sdk/types" + govcli "github.com/cosmos/cosmos-sdk/x/gov/client/cli" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" rpctypes "github.com/stratosnet/stratos-chain/rpc/types" @@ -111,3 +116,97 @@ func NewRawTxCmd() *cobra.Command { flags.AddTxFlagsToCmd(cmd) return cmd } + +const ( + FlagProxyAddress = "proxy-address" + FlagImplementationAddress = "implementation-address" + FlagData = "data" + FlagValue = "value" +) + +// NewEVMProxyImplmentationUpgrade implements a command handler for submitting a software upgrade with implementation upgrade for existing gensis proxies +func NewEVMProxyImplmentationUpgrade() *cobra.Command { + cmd := &cobra.Command{ + Use: "evm-proxy-upgrade (--proxy-address [address]) (--implmentation-address [address]) (--data [data]) (--value [value]) [flags]", + Args: cobra.ExactArgs(0), + Short: "Submit an implemntation upgrade for genesis proxy", + Long: "Initial proxy implementation upgrade for defined genesis proxy addresses", + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + from := clientCtx.GetFromAddress() + + proxyAddrStr, err := cmd.Flags().GetString(FlagProxyAddress) + if err != nil { + return err + } + if !common.IsHexAddress(proxyAddrStr) { + return fmt.Errorf("%s is not a valid Ethereum address", proxyAddrStr) + } + proxyAddr := common.HexToAddress(proxyAddrStr) + + implAddrStr, err := cmd.Flags().GetString(FlagImplementationAddress) + if err != nil { + return err + } + if !common.IsHexAddress(implAddrStr) { + return fmt.Errorf("%s is not a valid Ethereum address", implAddrStr) + } + implAddr := common.HexToAddress(implAddrStr) + + dataStr, err := cmd.Flags().GetString(FlagData) + if err != nil { + return err + } + data, err := hexutil.Decode(dataStr) + if err != nil { + return err + } + + fmt.Println("data", data) + + valueStr, err := cmd.Flags().GetString(FlagValue) + if err != nil { + return err + } + valueCoin, err := sdk.ParseCoinNormalized(valueStr) + if err != nil { + return err + } + value := valueCoin.Amount + + depositStr, err := cmd.Flags().GetString(govcli.FlagDeposit) + if err != nil { + return err + } + deposit, err := sdk.ParseCoinsNormalized(depositStr) + if err != nil { + return err + } + content := types.NewUpdateImplmentationProposal(proxyAddr, implAddr, data, &value) + + msg, err := govtypes.NewMsgSubmitProposal(content, deposit, from) + if err != nil { + return err + } + + if err = msg.ValidateBasic(); err != nil { + return err + } + + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) + }, + } + + cmd.Flags().String(FlagProxyAddress, "", "proxy address of the contract") + cmd.Flags().String(FlagImplementationAddress, "", "implementation address which should be used for proxy upgrade") + cmd.Flags().String(FlagData, "0x", "addition smart contract data for proxy execution (optional)") + cmd.Flags().String(FlagValue, "0wei", "value of tokens should be used in data execution with payable modifier (optional)") + cmd.Flags().String(govcli.FlagDeposit, "", "deposit of proposal (optional)") + cmd.MarkFlagRequired(FlagProxyAddress) + cmd.MarkFlagRequired(FlagImplementationAddress) + + return cmd +} diff --git a/x/evm/client/proposal_handler.go b/x/evm/client/proposal_handler.go new file mode 100644 index 00000000..d2ec18ee --- /dev/null +++ b/x/evm/client/proposal_handler.go @@ -0,0 +1,25 @@ +package client + +import ( + "net/http" + + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/types/rest" + govclient "github.com/cosmos/cosmos-sdk/x/gov/client" + govrest "github.com/cosmos/cosmos-sdk/x/gov/client/rest" + + "github.com/stratosnet/stratos-chain/x/evm/client/cli" +) + +var ( + EVMChangeProxyImplementationHandler = govclient.NewProposalHandler(cli.NewEVMProxyImplmentationUpgrade, emptyRestHandler) +) + +func emptyRestHandler(client.Context) govrest.ProposalRESTHandler { + return govrest.ProposalRESTHandler{ + SubRoute: "unsupported-evm-client", + Handler: func(w http.ResponseWriter, r *http.Request) { + rest.WriteErrorResponse(w, http.StatusBadRequest, "REST Routes are not supported for EVM proposals") + }, + } +} diff --git a/x/evm/keeper/abci.go b/x/evm/keeper/abci.go index 14396427..8d412cbe 100644 --- a/x/evm/keeper/abci.go +++ b/x/evm/keeper/abci.go @@ -22,6 +22,8 @@ func (k *Keeper) BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock) { k.SetBaseFeeParam(ctx, baseFee) + k.AddGenesisVerifier(ctx) + // Store current base fee in event ctx.EventManager().EmitEvents(sdk.Events{ sdk.NewEvent( @@ -56,5 +58,14 @@ func (k *Keeper) EndBlock(ctx sdk.Context, req abci.RequestEndBlock) []abci.Vali bloom := ethtypes.BytesToBloom(k.GetBlockBloomTransient(infCtx).Bytes()) k.EmitBlockBloomEvent(infCtx, bloom) + pc, err := NewProposalCounsil(k, ctx) + if err != nil { + panic(err) + } + + if err := pc.ApplyGenesisState(uint64(req.Height)); err != nil { + panic(err) + } + return []abci.ValidatorUpdate{} } diff --git a/x/evm/keeper/grpc_query.go b/x/evm/keeper/grpc_query.go index e18f5bdf..a8fe639d 100644 --- a/x/evm/keeper/grpc_query.go +++ b/x/evm/keeper/grpc_query.go @@ -17,14 +17,15 @@ import ( "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/core" ethtypes "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/core/vm" - "github.com/ethereum/go-ethereum/eth/tracers" - "github.com/ethereum/go-ethereum/eth/tracers/logger" + ethparams "github.com/ethereum/go-ethereum/params" + "github.com/stratosnet/stratos-chain/x/evm/tracers" + "github.com/stratosnet/stratos-chain/x/evm/tracers/logger" stratos "github.com/stratosnet/stratos-chain/types" "github.com/stratosnet/stratos-chain/x/evm/statedb" "github.com/stratosnet/stratos-chain/x/evm/types" + "github.com/stratosnet/stratos-chain/x/evm/vm" ) var _ types.QueryServer = Keeper{} @@ -387,7 +388,8 @@ func (k Keeper) TraceTx(c context.Context, req *types.QueryTraceTxRequest) (*typ } txConfig.TxHash = ethTx.Hash() txConfig.TxIndex = uint(i) - rsp, err := k.ApplyMessageWithConfig(ctx, msg, types.NewNoOpTracer(), true, cfg, txConfig) + tracer := tracers.NewNoOpTracer() + rsp, err := k.ApplyMessageWithConfig(ctx, msg, tracer, true, cfg, txConfig) if err != nil { continue } @@ -443,11 +445,11 @@ func (k Keeper) TraceBlock(c context.Context, req *types.QueryTraceBlockRequest) } signer := ethtypes.MakeSigner(cfg.ChainConfig, big.NewInt(ctx.BlockHeight())) txsLength := len(req.Txs) - results := make([]*types.TxTraceResult, 0, txsLength) + results := make([]*tracers.TxTraceResult, 0, txsLength) txConfig := statedb.NewEmptyTxConfig(common.BytesToHash(ctx.HeaderHash().Bytes())) for i, tx := range req.Txs { - result := types.TxTraceResult{} + result := tracers.TxTraceResult{} ethTx := tx.AsTransaction() txConfig.TxHash = ethTx.Hash() txConfig.TxIndex = uint(i) @@ -543,7 +545,7 @@ func (k *Keeper) traceTx( } tracer = logger.NewStructLogger(&logConfig) default: - tracer = types.NewTracer(types.TracerStruct, msg, cfg.ChainConfig, ctx.BlockHeight()) + tracer = tracers.NewTracer(tracers.TracerStruct, msg, cfg.ChainConfig, ctx.BlockHeight()) } res, err := k.ApplyMessageWithConfig(ctx, msg, tracer, commitMessage, cfg, txConfig) @@ -563,11 +565,11 @@ func (k *Keeper) traceTx( } else { returnVal = fmt.Sprintf("%x", res.Return()) } - result = types.ExecutionResult{ + result = tracers.ExecutionResult{ Gas: res.GasUsed, Failed: res.Failed(), ReturnValue: returnVal, - StructLogs: types.FormatLogs(tracer.StructLogs()), + StructLogs: tracers.FormatLogs(tracer.StructLogs()), } case tracers.Tracer: result, err = tracer.GetResult() diff --git a/x/evm/keeper/keeper.go b/x/evm/keeper/keeper.go index a1afccf3..c37acdf9 100644 --- a/x/evm/keeper/keeper.go +++ b/x/evm/keeper/keeper.go @@ -2,6 +2,7 @@ package keeper import ( "math/big" + "sort" "github.com/tendermint/tendermint/libs/log" @@ -14,12 +15,14 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core" ethtypes "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/core/vm" + "github.com/ethereum/go-ethereum/params" stratos "github.com/stratosnet/stratos-chain/types" "github.com/stratosnet/stratos-chain/x/evm/statedb" + "github.com/stratosnet/stratos-chain/x/evm/tracers" "github.com/stratosnet/stratos-chain/x/evm/types" + "github.com/stratosnet/stratos-chain/x/evm/vm" ) // Keeper grants access to the EVM module state and implements the go-ethereum StateDB interface. @@ -44,12 +47,22 @@ type Keeper struct { bankKeeper types.BankKeeper // access historical headers for EVM state transition execution stakingKeeper types.StakingKeeper + // access for registry functionality with related keeper + registerKeeper types.RegisterKeeper + // access for sds functionality with related keeper + sdsKeeper types.SdsKeeper // Tracer used to collect execution traces from the EVM transaction execution tracer string + // genesisContractVerifier verifies is contract is trusted in order to allow curtain opcodes + verifier *vm.GenesisContractVerifier + // EVM Hooks for tx post-processing hooks types.EvmHooks + + // cosmos events to execute when all execution passed + events sdk.Events } // NewKeeper generates new evm module keeper @@ -57,6 +70,7 @@ func NewKeeper( cdc codec.BinaryCodec, storeKey, transientKey sdk.StoreKey, paramSpace paramtypes.Subspace, ak types.AccountKeeper, bankKeeper types.BankKeeper, sk types.StakingKeeper, + sdsKeeper types.SdsKeeper, tracer string, ) *Keeper { // ensure evm module account is set @@ -76,9 +90,11 @@ func NewKeeper( accountKeeper: ak, bankKeeper: bankKeeper, stakingKeeper: sk, + sdsKeeper: sdsKeeper, storeKey: storeKey, transientKey: transientKey, tracer: tracer, + events: make(sdk.Events, 0, 12), } } @@ -87,6 +103,47 @@ func (k Keeper) Logger(ctx sdk.Context) log.Logger { return ctx.Logger().With("module", types.ModuleName) } +func (k *Keeper) SetRegisterKeeper(rk types.RegisterKeeper) { + k.registerKeeper = rk +} + +func (k *Keeper) SetSdsKeeper(sdsk types.SdsKeeper) { + k.sdsKeeper = sdsk +} + +// cosmos events +func (k *Keeper) AddEvents(events sdk.Events) { + k.events = append(k.events, events...) +} + +func (k *Keeper) ApplyEvents(ctx sdk.Context, isVmError bool) { + if len(k.events) > 0 && !isVmError { + ctx.EventManager().EmitEvents(k.events) + } + k.events = k.events[:0] // clear prvious events to avoid conflicts +} + +// AddVerifier adding verifier with initial contracts +func (k *Keeper) AddGenesisVerifier(ctx sdk.Context) { + // could be as cached + if k.verifier != nil { + return + } + + k.verifier = vm.NewGenesisContractVerifier() + + params := k.GetParams(ctx) + keys := make([]string, 0) + for k := range params.ProxyProposalParams.Contracts { + keys = append(keys, k) + } + sort.Strings(keys) + for _, key := range keys { + contract := params.ProxyProposalParams.Contracts[key] + k.verifier.AddContract(contract, true) + } +} + // ---------------------------------------------------------------------------- // Block Bloom // Required by Web3 API. @@ -206,7 +263,7 @@ func (k *Keeper) PostTxProcessing(ctx sdk.Context, msg core.Message, receipt *et // Tracer return a default vm.Tracer based on current keeper state func (k Keeper) Tracer(ctx sdk.Context, msg core.Message, ethCfg *params.ChainConfig) vm.EVMLogger { - return types.NewTracer(k.tracer, msg, ethCfg, ctx.BlockHeight()) + return tracers.NewTracer(k.tracer, msg, ethCfg, ctx.BlockHeight()) } // GetAccountWithoutBalance load nonce and codehash without balance, diff --git a/x/evm/keeper/proposal.go b/x/evm/keeper/proposal.go new file mode 100644 index 00000000..797bedd3 --- /dev/null +++ b/x/evm/keeper/proposal.go @@ -0,0 +1,305 @@ +package keeper + +import ( + "bytes" + "fmt" + "math" + "math/big" + + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/ethereum/go-ethereum/crypto" + "github.com/ethereum/go-ethereum/params" + + stratos "github.com/stratosnet/stratos-chain/types" + "github.com/stratosnet/stratos-chain/x/evm/statedb" + "github.com/stratosnet/stratos-chain/x/evm/tracers" + "github.com/stratosnet/stratos-chain/x/evm/types" + "github.com/stratosnet/stratos-chain/x/evm/vm" +) + +var ( + emptyCodeHash = crypto.Keccak256Hash(nil) +) + +type ProposalCounsil struct { + keeper *Keeper + ctx sdk.Context + stateDB *statedb.StateDB + evm *vm.EVM + consensusOwner common.Address + proxyOwner common.Address + verifier *vm.GenesisContractVerifier +} + +func NewProposalCounsil(k *Keeper, ctx sdk.Context) (*ProposalCounsil, error) { + params := k.GetParams(ctx) + + pc := &ProposalCounsil{ + keeper: k, + ctx: ctx, + consensusOwner: common.HexToAddress(params.ProxyProposalParams.ConsensusAddress), + proxyOwner: common.HexToAddress(params.ProxyProposalParams.ProxyOwnerAddress), + verifier: k.verifier, + } + cfg, err := k.EVMConfig(ctx) + if err != nil { + return nil, sdkerrors.Wrap(err, "failed to load evm config") + } + + blockCtx := vm.BlockContext{ + CanTransfer: vm.CanTransfer, + Transfer: vm.Transfer, + GetHash: k.GetHashFn(ctx), + Coinbase: cfg.CoinBase, + GasLimit: stratos.BlockGasLimit(ctx), + BlockNumber: big.NewInt(ctx.BlockHeight()), + Time: big.NewInt(ctx.BlockHeader().Time.Unix()), + Difficulty: big.NewInt(0), // unused. Only required in PoW context + BaseFee: cfg.BaseFee, + } + + txCtx := vm.TxContext{ + Origin: pc.consensusOwner, + GasPrice: big.NewInt(0), + } + tracer := tracers.NewNoOpTracer() + vmConfig := k.VMConfig(ctx, cfg, tracer) + + txConfig := statedb.NewEmptyTxConfig(common.BytesToHash(ctx.HeaderHash())) + pc.stateDB = statedb.New(ctx, pc.keeper, txConfig) + pc.evm = vm.NewEVM(blockCtx, txCtx, pc.stateDB, cfg.ChainConfig, vmConfig, pc.verifier) + + return pc, nil +} + +func (pc *ProposalCounsil) finalize() error { + if err := pc.stateDB.Commit(); err != nil { + return err + } + return nil +} + +func (pc *ProposalCounsil) call(sender, contractAddress common.Address, data []byte, value *big.Int) error { + // required + txCtx := vm.TxContext{ + Origin: sender, + GasPrice: big.NewInt(0), + } + pc.evm.Reset(txCtx, pc.stateDB) + + nonce := pc.stateDB.GetNonce(sender) + // we do not care about gas during consil execution + gas := uint64(math.MaxUint64) + // for safety + if value == nil { + value = big.NewInt(0) + } + + { + pc.stateDB.SetNonce(sender, nonce+1) + } + + if _, _, vmErr := pc.evm.Call(vm.AccountRef(sender), contractAddress, data, gas, value); vmErr != nil { + return vmErr + } + return nil +} + +func (pc *ProposalCounsil) create(sender, contractAddress common.Address, data []byte, value *big.Int) (*common.Address, error) { + // required + txCtx := vm.TxContext{ + Origin: sender, + GasPrice: big.NewInt(0), + } + pc.evm.Reset(txCtx, pc.stateDB) + + nonce := pc.stateDB.GetNonce(sender) + // we do not care about gas during consil execution + gas := uint64(math.MaxUint64) + + // for safety + if value == nil { + value = big.NewInt(0) + } + + interpreter := vm.NewEVMInterpreter(pc.evm, pc.evm.Config) + + accRef := vm.AccountRef(sender) + + { + pc.stateDB.SetNonce(accRef.Address(), nonce+1) + } + + contractHash := pc.evm.StateDB.GetCodeHash(contractAddress) + if pc.evm.StateDB.GetNonce(contractAddress) != 0 || (contractHash != (common.Hash{}) && contractHash != emptyCodeHash) { + return nil, vm.ErrContractAddressCollision + } + + snapshot := pc.evm.StateDB.Snapshot() + + pc.evm.StateDB.CreateAccount(contractAddress) + pc.evm.StateDB.SetNonce(contractAddress, 1) + pc.evm.Context.Transfer(pc.evm.StateDB, sender, contractAddress, value) + + contract := vm.NewContract(accRef, vm.AccountRef(contractAddress), value, gas) + contract.SetCallCode(&contractAddress, common.Hash{}, data) + + ret, err := interpreter.Run(contract, nil, false) + if err != nil { + return nil, err + } + + // Check whether the max code size has been exceeded, assign err if the case. + if err == nil && len(ret) > params.MaxCodeSize { + err = vm.ErrMaxCodeSizeExceeded + } + + // Reject code starting with 0xEF if EIP-3541 is enabled. + if err == nil && len(ret) >= 1 && ret[0] == 0xEF { + err = vm.ErrInvalidCode + } + + // if the contract creation ran successfully and no errors were returned + // calculate the gas required to store the code. If the code could not + // be stored due to not enough gas set an error and let it be handled + // by the error checking condition below. + if err == nil { + createDataGas := uint64(len(ret)) * params.CreateDataGas + if contract.UseGas(createDataGas) { + pc.evm.StateDB.SetCode(contractAddress, ret) + } else { + err = vm.ErrCodeStoreOutOfGas + } + } + + // When an error was returned by the EVM or when setting the creation code + // above we revert to the snapshot and consume any gas remaining. Additionally + // when we're in homestead this also counts for code storage gas errors. + if err != nil { + pc.evm.StateDB.RevertToSnapshot(snapshot) + if err != vm.ErrExecutionReverted { + contract.UseGas(contract.Gas) + } + } + + return &contractAddress, nil +} + +func (pc *ProposalCounsil) ApplyGenesisState(height uint64) error { + contracts := pc.verifier.GetContracts(height) + + if len(contracts) == 0 { + return nil + } + + for _, contract := range contracts { + implAddr := crypto.CreateAddress(pc.consensusOwner, pc.stateDB.GetNonce(pc.consensusOwner)) + proxyAddr := common.HexToAddress(contract.GetAddress()) + + bin, err := hexutil.Decode(contract.GetBin()) + if err != nil { + return err + } + + data, err := hexutil.Decode(contract.GetInit()) + if err != nil { + return err + } + + implCode := pc.stateDB.GetCode(implAddr) + if implCode == nil { + if _, err := pc.create(pc.proxyOwner, implAddr, bin, nil); err != nil { + return sdkerrors.Wrapf(err, "failed to get or create address on '%s'", implAddr) + } + } + + value := sdk.NewInt(0) + c := types.NewUpdateImplmentationProposal( + proxyAddr, + implAddr, + data, + &value, + ) + + if err := c.ValidateBasic(); err != nil { + return err + } + + if err = pc.updateProxyImplementation(c.(*types.UpdateImplmentationProposal), false); err != nil { + return err + } + } + if err := pc.finalize(); err != nil { + return err + } + return nil +} + +func (pc *ProposalCounsil) UpdateProxyImplementation(p *types.UpdateImplmentationProposal) error { + return pc.updateProxyImplementation(p, true) +} + +// updateProxyImplementation execute provided function to a proxy contract for impl upgrade +func (pc *ProposalCounsil) updateProxyImplementation(p *types.UpdateImplmentationProposal, commit bool) error { + if !pc.verifier.IsTrustedAddress(p.ProxyAddress) { + return fmt.Errorf("proxy '%s' has not been verified", p.ProxyAddress) + } + + proxyAddress := common.HexToAddress(p.ProxyAddress) + implAddress := common.HexToAddress(p.ImplementationAddress) + + implCode := pc.stateDB.GetCode(implAddress) + if implCode == nil { + return fmt.Errorf("implementation '%s' not found", implAddress) + } + + if bytes.Equal(implCode, emptyCodeHash[:]) { + return fmt.Errorf("implementation '%s' is EOA", implAddress) + } + + proxyCode := pc.stateDB.GetCode(proxyAddress) + if proxyCode != nil { + upgradeData, err := types.EncodeContractFunc( + types.TransparentUpgradableProxyABI, + "upgradeToAndCall", + implAddress, + p.Data, + ) + if err != nil { + return err + } + + if err := pc.call(pc.consensusOwner, proxyAddress, upgradeData, p.Amount.BigInt()); err != nil { + return err + } + } else { + proxyConstructorData, err := types.EncodeContractFunc( + types.TransparentUpgradableProxyABI, + "", + implAddress, + pc.consensusOwner, + p.Data, + ) + if err != nil { + return err + } + + proxyConstructorData = append(common.FromHex(types.TransparentUpgradableProxyBin), proxyConstructorData...) + + if _, err := pc.create(pc.proxyOwner, proxyAddress, proxyConstructorData, p.Amount.BigInt()); err != nil { + return err + } + } + + if commit { + if err := pc.finalize(); err != nil { + return err + } + } + + return nil +} diff --git a/x/evm/keeper/state_transition.go b/x/evm/keeper/state_transition.go index b9dd1588..bd434ca7 100644 --- a/x/evm/keeper/state_transition.go +++ b/x/evm/keeper/state_transition.go @@ -15,13 +15,16 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core" ethtypes "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/params" stratos "github.com/stratosnet/stratos-chain/types" "github.com/stratosnet/stratos-chain/x/evm/statedb" + "github.com/stratosnet/stratos-chain/x/evm/tracers" "github.com/stratosnet/stratos-chain/x/evm/types" + "github.com/stratosnet/stratos-chain/x/evm/vm" + registertypes "github.com/stratosnet/stratos-chain/x/register/types" + sdstypes "github.com/stratosnet/stratos-chain/x/sds/types" ) // GasToRefund calculates the amount of gas the state machine should refund to the sender. It is @@ -41,7 +44,6 @@ func (k *Keeper) EVMConfig(ctx sdk.Context) (*types.EVMConfig, error) { params := k.GetParams(ctx) ethCfg := params.ChainConfig.EthereumConfig() - // get the coinbase address from the block proposer coinbase, err := k.GetCoinbaseAddress(ctx) if err != nil { return nil, sdkerrors.Wrap(err, "failed to obtain coinbase address") @@ -78,9 +80,10 @@ func (k *Keeper) NewEVM( stateDB vm.StateDB, ) *vm.EVM { blockCtx := vm.BlockContext{ - CanTransfer: core.CanTransfer, - Transfer: core.Transfer, + CanTransfer: vm.CanTransfer, + Transfer: vm.Transfer, GetHash: k.GetHashFn(ctx), + Prepay: k.PrepayFn(ctx), Coinbase: cfg.CoinBase, GasLimit: stratos.BlockGasLimit(ctx), BlockNumber: big.NewInt(ctx.BlockHeight()), @@ -89,24 +92,25 @@ func (k *Keeper) NewEVM( BaseFee: cfg.BaseFee, } - txCtx := core.NewEVMTxContext(msg) + txCtx := vm.NewEVMTxContext(msg) if tracer == nil { tracer = k.Tracer(ctx, msg, cfg.ChainConfig) } - vmConfig := k.VMConfig(ctx, msg, cfg, tracer) - return vm.NewEVM(blockCtx, txCtx, stateDB, cfg.ChainConfig, vmConfig) + vmConfig := k.VMConfig(ctx, cfg, tracer) + return vm.NewEVM(blockCtx, txCtx, stateDB, cfg.ChainConfig, vmConfig, k.verifier) } // VMConfig creates an EVM configuration from the debug setting and the extra EIPs enabled on the // module parameters. The config generated uses the default JumpTable from the EVM. -func (k Keeper) VMConfig(ctx sdk.Context, msg core.Message, cfg *types.EVMConfig, tracer vm.EVMLogger) vm.Config { +func (k Keeper) VMConfig(ctx sdk.Context, cfg *types.EVMConfig, tracer vm.EVMLogger) vm.Config { noBaseFee := true if types.IsLondon(cfg.ChainConfig, ctx.BlockHeight()) { noBaseFee = k.GetParams(ctx).FeeMarketParams.NoBaseFee } var debug bool - if _, ok := tracer.(types.NoOpTracer); !ok { + + if _, ok := tracer.(tracers.NoOpTracer); !ok { debug = true noBaseFee = true } @@ -119,6 +123,59 @@ func (k Keeper) VMConfig(ctx sdk.Context, msg core.Message, cfg *types.EVMConfig } } +func (k *Keeper) PrepayFn(ctx sdk.Context) vm.PrepayFunc { + return func(evm *vm.EVM, from, beneficiary common.Address, amount *big.Int, gas uint64) (*big.Int, uint64, error) { + if amount.Sign() == 0 { + return nil, gas, vm.ErrExecutionReverted + } + if gas < vm.ReturnGasPrepay { + return nil, gas, vm.ErrGasUintOverflow + } + // NOTE: Required to return correct left gas amount to solidity + returnGas := gas - vm.ReturnGasPrepay + + kdb := evm.StateDB.GetKeestateDB() + kSnapshot := evm.StateDB.KeeSnapshot() + + accFrom := sdk.AccAddress(from.Bytes()) + accBeneficiary := sdk.AccAddress(beneficiary.Bytes()) + + purchased, remaining, err := k.KeeCalculatePrepayPurchaseAmount(evm.StateDB, sdk.NewIntFromBigInt(amount)) + if err != nil { + evm.StateDB.RevertToKeeSnapshot(kSnapshot) + + return nil, returnGas, vm.ErrExecutionReverted + } + + to := common.BytesToAddress(authtypes.NewModuleAddress(registertypes.TotalUnissuedPrepay)) + + if !evm.StateDB.Exist(to) { + evm.StateDB.CreateAccount(to) + } + + evm.Context.Transfer(evm.StateDB, from, to, purchased.BigInt()) + + k.registerKeeper.KeeSetRemainingOzoneLimit(kdb, remaining) + + k.AddEvents(sdk.Events{ + sdk.NewEvent( + sdstypes.EventTypePrepay, + sdk.NewAttribute(sdk.AttributeKeySender, accFrom.String()), + sdk.NewAttribute(sdstypes.AttributeKeyBeneficiary, accBeneficiary.String()), + sdk.NewAttribute(sdstypes.AttributeKeyAmount, sdk.NewIntFromBigInt(amount).String()), + sdk.NewAttribute(sdstypes.AttributeKeyPurchasedNoz, purchased.String()), + ), + sdk.NewEvent( + sdk.EventTypeMessage, + sdk.NewAttribute(sdk.AttributeKeyModule, sdstypes.AttributeValueCategory), + sdk.NewAttribute(sdk.AttributeKeySender, accFrom.String()), + ), + }) + + return purchased.BigInt(), returnGas, nil + } +} + // GetHashFn implements vm.GetHashFunc for stratos. It handles 3 cases: // 1. The requested height matches the current height from context (and thus same epoch number) // 2. The requested height is from an previous height from the same chain epoch @@ -426,6 +483,8 @@ func (k *Keeper) ApplyMessageWithConfig(ctx sdk.Context, msg core.Message, trace } } + k.ApplyEvents(ctx, vmErr != nil) + return &types.MsgEthereumTxResponse{ GasUsed: gasUsed, VmError: vmError, diff --git a/x/evm/keeper/store.go b/x/evm/keeper/store.go new file mode 100644 index 00000000..fcf4fec3 --- /dev/null +++ b/x/evm/keeper/store.go @@ -0,0 +1,42 @@ +package keeper + +import ( + "fmt" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/ethereum/go-ethereum/common" + "github.com/stratosnet/stratos-chain/x/evm/vm" + regtypes "github.com/stratosnet/stratos-chain/x/register/types" +) + +func (k Keeper) KeeGetTotalUnissuedPrepay(statedb vm.StateDB) (value sdk.Int) { + totalUnissuedPrepayAccAddr := k.accountKeeper.GetModuleAddress(regtypes.TotalUnissuedPrepay) + if totalUnissuedPrepayAccAddr == nil { + value = sdk.ZeroInt() + } else { + value = sdk.NewIntFromBigInt(statedb.GetBalance(common.BytesToAddress(totalUnissuedPrepayAccAddr))) + } + + return +} + +func (k *Keeper) KeeCalculatePrepayPurchaseAmount(statedb vm.StateDB, amount sdk.Int) (sdk.Int, sdk.Int, error) { + kdb := statedb.GetKeestateDB() + St := k.registerKeeper.KeeGetEffectiveTotalStake(kdb) + Pt := k.KeeGetTotalUnissuedPrepay(statedb) + Lt := k.registerKeeper.KeeGetRemainingOzoneLimit(kdb) + + purchase := Lt.ToDec(). + Mul(amount.ToDec()). + Quo((St. + Add(Pt). + Add(amount)).ToDec()). + TruncateInt() + if purchase.GT(Lt) { + return sdk.NewInt(0), sdk.NewInt(0), fmt.Errorf("not enough remaining ozone limit to complete prepay") + } + + remaining := Lt.Sub(purchase) + + return purchase, remaining, nil +} diff --git a/x/evm/proposal_handler.go b/x/evm/proposal_handler.go new file mode 100644 index 00000000..8ac002d3 --- /dev/null +++ b/x/evm/proposal_handler.go @@ -0,0 +1,28 @@ +package evm + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + + "github.com/stratosnet/stratos-chain/x/evm/keeper" + "github.com/stratosnet/stratos-chain/x/evm/types" +) + +// NewEVMChangeProposalHandler defines the evm changes proposals +func NewEVMChangeProposalHandler(k *keeper.Keeper) govtypes.Handler { + return func(ctx sdk.Context, content govtypes.Content) error { + pc, err := keeper.NewProposalCounsil(k, ctx) + if err != nil { + return err + } + + switch c := content.(type) { + case *types.UpdateImplmentationProposal: + return pc.UpdateProxyImplementation(c) + + default: + return sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "unrecognized proxy proposal content type: %T", c) + } + } +} diff --git a/x/evm/simulation/genesis.go b/x/evm/simulation/genesis.go index 7cd73a3c..f6d60a98 100644 --- a/x/evm/simulation/genesis.go +++ b/x/evm/simulation/genesis.go @@ -41,7 +41,7 @@ func GenEnableCall(r *rand.Rand) bool { // RandomizedGenState generates a random GenesisState for the EVM module func RandomizedGenState(simState *module.SimulationState) { feeMarketParams := types.NewFeeMarketParams(simState.Rand.Uint32()%2 == 0, simState.Rand.Uint32(), simState.Rand.Uint32(), simState.Rand.Uint64(), simState.Rand.Int63()) - + proxyParams := types.DefaultProxyProposalParams() // evm params var extraEIPs []int64 @@ -50,7 +50,7 @@ func RandomizedGenState(simState *module.SimulationState) { func(r *rand.Rand) { extraEIPs = GenExtraEIPs(r) }, ) - params := types.NewParams(types.DefaultEVMDenom, true, true, types.DefaultChainConfig(), feeMarketParams, extraEIPs...) + params := types.NewParams(types.DefaultEVMDenom, true, true, types.DefaultChainConfig(), feeMarketParams, proxyParams, extraEIPs...) evmGenesis := types.NewGenesisState(params, []types.GenesisAccount{}) bz, err := json.MarshalIndent(evmGenesis, "", " ") diff --git a/x/evm/statedb/statedb.go b/x/evm/statedb/statedb.go index e075308d..c13e1e5a 100644 --- a/x/evm/statedb/statedb.go +++ b/x/evm/statedb/statedb.go @@ -9,8 +9,9 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/ethereum/go-ethereum/common" ethtypes "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/crypto" + keestatedb "github.com/stratosnet/stratos-chain/core/statedb" + "github.com/stratosnet/stratos-chain/x/evm/vm" ) // revision is the identifier of a version of state. @@ -50,6 +51,9 @@ type StateDB struct { // Per-transaction access list accessList *accessList + + // core keestatedb for basic keeper commit state changes + keestatedb *keestatedb.KeestateDB } // New creates a new state from a given trie. @@ -62,6 +66,7 @@ func New(ctx sdk.Context, keeper Keeper, txConfig TxConfig) *StateDB { accessList: newAccessList(), logs: make([]*ethtypes.Log, 0), txConfig: txConfig, + keestatedb: keestatedb.New(ctx), } } @@ -250,8 +255,8 @@ func (s *StateDB) createObject(addr common.Address) (newobj, prev *stateObject) // CreateAccount is called during the EVM CREATE operation. The situation might arise that // a contract does the following: // -// 1. sends funds to sha(account ++ (nonce + 1)) -// 2. tx_create(sha(account ++ nonce)) (note that this gets the address of 1) +// 1. sends funds to sha(account ++ (nonce + 1)) +// 2. tx_create(sha(account ++ nonce)) (note that this gets the address of 1) // // Carrying over the balance ensures that Ether doesn't disappear. func (s *StateDB) CreateAccount(addr common.Address) { @@ -459,5 +464,30 @@ func (s *StateDB) Commit() error { } } } + if err := s.keestatedb.Commit(); err != nil { + return err + } return nil } + +// proxy methods to keestatedb + +func (s *StateDB) GetKeestateDB() *keestatedb.KeestateDB { + return s.keestatedb +} + +func (s *StateDB) GetKeeState(storeKey sdk.StoreKey, key []byte) []byte { + return s.keestatedb.GetState(storeKey, key) +} + +func (s *StateDB) SetKeeState(storeKey sdk.StoreKey, key, value []byte) { + s.keestatedb.SetState(storeKey, key, value) +} + +func (s *StateDB) RevertToKeeSnapshot(revid int) { + s.keestatedb.RevertToSnapshot(revid) +} + +func (s *StateDB) KeeSnapshot() int { + return s.keestatedb.Snapshot() +} diff --git a/x/evm/tracers/js/goja.go b/x/evm/tracers/js/goja.go index adbcfcaf..2129e89c 100644 --- a/x/evm/tracers/js/goja.go +++ b/x/evm/tracers/js/goja.go @@ -27,9 +27,11 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/ethereum/go-ethereum/core/vm" + ethvm "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/eth/tracers" + "github.com/stratosnet/stratos-chain/x/evm/tracers" + "github.com/stratosnet/stratos-chain/x/evm/vm" + jsassets "github.com/stratosnet/stratos-chain/x/evm/tracers/js/internal/tracers" ) @@ -641,7 +643,7 @@ func (s *stackObj) setupObject() *goja.Object { } type dbObj struct { - db vm.StateDB + db ethvm.StateDB vm *goja.Runtime toBig toBigFn toBuf toBufFn diff --git a/x/evm/tracers/logger/access_list_tracer.go b/x/evm/tracers/logger/access_list_tracer.go new file mode 100644 index 00000000..88cad6c1 --- /dev/null +++ b/x/evm/tracers/logger/access_list_tracer.go @@ -0,0 +1,184 @@ +// Copyright 2021 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package logger + +import ( + "math/big" + "time" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/stratosnet/stratos-chain/x/evm/vm" +) + +// accessList is an accumulator for the set of accounts and storage slots an EVM +// contract execution touches. +type accessList map[common.Address]accessListSlots + +// accessListSlots is an accumulator for the set of storage slots within a single +// contract that an EVM contract execution touches. +type accessListSlots map[common.Hash]struct{} + +// newAccessList creates a new accessList. +func newAccessList() accessList { + return make(map[common.Address]accessListSlots) +} + +// addAddress adds an address to the accesslist. +func (al accessList) addAddress(address common.Address) { + // Set address if not previously present + if _, present := al[address]; !present { + al[address] = make(map[common.Hash]struct{}) + } +} + +// addSlot adds a storage slot to the accesslist. +func (al accessList) addSlot(address common.Address, slot common.Hash) { + // Set address if not previously present + al.addAddress(address) + + // Set the slot on the surely existent storage set + al[address][slot] = struct{}{} +} + +// equal checks if the content of the current access list is the same as the +// content of the other one. +func (al accessList) equal(other accessList) bool { + // Cross reference the accounts first + if len(al) != len(other) { + return false + } + // Given that len(al) == len(other), we only need to check that + // all the items from al are in other. + for addr := range al { + if _, ok := other[addr]; !ok { + return false + } + } + + // Accounts match, cross reference the storage slots too + for addr, slots := range al { + otherslots := other[addr] + + if len(slots) != len(otherslots) { + return false + } + // Given that len(slots) == len(otherslots), we only need to check that + // all the items from slots are in otherslots. + for hash := range slots { + if _, ok := otherslots[hash]; !ok { + return false + } + } + } + return true +} + +// accesslist converts the accesslist to a types.AccessList. +func (al accessList) accessList() types.AccessList { + acl := make(types.AccessList, 0, len(al)) + for addr, slots := range al { + tuple := types.AccessTuple{Address: addr, StorageKeys: []common.Hash{}} + for slot := range slots { + tuple.StorageKeys = append(tuple.StorageKeys, slot) + } + acl = append(acl, tuple) + } + return acl +} + +// AccessListTracer is a tracer that accumulates touched accounts and storage +// slots into an internal set. +type AccessListTracer struct { + excl map[common.Address]struct{} // Set of account to exclude from the list + list accessList // Set of accounts and storage slots touched +} + +// NewAccessListTracer creates a new tracer that can generate AccessLists. +// An optional AccessList can be specified to occupy slots and addresses in +// the resulting accesslist. +func NewAccessListTracer(acl types.AccessList, from, to common.Address, precompiles []common.Address) *AccessListTracer { + excl := map[common.Address]struct{}{ + from: {}, to: {}, + } + for _, addr := range precompiles { + excl[addr] = struct{}{} + } + list := newAccessList() + for _, al := range acl { + if _, ok := excl[al.Address]; !ok { + list.addAddress(al.Address) + } + for _, slot := range al.StorageKeys { + list.addSlot(al.Address, slot) + } + } + return &AccessListTracer{ + excl: excl, + list: list, + } +} + +func (a *AccessListTracer) CaptureStart(env *vm.EVM, from common.Address, to common.Address, create bool, input []byte, gas uint64, value *big.Int) { +} + +// CaptureState captures all opcodes that touch storage or addresses and adds them to the accesslist. +func (a *AccessListTracer) CaptureState(pc uint64, op vm.OpCode, gas, cost uint64, scope *vm.ScopeContext, rData []byte, depth int, err error) { + stack := scope.Stack + stackData := stack.Data() + stackLen := len(stackData) + if (op == vm.SLOAD || op == vm.SSTORE) && stackLen >= 1 { + slot := common.Hash(stackData[stackLen-1].Bytes32()) + a.list.addSlot(scope.Contract.Address(), slot) + } + if (op == vm.EXTCODECOPY || op == vm.EXTCODEHASH || op == vm.EXTCODESIZE || op == vm.BALANCE || op == vm.SELFDESTRUCT) && stackLen >= 1 { + addr := common.Address(stackData[stackLen-1].Bytes20()) + if _, ok := a.excl[addr]; !ok { + a.list.addAddress(addr) + } + } + if (op == vm.DELEGATECALL || op == vm.CALL || op == vm.STATICCALL || op == vm.CALLCODE) && stackLen >= 5 { + addr := common.Address(stackData[stackLen-2].Bytes20()) + if _, ok := a.excl[addr]; !ok { + a.list.addAddress(addr) + } + } +} + +func (*AccessListTracer) CaptureFault(pc uint64, op vm.OpCode, gas, cost uint64, scope *vm.ScopeContext, depth int, err error) { +} + +func (*AccessListTracer) CaptureEnd(output []byte, gasUsed uint64, t time.Duration, err error) {} + +func (*AccessListTracer) CaptureEnter(typ vm.OpCode, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) { +} + +func (*AccessListTracer) CaptureExit(output []byte, gasUsed uint64, err error) {} + +func (*AccessListTracer) CaptureTxStart(gasLimit uint64) {} + +func (*AccessListTracer) CaptureTxEnd(restGas uint64) {} + +// AccessList returns the current accesslist maintained by the tracer. +func (a *AccessListTracer) AccessList() types.AccessList { + return a.list.accessList() +} + +// Equal returns if the content of two access list traces are equal. +func (a *AccessListTracer) Equal(other *AccessListTracer) bool { + return a.list.equal(other.list) +} diff --git a/x/evm/tracers/logger/gen_structlog.go b/x/evm/tracers/logger/gen_structlog.go new file mode 100644 index 00000000..f6968a0f --- /dev/null +++ b/x/evm/tracers/logger/gen_structlog.go @@ -0,0 +1,110 @@ +// Code generated by github.com/fjl/gencodec. DO NOT EDIT. + +package logger + +import ( + "encoding/json" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/ethereum/go-ethereum/common/math" + "github.com/stratosnet/stratos-chain/x/evm/vm" + "github.com/holiman/uint256" +) + +var _ = (*structLogMarshaling)(nil) + +// MarshalJSON marshals as JSON. +func (s StructLog) MarshalJSON() ([]byte, error) { + type StructLog struct { + Pc uint64 `json:"pc"` + Op vm.OpCode `json:"op"` + Gas math.HexOrDecimal64 `json:"gas"` + GasCost math.HexOrDecimal64 `json:"gasCost"` + Memory hexutil.Bytes `json:"memory,omitempty"` + MemorySize int `json:"memSize"` + Stack []uint256.Int `json:"stack"` + ReturnData hexutil.Bytes `json:"returnData,omitempty"` + Storage map[common.Hash]common.Hash `json:"-"` + Depth int `json:"depth"` + RefundCounter uint64 `json:"refund"` + Err error `json:"-"` + OpName string `json:"opName"` + ErrorString string `json:"error,omitempty"` + } + var enc StructLog + enc.Pc = s.Pc + enc.Op = s.Op + enc.Gas = math.HexOrDecimal64(s.Gas) + enc.GasCost = math.HexOrDecimal64(s.GasCost) + enc.Memory = s.Memory + enc.MemorySize = s.MemorySize + enc.Stack = s.Stack + enc.ReturnData = s.ReturnData + enc.Storage = s.Storage + enc.Depth = s.Depth + enc.RefundCounter = s.RefundCounter + enc.Err = s.Err + enc.OpName = s.OpName() + enc.ErrorString = s.ErrorString() + return json.Marshal(&enc) +} + +// UnmarshalJSON unmarshals from JSON. +func (s *StructLog) UnmarshalJSON(input []byte) error { + type StructLog struct { + Pc *uint64 `json:"pc"` + Op *vm.OpCode `json:"op"` + Gas *math.HexOrDecimal64 `json:"gas"` + GasCost *math.HexOrDecimal64 `json:"gasCost"` + Memory *hexutil.Bytes `json:"memory,omitempty"` + MemorySize *int `json:"memSize"` + Stack []uint256.Int `json:"stack"` + ReturnData *hexutil.Bytes `json:"returnData,omitempty"` + Storage map[common.Hash]common.Hash `json:"-"` + Depth *int `json:"depth"` + RefundCounter *uint64 `json:"refund"` + Err error `json:"-"` + } + var dec StructLog + if err := json.Unmarshal(input, &dec); err != nil { + return err + } + if dec.Pc != nil { + s.Pc = *dec.Pc + } + if dec.Op != nil { + s.Op = *dec.Op + } + if dec.Gas != nil { + s.Gas = uint64(*dec.Gas) + } + if dec.GasCost != nil { + s.GasCost = uint64(*dec.GasCost) + } + if dec.Memory != nil { + s.Memory = *dec.Memory + } + if dec.MemorySize != nil { + s.MemorySize = *dec.MemorySize + } + if dec.Stack != nil { + s.Stack = dec.Stack + } + if dec.ReturnData != nil { + s.ReturnData = *dec.ReturnData + } + if dec.Storage != nil { + s.Storage = dec.Storage + } + if dec.Depth != nil { + s.Depth = *dec.Depth + } + if dec.RefundCounter != nil { + s.RefundCounter = *dec.RefundCounter + } + if dec.Err != nil { + s.Err = dec.Err + } + return nil +} diff --git a/x/evm/tracers/logger/logger.go b/x/evm/tracers/logger/logger.go new file mode 100644 index 00000000..bfedb004 --- /dev/null +++ b/x/evm/tracers/logger/logger.go @@ -0,0 +1,464 @@ +// Copyright 2021 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package logger + +import ( + "encoding/hex" + "encoding/json" + "fmt" + "io" + "math/big" + "strings" + "sync/atomic" + "time" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/ethereum/go-ethereum/common/math" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/params" + "github.com/holiman/uint256" + "github.com/stratosnet/stratos-chain/x/evm/vm" +) + +// Storage represents a contract's storage. +type Storage map[common.Hash]common.Hash + +// Copy duplicates the current storage. +func (s Storage) Copy() Storage { + cpy := make(Storage, len(s)) + for key, value := range s { + cpy[key] = value + } + return cpy +} + +// Config are the configuration options for structured logger the EVM +type Config struct { + EnableMemory bool // enable memory capture + DisableStack bool // disable stack capture + DisableStorage bool // disable storage capture + EnableReturnData bool // enable return data capture + Debug bool // print output during capture end + Limit int // maximum length of output, but zero means unlimited + // Chain overrides, can be used to execute a trace using future fork rules + Overrides *params.ChainConfig `json:"overrides,omitempty"` +} + +//go:generate go run github.com/fjl/gencodec -type StructLog -field-override structLogMarshaling -out gen_structlog.go + +// StructLog is emitted to the EVM each cycle and lists information about the current internal state +// prior to the execution of the statement. +type StructLog struct { + Pc uint64 `json:"pc"` + Op vm.OpCode `json:"op"` + Gas uint64 `json:"gas"` + GasCost uint64 `json:"gasCost"` + Memory []byte `json:"memory,omitempty"` + MemorySize int `json:"memSize"` + Stack []uint256.Int `json:"stack"` + ReturnData []byte `json:"returnData,omitempty"` + Storage map[common.Hash]common.Hash `json:"-"` + Depth int `json:"depth"` + RefundCounter uint64 `json:"refund"` + Err error `json:"-"` +} + +// overrides for gencodec +type structLogMarshaling struct { + Gas math.HexOrDecimal64 + GasCost math.HexOrDecimal64 + Memory hexutil.Bytes + ReturnData hexutil.Bytes + OpName string `json:"opName"` // adds call to OpName() in MarshalJSON + ErrorString string `json:"error,omitempty"` // adds call to ErrorString() in MarshalJSON +} + +// OpName formats the operand name in a human-readable format. +func (s *StructLog) OpName() string { + return s.Op.String() +} + +// ErrorString formats the log's error as a string. +func (s *StructLog) ErrorString() string { + if s.Err != nil { + return s.Err.Error() + } + return "" +} + +// StructLogger is an EVM state logger and implements EVMLogger. +// +// StructLogger can capture state based on the given Log configuration and also keeps +// a track record of modified storage which is used in reporting snapshots of the +// contract their storage. +type StructLogger struct { + cfg Config + env *vm.EVM + + storage map[common.Address]Storage + logs []StructLog + output []byte + err error + gasLimit uint64 + usedGas uint64 + + interrupt uint32 // Atomic flag to signal execution interruption + reason error // Textual reason for the interruption +} + +// NewStructLogger returns a new logger +func NewStructLogger(cfg *Config) *StructLogger { + logger := &StructLogger{ + storage: make(map[common.Address]Storage), + } + if cfg != nil { + logger.cfg = *cfg + } + return logger +} + +// Reset clears the data held by the logger. +func (l *StructLogger) Reset() { + l.storage = make(map[common.Address]Storage) + l.output = make([]byte, 0) + l.logs = l.logs[:0] + l.err = nil +} + +// CaptureStart implements the EVMLogger interface to initialize the tracing operation. +func (l *StructLogger) CaptureStart(env *vm.EVM, from common.Address, to common.Address, create bool, input []byte, gas uint64, value *big.Int) { + l.env = env +} + +// CaptureState logs a new structured log message and pushes it out to the environment +// +// CaptureState also tracks SLOAD/SSTORE ops to track storage change. +func (l *StructLogger) CaptureState(pc uint64, op vm.OpCode, gas, cost uint64, scope *vm.ScopeContext, rData []byte, depth int, err error) { + // If tracing was interrupted, set the error and stop + if atomic.LoadUint32(&l.interrupt) > 0 { + l.env.Cancel() + return + } + // check if already accumulated the specified number of logs + if l.cfg.Limit != 0 && l.cfg.Limit <= len(l.logs) { + return + } + + memory := scope.Memory + stack := scope.Stack + contract := scope.Contract + // Copy a snapshot of the current memory state to a new buffer + var mem []byte + if l.cfg.EnableMemory { + mem = make([]byte, len(memory.Data())) + copy(mem, memory.Data()) + } + // Copy a snapshot of the current stack state to a new buffer + var stck []uint256.Int + if !l.cfg.DisableStack { + stck = make([]uint256.Int, len(stack.Data())) + for i, item := range stack.Data() { + stck[i] = item + } + } + stackData := stack.Data() + stackLen := len(stackData) + // Copy a snapshot of the current storage to a new container + var storage Storage + if !l.cfg.DisableStorage && (op == vm.SLOAD || op == vm.SSTORE) { + // initialise new changed values storage container for this contract + // if not present. + if l.storage[contract.Address()] == nil { + l.storage[contract.Address()] = make(Storage) + } + // capture SLOAD opcodes and record the read entry in the local storage + if op == vm.SLOAD && stackLen >= 1 { + var ( + address = common.Hash(stackData[stackLen-1].Bytes32()) + value = l.env.StateDB.GetState(contract.Address(), address) + ) + l.storage[contract.Address()][address] = value + storage = l.storage[contract.Address()].Copy() + } else if op == vm.SSTORE && stackLen >= 2 { + // capture SSTORE opcodes and record the written entry in the local storage. + var ( + value = common.Hash(stackData[stackLen-2].Bytes32()) + address = common.Hash(stackData[stackLen-1].Bytes32()) + ) + l.storage[contract.Address()][address] = value + storage = l.storage[contract.Address()].Copy() + } + } + var rdata []byte + if l.cfg.EnableReturnData { + rdata = make([]byte, len(rData)) + copy(rdata, rData) + } + // create a new snapshot of the EVM. + log := StructLog{pc, op, gas, cost, mem, memory.Len(), stck, rdata, storage, depth, l.env.StateDB.GetRefund(), err} + l.logs = append(l.logs, log) +} + +// CaptureFault implements the EVMLogger interface to trace an execution fault +// while running an opcode. +func (l *StructLogger) CaptureFault(pc uint64, op vm.OpCode, gas, cost uint64, scope *vm.ScopeContext, depth int, err error) { +} + +// CaptureEnd is called after the call finishes to finalize the tracing. +func (l *StructLogger) CaptureEnd(output []byte, gasUsed uint64, t time.Duration, err error) { + l.output = output + l.err = err + if l.cfg.Debug { + fmt.Printf("%#x\n", output) + if err != nil { + fmt.Printf(" error: %v\n", err) + } + } +} + +func (l *StructLogger) CaptureEnter(typ vm.OpCode, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) { +} + +func (l *StructLogger) CaptureExit(output []byte, gasUsed uint64, err error) { +} + +func (l *StructLogger) GetResult() (json.RawMessage, error) { + // Tracing aborted + if l.reason != nil { + return nil, l.reason + } + failed := l.err != nil + returnData := common.CopyBytes(l.output) + // Return data when successful and revert reason when reverted, otherwise empty. + returnVal := fmt.Sprintf("%x", returnData) + if failed && l.err != vm.ErrExecutionReverted { + returnVal = "" + } + return json.Marshal(&ExecutionResult{ + Gas: l.usedGas, + Failed: failed, + ReturnValue: returnVal, + StructLogs: formatLogs(l.StructLogs()), + }) +} + +// Stop terminates execution of the tracer at the first opportune moment. +func (l *StructLogger) Stop(err error) { + l.reason = err + atomic.StoreUint32(&l.interrupt, 1) +} + +func (l *StructLogger) CaptureTxStart(gasLimit uint64) { + l.gasLimit = gasLimit +} + +func (l *StructLogger) CaptureTxEnd(restGas uint64) { + l.usedGas = l.gasLimit - restGas +} + +// StructLogs returns the captured log entries. +func (l *StructLogger) StructLogs() []StructLog { return l.logs } + +// Error returns the VM error captured by the trace. +func (l *StructLogger) Error() error { return l.err } + +// Output returns the VM return value captured by the trace. +func (l *StructLogger) Output() []byte { return l.output } + +// WriteTrace writes a formatted trace to the given writer +func WriteTrace(writer io.Writer, logs []StructLog) { + for _, log := range logs { + fmt.Fprintf(writer, "%-16spc=%08d gas=%v cost=%v", log.Op, log.Pc, log.Gas, log.GasCost) + if log.Err != nil { + fmt.Fprintf(writer, " ERROR: %v", log.Err) + } + fmt.Fprintln(writer) + + if len(log.Stack) > 0 { + fmt.Fprintln(writer, "Stack:") + for i := len(log.Stack) - 1; i >= 0; i-- { + fmt.Fprintf(writer, "%08d %s\n", len(log.Stack)-i-1, log.Stack[i].Hex()) + } + } + if len(log.Memory) > 0 { + fmt.Fprintln(writer, "Memory:") + fmt.Fprint(writer, hex.Dump(log.Memory)) + } + if len(log.Storage) > 0 { + fmt.Fprintln(writer, "Storage:") + for h, item := range log.Storage { + fmt.Fprintf(writer, "%x: %x\n", h, item) + } + } + if len(log.ReturnData) > 0 { + fmt.Fprintln(writer, "ReturnData:") + fmt.Fprint(writer, hex.Dump(log.ReturnData)) + } + fmt.Fprintln(writer) + } +} + +// WriteLogs writes vm logs in a readable format to the given writer +func WriteLogs(writer io.Writer, logs []*types.Log) { + for _, log := range logs { + fmt.Fprintf(writer, "LOG%d: %x bn=%d txi=%x\n", len(log.Topics), log.Address, log.BlockNumber, log.TxIndex) + + for i, topic := range log.Topics { + fmt.Fprintf(writer, "%08d %x\n", i, topic) + } + + fmt.Fprint(writer, hex.Dump(log.Data)) + fmt.Fprintln(writer) + } +} + +type mdLogger struct { + out io.Writer + cfg *Config + env *vm.EVM +} + +// NewMarkdownLogger creates a logger which outputs information in a format adapted +// for human readability, and is also a valid markdown table +func NewMarkdownLogger(cfg *Config, writer io.Writer) *mdLogger { + l := &mdLogger{out: writer, cfg: cfg} + if l.cfg == nil { + l.cfg = &Config{} + } + return l +} + +func (t *mdLogger) CaptureStart(env *vm.EVM, from common.Address, to common.Address, create bool, input []byte, gas uint64, value *big.Int) { + t.env = env + if !create { + fmt.Fprintf(t.out, "From: `%v`\nTo: `%v`\nData: `%#x`\nGas: `%d`\nValue `%v` wei\n", + from.String(), to.String(), + input, gas, value) + } else { + fmt.Fprintf(t.out, "From: `%v`\nCreate at: `%v`\nData: `%#x`\nGas: `%d`\nValue `%v` wei\n", + from.String(), to.String(), + input, gas, value) + } + + fmt.Fprintf(t.out, ` +| Pc | Op | Cost | Stack | RStack | Refund | +|-------|-------------|------|-----------|-----------|---------| +`) +} + +// CaptureState also tracks SLOAD/SSTORE ops to track storage change. +func (t *mdLogger) CaptureState(pc uint64, op vm.OpCode, gas, cost uint64, scope *vm.ScopeContext, rData []byte, depth int, err error) { + stack := scope.Stack + fmt.Fprintf(t.out, "| %4d | %10v | %3d |", pc, op, cost) + + if !t.cfg.DisableStack { + // format stack + var a []string + for _, elem := range stack.Data() { + a = append(a, elem.Hex()) + } + b := fmt.Sprintf("[%v]", strings.Join(a, ",")) + fmt.Fprintf(t.out, "%10v |", b) + } + fmt.Fprintf(t.out, "%10v |", t.env.StateDB.GetRefund()) + fmt.Fprintln(t.out, "") + if err != nil { + fmt.Fprintf(t.out, "Error: %v\n", err) + } +} + +func (t *mdLogger) CaptureFault(pc uint64, op vm.OpCode, gas, cost uint64, scope *vm.ScopeContext, depth int, err error) { + fmt.Fprintf(t.out, "\nError: at pc=%d, op=%v: %v\n", pc, op, err) +} + +func (t *mdLogger) CaptureEnd(output []byte, gasUsed uint64, tm time.Duration, err error) { + fmt.Fprintf(t.out, "\nOutput: `%#x`\nConsumed gas: `%d`\nError: `%v`\n", + output, gasUsed, err) +} + +func (t *mdLogger) CaptureEnter(typ vm.OpCode, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) { +} + +func (t *mdLogger) CaptureExit(output []byte, gasUsed uint64, err error) {} + +func (*mdLogger) CaptureTxStart(gasLimit uint64) {} + +func (*mdLogger) CaptureTxEnd(restGas uint64) {} + +// ExecutionResult groups all structured logs emitted by the EVM +// while replaying a transaction in debug mode as well as transaction +// execution status, the amount of gas used and the return value +type ExecutionResult struct { + Gas uint64 `json:"gas"` + Failed bool `json:"failed"` + ReturnValue string `json:"returnValue"` + StructLogs []StructLogRes `json:"structLogs"` +} + +// StructLogRes stores a structured log emitted by the EVM while replaying a +// transaction in debug mode +type StructLogRes struct { + Pc uint64 `json:"pc"` + Op string `json:"op"` + Gas uint64 `json:"gas"` + GasCost uint64 `json:"gasCost"` + Depth int `json:"depth"` + Error string `json:"error,omitempty"` + Stack *[]string `json:"stack,omitempty"` + Memory *[]string `json:"memory,omitempty"` + Storage *map[string]string `json:"storage,omitempty"` + RefundCounter uint64 `json:"refund,omitempty"` +} + +// formatLogs formats EVM returned structured logs for json output +func formatLogs(logs []StructLog) []StructLogRes { + formatted := make([]StructLogRes, len(logs)) + for index, trace := range logs { + formatted[index] = StructLogRes{ + Pc: trace.Pc, + Op: trace.Op.String(), + Gas: trace.Gas, + GasCost: trace.GasCost, + Depth: trace.Depth, + Error: trace.ErrorString(), + RefundCounter: trace.RefundCounter, + } + if trace.Stack != nil { + stack := make([]string, len(trace.Stack)) + for i, stackValue := range trace.Stack { + stack[i] = stackValue.Hex() + } + formatted[index].Stack = &stack + } + if trace.Memory != nil { + memory := make([]string, 0, (len(trace.Memory)+31)/32) + for i := 0; i+32 <= len(trace.Memory); i += 32 { + memory = append(memory, fmt.Sprintf("%x", trace.Memory[i:i+32])) + } + formatted[index].Memory = &memory + } + if trace.Storage != nil { + storage := make(map[string]string) + for i, storageValue := range trace.Storage { + storage[fmt.Sprintf("%x", i)] = fmt.Sprintf("%x", storageValue) + } + formatted[index].Storage = &storage + } + } + return formatted +} diff --git a/x/evm/tracers/logger/logger_json.go b/x/evm/tracers/logger/logger_json.go new file mode 100644 index 00000000..fb5a4e10 --- /dev/null +++ b/x/evm/tracers/logger/logger_json.go @@ -0,0 +1,104 @@ +// Copyright 2021 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package logger + +import ( + "encoding/json" + "io" + "math/big" + "time" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/common/math" + "github.com/stratosnet/stratos-chain/x/evm/vm" +) + +type JSONLogger struct { + encoder *json.Encoder + cfg *Config + env *vm.EVM +} + +// NewJSONLogger creates a new EVM tracer that prints execution steps as JSON objects +// into the provided stream. +func NewJSONLogger(cfg *Config, writer io.Writer) *JSONLogger { + l := &JSONLogger{encoder: json.NewEncoder(writer), cfg: cfg} + if l.cfg == nil { + l.cfg = &Config{} + } + return l +} + +func (l *JSONLogger) CaptureStart(env *vm.EVM, from, to common.Address, create bool, input []byte, gas uint64, value *big.Int) { + l.env = env +} + +func (l *JSONLogger) CaptureFault(pc uint64, op vm.OpCode, gas uint64, cost uint64, scope *vm.ScopeContext, depth int, err error) { + // TODO: Add rData to this interface as well + l.CaptureState(pc, op, gas, cost, scope, nil, depth, err) +} + +// CaptureState outputs state information on the logger. +func (l *JSONLogger) CaptureState(pc uint64, op vm.OpCode, gas, cost uint64, scope *vm.ScopeContext, rData []byte, depth int, err error) { + memory := scope.Memory + stack := scope.Stack + + log := StructLog{ + Pc: pc, + Op: op, + Gas: gas, + GasCost: cost, + MemorySize: memory.Len(), + Depth: depth, + RefundCounter: l.env.StateDB.GetRefund(), + Err: err, + } + if l.cfg.EnableMemory { + log.Memory = memory.Data() + } + if !l.cfg.DisableStack { + log.Stack = stack.Data() + } + if l.cfg.EnableReturnData { + log.ReturnData = rData + } + l.encoder.Encode(log) +} + +// CaptureEnd is triggered at end of execution. +func (l *JSONLogger) CaptureEnd(output []byte, gasUsed uint64, t time.Duration, err error) { + type endLog struct { + Output string `json:"output"` + GasUsed math.HexOrDecimal64 `json:"gasUsed"` + Time time.Duration `json:"time"` + Err string `json:"error,omitempty"` + } + var errMsg string + if err != nil { + errMsg = err.Error() + } + l.encoder.Encode(endLog{common.Bytes2Hex(output), math.HexOrDecimal64(gasUsed), t, errMsg}) +} + +func (l *JSONLogger) CaptureEnter(typ vm.OpCode, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) { +} + +func (l *JSONLogger) CaptureExit(output []byte, gasUsed uint64, err error) {} + +func (l *JSONLogger) CaptureTxStart(gasLimit uint64) {} + +func (l *JSONLogger) CaptureTxEnd(restGas uint64) {} diff --git a/x/evm/tracers/native/4byte.go b/x/evm/tracers/native/4byte.go index 34e608bf..6f5081db 100644 --- a/x/evm/tracers/native/4byte.go +++ b/x/evm/tracers/native/4byte.go @@ -24,8 +24,8 @@ import ( "time" "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/vm" - "github.com/ethereum/go-ethereum/eth/tracers" + "github.com/stratosnet/stratos-chain/x/evm/tracers" + "github.com/stratosnet/stratos-chain/x/evm/vm" ) func init() { @@ -37,14 +37,15 @@ func init() { // a reversed signature can be matched against the size of the data. // // Example: -// > debug.traceTransaction( "0x214e597e35da083692f5386141e69f47e973b2c56e7a8073b1ea08fd7571e9de", {tracer: "4byteTracer"}) -// { -// 0x27dc297e-128: 1, -// 0x38cc4831-0: 2, -// 0x524f3889-96: 1, -// 0xadf59f99-288: 1, -// 0xc281d19e-0: 1 -// } +// +// > debug.traceTransaction( "0x214e597e35da083692f5386141e69f47e973b2c56e7a8073b1ea08fd7571e9de", {tracer: "4byteTracer"}) +// { +// 0x27dc297e-128: 1, +// 0x38cc4831-0: 2, +// 0x524f3889-96: 1, +// 0xadf59f99-288: 1, +// 0xc281d19e-0: 1 +// } type fourByteTracer struct { env *vm.EVM ids map[string]int // ids aggregates the 4byte ids found diff --git a/x/evm/tracers/native/call.go b/x/evm/tracers/native/call.go index 7af0e658..a224e244 100644 --- a/x/evm/tracers/native/call.go +++ b/x/evm/tracers/native/call.go @@ -26,8 +26,8 @@ import ( "time" "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/vm" - "github.com/ethereum/go-ethereum/eth/tracers" + "github.com/stratosnet/stratos-chain/x/evm/tracers" + "github.com/stratosnet/stratos-chain/x/evm/vm" ) func init() { diff --git a/x/evm/tracers/native/noop.go b/x/evm/tracers/native/noop.go index c252b240..fa7f73be 100644 --- a/x/evm/tracers/native/noop.go +++ b/x/evm/tracers/native/noop.go @@ -22,8 +22,8 @@ import ( "time" "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/vm" - "github.com/ethereum/go-ethereum/eth/tracers" + "github.com/stratosnet/stratos-chain/x/evm/tracers" + "github.com/stratosnet/stratos-chain/x/evm/vm" ) func init() { diff --git a/x/evm/tracers/native/prestate.go b/x/evm/tracers/native/prestate.go index b513f383..83279e1f 100644 --- a/x/evm/tracers/native/prestate.go +++ b/x/evm/tracers/native/prestate.go @@ -24,9 +24,9 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/eth/tracers" + "github.com/stratosnet/stratos-chain/x/evm/tracers" + "github.com/stratosnet/stratos-chain/x/evm/vm" ) func init() { diff --git a/x/evm/tracers/native/revertreason.go b/x/evm/tracers/native/revertreason.go index d09b8610..db9fbcf4 100644 --- a/x/evm/tracers/native/revertreason.go +++ b/x/evm/tracers/native/revertreason.go @@ -25,9 +25,9 @@ import ( "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/eth/tracers" + "github.com/stratosnet/stratos-chain/x/evm/tracers" + "github.com/stratosnet/stratos-chain/x/evm/vm" ) func init() { diff --git a/x/evm/tracers/native/tracer.go b/x/evm/tracers/native/tracer.go index fda3e659..468e44b3 100644 --- a/x/evm/tracers/native/tracer.go +++ b/x/evm/tracers/native/tracer.go @@ -27,9 +27,11 @@ Aside from implementing the tracer, it also needs to register itself, using the Example: ```golang -func init() { - register("noopTracerNative", newNoopTracer) -} + + func init() { + register("noopTracerNative", newNoopTracer) + } + ``` */ package native @@ -38,7 +40,7 @@ import ( "encoding/json" "errors" - "github.com/ethereum/go-ethereum/eth/tracers" + "github.com/stratosnet/stratos-chain/x/evm/tracers" ) // InitTracer retrieves the Go transaction tracers included in go-ethereum. diff --git a/x/evm/types/tracer.go b/x/evm/tracers/tracers.go similarity index 64% rename from x/evm/types/tracer.go rename to x/evm/tracers/tracers.go index ea22fd55..4f2f9d9a 100644 --- a/x/evm/types/tracer.go +++ b/x/evm/tracers/tracers.go @@ -1,6 +1,25 @@ -package types +// Copyright 2017 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +// Package tracers is a manager for transaction tracing engines. +package tracers import ( + "encoding/json" + "errors" "fmt" "math/big" "os" @@ -8,11 +27,68 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core" - "github.com/ethereum/go-ethereum/core/vm" - "github.com/ethereum/go-ethereum/eth/tracers/logger" "github.com/ethereum/go-ethereum/params" + + "github.com/stratosnet/stratos-chain/x/evm/tracers/logger" + "github.com/stratosnet/stratos-chain/x/evm/vm" ) +type TraceConfig struct { + *logger.Config + Tracer *string + Timeout *string + Reexec *uint64 + // Config specific to given tracer. Note struct logger + // config are historically embedded in main object. + TracerConfig json.RawMessage +} + +// Context contains some contextual infos for a transaction execution that is not +// available from within the EVM object. +type Context struct { + BlockHash common.Hash // Hash of the block the tx is contained within (zero if dangling tx or call) + TxIndex int // Index of the transaction within a block (zero if dangling tx or call) + TxHash common.Hash // Hash of the transaction being traced (zero if dangling call) +} + +// Tracer interface extends vm.EVMLogger and additionally +// allows collecting the tracing result. +type Tracer interface { + vm.EVMLogger + GetResult() (json.RawMessage, error) + // Stop terminates execution of the tracer at the first opportune moment. + Stop(err error) +} + +type lookupFunc func(string, *Context, json.RawMessage) (Tracer, error) + +var ( + lookups []lookupFunc +) + +// RegisterLookup registers a method as a lookup for tracers, meaning that +// users can invoke a named tracer through that lookup. If 'wildcard' is true, +// then the lookup will be placed last. This is typically meant for interpreted +// engines (js) which can evaluate dynamic user-supplied code. +func RegisterLookup(wildcard bool, lookup lookupFunc) { + if wildcard { + lookups = append(lookups, lookup) + } else { + lookups = append([]lookupFunc{lookup}, lookups...) + } +} + +// New returns a new instance of a tracer, by iterating through the +// registered lookups. +func New(code string, ctx *Context, cfg json.RawMessage) (Tracer, error) { + for _, lookup := range lookups { + if tracer, err := lookup(code, ctx, cfg); err == nil { + return tracer, nil + } + } + return nil, errors.New("tracer not found") +} + const ( TracerAccessList = "access_list" TracerJSON = "json" diff --git a/x/evm/types/codec.go b/x/evm/types/codec.go index 0e0af3cd..a6e7889c 100644 --- a/x/evm/types/codec.go +++ b/x/evm/types/codec.go @@ -6,6 +6,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/types/msgservice" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" "github.com/gogo/protobuf/proto" ) @@ -15,6 +16,11 @@ type ( ExtensionOptionsEthereumTxI interface{} ) +// RegisterLegacyAminoCodec RegisterCodec registers concrete types on codec +func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { + cdc.RegisterConcrete(&UpdateImplmentationProposal{}, "cosmos-sdk/UpdateImplmentationProposal", nil) +} + // RegisterInterfaces registers the client interfaces to protobuf Any. func RegisterInterfaces(registry codectypes.InterfaceRegistry) { registry.RegisterImplementations( @@ -33,6 +39,12 @@ func RegisterInterfaces(registry codectypes.InterfaceRegistry) { &AccessListTx{}, &LegacyTx{}, ) + // for gov + registry.RegisterInterface( + "cosmos.gov.v1beta1.Content", + (*govtypes.Content)(nil), + &UpdateImplmentationProposal{}, + ) msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) } diff --git a/x/evm/types/contracts.go b/x/evm/types/contracts.go new file mode 100644 index 00000000..6fa1f154 --- /dev/null +++ b/x/evm/types/contracts.go @@ -0,0 +1,23 @@ +package types + +import ( + "strings" + + "github.com/ethereum/go-ethereum/accounts/abi" +) + +const ( + TransparentUpgradableProxyABI = "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"changeAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}]" +) + +var ( + TransparentUpgradableProxyBin = "0x608060405260405162000ed038038062000ed08339810160408190526200002691620004a0565b828162000036828260006200004d565b50620000449050826200008a565b505050620005d3565b6200005883620000e5565b600082511180620000665750805b1562000085576200008383836200012760201b620001691760201c565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f620000b562000156565b604080516001600160a01b03928316815291841660208301520160405180910390a1620000e2816200018f565b50565b620000f08162000244565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606200014f838360405180606001604052806027815260200162000ea960279139620002f8565b9392505050565b60006200018060008051602062000e8983398151915260001b6200037760201b620001951760201c565b546001600160a01b0316919050565b6001600160a01b038116620001fa5760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b806200022360008051602062000e8983398151915260001b6200037760201b620001951760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b6200025a816200037a60201b620001981760201c565b620002be5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401620001f1565b80620002237f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b6200037760201b620001951760201c565b6060600080856001600160a01b03168560405162000317919062000580565b600060405180830381855af49150503d806000811462000354576040519150601f19603f3d011682016040523d82523d6000602084013e62000359565b606091505b5090925090506200036d8683838762000389565b9695505050505050565b90565b6001600160a01b03163b151590565b60608315620003fd578251600003620003f5576001600160a01b0385163b620003f55760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401620001f1565b508162000409565b62000409838362000411565b949350505050565b815115620004225781518083602001fd5b8060405162461bcd60e51b8152600401620001f191906200059e565b80516001600160a01b03811681146200045657600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b838110156200048e57818101518382015260200162000474565b83811115620000835750506000910152565b600080600060608486031215620004b657600080fd5b620004c1846200043e565b9250620004d1602085016200043e565b60408501519092506001600160401b0380821115620004ef57600080fd5b818601915086601f8301126200050457600080fd5b8151818111156200051957620005196200045b565b604051601f8201601f19908116603f011681019083821181831017156200054457620005446200045b565b816040528281528960208487010111156200055e57600080fd5b6200057183602083016020880162000471565b80955050505050509250925092565b600082516200059481846020870162000471565b9190910192915050565b6020815260008251806020840152620005bf81604085016020870162000471565b601f01601f19169190910160400192915050565b6108a680620005e36000396000f3fe60806040523661001357610011610017565b005b6100115b61001f6101a7565b6001600160a01b0316330361015f5760606001600160e01b0319600035166364d3180d60e11b810161005a576100536101da565b9150610157565b63587086bd60e11b6001600160e01b031982160161007a57610053610231565b63070d7c6960e41b6001600160e01b031982160161009a57610053610277565b621eb96f60e61b6001600160e01b03198216016100b9576100536102a8565b63a39f25e560e01b6001600160e01b03198216016100d9576100536102e8565b60405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b815160208301f35b6101676102fc565b565b606061018e838360405180606001604052806027815260200161084a6027913961030c565b9392505050565b90565b6001600160a01b03163b151590565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b60606101e4610384565b60006101f33660048184610695565b81019061020091906106db565b905061021d8160405180602001604052806000815250600061038f565b505060408051602081019091526000815290565b60606000806102433660048184610695565b810190610250919061070c565b915091506102608282600161038f565b604051806020016040528060008152509250505090565b6060610281610384565b60006102903660048184610695565b81019061029d91906106db565b905061021d816103bb565b60606102b2610384565b60006102bc6101a7565b604080516001600160a01b03831660208201529192500160405160208183030381529060405291505090565b60606102f2610384565b60006102bc610412565b610167610307610412565b610421565b6060600080856001600160a01b03168560405161032991906107fa565b600060405180830381855af49150503d8060008114610364576040519150601f19603f3d011682016040523d82523d6000602084013e610369565b606091505b509150915061037a86838387610445565b9695505050505050565b341561016757600080fd5b610398836104c6565b6000825111806103a55750805b156103b6576103b48383610169565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6103e46101a7565b604080516001600160a01b03928316815291841660208301520160405180910390a161040f81610506565b50565b600061041c6105af565b905090565b3660008037600080366000845af43d6000803e808015610440573d6000f35b3d6000fd5b606083156104b45782516000036104ad576001600160a01b0385163b6104ad5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161014e565b50816104be565b6104be83836105d7565b949350505050565b6104cf81610601565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6001600160a01b03811661056b5760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b606482015260840161014e565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc6101cb565b8151156105e75781518083602001fd5b8060405162461bcd60e51b815260040161014e9190610816565b6001600160a01b0381163b61066e5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b606482015260840161014e565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61058e565b600080858511156106a557600080fd5b838611156106b257600080fd5b5050820193919092039150565b80356001600160a01b03811681146106d657600080fd5b919050565b6000602082840312156106ed57600080fd5b61018e826106bf565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561071f57600080fd5b610728836106bf565b9150602083013567ffffffffffffffff8082111561074557600080fd5b818501915085601f83011261075957600080fd5b81358181111561076b5761076b6106f6565b604051601f8201601f19908116603f01168101908382118183101715610793576107936106f6565b816040528281528860208487010111156107ac57600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b60005b838110156107e95781810151838201526020016107d1565b838111156103b45750506000910152565b6000825161080c8184602087016107ce565b9190910192915050565b60208152600082518060208401526108358160408501602087016107ce565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122081bdb2c4d7ec00ca91134719260d0c14c35df5f50dba8a8c2c59a0ef40e1066064736f6c634300080f0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564" +) + +func EncodeContractFunc(contractsABI string, name string, params ...interface{}) ([]byte, error) { + parsedABI, err := abi.JSON(strings.NewReader(contractsABI)) + if err != nil { + return nil, err + } + return parsedABI.Pack(name, params...) +} diff --git a/x/evm/types/evm.pb.go b/x/evm/types/evm.pb.go index dc6e18f2..b6d46461 100644 --- a/x/evm/types/evm.pb.go +++ b/x/evm/types/evm.pb.go @@ -36,8 +36,9 @@ type Params struct { // extra eips defines the additional EIPs for the vm.Config ExtraEIPs []int64 `protobuf:"varint,4,rep,packed,name=extra_eips,json=extraEips,proto3" json:"extra_eips,omitempty" yaml:"extra_eips"` // chain config defines the EVM chain configuration parameters - ChainConfig ChainConfig `protobuf:"bytes,5,opt,name=chain_config,json=chainConfig,proto3" json:"chain_config" yaml:"chain_config"` - FeeMarketParams FeeMarketParams `protobuf:"bytes,6,opt,name=fee_market_params,json=feeMarketParams,proto3" json:"fee_market_params" yaml:"fee_market_params"` + ChainConfig ChainConfig `protobuf:"bytes,5,opt,name=chain_config,json=chainConfig,proto3" json:"chain_config" yaml:"chain_config"` + FeeMarketParams FeeMarketParams `protobuf:"bytes,6,opt,name=fee_market_params,json=feeMarketParams,proto3" json:"fee_market_params" yaml:"fee_market_params"` + ProxyProposalParams ProxyProposalParams `protobuf:"bytes,7,opt,name=proxy_proposal_params,json=proxyProposalParams,proto3" json:"proxy_proposal_params" yaml:"proxy_proposal_params"` } func (m *Params) Reset() { *m = Params{} } @@ -115,6 +116,13 @@ func (m *Params) GetFeeMarketParams() FeeMarketParams { return FeeMarketParams{} } +func (m *Params) GetProxyProposalParams() ProxyProposalParams { + if m != nil { + return m.ProxyProposalParams + } + return ProxyProposalParams{} +} + // ChainConfig defines the Ethereum ChainConfig parameters using *sdk.Int values // instead of *big.Int. type ChainConfig struct { @@ -730,6 +738,143 @@ func (m *FeeMarketParams) GetEnableHeight() int64 { return 0 } +type ProxyContractInitState struct { + // height where it should be applied + Height uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` + // address of proxy contract + Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` + // solidity compiled code + Bin string `protobuf:"bytes,3,opt,name=bin,proto3" json:"bin,omitempty"` + // initializer method data + Init string `protobuf:"bytes,4,opt,name=init,proto3" json:"init,omitempty"` +} + +func (m *ProxyContractInitState) Reset() { *m = ProxyContractInitState{} } +func (m *ProxyContractInitState) String() string { return proto.CompactTextString(m) } +func (*ProxyContractInitState) ProtoMessage() {} +func (*ProxyContractInitState) Descriptor() ([]byte, []int) { + return fileDescriptor_6ee18d4714e9d670, []int{9} +} +func (m *ProxyContractInitState) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ProxyContractInitState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ProxyContractInitState.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 *ProxyContractInitState) XXX_Merge(src proto.Message) { + xxx_messageInfo_ProxyContractInitState.Merge(m, src) +} +func (m *ProxyContractInitState) XXX_Size() int { + return m.Size() +} +func (m *ProxyContractInitState) XXX_DiscardUnknown() { + xxx_messageInfo_ProxyContractInitState.DiscardUnknown(m) +} + +var xxx_messageInfo_ProxyContractInitState proto.InternalMessageInfo + +func (m *ProxyContractInitState) GetHeight() uint64 { + if m != nil { + return m.Height + } + return 0 +} + +func (m *ProxyContractInitState) GetAddress() string { + if m != nil { + return m.Address + } + return "" +} + +func (m *ProxyContractInitState) GetBin() string { + if m != nil { + return m.Bin + } + return "" +} + +func (m *ProxyContractInitState) GetInit() string { + if m != nil { + return m.Init + } + return "" +} + +// Params defines default proxy addresses for futur gov contracts update +type ProxyProposalParams struct { + // consensus address as msg.sender, used to define admin authority, could be simply zero address or custom + // basically it is an owner of evrything. resposible to add proxies and update proxies implementations + ConsensusAddress string `protobuf:"bytes,1,opt,name=consensus_address,json=consensusAddress,proto3" json:"consensus_address,omitempty"` + // proxy owner who basically the owner of proxy contract (for Ownable purpose, not admin) + ProxyOwnerAddress string `protobuf:"bytes,2,opt,name=proxy_owner_address,json=proxyOwnerAddress,proto3" json:"proxy_owner_address,omitempty"` + // proxy contracts name per address reservations + Contracts map[string]*ProxyContractInitState `protobuf:"bytes,3,rep,name=contracts,proto3" json:"contracts,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (m *ProxyProposalParams) Reset() { *m = ProxyProposalParams{} } +func (m *ProxyProposalParams) String() string { return proto.CompactTextString(m) } +func (*ProxyProposalParams) ProtoMessage() {} +func (*ProxyProposalParams) Descriptor() ([]byte, []int) { + return fileDescriptor_6ee18d4714e9d670, []int{10} +} +func (m *ProxyProposalParams) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ProxyProposalParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ProxyProposalParams.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 *ProxyProposalParams) XXX_Merge(src proto.Message) { + xxx_messageInfo_ProxyProposalParams.Merge(m, src) +} +func (m *ProxyProposalParams) XXX_Size() int { + return m.Size() +} +func (m *ProxyProposalParams) XXX_DiscardUnknown() { + xxx_messageInfo_ProxyProposalParams.DiscardUnknown(m) +} + +var xxx_messageInfo_ProxyProposalParams proto.InternalMessageInfo + +func (m *ProxyProposalParams) GetConsensusAddress() string { + if m != nil { + return m.ConsensusAddress + } + return "" +} + +func (m *ProxyProposalParams) GetProxyOwnerAddress() string { + if m != nil { + return m.ProxyOwnerAddress + } + return "" +} + +func (m *ProxyProposalParams) GetContracts() map[string]*ProxyContractInitState { + if m != nil { + return m.Contracts + } + return nil +} + func init() { proto.RegisterType((*Params)(nil), "stratos.evm.v1.Params") proto.RegisterType((*ChainConfig)(nil), "stratos.evm.v1.ChainConfig") @@ -740,117 +885,132 @@ func init() { proto.RegisterType((*AccessTuple)(nil), "stratos.evm.v1.AccessTuple") proto.RegisterType((*TraceConfig)(nil), "stratos.evm.v1.TraceConfig") proto.RegisterType((*FeeMarketParams)(nil), "stratos.evm.v1.FeeMarketParams") + proto.RegisterType((*ProxyContractInitState)(nil), "stratos.evm.v1.ProxyContractInitState") + proto.RegisterType((*ProxyProposalParams)(nil), "stratos.evm.v1.ProxyProposalParams") + proto.RegisterMapType((map[string]*ProxyContractInitState)(nil), "stratos.evm.v1.ProxyProposalParams.ContractsEntry") } func init() { proto.RegisterFile("stratos/evm/v1/evm.proto", fileDescriptor_6ee18d4714e9d670) } var fileDescriptor_6ee18d4714e9d670 = []byte{ - // 1677 bytes of a gzipped FileDescriptorProto + // 1867 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x58, 0x4f, 0x6f, 0x1b, 0xb9, - 0x15, 0xb7, 0x2d, 0xd9, 0x1a, 0x51, 0xb2, 0x34, 0xa6, 0xb5, 0xa9, 0x36, 0x06, 0x3c, 0xc6, 0x14, - 0x68, 0x7d, 0xd8, 0x58, 0xeb, 0x04, 0x46, 0xd3, 0x2d, 0xf6, 0x60, 0xd9, 0xce, 0x46, 0x6e, 0xb2, - 0x35, 0x98, 0x14, 0x05, 0xda, 0xc3, 0x80, 0x9a, 0xa1, 0x47, 0x53, 0xcf, 0x0c, 0x05, 0x92, 0xd2, - 0x4a, 0x45, 0x3f, 0x40, 0x7b, 0xeb, 0xa9, 0xe7, 0x7e, 0x81, 0x7e, 0x89, 0x9e, 0x16, 0x3d, 0xed, - 0xb1, 0xe8, 0x61, 0x50, 0x38, 0x37, 0x1f, 0xf5, 0x09, 0x8a, 0x79, 0xa4, 0xfe, 0xc6, 0x58, 0xc4, - 0x3e, 0x99, 0xef, 0xdf, 0xef, 0xf7, 0xf8, 0xf8, 0xa8, 0xc7, 0x31, 0x6a, 0x4a, 0x25, 0xa8, 0xe2, - 0xb2, 0xc5, 0x86, 0x49, 0x6b, 0x78, 0x9c, 0xff, 0x39, 0xea, 0x0b, 0xae, 0x38, 0xae, 0x19, 0xcb, - 0x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 0xd9, 0x3e, 0x4f, 0x94, 0xa0, 0xbe, 0xf2, 0x66, + 0x52, 0xdb, 0xdc, 0x9c, 0xd4, 0xd7, 0xbc, 0x87, 0x4b, 0xea, 0x23, 0xd5, 0x91, 0xc9, 0xff, 0x3a, + 0x5a, 0x6a, 0x47, 0x9c, 0xc7, 0x50, 0x07, 0x55, 0xa2, 0x05, 0x7c, 0x0e, 0x59, 0x83, 0x6f, 0x5c, + 0xb8, 0xfb, 0xd6, 0x3a, 0x57, 0x26, 0xcd, 0x0d, 0x73, 0x7d, 0xac, 0x69, 0x66, 0x13, 0xed, 0xe6, + 0x99, 0x85, 0x32, 0xb2, 0x51, 0x41, 0x30, 0x7d, 0x6f, 0xa9, 0x92, 0x7c, 0x88, 0x9f, 0x20, 0x4b, + 0xb0, 0x1e, 0x13, 0x8a, 0x05, 0xf0, 0x69, 0x2c, 0x32, 0x96, 0xf1, 0x27, 0xc8, 0xea, 0x50, 0xe9, + 0x75, 0x25, 0x0b, 0xf4, 0x77, 0x20, 0xa5, 0x0e, 0x95, 0xbf, 0x91, 0x2c, 0x78, 0x51, 0xfc, 0xcb, + 0x3f, 0x9c, 0x47, 0x2e, 0x45, 0x95, 0x23, 0xdf, 0x67, 0x52, 0xbe, 0xeb, 0xa6, 0x11, 0xfb, 0x81, + 0xfa, 0x3a, 0x40, 0x55, 0xa9, 0xb8, 0xa0, 0x1d, 0xe6, 0x5d, 0xb1, 0x81, 0xa9, 0x32, 0x5d, 0x33, + 0x46, 0xff, 0x6b, 0x36, 0x90, 0x64, 0x5a, 0x30, 0x14, 0x59, 0x01, 0x55, 0xde, 0x09, 0xea, 0x33, + 0x73, 0xab, 0xcd, 0x2b, 0x35, 0x17, 0x85, 0xa1, 0x30, 0x52, 0xce, 0xad, 0xc2, 0x98, 0xf1, 0xae, + 0x32, 0x7b, 0x69, 0x24, 0xe6, 0x11, 0x82, 0xb1, 0x3e, 0xf3, 0x21, 0x89, 0x45, 0x62, 0x24, 0x7c, + 0x88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dc, 0x32, 0xf2, 0x3f, 0x47, 0xe5, 0xd1, 0x21, 0x99, 0x9f, 0x7e, 0x79, 0x87, 0x3b, 0xf8, 0x88, + 0x07, 0xf4, 0xee, 0x28, 0x2d, 0xf2, 0x34, 0x51, 0x62, 0x40, 0x26, 0x20, 0x4f, 0x02, 0x54, 0x9b, + 0x35, 0xde, 0xd1, 0x8f, 0x7f, 0x35, 0xdd, 0x8f, 0x2b, 0x07, 0x9f, 0xdd, 0xc9, 0x78, 0x2b, 0xf3, + 0xa6, 0x6f, 0xbf, 0x58, 0x7c, 0xbe, 0xd0, 0x6c, 0x7d, 0x7b, 0xbd, 0xb5, 0xf0, 0xdd, 0xf5, 0xd6, + 0xc2, 0xff, 0xaf, 0xb7, 0x16, 0xfe, 0xf6, 0x61, 0xeb, 0xd1, 0x77, 0x1f, 0xb6, 0x1e, 0xfd, 0xf7, + 0xc3, 0xd6, 0xa3, 0xdf, 0xed, 0x4d, 0x55, 0x80, 0x81, 0x4d, 0x98, 0x1a, 0x0d, 0x9f, 0xc2, 0x8b, + 0x7a, 0xaf, 0x0f, 0xff, 0x20, 0x41, 0x39, 0xb4, 0x97, 0xe1, 0xbf, 0xa1, 0x67, 0xdf, 0x07, 0x00, + 0x00, 0xff, 0xff, 0x22, 0x98, 0x3a, 0x17, 0x5d, 0x12, 0x00, 0x00, } func (m *Params) Marshal() (dAtA []byte, err error) { @@ -873,6 +1033,16 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + { + size, err := m.ProxyProposalParams.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvm(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a { size, err := m.FeeMarketParams.MarshalToSizedBuffer(dAtA[:i]) if err != nil { @@ -894,21 +1064,21 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x2a if len(m.ExtraEIPs) > 0 { - dAtA4 := make([]byte, len(m.ExtraEIPs)*10) - var j3 int + dAtA5 := make([]byte, len(m.ExtraEIPs)*10) + var j4 int for _, num1 := range m.ExtraEIPs { num := uint64(num1) for num >= 1<<7 { - dAtA4[j3] = uint8(uint64(num)&0x7f | 0x80) + dAtA5[j4] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 - j3++ + j4++ } - dAtA4[j3] = uint8(num) - j3++ + dAtA5[j4] = uint8(num) + j4++ } - i -= j3 - copy(dAtA[i:], dAtA4[:j3]) - i = encodeVarintEvm(dAtA, i, uint64(j3)) + i -= j4 + copy(dAtA[i:], dAtA5[:j4]) + i = encodeVarintEvm(dAtA, i, uint64(j4)) i-- dAtA[i] = 0x22 } @@ -1609,6 +1779,118 @@ func (m *FeeMarketParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *ProxyContractInitState) 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 *ProxyContractInitState) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ProxyContractInitState) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Init) > 0 { + i -= len(m.Init) + copy(dAtA[i:], m.Init) + i = encodeVarintEvm(dAtA, i, uint64(len(m.Init))) + i-- + dAtA[i] = 0x22 + } + if len(m.Bin) > 0 { + i -= len(m.Bin) + copy(dAtA[i:], m.Bin) + i = encodeVarintEvm(dAtA, i, uint64(len(m.Bin))) + i-- + dAtA[i] = 0x1a + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintEvm(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0x12 + } + if m.Height != 0 { + i = encodeVarintEvm(dAtA, i, uint64(m.Height)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *ProxyProposalParams) 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 *ProxyProposalParams) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ProxyProposalParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Contracts) > 0 { + for k := range m.Contracts { + v := m.Contracts[k] + baseI := i + if v != nil { + { + size, err := v.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvm(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintEvm(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintEvm(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x1a + } + } + if len(m.ProxyOwnerAddress) > 0 { + i -= len(m.ProxyOwnerAddress) + copy(dAtA[i:], m.ProxyOwnerAddress) + i = encodeVarintEvm(dAtA, i, uint64(len(m.ProxyOwnerAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.ConsensusAddress) > 0 { + i -= len(m.ConsensusAddress) + copy(dAtA[i:], m.ConsensusAddress) + i = encodeVarintEvm(dAtA, i, uint64(len(m.ConsensusAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func encodeVarintEvm(dAtA []byte, offset int, v uint64) int { offset -= sovEvm(v) base := offset @@ -1647,6 +1929,8 @@ func (m *Params) Size() (n int) { n += 1 + l + sovEvm(uint64(l)) l = m.FeeMarketParams.Size() n += 1 + l + sovEvm(uint64(l)) + l = m.ProxyProposalParams.Size() + n += 1 + l + sovEvm(uint64(l)) return n } @@ -1918,6 +2202,60 @@ func (m *FeeMarketParams) Size() (n int) { return n } +func (m *ProxyContractInitState) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Height != 0 { + n += 1 + sovEvm(uint64(m.Height)) + } + l = len(m.Address) + if l > 0 { + n += 1 + l + sovEvm(uint64(l)) + } + l = len(m.Bin) + if l > 0 { + n += 1 + l + sovEvm(uint64(l)) + } + l = len(m.Init) + if l > 0 { + n += 1 + l + sovEvm(uint64(l)) + } + return n +} + +func (m *ProxyProposalParams) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ConsensusAddress) + if l > 0 { + n += 1 + l + sovEvm(uint64(l)) + } + l = len(m.ProxyOwnerAddress) + if l > 0 { + n += 1 + l + sovEvm(uint64(l)) + } + if len(m.Contracts) > 0 { + for k, v := range m.Contracts { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovEvm(uint64(l)) + } + mapEntrySize := 1 + len(k) + sovEvm(uint64(len(k))) + l + n += mapEntrySize + 1 + sovEvm(uint64(mapEntrySize)) + } + } + return n +} + func sovEvm(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -2167,6 +2505,39 @@ func (m *Params) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProxyProposalParams", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ProxyProposalParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipEvm(dAtA[iNdEx:]) @@ -4134,6 +4505,414 @@ func (m *FeeMarketParams) Unmarshal(dAtA []byte) error { } return nil } +func (m *ProxyContractInitState) 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 ErrIntOverflowEvm + } + 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: ProxyContractInitState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ProxyContractInitState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) + } + m.Height = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Height |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + 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 ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Bin", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + 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 ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Bin = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Init", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + 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 ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Init = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvm(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ProxyProposalParams) 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 ErrIntOverflowEvm + } + 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: ProxyProposalParams: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ProxyProposalParams: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ConsensusAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + 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 ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ConsensusAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProxyOwnerAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + 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 ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ProxyOwnerAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Contracts", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Contracts == nil { + m.Contracts = make(map[string]*ProxyContractInitState) + } + var mapkey string + var mapvalue *ProxyContractInitState + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthEvm + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthEvm + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthEvm + } + postmsgIndex := iNdEx + mapmsglen + if postmsgIndex < 0 { + return ErrInvalidLengthEvm + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &ProxyContractInitState{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipEvm(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvm + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Contracts[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvm(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipEvm(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/evm/types/interfaces.go b/x/evm/types/interfaces.go index c32f7811..5bbbad55 100644 --- a/x/evm/types/interfaces.go +++ b/x/evm/types/interfaces.go @@ -7,7 +7,7 @@ import ( "github.com/ethereum/go-ethereum/core" ethtypes "github.com/ethereum/go-ethereum/core/types" - //feemarkettypes "github.com/stratosnet/stratos-chain/x/feemarket/types" + keestatedb "github.com/stratosnet/stratos-chain/core/statedb" ) // AccountKeeper defines the expected account keeper interface @@ -39,6 +39,18 @@ type StakingKeeper interface { GetValidatorByConsAddr(ctx sdk.Context, consAddr sdk.ConsAddress) (validator stakingtypes.Validator, found bool) } +// RegisterKeeper defines functionality related for meta and resource node +type RegisterKeeper interface { + KeeGetEffectiveTotalStake(kdb *keestatedb.KeestateDB) sdk.Int + KeeGetRemainingOzoneLimit(kdb *keestatedb.KeestateDB) sdk.Int + KeeSetRemainingOzoneLimit(kdb *keestatedb.KeestateDB, value sdk.Int) +} + +// SdsKeper defines functionality related for ozone purchase +type SdsKeeper interface { + Prepay(ctx sdk.Context, sender sdk.AccAddress, coins sdk.Coins) (sdk.Int, error) +} + // Event Hooks // These can be utilized to customize evm transaction processing. diff --git a/x/evm/types/params.go b/x/evm/types/params.go index f77fbf33..b4ebb2f0 100644 --- a/x/evm/types/params.go +++ b/x/evm/types/params.go @@ -3,10 +3,13 @@ package types import ( "fmt" "math/big" + "sort" sdk "github.com/cosmos/cosmos-sdk/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/params" @@ -40,6 +43,11 @@ var ( ParamStoreKeyElasticityMultiplier = []byte("ElasticityMultiplier") ParamStoreKeyBaseFee = []byte("BaseFee") ParamStoreKeyEnableHeight = []byte("EnableHeight") + + // proposal proxy + ParamStoreKeyConsensusAddress = []byte("ProposalConsensusAddress") + ParamStoreKeyProxyOwnerAddress = []byte("ProxyOwnerAddress") + ParamStoreKeyContracts = []byte("ProposalContracts") ) // ParamKeyTable returns the parameter key table. @@ -48,14 +56,15 @@ func ParamKeyTable() paramtypes.KeyTable { } // NewParams creates a new Params instance -func NewParams(evmDenom string, enableCreate, enableCall bool, config ChainConfig, feeMarketParams FeeMarketParams, extraEIPs ...int64) Params { +func NewParams(evmDenom string, enableCreate, enableCall bool, config ChainConfig, feeMarketParams FeeMarketParams, proxyProposalParams ProxyProposalParams, extraEIPs ...int64) Params { return Params{ - EvmDenom: evmDenom, - EnableCreate: enableCreate, - EnableCall: enableCall, - ExtraEIPs: extraEIPs, - ChainConfig: config, - FeeMarketParams: feeMarketParams, + EvmDenom: evmDenom, + EnableCreate: enableCreate, + EnableCall: enableCall, + ExtraEIPs: extraEIPs, + ChainConfig: config, + FeeMarketParams: feeMarketParams, + ProxyProposalParams: proxyProposalParams, } } @@ -63,12 +72,13 @@ func NewParams(evmDenom string, enableCreate, enableCall bool, config ChainConfi // ExtraEIPs is empty to prevent overriding the latest hard fork instruction set func DefaultParams() Params { return Params{ - EvmDenom: DefaultEVMDenom, - EnableCreate: true, - EnableCall: true, - ChainConfig: DefaultChainConfig(), - ExtraEIPs: nil, - FeeMarketParams: DefaultFeeMarketParams(), + EvmDenom: DefaultEVMDenom, + EnableCreate: true, + EnableCall: true, + ChainConfig: DefaultChainConfig(), + ExtraEIPs: nil, + FeeMarketParams: DefaultFeeMarketParams(), + ProxyProposalParams: DefaultProxyProposalParams(), } } @@ -86,6 +96,10 @@ func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { paramtypes.NewParamSetPair(ParamStoreKeyElasticityMultiplier, &p.FeeMarketParams.ElasticityMultiplier, validateElasticityMultiplier), paramtypes.NewParamSetPair(ParamStoreKeyBaseFee, &p.FeeMarketParams.BaseFee, validateBaseFee), paramtypes.NewParamSetPair(ParamStoreKeyEnableHeight, &p.FeeMarketParams.EnableHeight, validateEnableHeight), + //proposal proxy + paramtypes.NewParamSetPair(ParamStoreKeyConsensusAddress, &p.ProxyProposalParams.ConsensusAddress, validateAddress), + paramtypes.NewParamSetPair(ParamStoreKeyProxyOwnerAddress, &p.ProxyProposalParams.ProxyOwnerAddress, validateAddress), + paramtypes.NewParamSetPair(ParamStoreKeyContracts, &p.ProxyProposalParams.Contracts, validateContracts), } } @@ -250,3 +264,70 @@ func validateEnableHeight(i interface{}) error { return nil } + +// creates a new ProxyProposalParams instance +func NewProxyProposalParams(consensusAddress, proxyOwnerAddress common.Address) ProxyProposalParams { + return ProxyProposalParams{ + ConsensusAddress: consensusAddress.Hex(), + ProxyOwnerAddress: proxyOwnerAddress.Hex(), + Contracts: make(map[string]*ProxyContractInitState), + } +} + +// ProxyProposalParams returns default proxy parameters +func DefaultProxyProposalParams() ProxyProposalParams { + ppp := NewProxyProposalParams( + common.HexToAddress("0x1000000000000000000000000000000000000000"), + common.HexToAddress("0x1000000000000000000000000000000000000001"), + ) + // TODO: Maybe create some pretty method? + ppp.Contracts["prepay"] = &ProxyContractInitState{ + Height: 1, + Address: "0x1000000000000000000000000000000000010101", + Bin: "0x608060405234801561001057600080fd5b50610b19806100206000396000f3fe6080604052600436106100595760003560e01c806334fe1d1e14610065578063715018a61461006f5780638129fc1c146100865780638da5cb5b1461009d578063f2fde38b146100c8578063ffa1ad74146100f157610060565b3661006057005b600080fd5b61006d61011c565b005b34801561007b57600080fd5b50610084610241565b005b34801561009257600080fd5b5061009b610255565b005b3480156100a957600080fd5b506100b261039b565b6040516100bf91906106d1565b60405180910390f35b3480156100d457600080fd5b506100ef60048036038101906100ea919061071d565b6103c5565b005b3480156100fd57600080fd5b50610106610448565b6040516101139190610766565b60405180910390f35b600034905060008103610164576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161015b906107de565b60405180910390fd5b61016c61066e565b3373ffffffffffffffffffffffffffffffffffffffff1681600060018110610197576101966107fe565b5b6020020181815250506101a861066e565b6020816020848660f1600019f16101be57600080fd5b823373ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff167fa9fdf2e446d7225a2b445bc7c21ca59dcea69b5b23f5c4e6f54f87a5db6cdaee84600060018110610222576102216107fe565b5b60200201516040516102349190610846565b60405180910390a4505050565b61024961044d565b61025360006104cb565b565b60008060019054906101000a900460ff161590508080156102865750600160008054906101000a900460ff1660ff16105b806102b3575061029530610591565b1580156102b25750600160008054906101000a900460ff1660ff16145b5b6102f2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102e9906108d3565b60405180910390fd5b60016000806101000a81548160ff021916908360ff160217905550801561032f576001600060016101000a81548160ff0219169083151502179055505b6103376105b4565b61033f610605565b80156103985760008060016101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498600160405161038f9190610938565b60405180910390a15b50565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6103cd61044d565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361043c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610433906109c5565b60405180910390fd5b610445816104cb565b50565b600081565b610455610666565b73ffffffffffffffffffffffffffffffffffffffff1661047361039b565b73ffffffffffffffffffffffffffffffffffffffff16146104c9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104c090610a31565b60405180910390fd5b565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081603360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b600060019054906101000a900460ff16610603576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105fa90610ac3565b60405180910390fd5b565b600060019054906101000a900460ff16610654576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161064b90610ac3565b60405180910390fd5b61066461065f610666565b6104cb565b565b600033905090565b6040518060200160405280600190602082028036833780820191505090505090565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006106bb82610690565b9050919050565b6106cb816106b0565b82525050565b60006020820190506106e660008301846106c2565b92915050565b600080fd5b6106fa816106b0565b811461070557600080fd5b50565b600081359050610717816106f1565b92915050565b600060208284031215610733576107326106ec565b5b600061074184828501610708565b91505092915050565b600060ff82169050919050565b6107608161074a565b82525050565b600060208201905061077b6000830184610757565b92915050565b600082825260208201905092915050565b7f503a205a45524f5f414d4f554e54000000000000000000000000000000000000600082015250565b60006107c8600e83610781565b91506107d382610792565b602082019050919050565b600060208201905081810360008301526107f7816107bb565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000819050919050565b6108408161082d565b82525050565b600060208201905061085b6000830184610837565b92915050565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160008201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b60006108bd602e83610781565b91506108c882610861565b604082019050919050565b600060208201905081810360008301526108ec816108b0565b9050919050565b6000819050919050565b6000819050919050565b600061092261091d610918846108f3565b6108fd565b61074a565b9050919050565b61093281610907565b82525050565b600060208201905061094d6000830184610929565b92915050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b60006109af602683610781565b91506109ba82610953565b604082019050919050565b600060208201905081810360008301526109de816109a2565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000610a1b602083610781565b9150610a26826109e5565b602082019050919050565b60006020820190508181036000830152610a4a81610a0e565b9050919050565b7f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960008201527f6e697469616c697a696e67000000000000000000000000000000000000000000602082015250565b6000610aad602b83610781565b9150610ab882610a51565b604082019050919050565b60006020820190508181036000830152610adc81610aa0565b905091905056fea2646970667358221220af723f0b659da0cdaa0d447e54bb8c0c3af22886c04139bf5fc7ee74f487451c64736f6c63430008120033", + Init: "0x8129fc1c", + } + return ppp +} + +func validateAddress(i interface{}) error { + value, ok := i.(string) + if !ok { + return fmt.Errorf("invalid parameter type: %T", i) + } + if !common.IsHexAddress(value) { + return fmt.Errorf("address '%s' is not a hex", value) + } + return nil +} + +func validateContracts(i interface{}) error { + contracts, ok := i.(map[string]*ProxyContractInitState) + if !ok { + return fmt.Errorf("invalid parameter type: %T", i) + } + + keys := make([]string, 0) + for k := range contracts { + keys = append(keys, k) + } + sort.Strings(keys) + + for _, k := range keys { + state := contracts[k] + if err := validateAddress(state.Address); err != nil { + return err + } + if state.Height < 1 { + return fmt.Errorf("invalid height '%d'", state.Height) + } + if _, err := hexutil.Decode(state.Bin); err != nil { + return err + } + if _, err := hexutil.Decode(state.Init); len(state.Init) != 0 && err != nil { + return err + } + } + + return nil +} diff --git a/x/evm/types/proposal.go b/x/evm/types/proposal.go new file mode 100644 index 00000000..83aad802 --- /dev/null +++ b/x/evm/types/proposal.go @@ -0,0 +1,79 @@ +package types + +import ( + "bytes" + "fmt" + + sdk "github.com/cosmos/cosmos-sdk/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + "github.com/ethereum/go-ethereum/common" +) + +const ( + ProposalTypeUpdateImplementation = "UpdateImplementation" +) + +var ( + _ govtypes.Content = &UpdateImplmentationProposal{} +) + +func init() { + govtypes.RegisterProposalType(ProposalTypeUpdateImplementation) +} + +// NewUpdateImplmentationProposal creates a new proxy update proposal. +func NewUpdateImplmentationProposal(proxy, impl common.Address, data []byte, amt *sdk.Int) govtypes.Content { + return &UpdateImplmentationProposal{ + ProxyAddress: proxy.Hex(), + ImplementationAddress: impl.Hex(), + Data: data, + Amount: amt, + } +} + +// GetTitle returns the title of a new proxy update proposal. +func (epd *UpdateImplmentationProposal) GetTitle() string { + return "New proxy upgrade function call" +} + +// GetDescription returns the description of a new proxy update proposal. +func (epd *UpdateImplmentationProposal) GetDescription() string { + return fmt.Sprintf( + "This is upgrade for proxy '%s' address with a new implementation '%s'", + epd.ProxyAddress, epd.ImplementationAddress, + ) +} + +// ProposalRoute returns the routing key of a new proxy update proposal. +func (epd *UpdateImplmentationProposal) ProposalRoute() string { return RouterKey } + +// ProposalType returns the type of a new proxy update proposal. +func (epd *UpdateImplmentationProposal) ProposalType() string { + return ProposalTypeUpdateImplementation +} + +// ValidateBasic runs basic stateless validity checks +func (epd *UpdateImplmentationProposal) ValidateBasic() error { + err := govtypes.ValidateAbstract(epd) + if err != nil { + return err + } + + if !common.IsHexAddress(epd.ProxyAddress) { + return fmt.Errorf("address '%s' is not valid", epd.ProxyAddress) + } + + if !common.IsHexAddress(epd.ImplementationAddress) { + return fmt.Errorf("address '%s' is not valid", epd.ImplementationAddress) + } + + if bytes.Equal(common.HexToAddress(epd.ImplementationAddress).Bytes(), common.Address{}.Bytes()) { + return fmt.Errorf("implementation address could not be zero address") + } + + if epd.Amount == nil { + return fmt.Errorf("amount should be zero or greater") + } + + return nil +} diff --git a/x/evm/types/proposal.pb.go b/x/evm/types/proposal.pb.go new file mode 100644 index 00000000..f538179f --- /dev/null +++ b/x/evm/types/proposal.pb.go @@ -0,0 +1,487 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: stratos/evm/v1/proposal.proto + +package types + +import ( + fmt "fmt" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// UpdateImplmentationProposal used to update implemntation for genesis proxies +type UpdateImplmentationProposal struct { + // proxy address where data will be executed + ProxyAddress string `protobuf:"bytes,1,opt,name=proxy_address,json=proxyAddress,proto3" json:"proxy_address,omitempty"` + // implmentation address as API for a storage + ImplementationAddress string `protobuf:"bytes,2,opt,name=implementation_address,json=implementationAddress,proto3" json:"implementation_address,omitempty"` + // data for execution + Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` + // value for proxy func call + Amount *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,4,opt,name=value,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"value,omitempty"` +} + +func (m *UpdateImplmentationProposal) Reset() { *m = UpdateImplmentationProposal{} } +func (m *UpdateImplmentationProposal) String() string { return proto.CompactTextString(m) } +func (*UpdateImplmentationProposal) ProtoMessage() {} +func (*UpdateImplmentationProposal) Descriptor() ([]byte, []int) { + return fileDescriptor_3c6013e0da139f02, []int{0} +} +func (m *UpdateImplmentationProposal) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *UpdateImplmentationProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_UpdateImplmentationProposal.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 *UpdateImplmentationProposal) XXX_Merge(src proto.Message) { + xxx_messageInfo_UpdateImplmentationProposal.Merge(m, src) +} +func (m *UpdateImplmentationProposal) XXX_Size() int { + return m.Size() +} +func (m *UpdateImplmentationProposal) XXX_DiscardUnknown() { + xxx_messageInfo_UpdateImplmentationProposal.DiscardUnknown(m) +} + +var xxx_messageInfo_UpdateImplmentationProposal proto.InternalMessageInfo + +func (m *UpdateImplmentationProposal) GetProxyAddress() string { + if m != nil { + return m.ProxyAddress + } + return "" +} + +func (m *UpdateImplmentationProposal) GetImplementationAddress() string { + if m != nil { + return m.ImplementationAddress + } + return "" +} + +func (m *UpdateImplmentationProposal) GetData() []byte { + if m != nil { + return m.Data + } + return nil +} + +func init() { + proto.RegisterType((*UpdateImplmentationProposal)(nil), "stratos.evm.v1.UpdateImplmentationProposal") +} + +func init() { proto.RegisterFile("stratos/evm/v1/proposal.proto", fileDescriptor_3c6013e0da139f02) } + +var fileDescriptor_3c6013e0da139f02 = []byte{ + // 290 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x90, 0xc1, 0x4a, 0xf3, 0x40, + 0x14, 0x85, 0x3b, 0xff, 0x5f, 0x0b, 0x0e, 0xd5, 0x45, 0x50, 0x29, 0x8a, 0xd3, 0xa2, 0x20, 0xdd, + 0x34, 0x43, 0x51, 0x1f, 0xa0, 0xdd, 0xd5, 0x95, 0x04, 0xdc, 0xb8, 0x91, 0x69, 0x32, 0xa4, 0xc1, + 0xcc, 0xdc, 0x21, 0x73, 0x13, 0xda, 0xb7, 0xf0, 0xb1, 0x5c, 0x76, 0xa9, 0x2e, 0x8a, 0x24, 0x2f, + 0x22, 0x9d, 0xa4, 0x45, 0x57, 0xf7, 0x70, 0xcf, 0x39, 0xdf, 0xe2, 0xd0, 0x4b, 0x8b, 0x99, 0x40, + 0xb0, 0x5c, 0x16, 0x8a, 0x17, 0x63, 0x6e, 0x32, 0x30, 0x60, 0x45, 0xea, 0x9b, 0x0c, 0x10, 0xbc, + 0xe3, 0xc6, 0xf6, 0x65, 0xa1, 0xfc, 0x62, 0x7c, 0x7e, 0x12, 0x43, 0x0c, 0xce, 0xe2, 0x5b, 0x55, + 0xa7, 0xae, 0x3e, 0x09, 0xbd, 0x78, 0x32, 0x91, 0x40, 0x39, 0x53, 0x26, 0x55, 0x52, 0xa3, 0xc0, + 0x04, 0xf4, 0x63, 0xc3, 0xf2, 0xae, 0xe9, 0x91, 0xc9, 0x60, 0xb9, 0x7a, 0x11, 0x51, 0x94, 0x49, + 0x6b, 0x7b, 0x64, 0x40, 0x86, 0x87, 0x41, 0xd7, 0x3d, 0x27, 0xf5, 0xcf, 0xbb, 0xa7, 0x67, 0x89, + 0x32, 0xa9, 0xdc, 0xd7, 0xf7, 0xe9, 0x7f, 0x2e, 0x7d, 0xfa, 0xd7, 0xdd, 0xd5, 0x3c, 0xda, 0x8e, + 0x04, 0x8a, 0xde, 0xff, 0x01, 0x19, 0x76, 0x03, 0xa7, 0xbd, 0x07, 0x7a, 0x50, 0x88, 0x34, 0x97, + 0xbd, 0xf6, 0xb6, 0x39, 0xbd, 0xfb, 0xda, 0xf4, 0x6f, 0xe2, 0x04, 0x17, 0xf9, 0xdc, 0x0f, 0x41, + 0xf1, 0x10, 0xac, 0x02, 0xdb, 0x9c, 0x91, 0x8d, 0x5e, 0x39, 0xae, 0x8c, 0xb4, 0xfe, 0x4c, 0x63, + 0xb9, 0xe9, 0x77, 0x26, 0x0a, 0x72, 0x8d, 0x41, 0x8d, 0x98, 0xce, 0xde, 0x4b, 0x46, 0xd6, 0x25, + 0x23, 0xdf, 0x25, 0x23, 0x6f, 0x15, 0x6b, 0xad, 0x2b, 0xd6, 0xfa, 0xa8, 0x58, 0xeb, 0x99, 0xff, + 0x42, 0x36, 0x33, 0x69, 0x89, 0x3b, 0x39, 0x0a, 0x17, 0x22, 0xd1, 0x7c, 0xe9, 0x86, 0x75, 0xfc, + 0x79, 0xc7, 0xad, 0x75, 0xfb, 0x13, 0x00, 0x00, 0xff, 0xff, 0xfb, 0x01, 0xc9, 0x85, 0x74, 0x01, + 0x00, 0x00, +} + +func (m *UpdateImplmentationProposal) 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 *UpdateImplmentationProposal) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *UpdateImplmentationProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Amount != nil { + { + size := m.Amount.Size() + i -= size + if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if len(m.Data) > 0 { + i -= len(m.Data) + copy(dAtA[i:], m.Data) + i = encodeVarintProposal(dAtA, i, uint64(len(m.Data))) + i-- + dAtA[i] = 0x1a + } + if len(m.ImplementationAddress) > 0 { + i -= len(m.ImplementationAddress) + copy(dAtA[i:], m.ImplementationAddress) + i = encodeVarintProposal(dAtA, i, uint64(len(m.ImplementationAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.ProxyAddress) > 0 { + i -= len(m.ProxyAddress) + copy(dAtA[i:], m.ProxyAddress) + i = encodeVarintProposal(dAtA, i, uint64(len(m.ProxyAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintProposal(dAtA []byte, offset int, v uint64) int { + offset -= sovProposal(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *UpdateImplmentationProposal) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ProxyAddress) + if l > 0 { + n += 1 + l + sovProposal(uint64(l)) + } + l = len(m.ImplementationAddress) + if l > 0 { + n += 1 + l + sovProposal(uint64(l)) + } + l = len(m.Data) + if l > 0 { + n += 1 + l + sovProposal(uint64(l)) + } + if m.Amount != nil { + l = m.Amount.Size() + n += 1 + l + sovProposal(uint64(l)) + } + return n +} + +func sovProposal(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozProposal(x uint64) (n int) { + return sovProposal(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *UpdateImplmentationProposal) 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 ErrIntOverflowProposal + } + 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: UpdateImplmentationProposal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UpdateImplmentationProposal: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProxyAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + 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 ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ProxyAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ImplementationAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + 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 ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ImplementationAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) + if m.Data == nil { + m.Data = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + 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 ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_cosmos_cosmos_sdk_types.Int + m.Amount = &v + if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProposal(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProposal + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipProposal(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowProposal + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowProposal + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowProposal + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthProposal + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupProposal + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthProposal + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthProposal = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowProposal = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupProposal = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/evm/vm/analysis.go b/x/evm/vm/analysis.go new file mode 100644 index 00000000..4aa8cfe7 --- /dev/null +++ b/x/evm/vm/analysis.go @@ -0,0 +1,118 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package vm + +const ( + set2BitsMask = uint16(0b11) + set3BitsMask = uint16(0b111) + set4BitsMask = uint16(0b1111) + set5BitsMask = uint16(0b1_1111) + set6BitsMask = uint16(0b11_1111) + set7BitsMask = uint16(0b111_1111) +) + +// bitvec is a bit vector which maps bytes in a program. +// An unset bit means the byte is an opcode, a set bit means +// it's data (i.e. argument of PUSHxx). +type bitvec []byte + +func (bits bitvec) set1(pos uint64) { + bits[pos/8] |= 1 << (pos % 8) +} + +func (bits bitvec) setN(flag uint16, pos uint64) { + a := flag << (pos % 8) + bits[pos/8] |= byte(a) + if b := byte(a >> 8); b != 0 { + bits[pos/8+1] = b + } +} + +func (bits bitvec) set8(pos uint64) { + a := byte(0xFF << (pos % 8)) + bits[pos/8] |= a + bits[pos/8+1] = ^a +} + +func (bits bitvec) set16(pos uint64) { + a := byte(0xFF << (pos % 8)) + bits[pos/8] |= a + bits[pos/8+1] = 0xFF + bits[pos/8+2] = ^a +} + +// codeSegment checks if the position is in a code segment. +func (bits *bitvec) codeSegment(pos uint64) bool { + return (((*bits)[pos/8] >> (pos % 8)) & 1) == 0 +} + +// codeBitmap collects data locations in code. +func codeBitmap(code []byte) bitvec { + // The bitmap is 4 bytes longer than necessary, in case the code + // ends with a PUSH32, the algorithm will push zeroes onto the + // bitvector outside the bounds of the actual code. + bits := make(bitvec, len(code)/8+1+4) + return codeBitmapInternal(code, bits) +} + +// codeBitmapInternal is the internal implementation of codeBitmap. +// It exists for the purpose of being able to run benchmark tests +// without dynamic allocations affecting the results. +func codeBitmapInternal(code, bits bitvec) bitvec { + for pc := uint64(0); pc < uint64(len(code)); { + op := OpCode(code[pc]) + pc++ + if int8(op) < int8(PUSH1) { // If not PUSH (the int8(op) > int(PUSH32) is always false). + continue + } + numbits := op - PUSH1 + 1 + if numbits >= 8 { + for ; numbits >= 16; numbits -= 16 { + bits.set16(pc) + pc += 16 + } + for ; numbits >= 8; numbits -= 8 { + bits.set8(pc) + pc += 8 + } + } + switch numbits { + case 1: + bits.set1(pc) + pc += 1 + case 2: + bits.setN(set2BitsMask, pc) + pc += 2 + case 3: + bits.setN(set3BitsMask, pc) + pc += 3 + case 4: + bits.setN(set4BitsMask, pc) + pc += 4 + case 5: + bits.setN(set5BitsMask, pc) + pc += 5 + case 6: + bits.setN(set6BitsMask, pc) + pc += 6 + case 7: + bits.setN(set7BitsMask, pc) + pc += 7 + } + } + return bits +} diff --git a/x/evm/vm/common.go b/x/evm/vm/common.go new file mode 100644 index 00000000..90ba4a4a --- /dev/null +++ b/x/evm/vm/common.go @@ -0,0 +1,82 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package vm + +import ( + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/common/math" + "github.com/holiman/uint256" +) + +// calcMemSize64 calculates the required memory size, and returns +// the size and whether the result overflowed uint64 +func calcMemSize64(off, l *uint256.Int) (uint64, bool) { + if !l.IsUint64() { + return 0, true + } + return calcMemSize64WithUint(off, l.Uint64()) +} + +// calcMemSize64WithUint calculates the required memory size, and returns +// the size and whether the result overflowed uint64 +// Identical to calcMemSize64, but length is a uint64 +func calcMemSize64WithUint(off *uint256.Int, length64 uint64) (uint64, bool) { + // if length is zero, memsize is always zero, regardless of offset + if length64 == 0 { + return 0, false + } + // Check that offset doesn't overflow + offset64, overflow := off.Uint64WithOverflow() + if overflow { + return 0, true + } + val := offset64 + length64 + // if value < either of it's parts, then it overflowed + return val, val < offset64 +} + +// getData returns a slice from the data based on the start and size and pads +// up to size with zero's. This function is overflow safe. +func getData(data []byte, start uint64, size uint64) []byte { + length := uint64(len(data)) + if start > length { + start = length + } + end := start + size + if end > length { + end = length + } + return common.RightPadBytes(data[start:end], int(size)) +} + +// toWordSize returns the ceiled word size required for memory expansion. +func toWordSize(size uint64) uint64 { + if size > math.MaxUint64-31 { + return math.MaxUint64/32 + 1 + } + + return (size + 31) / 32 +} + +func allZero(b []byte) bool { + for _, byte := range b { + if byte != 0 { + return false + } + } + return true +} diff --git a/x/evm/vm/contract.go b/x/evm/vm/contract.go new file mode 100644 index 00000000..bb090296 --- /dev/null +++ b/x/evm/vm/contract.go @@ -0,0 +1,194 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package vm + +import ( + "math/big" + + "github.com/ethereum/go-ethereum/common" + "github.com/holiman/uint256" +) + +// ContractRef is a reference to the contract's backing object +type ContractRef interface { + Address() common.Address +} + +// AccountRef implements ContractRef. +// +// Account references are used during EVM initialisation and +// it's primary use is to fetch addresses. Removing this object +// proves difficult because of the cached jump destinations which +// are fetched from the parent contract (i.e. the caller), which +// is a ContractRef. +type AccountRef common.Address + +// Address casts AccountRef to a Address +func (ar AccountRef) Address() common.Address { return (common.Address)(ar) } + +// Contract represents an ethereum contract in the state database. It contains +// the contract code, calling arguments. Contract implements ContractRef +type Contract struct { + // CallerAddress is the result of the caller which initialised this + // contract. However when the "call method" is delegated this value + // needs to be initialised to that of the caller's caller. + CallerAddress common.Address + caller ContractRef + self ContractRef + + jumpdests map[common.Hash]bitvec // Aggregated result of JUMPDEST analysis. + analysis bitvec // Locally cached result of JUMPDEST analysis + + Code []byte + CodeHash common.Hash + CodeAddr *common.Address + Input []byte + + Gas uint64 + value *big.Int +} + +// NewContract returns a new contract environment for the execution of EVM. +func NewContract(caller ContractRef, object ContractRef, value *big.Int, gas uint64) *Contract { + c := &Contract{CallerAddress: caller.Address(), caller: caller, self: object} + + if parent, ok := caller.(*Contract); ok { + // Reuse JUMPDEST analysis from parent context if available. + c.jumpdests = parent.jumpdests + } else { + c.jumpdests = make(map[common.Hash]bitvec) + } + + // Gas should be a pointer so it can safely be reduced through the run + // This pointer will be off the state transition + c.Gas = gas + // ensures a value is set + c.value = value + + return c +} + +func (c *Contract) validJumpdest(dest *uint256.Int) bool { + udest, overflow := dest.Uint64WithOverflow() + // PC cannot go beyond len(code) and certainly can't be bigger than 63bits. + // Don't bother checking for JUMPDEST in that case. + if overflow || udest >= uint64(len(c.Code)) { + return false + } + // Only JUMPDESTs allowed for destinations + if OpCode(c.Code[udest]) != JUMPDEST { + return false + } + return c.isCode(udest) +} + +// isCode returns true if the provided PC location is an actual opcode, as +// opposed to a data-segment following a PUSHN operation. +func (c *Contract) isCode(udest uint64) bool { + // Do we already have an analysis laying around? + if c.analysis != nil { + return c.analysis.codeSegment(udest) + } + // Do we have a contract hash already? + // If we do have a hash, that means it's a 'regular' contract. For regular + // contracts ( not temporary initcode), we store the analysis in a map + if c.CodeHash != (common.Hash{}) { + // Does parent context have the analysis? + analysis, exist := c.jumpdests[c.CodeHash] + if !exist { + // Do the analysis and save in parent context + // We do not need to store it in c.analysis + analysis = codeBitmap(c.Code) + c.jumpdests[c.CodeHash] = analysis + } + // Also stash it in current contract for faster access + c.analysis = analysis + return analysis.codeSegment(udest) + } + // We don't have the code hash, most likely a piece of initcode not already + // in state trie. In that case, we do an analysis, and save it locally, so + // we don't have to recalculate it for every JUMP instruction in the execution + // However, we don't save it within the parent context + if c.analysis == nil { + c.analysis = codeBitmap(c.Code) + } + return c.analysis.codeSegment(udest) +} + +// AsDelegate sets the contract to be a delegate call and returns the current +// contract (for chaining calls) +func (c *Contract) AsDelegate() *Contract { + // NOTE: caller must, at all times be a contract. It should never happen + // that caller is something other than a Contract. + parent := c.caller.(*Contract) + c.CallerAddress = parent.CallerAddress + c.value = parent.value + + return c +} + +// GetOp returns the n'th element in the contract's byte array +func (c *Contract) GetOp(n uint64) OpCode { + if n < uint64(len(c.Code)) { + return OpCode(c.Code[n]) + } + + return STOP +} + +// Caller returns the caller of the contract. +// +// Caller will recursively call caller when the contract is a delegate +// call, including that of caller's caller. +func (c *Contract) Caller() common.Address { + return c.CallerAddress +} + +// UseGas attempts the use gas and subtracts it and returns true on success +func (c *Contract) UseGas(gas uint64) (ok bool) { + if c.Gas < gas { + return false + } + c.Gas -= gas + return true +} + +// Address returns the contracts address +func (c *Contract) Address() common.Address { + return c.self.Address() +} + +// Value returns the contract's value (sent to it from it's caller) +func (c *Contract) Value() *big.Int { + return c.value +} + +// SetCallCode sets the code of the contract and address of the backing data +// object +func (c *Contract) SetCallCode(addr *common.Address, hash common.Hash, code []byte) { + c.Code = code + c.CodeHash = hash + c.CodeAddr = addr +} + +// SetCodeOptionalHash can be used to provide code, but it's optional to provide hash. +// In case hash is not provided, the jumpdest analysis will not be saved to the parent context +func (c *Contract) SetCodeOptionalHash(addr *common.Address, codeAndHash *codeAndHash) { + c.Code = codeAndHash.code + c.CodeHash = codeAndHash.hash + c.CodeAddr = addr +} diff --git a/x/evm/vm/contracts.go b/x/evm/vm/contracts.go new file mode 100644 index 00000000..1b832b63 --- /dev/null +++ b/x/evm/vm/contracts.go @@ -0,0 +1,1043 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package vm + +import ( + "crypto/sha256" + "encoding/binary" + "errors" + "math/big" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/common/math" + "github.com/ethereum/go-ethereum/crypto" + "github.com/ethereum/go-ethereum/crypto/blake2b" + "github.com/ethereum/go-ethereum/crypto/bls12381" + "github.com/ethereum/go-ethereum/crypto/bn256" + "github.com/ethereum/go-ethereum/params" + "golang.org/x/crypto/ripemd160" +) + +// PrecompiledContract is the basic interface for native Go contracts. The implementation +// requires a deterministic gas count based on the input size of the Run method of the +// contract. +type PrecompiledContract interface { + RequiredGas(input []byte) uint64 // RequiredPrice calculates the contract gas use + Run(input []byte) ([]byte, error) // Run runs the precompiled contract +} + +// PrecompiledContractsHomestead contains the default set of pre-compiled Ethereum +// contracts used in the Frontier and Homestead releases. +var PrecompiledContractsHomestead = map[common.Address]PrecompiledContract{ + common.BytesToAddress([]byte{1}): &ecrecover{}, + common.BytesToAddress([]byte{2}): &sha256hash{}, + common.BytesToAddress([]byte{3}): &ripemd160hash{}, + common.BytesToAddress([]byte{4}): &dataCopy{}, +} + +// PrecompiledContractsByzantium contains the default set of pre-compiled Ethereum +// contracts used in the Byzantium release. +var PrecompiledContractsByzantium = map[common.Address]PrecompiledContract{ + common.BytesToAddress([]byte{1}): &ecrecover{}, + common.BytesToAddress([]byte{2}): &sha256hash{}, + common.BytesToAddress([]byte{3}): &ripemd160hash{}, + common.BytesToAddress([]byte{4}): &dataCopy{}, + common.BytesToAddress([]byte{5}): &bigModExp{eip2565: false}, + common.BytesToAddress([]byte{6}): &bn256AddByzantium{}, + common.BytesToAddress([]byte{7}): &bn256ScalarMulByzantium{}, + common.BytesToAddress([]byte{8}): &bn256PairingByzantium{}, +} + +// PrecompiledContractsIstanbul contains the default set of pre-compiled Ethereum +// contracts used in the Istanbul release. +var PrecompiledContractsIstanbul = map[common.Address]PrecompiledContract{ + common.BytesToAddress([]byte{1}): &ecrecover{}, + common.BytesToAddress([]byte{2}): &sha256hash{}, + common.BytesToAddress([]byte{3}): &ripemd160hash{}, + common.BytesToAddress([]byte{4}): &dataCopy{}, + common.BytesToAddress([]byte{5}): &bigModExp{eip2565: false}, + common.BytesToAddress([]byte{6}): &bn256AddIstanbul{}, + common.BytesToAddress([]byte{7}): &bn256ScalarMulIstanbul{}, + common.BytesToAddress([]byte{8}): &bn256PairingIstanbul{}, + common.BytesToAddress([]byte{9}): &blake2F{}, +} + +// PrecompiledContractsBerlin contains the default set of pre-compiled Ethereum +// contracts used in the Berlin release. +var PrecompiledContractsBerlin = map[common.Address]PrecompiledContract{ + common.BytesToAddress([]byte{1}): &ecrecover{}, + common.BytesToAddress([]byte{2}): &sha256hash{}, + common.BytesToAddress([]byte{3}): &ripemd160hash{}, + common.BytesToAddress([]byte{4}): &dataCopy{}, + common.BytesToAddress([]byte{5}): &bigModExp{eip2565: true}, + common.BytesToAddress([]byte{6}): &bn256AddIstanbul{}, + common.BytesToAddress([]byte{7}): &bn256ScalarMulIstanbul{}, + common.BytesToAddress([]byte{8}): &bn256PairingIstanbul{}, + common.BytesToAddress([]byte{9}): &blake2F{}, +} + +// PrecompiledContractsBLS contains the set of pre-compiled Ethereum +// contracts specified in EIP-2537. These are exported for testing purposes. +var PrecompiledContractsBLS = map[common.Address]PrecompiledContract{ + common.BytesToAddress([]byte{10}): &bls12381G1Add{}, + common.BytesToAddress([]byte{11}): &bls12381G1Mul{}, + common.BytesToAddress([]byte{12}): &bls12381G1MultiExp{}, + common.BytesToAddress([]byte{13}): &bls12381G2Add{}, + common.BytesToAddress([]byte{14}): &bls12381G2Mul{}, + common.BytesToAddress([]byte{15}): &bls12381G2MultiExp{}, + common.BytesToAddress([]byte{16}): &bls12381Pairing{}, + common.BytesToAddress([]byte{17}): &bls12381MapG1{}, + common.BytesToAddress([]byte{18}): &bls12381MapG2{}, +} + +var ( + PrecompiledAddressesBerlin []common.Address + PrecompiledAddressesIstanbul []common.Address + PrecompiledAddressesByzantium []common.Address + PrecompiledAddressesHomestead []common.Address +) + +func init() { + for k := range PrecompiledContractsHomestead { + PrecompiledAddressesHomestead = append(PrecompiledAddressesHomestead, k) + } + for k := range PrecompiledContractsByzantium { + PrecompiledAddressesByzantium = append(PrecompiledAddressesByzantium, k) + } + for k := range PrecompiledContractsIstanbul { + PrecompiledAddressesIstanbul = append(PrecompiledAddressesIstanbul, k) + } + for k := range PrecompiledContractsBerlin { + PrecompiledAddressesBerlin = append(PrecompiledAddressesBerlin, k) + } +} + +// ActivePrecompiles returns the precompiles enabled with the current configuration. +func ActivePrecompiles(rules params.Rules) []common.Address { + switch { + case rules.IsBerlin: + return PrecompiledAddressesBerlin + case rules.IsIstanbul: + return PrecompiledAddressesIstanbul + case rules.IsByzantium: + return PrecompiledAddressesByzantium + default: + return PrecompiledAddressesHomestead + } +} + +// RunPrecompiledContract runs and evaluates the output of a precompiled contract. +// It returns +// - the returned bytes, +// - the _remaining_ gas, +// - any error that occurred +func RunPrecompiledContract(p PrecompiledContract, input []byte, suppliedGas uint64) (ret []byte, remainingGas uint64, err error) { + gasCost := p.RequiredGas(input) + if suppliedGas < gasCost { + return nil, 0, ErrOutOfGas + } + suppliedGas -= gasCost + output, err := p.Run(input) + return output, suppliedGas, err +} + +// ECRECOVER implemented as a native contract. +type ecrecover struct{} + +func (c *ecrecover) RequiredGas(input []byte) uint64 { + return params.EcrecoverGas +} + +func (c *ecrecover) Run(input []byte) ([]byte, error) { + const ecRecoverInputLength = 128 + + input = common.RightPadBytes(input, ecRecoverInputLength) + // "input" is (hash, v, r, s), each 32 bytes + // but for ecrecover we want (r, s, v) + + r := new(big.Int).SetBytes(input[64:96]) + s := new(big.Int).SetBytes(input[96:128]) + v := input[63] - 27 + + // tighter sig s values input homestead only apply to tx sigs + if !allZero(input[32:63]) || !crypto.ValidateSignatureValues(v, r, s, false) { + return nil, nil + } + // We must make sure not to modify the 'input', so placing the 'v' along with + // the signature needs to be done on a new allocation + sig := make([]byte, 65) + copy(sig, input[64:128]) + sig[64] = v + // v needs to be at the end for libsecp256k1 + pubKey, err := crypto.Ecrecover(input[:32], sig) + // make sure the public key is a valid one + if err != nil { + return nil, nil + } + + // the first byte of pubkey is bitcoin heritage + return common.LeftPadBytes(crypto.Keccak256(pubKey[1:])[12:], 32), nil +} + +// SHA256 implemented as a native contract. +type sha256hash struct{} + +// RequiredGas returns the gas required to execute the pre-compiled contract. +// +// This method does not require any overflow checking as the input size gas costs +// required for anything significant is so high it's impossible to pay for. +func (c *sha256hash) RequiredGas(input []byte) uint64 { + return uint64(len(input)+31)/32*params.Sha256PerWordGas + params.Sha256BaseGas +} +func (c *sha256hash) Run(input []byte) ([]byte, error) { + h := sha256.Sum256(input) + return h[:], nil +} + +// RIPEMD160 implemented as a native contract. +type ripemd160hash struct{} + +// RequiredGas returns the gas required to execute the pre-compiled contract. +// +// This method does not require any overflow checking as the input size gas costs +// required for anything significant is so high it's impossible to pay for. +func (c *ripemd160hash) RequiredGas(input []byte) uint64 { + return uint64(len(input)+31)/32*params.Ripemd160PerWordGas + params.Ripemd160BaseGas +} +func (c *ripemd160hash) Run(input []byte) ([]byte, error) { + ripemd := ripemd160.New() + ripemd.Write(input) + return common.LeftPadBytes(ripemd.Sum(nil), 32), nil +} + +// data copy implemented as a native contract. +type dataCopy struct{} + +// RequiredGas returns the gas required to execute the pre-compiled contract. +// +// This method does not require any overflow checking as the input size gas costs +// required for anything significant is so high it's impossible to pay for. +func (c *dataCopy) RequiredGas(input []byte) uint64 { + return uint64(len(input)+31)/32*params.IdentityPerWordGas + params.IdentityBaseGas +} +func (c *dataCopy) Run(in []byte) ([]byte, error) { + return in, nil +} + +// bigModExp implements a native big integer exponential modular operation. +type bigModExp struct { + eip2565 bool +} + +var ( + big0 = big.NewInt(0) + big1 = big.NewInt(1) + big3 = big.NewInt(3) + big4 = big.NewInt(4) + big7 = big.NewInt(7) + big8 = big.NewInt(8) + big16 = big.NewInt(16) + big20 = big.NewInt(20) + big32 = big.NewInt(32) + big64 = big.NewInt(64) + big96 = big.NewInt(96) + big480 = big.NewInt(480) + big1024 = big.NewInt(1024) + big3072 = big.NewInt(3072) + big199680 = big.NewInt(199680) +) + +// modexpMultComplexity implements bigModexp multComplexity formula, as defined in EIP-198 +// +// def mult_complexity(x): +// if x <= 64: return x ** 2 +// elif x <= 1024: return x ** 2 // 4 + 96 * x - 3072 +// else: return x ** 2 // 16 + 480 * x - 199680 +// +// where is x is max(length_of_MODULUS, length_of_BASE) +func modexpMultComplexity(x *big.Int) *big.Int { + switch { + case x.Cmp(big64) <= 0: + x.Mul(x, x) // x ** 2 + case x.Cmp(big1024) <= 0: + // (x ** 2 // 4 ) + ( 96 * x - 3072) + x = new(big.Int).Add( + new(big.Int).Div(new(big.Int).Mul(x, x), big4), + new(big.Int).Sub(new(big.Int).Mul(big96, x), big3072), + ) + default: + // (x ** 2 // 16) + (480 * x - 199680) + x = new(big.Int).Add( + new(big.Int).Div(new(big.Int).Mul(x, x), big16), + new(big.Int).Sub(new(big.Int).Mul(big480, x), big199680), + ) + } + return x +} + +// RequiredGas returns the gas required to execute the pre-compiled contract. +func (c *bigModExp) RequiredGas(input []byte) uint64 { + var ( + baseLen = new(big.Int).SetBytes(getData(input, 0, 32)) + expLen = new(big.Int).SetBytes(getData(input, 32, 32)) + modLen = new(big.Int).SetBytes(getData(input, 64, 32)) + ) + if len(input) > 96 { + input = input[96:] + } else { + input = input[:0] + } + // Retrieve the head 32 bytes of exp for the adjusted exponent length + var expHead *big.Int + if big.NewInt(int64(len(input))).Cmp(baseLen) <= 0 { + expHead = new(big.Int) + } else { + if expLen.Cmp(big32) > 0 { + expHead = new(big.Int).SetBytes(getData(input, baseLen.Uint64(), 32)) + } else { + expHead = new(big.Int).SetBytes(getData(input, baseLen.Uint64(), expLen.Uint64())) + } + } + // Calculate the adjusted exponent length + var msb int + if bitlen := expHead.BitLen(); bitlen > 0 { + msb = bitlen - 1 + } + adjExpLen := new(big.Int) + if expLen.Cmp(big32) > 0 { + adjExpLen.Sub(expLen, big32) + adjExpLen.Mul(big8, adjExpLen) + } + adjExpLen.Add(adjExpLen, big.NewInt(int64(msb))) + // Calculate the gas cost of the operation + gas := new(big.Int).Set(math.BigMax(modLen, baseLen)) + if c.eip2565 { + // EIP-2565 has three changes + // 1. Different multComplexity (inlined here) + // in EIP-2565 (https://eips.ethereum.org/EIPS/eip-2565): + // + // def mult_complexity(x): + // ceiling(x/8)^2 + // + //where is x is max(length_of_MODULUS, length_of_BASE) + gas = gas.Add(gas, big7) + gas = gas.Div(gas, big8) + gas.Mul(gas, gas) + + gas.Mul(gas, math.BigMax(adjExpLen, big1)) + // 2. Different divisor (`GQUADDIVISOR`) (3) + gas.Div(gas, big3) + if gas.BitLen() > 64 { + return math.MaxUint64 + } + // 3. Minimum price of 200 gas + if gas.Uint64() < 200 { + return 200 + } + return gas.Uint64() + } + gas = modexpMultComplexity(gas) + gas.Mul(gas, math.BigMax(adjExpLen, big1)) + gas.Div(gas, big20) + + if gas.BitLen() > 64 { + return math.MaxUint64 + } + return gas.Uint64() +} + +func (c *bigModExp) Run(input []byte) ([]byte, error) { + var ( + baseLen = new(big.Int).SetBytes(getData(input, 0, 32)).Uint64() + expLen = new(big.Int).SetBytes(getData(input, 32, 32)).Uint64() + modLen = new(big.Int).SetBytes(getData(input, 64, 32)).Uint64() + ) + if len(input) > 96 { + input = input[96:] + } else { + input = input[:0] + } + // Handle a special case when both the base and mod length is zero + if baseLen == 0 && modLen == 0 { + return []byte{}, nil + } + // Retrieve the operands and execute the exponentiation + var ( + base = new(big.Int).SetBytes(getData(input, 0, baseLen)) + exp = new(big.Int).SetBytes(getData(input, baseLen, expLen)) + mod = new(big.Int).SetBytes(getData(input, baseLen+expLen, modLen)) + ) + if mod.BitLen() == 0 { + // Modulo 0 is undefined, return zero + return common.LeftPadBytes([]byte{}, int(modLen)), nil + } + return common.LeftPadBytes(base.Exp(base, exp, mod).Bytes(), int(modLen)), nil +} + +// newCurvePoint unmarshals a binary blob into a bn256 elliptic curve point, +// returning it, or an error if the point is invalid. +func newCurvePoint(blob []byte) (*bn256.G1, error) { + p := new(bn256.G1) + if _, err := p.Unmarshal(blob); err != nil { + return nil, err + } + return p, nil +} + +// newTwistPoint unmarshals a binary blob into a bn256 elliptic curve point, +// returning it, or an error if the point is invalid. +func newTwistPoint(blob []byte) (*bn256.G2, error) { + p := new(bn256.G2) + if _, err := p.Unmarshal(blob); err != nil { + return nil, err + } + return p, nil +} + +// runBn256Add implements the Bn256Add precompile, referenced by both +// Byzantium and Istanbul operations. +func runBn256Add(input []byte) ([]byte, error) { + x, err := newCurvePoint(getData(input, 0, 64)) + if err != nil { + return nil, err + } + y, err := newCurvePoint(getData(input, 64, 64)) + if err != nil { + return nil, err + } + res := new(bn256.G1) + res.Add(x, y) + return res.Marshal(), nil +} + +// bn256Add implements a native elliptic curve point addition conforming to +// Istanbul consensus rules. +type bn256AddIstanbul struct{} + +// RequiredGas returns the gas required to execute the pre-compiled contract. +func (c *bn256AddIstanbul) RequiredGas(input []byte) uint64 { + return params.Bn256AddGasIstanbul +} + +func (c *bn256AddIstanbul) Run(input []byte) ([]byte, error) { + return runBn256Add(input) +} + +// bn256AddByzantium implements a native elliptic curve point addition +// conforming to Byzantium consensus rules. +type bn256AddByzantium struct{} + +// RequiredGas returns the gas required to execute the pre-compiled contract. +func (c *bn256AddByzantium) RequiredGas(input []byte) uint64 { + return params.Bn256AddGasByzantium +} + +func (c *bn256AddByzantium) Run(input []byte) ([]byte, error) { + return runBn256Add(input) +} + +// runBn256ScalarMul implements the Bn256ScalarMul precompile, referenced by +// both Byzantium and Istanbul operations. +func runBn256ScalarMul(input []byte) ([]byte, error) { + p, err := newCurvePoint(getData(input, 0, 64)) + if err != nil { + return nil, err + } + res := new(bn256.G1) + res.ScalarMult(p, new(big.Int).SetBytes(getData(input, 64, 32))) + return res.Marshal(), nil +} + +// bn256ScalarMulIstanbul implements a native elliptic curve scalar +// multiplication conforming to Istanbul consensus rules. +type bn256ScalarMulIstanbul struct{} + +// RequiredGas returns the gas required to execute the pre-compiled contract. +func (c *bn256ScalarMulIstanbul) RequiredGas(input []byte) uint64 { + return params.Bn256ScalarMulGasIstanbul +} + +func (c *bn256ScalarMulIstanbul) Run(input []byte) ([]byte, error) { + return runBn256ScalarMul(input) +} + +// bn256ScalarMulByzantium implements a native elliptic curve scalar +// multiplication conforming to Byzantium consensus rules. +type bn256ScalarMulByzantium struct{} + +// RequiredGas returns the gas required to execute the pre-compiled contract. +func (c *bn256ScalarMulByzantium) RequiredGas(input []byte) uint64 { + return params.Bn256ScalarMulGasByzantium +} + +func (c *bn256ScalarMulByzantium) Run(input []byte) ([]byte, error) { + return runBn256ScalarMul(input) +} + +var ( + // true32Byte is returned if the bn256 pairing check succeeds. + true32Byte = []byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1} + + // false32Byte is returned if the bn256 pairing check fails. + false32Byte = make([]byte, 32) + + // errBadPairingInput is returned if the bn256 pairing input is invalid. + errBadPairingInput = errors.New("bad elliptic curve pairing size") +) + +// runBn256Pairing implements the Bn256Pairing precompile, referenced by both +// Byzantium and Istanbul operations. +func runBn256Pairing(input []byte) ([]byte, error) { + // Handle some corner cases cheaply + if len(input)%192 > 0 { + return nil, errBadPairingInput + } + // Convert the input into a set of coordinates + var ( + cs []*bn256.G1 + ts []*bn256.G2 + ) + for i := 0; i < len(input); i += 192 { + c, err := newCurvePoint(input[i : i+64]) + if err != nil { + return nil, err + } + t, err := newTwistPoint(input[i+64 : i+192]) + if err != nil { + return nil, err + } + cs = append(cs, c) + ts = append(ts, t) + } + // Execute the pairing checks and return the results + if bn256.PairingCheck(cs, ts) { + return true32Byte, nil + } + return false32Byte, nil +} + +// bn256PairingIstanbul implements a pairing pre-compile for the bn256 curve +// conforming to Istanbul consensus rules. +type bn256PairingIstanbul struct{} + +// RequiredGas returns the gas required to execute the pre-compiled contract. +func (c *bn256PairingIstanbul) RequiredGas(input []byte) uint64 { + return params.Bn256PairingBaseGasIstanbul + uint64(len(input)/192)*params.Bn256PairingPerPointGasIstanbul +} + +func (c *bn256PairingIstanbul) Run(input []byte) ([]byte, error) { + return runBn256Pairing(input) +} + +// bn256PairingByzantium implements a pairing pre-compile for the bn256 curve +// conforming to Byzantium consensus rules. +type bn256PairingByzantium struct{} + +// RequiredGas returns the gas required to execute the pre-compiled contract. +func (c *bn256PairingByzantium) RequiredGas(input []byte) uint64 { + return params.Bn256PairingBaseGasByzantium + uint64(len(input)/192)*params.Bn256PairingPerPointGasByzantium +} + +func (c *bn256PairingByzantium) Run(input []byte) ([]byte, error) { + return runBn256Pairing(input) +} + +type blake2F struct{} + +func (c *blake2F) RequiredGas(input []byte) uint64 { + // If the input is malformed, we can't calculate the gas, return 0 and let the + // actual call choke and fault. + if len(input) != blake2FInputLength { + return 0 + } + return uint64(binary.BigEndian.Uint32(input[0:4])) +} + +const ( + blake2FInputLength = 213 + blake2FFinalBlockBytes = byte(1) + blake2FNonFinalBlockBytes = byte(0) +) + +var ( + errBlake2FInvalidInputLength = errors.New("invalid input length") + errBlake2FInvalidFinalFlag = errors.New("invalid final flag") +) + +func (c *blake2F) Run(input []byte) ([]byte, error) { + // Make sure the input is valid (correct length and final flag) + if len(input) != blake2FInputLength { + return nil, errBlake2FInvalidInputLength + } + if input[212] != blake2FNonFinalBlockBytes && input[212] != blake2FFinalBlockBytes { + return nil, errBlake2FInvalidFinalFlag + } + // Parse the input into the Blake2b call parameters + var ( + rounds = binary.BigEndian.Uint32(input[0:4]) + final = input[212] == blake2FFinalBlockBytes + + h [8]uint64 + m [16]uint64 + t [2]uint64 + ) + for i := 0; i < 8; i++ { + offset := 4 + i*8 + h[i] = binary.LittleEndian.Uint64(input[offset : offset+8]) + } + for i := 0; i < 16; i++ { + offset := 68 + i*8 + m[i] = binary.LittleEndian.Uint64(input[offset : offset+8]) + } + t[0] = binary.LittleEndian.Uint64(input[196:204]) + t[1] = binary.LittleEndian.Uint64(input[204:212]) + + // Execute the compression function, extract and return the result + blake2b.F(&h, m, t, final, rounds) + + output := make([]byte, 64) + for i := 0; i < 8; i++ { + offset := i * 8 + binary.LittleEndian.PutUint64(output[offset:offset+8], h[i]) + } + return output, nil +} + +var ( + errBLS12381InvalidInputLength = errors.New("invalid input length") + errBLS12381InvalidFieldElementTopBytes = errors.New("invalid field element top bytes") + errBLS12381G1PointSubgroup = errors.New("g1 point is not on correct subgroup") + errBLS12381G2PointSubgroup = errors.New("g2 point is not on correct subgroup") +) + +// bls12381G1Add implements EIP-2537 G1Add precompile. +type bls12381G1Add struct{} + +// RequiredGas returns the gas required to execute the pre-compiled contract. +func (c *bls12381G1Add) RequiredGas(input []byte) uint64 { + return params.Bls12381G1AddGas +} + +func (c *bls12381G1Add) Run(input []byte) ([]byte, error) { + // Implements EIP-2537 G1Add precompile. + // > G1 addition call expects `256` bytes as an input that is interpreted as byte concatenation of two G1 points (`128` bytes each). + // > Output is an encoding of addition operation result - single G1 point (`128` bytes). + if len(input) != 256 { + return nil, errBLS12381InvalidInputLength + } + var err error + var p0, p1 *bls12381.PointG1 + + // Initialize G1 + g := bls12381.NewG1() + + // Decode G1 point p_0 + if p0, err = g.DecodePoint(input[:128]); err != nil { + return nil, err + } + // Decode G1 point p_1 + if p1, err = g.DecodePoint(input[128:]); err != nil { + return nil, err + } + + // Compute r = p_0 + p_1 + r := g.New() + g.Add(r, p0, p1) + + // Encode the G1 point result into 128 bytes + return g.EncodePoint(r), nil +} + +// bls12381G1Mul implements EIP-2537 G1Mul precompile. +type bls12381G1Mul struct{} + +// RequiredGas returns the gas required to execute the pre-compiled contract. +func (c *bls12381G1Mul) RequiredGas(input []byte) uint64 { + return params.Bls12381G1MulGas +} + +func (c *bls12381G1Mul) Run(input []byte) ([]byte, error) { + // Implements EIP-2537 G1Mul precompile. + // > G1 multiplication call expects `160` bytes as an input that is interpreted as byte concatenation of encoding of G1 point (`128` bytes) and encoding of a scalar value (`32` bytes). + // > Output is an encoding of multiplication operation result - single G1 point (`128` bytes). + if len(input) != 160 { + return nil, errBLS12381InvalidInputLength + } + var err error + var p0 *bls12381.PointG1 + + // Initialize G1 + g := bls12381.NewG1() + + // Decode G1 point + if p0, err = g.DecodePoint(input[:128]); err != nil { + return nil, err + } + // Decode scalar value + e := new(big.Int).SetBytes(input[128:]) + + // Compute r = e * p_0 + r := g.New() + g.MulScalar(r, p0, e) + + // Encode the G1 point into 128 bytes + return g.EncodePoint(r), nil +} + +// bls12381G1MultiExp implements EIP-2537 G1MultiExp precompile. +type bls12381G1MultiExp struct{} + +// RequiredGas returns the gas required to execute the pre-compiled contract. +func (c *bls12381G1MultiExp) RequiredGas(input []byte) uint64 { + // Calculate G1 point, scalar value pair length + k := len(input) / 160 + if k == 0 { + // Return 0 gas for small input length + return 0 + } + // Lookup discount value for G1 point, scalar value pair length + var discount uint64 + if dLen := len(params.Bls12381MultiExpDiscountTable); k < dLen { + discount = params.Bls12381MultiExpDiscountTable[k-1] + } else { + discount = params.Bls12381MultiExpDiscountTable[dLen-1] + } + // Calculate gas and return the result + return (uint64(k) * params.Bls12381G1MulGas * discount) / 1000 +} + +func (c *bls12381G1MultiExp) Run(input []byte) ([]byte, error) { + // Implements EIP-2537 G1MultiExp precompile. + // G1 multiplication call expects `160*k` bytes as an input that is interpreted as byte concatenation of `k` slices each of them being a byte concatenation of encoding of G1 point (`128` bytes) and encoding of a scalar value (`32` bytes). + // Output is an encoding of multiexponentiation operation result - single G1 point (`128` bytes). + k := len(input) / 160 + if len(input) == 0 || len(input)%160 != 0 { + return nil, errBLS12381InvalidInputLength + } + var err error + points := make([]*bls12381.PointG1, k) + scalars := make([]*big.Int, k) + + // Initialize G1 + g := bls12381.NewG1() + + // Decode point scalar pairs + for i := 0; i < k; i++ { + off := 160 * i + t0, t1, t2 := off, off+128, off+160 + // Decode G1 point + if points[i], err = g.DecodePoint(input[t0:t1]); err != nil { + return nil, err + } + // Decode scalar value + scalars[i] = new(big.Int).SetBytes(input[t1:t2]) + } + + // Compute r = e_0 * p_0 + e_1 * p_1 + ... + e_(k-1) * p_(k-1) + r := g.New() + g.MultiExp(r, points, scalars) + + // Encode the G1 point to 128 bytes + return g.EncodePoint(r), nil +} + +// bls12381G2Add implements EIP-2537 G2Add precompile. +type bls12381G2Add struct{} + +// RequiredGas returns the gas required to execute the pre-compiled contract. +func (c *bls12381G2Add) RequiredGas(input []byte) uint64 { + return params.Bls12381G2AddGas +} + +func (c *bls12381G2Add) Run(input []byte) ([]byte, error) { + // Implements EIP-2537 G2Add precompile. + // > G2 addition call expects `512` bytes as an input that is interpreted as byte concatenation of two G2 points (`256` bytes each). + // > Output is an encoding of addition operation result - single G2 point (`256` bytes). + if len(input) != 512 { + return nil, errBLS12381InvalidInputLength + } + var err error + var p0, p1 *bls12381.PointG2 + + // Initialize G2 + g := bls12381.NewG2() + r := g.New() + + // Decode G2 point p_0 + if p0, err = g.DecodePoint(input[:256]); err != nil { + return nil, err + } + // Decode G2 point p_1 + if p1, err = g.DecodePoint(input[256:]); err != nil { + return nil, err + } + + // Compute r = p_0 + p_1 + g.Add(r, p0, p1) + + // Encode the G2 point into 256 bytes + return g.EncodePoint(r), nil +} + +// bls12381G2Mul implements EIP-2537 G2Mul precompile. +type bls12381G2Mul struct{} + +// RequiredGas returns the gas required to execute the pre-compiled contract. +func (c *bls12381G2Mul) RequiredGas(input []byte) uint64 { + return params.Bls12381G2MulGas +} + +func (c *bls12381G2Mul) Run(input []byte) ([]byte, error) { + // Implements EIP-2537 G2MUL precompile logic. + // > G2 multiplication call expects `288` bytes as an input that is interpreted as byte concatenation of encoding of G2 point (`256` bytes) and encoding of a scalar value (`32` bytes). + // > Output is an encoding of multiplication operation result - single G2 point (`256` bytes). + if len(input) != 288 { + return nil, errBLS12381InvalidInputLength + } + var err error + var p0 *bls12381.PointG2 + + // Initialize G2 + g := bls12381.NewG2() + + // Decode G2 point + if p0, err = g.DecodePoint(input[:256]); err != nil { + return nil, err + } + // Decode scalar value + e := new(big.Int).SetBytes(input[256:]) + + // Compute r = e * p_0 + r := g.New() + g.MulScalar(r, p0, e) + + // Encode the G2 point into 256 bytes + return g.EncodePoint(r), nil +} + +// bls12381G2MultiExp implements EIP-2537 G2MultiExp precompile. +type bls12381G2MultiExp struct{} + +// RequiredGas returns the gas required to execute the pre-compiled contract. +func (c *bls12381G2MultiExp) RequiredGas(input []byte) uint64 { + // Calculate G2 point, scalar value pair length + k := len(input) / 288 + if k == 0 { + // Return 0 gas for small input length + return 0 + } + // Lookup discount value for G2 point, scalar value pair length + var discount uint64 + if dLen := len(params.Bls12381MultiExpDiscountTable); k < dLen { + discount = params.Bls12381MultiExpDiscountTable[k-1] + } else { + discount = params.Bls12381MultiExpDiscountTable[dLen-1] + } + // Calculate gas and return the result + return (uint64(k) * params.Bls12381G2MulGas * discount) / 1000 +} + +func (c *bls12381G2MultiExp) Run(input []byte) ([]byte, error) { + // Implements EIP-2537 G2MultiExp precompile logic + // > G2 multiplication call expects `288*k` bytes as an input that is interpreted as byte concatenation of `k` slices each of them being a byte concatenation of encoding of G2 point (`256` bytes) and encoding of a scalar value (`32` bytes). + // > Output is an encoding of multiexponentiation operation result - single G2 point (`256` bytes). + k := len(input) / 288 + if len(input) == 0 || len(input)%288 != 0 { + return nil, errBLS12381InvalidInputLength + } + var err error + points := make([]*bls12381.PointG2, k) + scalars := make([]*big.Int, k) + + // Initialize G2 + g := bls12381.NewG2() + + // Decode point scalar pairs + for i := 0; i < k; i++ { + off := 288 * i + t0, t1, t2 := off, off+256, off+288 + // Decode G1 point + if points[i], err = g.DecodePoint(input[t0:t1]); err != nil { + return nil, err + } + // Decode scalar value + scalars[i] = new(big.Int).SetBytes(input[t1:t2]) + } + + // Compute r = e_0 * p_0 + e_1 * p_1 + ... + e_(k-1) * p_(k-1) + r := g.New() + g.MultiExp(r, points, scalars) + + // Encode the G2 point to 256 bytes. + return g.EncodePoint(r), nil +} + +// bls12381Pairing implements EIP-2537 Pairing precompile. +type bls12381Pairing struct{} + +// RequiredGas returns the gas required to execute the pre-compiled contract. +func (c *bls12381Pairing) RequiredGas(input []byte) uint64 { + return params.Bls12381PairingBaseGas + uint64(len(input)/384)*params.Bls12381PairingPerPairGas +} + +func (c *bls12381Pairing) Run(input []byte) ([]byte, error) { + // Implements EIP-2537 Pairing precompile logic. + // > Pairing call expects `384*k` bytes as an inputs that is interpreted as byte concatenation of `k` slices. Each slice has the following structure: + // > - `128` bytes of G1 point encoding + // > - `256` bytes of G2 point encoding + // > Output is a `32` bytes where last single byte is `0x01` if pairing result is equal to multiplicative identity in a pairing target field and `0x00` otherwise + // > (which is equivalent of Big Endian encoding of Solidity values `uint256(1)` and `uin256(0)` respectively). + k := len(input) / 384 + if len(input) == 0 || len(input)%384 != 0 { + return nil, errBLS12381InvalidInputLength + } + + // Initialize BLS12-381 pairing engine + e := bls12381.NewPairingEngine() + g1, g2 := e.G1, e.G2 + + // Decode pairs + for i := 0; i < k; i++ { + off := 384 * i + t0, t1, t2 := off, off+128, off+384 + + // Decode G1 point + p1, err := g1.DecodePoint(input[t0:t1]) + if err != nil { + return nil, err + } + // Decode G2 point + p2, err := g2.DecodePoint(input[t1:t2]) + if err != nil { + return nil, err + } + + // 'point is on curve' check already done, + // Here we need to apply subgroup checks. + if !g1.InCorrectSubgroup(p1) { + return nil, errBLS12381G1PointSubgroup + } + if !g2.InCorrectSubgroup(p2) { + return nil, errBLS12381G2PointSubgroup + } + + // Update pairing engine with G1 and G2 ponits + e.AddPair(p1, p2) + } + // Prepare 32 byte output + out := make([]byte, 32) + + // Compute pairing and set the result + if e.Check() { + out[31] = 1 + } + return out, nil +} + +// decodeBLS12381FieldElement decodes BLS12-381 elliptic curve field element. +// Removes top 16 bytes of 64 byte input. +func decodeBLS12381FieldElement(in []byte) ([]byte, error) { + if len(in) != 64 { + return nil, errors.New("invalid field element length") + } + // check top bytes + for i := 0; i < 16; i++ { + if in[i] != byte(0x00) { + return nil, errBLS12381InvalidFieldElementTopBytes + } + } + out := make([]byte, 48) + copy(out[:], in[16:]) + return out, nil +} + +// bls12381MapG1 implements EIP-2537 MapG1 precompile. +type bls12381MapG1 struct{} + +// RequiredGas returns the gas required to execute the pre-compiled contract. +func (c *bls12381MapG1) RequiredGas(input []byte) uint64 { + return params.Bls12381MapG1Gas +} + +func (c *bls12381MapG1) Run(input []byte) ([]byte, error) { + // Implements EIP-2537 Map_To_G1 precompile. + // > Field-to-curve call expects `64` bytes an an input that is interpreted as a an element of the base field. + // > Output of this call is `128` bytes and is G1 point following respective encoding rules. + if len(input) != 64 { + return nil, errBLS12381InvalidInputLength + } + + // Decode input field element + fe, err := decodeBLS12381FieldElement(input) + if err != nil { + return nil, err + } + + // Initialize G1 + g := bls12381.NewG1() + + // Compute mapping + r, err := g.MapToCurve(fe) + if err != nil { + return nil, err + } + + // Encode the G1 point to 128 bytes + return g.EncodePoint(r), nil +} + +// bls12381MapG2 implements EIP-2537 MapG2 precompile. +type bls12381MapG2 struct{} + +// RequiredGas returns the gas required to execute the pre-compiled contract. +func (c *bls12381MapG2) RequiredGas(input []byte) uint64 { + return params.Bls12381MapG2Gas +} + +func (c *bls12381MapG2) Run(input []byte) ([]byte, error) { + // Implements EIP-2537 Map_FP2_TO_G2 precompile logic. + // > Field-to-curve call expects `128` bytes an an input that is interpreted as a an element of the quadratic extension field. + // > Output of this call is `256` bytes and is G2 point following respective encoding rules. + if len(input) != 128 { + return nil, errBLS12381InvalidInputLength + } + + // Decode input field element + fe := make([]byte, 96) + c0, err := decodeBLS12381FieldElement(input[:64]) + if err != nil { + return nil, err + } + copy(fe[48:], c0) + c1, err := decodeBLS12381FieldElement(input[64:]) + if err != nil { + return nil, err + } + copy(fe[:48], c1) + + // Initialize G2 + g := bls12381.NewG2() + + // Compute mapping + r, err := g.MapToCurve(fe) + if err != nil { + return nil, err + } + + // Encode the G2 point to 256 bytes + return g.EncodePoint(r), nil +} diff --git a/x/evm/vm/doc.go b/x/evm/vm/doc.go new file mode 100644 index 00000000..5864d0cf --- /dev/null +++ b/x/evm/vm/doc.go @@ -0,0 +1,24 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +/* +Package vm implements the Ethereum Virtual Machine. + +The vm package implements one EVM, a byte code VM. The BC (Byte Code) VM loops +over a set of bytes and executes them according to the set of rules defined +in the Ethereum yellow paper. +*/ +package vm diff --git a/x/evm/vm/eips.go b/x/evm/vm/eips.go new file mode 100644 index 00000000..93f5c399 --- /dev/null +++ b/x/evm/vm/eips.go @@ -0,0 +1,194 @@ +// Copyright 2019 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package vm + +import ( + "fmt" + "sort" + + "github.com/ethereum/go-ethereum/params" + "github.com/holiman/uint256" +) + +var activators = map[int]func(*JumpTable){ + 3855: enable3855, + 3529: enable3529, + 3198: enable3198, + 2929: enable2929, + 2200: enable2200, + 1884: enable1884, + 1344: enable1344, +} + +// EnableEIP enables the given EIP on the config. +// This operation writes in-place, and callers need to ensure that the globally +// defined jump tables are not polluted. +func EnableEIP(eipNum int, jt *JumpTable) error { + enablerFn, ok := activators[eipNum] + if !ok { + return fmt.Errorf("undefined eip %d", eipNum) + } + enablerFn(jt) + return nil +} + +func ValidEip(eipNum int) bool { + _, ok := activators[eipNum] + return ok +} +func ActivateableEips() []string { + var nums []string + for k := range activators { + nums = append(nums, fmt.Sprintf("%d", k)) + } + sort.Strings(nums) + return nums +} + +// enable1884 applies EIP-1884 to the given jump table: +// - Increase cost of BALANCE to 700 +// - Increase cost of EXTCODEHASH to 700 +// - Increase cost of SLOAD to 800 +// - Define SELFBALANCE, with cost GasFastStep (5) +func enable1884(jt *JumpTable) { + // Gas cost changes + jt[SLOAD].constantGas = params.SloadGasEIP1884 + jt[BALANCE].constantGas = params.BalanceGasEIP1884 + jt[EXTCODEHASH].constantGas = params.ExtcodeHashGasEIP1884 + + // New opcode + jt[SELFBALANCE] = &operation{ + execute: opSelfBalance, + constantGas: GasFastStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + } +} + +func opSelfBalance(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + balance, _ := uint256.FromBig(interpreter.evm.StateDB.GetBalance(scope.Contract.Address())) + scope.Stack.push(balance) + return nil, nil +} + +// enable1344 applies EIP-1344 (ChainID Opcode) +// - Adds an opcode that returns the current chain’s EIP-155 unique identifier +func enable1344(jt *JumpTable) { + // New opcode + jt[CHAINID] = &operation{ + execute: opChainID, + constantGas: GasQuickStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + } +} + +// opChainID implements CHAINID opcode +func opChainID(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + chainId, _ := uint256.FromBig(interpreter.evm.chainConfig.ChainID) + scope.Stack.push(chainId) + return nil, nil +} + +// enable2200 applies EIP-2200 (Rebalance net-metered SSTORE) +func enable2200(jt *JumpTable) { + jt[SLOAD].constantGas = params.SloadGasEIP2200 + jt[SSTORE].dynamicGas = gasSStoreEIP2200 +} + +// enable2929 enables "EIP-2929: Gas cost increases for state access opcodes" +// https://eips.ethereum.org/EIPS/eip-2929 +func enable2929(jt *JumpTable) { + jt[SSTORE].dynamicGas = gasSStoreEIP2929 + + jt[SLOAD].constantGas = 0 + jt[SLOAD].dynamicGas = gasSLoadEIP2929 + + jt[EXTCODECOPY].constantGas = params.WarmStorageReadCostEIP2929 + jt[EXTCODECOPY].dynamicGas = gasExtCodeCopyEIP2929 + + jt[EXTCODESIZE].constantGas = params.WarmStorageReadCostEIP2929 + jt[EXTCODESIZE].dynamicGas = gasEip2929AccountCheck + + jt[EXTCODEHASH].constantGas = params.WarmStorageReadCostEIP2929 + jt[EXTCODEHASH].dynamicGas = gasEip2929AccountCheck + + jt[BALANCE].constantGas = params.WarmStorageReadCostEIP2929 + jt[BALANCE].dynamicGas = gasEip2929AccountCheck + + jt[CALL].constantGas = params.WarmStorageReadCostEIP2929 + jt[CALL].dynamicGas = gasCallEIP2929 + + jt[CALLCODE].constantGas = params.WarmStorageReadCostEIP2929 + jt[CALLCODE].dynamicGas = gasCallCodeEIP2929 + + jt[STATICCALL].constantGas = params.WarmStorageReadCostEIP2929 + jt[STATICCALL].dynamicGas = gasStaticCallEIP2929 + + jt[DELEGATECALL].constantGas = params.WarmStorageReadCostEIP2929 + jt[DELEGATECALL].dynamicGas = gasDelegateCallEIP2929 + + // This was previously part of the dynamic cost, but we're using it as a constantGas + // factor here + jt[SELFDESTRUCT].constantGas = params.SelfdestructGasEIP150 + jt[SELFDESTRUCT].dynamicGas = gasSelfdestructEIP2929 +} + +// enable3529 enabled "EIP-3529: Reduction in refunds": +// - Removes refunds for selfdestructs +// - Reduces refunds for SSTORE +// - Reduces max refunds to 20% gas +func enable3529(jt *JumpTable) { + jt[SSTORE].dynamicGas = gasSStoreEIP3529 + jt[SELFDESTRUCT].dynamicGas = gasSelfdestructEIP3529 +} + +// enable3198 applies EIP-3198 (BASEFEE Opcode) +// - Adds an opcode that returns the current block's base fee. +func enable3198(jt *JumpTable) { + // New opcode + jt[BASEFEE] = &operation{ + execute: opBaseFee, + constantGas: GasQuickStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + } +} + +// opBaseFee implements BASEFEE opcode +func opBaseFee(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + baseFee, _ := uint256.FromBig(interpreter.evm.Context.BaseFee) + scope.Stack.push(baseFee) + return nil, nil +} + +// enable3855 applies EIP-3855 (PUSH0 opcode) +func enable3855(jt *JumpTable) { + // New opcode + jt[PUSH0] = &operation{ + execute: opPush0, + constantGas: GasQuickStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + } +} + +// opPush0 implements the PUSH0 opcode +func opPush0(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + scope.Stack.push(new(uint256.Int)) + return nil, nil +} diff --git a/x/evm/vm/errors.go b/x/evm/vm/errors.go new file mode 100644 index 00000000..004f8ef1 --- /dev/null +++ b/x/evm/vm/errors.go @@ -0,0 +1,72 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package vm + +import ( + "errors" + "fmt" +) + +// List evm execution errors +var ( + ErrOutOfGas = errors.New("out of gas") + ErrCodeStoreOutOfGas = errors.New("contract creation code storage out of gas") + ErrDepth = errors.New("max call depth exceeded") + ErrInsufficientBalance = errors.New("insufficient balance for transfer") + ErrContractAddressCollision = errors.New("contract address collision") + ErrExecutionReverted = errors.New("execution reverted") + ErrMaxCodeSizeExceeded = errors.New("max code size exceeded") + ErrInvalidJump = errors.New("invalid jump destination") + ErrWriteProtection = errors.New("write protection") + ErrReturnDataOutOfBounds = errors.New("return data out of bounds") + ErrGasUintOverflow = errors.New("gas uint64 overflow") + ErrInvalidCode = errors.New("invalid code: must not begin with 0xef") + ErrNonceUintOverflow = errors.New("nonce uint64 overflow") + + // errStopToken is an internal token indicating interpreter loop termination, + // never returned to outside callers. + errStopToken = errors.New("stop token") +) + +// ErrStackUnderflow wraps an evm error when the items on the stack less +// than the minimal requirement. +type ErrStackUnderflow struct { + stackLen int + required int +} + +func (e *ErrStackUnderflow) Error() string { + return fmt.Sprintf("stack underflow (%d <=> %d)", e.stackLen, e.required) +} + +// ErrStackOverflow wraps an evm error when the items on the stack exceeds +// the maximum allowance. +type ErrStackOverflow struct { + stackLen int + limit int +} + +func (e *ErrStackOverflow) Error() string { + return fmt.Sprintf("stack limit reached %d (%d)", e.stackLen, e.limit) +} + +// ErrInvalidOpCode wraps an evm error when an invalid opcode is encountered. +type ErrInvalidOpCode struct { + opcode OpCode +} + +func (e *ErrInvalidOpCode) Error() string { return fmt.Sprintf("invalid opcode: %s", e.opcode) } diff --git a/x/evm/vm/evm.go b/x/evm/vm/evm.go new file mode 100644 index 00000000..84df83cb --- /dev/null +++ b/x/evm/vm/evm.go @@ -0,0 +1,630 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package vm + +import ( + "math/big" + "sync/atomic" + "time" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/consensus" + "github.com/ethereum/go-ethereum/core" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/crypto" + "github.com/ethereum/go-ethereum/params" + "github.com/holiman/uint256" +) + +// emptyCodeHash is used by create to ensure deployment is disallowed to already +// deployed contract addresses (relevant after the account abstraction). +var emptyCodeHash = crypto.Keccak256Hash(nil) + +type ( + // CanTransferFunc is the signature of a transfer guard function + CanTransferFunc func(StateDB, common.Address, *big.Int) bool + // TransferFunc is the signature of a transfer function + TransferFunc func(StateDB, common.Address, common.Address, *big.Int) + // GetHashFunc returns the n'th block hash in the blockchain + // and is used by the BLOCKHASH EVM op code. + GetHashFunc func(uint64) common.Hash + + // custom + // PrepayFunc execute prepay with provided data in PREPAY OpCode + PrepayFunc func(evm *EVM, from, beneficiary common.Address, amount *big.Int, gas uint64) (*big.Int, uint64, error) +) + +func (evm *EVM) precompile(addr common.Address) (PrecompiledContract, bool) { + var precompiles map[common.Address]PrecompiledContract + switch { + case evm.chainRules.IsBerlin: + precompiles = PrecompiledContractsBerlin + case evm.chainRules.IsIstanbul: + precompiles = PrecompiledContractsIstanbul + case evm.chainRules.IsByzantium: + precompiles = PrecompiledContractsByzantium + default: + precompiles = PrecompiledContractsHomestead + } + p, ok := precompiles[addr] + return p, ok +} + +// BlockContext provides the EVM with auxiliary information. Once provided +// it shouldn't be modified. +type BlockContext struct { + // CanTransfer returns whether the account contains + // sufficient ether to transfer the value + CanTransfer CanTransferFunc + // Transfer transfers ether from one account to the other + Transfer TransferFunc + // GetHash returns the hash corresponding to n + GetHash GetHashFunc + // Prepay execute prepay with given context + Prepay PrepayFunc + + // Block information + Coinbase common.Address // Provides information for COINBASE + GasLimit uint64 // Provides information for GASLIMIT + BlockNumber *big.Int // Provides information for NUMBER + Time *big.Int // Provides information for TIME + Difficulty *big.Int // Provides information for DIFFICULTY + BaseFee *big.Int // Provides information for BASEFEE + Random *common.Hash // Provides information for RANDOM +} + +// TxContext provides the EVM with information about a transaction. +// All fields can change between transactions. +type TxContext struct { + // Message information + Origin common.Address // Provides information for ORIGIN + GasPrice *big.Int // Provides information for GASPRICE +} + +// EVM is the Ethereum Virtual Machine base object and provides +// the necessary tools to run a contract on the given state with +// the provided context. It should be noted that any error +// generated through any of the calls should be considered a +// revert-state-and-consume-all-gas operation, no checks on +// specific errors should ever be performed. The interpreter makes +// sure that any errors generated are to be considered faulty code. +// +// The EVM should never be reused and is not thread safe. +type EVM struct { + // Context provides auxiliary blockchain related information + Context BlockContext + TxContext + // StateDB gives access to the underlying state + StateDB StateDB + // Depth is the current call stack + depth int + + // chainConfig contains information about the current chain + chainConfig *params.ChainConfig + // chain rules contains the chain rules for the current epoch + chainRules params.Rules + // virtual machine configuration options used to initialise the + // evm. + Config Config + // global (to this context) ethereum virtual machine + // used throughout the execution of the tx. + interpreter *EVMInterpreter + // abort is used to abort the EVM calling operations + // NOTE: must be set atomically + abort int32 + // callGasTemp holds the gas available for the current call. This is needed because the + // available gas is calculated in gasCall* according to the 63/64 rule and later + // applied in opCall*. + callGasTemp uint64 + // genesisContractVerifier verifies is contract is trusted in order to allow curtain opcodes + genesisContractVerifier *GenesisContractVerifier +} + +// NewEVM returns a new EVM. The returned EVM is not thread safe and should +// only ever be used *once*. +func NewEVM(blockCtx BlockContext, txCtx TxContext, statedb StateDB, chainConfig *params.ChainConfig, config Config, genesisContractVerifier *GenesisContractVerifier) *EVM { + evm := &EVM{ + Context: blockCtx, + TxContext: txCtx, + StateDB: statedb, + Config: config, + chainConfig: chainConfig, + chainRules: chainConfig.Rules(blockCtx.BlockNumber, blockCtx.Random != nil), + genesisContractVerifier: genesisContractVerifier, + } + evm.interpreter = NewEVMInterpreter(evm, config) + return evm +} + +// Reset resets the EVM with a new transaction context.Reset +// This is not threadsafe and should only be done very cautiously. +func (evm *EVM) Reset(txCtx TxContext, statedb StateDB) { + evm.TxContext = txCtx + evm.StateDB = statedb +} + +// Cancel cancels any running EVM operation. This may be called concurrently and +// it's safe to be called multiple times. +func (evm *EVM) Cancel() { + atomic.StoreInt32(&evm.abort, 1) +} + +// Cancelled returns true if Cancel has been called +func (evm *EVM) Cancelled() bool { + return atomic.LoadInt32(&evm.abort) == 1 +} + +// Interpreter returns the current interpreter +func (evm *EVM) Interpreter() *EVMInterpreter { + return evm.interpreter +} + +// Call executes the contract associated with the addr with the given input as +// parameters. It also handles any necessary value transfer required and takes +// the necessary steps to create accounts and reverses the state in case of an +// execution error or failed value transfer. +func (evm *EVM) Call(caller ContractRef, addr common.Address, input []byte, gas uint64, value *big.Int) (ret []byte, leftOverGas uint64, err error) { + // Fail if we're trying to execute above the call depth limit + if evm.depth > int(params.CallCreateDepth) { + return nil, gas, ErrDepth + } + // Fail if we're trying to transfer more than the available balance + if value.Sign() != 0 && !evm.Context.CanTransfer(evm.StateDB, caller.Address(), value) { + return nil, gas, ErrInsufficientBalance + } + snapshot := evm.StateDB.Snapshot() + p, isPrecompile := evm.precompile(addr) + + if !evm.StateDB.Exist(addr) { + if !isPrecompile && evm.chainRules.IsEIP158 && value.Sign() == 0 { + // Calling a non existing account, don't do anything, but ping the tracer + if evm.Config.Debug { + if evm.depth == 0 { + evm.Config.Tracer.CaptureStart(evm, caller.Address(), addr, false, input, gas, value) + evm.Config.Tracer.CaptureEnd(ret, 0, 0, nil) + } else { + evm.Config.Tracer.CaptureEnter(CALL, caller.Address(), addr, input, gas, value) + evm.Config.Tracer.CaptureExit(ret, 0, nil) + } + } + return nil, gas, nil + } + evm.StateDB.CreateAccount(addr) + } + evm.Context.Transfer(evm.StateDB, caller.Address(), addr, value) + + // Capture the tracer start/end events in debug mode + if evm.Config.Debug { + if evm.depth == 0 { + evm.Config.Tracer.CaptureStart(evm, caller.Address(), addr, false, input, gas, value) + defer func(startGas uint64, startTime time.Time) { // Lazy evaluation of the parameters + evm.Config.Tracer.CaptureEnd(ret, startGas-gas, time.Since(startTime), err) + }(gas, time.Now()) + } else { + // Handle tracer events for entering and exiting a call frame + evm.Config.Tracer.CaptureEnter(CALL, caller.Address(), addr, input, gas, value) + defer func(startGas uint64) { + evm.Config.Tracer.CaptureExit(ret, startGas-gas, err) + }(gas) + } + } + + if isPrecompile { + ret, gas, err = RunPrecompiledContract(p, input, gas) + } else { + // Initialise a new contract and set the code that is to be used by the EVM. + // The contract is a scoped environment for this execution context only. + code := evm.StateDB.GetCode(addr) + if len(code) == 0 { + ret, err = nil, nil // gas is unchanged + } else { + addrCopy := addr + // If the account has no code, we can abort here + // The depth-check is already done, and precompiles handled above + contract := NewContract(caller, AccountRef(addrCopy), value, gas) + contract.SetCallCode(&addrCopy, evm.StateDB.GetCodeHash(addrCopy), code) + ret, err = evm.interpreter.Run(contract, input, false) + gas = contract.Gas + } + } + // When an error was returned by the EVM or when setting the creation code + // above we revert to the snapshot and consume any gas remaining. Additionally + // when we're in homestead this also counts for code storage gas errors. + if err != nil { + evm.StateDB.RevertToSnapshot(snapshot) + if err != ErrExecutionReverted { + gas = 0 + } + // TODO: consider clearing up unused snapshots: + //} else { + // evm.StateDB.DiscardSnapshot(snapshot) + } + return ret, gas, err +} + +// CallCode executes the contract associated with the addr with the given input +// as parameters. It also handles any necessary value transfer required and takes +// the necessary steps to create accounts and reverses the state in case of an +// execution error or failed value transfer. +// +// CallCode differs from Call in the sense that it executes the given address' +// code with the caller as context. +func (evm *EVM) CallCode(caller ContractRef, addr common.Address, input []byte, gas uint64, value *big.Int) (ret []byte, leftOverGas uint64, err error) { + // Fail if we're trying to execute above the call depth limit + if evm.depth > int(params.CallCreateDepth) { + return nil, gas, ErrDepth + } + // Fail if we're trying to transfer more than the available balance + // Note although it's noop to transfer X ether to caller itself. But + // if caller doesn't have enough balance, it would be an error to allow + // over-charging itself. So the check here is necessary. + if !evm.Context.CanTransfer(evm.StateDB, caller.Address(), value) { + return nil, gas, ErrInsufficientBalance + } + var snapshot = evm.StateDB.Snapshot() + + // Invoke tracer hooks that signal entering/exiting a call frame + if evm.Config.Debug { + evm.Config.Tracer.CaptureEnter(CALLCODE, caller.Address(), addr, input, gas, value) + defer func(startGas uint64) { + evm.Config.Tracer.CaptureExit(ret, startGas-gas, err) + }(gas) + } + + // It is allowed to call precompiles, even via delegatecall + if p, isPrecompile := evm.precompile(addr); isPrecompile { + ret, gas, err = RunPrecompiledContract(p, input, gas) + } else { + addrCopy := addr + // Initialise a new contract and set the code that is to be used by the EVM. + // The contract is a scoped environment for this execution context only. + contract := NewContract(caller, AccountRef(caller.Address()), value, gas) + contract.SetCallCode(&addrCopy, evm.StateDB.GetCodeHash(addrCopy), evm.StateDB.GetCode(addrCopy)) + ret, err = evm.interpreter.Run(contract, input, false) + gas = contract.Gas + } + if err != nil { + evm.StateDB.RevertToSnapshot(snapshot) + if err != ErrExecutionReverted { + gas = 0 + } + } + return ret, gas, err +} + +// DelegateCall executes the contract associated with the addr with the given input +// as parameters. It reverses the state in case of an execution error. +// +// DelegateCall differs from CallCode in the sense that it executes the given address' +// code with the caller as context and the caller is set to the caller of the caller. +func (evm *EVM) DelegateCall(caller ContractRef, addr common.Address, input []byte, gas uint64) (ret []byte, leftOverGas uint64, err error) { + // Fail if we're trying to execute above the call depth limit + if evm.depth > int(params.CallCreateDepth) { + return nil, gas, ErrDepth + } + var snapshot = evm.StateDB.Snapshot() + + // Invoke tracer hooks that signal entering/exiting a call frame + if evm.Config.Debug { + evm.Config.Tracer.CaptureEnter(DELEGATECALL, caller.Address(), addr, input, gas, nil) + defer func(startGas uint64) { + evm.Config.Tracer.CaptureExit(ret, startGas-gas, err) + }(gas) + } + + // It is allowed to call precompiles, even via delegatecall + if p, isPrecompile := evm.precompile(addr); isPrecompile { + ret, gas, err = RunPrecompiledContract(p, input, gas) + } else { + addrCopy := addr + // Initialise a new contract and make initialise the delegate values + contract := NewContract(caller, AccountRef(caller.Address()), nil, gas).AsDelegate() + contract.SetCallCode(&addrCopy, evm.StateDB.GetCodeHash(addrCopy), evm.StateDB.GetCode(addrCopy)) + ret, err = evm.interpreter.Run(contract, input, false) + gas = contract.Gas + } + if err != nil { + evm.StateDB.RevertToSnapshot(snapshot) + if err != ErrExecutionReverted { + gas = 0 + } + } + return ret, gas, err +} + +// StaticCall executes the contract associated with the addr with the given input +// as parameters while disallowing any modifications to the state during the call. +// Opcodes that attempt to perform such modifications will result in exceptions +// instead of performing the modifications. +func (evm *EVM) StaticCall(caller ContractRef, addr common.Address, input []byte, gas uint64) (ret []byte, leftOverGas uint64, err error) { + // Fail if we're trying to execute above the call depth limit + if evm.depth > int(params.CallCreateDepth) { + return nil, gas, ErrDepth + } + // We take a snapshot here. This is a bit counter-intuitive, and could probably be skipped. + // However, even a staticcall is considered a 'touch'. On mainnet, static calls were introduced + // after all empty accounts were deleted, so this is not required. However, if we omit this, + // then certain tests start failing; stRevertTest/RevertPrecompiledTouchExactOOG.json. + // We could change this, but for now it's left for legacy reasons + var snapshot = evm.StateDB.Snapshot() + + // We do an AddBalance of zero here, just in order to trigger a touch. + // This doesn't matter on Mainnet, where all empties are gone at the time of Byzantium, + // but is the correct thing to do and matters on other networks, in tests, and potential + // future scenarios + evm.StateDB.AddBalance(addr, big0) + + // Invoke tracer hooks that signal entering/exiting a call frame + if evm.Config.Debug { + evm.Config.Tracer.CaptureEnter(STATICCALL, caller.Address(), addr, input, gas, nil) + defer func(startGas uint64) { + evm.Config.Tracer.CaptureExit(ret, startGas-gas, err) + }(gas) + } + + if p, isPrecompile := evm.precompile(addr); isPrecompile { + ret, gas, err = RunPrecompiledContract(p, input, gas) + } else { + // At this point, we use a copy of address. If we don't, the go compiler will + // leak the 'contract' to the outer scope, and make allocation for 'contract' + // even if the actual execution ends on RunPrecompiled above. + addrCopy := addr + // Initialise a new contract and set the code that is to be used by the EVM. + // The contract is a scoped environment for this execution context only. + contract := NewContract(caller, AccountRef(addrCopy), new(big.Int), gas) + contract.SetCallCode(&addrCopy, evm.StateDB.GetCodeHash(addrCopy), evm.StateDB.GetCode(addrCopy)) + // When an error was returned by the EVM or when setting the creation code + // above we revert to the snapshot and consume any gas remaining. Additionally + // when we're in Homestead this also counts for code storage gas errors. + ret, err = evm.interpreter.Run(contract, input, true) + gas = contract.Gas + } + if err != nil { + evm.StateDB.RevertToSnapshot(snapshot) + if err != ErrExecutionReverted { + gas = 0 + } + } + return ret, gas, err +} + +type codeAndHash struct { + code []byte + hash common.Hash +} + +func (c *codeAndHash) Hash() common.Hash { + if c.hash == (common.Hash{}) { + c.hash = crypto.Keccak256Hash(c.code) + } + return c.hash +} + +// create creates a new contract using code as deployment code. +func (evm *EVM) create(caller ContractRef, codeAndHash *codeAndHash, gas uint64, value *big.Int, address common.Address, typ OpCode) ([]byte, common.Address, uint64, error) { + // Depth check execution. Fail if we're trying to execute above the + // limit. + if evm.depth > int(params.CallCreateDepth) { + return nil, common.Address{}, gas, ErrDepth + } + if !evm.Context.CanTransfer(evm.StateDB, caller.Address(), value) { + return nil, common.Address{}, gas, ErrInsufficientBalance + } + nonce := evm.StateDB.GetNonce(caller.Address()) + if nonce+1 < nonce { + return nil, common.Address{}, gas, ErrNonceUintOverflow + } + evm.StateDB.SetNonce(caller.Address(), nonce+1) + // We add this to the access list _before_ taking a snapshot. Even if the creation fails, + // the access-list change should not be rolled back + if evm.chainRules.IsBerlin { + evm.StateDB.AddAddressToAccessList(address) + } + // Ensure there's no existing contract already at the designated address + contractHash := evm.StateDB.GetCodeHash(address) + if evm.StateDB.GetNonce(address) != 0 || (contractHash != (common.Hash{}) && contractHash != emptyCodeHash) { + return nil, common.Address{}, 0, ErrContractAddressCollision + } + // Create a new account on the state + snapshot := evm.StateDB.Snapshot() + evm.StateDB.CreateAccount(address) + if evm.chainRules.IsEIP158 { + evm.StateDB.SetNonce(address, 1) + } + evm.Context.Transfer(evm.StateDB, caller.Address(), address, value) + + // Initialise a new contract and set the code that is to be used by the EVM. + // The contract is a scoped environment for this execution context only. + contract := NewContract(caller, AccountRef(address), value, gas) + contract.SetCodeOptionalHash(&address, codeAndHash) + + if evm.Config.Debug { + if evm.depth == 0 { + evm.Config.Tracer.CaptureStart(evm, caller.Address(), address, true, codeAndHash.code, gas, value) + } else { + evm.Config.Tracer.CaptureEnter(typ, caller.Address(), address, codeAndHash.code, gas, value) + } + } + + start := time.Now() + + ret, err := evm.interpreter.Run(contract, nil, false) + + // Check whether the max code size has been exceeded, assign err if the case. + if err == nil && evm.chainRules.IsEIP158 && len(ret) > params.MaxCodeSize { + err = ErrMaxCodeSizeExceeded + } + + // Reject code starting with 0xEF if EIP-3541 is enabled. + if err == nil && len(ret) >= 1 && ret[0] == 0xEF && evm.chainRules.IsLondon { + err = ErrInvalidCode + } + + // if the contract creation ran successfully and no errors were returned + // calculate the gas required to store the code. If the code could not + // be stored due to not enough gas set an error and let it be handled + // by the error checking condition below. + if err == nil { + createDataGas := uint64(len(ret)) * params.CreateDataGas + if contract.UseGas(createDataGas) { + evm.StateDB.SetCode(address, ret) + } else { + err = ErrCodeStoreOutOfGas + } + } + + // When an error was returned by the EVM or when setting the creation code + // above we revert to the snapshot and consume any gas remaining. Additionally + // when we're in homestead this also counts for code storage gas errors. + if err != nil && (evm.chainRules.IsHomestead || err != ErrCodeStoreOutOfGas) { + evm.StateDB.RevertToSnapshot(snapshot) + if err != ErrExecutionReverted { + contract.UseGas(contract.Gas) + } + } + + if evm.Config.Debug { + if evm.depth == 0 { + evm.Config.Tracer.CaptureEnd(ret, gas-contract.Gas, time.Since(start), err) + } else { + evm.Config.Tracer.CaptureExit(ret, gas-contract.Gas, err) + } + } + return ret, address, contract.Gas, err +} + +// Create creates a new contract using code as deployment code. +func (evm *EVM) Create(caller ContractRef, code []byte, gas uint64, value *big.Int) (ret []byte, contractAddr common.Address, leftOverGas uint64, err error) { + contractAddr = crypto.CreateAddress(caller.Address(), evm.StateDB.GetNonce(caller.Address())) + return evm.create(caller, &codeAndHash{code: code}, gas, value, contractAddr, CREATE) +} + +// Create2 creates a new contract using code as deployment code. +// +// The different between Create2 with Create is Create2 uses keccak256(0xff ++ msg.sender ++ salt ++ keccak256(init_code))[12:] +// instead of the usual sender-and-nonce-hash as the address where the contract is initialized at. +func (evm *EVM) Create2(caller ContractRef, code []byte, gas uint64, endowment *big.Int, salt *uint256.Int) (ret []byte, contractAddr common.Address, leftOverGas uint64, err error) { + codeAndHash := &codeAndHash{code: code} + contractAddr = crypto.CreateAddress2(caller.Address(), salt.Bytes32(), codeAndHash.Hash().Bytes()) + return evm.create(caller, codeAndHash, gas, endowment, contractAddr, CREATE2) +} + +// ChainConfig returns the environment's chain configuration +func (evm *EVM) ChainConfig() *params.ChainConfig { return evm.chainConfig } + +// ChainContext supports retrieving headers and consensus parameters from the +// current blockchain to be used during transaction processing. +type ChainContext interface { + // Engine retrieves the chain's consensus engine. + Engine() consensus.Engine + + // GetHeader returns the header corresponding to the hash/number argument pair. + GetHeader(common.Hash, uint64) *types.Header +} + +// NewEVMBlockContext creates a new context for use in the EVM. +func NewEVMBlockContext(header *types.Header, chain ChainContext, author *common.Address) BlockContext { + var ( + beneficiary common.Address + baseFee *big.Int + random *common.Hash + ) + + // If we don't have an explicit author (i.e. not mining), extract from the header + if author == nil { + beneficiary, _ = chain.Engine().Author(header) // Ignore error, we're past header validation + } else { + beneficiary = *author + } + if header.BaseFee != nil { + baseFee = new(big.Int).Set(header.BaseFee) + } + if header.Difficulty.Cmp(common.Big0) == 0 { + random = &header.MixDigest + } + return BlockContext{ + CanTransfer: CanTransfer, + Transfer: Transfer, + GetHash: GetHashFn(header, chain), + Coinbase: beneficiary, + BlockNumber: new(big.Int).Set(header.Number), + Time: new(big.Int).SetUint64(header.Time), + Difficulty: new(big.Int).Set(header.Difficulty), + BaseFee: baseFee, + GasLimit: header.GasLimit, + Random: random, + } +} + +// NewEVMTxContext creates a new transaction context for a single transaction. +func NewEVMTxContext(msg core.Message) TxContext { + return TxContext{ + Origin: msg.From(), + GasPrice: new(big.Int).Set(msg.GasPrice()), + } +} + +// GetHashFn returns a GetHashFunc which retrieves header hashes by number +func GetHashFn(ref *types.Header, chain ChainContext) func(n uint64) common.Hash { + // Cache will initially contain [refHash.parent], + // Then fill up with [refHash.p, refHash.pp, refHash.ppp, ...] + var cache []common.Hash + + return func(n uint64) common.Hash { + if ref.Number.Uint64() <= n { + // This situation can happen if we're doing tracing and using + // block overrides. + return common.Hash{} + } + // If there's no hash cache yet, make one + if len(cache) == 0 { + cache = append(cache, ref.ParentHash) + } + if idx := ref.Number.Uint64() - n - 1; idx < uint64(len(cache)) { + return cache[idx] + } + // No luck in the cache, but we can start iterating from the last element we already know + lastKnownHash := cache[len(cache)-1] + lastKnownNumber := ref.Number.Uint64() - uint64(len(cache)) + + for { + header := chain.GetHeader(lastKnownHash, lastKnownNumber) + if header == nil { + break + } + cache = append(cache, header.ParentHash) + lastKnownHash = header.ParentHash + lastKnownNumber = header.Number.Uint64() - 1 + if n == lastKnownNumber { + return lastKnownHash + } + } + return common.Hash{} + } +} + +// CanTransfer checks whether there are enough funds in the address' account to make a transfer. +// This does not take the necessary gas in to account to make the transfer valid. +func CanTransfer(db StateDB, addr common.Address, amount *big.Int) bool { + return db.GetBalance(addr).Cmp(amount) >= 0 +} + +// Transfer subtracts amount from sender and adds amount to recipient using the given Db +func Transfer(db StateDB, sender, recipient common.Address, amount *big.Int) { + db.SubBalance(sender, amount) + db.AddBalance(recipient, amount) +} diff --git a/x/evm/vm/gas.go b/x/evm/vm/gas.go new file mode 100644 index 00000000..10465d1f --- /dev/null +++ b/x/evm/vm/gas.go @@ -0,0 +1,59 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package vm + +import ( + "github.com/holiman/uint256" +) + +// Gas costs +const ( + GasQuickStep uint64 = 2 + GasFastestStep uint64 = 3 + GasFastStep uint64 = 5 + GasMidStep uint64 = 8 + GasSlowStep uint64 = 10 + GasExtStep uint64 = 20 +) + +// Stos keeper gas costs +const ( + CallGasPrepay uint64 = 30 + ReturnGasPrepay uint64 = 50_000 +) + +// callGas returns the actual gas cost of the call. +// +// The cost of gas was changed during the homestead price change HF. +// As part of EIP 150 (TangerineWhistle), the returned gas is gas - base * 63 / 64. +func callGas(isEip150 bool, availableGas, base uint64, callCost *uint256.Int) (uint64, error) { + if isEip150 { + availableGas = availableGas - base + gas := availableGas - availableGas/64 + // If the bit length exceeds 64 bit we know that the newly calculated "gas" for EIP150 + // is smaller than the requested amount. Therefore we return the new gas instead + // of returning an error. + if !callCost.IsUint64() || gas < callCost.Uint64() { + return gas, nil + } + } + if !callCost.IsUint64() { + return 0, ErrGasUintOverflow + } + + return callCost.Uint64(), nil +} diff --git a/x/evm/vm/gas_table.go b/x/evm/vm/gas_table.go new file mode 100644 index 00000000..1f0c0d9b --- /dev/null +++ b/x/evm/vm/gas_table.go @@ -0,0 +1,458 @@ +// Copyright 2017 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package vm + +import ( + "errors" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/common/math" + "github.com/ethereum/go-ethereum/params" +) + +// memoryGasCost calculates the quadratic gas for memory expansion. It does so +// only for the memory region that is expanded, not the total memory. +func memoryGasCost(mem *Memory, newMemSize uint64) (uint64, error) { + if newMemSize == 0 { + return 0, nil + } + // The maximum that will fit in a uint64 is max_word_count - 1. Anything above + // that will result in an overflow. Additionally, a newMemSize which results in + // a newMemSizeWords larger than 0xFFFFFFFF will cause the square operation to + // overflow. The constant 0x1FFFFFFFE0 is the highest number that can be used + // without overflowing the gas calculation. + if newMemSize > 0x1FFFFFFFE0 { + return 0, ErrGasUintOverflow + } + newMemSizeWords := toWordSize(newMemSize) + newMemSize = newMemSizeWords * 32 + + if newMemSize > uint64(mem.Len()) { + square := newMemSizeWords * newMemSizeWords + linCoef := newMemSizeWords * params.MemoryGas + quadCoef := square / params.QuadCoeffDiv + newTotalFee := linCoef + quadCoef + + fee := newTotalFee - mem.lastGasCost + mem.lastGasCost = newTotalFee + + return fee, nil + } + return 0, nil +} + +// memoryCopierGas creates the gas functions for the following opcodes, and takes +// the stack position of the operand which determines the size of the data to copy +// as argument: +// CALLDATACOPY (stack position 2) +// CODECOPY (stack position 2) +// EXTCODECOPY (stack position 3) +// RETURNDATACOPY (stack position 2) +func memoryCopierGas(stackpos int) gasFunc { + return func(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { + // Gas for expanding the memory + gas, err := memoryGasCost(mem, memorySize) + if err != nil { + return 0, err + } + // And gas for copying data, charged per word at param.CopyGas + words, overflow := stack.Back(stackpos).Uint64WithOverflow() + if overflow { + return 0, ErrGasUintOverflow + } + + if words, overflow = math.SafeMul(toWordSize(words), params.CopyGas); overflow { + return 0, ErrGasUintOverflow + } + + if gas, overflow = math.SafeAdd(gas, words); overflow { + return 0, ErrGasUintOverflow + } + return gas, nil + } +} + +var ( + gasCallDataCopy = memoryCopierGas(2) + gasCodeCopy = memoryCopierGas(2) + gasExtCodeCopy = memoryCopierGas(3) + gasReturnDataCopy = memoryCopierGas(2) +) + +func gasSStore(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { + var ( + y, x = stack.Back(1), stack.Back(0) + current = evm.StateDB.GetState(contract.Address(), x.Bytes32()) + ) + // The legacy gas metering only takes into consideration the current state + // Legacy rules should be applied if we are in Petersburg (removal of EIP-1283) + // OR Constantinople is not active + if evm.chainRules.IsPetersburg || !evm.chainRules.IsConstantinople { + // This checks for 3 scenario's and calculates gas accordingly: + // + // 1. From a zero-value address to a non-zero value (NEW VALUE) + // 2. From a non-zero value address to a zero-value address (DELETE) + // 3. From a non-zero to a non-zero (CHANGE) + switch { + case current == (common.Hash{}) && y.Sign() != 0: // 0 => non 0 + return params.SstoreSetGas, nil + case current != (common.Hash{}) && y.Sign() == 0: // non 0 => 0 + evm.StateDB.AddRefund(params.SstoreRefundGas) + return params.SstoreClearGas, nil + default: // non 0 => non 0 (or 0 => 0) + return params.SstoreResetGas, nil + } + } + // The new gas metering is based on net gas costs (EIP-1283): + // + // 1. If current value equals new value (this is a no-op), 200 gas is deducted. + // 2. If current value does not equal new value + // 2.1. If original value equals current value (this storage slot has not been changed by the current execution context) + // 2.1.1. If original value is 0, 20000 gas is deducted. + // 2.1.2. Otherwise, 5000 gas is deducted. If new value is 0, add 15000 gas to refund counter. + // 2.2. If original value does not equal current value (this storage slot is dirty), 200 gas is deducted. Apply both of the following clauses. + // 2.2.1. If original value is not 0 + // 2.2.1.1. If current value is 0 (also means that new value is not 0), remove 15000 gas from refund counter. We can prove that refund counter will never go below 0. + // 2.2.1.2. If new value is 0 (also means that current value is not 0), add 15000 gas to refund counter. + // 2.2.2. If original value equals new value (this storage slot is reset) + // 2.2.2.1. If original value is 0, add 19800 gas to refund counter. + // 2.2.2.2. Otherwise, add 4800 gas to refund counter. + value := common.Hash(y.Bytes32()) + if current == value { // noop (1) + return params.NetSstoreNoopGas, nil + } + original := evm.StateDB.GetCommittedState(contract.Address(), x.Bytes32()) + if original == current { + if original == (common.Hash{}) { // create slot (2.1.1) + return params.NetSstoreInitGas, nil + } + if value == (common.Hash{}) { // delete slot (2.1.2b) + evm.StateDB.AddRefund(params.NetSstoreClearRefund) + } + return params.NetSstoreCleanGas, nil // write existing slot (2.1.2) + } + if original != (common.Hash{}) { + if current == (common.Hash{}) { // recreate slot (2.2.1.1) + evm.StateDB.SubRefund(params.NetSstoreClearRefund) + } else if value == (common.Hash{}) { // delete slot (2.2.1.2) + evm.StateDB.AddRefund(params.NetSstoreClearRefund) + } + } + if original == value { + if original == (common.Hash{}) { // reset to original inexistent slot (2.2.2.1) + evm.StateDB.AddRefund(params.NetSstoreResetClearRefund) + } else { // reset to original existing slot (2.2.2.2) + evm.StateDB.AddRefund(params.NetSstoreResetRefund) + } + } + return params.NetSstoreDirtyGas, nil +} + +// 0. If *gasleft* is less than or equal to 2300, fail the current call. +// 1. If current value equals new value (this is a no-op), SLOAD_GAS is deducted. +// 2. If current value does not equal new value: +// 2.1. If original value equals current value (this storage slot has not been changed by the current execution context): +// 2.1.1. If original value is 0, SSTORE_SET_GAS (20K) gas is deducted. +// 2.1.2. Otherwise, SSTORE_RESET_GAS gas is deducted. If new value is 0, add SSTORE_CLEARS_SCHEDULE to refund counter. +// 2.2. If original value does not equal current value (this storage slot is dirty), SLOAD_GAS gas is deducted. Apply both of the following clauses: +// 2.2.1. If original value is not 0: +// 2.2.1.1. If current value is 0 (also means that new value is not 0), subtract SSTORE_CLEARS_SCHEDULE gas from refund counter. +// 2.2.1.2. If new value is 0 (also means that current value is not 0), add SSTORE_CLEARS_SCHEDULE gas to refund counter. +// 2.2.2. If original value equals new value (this storage slot is reset): +// 2.2.2.1. If original value is 0, add SSTORE_SET_GAS - SLOAD_GAS to refund counter. +// 2.2.2.2. Otherwise, add SSTORE_RESET_GAS - SLOAD_GAS gas to refund counter. +func gasSStoreEIP2200(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { + // If we fail the minimum gas availability invariant, fail (0) + if contract.Gas <= params.SstoreSentryGasEIP2200 { + return 0, errors.New("not enough gas for reentrancy sentry") + } + // Gas sentry honoured, do the actual gas calculation based on the stored value + var ( + y, x = stack.Back(1), stack.Back(0) + current = evm.StateDB.GetState(contract.Address(), x.Bytes32()) + ) + value := common.Hash(y.Bytes32()) + + if current == value { // noop (1) + return params.SloadGasEIP2200, nil + } + original := evm.StateDB.GetCommittedState(contract.Address(), x.Bytes32()) + if original == current { + if original == (common.Hash{}) { // create slot (2.1.1) + return params.SstoreSetGasEIP2200, nil + } + if value == (common.Hash{}) { // delete slot (2.1.2b) + evm.StateDB.AddRefund(params.SstoreClearsScheduleRefundEIP2200) + } + return params.SstoreResetGasEIP2200, nil // write existing slot (2.1.2) + } + if original != (common.Hash{}) { + if current == (common.Hash{}) { // recreate slot (2.2.1.1) + evm.StateDB.SubRefund(params.SstoreClearsScheduleRefundEIP2200) + } else if value == (common.Hash{}) { // delete slot (2.2.1.2) + evm.StateDB.AddRefund(params.SstoreClearsScheduleRefundEIP2200) + } + } + if original == value { + if original == (common.Hash{}) { // reset to original inexistent slot (2.2.2.1) + evm.StateDB.AddRefund(params.SstoreSetGasEIP2200 - params.SloadGasEIP2200) + } else { // reset to original existing slot (2.2.2.2) + evm.StateDB.AddRefund(params.SstoreResetGasEIP2200 - params.SloadGasEIP2200) + } + } + return params.SloadGasEIP2200, nil // dirty update (2.2) +} + +func makeGasLog(n uint64) gasFunc { + return func(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { + requestedSize, overflow := stack.Back(1).Uint64WithOverflow() + if overflow { + return 0, ErrGasUintOverflow + } + + gas, err := memoryGasCost(mem, memorySize) + if err != nil { + return 0, err + } + + if gas, overflow = math.SafeAdd(gas, params.LogGas); overflow { + return 0, ErrGasUintOverflow + } + if gas, overflow = math.SafeAdd(gas, n*params.LogTopicGas); overflow { + return 0, ErrGasUintOverflow + } + + var memorySizeGas uint64 + if memorySizeGas, overflow = math.SafeMul(requestedSize, params.LogDataGas); overflow { + return 0, ErrGasUintOverflow + } + if gas, overflow = math.SafeAdd(gas, memorySizeGas); overflow { + return 0, ErrGasUintOverflow + } + return gas, nil + } +} + +func gasKeccak256(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { + gas, err := memoryGasCost(mem, memorySize) + if err != nil { + return 0, err + } + wordGas, overflow := stack.Back(1).Uint64WithOverflow() + if overflow { + return 0, ErrGasUintOverflow + } + if wordGas, overflow = math.SafeMul(toWordSize(wordGas), params.Keccak256WordGas); overflow { + return 0, ErrGasUintOverflow + } + if gas, overflow = math.SafeAdd(gas, wordGas); overflow { + return 0, ErrGasUintOverflow + } + return gas, nil +} + +// pureMemoryGascost is used by several operations, which aside from their +// static cost have a dynamic cost which is solely based on the memory +// expansion +func pureMemoryGascost(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { + return memoryGasCost(mem, memorySize) +} + +var ( + gasReturn = pureMemoryGascost + gasRevert = pureMemoryGascost + gasMLoad = pureMemoryGascost + gasMStore8 = pureMemoryGascost + gasMStore = pureMemoryGascost + gasCreate = pureMemoryGascost +) + +func gasCreate2(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { + gas, err := memoryGasCost(mem, memorySize) + if err != nil { + return 0, err + } + wordGas, overflow := stack.Back(2).Uint64WithOverflow() + if overflow { + return 0, ErrGasUintOverflow + } + if wordGas, overflow = math.SafeMul(toWordSize(wordGas), params.Keccak256WordGas); overflow { + return 0, ErrGasUintOverflow + } + if gas, overflow = math.SafeAdd(gas, wordGas); overflow { + return 0, ErrGasUintOverflow + } + return gas, nil +} + +func gasExpFrontier(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { + expByteLen := uint64((stack.data[stack.len()-2].BitLen() + 7) / 8) + + var ( + gas = expByteLen * params.ExpByteFrontier // no overflow check required. Max is 256 * ExpByte gas + overflow bool + ) + if gas, overflow = math.SafeAdd(gas, params.ExpGas); overflow { + return 0, ErrGasUintOverflow + } + return gas, nil +} + +func gasExpEIP158(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { + expByteLen := uint64((stack.data[stack.len()-2].BitLen() + 7) / 8) + + var ( + gas = expByteLen * params.ExpByteEIP158 // no overflow check required. Max is 256 * ExpByte gas + overflow bool + ) + if gas, overflow = math.SafeAdd(gas, params.ExpGas); overflow { + return 0, ErrGasUintOverflow + } + return gas, nil +} + +func gasCall(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { + var ( + gas uint64 + transfersValue = !stack.Back(2).IsZero() + address = common.Address(stack.Back(1).Bytes20()) + ) + + if evm.chainRules.IsEIP158 { + if transfersValue && evm.StateDB.Empty(address) { + gas += params.CallNewAccountGas + } + } else if !evm.StateDB.Exist(address) { + gas += params.CallNewAccountGas + } + if transfersValue { + gas += params.CallValueTransferGas + } + memoryGas, err := memoryGasCost(mem, memorySize) + if err != nil { + return 0, err + } + var overflow bool + if gas, overflow = math.SafeAdd(gas, memoryGas); overflow { + return 0, ErrGasUintOverflow + } + + evm.callGasTemp, err = callGas(evm.chainRules.IsEIP150, contract.Gas, gas, stack.Back(0)) + if err != nil { + return 0, err + } + if gas, overflow = math.SafeAdd(gas, evm.callGasTemp); overflow { + return 0, ErrGasUintOverflow + } + return gas, nil +} + +func gasCallCode(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { + memoryGas, err := memoryGasCost(mem, memorySize) + if err != nil { + return 0, err + } + var ( + gas uint64 + overflow bool + ) + if stack.Back(2).Sign() != 0 { + gas += params.CallValueTransferGas + } + if gas, overflow = math.SafeAdd(gas, memoryGas); overflow { + return 0, ErrGasUintOverflow + } + evm.callGasTemp, err = callGas(evm.chainRules.IsEIP150, contract.Gas, gas, stack.Back(0)) + if err != nil { + return 0, err + } + if gas, overflow = math.SafeAdd(gas, evm.callGasTemp); overflow { + return 0, ErrGasUintOverflow + } + return gas, nil +} + +func gasDelegateCall(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { + gas, err := memoryGasCost(mem, memorySize) + if err != nil { + return 0, err + } + evm.callGasTemp, err = callGas(evm.chainRules.IsEIP150, contract.Gas, gas, stack.Back(0)) + if err != nil { + return 0, err + } + var overflow bool + if gas, overflow = math.SafeAdd(gas, evm.callGasTemp); overflow { + return 0, ErrGasUintOverflow + } + return gas, nil +} + +func gasStaticCall(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { + gas, err := memoryGasCost(mem, memorySize) + if err != nil { + return 0, err + } + evm.callGasTemp, err = callGas(evm.chainRules.IsEIP150, contract.Gas, gas, stack.Back(0)) + if err != nil { + return 0, err + } + var overflow bool + if gas, overflow = math.SafeAdd(gas, evm.callGasTemp); overflow { + return 0, ErrGasUintOverflow + } + return gas, nil +} + +func gasSelfdestruct(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { + var gas uint64 + // EIP150 homestead gas reprice fork: + if evm.chainRules.IsEIP150 { + gas = params.SelfdestructGasEIP150 + var address = common.Address(stack.Back(0).Bytes20()) + + if evm.chainRules.IsEIP158 { + // if empty and transfers value + if evm.StateDB.Empty(address) && evm.StateDB.GetBalance(contract.Address()).Sign() != 0 { + gas += params.CreateBySelfdestructGas + } + } else if !evm.StateDB.Exist(address) { + gas += params.CreateBySelfdestructGas + } + } + + if !evm.StateDB.HasSuicided(contract.Address()) { + evm.StateDB.AddRefund(params.SelfdestructRefundGas) + } + return gas, nil +} + +func gasPrepay(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { + gas, err := memoryGasCost(mem, memorySize) + if err != nil { + return 0, err + } + evm.callGasTemp, err = callGas(evm.chainRules.IsEIP150, contract.Gas, gas, stack.Back(0)) + if err != nil { + return 0, err + } + var overflow bool + if gas, overflow = math.SafeAdd(gas, evm.callGasTemp); overflow { + return 0, ErrGasUintOverflow + } + return gas, nil +} diff --git a/x/evm/vm/instructions.go b/x/evm/vm/instructions.go new file mode 100644 index 00000000..5b9929eb --- /dev/null +++ b/x/evm/vm/instructions.go @@ -0,0 +1,1017 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package vm + +import ( + "fmt" + "math/big" + "sync/atomic" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/params" + "github.com/holiman/uint256" + "golang.org/x/crypto/sha3" +) + +func opAdd(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + x, y := scope.Stack.pop(), scope.Stack.peek() + y.Add(&x, y) + return nil, nil +} + +func opSub(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + x, y := scope.Stack.pop(), scope.Stack.peek() + y.Sub(&x, y) + return nil, nil +} + +func opMul(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + x, y := scope.Stack.pop(), scope.Stack.peek() + y.Mul(&x, y) + return nil, nil +} + +func opDiv(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + x, y := scope.Stack.pop(), scope.Stack.peek() + y.Div(&x, y) + return nil, nil +} + +func opSdiv(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + x, y := scope.Stack.pop(), scope.Stack.peek() + y.SDiv(&x, y) + return nil, nil +} + +func opMod(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + x, y := scope.Stack.pop(), scope.Stack.peek() + y.Mod(&x, y) + return nil, nil +} + +func opSmod(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + x, y := scope.Stack.pop(), scope.Stack.peek() + y.SMod(&x, y) + return nil, nil +} + +func opExp(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + base, exponent := scope.Stack.pop(), scope.Stack.peek() + exponent.Exp(&base, exponent) + return nil, nil +} + +func opSignExtend(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + back, num := scope.Stack.pop(), scope.Stack.peek() + num.ExtendSign(num, &back) + return nil, nil +} + +func opNot(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + x := scope.Stack.peek() + x.Not(x) + return nil, nil +} + +func opLt(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + x, y := scope.Stack.pop(), scope.Stack.peek() + if x.Lt(y) { + y.SetOne() + } else { + y.Clear() + } + return nil, nil +} + +func opGt(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + x, y := scope.Stack.pop(), scope.Stack.peek() + if x.Gt(y) { + y.SetOne() + } else { + y.Clear() + } + return nil, nil +} + +func opSlt(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + x, y := scope.Stack.pop(), scope.Stack.peek() + if x.Slt(y) { + y.SetOne() + } else { + y.Clear() + } + return nil, nil +} + +func opSgt(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + x, y := scope.Stack.pop(), scope.Stack.peek() + if x.Sgt(y) { + y.SetOne() + } else { + y.Clear() + } + return nil, nil +} + +func opEq(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + x, y := scope.Stack.pop(), scope.Stack.peek() + if x.Eq(y) { + y.SetOne() + } else { + y.Clear() + } + return nil, nil +} + +func opIszero(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + x := scope.Stack.peek() + if x.IsZero() { + x.SetOne() + } else { + x.Clear() + } + return nil, nil +} + +func opAnd(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + x, y := scope.Stack.pop(), scope.Stack.peek() + y.And(&x, y) + return nil, nil +} + +func opOr(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + x, y := scope.Stack.pop(), scope.Stack.peek() + y.Or(&x, y) + return nil, nil +} + +func opXor(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + x, y := scope.Stack.pop(), scope.Stack.peek() + y.Xor(&x, y) + return nil, nil +} + +func opByte(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + th, val := scope.Stack.pop(), scope.Stack.peek() + val.Byte(&th) + return nil, nil +} + +func opAddmod(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + x, y, z := scope.Stack.pop(), scope.Stack.pop(), scope.Stack.peek() + if z.IsZero() { + z.Clear() + } else { + z.AddMod(&x, &y, z) + } + return nil, nil +} + +func opMulmod(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + x, y, z := scope.Stack.pop(), scope.Stack.pop(), scope.Stack.peek() + z.MulMod(&x, &y, z) + return nil, nil +} + +// opSHL implements Shift Left +// The SHL instruction (shift left) pops 2 values from the stack, first arg1 and then arg2, +// and pushes on the stack arg2 shifted to the left by arg1 number of bits. +func opSHL(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + // Note, second operand is left in the stack; accumulate result into it, and no need to push it afterwards + shift, value := scope.Stack.pop(), scope.Stack.peek() + if shift.LtUint64(256) { + value.Lsh(value, uint(shift.Uint64())) + } else { + value.Clear() + } + return nil, nil +} + +// opSHR implements Logical Shift Right +// The SHR instruction (logical shift right) pops 2 values from the stack, first arg1 and then arg2, +// and pushes on the stack arg2 shifted to the right by arg1 number of bits with zero fill. +func opSHR(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + // Note, second operand is left in the stack; accumulate result into it, and no need to push it afterwards + shift, value := scope.Stack.pop(), scope.Stack.peek() + if shift.LtUint64(256) { + value.Rsh(value, uint(shift.Uint64())) + } else { + value.Clear() + } + return nil, nil +} + +// opSAR implements Arithmetic Shift Right +// The SAR instruction (arithmetic shift right) pops 2 values from the stack, first arg1 and then arg2, +// and pushes on the stack arg2 shifted to the right by arg1 number of bits with sign extension. +func opSAR(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + shift, value := scope.Stack.pop(), scope.Stack.peek() + if shift.GtUint64(256) { + if value.Sign() >= 0 { + value.Clear() + } else { + // Max negative shift: all bits set + value.SetAllOne() + } + return nil, nil + } + n := uint(shift.Uint64()) + value.SRsh(value, n) + return nil, nil +} + +func opKeccak256(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + offset, size := scope.Stack.pop(), scope.Stack.peek() + data := scope.Memory.GetPtr(int64(offset.Uint64()), int64(size.Uint64())) + + if interpreter.hasher == nil { + interpreter.hasher = sha3.NewLegacyKeccak256().(keccakState) + } else { + interpreter.hasher.Reset() + } + interpreter.hasher.Write(data) + interpreter.hasher.Read(interpreter.hasherBuf[:]) + + evm := interpreter.evm + if evm.Config.EnablePreimageRecording { + evm.StateDB.AddPreimage(interpreter.hasherBuf, data) + } + + size.SetBytes(interpreter.hasherBuf[:]) + return nil, nil +} +func opAddress(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + scope.Stack.push(new(uint256.Int).SetBytes(scope.Contract.Address().Bytes())) + return nil, nil +} + +func opBalance(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + slot := scope.Stack.peek() + address := common.Address(slot.Bytes20()) + slot.SetFromBig(interpreter.evm.StateDB.GetBalance(address)) + return nil, nil +} + +func opOrigin(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + scope.Stack.push(new(uint256.Int).SetBytes(interpreter.evm.Origin.Bytes())) + return nil, nil +} +func opCaller(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + scope.Stack.push(new(uint256.Int).SetBytes(scope.Contract.Caller().Bytes())) + return nil, nil +} + +func opCallValue(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + v, _ := uint256.FromBig(scope.Contract.value) + scope.Stack.push(v) + return nil, nil +} + +func opCallDataLoad(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + x := scope.Stack.peek() + if offset, overflow := x.Uint64WithOverflow(); !overflow { + data := getData(scope.Contract.Input, offset, 32) + x.SetBytes(data) + } else { + x.Clear() + } + return nil, nil +} + +func opCallDataSize(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + scope.Stack.push(new(uint256.Int).SetUint64(uint64(len(scope.Contract.Input)))) + return nil, nil +} + +func opCallDataCopy(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + var ( + memOffset = scope.Stack.pop() + dataOffset = scope.Stack.pop() + length = scope.Stack.pop() + ) + dataOffset64, overflow := dataOffset.Uint64WithOverflow() + if overflow { + dataOffset64 = 0xffffffffffffffff + } + // These values are checked for overflow during gas cost calculation + memOffset64 := memOffset.Uint64() + length64 := length.Uint64() + scope.Memory.Set(memOffset64, length64, getData(scope.Contract.Input, dataOffset64, length64)) + + return nil, nil +} + +func opReturnDataSize(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + scope.Stack.push(new(uint256.Int).SetUint64(uint64(len(interpreter.returnData)))) + return nil, nil +} + +func opReturnDataCopy(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + var ( + memOffset = scope.Stack.pop() + dataOffset = scope.Stack.pop() + length = scope.Stack.pop() + ) + + offset64, overflow := dataOffset.Uint64WithOverflow() + if overflow { + return nil, ErrReturnDataOutOfBounds + } + // we can reuse dataOffset now (aliasing it for clarity) + var end = dataOffset + end.Add(&dataOffset, &length) + end64, overflow := end.Uint64WithOverflow() + if overflow || uint64(len(interpreter.returnData)) < end64 { + return nil, ErrReturnDataOutOfBounds + } + scope.Memory.Set(memOffset.Uint64(), length.Uint64(), interpreter.returnData[offset64:end64]) + return nil, nil +} + +func opExtCodeSize(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + slot := scope.Stack.peek() + slot.SetUint64(uint64(interpreter.evm.StateDB.GetCodeSize(slot.Bytes20()))) + return nil, nil +} + +func opCodeSize(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + l := new(uint256.Int) + l.SetUint64(uint64(len(scope.Contract.Code))) + scope.Stack.push(l) + return nil, nil +} + +func opCodeCopy(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + var ( + memOffset = scope.Stack.pop() + codeOffset = scope.Stack.pop() + length = scope.Stack.pop() + ) + uint64CodeOffset, overflow := codeOffset.Uint64WithOverflow() + if overflow { + uint64CodeOffset = 0xffffffffffffffff + } + codeCopy := getData(scope.Contract.Code, uint64CodeOffset, length.Uint64()) + scope.Memory.Set(memOffset.Uint64(), length.Uint64(), codeCopy) + + return nil, nil +} + +func opExtCodeCopy(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + var ( + stack = scope.Stack + a = stack.pop() + memOffset = stack.pop() + codeOffset = stack.pop() + length = stack.pop() + ) + uint64CodeOffset, overflow := codeOffset.Uint64WithOverflow() + if overflow { + uint64CodeOffset = 0xffffffffffffffff + } + addr := common.Address(a.Bytes20()) + codeCopy := getData(interpreter.evm.StateDB.GetCode(addr), uint64CodeOffset, length.Uint64()) + scope.Memory.Set(memOffset.Uint64(), length.Uint64(), codeCopy) + + return nil, nil +} + +// opExtCodeHash returns the code hash of a specified account. +// There are several cases when the function is called, while we can relay everything +// to `state.GetCodeHash` function to ensure the correctness. +// +// (1) Caller tries to get the code hash of a normal contract account, state +// +// should return the relative code hash and set it as the result. +// +// (2) Caller tries to get the code hash of a non-existent account, state should +// +// return common.Hash{} and zero will be set as the result. +// +// (3) Caller tries to get the code hash for an account without contract code, +// +// state should return emptyCodeHash(0xc5d246...) as the result. +// +// (4) Caller tries to get the code hash of a precompiled account, the result +// +// should be zero or emptyCodeHash. +// +// It is worth noting that in order to avoid unnecessary create and clean, +// all precompile accounts on mainnet have been transferred 1 wei, so the return +// here should be emptyCodeHash. +// If the precompile account is not transferred any amount on a private or +// customized chain, the return value will be zero. +// +// (5) Caller tries to get the code hash for an account which is marked as suicided +// +// in the current transaction, the code hash of this account should be returned. +// +// (6) Caller tries to get the code hash for an account which is marked as deleted, +// +// this account should be regarded as a non-existent account and zero should be returned. +func opExtCodeHash(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + slot := scope.Stack.peek() + address := common.Address(slot.Bytes20()) + if interpreter.evm.StateDB.Empty(address) { + slot.Clear() + } else { + slot.SetBytes(interpreter.evm.StateDB.GetCodeHash(address).Bytes()) + } + return nil, nil +} + +func opGasprice(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + v, _ := uint256.FromBig(interpreter.evm.GasPrice) + scope.Stack.push(v) + return nil, nil +} + +func opBlockhash(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + num := scope.Stack.peek() + num64, overflow := num.Uint64WithOverflow() + if overflow { + num.Clear() + return nil, nil + } + var upper, lower uint64 + upper = interpreter.evm.Context.BlockNumber.Uint64() + if upper < 257 { + lower = 0 + } else { + lower = upper - 256 + } + if num64 >= lower && num64 < upper { + num.SetBytes(interpreter.evm.Context.GetHash(num64).Bytes()) + } else { + num.Clear() + } + return nil, nil +} + +func opCoinbase(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + scope.Stack.push(new(uint256.Int).SetBytes(interpreter.evm.Context.Coinbase.Bytes())) + return nil, nil +} + +func opTimestamp(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + v, _ := uint256.FromBig(interpreter.evm.Context.Time) + scope.Stack.push(v) + return nil, nil +} + +func opNumber(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + v, _ := uint256.FromBig(interpreter.evm.Context.BlockNumber) + scope.Stack.push(v) + return nil, nil +} + +func opDifficulty(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + v, _ := uint256.FromBig(interpreter.evm.Context.Difficulty) + scope.Stack.push(v) + return nil, nil +} + +func opRandom(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + v := new(uint256.Int).SetBytes(interpreter.evm.Context.Random.Bytes()) + scope.Stack.push(v) + return nil, nil +} + +func opGasLimit(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + scope.Stack.push(new(uint256.Int).SetUint64(interpreter.evm.Context.GasLimit)) + return nil, nil +} + +func opPop(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + scope.Stack.pop() + return nil, nil +} + +func opMload(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + v := scope.Stack.peek() + offset := int64(v.Uint64()) + v.SetBytes(scope.Memory.GetPtr(offset, 32)) + return nil, nil +} + +func opMstore(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + // pop value of the stack + mStart, val := scope.Stack.pop(), scope.Stack.pop() + scope.Memory.Set32(mStart.Uint64(), &val) + return nil, nil +} + +func opMstore8(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + off, val := scope.Stack.pop(), scope.Stack.pop() + scope.Memory.store[off.Uint64()] = byte(val.Uint64()) + return nil, nil +} + +func opSload(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + loc := scope.Stack.peek() + hash := common.Hash(loc.Bytes32()) + val := interpreter.evm.StateDB.GetState(scope.Contract.Address(), hash) + loc.SetBytes(val.Bytes()) + return nil, nil +} + +func opSstore(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + if interpreter.readOnly { + return nil, ErrWriteProtection + } + loc := scope.Stack.pop() + val := scope.Stack.pop() + interpreter.evm.StateDB.SetState(scope.Contract.Address(), + loc.Bytes32(), val.Bytes32()) + return nil, nil +} + +func opJump(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + if atomic.LoadInt32(&interpreter.evm.abort) != 0 { + return nil, errStopToken + } + pos := scope.Stack.pop() + if !scope.Contract.validJumpdest(&pos) { + return nil, ErrInvalidJump + } + *pc = pos.Uint64() - 1 // pc will be increased by the interpreter loop + return nil, nil +} + +func opJumpi(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + if atomic.LoadInt32(&interpreter.evm.abort) != 0 { + return nil, errStopToken + } + pos, cond := scope.Stack.pop(), scope.Stack.pop() + if !cond.IsZero() { + if !scope.Contract.validJumpdest(&pos) { + return nil, ErrInvalidJump + } + *pc = pos.Uint64() - 1 // pc will be increased by the interpreter loop + } + return nil, nil +} + +func opJumpdest(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + return nil, nil +} + +func opPc(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + scope.Stack.push(new(uint256.Int).SetUint64(*pc)) + return nil, nil +} + +func opMsize(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + scope.Stack.push(new(uint256.Int).SetUint64(uint64(scope.Memory.Len()))) + return nil, nil +} + +func opGas(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + scope.Stack.push(new(uint256.Int).SetUint64(scope.Contract.Gas)) + return nil, nil +} + +func opCreate(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + if interpreter.readOnly { + return nil, ErrWriteProtection + } + var ( + value = scope.Stack.pop() + offset, size = scope.Stack.pop(), scope.Stack.pop() + input = scope.Memory.GetCopy(int64(offset.Uint64()), int64(size.Uint64())) + gas = scope.Contract.Gas + ) + if interpreter.evm.chainRules.IsEIP150 { + gas -= gas / 64 + } + // reuse size int for stackvalue + stackvalue := size + + scope.Contract.UseGas(gas) + //TODO: use uint256.Int instead of converting with toBig() + var bigVal = big0 + if !value.IsZero() { + bigVal = value.ToBig() + } + + res, addr, returnGas, suberr := interpreter.evm.Create(scope.Contract, input, gas, bigVal) + // Push item on the stack based on the returned error. If the ruleset is + // homestead we must check for CodeStoreOutOfGasError (homestead only + // rule) and treat as an error, if the ruleset is frontier we must + // ignore this error and pretend the operation was successful. + if interpreter.evm.chainRules.IsHomestead && suberr == ErrCodeStoreOutOfGas { + stackvalue.Clear() + } else if suberr != nil && suberr != ErrCodeStoreOutOfGas { + stackvalue.Clear() + } else { + stackvalue.SetBytes(addr.Bytes()) + } + scope.Stack.push(&stackvalue) + scope.Contract.Gas += returnGas + + if suberr == ErrExecutionReverted { + interpreter.returnData = res // set REVERT data to return data buffer + return res, nil + } + interpreter.returnData = nil // clear dirty return data buffer + return nil, nil +} + +func opCreate2(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + if interpreter.readOnly { + return nil, ErrWriteProtection + } + var ( + endowment = scope.Stack.pop() + offset, size = scope.Stack.pop(), scope.Stack.pop() + salt = scope.Stack.pop() + input = scope.Memory.GetCopy(int64(offset.Uint64()), int64(size.Uint64())) + gas = scope.Contract.Gas + ) + + // Apply EIP150 + gas -= gas / 64 + scope.Contract.UseGas(gas) + // reuse size int for stackvalue + stackvalue := size + //TODO: use uint256.Int instead of converting with toBig() + bigEndowment := big0 + if !endowment.IsZero() { + bigEndowment = endowment.ToBig() + } + res, addr, returnGas, suberr := interpreter.evm.Create2(scope.Contract, input, gas, + bigEndowment, &salt) + // Push item on the stack based on the returned error. + if suberr != nil { + stackvalue.Clear() + } else { + stackvalue.SetBytes(addr.Bytes()) + } + scope.Stack.push(&stackvalue) + scope.Contract.Gas += returnGas + + if suberr == ErrExecutionReverted { + interpreter.returnData = res // set REVERT data to return data buffer + return res, nil + } + interpreter.returnData = nil // clear dirty return data buffer + return nil, nil +} + +var PrepayCode = uint256.NewInt(0xf1) + +func opCall(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + stack := scope.Stack + // Pop gas. The actual gas in interpreter.evm.callGasTemp. + // We can use this as a temporary value + temp := stack.pop() + gas := interpreter.evm.callGasTemp + // Pop other call parameters. + addr, value, inOffset, inSize, retOffset, retSize := stack.pop(), stack.pop(), stack.pop(), stack.pop(), stack.pop(), stack.pop() + + toAddr := common.Address(addr.Bytes20()) + // Get the arguments from the memory. + args := scope.Memory.GetPtr(int64(inOffset.Uint64()), int64(inSize.Uint64())) + + if interpreter.readOnly && !value.IsZero() { + return nil, ErrWriteProtection + } + + var bigVal = big0 + //TODO: use uint256.Int instead of converting with toBig() + // By using big0 here, we save an alloc for the most common case (non-ether-transferring contract calls), + // but it would make more sense to extend the usage of uint256.Int + if !value.IsZero() { + gas += params.CallStipend + bigVal = value.ToBig() + } + + ret, returnGas, err := interpreter.evm.Call(scope.Contract, toAddr, args, gas, bigVal) + if err != nil { + temp.Clear() + } else { + temp.SetOne() + } + stack.push(&temp) + if err == nil || err == ErrExecutionReverted { + ret = common.CopyBytes(ret) + scope.Memory.Set(retOffset.Uint64(), retSize.Uint64(), ret) + } + scope.Contract.Gas += returnGas + + interpreter.returnData = ret + return ret, nil +} + +func opCallCode(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + // Pop gas. The actual gas is in interpreter.evm.callGasTemp. + stack := scope.Stack + // We use it as a temporary value + temp := stack.pop() + gas := interpreter.evm.callGasTemp + // Pop other call parameters. + addr, value, inOffset, inSize, retOffset, retSize := stack.pop(), stack.pop(), stack.pop(), stack.pop(), stack.pop(), stack.pop() + toAddr := common.Address(addr.Bytes20()) + // Get arguments from the memory. + args := scope.Memory.GetPtr(int64(inOffset.Uint64()), int64(inSize.Uint64())) + + //TODO: use uint256.Int instead of converting with toBig() + var bigVal = big0 + if !value.IsZero() { + gas += params.CallStipend + bigVal = value.ToBig() + } + + ret, returnGas, err := interpreter.evm.CallCode(scope.Contract, toAddr, args, gas, bigVal) + if err != nil { + temp.Clear() + } else { + temp.SetOne() + } + stack.push(&temp) + if err == nil || err == ErrExecutionReverted { + ret = common.CopyBytes(ret) + scope.Memory.Set(retOffset.Uint64(), retSize.Uint64(), ret) + } + scope.Contract.Gas += returnGas + + interpreter.returnData = ret + return ret, nil +} + +func opDelegateCall(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + stack := scope.Stack + // Pop gas. The actual gas is in interpreter.evm.callGasTemp. + // We use it as a temporary value + temp := stack.pop() + gas := interpreter.evm.callGasTemp + // Pop other call parameters. + addr, inOffset, inSize, retOffset, retSize := stack.pop(), stack.pop(), stack.pop(), stack.pop(), stack.pop() + toAddr := common.Address(addr.Bytes20()) + // Get arguments from the memory. + args := scope.Memory.GetPtr(int64(inOffset.Uint64()), int64(inSize.Uint64())) + + ret, returnGas, err := interpreter.evm.DelegateCall(scope.Contract, toAddr, args, gas) + if err != nil { + temp.Clear() + } else { + temp.SetOne() + } + stack.push(&temp) + if err == nil || err == ErrExecutionReverted { + ret = common.CopyBytes(ret) + scope.Memory.Set(retOffset.Uint64(), retSize.Uint64(), ret) + } + scope.Contract.Gas += returnGas + + interpreter.returnData = ret + return ret, nil +} + +func opStaticCall(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + // Pop gas. The actual gas is in interpreter.evm.callGasTemp. + stack := scope.Stack + // We use it as a temporary value + temp := stack.pop() + gas := interpreter.evm.callGasTemp + // Pop other call parameters. + addr, inOffset, inSize, retOffset, retSize := stack.pop(), stack.pop(), stack.pop(), stack.pop(), stack.pop() + toAddr := common.Address(addr.Bytes20()) + // Get arguments from the memory. + args := scope.Memory.GetPtr(int64(inOffset.Uint64()), int64(inSize.Uint64())) + + ret, returnGas, err := interpreter.evm.StaticCall(scope.Contract, toAddr, args, gas) + if err != nil { + temp.Clear() + } else { + temp.SetOne() + } + stack.push(&temp) + if err == nil || err == ErrExecutionReverted { + ret = common.CopyBytes(ret) + scope.Memory.Set(retOffset.Uint64(), retSize.Uint64(), ret) + } + scope.Contract.Gas += returnGas + + interpreter.returnData = ret + return ret, nil +} + +func opReturn(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + offset, size := scope.Stack.pop(), scope.Stack.pop() + ret := scope.Memory.GetPtr(int64(offset.Uint64()), int64(size.Uint64())) + + return ret, errStopToken +} + +func opRevert(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + offset, size := scope.Stack.pop(), scope.Stack.pop() + ret := scope.Memory.GetPtr(int64(offset.Uint64()), int64(size.Uint64())) + + interpreter.returnData = ret + return ret, ErrExecutionReverted +} + +func opUndefined(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + return nil, &ErrInvalidOpCode{opcode: OpCode(scope.Contract.Code[*pc])} +} + +func opStop(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + return nil, errStopToken +} + +func opSelfdestruct(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + if interpreter.readOnly { + return nil, ErrWriteProtection + } + beneficiary := scope.Stack.pop() + balance := interpreter.evm.StateDB.GetBalance(scope.Contract.Address()) + interpreter.evm.StateDB.AddBalance(beneficiary.Bytes20(), balance) + interpreter.evm.StateDB.Suicide(scope.Contract.Address()) + if interpreter.cfg.Debug { + interpreter.cfg.Tracer.CaptureEnter(SELFDESTRUCT, scope.Contract.Address(), beneficiary.Bytes20(), []byte{}, 0, balance) + interpreter.cfg.Tracer.CaptureExit([]byte{}, 0, nil) + } + return nil, errStopToken +} + +// following functions are used by the instruction jump table + +// make log instruction function +func makeLog(size int) executionFunc { + return func(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + if interpreter.readOnly { + return nil, ErrWriteProtection + } + topics := make([]common.Hash, size) + stack := scope.Stack + mStart, mSize := stack.pop(), stack.pop() + for i := 0; i < size; i++ { + addr := stack.pop() + topics[i] = addr.Bytes32() + } + + d := scope.Memory.GetCopy(int64(mStart.Uint64()), int64(mSize.Uint64())) + interpreter.evm.StateDB.AddLog(&types.Log{ + Address: scope.Contract.Address(), + Topics: topics, + Data: d, + // This is a non-consensus field, but assigned here because + // core/state doesn't know the current block number. + BlockNumber: interpreter.evm.Context.BlockNumber.Uint64(), + }) + + return nil, nil + } +} + +// opPush1 is a specialized version of pushN +func opPush1(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + var ( + codeLen = uint64(len(scope.Contract.Code)) + integer = new(uint256.Int) + ) + *pc += 1 + if *pc < codeLen { + scope.Stack.push(integer.SetUint64(uint64(scope.Contract.Code[*pc]))) + } else { + scope.Stack.push(integer.Clear()) + } + return nil, nil +} + +// make push instruction function +func makePush(size uint64, pushByteSize int) executionFunc { + return func(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + codeLen := len(scope.Contract.Code) + + startMin := codeLen + if int(*pc+1) < startMin { + startMin = int(*pc + 1) + } + + endMin := codeLen + if startMin+pushByteSize < endMin { + endMin = startMin + pushByteSize + } + + integer := new(uint256.Int) + scope.Stack.push(integer.SetBytes(common.RightPadBytes( + scope.Contract.Code[startMin:endMin], pushByteSize))) + + *pc += size + return nil, nil + } +} + +// make dup instruction function +func makeDup(size int64) executionFunc { + return func(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + scope.Stack.dup(int(size)) + return nil, nil + } +} + +// make swap instruction function +func makeSwap(size int64) executionFunc { + // switch n + 1 otherwise n would be swapped with n + size++ + return func(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + scope.Stack.swap(int(size)) + return nil, nil + } +} + +var ( + slot1 = uint256.NewInt(0x20) + slot4 = new(uint256.Int).Mul(slot1, uint256.NewInt(0x04)) +) + +func opPrepay(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + stack := scope.Stack + contract := scope.Contract + evm := interpreter.evm + // Pop gas. The actual gas in interpreter.evm.callGasTemp. + // We can use this as a temporary value + temp := stack.pop() + gas := interpreter.evm.callGasTemp + // Pop other prepay parameters. + value, inOffset, inSize, retOffset, retSize := stack.pop(), stack.pop(), stack.pop(), stack.pop(), stack.pop() + addr := contract.caller.Address() + ret := uint256.NewInt(0).Bytes32() + + // Fail if we're trying to execute above the call depth limit + if evm.depth > int(params.CallCreateDepth) { + temp.Clear() + stack.push(&temp) + interpreter.returnData = ret[:] + scope.Contract.Gas += gas + return interpreter.returnData, ErrDepth + } + + if !interpreter.evm.genesisContractVerifier.IsTrustedAddress(addr.Hex()) { + temp.Clear() + stack.push(&temp) + interpreter.returnData = ret[:] + scope.Contract.Gas += gas + return interpreter.returnData, fmt.Errorf("caller is not verified") + } + + if !inOffset.Eq(slot4) || !inSize.Eq(slot1) || !retOffset.Eq(new(uint256.Int).Add(slot4, slot1)) || !retSize.Eq(slot1) { + temp.Clear() + stack.push(&temp) + interpreter.returnData = ret[:] + scope.Contract.Gas += gas + return interpreter.returnData, fmt.Errorf("wrong order") + } + + var bigVal = big0 + if !value.IsZero() { + bigVal = value.ToBig() + } + + args := scope.Memory.GetPtr(int64(inOffset.Uint64()), int64(inSize.Uint64())) + + beneficiary := common.BytesToAddress(args) + + outBig, returnGas, err := interpreter.evm.Context.Prepay(interpreter.evm, contract.caller.Address(), beneficiary, bigVal, gas) + if err != nil { + temp.Clear() + } else { + temp.SetOne() + } + stack.push(&temp) + + // |-<>-| guard + if outBig == nil { + outBig = big.NewInt(0) + } + + if err == nil { + outU, _ := uint256.FromBig(outBig) + outB := outU.Bytes32() + scope.Memory.Set(retOffset.Uint64(), retSize.Uint64(), outB[:]) + ret = uint256.NewInt(1).Bytes32() + } + + interpreter.returnData = ret[:] + + scope.Contract.Gas += returnGas + + return interpreter.returnData, err +} diff --git a/x/evm/vm/interface.go b/x/evm/vm/interface.go new file mode 100644 index 00000000..e679421a --- /dev/null +++ b/x/evm/vm/interface.go @@ -0,0 +1,106 @@ +// Copyright 2016 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package vm + +import ( + "math/big" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + + sdk "github.com/cosmos/cosmos-sdk/types" + + keestatedb "github.com/stratosnet/stratos-chain/core/statedb" +) + +type KeeperDB interface { + // Keeper methods + GetRegistryState(method string, params ...interface{}) (interface{}, error) +} + +// StateDB is an EVM database for full state querying. +type StateDB interface { + CreateAccount(common.Address) + + SubBalance(common.Address, *big.Int) + AddBalance(common.Address, *big.Int) + GetBalance(common.Address) *big.Int + + GetNonce(common.Address) uint64 + SetNonce(common.Address, uint64) + + GetCodeHash(common.Address) common.Hash + GetCode(common.Address) []byte + SetCode(common.Address, []byte) + GetCodeSize(common.Address) int + + AddRefund(uint64) + SubRefund(uint64) + GetRefund() uint64 + + GetCommittedState(common.Address, common.Hash) common.Hash + GetState(common.Address, common.Hash) common.Hash + SetState(common.Address, common.Hash, common.Hash) + + Suicide(common.Address) bool + HasSuicided(common.Address) bool + + // Exist reports whether the given account exists in state. + // Notably this should also return true for suicided accounts. + Exist(common.Address) bool + // Empty returns whether the given account is empty. Empty + // is defined according to EIP161 (balance = nonce = code = 0). + Empty(common.Address) bool + + PrepareAccessList(sender common.Address, dest *common.Address, precompiles []common.Address, txAccesses types.AccessList) + AddressInAccessList(addr common.Address) bool + SlotInAccessList(addr common.Address, slot common.Hash) (addressOk bool, slotOk bool) + // AddAddressToAccessList adds the given address to the access list. This operation is safe to perform + // even if the feature/fork is not active yet + AddAddressToAccessList(addr common.Address) + // AddSlotToAccessList adds the given (address,slot) to the access list. This operation is safe to perform + // even if the feature/fork is not active yet + AddSlotToAccessList(addr common.Address, slot common.Hash) + + RevertToSnapshot(int) + Snapshot() int + + AddLog(*types.Log) + AddPreimage(common.Hash, []byte) + + ForEachStorage(common.Address, func(common.Hash, common.Hash) bool) error + + // kestatedb proxy + GetKeestateDB() *keestatedb.KeestateDB + GetKeeState(storeKey sdk.StoreKey, key []byte) []byte + SetKeeState(storeKey sdk.StoreKey, key, value []byte) + RevertToKeeSnapshot(int) + KeeSnapshot() int +} + +// CallContext provides a basic interface for the EVM calling conventions. The EVM +// depends on this context being implemented for doing subcalls and initialising new EVM contracts. +type CallContext interface { + // Call another contract + Call(env *EVM, me ContractRef, addr common.Address, data []byte, gas, value *big.Int) ([]byte, error) + // Take another's contract code and execute within our own context + CallCode(env *EVM, me ContractRef, addr common.Address, data []byte, gas, value *big.Int) ([]byte, error) + // Same as CallCode except sender and value is propagated from parent to child scope + DelegateCall(env *EVM, me ContractRef, addr common.Address, data []byte, gas *big.Int) ([]byte, error) + // Create a new contract + Create(env *EVM, me ContractRef, data []byte, gas, value *big.Int) ([]byte, common.Address, error) +} diff --git a/x/evm/vm/interpreter.go b/x/evm/vm/interpreter.go new file mode 100644 index 00000000..9d6ab0af --- /dev/null +++ b/x/evm/vm/interpreter.go @@ -0,0 +1,258 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package vm + +import ( + "hash" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/common/math" + "github.com/ethereum/go-ethereum/log" +) + +// Config are the configuration options for the Interpreter +type Config struct { + Debug bool // Enables debugging + Tracer EVMLogger // Opcode logger + NoBaseFee bool // Forces the EIP-1559 baseFee to 0 (needed for 0 price calls) + EnablePreimageRecording bool // Enables recording of SHA3/keccak preimages + + JumpTable *JumpTable // EVM instruction table, automatically populated if unset + + ExtraEips []int // Additional EIPS that are to be enabled +} + +// ScopeContext contains the things that are per-call, such as stack and memory, +// but not transients like pc and gas +type ScopeContext struct { + Memory *Memory + Stack *Stack + Contract *Contract +} + +// keccakState wraps sha3.state. In addition to the usual hash methods, it also supports +// Read to get a variable amount of data from the hash state. Read is faster than Sum +// because it doesn't copy the internal state, but also modifies the internal state. +type keccakState interface { + hash.Hash + Read([]byte) (int, error) +} + +// EVMInterpreter represents an EVM interpreter +type EVMInterpreter struct { + evm *EVM + cfg Config + + hasher keccakState // Keccak256 hasher instance shared across opcodes + hasherBuf common.Hash // Keccak256 hasher result array shared aross opcodes + + readOnly bool // Whether to throw on stateful modifications + returnData []byte // Last CALL's return data for subsequent reuse +} + +// NewEVMInterpreter returns a new instance of the Interpreter. +func NewEVMInterpreter(evm *EVM, cfg Config) *EVMInterpreter { + // If jump table was not initialised we set the default one. + if cfg.JumpTable == nil { + switch { + case evm.chainRules.IsMerge: + cfg.JumpTable = &mergeInstructionSet + case evm.chainRules.IsLondon: + cfg.JumpTable = &londonInstructionSet + case evm.chainRules.IsBerlin: + cfg.JumpTable = &berlinInstructionSet + case evm.chainRules.IsIstanbul: + cfg.JumpTable = &istanbulInstructionSet + case evm.chainRules.IsConstantinople: + cfg.JumpTable = &constantinopleInstructionSet + case evm.chainRules.IsByzantium: + cfg.JumpTable = &byzantiumInstructionSet + case evm.chainRules.IsEIP158: + cfg.JumpTable = &spuriousDragonInstructionSet + case evm.chainRules.IsEIP150: + cfg.JumpTable = &tangerineWhistleInstructionSet + case evm.chainRules.IsHomestead: + cfg.JumpTable = &homesteadInstructionSet + default: + cfg.JumpTable = &frontierInstructionSet + } + for i, eip := range cfg.ExtraEips { + copy := *cfg.JumpTable + if err := EnableEIP(eip, ©); err != nil { + // Disable it, so caller can check if it's activated or not + cfg.ExtraEips = append(cfg.ExtraEips[:i], cfg.ExtraEips[i+1:]...) + log.Error("EIP activation failed", "eip", eip, "error", err) + } + cfg.JumpTable = © + } + } + + // stratos keeper jump table update + jt := newKeeperInstructionSet(*cfg.JumpTable) + cfg.JumpTable = &jt + + return &EVMInterpreter{ + evm: evm, + cfg: cfg, + } +} + +// Run loops and evaluates the contract's code with the given input data and returns +// the return byte-slice and an error if one occurred. +// +// It's important to note that any errors returned by the interpreter should be +// considered a revert-and-consume-all-gas operation except for +// ErrExecutionReverted which means revert-and-keep-gas-left. +func (in *EVMInterpreter) Run(contract *Contract, input []byte, readOnly bool) (ret []byte, err error) { + // Increment the call depth which is restricted to 1024 + in.evm.depth++ + defer func() { in.evm.depth-- }() + + // Make sure the readOnly is only set if we aren't in readOnly yet. + // This also makes sure that the readOnly flag isn't removed for child calls. + if readOnly && !in.readOnly { + in.readOnly = true + defer func() { in.readOnly = false }() + } + + // Reset the previous call's return data. It's unimportant to preserve the old buffer + // as every returning call will return new data anyway. + in.returnData = nil + + // Don't bother with the execution if there's no code. + if len(contract.Code) == 0 { + return nil, nil + } + + var ( + op OpCode // current opcode + mem = NewMemory() // bound memory + stack = newstack() // local stack + callContext = &ScopeContext{ + Memory: mem, + Stack: stack, + Contract: contract, + } + // For optimisation reason we're using uint64 as the program counter. + // It's theoretically possible to go above 2^64. The YP defines the PC + // to be uint256. Practically much less so feasible. + pc = uint64(0) // program counter + cost uint64 + // copies used by tracer + pcCopy uint64 // needed for the deferred EVMLogger + gasCopy uint64 // for EVMLogger to log gas remaining before execution + logged bool // deferred EVMLogger should ignore already logged steps + res []byte // result of the opcode execution function + ) + // Don't move this deferred function, it's placed before the capturestate-deferred method, + // so that it get's executed _after_: the capturestate needs the stacks before + // they are returned to the pools + defer func() { + returnStack(stack) + }() + contract.Input = input + + if in.cfg.Debug { + defer func() { + if err != nil { + if !logged { + in.cfg.Tracer.CaptureState(pcCopy, op, gasCopy, cost, callContext, in.returnData, in.evm.depth, err) + } else { + in.cfg.Tracer.CaptureFault(pcCopy, op, gasCopy, cost, callContext, in.evm.depth, err) + } + } + }() + } + // The Interpreter main run loop (contextual). This loop runs until either an + // explicit STOP, RETURN or SELFDESTRUCT is executed, an error occurred during + // the execution of one of the operations or until the done flag is set by the + // parent context. + for { + if in.cfg.Debug { + // Capture pre-execution values for tracing. + logged, pcCopy, gasCopy = false, pc, contract.Gas + } + // Get the operation from the jump table and validate the stack to ensure there are + // enough stack items available to perform the operation. + op = contract.GetOp(pc) + operation := wrapWithKeeper(op, in, callContext) + cost = operation.constantGas // For tracing + // Validate stack + if sLen := stack.len(); sLen < operation.minStack { + return nil, &ErrStackUnderflow{stackLen: sLen, required: operation.minStack} + } else if sLen > operation.maxStack { + return nil, &ErrStackOverflow{stackLen: sLen, limit: operation.maxStack} + } + if !contract.UseGas(cost) { + return nil, ErrOutOfGas + } + if operation.dynamicGas != nil { + // All ops with a dynamic memory usage also has a dynamic gas cost. + var memorySize uint64 + // calculate the new memory size and expand the memory to fit + // the operation + // Memory check needs to be done prior to evaluating the dynamic gas portion, + // to detect calculation overflows + if operation.memorySize != nil { + memSize, overflow := operation.memorySize(stack) + if overflow { + return nil, ErrGasUintOverflow + } + // memory is expanded in words of 32 bytes. Gas + // is also calculated in words. + if memorySize, overflow = math.SafeMul(toWordSize(memSize), 32); overflow { + return nil, ErrGasUintOverflow + } + } + // Consume the gas and return an error if not enough gas is available. + // cost is explicitly set so that the capture state defer method can get the proper cost + var dynamicCost uint64 + dynamicCost, err = operation.dynamicGas(in.evm, contract, stack, mem, memorySize) + cost += dynamicCost // for tracing + if err != nil || !contract.UseGas(dynamicCost) { + return nil, ErrOutOfGas + } + // Do tracing before memory expansion + if in.cfg.Debug { + in.cfg.Tracer.CaptureState(pc, op, gasCopy, cost, callContext, in.returnData, in.evm.depth, err) + logged = true + } + if memorySize > 0 { + mem.Resize(memorySize) + } + } else if in.cfg.Debug { + in.cfg.Tracer.CaptureState(pc, op, gasCopy, cost, callContext, in.returnData, in.evm.depth, err) + logged = true + } + // execute the operation + res, err = operation.execute(&pc, in, callContext) + if err != nil { + break + } + pc++ + } + + if err == errStopToken { + err = nil // clear stop token error + } + + return res, err +} + +func (in *EVMInterpreter) getOperation(opCode OpCode) *operation { + return in.cfg.JumpTable[opCode] +} diff --git a/x/evm/vm/jump_table.go b/x/evm/vm/jump_table.go new file mode 100644 index 00000000..e6d0b6d5 --- /dev/null +++ b/x/evm/vm/jump_table.go @@ -0,0 +1,1062 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package vm + +import ( + "fmt" + + "github.com/ethereum/go-ethereum/params" +) + +type ( + executionFunc func(pc *uint64, interpreter *EVMInterpreter, callContext *ScopeContext) ([]byte, error) + gasFunc func(*EVM, *Contract, *Stack, *Memory, uint64) (uint64, error) // last parameter is the requested memory size as a uint64 + // memorySizeFunc returns the required size, and whether the operation overflowed a uint64 + memorySizeFunc func(*Stack) (size uint64, overflow bool) +) + +type operation struct { + // execute is the operation function + execute executionFunc + constantGas uint64 + dynamicGas gasFunc + // minStack tells how many stack items are required + minStack int + // maxStack specifies the max length the stack can have for this operation + // to not overflow the stack. + maxStack int + + // memorySize returns the memory size required for the operation + memorySize memorySizeFunc +} + +var ( + frontierInstructionSet = newFrontierInstructionSet() + homesteadInstructionSet = newHomesteadInstructionSet() + tangerineWhistleInstructionSet = newTangerineWhistleInstructionSet() + spuriousDragonInstructionSet = newSpuriousDragonInstructionSet() + byzantiumInstructionSet = newByzantiumInstructionSet() + constantinopleInstructionSet = newConstantinopleInstructionSet() + istanbulInstructionSet = newIstanbulInstructionSet() + berlinInstructionSet = newBerlinInstructionSet() + londonInstructionSet = newLondonInstructionSet() + mergeInstructionSet = newMergeInstructionSet() +) + +// JumpTable contains the EVM opcodes supported at a given fork. +type JumpTable [256]*operation + +func validate(jt JumpTable) JumpTable { + for i, op := range jt { + if op == nil { + panic(fmt.Sprintf("op %#x is not set", i)) + } + // The interpreter has an assumption that if the memorySize function is + // set, then the dynamicGas function is also set. This is a somewhat + // arbitrary assumption, and can be removed if we need to -- but it + // allows us to avoid a condition check. As long as we have that assumption + // in there, this little sanity check prevents us from merging in a + // change which violates it. + if op.memorySize != nil && op.dynamicGas == nil { + panic(fmt.Sprintf("op %v has dynamic memory but not dynamic gas", OpCode(i).String())) + } + } + return jt +} + +func newMergeInstructionSet() JumpTable { + instructionSet := newLondonInstructionSet() + instructionSet[RANDOM] = &operation{ + execute: opRandom, + constantGas: GasQuickStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + } + return validate(instructionSet) +} + +// newLondonInstructionSet returns the frontier, homestead, byzantium, +// contantinople, istanbul, petersburg, berlin and london instructions. +func newLondonInstructionSet() JumpTable { + instructionSet := newBerlinInstructionSet() + enable3529(&instructionSet) // EIP-3529: Reduction in refunds https://eips.ethereum.org/EIPS/eip-3529 + enable3198(&instructionSet) // Base fee opcode https://eips.ethereum.org/EIPS/eip-3198 + return validate(instructionSet) +} + +// newBerlinInstructionSet returns the frontier, homestead, byzantium, +// contantinople, istanbul, petersburg and berlin instructions. +func newBerlinInstructionSet() JumpTable { + instructionSet := newIstanbulInstructionSet() + enable2929(&instructionSet) // Access lists for trie accesses https://eips.ethereum.org/EIPS/eip-2929 + return validate(instructionSet) +} + +// newIstanbulInstructionSet returns the frontier, homestead, byzantium, +// contantinople, istanbul and petersburg instructions. +func newIstanbulInstructionSet() JumpTable { + instructionSet := newConstantinopleInstructionSet() + + enable1344(&instructionSet) // ChainID opcode - https://eips.ethereum.org/EIPS/eip-1344 + enable1884(&instructionSet) // Reprice reader opcodes - https://eips.ethereum.org/EIPS/eip-1884 + enable2200(&instructionSet) // Net metered SSTORE - https://eips.ethereum.org/EIPS/eip-2200 + + return validate(instructionSet) +} + +// newConstantinopleInstructionSet returns the frontier, homestead, +// byzantium and contantinople instructions. +func newConstantinopleInstructionSet() JumpTable { + instructionSet := newByzantiumInstructionSet() + instructionSet[SHL] = &operation{ + execute: opSHL, + constantGas: GasFastestStep, + minStack: minStack(2, 1), + maxStack: maxStack(2, 1), + } + instructionSet[SHR] = &operation{ + execute: opSHR, + constantGas: GasFastestStep, + minStack: minStack(2, 1), + maxStack: maxStack(2, 1), + } + instructionSet[SAR] = &operation{ + execute: opSAR, + constantGas: GasFastestStep, + minStack: minStack(2, 1), + maxStack: maxStack(2, 1), + } + instructionSet[EXTCODEHASH] = &operation{ + execute: opExtCodeHash, + constantGas: params.ExtcodeHashGasConstantinople, + minStack: minStack(1, 1), + maxStack: maxStack(1, 1), + } + instructionSet[CREATE2] = &operation{ + execute: opCreate2, + constantGas: params.Create2Gas, + dynamicGas: gasCreate2, + minStack: minStack(4, 1), + maxStack: maxStack(4, 1), + memorySize: memoryCreate2, + } + return validate(instructionSet) +} + +// newByzantiumInstructionSet returns the frontier, homestead and +// byzantium instructions. +func newByzantiumInstructionSet() JumpTable { + instructionSet := newSpuriousDragonInstructionSet() + instructionSet[STATICCALL] = &operation{ + execute: opStaticCall, + constantGas: params.CallGasEIP150, + dynamicGas: gasStaticCall, + minStack: minStack(6, 1), + maxStack: maxStack(6, 1), + memorySize: memoryStaticCall, + } + instructionSet[RETURNDATASIZE] = &operation{ + execute: opReturnDataSize, + constantGas: GasQuickStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + } + instructionSet[RETURNDATACOPY] = &operation{ + execute: opReturnDataCopy, + constantGas: GasFastestStep, + dynamicGas: gasReturnDataCopy, + minStack: minStack(3, 0), + maxStack: maxStack(3, 0), + memorySize: memoryReturnDataCopy, + } + instructionSet[REVERT] = &operation{ + execute: opRevert, + dynamicGas: gasRevert, + minStack: minStack(2, 0), + maxStack: maxStack(2, 0), + memorySize: memoryRevert, + } + return validate(instructionSet) +} + +// EIP 158 a.k.a Spurious Dragon +func newSpuriousDragonInstructionSet() JumpTable { + instructionSet := newTangerineWhistleInstructionSet() + instructionSet[EXP].dynamicGas = gasExpEIP158 + return validate(instructionSet) +} + +// EIP 150 a.k.a Tangerine Whistle +func newTangerineWhistleInstructionSet() JumpTable { + instructionSet := newHomesteadInstructionSet() + instructionSet[BALANCE].constantGas = params.BalanceGasEIP150 + instructionSet[EXTCODESIZE].constantGas = params.ExtcodeSizeGasEIP150 + instructionSet[SLOAD].constantGas = params.SloadGasEIP150 + instructionSet[EXTCODECOPY].constantGas = params.ExtcodeCopyBaseEIP150 + instructionSet[CALL].constantGas = params.CallGasEIP150 + instructionSet[CALLCODE].constantGas = params.CallGasEIP150 + instructionSet[DELEGATECALL].constantGas = params.CallGasEIP150 + return validate(instructionSet) +} + +// newHomesteadInstructionSet returns the frontier and homestead +// instructions that can be executed during the homestead phase. +func newHomesteadInstructionSet() JumpTable { + instructionSet := newFrontierInstructionSet() + instructionSet[DELEGATECALL] = &operation{ + execute: opDelegateCall, + dynamicGas: gasDelegateCall, + constantGas: params.CallGasFrontier, + minStack: minStack(6, 1), + maxStack: maxStack(6, 1), + memorySize: memoryDelegateCall, + } + return validate(instructionSet) +} + +// newFrontierInstructionSet returns the frontier instructions +// that can be executed during the frontier phase. +func newFrontierInstructionSet() JumpTable { + tbl := JumpTable{ + STOP: { + execute: opStop, + constantGas: 0, + minStack: minStack(0, 0), + maxStack: maxStack(0, 0), + }, + ADD: { + execute: opAdd, + constantGas: GasFastestStep, + minStack: minStack(2, 1), + maxStack: maxStack(2, 1), + }, + MUL: { + execute: opMul, + constantGas: GasFastStep, + minStack: minStack(2, 1), + maxStack: maxStack(2, 1), + }, + SUB: { + execute: opSub, + constantGas: GasFastestStep, + minStack: minStack(2, 1), + maxStack: maxStack(2, 1), + }, + DIV: { + execute: opDiv, + constantGas: GasFastStep, + minStack: minStack(2, 1), + maxStack: maxStack(2, 1), + }, + SDIV: { + execute: opSdiv, + constantGas: GasFastStep, + minStack: minStack(2, 1), + maxStack: maxStack(2, 1), + }, + MOD: { + execute: opMod, + constantGas: GasFastStep, + minStack: minStack(2, 1), + maxStack: maxStack(2, 1), + }, + SMOD: { + execute: opSmod, + constantGas: GasFastStep, + minStack: minStack(2, 1), + maxStack: maxStack(2, 1), + }, + ADDMOD: { + execute: opAddmod, + constantGas: GasMidStep, + minStack: minStack(3, 1), + maxStack: maxStack(3, 1), + }, + MULMOD: { + execute: opMulmod, + constantGas: GasMidStep, + minStack: minStack(3, 1), + maxStack: maxStack(3, 1), + }, + EXP: { + execute: opExp, + dynamicGas: gasExpFrontier, + minStack: minStack(2, 1), + maxStack: maxStack(2, 1), + }, + SIGNEXTEND: { + execute: opSignExtend, + constantGas: GasFastStep, + minStack: minStack(2, 1), + maxStack: maxStack(2, 1), + }, + LT: { + execute: opLt, + constantGas: GasFastestStep, + minStack: minStack(2, 1), + maxStack: maxStack(2, 1), + }, + GT: { + execute: opGt, + constantGas: GasFastestStep, + minStack: minStack(2, 1), + maxStack: maxStack(2, 1), + }, + SLT: { + execute: opSlt, + constantGas: GasFastestStep, + minStack: minStack(2, 1), + maxStack: maxStack(2, 1), + }, + SGT: { + execute: opSgt, + constantGas: GasFastestStep, + minStack: minStack(2, 1), + maxStack: maxStack(2, 1), + }, + EQ: { + execute: opEq, + constantGas: GasFastestStep, + minStack: minStack(2, 1), + maxStack: maxStack(2, 1), + }, + ISZERO: { + execute: opIszero, + constantGas: GasFastestStep, + minStack: minStack(1, 1), + maxStack: maxStack(1, 1), + }, + AND: { + execute: opAnd, + constantGas: GasFastestStep, + minStack: minStack(2, 1), + maxStack: maxStack(2, 1), + }, + XOR: { + execute: opXor, + constantGas: GasFastestStep, + minStack: minStack(2, 1), + maxStack: maxStack(2, 1), + }, + OR: { + execute: opOr, + constantGas: GasFastestStep, + minStack: minStack(2, 1), + maxStack: maxStack(2, 1), + }, + NOT: { + execute: opNot, + constantGas: GasFastestStep, + minStack: minStack(1, 1), + maxStack: maxStack(1, 1), + }, + BYTE: { + execute: opByte, + constantGas: GasFastestStep, + minStack: minStack(2, 1), + maxStack: maxStack(2, 1), + }, + KECCAK256: { + execute: opKeccak256, + constantGas: params.Keccak256Gas, + dynamicGas: gasKeccak256, + minStack: minStack(2, 1), + maxStack: maxStack(2, 1), + memorySize: memoryKeccak256, + }, + ADDRESS: { + execute: opAddress, + constantGas: GasQuickStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + BALANCE: { + execute: opBalance, + constantGas: params.BalanceGasFrontier, + minStack: minStack(1, 1), + maxStack: maxStack(1, 1), + }, + ORIGIN: { + execute: opOrigin, + constantGas: GasQuickStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + CALLER: { + execute: opCaller, + constantGas: GasQuickStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + CALLVALUE: { + execute: opCallValue, + constantGas: GasQuickStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + CALLDATALOAD: { + execute: opCallDataLoad, + constantGas: GasFastestStep, + minStack: minStack(1, 1), + maxStack: maxStack(1, 1), + }, + CALLDATASIZE: { + execute: opCallDataSize, + constantGas: GasQuickStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + CALLDATACOPY: { + execute: opCallDataCopy, + constantGas: GasFastestStep, + dynamicGas: gasCallDataCopy, + minStack: minStack(3, 0), + maxStack: maxStack(3, 0), + memorySize: memoryCallDataCopy, + }, + CODESIZE: { + execute: opCodeSize, + constantGas: GasQuickStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + CODECOPY: { + execute: opCodeCopy, + constantGas: GasFastestStep, + dynamicGas: gasCodeCopy, + minStack: minStack(3, 0), + maxStack: maxStack(3, 0), + memorySize: memoryCodeCopy, + }, + GASPRICE: { + execute: opGasprice, + constantGas: GasQuickStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + EXTCODESIZE: { + execute: opExtCodeSize, + constantGas: params.ExtcodeSizeGasFrontier, + minStack: minStack(1, 1), + maxStack: maxStack(1, 1), + }, + EXTCODECOPY: { + execute: opExtCodeCopy, + constantGas: params.ExtcodeCopyBaseFrontier, + dynamicGas: gasExtCodeCopy, + minStack: minStack(4, 0), + maxStack: maxStack(4, 0), + memorySize: memoryExtCodeCopy, + }, + BLOCKHASH: { + execute: opBlockhash, + constantGas: GasExtStep, + minStack: minStack(1, 1), + maxStack: maxStack(1, 1), + }, + COINBASE: { + execute: opCoinbase, + constantGas: GasQuickStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + TIMESTAMP: { + execute: opTimestamp, + constantGas: GasQuickStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + NUMBER: { + execute: opNumber, + constantGas: GasQuickStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + DIFFICULTY: { + execute: opDifficulty, + constantGas: GasQuickStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + GASLIMIT: { + execute: opGasLimit, + constantGas: GasQuickStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + POP: { + execute: opPop, + constantGas: GasQuickStep, + minStack: minStack(1, 0), + maxStack: maxStack(1, 0), + }, + MLOAD: { + execute: opMload, + constantGas: GasFastestStep, + dynamicGas: gasMLoad, + minStack: minStack(1, 1), + maxStack: maxStack(1, 1), + memorySize: memoryMLoad, + }, + MSTORE: { + execute: opMstore, + constantGas: GasFastestStep, + dynamicGas: gasMStore, + minStack: minStack(2, 0), + maxStack: maxStack(2, 0), + memorySize: memoryMStore, + }, + MSTORE8: { + execute: opMstore8, + constantGas: GasFastestStep, + dynamicGas: gasMStore8, + memorySize: memoryMStore8, + minStack: minStack(2, 0), + maxStack: maxStack(2, 0), + }, + SLOAD: { + execute: opSload, + constantGas: params.SloadGasFrontier, + minStack: minStack(1, 1), + maxStack: maxStack(1, 1), + }, + SSTORE: { + execute: opSstore, + dynamicGas: gasSStore, + minStack: minStack(2, 0), + maxStack: maxStack(2, 0), + }, + JUMP: { + execute: opJump, + constantGas: GasMidStep, + minStack: minStack(1, 0), + maxStack: maxStack(1, 0), + }, + JUMPI: { + execute: opJumpi, + constantGas: GasSlowStep, + minStack: minStack(2, 0), + maxStack: maxStack(2, 0), + }, + PC: { + execute: opPc, + constantGas: GasQuickStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + MSIZE: { + execute: opMsize, + constantGas: GasQuickStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + GAS: { + execute: opGas, + constantGas: GasQuickStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + JUMPDEST: { + execute: opJumpdest, + constantGas: params.JumpdestGas, + minStack: minStack(0, 0), + maxStack: maxStack(0, 0), + }, + PUSH1: { + execute: opPush1, + constantGas: GasFastestStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + PUSH2: { + execute: makePush(2, 2), + constantGas: GasFastestStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + PUSH3: { + execute: makePush(3, 3), + constantGas: GasFastestStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + PUSH4: { + execute: makePush(4, 4), + constantGas: GasFastestStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + PUSH5: { + execute: makePush(5, 5), + constantGas: GasFastestStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + PUSH6: { + execute: makePush(6, 6), + constantGas: GasFastestStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + PUSH7: { + execute: makePush(7, 7), + constantGas: GasFastestStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + PUSH8: { + execute: makePush(8, 8), + constantGas: GasFastestStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + PUSH9: { + execute: makePush(9, 9), + constantGas: GasFastestStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + PUSH10: { + execute: makePush(10, 10), + constantGas: GasFastestStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + PUSH11: { + execute: makePush(11, 11), + constantGas: GasFastestStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + PUSH12: { + execute: makePush(12, 12), + constantGas: GasFastestStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + PUSH13: { + execute: makePush(13, 13), + constantGas: GasFastestStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + PUSH14: { + execute: makePush(14, 14), + constantGas: GasFastestStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + PUSH15: { + execute: makePush(15, 15), + constantGas: GasFastestStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + PUSH16: { + execute: makePush(16, 16), + constantGas: GasFastestStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + PUSH17: { + execute: makePush(17, 17), + constantGas: GasFastestStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + PUSH18: { + execute: makePush(18, 18), + constantGas: GasFastestStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + PUSH19: { + execute: makePush(19, 19), + constantGas: GasFastestStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + PUSH20: { + execute: makePush(20, 20), + constantGas: GasFastestStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + PUSH21: { + execute: makePush(21, 21), + constantGas: GasFastestStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + PUSH22: { + execute: makePush(22, 22), + constantGas: GasFastestStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + PUSH23: { + execute: makePush(23, 23), + constantGas: GasFastestStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + PUSH24: { + execute: makePush(24, 24), + constantGas: GasFastestStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + PUSH25: { + execute: makePush(25, 25), + constantGas: GasFastestStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + PUSH26: { + execute: makePush(26, 26), + constantGas: GasFastestStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + PUSH27: { + execute: makePush(27, 27), + constantGas: GasFastestStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + PUSH28: { + execute: makePush(28, 28), + constantGas: GasFastestStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + PUSH29: { + execute: makePush(29, 29), + constantGas: GasFastestStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + PUSH30: { + execute: makePush(30, 30), + constantGas: GasFastestStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + PUSH31: { + execute: makePush(31, 31), + constantGas: GasFastestStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + PUSH32: { + execute: makePush(32, 32), + constantGas: GasFastestStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + DUP1: { + execute: makeDup(1), + constantGas: GasFastestStep, + minStack: minDupStack(1), + maxStack: maxDupStack(1), + }, + DUP2: { + execute: makeDup(2), + constantGas: GasFastestStep, + minStack: minDupStack(2), + maxStack: maxDupStack(2), + }, + DUP3: { + execute: makeDup(3), + constantGas: GasFastestStep, + minStack: minDupStack(3), + maxStack: maxDupStack(3), + }, + DUP4: { + execute: makeDup(4), + constantGas: GasFastestStep, + minStack: minDupStack(4), + maxStack: maxDupStack(4), + }, + DUP5: { + execute: makeDup(5), + constantGas: GasFastestStep, + minStack: minDupStack(5), + maxStack: maxDupStack(5), + }, + DUP6: { + execute: makeDup(6), + constantGas: GasFastestStep, + minStack: minDupStack(6), + maxStack: maxDupStack(6), + }, + DUP7: { + execute: makeDup(7), + constantGas: GasFastestStep, + minStack: minDupStack(7), + maxStack: maxDupStack(7), + }, + DUP8: { + execute: makeDup(8), + constantGas: GasFastestStep, + minStack: minDupStack(8), + maxStack: maxDupStack(8), + }, + DUP9: { + execute: makeDup(9), + constantGas: GasFastestStep, + minStack: minDupStack(9), + maxStack: maxDupStack(9), + }, + DUP10: { + execute: makeDup(10), + constantGas: GasFastestStep, + minStack: minDupStack(10), + maxStack: maxDupStack(10), + }, + DUP11: { + execute: makeDup(11), + constantGas: GasFastestStep, + minStack: minDupStack(11), + maxStack: maxDupStack(11), + }, + DUP12: { + execute: makeDup(12), + constantGas: GasFastestStep, + minStack: minDupStack(12), + maxStack: maxDupStack(12), + }, + DUP13: { + execute: makeDup(13), + constantGas: GasFastestStep, + minStack: minDupStack(13), + maxStack: maxDupStack(13), + }, + DUP14: { + execute: makeDup(14), + constantGas: GasFastestStep, + minStack: minDupStack(14), + maxStack: maxDupStack(14), + }, + DUP15: { + execute: makeDup(15), + constantGas: GasFastestStep, + minStack: minDupStack(15), + maxStack: maxDupStack(15), + }, + DUP16: { + execute: makeDup(16), + constantGas: GasFastestStep, + minStack: minDupStack(16), + maxStack: maxDupStack(16), + }, + SWAP1: { + execute: makeSwap(1), + constantGas: GasFastestStep, + minStack: minSwapStack(2), + maxStack: maxSwapStack(2), + }, + SWAP2: { + execute: makeSwap(2), + constantGas: GasFastestStep, + minStack: minSwapStack(3), + maxStack: maxSwapStack(3), + }, + SWAP3: { + execute: makeSwap(3), + constantGas: GasFastestStep, + minStack: minSwapStack(4), + maxStack: maxSwapStack(4), + }, + SWAP4: { + execute: makeSwap(4), + constantGas: GasFastestStep, + minStack: minSwapStack(5), + maxStack: maxSwapStack(5), + }, + SWAP5: { + execute: makeSwap(5), + constantGas: GasFastestStep, + minStack: minSwapStack(6), + maxStack: maxSwapStack(6), + }, + SWAP6: { + execute: makeSwap(6), + constantGas: GasFastestStep, + minStack: minSwapStack(7), + maxStack: maxSwapStack(7), + }, + SWAP7: { + execute: makeSwap(7), + constantGas: GasFastestStep, + minStack: minSwapStack(8), + maxStack: maxSwapStack(8), + }, + SWAP8: { + execute: makeSwap(8), + constantGas: GasFastestStep, + minStack: minSwapStack(9), + maxStack: maxSwapStack(9), + }, + SWAP9: { + execute: makeSwap(9), + constantGas: GasFastestStep, + minStack: minSwapStack(10), + maxStack: maxSwapStack(10), + }, + SWAP10: { + execute: makeSwap(10), + constantGas: GasFastestStep, + minStack: minSwapStack(11), + maxStack: maxSwapStack(11), + }, + SWAP11: { + execute: makeSwap(11), + constantGas: GasFastestStep, + minStack: minSwapStack(12), + maxStack: maxSwapStack(12), + }, + SWAP12: { + execute: makeSwap(12), + constantGas: GasFastestStep, + minStack: minSwapStack(13), + maxStack: maxSwapStack(13), + }, + SWAP13: { + execute: makeSwap(13), + constantGas: GasFastestStep, + minStack: minSwapStack(14), + maxStack: maxSwapStack(14), + }, + SWAP14: { + execute: makeSwap(14), + constantGas: GasFastestStep, + minStack: minSwapStack(15), + maxStack: maxSwapStack(15), + }, + SWAP15: { + execute: makeSwap(15), + constantGas: GasFastestStep, + minStack: minSwapStack(16), + maxStack: maxSwapStack(16), + }, + SWAP16: { + execute: makeSwap(16), + constantGas: GasFastestStep, + minStack: minSwapStack(17), + maxStack: maxSwapStack(17), + }, + LOG0: { + execute: makeLog(0), + dynamicGas: makeGasLog(0), + minStack: minStack(2, 0), + maxStack: maxStack(2, 0), + memorySize: memoryLog, + }, + LOG1: { + execute: makeLog(1), + dynamicGas: makeGasLog(1), + minStack: minStack(3, 0), + maxStack: maxStack(3, 0), + memorySize: memoryLog, + }, + LOG2: { + execute: makeLog(2), + dynamicGas: makeGasLog(2), + minStack: minStack(4, 0), + maxStack: maxStack(4, 0), + memorySize: memoryLog, + }, + LOG3: { + execute: makeLog(3), + dynamicGas: makeGasLog(3), + minStack: minStack(5, 0), + maxStack: maxStack(5, 0), + memorySize: memoryLog, + }, + LOG4: { + execute: makeLog(4), + dynamicGas: makeGasLog(4), + minStack: minStack(6, 0), + maxStack: maxStack(6, 0), + memorySize: memoryLog, + }, + CREATE: { + execute: opCreate, + constantGas: params.CreateGas, + dynamicGas: gasCreate, + minStack: minStack(3, 1), + maxStack: maxStack(3, 1), + memorySize: memoryCreate, + }, + CALL: { + execute: opCall, + constantGas: params.CallGasFrontier, + dynamicGas: gasCall, + minStack: minStack(7, 1), + maxStack: maxStack(7, 1), + memorySize: memoryCall, + }, + CALLCODE: { + execute: opCallCode, + constantGas: params.CallGasFrontier, + dynamicGas: gasCallCode, + minStack: minStack(7, 1), + maxStack: maxStack(7, 1), + memorySize: memoryCall, + }, + RETURN: { + execute: opReturn, + dynamicGas: gasReturn, + minStack: minStack(2, 0), + maxStack: maxStack(2, 0), + memorySize: memoryReturn, + }, + SELFDESTRUCT: { + execute: opSelfdestruct, + dynamicGas: gasSelfdestruct, + minStack: minStack(1, 0), + maxStack: maxStack(1, 0), + }, + } + + // Fill all unassigned slots with opUndefined. + for i, entry := range tbl { + if entry == nil { + tbl[i] = &operation{execute: opUndefined, maxStack: maxStack(0, 0)} + } + } + + return validate(tbl) +} + +// newKeeperInstructionSet returns an updated instructions with modified "call" call for +// custom stratos execution +// NOTE: Maybe we should make on our specific update, instead of apply on go-ethereum update +// see a top lines with instructions sets +func newKeeperInstructionSet(instructionSet JumpTable) JumpTable { + instructionSet[PREPAY] = &operation{ + execute: opPrepay, + constantGas: CallGasPrepay, + dynamicGas: gasPrepay, + minStack: minStack(6, 1), + maxStack: maxStack(6, 1), + memorySize: memoryPrepay, + } + + return validate(instructionSet) +} diff --git a/x/evm/vm/keeper_amplifier.go b/x/evm/vm/keeper_amplifier.go new file mode 100644 index 00000000..28f0ac9d --- /dev/null +++ b/x/evm/vm/keeper_amplifier.go @@ -0,0 +1,28 @@ +package vm + +var handlerNumToOpcode = map[int64]OpCode{ + 0xf1: PREPAY, +} + +func wrapWithKeeper(op OpCode, interpreter *EVMInterpreter, scope *ScopeContext) *operation { + // only CALL for solpatching + if op != CALL { + return interpreter.getOperation(op) + } + + stack := scope.Stack + addr := stack.Back(1) + opKey := addr.ToBig().Int64() + + // determine opcode with reserved address for amplification + opToOverride, ok := handlerNumToOpcode[opKey] + if !ok { + return interpreter.getOperation(op) + } + + // swaping callGasTemp with addr and replace with gas to decrase params + stack.swap(2) + stack.pop() + + return interpreter.getOperation(opToOverride) +} diff --git a/x/evm/vm/logger.go b/x/evm/vm/logger.go new file mode 100644 index 00000000..50fccafc --- /dev/null +++ b/x/evm/vm/logger.go @@ -0,0 +1,44 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package vm + +import ( + "math/big" + "time" + + "github.com/ethereum/go-ethereum/common" +) + +// EVMLogger is used to collect execution traces from an EVM transaction +// execution. CaptureState is called for each step of the VM with the +// current VM state. +// Note that reference types are actual VM data structures; make copies +// if you need to retain them beyond the current call. +type EVMLogger interface { + // Transaction level + CaptureTxStart(gasLimit uint64) + CaptureTxEnd(restGas uint64) + // Top call frame + CaptureStart(env *EVM, from common.Address, to common.Address, create bool, input []byte, gas uint64, value *big.Int) + CaptureEnd(output []byte, gasUsed uint64, t time.Duration, err error) + // Rest of call frames + CaptureEnter(typ OpCode, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) + CaptureExit(output []byte, gasUsed uint64, err error) + // Opcode level + CaptureState(pc uint64, op OpCode, gas, cost uint64, scope *ScopeContext, rData []byte, depth int, err error) + CaptureFault(pc uint64, op OpCode, gas, cost uint64, scope *ScopeContext, depth int, err error) +} diff --git a/x/evm/vm/memory.go b/x/evm/vm/memory.go new file mode 100644 index 00000000..35b72999 --- /dev/null +++ b/x/evm/vm/memory.go @@ -0,0 +1,105 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package vm + +import ( + "github.com/holiman/uint256" +) + +// Memory implements a simple memory model for the ethereum virtual machine. +type Memory struct { + store []byte + lastGasCost uint64 +} + +// NewMemory returns a new memory model. +func NewMemory() *Memory { + return &Memory{} +} + +// Set sets offset + size to value +func (m *Memory) Set(offset, size uint64, value []byte) { + // It's possible the offset is greater than 0 and size equals 0. This is because + // the calcMemSize (common.go) could potentially return 0 when size is zero (NO-OP) + if size > 0 { + // length of store may never be less than offset + size. + // The store should be resized PRIOR to setting the memory + if offset+size > uint64(len(m.store)) { + panic("invalid memory: store empty") + } + copy(m.store[offset:offset+size], value) + } +} + +// Set32 sets the 32 bytes starting at offset to the value of val, left-padded with zeroes to +// 32 bytes. +func (m *Memory) Set32(offset uint64, val *uint256.Int) { + // length of store may never be less than offset + size. + // The store should be resized PRIOR to setting the memory + if offset+32 > uint64(len(m.store)) { + panic("invalid memory: store empty") + } + // Fill in relevant bits + b32 := val.Bytes32() + copy(m.store[offset:], b32[:]) +} + +// Resize resizes the memory to size +func (m *Memory) Resize(size uint64) { + if uint64(m.Len()) < size { + m.store = append(m.store, make([]byte, size-uint64(m.Len()))...) + } +} + +// GetCopy returns offset + size as a new slice +func (m *Memory) GetCopy(offset, size int64) (cpy []byte) { + if size == 0 { + return nil + } + + if len(m.store) > int(offset) { + cpy = make([]byte, size) + copy(cpy, m.store[offset:offset+size]) + + return + } + + return +} + +// GetPtr returns the offset + size +func (m *Memory) GetPtr(offset, size int64) []byte { + if size == 0 { + return nil + } + + if len(m.store) > int(offset) { + return m.store[offset : offset+size] + } + + return nil +} + +// Len returns the length of the backing slice +func (m *Memory) Len() int { + return len(m.store) +} + +// Data returns the backing slice +func (m *Memory) Data() []byte { + return m.store +} diff --git a/x/evm/vm/memory_table.go b/x/evm/vm/memory_table.go new file mode 100644 index 00000000..0769e88e --- /dev/null +++ b/x/evm/vm/memory_table.go @@ -0,0 +1,128 @@ +// Copyright 2017 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package vm + +func memoryKeccak256(stack *Stack) (uint64, bool) { + return calcMemSize64(stack.Back(0), stack.Back(1)) +} + +func memoryCallDataCopy(stack *Stack) (uint64, bool) { + return calcMemSize64(stack.Back(0), stack.Back(2)) +} + +func memoryReturnDataCopy(stack *Stack) (uint64, bool) { + return calcMemSize64(stack.Back(0), stack.Back(2)) +} + +func memoryCodeCopy(stack *Stack) (uint64, bool) { + return calcMemSize64(stack.Back(0), stack.Back(2)) +} + +func memoryExtCodeCopy(stack *Stack) (uint64, bool) { + return calcMemSize64(stack.Back(1), stack.Back(3)) +} + +func memoryMLoad(stack *Stack) (uint64, bool) { + return calcMemSize64WithUint(stack.Back(0), 32) +} + +func memoryMStore8(stack *Stack) (uint64, bool) { + return calcMemSize64WithUint(stack.Back(0), 1) +} + +func memoryMStore(stack *Stack) (uint64, bool) { + return calcMemSize64WithUint(stack.Back(0), 32) +} + +func memoryCreate(stack *Stack) (uint64, bool) { + return calcMemSize64(stack.Back(1), stack.Back(2)) +} + +func memoryCreate2(stack *Stack) (uint64, bool) { + return calcMemSize64(stack.Back(1), stack.Back(2)) +} + +func memoryCall(stack *Stack) (uint64, bool) { + x, overflow := calcMemSize64(stack.Back(5), stack.Back(6)) + if overflow { + return 0, true + } + y, overflow := calcMemSize64(stack.Back(3), stack.Back(4)) + if overflow { + return 0, true + } + if x > y { + return x, false + } + return y, false +} +func memoryDelegateCall(stack *Stack) (uint64, bool) { + x, overflow := calcMemSize64(stack.Back(4), stack.Back(5)) + if overflow { + return 0, true + } + y, overflow := calcMemSize64(stack.Back(2), stack.Back(3)) + if overflow { + return 0, true + } + if x > y { + return x, false + } + return y, false +} + +func memoryStaticCall(stack *Stack) (uint64, bool) { + x, overflow := calcMemSize64(stack.Back(4), stack.Back(5)) + if overflow { + return 0, true + } + y, overflow := calcMemSize64(stack.Back(2), stack.Back(3)) + if overflow { + return 0, true + } + if x > y { + return x, false + } + return y, false +} + +func memoryReturn(stack *Stack) (uint64, bool) { + return calcMemSize64(stack.Back(0), stack.Back(1)) +} + +func memoryRevert(stack *Stack) (uint64, bool) { + return calcMemSize64(stack.Back(0), stack.Back(1)) +} + +func memoryLog(stack *Stack) (uint64, bool) { + return calcMemSize64(stack.Back(0), stack.Back(1)) +} + +func memoryPrepay(stack *Stack) (uint64, bool) { + x, overflow := calcMemSize64(stack.Back(4), stack.Back(5)) + if overflow { + return 0, true + } + y, overflow := calcMemSize64(stack.Back(2), stack.Back(3)) + if overflow { + return 0, true + } + if x > y { + return x, false + } + return y, false +} diff --git a/x/evm/vm/opcodes.go b/x/evm/vm/opcodes.go new file mode 100644 index 00000000..9caae9d2 --- /dev/null +++ b/x/evm/vm/opcodes.go @@ -0,0 +1,562 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package vm + +import ( + "fmt" +) + +// OpCode is an EVM opcode +type OpCode byte + +// IsPush specifies if an opcode is a PUSH opcode. +func (op OpCode) IsPush() bool { + switch op { + case PUSH1, PUSH2, PUSH3, PUSH4, PUSH5, PUSH6, PUSH7, PUSH8, PUSH9, PUSH10, PUSH11, PUSH12, PUSH13, PUSH14, PUSH15, PUSH16, PUSH17, PUSH18, PUSH19, PUSH20, PUSH21, PUSH22, PUSH23, PUSH24, PUSH25, PUSH26, PUSH27, PUSH28, PUSH29, PUSH30, PUSH31, PUSH32: + return true + } + return false +} + +// 0x0 range - arithmetic ops. +const ( + STOP OpCode = 0x0 + ADD OpCode = 0x1 + MUL OpCode = 0x2 + SUB OpCode = 0x3 + DIV OpCode = 0x4 + SDIV OpCode = 0x5 + MOD OpCode = 0x6 + SMOD OpCode = 0x7 + ADDMOD OpCode = 0x8 + MULMOD OpCode = 0x9 + EXP OpCode = 0xa + SIGNEXTEND OpCode = 0xb +) + +// 0x10 range - comparison ops. +const ( + LT OpCode = 0x10 + GT OpCode = 0x11 + SLT OpCode = 0x12 + SGT OpCode = 0x13 + EQ OpCode = 0x14 + ISZERO OpCode = 0x15 + AND OpCode = 0x16 + OR OpCode = 0x17 + XOR OpCode = 0x18 + NOT OpCode = 0x19 + BYTE OpCode = 0x1a + SHL OpCode = 0x1b + SHR OpCode = 0x1c + SAR OpCode = 0x1d +) + +// 0x20 range - crypto. +const ( + KECCAK256 OpCode = 0x20 +) + +// 0x30 range - closure state. +const ( + ADDRESS OpCode = 0x30 + BALANCE OpCode = 0x31 + ORIGIN OpCode = 0x32 + CALLER OpCode = 0x33 + CALLVALUE OpCode = 0x34 + CALLDATALOAD OpCode = 0x35 + CALLDATASIZE OpCode = 0x36 + CALLDATACOPY OpCode = 0x37 + CODESIZE OpCode = 0x38 + CODECOPY OpCode = 0x39 + GASPRICE OpCode = 0x3a + EXTCODESIZE OpCode = 0x3b + EXTCODECOPY OpCode = 0x3c + RETURNDATASIZE OpCode = 0x3d + RETURNDATACOPY OpCode = 0x3e + EXTCODEHASH OpCode = 0x3f +) + +// 0x40 range - block operations. +const ( + BLOCKHASH OpCode = 0x40 + COINBASE OpCode = 0x41 + TIMESTAMP OpCode = 0x42 + NUMBER OpCode = 0x43 + DIFFICULTY OpCode = 0x44 + RANDOM OpCode = 0x44 // Same as DIFFICULTY + GASLIMIT OpCode = 0x45 + CHAINID OpCode = 0x46 + SELFBALANCE OpCode = 0x47 + BASEFEE OpCode = 0x48 +) + +// 0x50 range - 'storage' and execution. +const ( + POP OpCode = 0x50 + MLOAD OpCode = 0x51 + MSTORE OpCode = 0x52 + MSTORE8 OpCode = 0x53 + SLOAD OpCode = 0x54 + SSTORE OpCode = 0x55 + JUMP OpCode = 0x56 + JUMPI OpCode = 0x57 + PC OpCode = 0x58 + MSIZE OpCode = 0x59 + GAS OpCode = 0x5a + JUMPDEST OpCode = 0x5b + PUSH0 OpCode = 0x5f +) + +// 0x60 range - pushes. +const ( + PUSH1 OpCode = 0x60 + iota + PUSH2 + PUSH3 + PUSH4 + PUSH5 + PUSH6 + PUSH7 + PUSH8 + PUSH9 + PUSH10 + PUSH11 + PUSH12 + PUSH13 + PUSH14 + PUSH15 + PUSH16 + PUSH17 + PUSH18 + PUSH19 + PUSH20 + PUSH21 + PUSH22 + PUSH23 + PUSH24 + PUSH25 + PUSH26 + PUSH27 + PUSH28 + PUSH29 + PUSH30 + PUSH31 + PUSH32 +) + +// 0x80 range - dups. +const ( + DUP1 = 0x80 + iota + DUP2 + DUP3 + DUP4 + DUP5 + DUP6 + DUP7 + DUP8 + DUP9 + DUP10 + DUP11 + DUP12 + DUP13 + DUP14 + DUP15 + DUP16 +) + +// 0x90 range - swaps. +const ( + SWAP1 = 0x90 + iota + SWAP2 + SWAP3 + SWAP4 + SWAP5 + SWAP6 + SWAP7 + SWAP8 + SWAP9 + SWAP10 + SWAP11 + SWAP12 + SWAP13 + SWAP14 + SWAP15 + SWAP16 +) + +// 0xa0 range - logging ops. +const ( + LOG0 OpCode = 0xa0 + iota + LOG1 + LOG2 + LOG3 + LOG4 +) + +// 0xdc range - closures. Stratos chain only +const ( + PREPAY OpCode = 0xdc +) + +// 0xf0 range - closures. +const ( + CREATE OpCode = 0xf0 + CALL OpCode = 0xf1 + CALLCODE OpCode = 0xf2 + RETURN OpCode = 0xf3 + DELEGATECALL OpCode = 0xf4 + CREATE2 OpCode = 0xf5 + + STATICCALL OpCode = 0xfa + REVERT OpCode = 0xfd + INVALID OpCode = 0xfe + SELFDESTRUCT OpCode = 0xff +) + +// Since the opcodes aren't all in order we can't use a regular slice. +var opCodeToString = map[OpCode]string{ + // 0x0 range - arithmetic ops. + STOP: "STOP", + ADD: "ADD", + MUL: "MUL", + SUB: "SUB", + DIV: "DIV", + SDIV: "SDIV", + MOD: "MOD", + SMOD: "SMOD", + EXP: "EXP", + NOT: "NOT", + LT: "LT", + GT: "GT", + SLT: "SLT", + SGT: "SGT", + EQ: "EQ", + ISZERO: "ISZERO", + SIGNEXTEND: "SIGNEXTEND", + + // 0x10 range - bit ops. + AND: "AND", + OR: "OR", + XOR: "XOR", + BYTE: "BYTE", + SHL: "SHL", + SHR: "SHR", + SAR: "SAR", + ADDMOD: "ADDMOD", + MULMOD: "MULMOD", + + // 0x20 range - crypto. + KECCAK256: "KECCAK256", + + // 0x30 range - closure state. + ADDRESS: "ADDRESS", + BALANCE: "BALANCE", + ORIGIN: "ORIGIN", + CALLER: "CALLER", + CALLVALUE: "CALLVALUE", + CALLDATALOAD: "CALLDATALOAD", + CALLDATASIZE: "CALLDATASIZE", + CALLDATACOPY: "CALLDATACOPY", + CODESIZE: "CODESIZE", + CODECOPY: "CODECOPY", + GASPRICE: "GASPRICE", + EXTCODESIZE: "EXTCODESIZE", + EXTCODECOPY: "EXTCODECOPY", + RETURNDATASIZE: "RETURNDATASIZE", + RETURNDATACOPY: "RETURNDATACOPY", + EXTCODEHASH: "EXTCODEHASH", + + // 0x40 range - block operations. + BLOCKHASH: "BLOCKHASH", + COINBASE: "COINBASE", + TIMESTAMP: "TIMESTAMP", + NUMBER: "NUMBER", + DIFFICULTY: "DIFFICULTY", // TODO (MariusVanDerWijden) rename to RANDOM post merge + GASLIMIT: "GASLIMIT", + CHAINID: "CHAINID", + SELFBALANCE: "SELFBALANCE", + BASEFEE: "BASEFEE", + + // 0x50 range - 'storage' and execution. + POP: "POP", + //DUP: "DUP", + //SWAP: "SWAP", + MLOAD: "MLOAD", + MSTORE: "MSTORE", + MSTORE8: "MSTORE8", + SLOAD: "SLOAD", + SSTORE: "SSTORE", + JUMP: "JUMP", + JUMPI: "JUMPI", + PC: "PC", + MSIZE: "MSIZE", + GAS: "GAS", + JUMPDEST: "JUMPDEST", + PUSH0: "PUSH0", + + // 0x60 range - push. + PUSH1: "PUSH1", + PUSH2: "PUSH2", + PUSH3: "PUSH3", + PUSH4: "PUSH4", + PUSH5: "PUSH5", + PUSH6: "PUSH6", + PUSH7: "PUSH7", + PUSH8: "PUSH8", + PUSH9: "PUSH9", + PUSH10: "PUSH10", + PUSH11: "PUSH11", + PUSH12: "PUSH12", + PUSH13: "PUSH13", + PUSH14: "PUSH14", + PUSH15: "PUSH15", + PUSH16: "PUSH16", + PUSH17: "PUSH17", + PUSH18: "PUSH18", + PUSH19: "PUSH19", + PUSH20: "PUSH20", + PUSH21: "PUSH21", + PUSH22: "PUSH22", + PUSH23: "PUSH23", + PUSH24: "PUSH24", + PUSH25: "PUSH25", + PUSH26: "PUSH26", + PUSH27: "PUSH27", + PUSH28: "PUSH28", + PUSH29: "PUSH29", + PUSH30: "PUSH30", + PUSH31: "PUSH31", + PUSH32: "PUSH32", + + DUP1: "DUP1", + DUP2: "DUP2", + DUP3: "DUP3", + DUP4: "DUP4", + DUP5: "DUP5", + DUP6: "DUP6", + DUP7: "DUP7", + DUP8: "DUP8", + DUP9: "DUP9", + DUP10: "DUP10", + DUP11: "DUP11", + DUP12: "DUP12", + DUP13: "DUP13", + DUP14: "DUP14", + DUP15: "DUP15", + DUP16: "DUP16", + + SWAP1: "SWAP1", + SWAP2: "SWAP2", + SWAP3: "SWAP3", + SWAP4: "SWAP4", + SWAP5: "SWAP5", + SWAP6: "SWAP6", + SWAP7: "SWAP7", + SWAP8: "SWAP8", + SWAP9: "SWAP9", + SWAP10: "SWAP10", + SWAP11: "SWAP11", + SWAP12: "SWAP12", + SWAP13: "SWAP13", + SWAP14: "SWAP14", + SWAP15: "SWAP15", + SWAP16: "SWAP16", + LOG0: "LOG0", + LOG1: "LOG1", + LOG2: "LOG2", + LOG3: "LOG3", + LOG4: "LOG4", + + // 0xdc range. + PREPAY: "PREPAY", + + // 0xf0 range. + CREATE: "CREATE", + CALL: "CALL", + RETURN: "RETURN", + CALLCODE: "CALLCODE", + DELEGATECALL: "DELEGATECALL", + CREATE2: "CREATE2", + STATICCALL: "STATICCALL", + REVERT: "REVERT", + INVALID: "INVALID", + SELFDESTRUCT: "SELFDESTRUCT", +} + +func (op OpCode) String() string { + str := opCodeToString[op] + if len(str) == 0 { + return fmt.Sprintf("opcode %#x not defined", int(op)) + } + + return str +} + +var stringToOp = map[string]OpCode{ + "STOP": STOP, + "ADD": ADD, + "MUL": MUL, + "SUB": SUB, + "DIV": DIV, + "SDIV": SDIV, + "MOD": MOD, + "SMOD": SMOD, + "EXP": EXP, + "NOT": NOT, + "LT": LT, + "GT": GT, + "SLT": SLT, + "SGT": SGT, + "EQ": EQ, + "ISZERO": ISZERO, + "SIGNEXTEND": SIGNEXTEND, + "AND": AND, + "OR": OR, + "XOR": XOR, + "BYTE": BYTE, + "SHL": SHL, + "SHR": SHR, + "SAR": SAR, + "ADDMOD": ADDMOD, + "MULMOD": MULMOD, + "KECCAK256": KECCAK256, + "ADDRESS": ADDRESS, + "BALANCE": BALANCE, + "ORIGIN": ORIGIN, + "CALLER": CALLER, + "CALLVALUE": CALLVALUE, + "CALLDATALOAD": CALLDATALOAD, + "CALLDATASIZE": CALLDATASIZE, + "CALLDATACOPY": CALLDATACOPY, + "CHAINID": CHAINID, + "BASEFEE": BASEFEE, + "DELEGATECALL": DELEGATECALL, + "STATICCALL": STATICCALL, + "CODESIZE": CODESIZE, + "CODECOPY": CODECOPY, + "GASPRICE": GASPRICE, + "EXTCODESIZE": EXTCODESIZE, + "EXTCODECOPY": EXTCODECOPY, + "RETURNDATASIZE": RETURNDATASIZE, + "RETURNDATACOPY": RETURNDATACOPY, + "EXTCODEHASH": EXTCODEHASH, + "BLOCKHASH": BLOCKHASH, + "COINBASE": COINBASE, + "TIMESTAMP": TIMESTAMP, + "NUMBER": NUMBER, + "DIFFICULTY": DIFFICULTY, + "GASLIMIT": GASLIMIT, + "SELFBALANCE": SELFBALANCE, + "POP": POP, + "MLOAD": MLOAD, + "MSTORE": MSTORE, + "MSTORE8": MSTORE8, + "SLOAD": SLOAD, + "SSTORE": SSTORE, + "JUMP": JUMP, + "JUMPI": JUMPI, + "PC": PC, + "MSIZE": MSIZE, + "GAS": GAS, + "JUMPDEST": JUMPDEST, + "PUSH0": PUSH0, + "PUSH1": PUSH1, + "PUSH2": PUSH2, + "PUSH3": PUSH3, + "PUSH4": PUSH4, + "PUSH5": PUSH5, + "PUSH6": PUSH6, + "PUSH7": PUSH7, + "PUSH8": PUSH8, + "PUSH9": PUSH9, + "PUSH10": PUSH10, + "PUSH11": PUSH11, + "PUSH12": PUSH12, + "PUSH13": PUSH13, + "PUSH14": PUSH14, + "PUSH15": PUSH15, + "PUSH16": PUSH16, + "PUSH17": PUSH17, + "PUSH18": PUSH18, + "PUSH19": PUSH19, + "PUSH20": PUSH20, + "PUSH21": PUSH21, + "PUSH22": PUSH22, + "PUSH23": PUSH23, + "PUSH24": PUSH24, + "PUSH25": PUSH25, + "PUSH26": PUSH26, + "PUSH27": PUSH27, + "PUSH28": PUSH28, + "PUSH29": PUSH29, + "PUSH30": PUSH30, + "PUSH31": PUSH31, + "PUSH32": PUSH32, + "DUP1": DUP1, + "DUP2": DUP2, + "DUP3": DUP3, + "DUP4": DUP4, + "DUP5": DUP5, + "DUP6": DUP6, + "DUP7": DUP7, + "DUP8": DUP8, + "DUP9": DUP9, + "DUP10": DUP10, + "DUP11": DUP11, + "DUP12": DUP12, + "DUP13": DUP13, + "DUP14": DUP14, + "DUP15": DUP15, + "DUP16": DUP16, + "SWAP1": SWAP1, + "SWAP2": SWAP2, + "SWAP3": SWAP3, + "SWAP4": SWAP4, + "SWAP5": SWAP5, + "SWAP6": SWAP6, + "SWAP7": SWAP7, + "SWAP8": SWAP8, + "SWAP9": SWAP9, + "SWAP10": SWAP10, + "SWAP11": SWAP11, + "SWAP12": SWAP12, + "SWAP13": SWAP13, + "SWAP14": SWAP14, + "SWAP15": SWAP15, + "SWAP16": SWAP16, + "LOG0": LOG0, + "LOG1": LOG1, + "LOG2": LOG2, + "LOG3": LOG3, + "LOG4": LOG4, + "CREATE": CREATE, + "CREATE2": CREATE2, + "CALL": CALL, + "RETURN": RETURN, + "CALLCODE": CALLCODE, + "REVERT": REVERT, + "INVALID": INVALID, + "SELFDESTRUCT": SELFDESTRUCT, + + // new + "PREPAY": PREPAY, +} + +// StringToOp finds the opcode whose name is stored in `str`. +func StringToOp(str string) OpCode { + return stringToOp[str] +} diff --git a/x/evm/vm/operations_acl.go b/x/evm/vm/operations_acl.go new file mode 100644 index 00000000..551e1f5f --- /dev/null +++ b/x/evm/vm/operations_acl.go @@ -0,0 +1,244 @@ +// Copyright 2020 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package vm + +import ( + "errors" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/common/math" + "github.com/ethereum/go-ethereum/params" +) + +func makeGasSStoreFunc(clearingRefund uint64) gasFunc { + return func(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { + // If we fail the minimum gas availability invariant, fail (0) + if contract.Gas <= params.SstoreSentryGasEIP2200 { + return 0, errors.New("not enough gas for reentrancy sentry") + } + // Gas sentry honoured, do the actual gas calculation based on the stored value + var ( + y, x = stack.Back(1), stack.peek() + slot = common.Hash(x.Bytes32()) + current = evm.StateDB.GetState(contract.Address(), slot) + cost = uint64(0) + ) + // Check slot presence in the access list + if addrPresent, slotPresent := evm.StateDB.SlotInAccessList(contract.Address(), slot); !slotPresent { + cost = params.ColdSloadCostEIP2929 + // If the caller cannot afford the cost, this change will be rolled back + evm.StateDB.AddSlotToAccessList(contract.Address(), slot) + if !addrPresent { + // Once we're done with YOLOv2 and schedule this for mainnet, might + // be good to remove this panic here, which is just really a + // canary to have during testing + panic("impossible case: address was not present in access list during sstore op") + } + } + value := common.Hash(y.Bytes32()) + + if current == value { // noop (1) + // EIP 2200 original clause: + // return params.SloadGasEIP2200, nil + return cost + params.WarmStorageReadCostEIP2929, nil // SLOAD_GAS + } + original := evm.StateDB.GetCommittedState(contract.Address(), x.Bytes32()) + if original == current { + if original == (common.Hash{}) { // create slot (2.1.1) + return cost + params.SstoreSetGasEIP2200, nil + } + if value == (common.Hash{}) { // delete slot (2.1.2b) + evm.StateDB.AddRefund(clearingRefund) + } + // EIP-2200 original clause: + // return params.SstoreResetGasEIP2200, nil // write existing slot (2.1.2) + return cost + (params.SstoreResetGasEIP2200 - params.ColdSloadCostEIP2929), nil // write existing slot (2.1.2) + } + if original != (common.Hash{}) { + if current == (common.Hash{}) { // recreate slot (2.2.1.1) + evm.StateDB.SubRefund(clearingRefund) + } else if value == (common.Hash{}) { // delete slot (2.2.1.2) + evm.StateDB.AddRefund(clearingRefund) + } + } + if original == value { + if original == (common.Hash{}) { // reset to original inexistent slot (2.2.2.1) + // EIP 2200 Original clause: + //evm.StateDB.AddRefund(params.SstoreSetGasEIP2200 - params.SloadGasEIP2200) + evm.StateDB.AddRefund(params.SstoreSetGasEIP2200 - params.WarmStorageReadCostEIP2929) + } else { // reset to original existing slot (2.2.2.2) + // EIP 2200 Original clause: + // evm.StateDB.AddRefund(params.SstoreResetGasEIP2200 - params.SloadGasEIP2200) + // - SSTORE_RESET_GAS redefined as (5000 - COLD_SLOAD_COST) + // - SLOAD_GAS redefined as WARM_STORAGE_READ_COST + // Final: (5000 - COLD_SLOAD_COST) - WARM_STORAGE_READ_COST + evm.StateDB.AddRefund((params.SstoreResetGasEIP2200 - params.ColdSloadCostEIP2929) - params.WarmStorageReadCostEIP2929) + } + } + // EIP-2200 original clause: + //return params.SloadGasEIP2200, nil // dirty update (2.2) + return cost + params.WarmStorageReadCostEIP2929, nil // dirty update (2.2) + } +} + +// gasSLoadEIP2929 calculates dynamic gas for SLOAD according to EIP-2929 +// For SLOAD, if the (address, storage_key) pair (where address is the address of the contract +// whose storage is being read) is not yet in accessed_storage_keys, +// charge 2100 gas and add the pair to accessed_storage_keys. +// If the pair is already in accessed_storage_keys, charge 100 gas. +func gasSLoadEIP2929(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { + loc := stack.peek() + slot := common.Hash(loc.Bytes32()) + // Check slot presence in the access list + if _, slotPresent := evm.StateDB.SlotInAccessList(contract.Address(), slot); !slotPresent { + // If the caller cannot afford the cost, this change will be rolled back + // If he does afford it, we can skip checking the same thing later on, during execution + evm.StateDB.AddSlotToAccessList(contract.Address(), slot) + return params.ColdSloadCostEIP2929, nil + } + return params.WarmStorageReadCostEIP2929, nil +} + +// gasExtCodeCopyEIP2929 implements extcodecopy according to EIP-2929 +// EIP spec: +// > If the target is not in accessed_addresses, +// > charge COLD_ACCOUNT_ACCESS_COST gas, and add the address to accessed_addresses. +// > Otherwise, charge WARM_STORAGE_READ_COST gas. +func gasExtCodeCopyEIP2929(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { + // memory expansion first (dynamic part of pre-2929 implementation) + gas, err := gasExtCodeCopy(evm, contract, stack, mem, memorySize) + if err != nil { + return 0, err + } + addr := common.Address(stack.peek().Bytes20()) + // Check slot presence in the access list + if !evm.StateDB.AddressInAccessList(addr) { + evm.StateDB.AddAddressToAccessList(addr) + var overflow bool + // We charge (cold-warm), since 'warm' is already charged as constantGas + if gas, overflow = math.SafeAdd(gas, params.ColdAccountAccessCostEIP2929-params.WarmStorageReadCostEIP2929); overflow { + return 0, ErrGasUintOverflow + } + return gas, nil + } + return gas, nil +} + +// gasEip2929AccountCheck checks whether the first stack item (as address) is present in the access list. +// If it is, this method returns '0', otherwise 'cold-warm' gas, presuming that the opcode using it +// is also using 'warm' as constant factor. +// This method is used by: +// - extcodehash, +// - extcodesize, +// - (ext) balance +func gasEip2929AccountCheck(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { + addr := common.Address(stack.peek().Bytes20()) + // Check slot presence in the access list + if !evm.StateDB.AddressInAccessList(addr) { + // If the caller cannot afford the cost, this change will be rolled back + evm.StateDB.AddAddressToAccessList(addr) + // The warm storage read cost is already charged as constantGas + return params.ColdAccountAccessCostEIP2929 - params.WarmStorageReadCostEIP2929, nil + } + return 0, nil +} + +func makeCallVariantGasCallEIP2929(oldCalculator gasFunc) gasFunc { + return func(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { + addr := common.Address(stack.Back(1).Bytes20()) + // Check slot presence in the access list + warmAccess := evm.StateDB.AddressInAccessList(addr) + // The WarmStorageReadCostEIP2929 (100) is already deducted in the form of a constant cost, so + // the cost to charge for cold access, if any, is Cold - Warm + coldCost := params.ColdAccountAccessCostEIP2929 - params.WarmStorageReadCostEIP2929 + if !warmAccess { + evm.StateDB.AddAddressToAccessList(addr) + // Charge the remaining difference here already, to correctly calculate available + // gas for call + if !contract.UseGas(coldCost) { + return 0, ErrOutOfGas + } + } + // Now call the old calculator, which takes into account + // - create new account + // - transfer value + // - memory expansion + // - 63/64ths rule + gas, err := oldCalculator(evm, contract, stack, mem, memorySize) + if warmAccess || err != nil { + return gas, err + } + // In case of a cold access, we temporarily add the cold charge back, and also + // add it to the returned gas. By adding it to the return, it will be charged + // outside of this function, as part of the dynamic gas, and that will make it + // also become correctly reported to tracers. + contract.Gas += coldCost + return gas + coldCost, nil + } +} + +var ( + gasCallEIP2929 = makeCallVariantGasCallEIP2929(gasCall) + gasDelegateCallEIP2929 = makeCallVariantGasCallEIP2929(gasDelegateCall) + gasStaticCallEIP2929 = makeCallVariantGasCallEIP2929(gasStaticCall) + gasCallCodeEIP2929 = makeCallVariantGasCallEIP2929(gasCallCode) + gasSelfdestructEIP2929 = makeSelfdestructGasFn(true) + // gasSelfdestructEIP3529 implements the changes in EIP-2539 (no refunds) + gasSelfdestructEIP3529 = makeSelfdestructGasFn(false) + + // gasSStoreEIP2929 implements gas cost for SSTORE according to EIP-2929 + // + // When calling SSTORE, check if the (address, storage_key) pair is in accessed_storage_keys. + // If it is not, charge an additional COLD_SLOAD_COST gas, and add the pair to accessed_storage_keys. + // Additionally, modify the parameters defined in EIP 2200 as follows: + // + // Parameter Old value New value + // SLOAD_GAS 800 = WARM_STORAGE_READ_COST + // SSTORE_RESET_GAS 5000 5000 - COLD_SLOAD_COST + // + //The other parameters defined in EIP 2200 are unchanged. + // see gasSStoreEIP2200(...) in core/vm/gas_table.go for more info about how EIP 2200 is specified + gasSStoreEIP2929 = makeGasSStoreFunc(params.SstoreClearsScheduleRefundEIP2200) + + // gasSStoreEIP2539 implements gas cost for SSTORE according to EIP-2539 + // Replace `SSTORE_CLEARS_SCHEDULE` with `SSTORE_RESET_GAS + ACCESS_LIST_STORAGE_KEY_COST` (4,800) + gasSStoreEIP3529 = makeGasSStoreFunc(params.SstoreClearsScheduleRefundEIP3529) +) + +// makeSelfdestructGasFn can create the selfdestruct dynamic gas function for EIP-2929 and EIP-2539 +func makeSelfdestructGasFn(refundsEnabled bool) gasFunc { + gasFunc := func(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { + var ( + gas uint64 + address = common.Address(stack.peek().Bytes20()) + ) + if !evm.StateDB.AddressInAccessList(address) { + // If the caller cannot afford the cost, this change will be rolled back + evm.StateDB.AddAddressToAccessList(address) + gas = params.ColdAccountAccessCostEIP2929 + } + // if empty and transfers value + if evm.StateDB.Empty(address) && evm.StateDB.GetBalance(contract.Address()).Sign() != 0 { + gas += params.CreateBySelfdestructGas + } + if refundsEnabled && !evm.StateDB.HasSuicided(contract.Address()) { + evm.StateDB.AddRefund(params.SelfdestructRefundGas) + } + return gas, nil + } + return gasFunc +} diff --git a/x/evm/vm/stack.go b/x/evm/vm/stack.go new file mode 100644 index 00000000..e1a957e2 --- /dev/null +++ b/x/evm/vm/stack.go @@ -0,0 +1,82 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package vm + +import ( + "sync" + + "github.com/holiman/uint256" +) + +var stackPool = sync.Pool{ + New: func() interface{} { + return &Stack{data: make([]uint256.Int, 0, 16)} + }, +} + +// Stack is an object for basic stack operations. Items popped to the stack are +// expected to be changed and modified. stack does not take care of adding newly +// initialised objects. +type Stack struct { + data []uint256.Int +} + +func newstack() *Stack { + return stackPool.Get().(*Stack) +} + +func returnStack(s *Stack) { + s.data = s.data[:0] + stackPool.Put(s) +} + +// Data returns the underlying uint256.Int array. +func (st *Stack) Data() []uint256.Int { + return st.data +} + +func (st *Stack) push(d *uint256.Int) { + // NOTE push limit (1024) is checked in baseCheck + st.data = append(st.data, *d) +} + +func (st *Stack) pop() (ret uint256.Int) { + ret = st.data[len(st.data)-1] + st.data = st.data[:len(st.data)-1] + return +} + +func (st *Stack) len() int { + return len(st.data) +} + +func (st *Stack) swap(n int) { + st.data[st.len()-n], st.data[st.len()-1] = st.data[st.len()-1], st.data[st.len()-n] +} + +func (st *Stack) dup(n int) { + st.push(&st.data[st.len()-n]) +} + +func (st *Stack) peek() *uint256.Int { + return &st.data[st.len()-1] +} + +// Back returns the n'th item in stack +func (st *Stack) Back(n int) *uint256.Int { + return &st.data[st.len()-n-1] +} diff --git a/x/evm/vm/stack_table.go b/x/evm/vm/stack_table.go new file mode 100644 index 00000000..10c12901 --- /dev/null +++ b/x/evm/vm/stack_table.go @@ -0,0 +1,42 @@ +// Copyright 2017 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package vm + +import ( + "github.com/ethereum/go-ethereum/params" +) + +func minSwapStack(n int) int { + return minStack(n, n) +} +func maxSwapStack(n int) int { + return maxStack(n, n) +} + +func minDupStack(n int) int { + return minStack(n, n+1) +} +func maxDupStack(n int) int { + return maxStack(n, n+1) +} + +func maxStack(pop, push int) int { + return int(params.StackLimit) + pop - push +} +func minStack(pops, push int) int { + return pops +} diff --git a/x/evm/vm/verifier.go b/x/evm/vm/verifier.go new file mode 100644 index 00000000..5d92ce32 --- /dev/null +++ b/x/evm/vm/verifier.go @@ -0,0 +1,39 @@ +package vm + +type VerifiedContract interface { + GetHeight() uint64 + GetAddress() string + GetBin() string + GetInit() string +} + +type GenesisContractVerifier struct { + applyState map[uint64][]VerifiedContract + verifiedAddresses map[string]bool +} + +func NewGenesisContractVerifier() *GenesisContractVerifier { + return &GenesisContractVerifier{ + applyState: make(map[uint64][]VerifiedContract), + verifiedAddresses: map[string]bool{}, + } +} + +func (gcv *GenesisContractVerifier) GetContracts(height uint64) []VerifiedContract { + return gcv.applyState[height] +} + +func (gcv *GenesisContractVerifier) AddContract(contract VerifiedContract, trusted bool) { + gcv.applyState[contract.GetHeight()] = append(gcv.applyState[contract.GetHeight()], contract) + if trusted { + gcv.AddTrustedAddress(contract.GetAddress()) + } +} + +func (gcv *GenesisContractVerifier) AddTrustedAddress(addr string) { + gcv.verifiedAddresses[addr] = true +} + +func (gcv *GenesisContractVerifier) IsTrustedAddress(addr string) bool { + return gcv.verifiedAddresses[addr] +} diff --git a/x/register/keeper/store.go b/x/register/keeper/store.go index 5578b5b0..238dcb47 100644 --- a/x/register/keeper/store.go +++ b/x/register/keeper/store.go @@ -1,6 +1,7 @@ package keeper import ( + "fmt" "time" sdk "github.com/cosmos/cosmos-sdk/types" @@ -45,6 +46,25 @@ func (k Keeper) GetRemainingOzoneLimit(ctx sdk.Context) (value sdk.Int) { return } +func (k *Keeper) CalculatePurchaseAmount(ctx sdk.Context, amount sdk.Int) (sdk.Int, sdk.Int, error) { + St := k.GetEffectiveTotalStake(ctx) + Pt := k.GetTotalUnissuedPrepay(ctx).Amount + Lt := k.GetRemainingOzoneLimit(ctx) + + purchase := Lt.ToDec(). + Mul(amount.ToDec()). + Quo((St. + Add(Pt). + Add(amount)).ToDec()). + TruncateInt() + if purchase.GT(Lt) { + return sdk.NewInt(0), sdk.NewInt(0), fmt.Errorf("not enough remaining ozone limit to complete prepay") + } + remaining := Lt.Sub(purchase) + + return purchase, remaining, nil +} + func (k Keeper) IsUnbondable(ctx sdk.Context, unbondAmt sdk.Int) bool { remaining := k.GetRemainingOzoneLimit(ctx) stakeNozRate := k.GetStakeNozRate(ctx) diff --git a/x/register/keeper/store_new.go b/x/register/keeper/store_new.go new file mode 100644 index 00000000..9396e550 --- /dev/null +++ b/x/register/keeper/store_new.go @@ -0,0 +1,35 @@ +package keeper + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/stratosnet/stratos-chain/core/statedb" + stratos "github.com/stratosnet/stratos-chain/types" + "github.com/stratosnet/stratos-chain/x/register/types" +) + +func (k *Keeper) KeeGetEffectiveTotalStake(kstatedb *statedb.KeestateDB) (stake sdk.Int) { + bz := kstatedb.GetState(k.storeKey, types.EffectiveGenesisStakeTotalKey) + if bz == nil { + return sdk.ZeroInt() + } + intValue := stratos.Int{} + k.cdc.MustUnmarshalLengthPrefixed(bz, &intValue) + stake = *intValue.Value + return +} + +func (k *Keeper) KeeGetRemainingOzoneLimit(kstatedb *statedb.KeestateDB) (value sdk.Int) { + bz := kstatedb.GetState(k.storeKey, types.UpperBoundOfTotalOzoneKey) + if bz == nil { + return sdk.ZeroInt() + } + intVal := stratos.Int{} + k.cdc.MustUnmarshalLengthPrefixed(bz, &intVal) + value = *intVal.Value + return +} + +func (k *Keeper) KeeSetRemainingOzoneLimit(kstatedb *statedb.KeestateDB, value sdk.Int) { + bz := k.cdc.MustMarshalLengthPrefixed(&stratos.Int{Value: &value}) + kstatedb.SetState(k.storeKey, types.UpperBoundOfTotalOzoneKey, bz) +} diff --git a/x/sds/keeper/keeper.go b/x/sds/keeper/keeper.go index 0e70f093..fe9ae24f 100644 --- a/x/sds/keeper/keeper.go +++ b/x/sds/keeper/keeper.go @@ -1,7 +1,6 @@ package keeper import ( - "errors" "fmt" "github.com/kelindar/bitmap" @@ -15,12 +14,15 @@ import ( paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" stratos "github.com/stratosnet/stratos-chain/types" + evmtypes "github.com/stratosnet/stratos-chain/x/evm/types" potKeeper "github.com/stratosnet/stratos-chain/x/pot/keeper" registerKeeper "github.com/stratosnet/stratos-chain/x/register/keeper" registertypes "github.com/stratosnet/stratos-chain/x/register/types" "github.com/stratosnet/stratos-chain/x/sds/types" ) +var _ evmtypes.SdsKeeper = &Keeper{} + // Keeper encodes/decodes files using the go-amino (binary) // encoding/decoding library. type Keeper struct { @@ -88,29 +90,18 @@ func (k Keeper) FileUpload(ctx sdk.Context, fileHash string, reporter stratos.Sd // [X] is the total amount of STOS token prepaid by user at time t // the total amount of Ozone the user gets = Lt * X / (S + Pt + X) func (k Keeper) purchaseNozAndSubCoins(ctx sdk.Context, from sdk.AccAddress, amount sdk.Int) (sdk.Int, error) { - St := k.registerKeeper.GetEffectiveTotalStake(ctx) - Pt := k.registerKeeper.GetTotalUnissuedPrepay(ctx).Amount - Lt := k.registerKeeper.GetRemainingOzoneLimit(ctx) - - purchased := Lt.ToDec(). - Mul(amount.ToDec()). - Quo((St. - Add(Pt). - Add(amount)).ToDec()). - TruncateInt() - - if purchased.GT(Lt) { - return sdk.ZeroInt(), errors.New("not enough remaining ozone limit to complete prepay") + purchased, newRemainingOzoneLimit, err := k.registerKeeper.CalculatePurchaseAmount(ctx, amount) + if err != nil { + return sdk.ZeroInt(), err } // send coins to total unissued prepay pool prepayAmt := sdk.NewCoin(k.BondDenom(ctx), amount) - err := k.bankKeeper.SendCoinsFromAccountToModule(ctx, from, registertypes.TotalUnissuedPrepay, sdk.NewCoins(prepayAmt)) + err = k.bankKeeper.SendCoinsFromAccountToModule(ctx, from, registertypes.TotalUnissuedPrepay, sdk.NewCoins(prepayAmt)) if err != nil { return sdk.ZeroInt(), err } // update remaining noz limit - newRemainingOzoneLimit := Lt.Sub(purchased) k.registerKeeper.SetRemainingOzoneLimit(ctx, newRemainingOzoneLimit) return purchased, nil diff --git a/yarn.lock b/yarn.lock new file mode 100644 index 00000000..698a002d --- /dev/null +++ b/yarn.lock @@ -0,0 +1,7594 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@babel/runtime@^7.4.4": + version "7.21.5" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.21.5.tgz#8492dddda9644ae3bda3b45eabe87382caee7200" + integrity sha512-8jI69toZqqcsnqGGqwGS4Qb1VwLOEp4hz+CXPywcvjs60u3B4Pom/U/7rm4W8tMOYEB+E9wgD0mW1l3r8qlI9Q== + dependencies: + regenerator-runtime "^0.13.11" + +"@chainsafe/as-sha256@^0.3.1": + version "0.3.1" + resolved "https://registry.yarnpkg.com/@chainsafe/as-sha256/-/as-sha256-0.3.1.tgz#3639df0e1435cab03f4d9870cc3ac079e57a6fc9" + integrity sha512-hldFFYuf49ed7DAakWVXSJODuq3pzJEguD8tQ7h+sGkM18vja+OFoJI9krnGmgzyuZC2ETX0NOIcCTy31v2Mtg== + +"@chainsafe/persistent-merkle-tree@^0.4.2": + version "0.4.2" + resolved "https://registry.yarnpkg.com/@chainsafe/persistent-merkle-tree/-/persistent-merkle-tree-0.4.2.tgz#4c9ee80cc57cd3be7208d98c40014ad38f36f7ff" + integrity sha512-lLO3ihKPngXLTus/L7WHKaw9PnNJWizlOF1H9NNzHP6Xvh82vzg9F2bzkXhYIFshMZ2gTCEz8tq6STe7r5NDfQ== + dependencies: + "@chainsafe/as-sha256" "^0.3.1" + +"@chainsafe/persistent-merkle-tree@^0.5.0": + version "0.5.0" + resolved "https://registry.yarnpkg.com/@chainsafe/persistent-merkle-tree/-/persistent-merkle-tree-0.5.0.tgz#2b4a62c9489a5739dedd197250d8d2f5427e9f63" + integrity sha512-l0V1b5clxA3iwQLXP40zYjyZYospQLZXzBVIhhr9kDg/1qHZfzzHw0jj4VPBijfYCArZDlPkRi1wZaV2POKeuw== + dependencies: + "@chainsafe/as-sha256" "^0.3.1" + +"@chainsafe/ssz@^0.10.0": + version "0.10.2" + resolved "https://registry.yarnpkg.com/@chainsafe/ssz/-/ssz-0.10.2.tgz#c782929e1bb25fec66ba72e75934b31fd087579e" + integrity sha512-/NL3Lh8K+0q7A3LsiFq09YXS9fPE+ead2rr7vM2QK8PLzrNsw3uqrif9bpRX5UxgeRjM+vYi+boCM3+GM4ovXg== + dependencies: + "@chainsafe/as-sha256" "^0.3.1" + "@chainsafe/persistent-merkle-tree" "^0.5.0" + +"@chainsafe/ssz@^0.9.2": + version "0.9.4" + resolved "https://registry.yarnpkg.com/@chainsafe/ssz/-/ssz-0.9.4.tgz#696a8db46d6975b600f8309ad3a12f7c0e310497" + integrity sha512-77Qtg2N1ayqs4Bg/wvnWfg5Bta7iy7IRh8XqXh7oNMeP2HBbBwx8m6yTpA8p0EHItWPEBkgZd5S5/LSlp3GXuQ== + dependencies: + "@chainsafe/as-sha256" "^0.3.1" + "@chainsafe/persistent-merkle-tree" "^0.4.2" + case "^1.6.3" + +"@cspotcode/source-map-support@^0.8.0": + version "0.8.1" + resolved "https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz#00629c35a688e05a88b1cda684fb9d5e73f000a1" + integrity sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw== + dependencies: + "@jridgewell/trace-mapping" "0.3.9" + +"@ensdomains/address-encoder@^0.1.7": + version "0.1.9" + resolved "https://registry.yarnpkg.com/@ensdomains/address-encoder/-/address-encoder-0.1.9.tgz#f948c485443d9ef7ed2c0c4790e931c33334d02d" + integrity sha512-E2d2gP4uxJQnDu2Kfg1tHNspefzbLT8Tyjrm5sEuim32UkU2sm5xL4VXtgc2X33fmPEw9+jUMpGs4veMbf+PYg== + dependencies: + bech32 "^1.1.3" + blakejs "^1.1.0" + bn.js "^4.11.8" + bs58 "^4.0.1" + crypto-addr-codec "^0.1.7" + nano-base32 "^1.0.1" + ripemd160 "^2.0.2" + +"@ensdomains/ens@0.4.5": + version "0.4.5" + resolved "https://registry.yarnpkg.com/@ensdomains/ens/-/ens-0.4.5.tgz#e0aebc005afdc066447c6e22feb4eda89a5edbfc" + integrity sha512-JSvpj1iNMFjK6K+uVl4unqMoa9rf5jopb8cya5UGBWz23Nw8hSNT7efgUx4BTlAPAgpNlEioUfeTyQ6J9ZvTVw== + dependencies: + bluebird "^3.5.2" + eth-ens-namehash "^2.0.8" + solc "^0.4.20" + testrpc "0.0.1" + web3-utils "^1.0.0-beta.31" + +"@ensdomains/ensjs@^2.1.0": + version "2.1.0" + resolved "https://registry.yarnpkg.com/@ensdomains/ensjs/-/ensjs-2.1.0.tgz#0a7296c1f3d735ef019320d863a7846a0760c460" + integrity sha512-GRbGPT8Z/OJMDuxs75U/jUNEC0tbL0aj7/L/QQznGYKm/tiasp+ndLOaoULy9kKJFC0TBByqfFliEHDgoLhyog== + dependencies: + "@babel/runtime" "^7.4.4" + "@ensdomains/address-encoder" "^0.1.7" + "@ensdomains/ens" "0.4.5" + "@ensdomains/resolver" "0.2.4" + content-hash "^2.5.2" + eth-ens-namehash "^2.0.8" + ethers "^5.0.13" + js-sha3 "^0.8.0" + +"@ensdomains/resolver@0.2.4": + version "0.2.4" + resolved "https://registry.yarnpkg.com/@ensdomains/resolver/-/resolver-0.2.4.tgz#c10fe28bf5efbf49bff4666d909aed0265efbc89" + integrity sha512-bvaTH34PMCbv6anRa9I/0zjLJgY4EuznbEMgbV77JBCQ9KNC46rzi0avuxpOfu+xDjPEtSFGqVEOr5GlUSGudA== + +"@ethereumjs/common@2.5.0": + version "2.5.0" + resolved "https://registry.yarnpkg.com/@ethereumjs/common/-/common-2.5.0.tgz#ec61551b31bef7a69d1dc634d8932468866a4268" + integrity sha512-DEHjW6e38o+JmB/NO3GZBpW4lpaiBpkFgXF6jLcJ6gETBYpEyaA5nTimsWBUJR3Vmtm/didUEbNjajskugZORg== + dependencies: + crc-32 "^1.2.0" + ethereumjs-util "^7.1.1" + +"@ethereumjs/common@^2.5.0": + version "2.6.5" + resolved "https://registry.yarnpkg.com/@ethereumjs/common/-/common-2.6.5.tgz#0a75a22a046272579d91919cb12d84f2756e8d30" + integrity sha512-lRyVQOeCDaIVtgfbowla32pzeDv2Obr8oR8Put5RdUBNRGr1VGPGQNGP6elWIpgK3YdpzqTOh4GyUGOureVeeA== + dependencies: + crc-32 "^1.2.0" + ethereumjs-util "^7.1.5" + +"@ethereumjs/tx@3.3.2": + version "3.3.2" + resolved "https://registry.yarnpkg.com/@ethereumjs/tx/-/tx-3.3.2.tgz#348d4624bf248aaab6c44fec2ae67265efe3db00" + integrity sha512-6AaJhwg4ucmwTvw/1qLaZUX5miWrwZ4nLOUsKyb/HtzS3BMw/CasKhdi1ims9mBKeK9sOJCH4qGKOBGyJCeeog== + dependencies: + "@ethereumjs/common" "^2.5.0" + ethereumjs-util "^7.1.2" + +"@ethersproject/abi@5.7.0", "@ethersproject/abi@^5.0.0-beta.146", "@ethersproject/abi@^5.0.9", "@ethersproject/abi@^5.1.2", "@ethersproject/abi@^5.4.7", "@ethersproject/abi@^5.6.3", "@ethersproject/abi@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/abi/-/abi-5.7.0.tgz#b3f3e045bbbeed1af3947335c247ad625a44e449" + integrity sha512-351ktp42TiRcYB3H1OP8yajPeAQstMW/yCFokj/AthP9bLHzQFPlOrxOcwYEDkUAICmOHljvN4K39OMTMUa9RA== + dependencies: + "@ethersproject/address" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/hash" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + +"@ethersproject/abstract-provider@5.7.0", "@ethersproject/abstract-provider@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/abstract-provider/-/abstract-provider-5.7.0.tgz#b0a8550f88b6bf9d51f90e4795d48294630cb9ef" + integrity sha512-R41c9UkchKCpAqStMYUpdunjo3pkEvZC3FAwZn5S5MGbXoMQOHIdHItezTETxAO5bevtMApSyEhn9+CHcDsWBw== + dependencies: + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/networks" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/transactions" "^5.7.0" + "@ethersproject/web" "^5.7.0" + +"@ethersproject/abstract-signer@5.7.0", "@ethersproject/abstract-signer@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/abstract-signer/-/abstract-signer-5.7.0.tgz#13f4f32117868452191a4649723cb086d2b596b2" + integrity sha512-a16V8bq1/Cz+TGCkE2OPMTOUDLS3grCpdjoJCYNnVBbdYEMSgKrU0+B90s8b6H+ByYTBZN7a3g76jdIJi7UfKQ== + dependencies: + "@ethersproject/abstract-provider" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + +"@ethersproject/address@5.7.0", "@ethersproject/address@^5.0.2", "@ethersproject/address@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/address/-/address-5.7.0.tgz#19b56c4d74a3b0a46bfdbb6cfcc0a153fc697f37" + integrity sha512-9wYhYt7aghVGo758POM5nqcOMaE168Q6aRLJZwUmiqSrAungkG74gSSeKEIR7ukixesdRZGPgVqme6vmxs1fkA== + dependencies: + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/rlp" "^5.7.0" + +"@ethersproject/base64@5.7.0", "@ethersproject/base64@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/base64/-/base64-5.7.0.tgz#ac4ee92aa36c1628173e221d0d01f53692059e1c" + integrity sha512-Dr8tcHt2mEbsZr/mwTPIQAf3Ai0Bks/7gTw9dSqk1mQvhW3XvRlmDJr/4n+wg1JmCl16NZue17CDh8xb/vZ0sQ== + dependencies: + "@ethersproject/bytes" "^5.7.0" + +"@ethersproject/basex@5.7.0", "@ethersproject/basex@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/basex/-/basex-5.7.0.tgz#97034dc7e8938a8ca943ab20f8a5e492ece4020b" + integrity sha512-ywlh43GwZLv2Voc2gQVTKBoVQ1mti3d8HK5aMxsfu/nRDnMmNqaSJ3r3n85HBByT8OpoY96SXM1FogC533T4zw== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + +"@ethersproject/bignumber@5.7.0", "@ethersproject/bignumber@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/bignumber/-/bignumber-5.7.0.tgz#e2f03837f268ba655ffba03a57853e18a18dc9c2" + integrity sha512-n1CAdIHRWjSucQO3MC1zPSVgV/6dy/fjL9pMrPP9peL+QxEg9wOsVqwD4+818B6LUEtaXzVHQiuivzRoxPxUGw== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + bn.js "^5.2.1" + +"@ethersproject/bytes@5.7.0", "@ethersproject/bytes@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/bytes/-/bytes-5.7.0.tgz#a00f6ea8d7e7534d6d87f47188af1148d71f155d" + integrity sha512-nsbxwgFXWh9NyYWo+U8atvmMsSdKJprTcICAkvbBffT75qDocbuggBU0SJiVK2MuTrp0q+xvLkTnGMPK1+uA9A== + dependencies: + "@ethersproject/logger" "^5.7.0" + +"@ethersproject/constants@5.7.0", "@ethersproject/constants@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/constants/-/constants-5.7.0.tgz#df80a9705a7e08984161f09014ea012d1c75295e" + integrity sha512-DHI+y5dBNvkpYUMiRQyxRBYBefZkJfo70VUkUAsRjcPs47muV9evftfZ0PJVCXYbAiCgght0DtcF9srFQmIgWA== + dependencies: + "@ethersproject/bignumber" "^5.7.0" + +"@ethersproject/contracts@5.7.0", "@ethersproject/contracts@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/contracts/-/contracts-5.7.0.tgz#c305e775abd07e48aa590e1a877ed5c316f8bd1e" + integrity sha512-5GJbzEU3X+d33CdfPhcyS+z8MzsTrBGk/sc+G+59+tPa9yFkl6HQ9D6L0QMgNTA9q8dT0XKxxkyp883XsQvbbg== + dependencies: + "@ethersproject/abi" "^5.7.0" + "@ethersproject/abstract-provider" "^5.7.0" + "@ethersproject/abstract-signer" "^5.7.0" + "@ethersproject/address" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/transactions" "^5.7.0" + +"@ethersproject/hash@5.7.0", "@ethersproject/hash@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/hash/-/hash-5.7.0.tgz#eb7aca84a588508369562e16e514b539ba5240a7" + integrity sha512-qX5WrQfnah1EFnO5zJv1v46a8HW0+E5xuBBDTwMFZLuVTx0tbU2kkx15NqdjxecrLGatQN9FGQKpb1FKdHCt+g== + dependencies: + "@ethersproject/abstract-signer" "^5.7.0" + "@ethersproject/address" "^5.7.0" + "@ethersproject/base64" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + +"@ethersproject/hdnode@5.7.0", "@ethersproject/hdnode@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/hdnode/-/hdnode-5.7.0.tgz#e627ddc6b466bc77aebf1a6b9e47405ca5aef9cf" + integrity sha512-OmyYo9EENBPPf4ERhR7oj6uAtUAhYGqOnIS+jE5pTXvdKBS99ikzq1E7Iv0ZQZ5V36Lqx1qZLeak0Ra16qpeOg== + dependencies: + "@ethersproject/abstract-signer" "^5.7.0" + "@ethersproject/basex" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/pbkdf2" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/sha2" "^5.7.0" + "@ethersproject/signing-key" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + "@ethersproject/transactions" "^5.7.0" + "@ethersproject/wordlists" "^5.7.0" + +"@ethersproject/json-wallets@5.7.0", "@ethersproject/json-wallets@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/json-wallets/-/json-wallets-5.7.0.tgz#5e3355287b548c32b368d91014919ebebddd5360" + integrity sha512-8oee5Xgu6+RKgJTkvEMl2wDgSPSAQ9MB/3JYjFV9jlKvcYHUXZC+cQp0njgmxdHkYWn8s6/IqIZYm0YWCjO/0g== + dependencies: + "@ethersproject/abstract-signer" "^5.7.0" + "@ethersproject/address" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/hdnode" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/pbkdf2" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/random" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + "@ethersproject/transactions" "^5.7.0" + aes-js "3.0.0" + scrypt-js "3.0.1" + +"@ethersproject/keccak256@5.7.0", "@ethersproject/keccak256@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/keccak256/-/keccak256-5.7.0.tgz#3186350c6e1cd6aba7940384ec7d6d9db01f335a" + integrity sha512-2UcPboeL/iW+pSg6vZ6ydF8tCnv3Iu/8tUmLLzWWGzxWKFFqOBQFLo6uLUv6BDrLgCDfN28RJ/wtByx+jZ4KBg== + dependencies: + "@ethersproject/bytes" "^5.7.0" + js-sha3 "0.8.0" + +"@ethersproject/logger@5.7.0", "@ethersproject/logger@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.7.0.tgz#6ce9ae168e74fecf287be17062b590852c311892" + integrity sha512-0odtFdXu/XHtjQXJYA3u9G0G8btm0ND5Cu8M7i5vhEcE8/HmF4Lbdqanwyv4uQTr2tx6b7fQRmgLrsnpQlmnig== + +"@ethersproject/networks@5.7.1", "@ethersproject/networks@^5.7.0": + version "5.7.1" + resolved "https://registry.yarnpkg.com/@ethersproject/networks/-/networks-5.7.1.tgz#118e1a981d757d45ccea6bb58d9fd3d9db14ead6" + integrity sha512-n/MufjFYv3yFcUyfhnXotyDlNdFb7onmkSy8aQERi2PjNcnWQ66xXxa3XlS8nCcA8aJKJjIIMNJTC7tu80GwpQ== + dependencies: + "@ethersproject/logger" "^5.7.0" + +"@ethersproject/pbkdf2@5.7.0", "@ethersproject/pbkdf2@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/pbkdf2/-/pbkdf2-5.7.0.tgz#d2267d0a1f6e123f3771007338c47cccd83d3102" + integrity sha512-oR/dBRZR6GTyaofd86DehG72hY6NpAjhabkhxgr3X2FpJtJuodEl2auADWBZfhDHgVCbu3/H/Ocq2uC6dpNjjw== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/sha2" "^5.7.0" + +"@ethersproject/properties@5.7.0", "@ethersproject/properties@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/properties/-/properties-5.7.0.tgz#a6e12cb0439b878aaf470f1902a176033067ed30" + integrity sha512-J87jy8suntrAkIZtecpxEPxY//szqr1mlBaYlQ0r4RCaiD2hjheqF9s1LVE8vVuJCXisjIP+JgtK/Do54ej4Sw== + dependencies: + "@ethersproject/logger" "^5.7.0" + +"@ethersproject/providers@5.7.2", "@ethersproject/providers@^5.4.7", "@ethersproject/providers@^5.7.1", "@ethersproject/providers@^5.7.2": + version "5.7.2" + resolved "https://registry.yarnpkg.com/@ethersproject/providers/-/providers-5.7.2.tgz#f8b1a4f275d7ce58cf0a2eec222269a08beb18cb" + integrity sha512-g34EWZ1WWAVgr4aptGlVBF8mhl3VWjv+8hoAnzStu8Ah22VHBsuGzP17eb6xDVRzw895G4W7vvx60lFFur/1Rg== + dependencies: + "@ethersproject/abstract-provider" "^5.7.0" + "@ethersproject/abstract-signer" "^5.7.0" + "@ethersproject/address" "^5.7.0" + "@ethersproject/base64" "^5.7.0" + "@ethersproject/basex" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/hash" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/networks" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/random" "^5.7.0" + "@ethersproject/rlp" "^5.7.0" + "@ethersproject/sha2" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + "@ethersproject/transactions" "^5.7.0" + "@ethersproject/web" "^5.7.0" + bech32 "1.1.4" + ws "7.4.6" + +"@ethersproject/random@5.7.0", "@ethersproject/random@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/random/-/random-5.7.0.tgz#af19dcbc2484aae078bb03656ec05df66253280c" + integrity sha512-19WjScqRA8IIeWclFme75VMXSBvi4e6InrUNuaR4s5pTF2qNhcGdCUwdxUVGtDDqC00sDLCO93jPQoDUH4HVmQ== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + +"@ethersproject/rlp@5.7.0", "@ethersproject/rlp@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/rlp/-/rlp-5.7.0.tgz#de39e4d5918b9d74d46de93af80b7685a9c21304" + integrity sha512-rBxzX2vK8mVF7b0Tol44t5Tb8gomOHkj5guL+HhzQ1yBh/ydjGnpw6at+X6Iw0Kp3OzzzkcKp8N9r0W4kYSs9w== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + +"@ethersproject/sha2@5.7.0", "@ethersproject/sha2@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/sha2/-/sha2-5.7.0.tgz#9a5f7a7824ef784f7f7680984e593a800480c9fb" + integrity sha512-gKlH42riwb3KYp0reLsFTokByAKoJdgFCwI+CCiX/k+Jm2mbNs6oOaCjYQSlI1+XBVejwH2KrmCbMAT/GnRDQw== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + hash.js "1.1.7" + +"@ethersproject/signing-key@5.7.0", "@ethersproject/signing-key@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/signing-key/-/signing-key-5.7.0.tgz#06b2df39411b00bc57c7c09b01d1e41cf1b16ab3" + integrity sha512-MZdy2nL3wO0u7gkB4nA/pEf8lu1TlFswPNmy8AiYkfKTdO6eXBJyUdmHO/ehm/htHw9K/qF8ujnTyUAD+Ry54Q== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + bn.js "^5.2.1" + elliptic "6.5.4" + hash.js "1.1.7" + +"@ethersproject/solidity@5.7.0", "@ethersproject/solidity@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/solidity/-/solidity-5.7.0.tgz#5e9c911d8a2acce2a5ebb48a5e2e0af20b631cb8" + integrity sha512-HmabMd2Dt/raavyaGukF4XxizWKhKQ24DoLtdNbBmNKUOPqwjsKQSdV9GQtj9CBEea9DlzETlVER1gYeXXBGaA== + dependencies: + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/sha2" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + +"@ethersproject/strings@5.7.0", "@ethersproject/strings@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/strings/-/strings-5.7.0.tgz#54c9d2a7c57ae8f1205c88a9d3a56471e14d5ed2" + integrity sha512-/9nu+lj0YswRNSH0NXYqrh8775XNyEdUQAuf3f+SmOrnVewcJ5SBNAjF7lpgehKi4abvNNXyf+HX86czCdJ8Mg== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + +"@ethersproject/transactions@5.7.0", "@ethersproject/transactions@^5.6.2", "@ethersproject/transactions@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/transactions/-/transactions-5.7.0.tgz#91318fc24063e057885a6af13fdb703e1f993d3b" + integrity sha512-kmcNicCp1lp8qanMTC3RIikGgoJ80ztTyvtsFvCYpSCfkjhD0jZ2LOrnbcuxuToLIUYYf+4XwD1rP+B/erDIhQ== + dependencies: + "@ethersproject/address" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/rlp" "^5.7.0" + "@ethersproject/signing-key" "^5.7.0" + +"@ethersproject/units@5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/units/-/units-5.7.0.tgz#637b563d7e14f42deeee39245275d477aae1d8b1" + integrity sha512-pD3xLMy3SJu9kG5xDGI7+xhTEmGXlEqXU4OfNapmfnxLVY4EMSSRp7j1k7eezutBPH7RBN/7QPnwR7hzNlEFeg== + dependencies: + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + +"@ethersproject/wallet@5.7.0", "@ethersproject/wallet@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/wallet/-/wallet-5.7.0.tgz#4e5d0790d96fe21d61d38fb40324e6c7ef350b2d" + integrity sha512-MhmXlJXEJFBFVKrDLB4ZdDzxcBxQ3rLyCkhNqVu3CDYvR97E+8r01UgrI+TI99Le+aYm/in/0vp86guJuM7FCA== + dependencies: + "@ethersproject/abstract-provider" "^5.7.0" + "@ethersproject/abstract-signer" "^5.7.0" + "@ethersproject/address" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/hash" "^5.7.0" + "@ethersproject/hdnode" "^5.7.0" + "@ethersproject/json-wallets" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/random" "^5.7.0" + "@ethersproject/signing-key" "^5.7.0" + "@ethersproject/transactions" "^5.7.0" + "@ethersproject/wordlists" "^5.7.0" + +"@ethersproject/web@5.7.1", "@ethersproject/web@^5.7.0": + version "5.7.1" + resolved "https://registry.yarnpkg.com/@ethersproject/web/-/web-5.7.1.tgz#de1f285b373149bee5928f4eb7bcb87ee5fbb4ae" + integrity sha512-Gueu8lSvyjBWL4cYsWsjh6MtMwM0+H4HvqFPZfB6dV8ctbP9zFAO73VG1cMWae0FLPCtz0peKPpZY8/ugJJX2w== + dependencies: + "@ethersproject/base64" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + +"@ethersproject/wordlists@5.7.0", "@ethersproject/wordlists@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/wordlists/-/wordlists-5.7.0.tgz#8fb2c07185d68c3e09eb3bfd6e779ba2774627f5" + integrity sha512-S2TFNJNfHWVHNE6cNDjbVlZ6MgE17MIxMbMg2zv3wn+3XSJGosL1m9ZVv3GXCf/2ymSsQ+hRI5IzoMJTG6aoVA== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/hash" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + +"@fvictorio/tabtab@^0.0.3": + version "0.0.3" + resolved "https://registry.yarnpkg.com/@fvictorio/tabtab/-/tabtab-0.0.3.tgz#1b97981424386490fa2a5818706d2afd1f6e4659" + integrity sha512-bT/BSy8MJThrTebqTCjXRnGSgZWthHLigZ4k2AvfNtC79vPyBS1myaxw8gRU6RxIcdDD3HBtm7pOsOoyC086Zg== + dependencies: + debug "^4.1.1" + enquirer "^2.3.4" + minimist "^1.2.0" + mkdirp "^1.0.3" + untildify "^4.0.0" + +"@jridgewell/resolve-uri@^3.0.3": + version "3.1.1" + resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz#c08679063f279615a3326583ba3a90d1d82cc721" + integrity sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA== + +"@jridgewell/sourcemap-codec@^1.4.10": + version "1.4.15" + resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32" + integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== + +"@jridgewell/trace-mapping@0.3.9": + version "0.3.9" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz#6534fd5933a53ba7cbf3a17615e273a0d1273ff9" + integrity sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ== + dependencies: + "@jridgewell/resolve-uri" "^3.0.3" + "@jridgewell/sourcemap-codec" "^1.4.10" + +"@metamask/eth-sig-util@^4.0.0": + version "4.0.1" + resolved "https://registry.yarnpkg.com/@metamask/eth-sig-util/-/eth-sig-util-4.0.1.tgz#3ad61f6ea9ad73ba5b19db780d40d9aae5157088" + integrity sha512-tghyZKLHZjcdlDqCA3gNZmLeR0XvOE9U1qoQO9ohyAZT6Pya+H9vkBPcsyXytmYLNgVoin7CKCmweo/R43V+tQ== + dependencies: + ethereumjs-abi "^0.6.8" + ethereumjs-util "^6.2.1" + ethjs-util "^0.1.6" + tweetnacl "^1.0.3" + tweetnacl-util "^0.15.1" + +"@morgan-stanley/ts-mocking-bird@^0.6.2": + version "0.6.4" + resolved "https://registry.yarnpkg.com/@morgan-stanley/ts-mocking-bird/-/ts-mocking-bird-0.6.4.tgz#2e4b60d42957bab3b50b67dbf14c3da2f62a39f7" + integrity sha512-57VJIflP8eR2xXa9cD1LUawh+Gh+BVQfVu0n6GALyg/AqV/Nz25kDRvws3i9kIe1PTrbsZZOYpsYp6bXPd6nVA== + dependencies: + lodash "^4.17.16" + uuid "^7.0.3" + +"@noble/hashes@1.2.0", "@noble/hashes@~1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.2.0.tgz#a3150eeb09cc7ab207ebf6d7b9ad311a9bdbed12" + integrity sha512-FZfhjEDbT5GRswV3C6uvLPHMiVD6lQBmpoX5+eSiPaMTXte/IKqI5dykDxzZB/WBeK/CDuQRBWarPdi3FNY2zQ== + +"@noble/secp256k1@1.7.1", "@noble/secp256k1@~1.7.0": + version "1.7.1" + resolved "https://registry.yarnpkg.com/@noble/secp256k1/-/secp256k1-1.7.1.tgz#b251c70f824ce3ca7f8dc3df08d58f005cc0507c" + integrity sha512-hOUk6AyBFmqVrv7k5WAw/LpszxVbj9gGN4JRkIX52fdFAj1UA61KXmZDvqVEm+pOyec3+fIeZB02LYa/pWOArw== + +"@nodelib/fs.scandir@2.1.5": + version "2.1.5" + resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" + integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== + dependencies: + "@nodelib/fs.stat" "2.0.5" + run-parallel "^1.1.9" + +"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" + integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== + +"@nodelib/fs.walk@^1.2.3": + version "1.2.8" + resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" + integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== + dependencies: + "@nodelib/fs.scandir" "2.1.5" + fastq "^1.6.0" + +"@nomicfoundation/ethereumjs-block@5.0.1": + version "5.0.1" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-block/-/ethereumjs-block-5.0.1.tgz#6f89664f55febbd723195b6d0974773d29ee133d" + integrity sha512-u1Yioemi6Ckj3xspygu/SfFvm8vZEO8/Yx5a1QLzi6nVU0jz3Pg2OmHKJ5w+D9Ogk1vhwRiqEBAqcb0GVhCyHw== + dependencies: + "@nomicfoundation/ethereumjs-common" "4.0.1" + "@nomicfoundation/ethereumjs-rlp" "5.0.1" + "@nomicfoundation/ethereumjs-trie" "6.0.1" + "@nomicfoundation/ethereumjs-tx" "5.0.1" + "@nomicfoundation/ethereumjs-util" "9.0.1" + ethereum-cryptography "0.1.3" + ethers "^5.7.1" + +"@nomicfoundation/ethereumjs-blockchain@7.0.1": + version "7.0.1" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-blockchain/-/ethereumjs-blockchain-7.0.1.tgz#80e0bd3535bfeb9baa29836b6f25123dab06a726" + integrity sha512-NhzndlGg829XXbqJEYrF1VeZhAwSPgsK/OB7TVrdzft3y918hW5KNd7gIZ85sn6peDZOdjBsAXIpXZ38oBYE5A== + dependencies: + "@nomicfoundation/ethereumjs-block" "5.0.1" + "@nomicfoundation/ethereumjs-common" "4.0.1" + "@nomicfoundation/ethereumjs-ethash" "3.0.1" + "@nomicfoundation/ethereumjs-rlp" "5.0.1" + "@nomicfoundation/ethereumjs-trie" "6.0.1" + "@nomicfoundation/ethereumjs-tx" "5.0.1" + "@nomicfoundation/ethereumjs-util" "9.0.1" + abstract-level "^1.0.3" + debug "^4.3.3" + ethereum-cryptography "0.1.3" + level "^8.0.0" + lru-cache "^5.1.1" + memory-level "^1.0.0" + +"@nomicfoundation/ethereumjs-common@4.0.1": + version "4.0.1" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-common/-/ethereumjs-common-4.0.1.tgz#4702d82df35b07b5407583b54a45bf728e46a2f0" + integrity sha512-OBErlkfp54GpeiE06brBW/TTbtbuBJV5YI5Nz/aB2evTDo+KawyEzPjBlSr84z/8MFfj8wS2wxzQX1o32cev5g== + dependencies: + "@nomicfoundation/ethereumjs-util" "9.0.1" + crc-32 "^1.2.0" + +"@nomicfoundation/ethereumjs-ethash@3.0.1": + version "3.0.1" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-ethash/-/ethereumjs-ethash-3.0.1.tgz#65ca494d53e71e8415c9a49ef48bc921c538fc41" + integrity sha512-KDjGIB5igzWOp8Ik5I6QiRH5DH+XgILlplsHR7TEuWANZA759G6krQ6o8bvj+tRUz08YygMQu/sGd9mJ1DYT8w== + dependencies: + "@nomicfoundation/ethereumjs-block" "5.0.1" + "@nomicfoundation/ethereumjs-rlp" "5.0.1" + "@nomicfoundation/ethereumjs-util" "9.0.1" + abstract-level "^1.0.3" + bigint-crypto-utils "^3.0.23" + ethereum-cryptography "0.1.3" + +"@nomicfoundation/ethereumjs-evm@2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-evm/-/ethereumjs-evm-2.0.1.tgz#f35681e203363f69ce2b3d3bf9f44d4e883ca1f1" + integrity sha512-oL8vJcnk0Bx/onl+TgQOQ1t/534GKFaEG17fZmwtPFeH8S5soiBYPCLUrvANOl4sCp9elYxIMzIiTtMtNNN8EQ== + dependencies: + "@ethersproject/providers" "^5.7.1" + "@nomicfoundation/ethereumjs-common" "4.0.1" + "@nomicfoundation/ethereumjs-tx" "5.0.1" + "@nomicfoundation/ethereumjs-util" "9.0.1" + debug "^4.3.3" + ethereum-cryptography "0.1.3" + mcl-wasm "^0.7.1" + rustbn.js "~0.2.0" + +"@nomicfoundation/ethereumjs-rlp@5.0.1": + version "5.0.1" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-rlp/-/ethereumjs-rlp-5.0.1.tgz#0b30c1cf77d125d390408e391c4bb5291ef43c28" + integrity sha512-xtxrMGa8kP4zF5ApBQBtjlSbN5E2HI8m8FYgVSYAnO6ssUoY5pVPGy2H8+xdf/bmMa22Ce8nWMH3aEW8CcqMeQ== + +"@nomicfoundation/ethereumjs-statemanager@2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-statemanager/-/ethereumjs-statemanager-2.0.1.tgz#8824a97938db4471911e2d2f140f79195def5935" + integrity sha512-B5ApMOnlruVOR7gisBaYwFX+L/AP7i/2oAahatssjPIBVDF6wTX1K7Qpa39E/nzsH8iYuL3krkYeUFIdO3EMUQ== + dependencies: + "@nomicfoundation/ethereumjs-common" "4.0.1" + "@nomicfoundation/ethereumjs-rlp" "5.0.1" + debug "^4.3.3" + ethereum-cryptography "0.1.3" + ethers "^5.7.1" + js-sdsl "^4.1.4" + +"@nomicfoundation/ethereumjs-trie@6.0.1": + version "6.0.1" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-trie/-/ethereumjs-trie-6.0.1.tgz#662c55f6b50659fd4b22ea9f806a7401cafb7717" + integrity sha512-A64It/IMpDVODzCgxDgAAla8jNjNtsoQZIzZUfIV5AY6Coi4nvn7+VReBn5itlxMiL2yaTlQr9TRWp3CSI6VoA== + dependencies: + "@nomicfoundation/ethereumjs-rlp" "5.0.1" + "@nomicfoundation/ethereumjs-util" "9.0.1" + "@types/readable-stream" "^2.3.13" + ethereum-cryptography "0.1.3" + readable-stream "^3.6.0" + +"@nomicfoundation/ethereumjs-tx@5.0.1": + version "5.0.1" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-tx/-/ethereumjs-tx-5.0.1.tgz#7629dc2036b4a33c34e9f0a592b43227ef4f0c7d" + integrity sha512-0HwxUF2u2hrsIM1fsasjXvlbDOq1ZHFV2dd1yGq8CA+MEYhaxZr8OTScpVkkxqMwBcc5y83FyPl0J9MZn3kY0w== + dependencies: + "@chainsafe/ssz" "^0.9.2" + "@ethersproject/providers" "^5.7.2" + "@nomicfoundation/ethereumjs-common" "4.0.1" + "@nomicfoundation/ethereumjs-rlp" "5.0.1" + "@nomicfoundation/ethereumjs-util" "9.0.1" + ethereum-cryptography "0.1.3" + +"@nomicfoundation/ethereumjs-util@9.0.1": + version "9.0.1" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-util/-/ethereumjs-util-9.0.1.tgz#530cda8bae33f8b5020a8f199ed1d0a2ce48ec89" + integrity sha512-TwbhOWQ8QoSCFhV/DDfSmyfFIHjPjFBj957219+V3jTZYZ2rf9PmDtNOeZWAE3p3vlp8xb02XGpd0v6nTUPbsA== + dependencies: + "@chainsafe/ssz" "^0.10.0" + "@nomicfoundation/ethereumjs-rlp" "5.0.1" + ethereum-cryptography "0.1.3" + +"@nomicfoundation/ethereumjs-vm@7.0.1": + version "7.0.1" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-vm/-/ethereumjs-vm-7.0.1.tgz#7d035e0993bcad10716c8b36e61dfb87fa3ca05f" + integrity sha512-rArhyn0jPsS/D+ApFsz3yVJMQ29+pVzNZ0VJgkzAZ+7FqXSRtThl1C1prhmlVr3YNUlfpZ69Ak+RUT4g7VoOuQ== + dependencies: + "@nomicfoundation/ethereumjs-block" "5.0.1" + "@nomicfoundation/ethereumjs-blockchain" "7.0.1" + "@nomicfoundation/ethereumjs-common" "4.0.1" + "@nomicfoundation/ethereumjs-evm" "2.0.1" + "@nomicfoundation/ethereumjs-rlp" "5.0.1" + "@nomicfoundation/ethereumjs-statemanager" "2.0.1" + "@nomicfoundation/ethereumjs-trie" "6.0.1" + "@nomicfoundation/ethereumjs-tx" "5.0.1" + "@nomicfoundation/ethereumjs-util" "9.0.1" + debug "^4.3.3" + ethereum-cryptography "0.1.3" + mcl-wasm "^0.7.1" + rustbn.js "~0.2.0" + +"@nomicfoundation/hardhat-chai-matchers@^1.0.0": + version "1.0.6" + resolved "https://registry.yarnpkg.com/@nomicfoundation/hardhat-chai-matchers/-/hardhat-chai-matchers-1.0.6.tgz#72a2e312e1504ee5dd73fe302932736432ba96bc" + integrity sha512-f5ZMNmabZeZegEfuxn/0kW+mm7+yV7VNDxLpMOMGXWFJ2l/Ct3QShujzDRF9cOkK9Ui/hbDeOWGZqyQALDXVCQ== + dependencies: + "@ethersproject/abi" "^5.1.2" + "@types/chai-as-promised" "^7.1.3" + chai-as-promised "^7.1.1" + deep-eql "^4.0.1" + ordinal "^1.0.3" + +"@nomicfoundation/hardhat-network-helpers@^1.0.0": + version "1.0.8" + resolved "https://registry.yarnpkg.com/@nomicfoundation/hardhat-network-helpers/-/hardhat-network-helpers-1.0.8.tgz#e4fe1be93e8a65508c46d73c41fa26c7e9f84931" + integrity sha512-MNqQbzUJZnCMIYvlniC3U+kcavz/PhhQSsY90tbEtUyMj/IQqsLwIRZa4ctjABh3Bz0KCh9OXUZ7Yk/d9hr45Q== + dependencies: + ethereumjs-util "^7.1.4" + +"@nomicfoundation/hardhat-toolbox@^2.0.0": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@nomicfoundation/hardhat-toolbox/-/hardhat-toolbox-2.0.2.tgz#ec95f23b53cb4e71a1a7091380fa223aad18f156" + integrity sha512-vnN1AzxbvpSx9pfdRHbUzTRIXpMLPXnUlkW855VaDk6N1pwRaQ2gNzEmFAABk4lWf11E00PKwFd/q27HuwYrYg== + +"@nomicfoundation/solidity-analyzer-darwin-arm64@0.1.1": + version "0.1.1" + resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-darwin-arm64/-/solidity-analyzer-darwin-arm64-0.1.1.tgz#4c858096b1c17fe58a474fe81b46815f93645c15" + integrity sha512-KcTodaQw8ivDZyF+D76FokN/HdpgGpfjc/gFCImdLUyqB6eSWVaZPazMbeAjmfhx3R0zm/NYVzxwAokFKgrc0w== + +"@nomicfoundation/solidity-analyzer-darwin-x64@0.1.1": + version "0.1.1" + resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-darwin-x64/-/solidity-analyzer-darwin-x64-0.1.1.tgz#6e25ccdf6e2d22389c35553b64fe6f3fdaec432c" + integrity sha512-XhQG4BaJE6cIbjAVtzGOGbK3sn1BO9W29uhk9J8y8fZF1DYz0Doj8QDMfpMu+A6TjPDs61lbsmeYodIDnfveSA== + +"@nomicfoundation/solidity-analyzer-freebsd-x64@0.1.1": + version "0.1.1" + resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-freebsd-x64/-/solidity-analyzer-freebsd-x64-0.1.1.tgz#0a224ea50317139caeebcdedd435c28a039d169c" + integrity sha512-GHF1VKRdHW3G8CndkwdaeLkVBi5A9u2jwtlS7SLhBc8b5U/GcoL39Q+1CSO3hYqePNP+eV5YI7Zgm0ea6kMHoA== + +"@nomicfoundation/solidity-analyzer-linux-arm64-gnu@0.1.1": + version "0.1.1" + resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-linux-arm64-gnu/-/solidity-analyzer-linux-arm64-gnu-0.1.1.tgz#dfa085d9ffab9efb2e7b383aed3f557f7687ac2b" + integrity sha512-g4Cv2fO37ZsUENQ2vwPnZc2zRenHyAxHcyBjKcjaSmmkKrFr64yvzeNO8S3GBFCo90rfochLs99wFVGT/0owpg== + +"@nomicfoundation/solidity-analyzer-linux-arm64-musl@0.1.1": + version "0.1.1" + resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-linux-arm64-musl/-/solidity-analyzer-linux-arm64-musl-0.1.1.tgz#c9e06b5d513dd3ab02a7ac069c160051675889a4" + integrity sha512-WJ3CE5Oek25OGE3WwzK7oaopY8xMw9Lhb0mlYuJl/maZVo+WtP36XoQTb7bW/i8aAdHW5Z+BqrHMux23pvxG3w== + +"@nomicfoundation/solidity-analyzer-linux-x64-gnu@0.1.1": + version "0.1.1" + resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-linux-x64-gnu/-/solidity-analyzer-linux-x64-gnu-0.1.1.tgz#8d328d16839e52571f72f2998c81e46bf320f893" + integrity sha512-5WN7leSr5fkUBBjE4f3wKENUy9HQStu7HmWqbtknfXkkil+eNWiBV275IOlpXku7v3uLsXTOKpnnGHJYI2qsdA== + +"@nomicfoundation/solidity-analyzer-linux-x64-musl@0.1.1": + version "0.1.1" + resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-linux-x64-musl/-/solidity-analyzer-linux-x64-musl-0.1.1.tgz#9b49d0634b5976bb5ed1604a1e1b736f390959bb" + integrity sha512-KdYMkJOq0SYPQMmErv/63CwGwMm5XHenEna9X9aB8mQmhDBrYrlAOSsIPgFCUSL0hjxE3xHP65/EPXR/InD2+w== + +"@nomicfoundation/solidity-analyzer-win32-arm64-msvc@0.1.1": + version "0.1.1" + resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-win32-arm64-msvc/-/solidity-analyzer-win32-arm64-msvc-0.1.1.tgz#e2867af7264ebbcc3131ef837878955dd6a3676f" + integrity sha512-VFZASBfl4qiBYwW5xeY20exWhmv6ww9sWu/krWSesv3q5hA0o1JuzmPHR4LPN6SUZj5vcqci0O6JOL8BPw+APg== + +"@nomicfoundation/solidity-analyzer-win32-ia32-msvc@0.1.1": + version "0.1.1" + resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-win32-ia32-msvc/-/solidity-analyzer-win32-ia32-msvc-0.1.1.tgz#0685f78608dd516c8cdfb4896ed451317e559585" + integrity sha512-JnFkYuyCSA70j6Si6cS1A9Gh1aHTEb8kOTBApp/c7NRTFGNMH8eaInKlyuuiIbvYFhlXW4LicqyYuWNNq9hkpQ== + +"@nomicfoundation/solidity-analyzer-win32-x64-msvc@0.1.1": + version "0.1.1" + resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-win32-x64-msvc/-/solidity-analyzer-win32-x64-msvc-0.1.1.tgz#c9a44f7108646f083b82e851486e0f6aeb785836" + integrity sha512-HrVJr6+WjIXGnw3Q9u6KQcbZCtk0caVWhCdFADySvRyUxJ8PnzlaP+MhwNE8oyT8OZ6ejHBRrrgjSqDCFXGirw== + +"@nomicfoundation/solidity-analyzer@^0.1.0": + version "0.1.1" + resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer/-/solidity-analyzer-0.1.1.tgz#f5f4d36d3f66752f59a57e7208cd856f3ddf6f2d" + integrity sha512-1LMtXj1puAxyFusBgUIy5pZk3073cNXYnXUpuNKFghHbIit/xZgbk0AokpUADbNm3gyD6bFWl3LRFh3dhVdREg== + optionalDependencies: + "@nomicfoundation/solidity-analyzer-darwin-arm64" "0.1.1" + "@nomicfoundation/solidity-analyzer-darwin-x64" "0.1.1" + "@nomicfoundation/solidity-analyzer-freebsd-x64" "0.1.1" + "@nomicfoundation/solidity-analyzer-linux-arm64-gnu" "0.1.1" + "@nomicfoundation/solidity-analyzer-linux-arm64-musl" "0.1.1" + "@nomicfoundation/solidity-analyzer-linux-x64-gnu" "0.1.1" + "@nomicfoundation/solidity-analyzer-linux-x64-musl" "0.1.1" + "@nomicfoundation/solidity-analyzer-win32-arm64-msvc" "0.1.1" + "@nomicfoundation/solidity-analyzer-win32-ia32-msvc" "0.1.1" + "@nomicfoundation/solidity-analyzer-win32-x64-msvc" "0.1.1" + +"@nomiclabs/hardhat-ethers@npm:hardhat-deploy-ethers": + version "0.3.0-beta.13" + resolved "https://registry.yarnpkg.com/hardhat-deploy-ethers/-/hardhat-deploy-ethers-0.3.0-beta.13.tgz#b96086ff768ddf69928984d5eb0a8d78cfca9366" + integrity sha512-PdWVcKB9coqWV1L7JTpfXRCI91Cgwsm7KLmBcwZ8f0COSm1xtABHZTyz3fvF6p42cTnz1VM0QnfDvMFlIRkSNw== + +"@nomiclabs/hardhat-etherscan@^3.0.0": + version "3.1.7" + resolved "https://registry.yarnpkg.com/@nomiclabs/hardhat-etherscan/-/hardhat-etherscan-3.1.7.tgz#72e3d5bd5d0ceb695e097a7f6f5ff6fcbf062b9a" + integrity sha512-tZ3TvSgpvsQ6B6OGmo1/Au6u8BrAkvs1mIC/eURA3xgIfznUZBhmpne8hv7BXUzw9xNL3fXdpOYgOQlVMTcoHQ== + dependencies: + "@ethersproject/abi" "^5.1.2" + "@ethersproject/address" "^5.0.2" + cbor "^8.1.0" + chalk "^2.4.2" + debug "^4.1.1" + fs-extra "^7.0.1" + lodash "^4.17.11" + semver "^6.3.0" + table "^6.8.0" + undici "^5.14.0" + +"@openzeppelin/contract-loader@^0.6.2": + version "0.6.3" + resolved "https://registry.yarnpkg.com/@openzeppelin/contract-loader/-/contract-loader-0.6.3.tgz#61a7b44de327e40b7d53f39e0fb59bbf847335c3" + integrity sha512-cOFIjBjwbGgZhDZsitNgJl0Ye1rd5yu/Yx5LMgeq3u0ZYzldm4uObzHDFq4gjDdoypvyORjjJa3BlFA7eAnVIg== + dependencies: + find-up "^4.1.0" + fs-extra "^8.1.0" + +"@openzeppelin/contracts-upgradeable@^4.8.3": + version "4.8.3" + resolved "https://registry.yarnpkg.com/@openzeppelin/contracts-upgradeable/-/contracts-upgradeable-4.8.3.tgz#6b076a7b751811b90fe3a172a7faeaa603e13a3f" + integrity sha512-SXDRl7HKpl2WDoJpn7CK/M9U4Z8gNXDHHChAKh0Iz+Wew3wu6CmFYBeie3je8V0GSXZAIYYwUktSrnW/kwVPtg== + +"@openzeppelin/contracts@^4.8.3": + version "4.8.3" + resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-4.8.3.tgz#cbef3146bfc570849405f59cba18235da95a252a" + integrity sha512-bQHV8R9Me8IaJoJ2vPG4rXcL7seB7YVuskr4f+f5RyOStSZetwzkWtoqDMl5erkBJy0lDRUnIR2WIkPiC0GJlg== + +"@openzeppelin/hardhat-upgrades@^1.23.1": + version "1.24.0" + resolved "https://registry.yarnpkg.com/@openzeppelin/hardhat-upgrades/-/hardhat-upgrades-1.24.0.tgz#b56f9858fcbb852d5db7caa9cc0367fa1239a64d" + integrity sha512-PmNf6y1eXSZ4k4f6Y42mcHeMfwY81MBiuh6vne+fOnWNZANCpjMV9b2Dy7SoS6IgFjq0umAtQYBsHWVWiaMSaw== + dependencies: + "@openzeppelin/upgrades-core" "^1.25.0" + chalk "^4.1.0" + debug "^4.1.1" + proper-lockfile "^4.1.1" + +"@openzeppelin/test-helpers@^0.5.16": + version "0.5.16" + resolved "https://registry.yarnpkg.com/@openzeppelin/test-helpers/-/test-helpers-0.5.16.tgz#2c9054f85069dfbfb5e8cef3ed781e8caf241fb3" + integrity sha512-T1EvspSfH1qQO/sgGlskLfYVBbqzJR23SZzYl/6B2JnT4EhThcI85UpvDk0BkLWKaDScQTabGHt4GzHW+3SfZg== + dependencies: + "@openzeppelin/contract-loader" "^0.6.2" + "@truffle/contract" "^4.0.35" + ansi-colors "^3.2.3" + chai "^4.2.0" + chai-bn "^0.2.1" + ethjs-abi "^0.2.1" + lodash.flatten "^4.4.0" + semver "^5.6.0" + web3 "^1.2.5" + web3-utils "^1.2.5" + +"@openzeppelin/upgrades-core@^1.25.0": + version "1.25.0" + resolved "https://registry.yarnpkg.com/@openzeppelin/upgrades-core/-/upgrades-core-1.25.0.tgz#4f540e2043b98f8b59a4e8a988b9aeb5b5f23a35" + integrity sha512-vSxOSm1k+P156nNm15ydhOmSPGC37mnl092FMVOH+eGaoqLjr2Za6ULVjDMFzvMnG+sGE1UoDOqBNPfTm0ch8w== + dependencies: + cbor "^8.0.0" + chalk "^4.1.0" + compare-versions "^5.0.0" + debug "^4.1.1" + ethereumjs-util "^7.0.3" + proper-lockfile "^4.1.1" + solidity-ast "^0.4.15" + +"@scure/base@~1.1.0": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.1.1.tgz#ebb651ee52ff84f420097055f4bf46cfba403938" + integrity sha512-ZxOhsSyxYwLJj3pLZCefNitxsj093tb2vq90mp2txoYeBqbcjDjqFhyM8eUjq/uFm6zJ+mUuqxlS2FkuSY1MTA== + +"@scure/bip32@1.1.5": + version "1.1.5" + resolved "https://registry.yarnpkg.com/@scure/bip32/-/bip32-1.1.5.tgz#d2ccae16dcc2e75bc1d75f5ef3c66a338d1ba300" + integrity sha512-XyNh1rB0SkEqd3tXcXMi+Xe1fvg+kUIcoRIEujP1Jgv7DqW2r9lg3Ah0NkFaCs9sTkQAQA8kw7xiRXzENi9Rtw== + dependencies: + "@noble/hashes" "~1.2.0" + "@noble/secp256k1" "~1.7.0" + "@scure/base" "~1.1.0" + +"@scure/bip39@1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@scure/bip39/-/bip39-1.1.1.tgz#b54557b2e86214319405db819c4b6a370cf340c5" + integrity sha512-t+wDck2rVkh65Hmv280fYdVdY25J9YeEUIgn2LG1WM6gxFkGzcksoDiUkWVpVp3Oex9xGC68JU2dSbUfwZ2jPg== + dependencies: + "@noble/hashes" "~1.2.0" + "@scure/base" "~1.1.0" + +"@sentry/core@5.30.0": + version "5.30.0" + resolved "https://registry.yarnpkg.com/@sentry/core/-/core-5.30.0.tgz#6b203664f69e75106ee8b5a2fe1d717379b331f3" + integrity sha512-TmfrII8w1PQZSZgPpUESqjB+jC6MvZJZdLtE/0hZ+SrnKhW3x5WlYLvTXZpcWePYBku7rl2wn1RZu6uT0qCTeg== + dependencies: + "@sentry/hub" "5.30.0" + "@sentry/minimal" "5.30.0" + "@sentry/types" "5.30.0" + "@sentry/utils" "5.30.0" + tslib "^1.9.3" + +"@sentry/hub@5.30.0": + version "5.30.0" + resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-5.30.0.tgz#2453be9b9cb903404366e198bd30c7ca74cdc100" + integrity sha512-2tYrGnzb1gKz2EkMDQcfLrDTvmGcQPuWxLnJKXJvYTQDGLlEvi2tWz1VIHjunmOvJrB5aIQLhm+dcMRwFZDCqQ== + dependencies: + "@sentry/types" "5.30.0" + "@sentry/utils" "5.30.0" + tslib "^1.9.3" + +"@sentry/minimal@5.30.0": + version "5.30.0" + resolved "https://registry.yarnpkg.com/@sentry/minimal/-/minimal-5.30.0.tgz#ce3d3a6a273428e0084adcb800bc12e72d34637b" + integrity sha512-BwWb/owZKtkDX+Sc4zCSTNcvZUq7YcH3uAVlmh/gtR9rmUvbzAA3ewLuB3myi4wWRAMEtny6+J/FN/x+2wn9Xw== + dependencies: + "@sentry/hub" "5.30.0" + "@sentry/types" "5.30.0" + tslib "^1.9.3" + +"@sentry/node@^5.18.1": + version "5.30.0" + resolved "https://registry.yarnpkg.com/@sentry/node/-/node-5.30.0.tgz#4ca479e799b1021285d7fe12ac0858951c11cd48" + integrity sha512-Br5oyVBF0fZo6ZS9bxbJZG4ApAjRqAnqFFurMVJJdunNb80brh7a5Qva2kjhm+U6r9NJAB5OmDyPkA1Qnt+QVg== + dependencies: + "@sentry/core" "5.30.0" + "@sentry/hub" "5.30.0" + "@sentry/tracing" "5.30.0" + "@sentry/types" "5.30.0" + "@sentry/utils" "5.30.0" + cookie "^0.4.1" + https-proxy-agent "^5.0.0" + lru_map "^0.3.3" + tslib "^1.9.3" + +"@sentry/tracing@5.30.0": + version "5.30.0" + resolved "https://registry.yarnpkg.com/@sentry/tracing/-/tracing-5.30.0.tgz#501d21f00c3f3be7f7635d8710da70d9419d4e1f" + integrity sha512-dUFowCr0AIMwiLD7Fs314Mdzcug+gBVo/+NCMyDw8tFxJkwWAKl7Qa2OZxLQ0ZHjakcj1hNKfCQJ9rhyfOl4Aw== + dependencies: + "@sentry/hub" "5.30.0" + "@sentry/minimal" "5.30.0" + "@sentry/types" "5.30.0" + "@sentry/utils" "5.30.0" + tslib "^1.9.3" + +"@sentry/types@5.30.0": + version "5.30.0" + resolved "https://registry.yarnpkg.com/@sentry/types/-/types-5.30.0.tgz#19709bbe12a1a0115bc790b8942917da5636f402" + integrity sha512-R8xOqlSTZ+htqrfteCWU5Nk0CDN5ApUTvrlvBuiH1DyP6czDZ4ktbZB0hAgBlVcK0U+qpD3ag3Tqqpa5Q67rPw== + +"@sentry/utils@5.30.0": + version "5.30.0" + resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-5.30.0.tgz#9a5bd7ccff85ccfe7856d493bffa64cabc41e980" + integrity sha512-zaYmoH0NWWtvnJjC9/CBseXMtKHm/tm40sz3YfJRxeQjyzRqNQPgivpd9R/oDJCYj999mzdW382p/qi2ypjLww== + dependencies: + "@sentry/types" "5.30.0" + tslib "^1.9.3" + +"@sindresorhus/is@^4.0.0", "@sindresorhus/is@^4.6.0": + version "4.6.0" + resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-4.6.0.tgz#3c7c9c46e678feefe7a2e5bb609d3dbd665ffb3f" + integrity sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw== + +"@solidity-parser/parser@^0.14.0", "@solidity-parser/parser@^0.14.1": + version "0.14.5" + resolved "https://registry.yarnpkg.com/@solidity-parser/parser/-/parser-0.14.5.tgz#87bc3cc7b068e08195c219c91cd8ddff5ef1a804" + integrity sha512-6dKnHZn7fg/iQATVEzqyUOyEidbn05q7YA2mQ9hC0MMXhhV3/JrsxmFSYZAcr7j1yUP700LLhTruvJ3MiQmjJg== + dependencies: + antlr4ts "^0.5.0-alpha.4" + +"@szmarczak/http-timer@^4.0.5": + version "4.0.6" + resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-4.0.6.tgz#b4a914bb62e7c272d4e5989fe4440f812ab1d807" + integrity sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w== + dependencies: + defer-to-connect "^2.0.0" + +"@szmarczak/http-timer@^5.0.1": + version "5.0.1" + resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-5.0.1.tgz#c7c1bf1141cdd4751b0399c8fc7b8b664cd5be3a" + integrity sha512-+PmQX0PiAYPMeVYe237LJAYvOMYW1j2rH5YROyS3b4CTVJum34HfRvKvAzozHAQG0TnHNdUfY9nCeUyRAs//cw== + dependencies: + defer-to-connect "^2.0.1" + +"@truffle/abi-utils@^0.3.9": + version "0.3.9" + resolved "https://registry.yarnpkg.com/@truffle/abi-utils/-/abi-utils-0.3.9.tgz#c476f5cfe01072b513b3e93fd7bea05cf7bd9d96" + integrity sha512-G5dqgwRHx5zwlXjz3QT8OJVfB2cOqWwD6DwKso0KttUt/zejhCjnkKq72rSgyeLMkz7wBB9ERLOsupLBILM8MA== + dependencies: + change-case "3.0.2" + fast-check "3.1.1" + web3-utils "1.8.2" + +"@truffle/blockchain-utils@^0.1.7": + version "0.1.7" + resolved "https://registry.yarnpkg.com/@truffle/blockchain-utils/-/blockchain-utils-0.1.7.tgz#cf7923a3ae5b591ae4c2a5ee45994a310ccaf1ee" + integrity sha512-1nibqGjEHC7KAyDThEFvbm2+EO8zAHee/VjCtxkYBE3ySwP50joh0QCEBjy7K/9z+icpMoDucfxmgaKToBFUgQ== + +"@truffle/codec@^0.14.17": + version "0.14.17" + resolved "https://registry.yarnpkg.com/@truffle/codec/-/codec-0.14.17.tgz#4ab11fab335854dad0d4aef75db2960ebd76fcd8" + integrity sha512-kD4dD86huLeaBEq5R8D1zleJEu6NsXbyYLdXl1V1TKdiO8odw5CBC6Y/+wdu5d3t1dyEYrTbhn1dqknZa52pmw== + dependencies: + "@truffle/abi-utils" "^0.3.9" + "@truffle/compile-common" "^0.9.4" + big.js "^6.0.3" + bn.js "^5.1.3" + cbor "^5.2.0" + debug "^4.3.1" + lodash "^4.17.21" + semver "7.3.7" + utf8 "^3.0.0" + web3-utils "1.8.2" + +"@truffle/compile-common@^0.9.4": + version "0.9.4" + resolved "https://registry.yarnpkg.com/@truffle/compile-common/-/compile-common-0.9.4.tgz#064208cda70491692b538f717809bb904a122c20" + integrity sha512-mnqJB/hLiPHNf+WKwt/2MH6lv34xSG/SFCib7+ckAklutUqVLeFo8EwQxinuHNkU7LY0C+YgZXhK1WTCO5YRJQ== + dependencies: + "@truffle/error" "^0.2.0" + colors "1.4.0" + +"@truffle/contract-schema@^3.4.13": + version "3.4.13" + resolved "https://registry.yarnpkg.com/@truffle/contract-schema/-/contract-schema-3.4.13.tgz#48447673f29380830f5821e8139ceefbbd545aac" + integrity sha512-emG7upuryYFrsPDbHqeASPWXL824M1tinhQwSPG0phSoa3g+RX9fUNNN/VPmF3tSkXLWUMhRnb7ehxnaCuRbZg== + dependencies: + ajv "^6.10.0" + debug "^4.3.1" + +"@truffle/contract@^4.0.35": + version "4.6.20" + resolved "https://registry.yarnpkg.com/@truffle/contract/-/contract-4.6.20.tgz#48237b9d3fe3e5019eac2c8ce9794201ae84fdf8" + integrity sha512-s7Mbc37L/CF5Apy/cjPnalkgACmG9tTAmcIW28cIZLRLOUAze18pqhtdHryxAQhEOtKGaDAho6TriqL7/74uHw== + dependencies: + "@ensdomains/ensjs" "^2.1.0" + "@truffle/blockchain-utils" "^0.1.7" + "@truffle/contract-schema" "^3.4.13" + "@truffle/debug-utils" "^6.0.48" + "@truffle/error" "^0.2.0" + "@truffle/interface-adapter" "^0.5.32" + bignumber.js "^7.2.1" + debug "^4.3.1" + ethers "^4.0.32" + web3 "1.8.2" + web3-core-helpers "1.8.2" + web3-core-promievent "1.8.2" + web3-eth-abi "1.8.2" + web3-utils "1.8.2" + +"@truffle/debug-utils@^6.0.48": + version "6.0.48" + resolved "https://registry.yarnpkg.com/@truffle/debug-utils/-/debug-utils-6.0.48.tgz#218caa0e00d95a03abadb05dfe63d621530e113a" + integrity sha512-HdK/7eH5EFrcTPeZVEgKaKkkzuZ4xsrH8yw+EoLEsScLsOEuQeKynY61NctjuU93voATWrYmV99Sfb/MRq2i2g== + dependencies: + "@truffle/codec" "^0.14.17" + "@trufflesuite/chromafi" "^3.0.0" + bn.js "^5.1.3" + chalk "^2.4.2" + debug "^4.3.1" + highlightjs-solidity "^2.0.6" + +"@truffle/error@^0.2.0": + version "0.2.0" + resolved "https://registry.yarnpkg.com/@truffle/error/-/error-0.2.0.tgz#65de6f03f5c041f883cc87677eecf8231428f1ab" + integrity sha512-Fe0/z4WWb7IP2gBnv3l6zqP87Y0kSMs7oiSLakKJq17q3GUunrHSdioKuNspdggxkXIBhEQLhi8C+LJdwmHKWQ== + +"@truffle/interface-adapter@^0.5.32": + version "0.5.32" + resolved "https://registry.yarnpkg.com/@truffle/interface-adapter/-/interface-adapter-0.5.32.tgz#2ae896ea85a9d267abcd5d0139afc0f06ebc5745" + integrity sha512-7Hgmdb4nJUcWtq4vvgWY7Mr2RLOTOp5FZaWyMiFmjkcEEhDlezm2QstALWAXgT0W6q7tDmDBpw3vTIFenRhHBA== + dependencies: + bn.js "^5.1.3" + ethers "^4.0.32" + web3 "1.8.2" + +"@trufflesuite/chromafi@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@trufflesuite/chromafi/-/chromafi-3.0.0.tgz#f6956408c1af6a38a6ed1657783ce59504a1eb8b" + integrity sha512-oqWcOqn8nT1bwlPPfidfzS55vqcIDdpfzo3HbU9EnUmcSTX+I8z0UyUFI3tZQjByVJulbzxHxUGS3ZJPwK/GPQ== + dependencies: + camelcase "^4.1.0" + chalk "^2.3.2" + cheerio "^1.0.0-rc.2" + detect-indent "^5.0.0" + highlight.js "^10.4.1" + lodash.merge "^4.6.2" + strip-ansi "^4.0.0" + strip-indent "^2.0.0" + +"@tsconfig/node10@^1.0.7": + version "1.0.9" + resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.9.tgz#df4907fc07a886922637b15e02d4cebc4c0021b2" + integrity sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA== + +"@tsconfig/node12@^1.0.7": + version "1.0.11" + resolved "https://registry.yarnpkg.com/@tsconfig/node12/-/node12-1.0.11.tgz#ee3def1f27d9ed66dac6e46a295cffb0152e058d" + integrity sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag== + +"@tsconfig/node14@^1.0.0": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@tsconfig/node14/-/node14-1.0.3.tgz#e4386316284f00b98435bf40f72f75a09dabf6c1" + integrity sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow== + +"@tsconfig/node16@^1.0.2": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.3.tgz#472eaab5f15c1ffdd7f8628bd4c4f753995ec79e" + integrity sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ== + +"@typechain/ethers-v5@^10.1.0": + version "10.2.0" + resolved "https://registry.yarnpkg.com/@typechain/ethers-v5/-/ethers-v5-10.2.0.tgz#68f5963efb5214cb2d881477228e4b5b315473e1" + integrity sha512-ikaq0N/w9fABM+G01OFmU3U3dNnyRwEahkdvi9mqy1a3XwKiPZaF/lu54OcNaEWnpvEYyhhS0N7buCtLQqC92w== + dependencies: + lodash "^4.17.15" + ts-essentials "^7.0.1" + +"@typechain/hardhat@^6.1.2": + version "6.1.5" + resolved "https://registry.yarnpkg.com/@typechain/hardhat/-/hardhat-6.1.5.tgz#caad58a1d3e9cd88061a584eb4f4fa763d5dcad1" + integrity sha512-lg7LW4qDZpxFMknp3Xool61Fg6Lays8F8TXdFGBG+MxyYcYU5795P1U2XdStuzGq9S2Dzdgh+1jGww9wvZ6r4Q== + dependencies: + fs-extra "^9.1.0" + +"@types/bn.js@^4.11.3": + version "4.11.6" + resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-4.11.6.tgz#c306c70d9358aaea33cd4eda092a742b9505967c" + integrity sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg== + dependencies: + "@types/node" "*" + +"@types/bn.js@^5.1.0", "@types/bn.js@^5.1.1": + version "5.1.1" + resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-5.1.1.tgz#b51e1b55920a4ca26e9285ff79936bbdec910682" + integrity sha512-qNrYbZqMx0uJAfKnKclPh+dTwK33KfLHYqtyODwd5HnXOjnkhc4qgn3BrK6RWyGZm5+sIFE7Q7Vz6QQtJB7w7g== + dependencies: + "@types/node" "*" + +"@types/cacheable-request@^6.0.1", "@types/cacheable-request@^6.0.2": + version "6.0.3" + resolved "https://registry.yarnpkg.com/@types/cacheable-request/-/cacheable-request-6.0.3.tgz#a430b3260466ca7b5ca5bfd735693b36e7a9d183" + integrity sha512-IQ3EbTzGxIigb1I3qPZc1rWJnH0BmSKv5QYTalEwweFvyBDLSAe24zP0le/hyi7ecGfZVlIVAg4BZqb8WBwKqw== + dependencies: + "@types/http-cache-semantics" "*" + "@types/keyv" "^3.1.4" + "@types/node" "*" + "@types/responselike" "^1.0.0" + +"@types/chai-as-promised@^7.1.3": + version "7.1.5" + resolved "https://registry.yarnpkg.com/@types/chai-as-promised/-/chai-as-promised-7.1.5.tgz#6e016811f6c7a64f2eed823191c3a6955094e255" + integrity sha512-jStwss93SITGBwt/niYrkf2C+/1KTeZCZl1LaeezTlqppAKeoQC7jxyqYuP72sxBGKCIbw7oHgbYssIRzT5FCQ== + dependencies: + "@types/chai" "*" + +"@types/chai@*", "@types/chai@^4.2.0": + version "4.3.5" + resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.3.5.tgz#ae69bcbb1bebb68c4ac0b11e9d8ed04526b3562b" + integrity sha512-mEo1sAde+UCE6b2hxn332f1g1E8WfYRu6p5SvTKr2ZKC1f7gFJXk4h5PyGP9Dt6gCaG8y8XhwnXWC6Iy2cmBng== + +"@types/concat-stream@^1.6.0": + version "1.6.1" + resolved "https://registry.yarnpkg.com/@types/concat-stream/-/concat-stream-1.6.1.tgz#24bcfc101ecf68e886aaedce60dfd74b632a1b74" + integrity sha512-eHE4cQPoj6ngxBZMvVf6Hw7Mh4jMW4U9lpGmS5GBPB9RYxlFg+CHaVN7ErNY4W9XfLIEn20b4VDYaIrbq0q4uA== + dependencies: + "@types/node" "*" + +"@types/form-data@0.0.33": + version "0.0.33" + resolved "https://registry.yarnpkg.com/@types/form-data/-/form-data-0.0.33.tgz#c9ac85b2a5fd18435b8c85d9ecb50e6d6c893ff8" + integrity sha512-8BSvG1kGm83cyJITQMZSulnl6QV8jqAGreJsc5tPu1Jq0vTSOiY/k24Wx82JRpWwZSqrala6sd5rWi6aNXvqcw== + dependencies: + "@types/node" "*" + +"@types/glob@^7.1.1": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.2.0.tgz#bc1b5bf3aa92f25bd5dd39f35c57361bdce5b2eb" + integrity sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA== + dependencies: + "@types/minimatch" "*" + "@types/node" "*" + +"@types/http-cache-semantics@*": + version "4.0.1" + resolved "https://registry.yarnpkg.com/@types/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz#0ea7b61496902b95890dc4c3a116b60cb8dae812" + integrity sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ== + +"@types/keyv@^3.1.4": + version "3.1.4" + resolved "https://registry.yarnpkg.com/@types/keyv/-/keyv-3.1.4.tgz#3ccdb1c6751b0c7e52300bcdacd5bcbf8faa75b6" + integrity sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg== + dependencies: + "@types/node" "*" + +"@types/lru-cache@^5.1.0": + version "5.1.1" + resolved "https://registry.yarnpkg.com/@types/lru-cache/-/lru-cache-5.1.1.tgz#c48c2e27b65d2a153b19bfc1a317e30872e01eef" + integrity sha512-ssE3Vlrys7sdIzs5LOxCzTVMsU7i9oa/IaW92wF32JFb3CVczqOkru2xspuKczHEbG3nvmPY7IFqVmGGHdNbYw== + +"@types/minimatch@*": + version "5.1.2" + resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-5.1.2.tgz#07508b45797cb81ec3f273011b054cd0755eddca" + integrity sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA== + +"@types/mocha@>=9.1.0": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-10.0.1.tgz#2f4f65bb08bc368ac39c96da7b2f09140b26851b" + integrity sha512-/fvYntiO1GeICvqbQ3doGDIP97vWmvFt83GKguJ6prmQM2iXZfFcq6YE8KteFyRtX2/h5Hf91BYvPodJKFYv5Q== + +"@types/node@*", "@types/node@>=12.0.0": + version "20.0.0" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.0.0.tgz#081d9afd28421be956c1a47ced1c9a0034b467e2" + integrity sha512-cD2uPTDnQQCVpmRefonO98/PPijuOnnEy5oytWJFPY1N9aJCz2wJ5kSGWO+zJoed2cY2JxQh6yBuUq4vIn61hw== + +"@types/node@^10.0.3": + version "10.17.60" + resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.60.tgz#35f3d6213daed95da7f0f73e75bcc6980e90597b" + integrity sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw== + +"@types/node@^12.12.6": + version "12.20.55" + resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.55.tgz#c329cbd434c42164f846b909bd6f85b5537f6240" + integrity sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ== + +"@types/node@^8.0.0": + version "8.10.66" + resolved "https://registry.yarnpkg.com/@types/node/-/node-8.10.66.tgz#dd035d409df322acc83dff62a602f12a5783bbb3" + integrity sha512-tktOkFUA4kXx2hhhrB8bIFb5TbwzS4uOhKEmwiD+NoiL0qtP2OQ9mFldbgD4dV1djrlBYP6eBuQZiWjuHUpqFw== + +"@types/pbkdf2@^3.0.0": + version "3.1.0" + resolved "https://registry.yarnpkg.com/@types/pbkdf2/-/pbkdf2-3.1.0.tgz#039a0e9b67da0cdc4ee5dab865caa6b267bb66b1" + integrity sha512-Cf63Rv7jCQ0LaL8tNXmEyqTHuIJxRdlS5vMh1mj5voN4+QFhVZnlZruezqpWYDiJ8UTzhP0VmeLXCmBk66YrMQ== + dependencies: + "@types/node" "*" + +"@types/prettier@^2.1.1": + version "2.7.2" + resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.7.2.tgz#6c2324641cc4ba050a8c710b2b251b377581fbf0" + integrity sha512-KufADq8uQqo1pYKVIYzfKbJfBAc0sOeXqGbFaSpv8MRmC/zXgowNZmFcbngndGk922QDmOASEXUZCaY48gs4cg== + +"@types/qs@^6.2.31", "@types/qs@^6.9.7": + version "6.9.7" + resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.7.tgz#63bb7d067db107cc1e457c303bc25d511febf6cb" + integrity sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw== + +"@types/readable-stream@^2.3.13": + version "2.3.15" + resolved "https://registry.yarnpkg.com/@types/readable-stream/-/readable-stream-2.3.15.tgz#3d79c9ceb1b6a57d5f6e6976f489b9b5384321ae" + integrity sha512-oM5JSKQCcICF1wvGgmecmHldZ48OZamtMxcGGVICOJA8o8cahXC1zEVAif8iwoc5j8etxFaRFnf095+CDsuoFQ== + dependencies: + "@types/node" "*" + safe-buffer "~5.1.1" + +"@types/responselike@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@types/responselike/-/responselike-1.0.0.tgz#251f4fe7d154d2bad125abe1b429b23afd262e29" + integrity sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA== + dependencies: + "@types/node" "*" + +"@types/secp256k1@^4.0.1": + version "4.0.3" + resolved "https://registry.yarnpkg.com/@types/secp256k1/-/secp256k1-4.0.3.tgz#1b8e55d8e00f08ee7220b4d59a6abe89c37a901c" + integrity sha512-Da66lEIFeIz9ltsdMZcpQvmrmmoqrfju8pm1BH8WbYjZSwUgCwXLb9C+9XYogwBITnbsSaMdVPb2ekf7TV+03w== + dependencies: + "@types/node" "*" + +abbrev@1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" + integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== + +abbrev@1.0.x: + version "1.0.9" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.0.9.tgz#91b4792588a7738c25f35dd6f63752a2f8776135" + integrity sha512-LEyx4aLEC3x6T0UguF6YILf+ntvmOaWsVfENmIW0E9H09vKlLDGelMjjSm0jkDHALj8A8quZ/HapKNigzwge+Q== + +abort-controller@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/abort-controller/-/abort-controller-3.0.0.tgz#eaf54d53b62bae4138e809ca225c8439a6efb392" + integrity sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg== + dependencies: + event-target-shim "^5.0.0" + +abortcontroller-polyfill@^1.7.3: + version "1.7.5" + resolved "https://registry.yarnpkg.com/abortcontroller-polyfill/-/abortcontroller-polyfill-1.7.5.tgz#6738495f4e901fbb57b6c0611d0c75f76c485bed" + integrity sha512-JMJ5soJWP18htbbxJjG7bG6yuI6pRhgJ0scHHTfkUjf6wjP912xZWvM+A4sJK3gqd9E8fcPbDnOefbA9Th/FIQ== + +abstract-level@^1.0.0, abstract-level@^1.0.2, abstract-level@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/abstract-level/-/abstract-level-1.0.3.tgz#78a67d3d84da55ee15201486ab44c09560070741" + integrity sha512-t6jv+xHy+VYwc4xqZMn2Pa9DjcdzvzZmQGRjTFc8spIbRGHgBrEKbPq+rYXc7CCo0lxgYvSgKVg9qZAhpVQSjA== + dependencies: + buffer "^6.0.3" + catering "^2.1.0" + is-buffer "^2.0.5" + level-supports "^4.0.0" + level-transcoder "^1.0.1" + module-error "^1.0.1" + queue-microtask "^1.2.3" + +accepts@~1.3.8: + version "1.3.8" + resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.8.tgz#0bf0be125b67014adcb0b0921e62db7bffe16b2e" + integrity sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw== + dependencies: + mime-types "~2.1.34" + negotiator "0.6.3" + +acorn-walk@^8.1.1: + version "8.2.0" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1" + integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA== + +acorn@^8.4.1: + version "8.8.2" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.2.tgz#1b2f25db02af965399b9776b0c2c391276d37c4a" + integrity sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw== + +address@^1.0.1: + version "1.2.2" + resolved "https://registry.yarnpkg.com/address/-/address-1.2.2.tgz#2b5248dac5485a6390532c6a517fda2e3faac89e" + integrity sha512-4B/qKCfeE/ODUaAUpSwfzazo5x29WD4r3vXiWsB7I2mSDAihwEqKO+g8GELZUQSSAo5e1XTYh3ZVfLyxBc12nA== + +adm-zip@^0.4.16: + version "0.4.16" + resolved "https://registry.yarnpkg.com/adm-zip/-/adm-zip-0.4.16.tgz#cf4c508fdffab02c269cbc7f471a875f05570365" + integrity sha512-TFi4HBKSGfIKsK5YCkKaaFG2m4PEDyViZmEwof3MTIgzimHLto6muaHVpbrljdIvIrFZzEq/p4nafOeLcYegrg== + +aes-js@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-3.0.0.tgz#e21df10ad6c2053295bcbb8dab40b09dbea87e4d" + integrity sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw== + +agent-base@6: + version "6.0.2" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" + integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ== + dependencies: + debug "4" + +aggregate-error@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/aggregate-error/-/aggregate-error-3.1.0.tgz#92670ff50f5359bdb7a3e0d40d0ec30c5737687a" + integrity sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA== + dependencies: + clean-stack "^2.0.0" + indent-string "^4.0.0" + +ajv@^6.10.0, ajv@^6.12.3: + version "6.12.6" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" + integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== + dependencies: + fast-deep-equal "^3.1.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" + +ajv@^8.0.1: + version "8.12.0" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.12.0.tgz#d1a0527323e22f53562c567c00991577dfbe19d1" + integrity sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA== + dependencies: + fast-deep-equal "^3.1.1" + json-schema-traverse "^1.0.0" + require-from-string "^2.0.2" + uri-js "^4.2.2" + +amdefine@>=0.0.4: + version "1.0.1" + resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" + integrity sha512-S2Hw0TtNkMJhIabBwIojKL9YHO5T0n5eNqWJ7Lrlel/zDbftQpxpapi8tZs3X1HWa+u+QeydGmzzNU0m09+Rcg== + +ansi-colors@3.2.3: + version "3.2.3" + resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-3.2.3.tgz#57d35b8686e851e2cc04c403f1c00203976a1813" + integrity sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw== + +ansi-colors@4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" + integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== + +ansi-colors@^3.2.3: + version "3.2.4" + resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-3.2.4.tgz#e3a3da4bfbae6c86a9c285625de124a234026fbf" + integrity sha512-hHUXGagefjN2iRrID63xckIvotOXOojhQKWIPUZ4mNUZ9nLZW+7FMNoE1lOkEhNWYsx/7ysGIuJYCiMAA9FnrA== + +ansi-colors@^4.1.1: + version "4.1.3" + resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.3.tgz#37611340eb2243e70cc604cad35d63270d48781b" + integrity sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw== + +ansi-escapes@^4.3.0: + version "4.3.2" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" + integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== + dependencies: + type-fest "^0.21.3" + +ansi-regex@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" + integrity sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA== + +ansi-regex@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.1.tgz#123d6479e92ad45ad897d4054e3c7ca7db4944e1" + integrity sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw== + +ansi-regex@^4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.1.tgz#164daac87ab2d6f6db3a29875e2d1766582dabed" + integrity sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g== + +ansi-regex@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" + integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== + +ansi-styles@^3.2.0, ansi-styles@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" + integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== + dependencies: + color-convert "^1.9.0" + +ansi-styles@^4.0.0, ansi-styles@^4.1.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" + integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== + dependencies: + color-convert "^2.0.1" + +antlr4ts@^0.5.0-alpha.4: + version "0.5.0-alpha.4" + resolved "https://registry.yarnpkg.com/antlr4ts/-/antlr4ts-0.5.0-alpha.4.tgz#71702865a87478ed0b40c0709f422cf14d51652a" + integrity sha512-WPQDt1B74OfPv/IMS2ekXAKkTZIHl88uMetg6q3OTqgFxZ/dxDXI0EWLyZid/1Pe6hTftyg5N7gel5wNAGxXyQ== + +anymatch@~3.1.1, anymatch@~3.1.2: + version "3.1.3" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e" + integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== + dependencies: + normalize-path "^3.0.0" + picomatch "^2.0.4" + +arg@^4.1.0: + version "4.1.3" + resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" + integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== + +argparse@^1.0.7: + version "1.0.10" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" + integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== + dependencies: + sprintf-js "~1.0.2" + +argparse@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" + integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== + +array-back@^3.0.1, array-back@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/array-back/-/array-back-3.1.0.tgz#b8859d7a508871c9a7b2cf42f99428f65e96bfb0" + integrity sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q== + +array-back@^4.0.1, array-back@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/array-back/-/array-back-4.0.2.tgz#8004e999a6274586beeb27342168652fdb89fa1e" + integrity sha512-NbdMezxqf94cnNfWLL7V/im0Ub+Anbb0IoZhvzie8+4HJ4nMQuzHuy49FkGYCJK2yAloZ3meiB6AVMClbrI1vg== + +array-buffer-byte-length@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz#fabe8bc193fea865f317fe7807085ee0dee5aead" + integrity sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A== + dependencies: + call-bind "^1.0.2" + is-array-buffer "^3.0.1" + +array-flatten@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" + integrity sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg== + +array-union@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" + integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== + +array-uniq@1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" + integrity sha512-MNha4BWQ6JbwhFhj03YK552f7cb3AzoE8SzeljgChvL1dl3IcvggXVz1DilzySZkCja+CXuZbdW7yATchWn8/Q== + +array.prototype.reduce@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/array.prototype.reduce/-/array.prototype.reduce-1.0.5.tgz#6b20b0daa9d9734dd6bc7ea66b5bbce395471eac" + integrity sha512-kDdugMl7id9COE8R7MHF5jWk7Dqt/fs4Pv+JXoICnYwqpjjjbUurz6w5fT5IG6brLdJhv6/VoHB0H7oyIBXd+Q== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.4" + es-abstract "^1.20.4" + es-array-method-boxes-properly "^1.0.0" + is-string "^1.0.7" + +asap@~2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" + integrity sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA== + +asn1@~0.2.3: + version "0.2.6" + resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.6.tgz#0d3a7bb6e64e02a90c0303b31f292868ea09a08d" + integrity sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ== + dependencies: + safer-buffer "~2.1.0" + +assert-plus@1.0.0, assert-plus@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" + integrity sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw== + +assertion-error@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b" + integrity sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw== + +astral-regex@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31" + integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ== + +async-limiter@~1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.1.tgz#dd379e94f0db8310b08291f9d64c3209766617fd" + integrity sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ== + +async@1.x: + version "1.5.2" + resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" + integrity sha512-nSVgobk4rv61R9PUSDtYt7mPVB2olxNR5RWJcAsH676/ef11bUZwvu7+RGYrYauVdDPcO519v68wRhXQtxsV9w== + +asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== + +at-least-node@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2" + integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg== + +available-typed-arrays@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7" + integrity sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw== + +aws-sign2@~0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" + integrity sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA== + +aws4@^1.8.0: + version "1.12.0" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.12.0.tgz#ce1c9d143389679e253b314241ea9aa5cec980d3" + integrity sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg== + +axios@^0.21.1: + version "0.21.4" + resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.4.tgz#c67b90dc0568e5c1cf2b0b858c43ba28e2eda575" + integrity sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg== + dependencies: + follow-redirects "^1.14.0" + +balanced-match@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" + integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== + +base-x@^3.0.2, base-x@^3.0.8: + version "3.0.9" + resolved "https://registry.yarnpkg.com/base-x/-/base-x-3.0.9.tgz#6349aaabb58526332de9f60995e548a53fe21320" + integrity sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ== + dependencies: + safe-buffer "^5.0.1" + +base64-js@^1.3.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" + integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== + +bcrypt-pbkdf@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e" + integrity sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w== + dependencies: + tweetnacl "^0.14.3" + +bech32@1.1.4, bech32@^1.1.3: + version "1.1.4" + resolved "https://registry.yarnpkg.com/bech32/-/bech32-1.1.4.tgz#e38c9f37bf179b8eb16ae3a772b40c356d4832e9" + integrity sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ== + +big-integer@1.6.36: + version "1.6.36" + resolved "https://registry.yarnpkg.com/big-integer/-/big-integer-1.6.36.tgz#78631076265d4ae3555c04f85e7d9d2f3a071a36" + integrity sha512-t70bfa7HYEA1D9idDbmuv7YbsbVkQ+Hp+8KFSul4aE5e/i1bjCNIRYJZlA8Q8p0r9T8cF/RVvwUgRA//FydEyg== + +big.js@^6.0.3: + version "6.2.1" + resolved "https://registry.yarnpkg.com/big.js/-/big.js-6.2.1.tgz#7205ce763efb17c2e41f26f121c420c6a7c2744f" + integrity sha512-bCtHMwL9LeDIozFn+oNhhFoq+yQ3BNdnsLSASUxLciOb1vgvpHsIO1dsENiGMgbb4SkP5TrzWzRiLddn8ahVOQ== + +bigint-crypto-utils@^3.0.23: + version "3.2.2" + resolved "https://registry.yarnpkg.com/bigint-crypto-utils/-/bigint-crypto-utils-3.2.2.tgz#e30a49ec38357c6981cd3da5aaa6480b1f752ee4" + integrity sha512-U1RbE3aX9ayCUVcIPHuPDPKcK3SFOXf93J1UK/iHlJuQB7bhagPIX06/CLpLEsDThJ7KA4Dhrnzynl+d2weTiw== + +bignumber.js@^7.2.1: + version "7.2.1" + resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-7.2.1.tgz#80c048759d826800807c4bfd521e50edbba57a5f" + integrity sha512-S4XzBk5sMB+Rcb/LNcpzXr57VRTxgAvaAEDAl1AwRx27j00hT84O6OkteE7u8UB3NuaaygCRrEpqox4uDOrbdQ== + +bignumber.js@^9.0.0, bignumber.js@^9.0.1: + version "9.1.1" + resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.1.1.tgz#c4df7dc496bd849d4c9464344c1aa74228b4dac6" + integrity sha512-pHm4LsMJ6lzgNGVfZHjMoO8sdoRhOzOH4MLmY65Jg70bpxCKu5iOHNJyfF6OyvYw7t8Fpf35RuzUyqnQsj8Vig== + +binary-extensions@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" + integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== + +blakejs@^1.1.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/blakejs/-/blakejs-1.2.1.tgz#5057e4206eadb4a97f7c0b6e197a505042fc3814" + integrity sha512-QXUSXI3QVc/gJME0dBpXrag1kbzOqCjCX8/b54ntNyW6sjtoqxqRk3LTmXzaJoh71zMsDCjM+47jS7XiwN/+fQ== + +bluebird@^3.5.0, bluebird@^3.5.2: + version "3.7.2" + resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" + integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== + +bn.js@4.11.6: + version "4.11.6" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.6.tgz#53344adb14617a13f6e8dd2ce28905d1c0ba3215" + integrity sha512-XWwnNNFCuuSQ0m3r3C4LE3EiORltHd9M05pq6FOlVeiophzRbMo50Sbz1ehl8K3Z+jw9+vmgnXefY1hz8X+2wA== + +bn.js@^4.11.0, bn.js@^4.11.6, bn.js@^4.11.8, bn.js@^4.11.9: + version "4.12.0" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88" + integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA== + +bn.js@^5.1.2, bn.js@^5.1.3, bn.js@^5.2.0, bn.js@^5.2.1: + version "5.2.1" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.1.tgz#0bc527a6a0d18d0aa8d5b0538ce4a77dccfa7b70" + integrity sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ== + +body-parser@1.20.1: + version "1.20.1" + resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.1.tgz#b1812a8912c195cd371a3ee5e66faa2338a5c668" + integrity sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw== + dependencies: + bytes "3.1.2" + content-type "~1.0.4" + debug "2.6.9" + depd "2.0.0" + destroy "1.2.0" + http-errors "2.0.0" + iconv-lite "0.4.24" + on-finished "2.4.1" + qs "6.11.0" + raw-body "2.5.1" + type-is "~1.6.18" + unpipe "1.0.0" + +body-parser@^1.16.0: + version "1.20.2" + resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.2.tgz#6feb0e21c4724d06de7ff38da36dad4f57a747fd" + integrity sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA== + dependencies: + bytes "3.1.2" + content-type "~1.0.5" + debug "2.6.9" + depd "2.0.0" + destroy "1.2.0" + http-errors "2.0.0" + iconv-lite "0.4.24" + on-finished "2.4.1" + qs "6.11.0" + raw-body "2.5.2" + type-is "~1.6.18" + unpipe "1.0.0" + +boolbase@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" + integrity sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww== + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +brace-expansion@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae" + integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== + dependencies: + balanced-match "^1.0.0" + +braces@^3.0.2, braces@~3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" + integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== + dependencies: + fill-range "^7.0.1" + +brorand@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" + integrity sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w== + +browser-level@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/browser-level/-/browser-level-1.0.1.tgz#36e8c3183d0fe1c405239792faaab5f315871011" + integrity sha512-XECYKJ+Dbzw0lbydyQuJzwNXtOpbMSq737qxJN11sIRTErOMShvDpbzTlgju7orJKvx4epULolZAuJGLzCmWRQ== + dependencies: + abstract-level "^1.0.2" + catering "^2.1.1" + module-error "^1.0.2" + run-parallel-limit "^1.1.0" + +browser-stdout@1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" + integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== + +browserify-aes@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48" + integrity sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA== + dependencies: + buffer-xor "^1.0.3" + cipher-base "^1.0.0" + create-hash "^1.1.0" + evp_bytestokey "^1.0.3" + inherits "^2.0.1" + safe-buffer "^5.0.1" + +bs58@^4.0.0, bs58@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/bs58/-/bs58-4.0.1.tgz#be161e76c354f6f788ae4071f63f34e8c4f0a42a" + integrity sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw== + dependencies: + base-x "^3.0.2" + +bs58check@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/bs58check/-/bs58check-2.1.2.tgz#53b018291228d82a5aa08e7d796fdafda54aebfc" + integrity sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA== + dependencies: + bs58 "^4.0.0" + create-hash "^1.1.0" + safe-buffer "^5.1.2" + +buffer-from@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" + integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== + +buffer-to-arraybuffer@^0.0.5: + version "0.0.5" + resolved "https://registry.yarnpkg.com/buffer-to-arraybuffer/-/buffer-to-arraybuffer-0.0.5.tgz#6064a40fa76eb43c723aba9ef8f6e1216d10511a" + integrity sha512-3dthu5CYiVB1DEJp61FtApNnNndTckcqe4pFcLdvHtrpG+kcyekCJKg4MRiDcFW7A6AODnXB9U4dwQiCW5kzJQ== + +buffer-xor@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" + integrity sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ== + +buffer@6.0.3, buffer@^6.0.3: + version "6.0.3" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6" + integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA== + dependencies: + base64-js "^1.3.1" + ieee754 "^1.2.1" + +buffer@^5.0.5, buffer@^5.5.0, buffer@^5.6.0: + version "5.7.1" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" + integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== + dependencies: + base64-js "^1.3.1" + ieee754 "^1.1.13" + +bufferutil@^4.0.1: + version "4.0.7" + resolved "https://registry.yarnpkg.com/bufferutil/-/bufferutil-4.0.7.tgz#60c0d19ba2c992dd8273d3f73772ffc894c153ad" + integrity sha512-kukuqc39WOHtdxtw4UScxF/WVnMFVSQVKhtx3AjZJzhd0RGZZldcrfSEbVsWWe6KNH253574cq5F+wpv0G9pJw== + dependencies: + node-gyp-build "^4.3.0" + +busboy@^1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/busboy/-/busboy-1.6.0.tgz#966ea36a9502e43cdb9146962523b92f531f6893" + integrity sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA== + dependencies: + streamsearch "^1.1.0" + +bytes@3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5" + integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg== + +cacheable-lookup@^5.0.3: + version "5.0.4" + resolved "https://registry.yarnpkg.com/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz#5a6b865b2c44357be3d5ebc2a467b032719a7005" + integrity sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA== + +cacheable-lookup@^6.0.4: + version "6.1.0" + resolved "https://registry.yarnpkg.com/cacheable-lookup/-/cacheable-lookup-6.1.0.tgz#0330a543471c61faa4e9035db583aad753b36385" + integrity sha512-KJ/Dmo1lDDhmW2XDPMo+9oiy/CeqosPguPCrgcVzKyZrL6pM1gU2GmPY/xo6OQPTUaA/c0kwHuywB4E6nmT9ww== + +cacheable-request@^7.0.2: + version "7.0.2" + resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-7.0.2.tgz#ea0d0b889364a25854757301ca12b2da77f91d27" + integrity sha512-pouW8/FmiPQbuGpkXQ9BAPv/Mo5xDGANgSNXzTzJ8DrKGuXOssM4wIQRjfanNRh3Yu5cfYPvcorqbhg2KIJtew== + dependencies: + clone-response "^1.0.2" + get-stream "^5.1.0" + http-cache-semantics "^4.0.0" + keyv "^4.0.0" + lowercase-keys "^2.0.0" + normalize-url "^6.0.1" + responselike "^2.0.0" + +call-bind@^1.0.0, call-bind@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" + integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA== + dependencies: + function-bind "^1.1.1" + get-intrinsic "^1.0.2" + +camel-case@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/camel-case/-/camel-case-3.0.0.tgz#ca3c3688a4e9cf3a4cda777dc4dcbc713249cf73" + integrity sha512-+MbKztAYHXPr1jNTSKQF52VpcFjwY5RkR7fxksV8Doo4KAYc5Fl4UJRgthBbTmEx8C54DqahhbLJkDwjI3PI/w== + dependencies: + no-case "^2.2.0" + upper-case "^1.1.1" + +camelcase@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a" + integrity sha512-4nhGqUkc4BqbBBB4Q6zLuD7lzzrHYrjKGeYaEji/3tFR5VdJu9v+LilhGIVe8wxEJPPOeWo7eg8dwY13TZ1BNg== + +camelcase@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" + integrity sha512-FxAv7HpHrXbh3aPo4o2qxHay2lkLY3x5Mw3KeE4KQE8ysVfziWeRZDwcjauvwBSGEC/nXUPzZy8zeh4HokqOnw== + +camelcase@^5.0.0: + version "5.3.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" + integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== + +camelcase@^6.0.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" + integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== + +case@^1.6.3: + version "1.6.3" + resolved "https://registry.yarnpkg.com/case/-/case-1.6.3.tgz#0a4386e3e9825351ca2e6216c60467ff5f1ea1c9" + integrity sha512-mzDSXIPaFwVDvZAHqZ9VlbyF4yyXRuX6IvB06WvPYkqJVO24kX1PPhv9bfpKNFZyxYFmmgo03HUiD8iklmJYRQ== + +caseless@^0.12.0, caseless@~0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" + integrity sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw== + +catering@^2.1.0, catering@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/catering/-/catering-2.1.1.tgz#66acba06ed5ee28d5286133982a927de9a04b510" + integrity sha512-K7Qy8O9p76sL3/3m7/zLKbRkyOlSZAgzEaLhyj2mXS8PsCud2Eo4hAb8aLtZqHh0QGqLcb9dlJSu6lHRVENm1w== + +cbor@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/cbor/-/cbor-5.2.0.tgz#4cca67783ccd6de7b50ab4ed62636712f287a67c" + integrity sha512-5IMhi9e1QU76ppa5/ajP1BmMWZ2FHkhAhjeVKQ/EFCgYSEaeVaoGtL7cxJskf9oCCk+XjzaIdc3IuU/dbA/o2A== + dependencies: + bignumber.js "^9.0.1" + nofilter "^1.0.4" + +cbor@^8.0.0, cbor@^8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/cbor/-/cbor-8.1.0.tgz#cfc56437e770b73417a2ecbfc9caf6b771af60d5" + integrity sha512-DwGjNW9omn6EwP70aXsn7FQJx5kO12tX0bZkaTjzdVFM6/7nhA4t0EENocKGx6D2Bch9PE2KzCUf5SceBdeijg== + dependencies: + nofilter "^3.1.0" + +chai-as-promised@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/chai-as-promised/-/chai-as-promised-7.1.1.tgz#08645d825deb8696ee61725dbf590c012eb00ca0" + integrity sha512-azL6xMoi+uxu6z4rhWQ1jbdUhOMhis2PvscD/xjLqNMkv3BPPp2JyyuTHOrf9BOosGpNQ11v6BKv/g57RXbiaA== + dependencies: + check-error "^1.0.2" + +chai-bn@^0.2.1: + version "0.2.2" + resolved "https://registry.yarnpkg.com/chai-bn/-/chai-bn-0.2.2.tgz#4dcf30dbc79db2378a00781693bc749c972bf34f" + integrity sha512-MzjelH0p8vWn65QKmEq/DLBG1Hle4WeyqT79ANhXZhn/UxRWO0OogkAxi5oGGtfzwU9bZR8mvbvYdoqNVWQwFg== + +chai@^4.2.0: + version "4.3.7" + resolved "https://registry.yarnpkg.com/chai/-/chai-4.3.7.tgz#ec63f6df01829088e8bf55fca839bcd464a8ec51" + integrity sha512-HLnAzZ2iupm25PlN0xFreAlBA5zaBSv3og0DdeGA4Ar6h6rJ3A0rolRUKJhSF2V10GZKDgWF/VmAEsNWjCRB+A== + dependencies: + assertion-error "^1.1.0" + check-error "^1.0.2" + deep-eql "^4.1.2" + get-func-name "^2.0.0" + loupe "^2.3.1" + pathval "^1.1.1" + type-detect "^4.0.5" + +chalk@^2.3.2, chalk@^2.4.2: + version "2.4.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" + integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + +chalk@^4.1.0, chalk@^4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" + integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + +change-case@3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/change-case/-/change-case-3.0.2.tgz#fd48746cce02f03f0a672577d1d3a8dc2eceb037" + integrity sha512-Mww+SLF6MZ0U6kdg11algyKd5BARbyM4TbFBepwowYSR5ClfQGCGtxNXgykpN0uF/bstWeaGDT4JWaDh8zWAHA== + dependencies: + camel-case "^3.0.0" + constant-case "^2.0.0" + dot-case "^2.1.0" + header-case "^1.0.0" + is-lower-case "^1.1.0" + is-upper-case "^1.1.0" + lower-case "^1.1.1" + lower-case-first "^1.0.0" + no-case "^2.3.2" + param-case "^2.1.0" + pascal-case "^2.0.0" + path-case "^2.1.0" + sentence-case "^2.1.0" + snake-case "^2.1.0" + swap-case "^1.1.0" + title-case "^2.1.0" + upper-case "^1.1.1" + upper-case-first "^1.1.0" + +"charenc@>= 0.0.1": + version "0.0.2" + resolved "https://registry.yarnpkg.com/charenc/-/charenc-0.0.2.tgz#c0a1d2f3a7092e03774bfa83f14c0fc5790a8667" + integrity sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA== + +check-error@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82" + integrity sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA== + +cheerio-select@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cheerio-select/-/cheerio-select-2.1.0.tgz#4d8673286b8126ca2a8e42740d5e3c4884ae21b4" + integrity sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g== + dependencies: + boolbase "^1.0.0" + css-select "^5.1.0" + css-what "^6.1.0" + domelementtype "^2.3.0" + domhandler "^5.0.3" + domutils "^3.0.1" + +cheerio@^1.0.0-rc.2: + version "1.0.0-rc.12" + resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-1.0.0-rc.12.tgz#788bf7466506b1c6bf5fae51d24a2c4d62e47683" + integrity sha512-VqR8m68vM46BNnuZ5NtnGBKIE/DfN0cRIzg9n40EIq9NOv90ayxLBXA8fXC5gquFRGJSTRqBq25Jt2ECLR431Q== + dependencies: + cheerio-select "^2.1.0" + dom-serializer "^2.0.0" + domhandler "^5.0.3" + domutils "^3.0.1" + htmlparser2 "^8.0.1" + parse5 "^7.0.0" + parse5-htmlparser2-tree-adapter "^7.0.0" + +chokidar@3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.3.0.tgz#12c0714668c55800f659e262d4962a97faf554a6" + integrity sha512-dGmKLDdT3Gdl7fBUe8XK+gAtGmzy5Fn0XkkWQuYxGIgWVPPse2CxFA5mtrlD0TOHaHjEUqkWNyP1XdHoJES/4A== + dependencies: + anymatch "~3.1.1" + braces "~3.0.2" + glob-parent "~5.1.0" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.2.0" + optionalDependencies: + fsevents "~2.1.1" + +chokidar@3.5.3, chokidar@^3.4.0, chokidar@^3.5.2: + version "3.5.3" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" + integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== + dependencies: + anymatch "~3.1.2" + braces "~3.0.2" + glob-parent "~5.1.2" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.6.0" + optionalDependencies: + fsevents "~2.3.2" + +chownr@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" + integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg== + +ci-info@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" + integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ== + +cids@^0.7.1: + version "0.7.5" + resolved "https://registry.yarnpkg.com/cids/-/cids-0.7.5.tgz#60a08138a99bfb69b6be4ceb63bfef7a396b28b2" + integrity sha512-zT7mPeghoWAu+ppn8+BS1tQ5qGmbMfB4AregnQjA/qHY3GC1m1ptI9GkWNlgeu38r7CuRdXB47uY2XgAYt6QVA== + dependencies: + buffer "^5.5.0" + class-is "^1.1.0" + multibase "~0.6.0" + multicodec "^1.0.0" + multihashes "~0.4.15" + +cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" + integrity sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q== + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + +class-is@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/class-is/-/class-is-1.1.0.tgz#9d3c0fba0440d211d843cec3dedfa48055005825" + integrity sha512-rhjH9AG1fvabIDoGRVH587413LPjTZgmDF9fOFCbFJQV4yuocX1mHxxvXI4g3cGwbVY9wAYIoKlg1N79frJKQw== + +classic-level@^1.2.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/classic-level/-/classic-level-1.3.0.tgz#5e36680e01dc6b271775c093f2150844c5edd5c8" + integrity sha512-iwFAJQYtqRTRM0F6L8h4JCt00ZSGdOyqh7yVrhhjrOpFhmBjNlRUey64MCiyo6UmQHMJ+No3c81nujPv+n9yrg== + dependencies: + abstract-level "^1.0.2" + catering "^2.1.0" + module-error "^1.0.1" + napi-macros "^2.2.2" + node-gyp-build "^4.3.0" + +clean-stack@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" + integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A== + +cli-table3@^0.5.0: + version "0.5.1" + resolved "https://registry.yarnpkg.com/cli-table3/-/cli-table3-0.5.1.tgz#0252372d94dfc40dbd8df06005f48f31f656f202" + integrity sha512-7Qg2Jrep1S/+Q3EceiZtQcDPWxhAvBw+ERf1162v4sikJrvojMHFqXt8QIVha8UlH9rgU0BeWPytZ9/TzYqlUw== + dependencies: + object-assign "^4.1.0" + string-width "^2.1.1" + optionalDependencies: + colors "^1.1.2" + +cliui@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" + integrity sha512-0yayqDxWQbqk3ojkYqUKqaAQ6AfNKeKWRNA8kR0WXzAsdHpP4BIaOmMAG87JGuO6qcobyW4GjxHd9PmhEd+T9w== + dependencies: + string-width "^1.0.1" + strip-ansi "^3.0.1" + wrap-ansi "^2.0.0" + +cliui@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-5.0.0.tgz#deefcfdb2e800784aa34f46fa08e06851c7bbbc5" + integrity sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA== + dependencies: + string-width "^3.1.0" + strip-ansi "^5.2.0" + wrap-ansi "^5.1.0" + +cliui@^7.0.2: + version "7.0.4" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" + integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.0" + wrap-ansi "^7.0.0" + +clone-response@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/clone-response/-/clone-response-1.0.3.tgz#af2032aa47816399cf5f0a1d0db902f517abb8c3" + integrity sha512-ROoL94jJH2dUVML2Y/5PEDNaSHgeOdSDicUyS7izcF63G6sTc/FTjLub4b8Il9S8S0beOfYt0TaA5qvFK+w0wA== + dependencies: + mimic-response "^1.0.0" + +code-point-at@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" + integrity sha512-RpAVKQA5T63xEj6/giIbUEtZwJ4UFIc3ZtvEkiaUERylqe8xb5IvqcgOurZLahv93CLKfxcw5YI+DZcUBRyLXA== + +color-convert@^1.9.0: + version "1.9.3" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" + integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== + dependencies: + color-name "1.1.3" + +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== + dependencies: + color-name "~1.1.4" + +color-name@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== + +color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + +colors@1.4.0, colors@^1.1.2: + version "1.4.0" + resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" + integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA== + +combined-stream@^1.0.6, combined-stream@^1.0.8, combined-stream@~1.0.6: + version "1.0.8" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" + integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== + dependencies: + delayed-stream "~1.0.0" + +command-exists@^1.2.8: + version "1.2.9" + resolved "https://registry.yarnpkg.com/command-exists/-/command-exists-1.2.9.tgz#c50725af3808c8ab0260fd60b01fbfa25b954f69" + integrity sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w== + +command-line-args@^5.1.1: + version "5.2.1" + resolved "https://registry.yarnpkg.com/command-line-args/-/command-line-args-5.2.1.tgz#c44c32e437a57d7c51157696893c5909e9cec42e" + integrity sha512-H4UfQhZyakIjC74I9d34fGYDwk3XpSr17QhEd0Q3I9Xq1CETHo4Hcuo87WyWHpAF1aSLjLRf5lD9ZGX2qStUvg== + dependencies: + array-back "^3.1.0" + find-replace "^3.0.0" + lodash.camelcase "^4.3.0" + typical "^4.0.0" + +command-line-usage@^6.1.0: + version "6.1.3" + resolved "https://registry.yarnpkg.com/command-line-usage/-/command-line-usage-6.1.3.tgz#428fa5acde6a838779dfa30e44686f4b6761d957" + integrity sha512-sH5ZSPr+7UStsloltmDh7Ce5fb8XPlHyoPzTpyyMuYCtervL65+ubVZ6Q61cFtFl62UyJlc8/JwERRbAFPUqgw== + dependencies: + array-back "^4.0.2" + chalk "^2.4.2" + table-layout "^1.0.2" + typical "^5.2.0" + +commander@3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/commander/-/commander-3.0.2.tgz#6837c3fb677ad9933d1cfba42dd14d5117d6b39e" + integrity sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow== + +compare-versions@^5.0.0: + version "5.0.3" + resolved "https://registry.yarnpkg.com/compare-versions/-/compare-versions-5.0.3.tgz#a9b34fea217472650ef4a2651d905f42c28ebfd7" + integrity sha512-4UZlZP8Z99MGEY+Ovg/uJxJuvoXuN4M6B3hKaiackiHrgzQFEe3diJi1mf1PNHbFujM7FvLrK2bpgIaImbtZ1A== + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== + +concat-stream@^1.6.0, concat-stream@^1.6.2: + version "1.6.2" + resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" + integrity sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw== + dependencies: + buffer-from "^1.0.0" + inherits "^2.0.3" + readable-stream "^2.2.2" + typedarray "^0.0.6" + +constant-case@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/constant-case/-/constant-case-2.0.0.tgz#4175764d389d3fa9c8ecd29186ed6005243b6a46" + integrity sha512-eS0N9WwmjTqrOmR3o83F5vW8Z+9R1HnVz3xmzT2PMFug9ly+Au/fxRWlEBSb6LcZwspSsEn9Xs1uw9YgzAg1EQ== + dependencies: + snake-case "^2.1.0" + upper-case "^1.1.1" + +content-disposition@0.5.4: + version "0.5.4" + resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.4.tgz#8b82b4efac82512a02bb0b1dcec9d2c5e8eb5bfe" + integrity sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ== + dependencies: + safe-buffer "5.2.1" + +content-hash@^2.5.2: + version "2.5.2" + resolved "https://registry.yarnpkg.com/content-hash/-/content-hash-2.5.2.tgz#bbc2655e7c21f14fd3bfc7b7d4bfe6e454c9e211" + integrity sha512-FvIQKy0S1JaWV10sMsA7TRx8bpU+pqPkhbsfvOJAdjRXvYxEckAwQWGwtRjiaJfh+E0DvcWUGqcdjwMGFjsSdw== + dependencies: + cids "^0.7.1" + multicodec "^0.5.5" + multihashes "^0.4.15" + +content-type@~1.0.4, content-type@~1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.5.tgz#8b773162656d1d1086784c8f23a54ce6d73d7918" + integrity sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA== + +cookie-signature@1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" + integrity sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ== + +cookie@0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.5.0.tgz#d1f5d71adec6558c58f389987c366aa47e994f8b" + integrity sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw== + +cookie@^0.4.1: + version "0.4.2" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.2.tgz#0e41f24de5ecf317947c82fc789e06a884824432" + integrity sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA== + +core-util-is@1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" + integrity sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ== + +core-util-is@~1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" + integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== + +cors@^2.8.1: + version "2.8.5" + resolved "https://registry.yarnpkg.com/cors/-/cors-2.8.5.tgz#eac11da51592dd86b9f06f6e7ac293b3df875d29" + integrity sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g== + dependencies: + object-assign "^4" + vary "^1" + +crc-32@^1.2.0: + version "1.2.2" + resolved "https://registry.yarnpkg.com/crc-32/-/crc-32-1.2.2.tgz#3cad35a934b8bf71f25ca524b6da51fb7eace2ff" + integrity sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ== + +create-hash@^1.1.0, create-hash@^1.1.2, create-hash@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" + integrity sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg== + dependencies: + cipher-base "^1.0.1" + inherits "^2.0.1" + md5.js "^1.3.4" + ripemd160 "^2.0.1" + sha.js "^2.4.0" + +create-hmac@^1.1.4, create-hmac@^1.1.7: + version "1.1.7" + resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.7.tgz#69170c78b3ab957147b2b8b04572e47ead2243ff" + integrity sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg== + dependencies: + cipher-base "^1.0.3" + create-hash "^1.1.0" + inherits "^2.0.1" + ripemd160 "^2.0.0" + safe-buffer "^5.0.1" + sha.js "^2.4.8" + +create-require@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" + integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== + +cross-fetch@^3.1.4: + version "3.1.5" + resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.1.5.tgz#e1389f44d9e7ba767907f7af8454787952ab534f" + integrity sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw== + dependencies: + node-fetch "2.6.7" + +"crypt@>= 0.0.1": + version "0.0.2" + resolved "https://registry.yarnpkg.com/crypt/-/crypt-0.0.2.tgz#88d7ff7ec0dfb86f713dc87bbb42d044d3e6c41b" + integrity sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow== + +crypto-addr-codec@^0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/crypto-addr-codec/-/crypto-addr-codec-0.1.7.tgz#e16cea892730178fe25a38f6d15b680cab3124ae" + integrity sha512-X4hzfBzNhy4mAc3UpiXEC/L0jo5E8wAa9unsnA8nNXYzXjCcGk83hfC5avJWCSGT8V91xMnAS9AKMHmjw5+XCg== + dependencies: + base-x "^3.0.8" + big-integer "1.6.36" + blakejs "^1.1.0" + bs58 "^4.0.1" + ripemd160-min "0.0.6" + safe-buffer "^5.2.0" + sha3 "^2.1.1" + +css-select@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/css-select/-/css-select-5.1.0.tgz#b8ebd6554c3637ccc76688804ad3f6a6fdaea8a6" + integrity sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg== + dependencies: + boolbase "^1.0.0" + css-what "^6.1.0" + domhandler "^5.0.2" + domutils "^3.0.1" + nth-check "^2.0.1" + +css-what@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/css-what/-/css-what-6.1.0.tgz#fb5effcf76f1ddea2c81bdfaa4de44e79bac70f4" + integrity sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw== + +d@1, d@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/d/-/d-1.0.1.tgz#8698095372d58dbee346ffd0c7093f99f8f9eb5a" + integrity sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA== + dependencies: + es5-ext "^0.10.50" + type "^1.0.1" + +dashdash@^1.12.0: + version "1.14.1" + resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" + integrity sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g== + dependencies: + assert-plus "^1.0.0" + +death@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/death/-/death-1.1.0.tgz#01aa9c401edd92750514470b8266390c66c67318" + integrity sha512-vsV6S4KVHvTGxbEcij7hkWRv0It+sGGWVOM67dQde/o5Xjnr+KmLjxWJii2uEObIrt1CcM9w0Yaovx+iOlIL+w== + +debug@2.6.9, debug@^2.2.0: + version "2.6.9" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== + dependencies: + ms "2.0.0" + +debug@3.2.6: + version "3.2.6" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" + integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== + dependencies: + ms "^2.1.1" + +debug@4, debug@4.3.4, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.3: + version "4.3.4" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" + integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== + dependencies: + ms "2.1.2" + +decamelize@^1.1.1, decamelize@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" + integrity sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA== + +decamelize@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-4.0.0.tgz#aa472d7bf660eb15f3494efd531cab7f2a709837" + integrity sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ== + +decode-uri-component@^0.2.0: + version "0.2.2" + resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.2.tgz#e69dbe25d37941171dd540e024c444cd5188e1e9" + integrity sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ== + +decompress-response@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-3.3.0.tgz#80a4dd323748384bfa248083622aedec982adff3" + integrity sha512-BzRPQuY1ip+qDonAOz42gRm/pg9F768C+npV/4JOsxRC2sq+Rlk+Q4ZCAsOhnIaMrgarILY+RMUIvMmmX1qAEA== + dependencies: + mimic-response "^1.0.0" + +decompress-response@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-6.0.0.tgz#ca387612ddb7e104bd16d85aab00d5ecf09c66fc" + integrity sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ== + dependencies: + mimic-response "^3.1.0" + +deep-eql@^4.0.1, deep-eql@^4.1.2: + version "4.1.3" + resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-4.1.3.tgz#7c7775513092f7df98d8df9996dd085eb668cc6d" + integrity sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw== + dependencies: + type-detect "^4.0.0" + +deep-extend@~0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" + integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== + +deep-is@~0.1.3: + version "0.1.4" + resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" + integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== + +defer-to-connect@^2.0.0, defer-to-connect@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-2.0.1.tgz#8016bdb4143e4632b77a3449c6236277de520587" + integrity sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg== + +define-properties@^1.1.2, define-properties@^1.1.3, define-properties@^1.1.4, define-properties@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.2.0.tgz#52988570670c9eacedd8064f4a990f2405849bd5" + integrity sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA== + dependencies: + has-property-descriptors "^1.0.0" + object-keys "^1.1.1" + +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== + +depd@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df" + integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== + +destroy@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.2.0.tgz#4803735509ad8be552934c67df614f94e66fa015" + integrity sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg== + +detect-indent@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-5.0.0.tgz#3871cc0a6a002e8c3e5b3cf7f336264675f06b9d" + integrity sha512-rlpvsxUtM0PQvy9iZe640/IWwWYyBsTApREbA1pHOpmOUIl9MkP/U4z7vTtg4Oaojvqhxt7sdufnT0EzGaR31g== + +detect-port@^1.3.0: + version "1.5.1" + resolved "https://registry.yarnpkg.com/detect-port/-/detect-port-1.5.1.tgz#451ca9b6eaf20451acb0799b8ab40dff7718727b" + integrity sha512-aBzdj76lueB6uUst5iAs7+0H/oOjqI5D16XUWxlWMIMROhcM0rfsNVk93zTngq1dDNpoXRr++Sus7ETAExppAQ== + dependencies: + address "^1.0.1" + debug "4" + +diff@3.5.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" + integrity sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA== + +diff@5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-5.0.0.tgz#7ed6ad76d859d030787ec35855f5b1daf31d852b" + integrity sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w== + +diff@^4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" + integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== + +difflib@^0.2.4: + version "0.2.4" + resolved "https://registry.yarnpkg.com/difflib/-/difflib-0.2.4.tgz#b5e30361a6db023176d562892db85940a718f47e" + integrity sha512-9YVwmMb0wQHQNr5J9m6BSj6fk4pfGITGQOOs+D9Fl+INODWFOfvhIU1hNv6GgR1RBoC/9NJcwu77zShxV0kT7w== + dependencies: + heap ">= 0.2.0" + +dir-glob@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" + integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== + dependencies: + path-type "^4.0.0" + +dom-serializer@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-2.0.0.tgz#e41b802e1eedf9f6cae183ce5e622d789d7d8e53" + integrity sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg== + dependencies: + domelementtype "^2.3.0" + domhandler "^5.0.2" + entities "^4.2.0" + +dom-walk@^0.1.0: + version "0.1.2" + resolved "https://registry.yarnpkg.com/dom-walk/-/dom-walk-0.1.2.tgz#0c548bef048f4d1f2a97249002236060daa3fd84" + integrity sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w== + +domelementtype@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.3.0.tgz#5c45e8e869952626331d7aab326d01daf65d589d" + integrity sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw== + +domhandler@^5.0.2, domhandler@^5.0.3: + version "5.0.3" + resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-5.0.3.tgz#cc385f7f751f1d1fc650c21374804254538c7d31" + integrity sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w== + dependencies: + domelementtype "^2.3.0" + +domutils@^3.0.1: + version "3.1.0" + resolved "https://registry.yarnpkg.com/domutils/-/domutils-3.1.0.tgz#c47f551278d3dc4b0b1ab8cbb42d751a6f0d824e" + integrity sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA== + dependencies: + dom-serializer "^2.0.0" + domelementtype "^2.3.0" + domhandler "^5.0.3" + +dot-case@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/dot-case/-/dot-case-2.1.1.tgz#34dcf37f50a8e93c2b3bca8bb7fb9155c7da3bee" + integrity sha512-HnM6ZlFqcajLsyudHq7LeeLDr2rFAVYtDv/hV5qchQEidSck8j9OPUsXY9KwJv/lHMtYlX4DjRQqwFYa+0r8Ug== + dependencies: + no-case "^2.2.0" + +ecc-jsbn@~0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" + integrity sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw== + dependencies: + jsbn "~0.1.0" + safer-buffer "^2.1.0" + +ee-first@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" + integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow== + +elliptic@6.5.4, elliptic@^6.4.0, elliptic@^6.5.2, elliptic@^6.5.4: + version "6.5.4" + resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb" + integrity sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ== + dependencies: + bn.js "^4.11.9" + brorand "^1.1.0" + hash.js "^1.0.0" + hmac-drbg "^1.0.1" + inherits "^2.0.4" + minimalistic-assert "^1.0.1" + minimalistic-crypto-utils "^1.0.1" + +emoji-regex@^7.0.1: + version "7.0.3" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" + integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA== + +emoji-regex@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" + integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== + +encode-utf8@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/encode-utf8/-/encode-utf8-1.0.3.tgz#f30fdd31da07fb596f281beb2f6b027851994cda" + integrity sha512-ucAnuBEhUK4boH2HjVYG5Q2mQyPorvv0u/ocS+zhdw0S8AlHYY+GOFhP1Gio5z4icpP2ivFSvhtFjQi8+T9ppw== + +encodeurl@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" + integrity sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w== + +end-of-stream@^1.1.0: + version "1.4.4" + resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" + integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== + dependencies: + once "^1.4.0" + +enquirer@^2.3.0, enquirer@^2.3.4, enquirer@^2.3.6: + version "2.3.6" + resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.3.6.tgz#2a7fe5dd634a1e4125a975ec994ff5456dc3734d" + integrity sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg== + dependencies: + ansi-colors "^4.1.1" + +entities@^4.2.0, entities@^4.4.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/entities/-/entities-4.5.0.tgz#5d268ea5e7113ec74c4d033b79ea5a35a488fb48" + integrity sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw== + +env-paths@^2.2.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.1.tgz#420399d416ce1fbe9bc0a07c62fa68d67fd0f8f2" + integrity sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A== + +error-ex@^1.2.0: + version "1.3.2" + resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" + integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== + dependencies: + is-arrayish "^0.2.1" + +es-abstract@^1.19.0, es-abstract@^1.20.4, es-abstract@^1.21.2: + version "1.21.2" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.21.2.tgz#a56b9695322c8a185dc25975aa3b8ec31d0e7eff" + integrity sha512-y/B5POM2iBnIxCiernH1G7rC9qQoM77lLIMQLuob0zhp8C56Po81+2Nj0WFKnd0pNReDTnkYryc+zhOzpEIROg== + dependencies: + array-buffer-byte-length "^1.0.0" + available-typed-arrays "^1.0.5" + call-bind "^1.0.2" + es-set-tostringtag "^2.0.1" + es-to-primitive "^1.2.1" + function.prototype.name "^1.1.5" + get-intrinsic "^1.2.0" + get-symbol-description "^1.0.0" + globalthis "^1.0.3" + gopd "^1.0.1" + has "^1.0.3" + has-property-descriptors "^1.0.0" + has-proto "^1.0.1" + has-symbols "^1.0.3" + internal-slot "^1.0.5" + is-array-buffer "^3.0.2" + is-callable "^1.2.7" + is-negative-zero "^2.0.2" + is-regex "^1.1.4" + is-shared-array-buffer "^1.0.2" + is-string "^1.0.7" + is-typed-array "^1.1.10" + is-weakref "^1.0.2" + object-inspect "^1.12.3" + object-keys "^1.1.1" + object.assign "^4.1.4" + regexp.prototype.flags "^1.4.3" + safe-regex-test "^1.0.0" + string.prototype.trim "^1.2.7" + string.prototype.trimend "^1.0.6" + string.prototype.trimstart "^1.0.6" + typed-array-length "^1.0.4" + unbox-primitive "^1.0.2" + which-typed-array "^1.1.9" + +es-array-method-boxes-properly@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz#873f3e84418de4ee19c5be752990b2e44718d09e" + integrity sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA== + +es-set-tostringtag@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz#338d502f6f674301d710b80c8592de8a15f09cd8" + integrity sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg== + dependencies: + get-intrinsic "^1.1.3" + has "^1.0.3" + has-tostringtag "^1.0.0" + +es-to-primitive@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" + integrity sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA== + dependencies: + is-callable "^1.1.4" + is-date-object "^1.0.1" + is-symbol "^1.0.2" + +es5-ext@^0.10.35, es5-ext@^0.10.50: + version "0.10.62" + resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.62.tgz#5e6adc19a6da524bf3d1e02bbc8960e5eb49a9a5" + integrity sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA== + dependencies: + es6-iterator "^2.0.3" + es6-symbol "^3.1.3" + next-tick "^1.1.0" + +es6-iterator@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.3.tgz#a7de889141a05a94b0854403b2d0a0fbfa98f3b7" + integrity sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g== + dependencies: + d "1" + es5-ext "^0.10.35" + es6-symbol "^3.1.1" + +es6-promise@^4.2.8: + version "4.2.8" + resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.8.tgz#4eb21594c972bc40553d276e510539143db53e0a" + integrity sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w== + +es6-symbol@^3.1.1, es6-symbol@^3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.3.tgz#bad5d3c1bcdac28269f4cb331e431c78ac705d18" + integrity sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA== + dependencies: + d "^1.0.1" + ext "^1.1.2" + +escalade@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" + integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== + +escape-html@~1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" + integrity sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow== + +escape-string-regexp@1.0.5, escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== + +escape-string-regexp@4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" + integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== + +escodegen@1.8.x: + version "1.8.1" + resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.8.1.tgz#5a5b53af4693110bebb0867aa3430dd3b70a1018" + integrity sha512-yhi5S+mNTOuRvyW4gWlg5W1byMaQGWWSYHXsuFZ7GBo7tpyOwi2EdzMP/QWxh9hwkD2m+wDVHJsxhRIj+v/b/A== + dependencies: + esprima "^2.7.1" + estraverse "^1.9.1" + esutils "^2.0.2" + optionator "^0.8.1" + optionalDependencies: + source-map "~0.2.0" + +esprima@2.7.x, esprima@^2.7.1: + version "2.7.3" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" + integrity sha512-OarPfz0lFCiW4/AV2Oy1Rp9qu0iusTKqykwTspGCZtPxmF81JR4MmIebvF1F9+UOKth2ZubLQ4XGGaU+hSn99A== + +esprima@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" + integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== + +estraverse@^1.9.1: + version "1.9.3" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-1.9.3.tgz#af67f2dc922582415950926091a4005d29c9bb44" + integrity sha512-25w1fMXQrGdoquWnScXZGckOv+Wes+JDnuN/+7ex3SauFRS72r2lFDec0EKPt2YD1wUJ/IrfEex+9yp4hfSOJA== + +esutils@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" + integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== + +etag@~1.8.1: + version "1.8.1" + resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" + integrity sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg== + +eth-ens-namehash@2.0.8, eth-ens-namehash@^2.0.8: + version "2.0.8" + resolved "https://registry.yarnpkg.com/eth-ens-namehash/-/eth-ens-namehash-2.0.8.tgz#229ac46eca86d52e0c991e7cb2aef83ff0f68bcf" + integrity sha512-VWEI1+KJfz4Km//dadyvBBoBeSQ0MHTXPvr8UIXiLW6IanxvAV+DmlZAijZwAyggqGUfwQBeHf7tc9wzc1piSw== + dependencies: + idna-uts46-hx "^2.3.1" + js-sha3 "^0.5.7" + +eth-gas-reporter@^0.2.25: + version "0.2.25" + resolved "https://registry.yarnpkg.com/eth-gas-reporter/-/eth-gas-reporter-0.2.25.tgz#546dfa946c1acee93cb1a94c2a1162292d6ff566" + integrity sha512-1fRgyE4xUB8SoqLgN3eDfpDfwEfRxh2Sz1b7wzFbyQA+9TekMmvSjjoRu9SKcSVyK+vLkLIsVbJDsTWjw195OQ== + dependencies: + "@ethersproject/abi" "^5.0.0-beta.146" + "@solidity-parser/parser" "^0.14.0" + cli-table3 "^0.5.0" + colors "1.4.0" + ethereum-cryptography "^1.0.3" + ethers "^4.0.40" + fs-readdir-recursive "^1.1.0" + lodash "^4.17.14" + markdown-table "^1.1.3" + mocha "^7.1.1" + req-cwd "^2.0.0" + request "^2.88.0" + request-promise-native "^1.0.5" + sha1 "^1.1.1" + sync-request "^6.0.0" + +eth-lib@0.2.8: + version "0.2.8" + resolved "https://registry.yarnpkg.com/eth-lib/-/eth-lib-0.2.8.tgz#b194058bef4b220ad12ea497431d6cb6aa0623c8" + integrity sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw== + dependencies: + bn.js "^4.11.6" + elliptic "^6.4.0" + xhr-request-promise "^0.1.2" + +eth-lib@^0.1.26: + version "0.1.29" + resolved "https://registry.yarnpkg.com/eth-lib/-/eth-lib-0.1.29.tgz#0c11f5060d42da9f931eab6199084734f4dbd1d9" + integrity sha512-bfttrr3/7gG4E02HoWTDUcDDslN003OlOoBxk9virpAZQ1ja/jDgwkWB8QfJF7ojuEowrqy+lzp9VcJG7/k5bQ== + dependencies: + bn.js "^4.11.6" + elliptic "^6.4.0" + nano-json-stream-parser "^0.1.2" + servify "^0.1.12" + ws "^3.0.0" + xhr-request-promise "^0.1.2" + +ethereum-bloom-filters@^1.0.6: + version "1.0.10" + resolved "https://registry.yarnpkg.com/ethereum-bloom-filters/-/ethereum-bloom-filters-1.0.10.tgz#3ca07f4aed698e75bd134584850260246a5fed8a" + integrity sha512-rxJ5OFN3RwjQxDcFP2Z5+Q9ho4eIdEmSc2ht0fCu8Se9nbXjZ7/031uXoUYJ87KHCOdVeiUuwSnoS7hmYAGVHA== + dependencies: + js-sha3 "^0.8.0" + +ethereum-cryptography@0.1.3, ethereum-cryptography@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz#8d6143cfc3d74bf79bbd8edecdf29e4ae20dd191" + integrity sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ== + dependencies: + "@types/pbkdf2" "^3.0.0" + "@types/secp256k1" "^4.0.1" + blakejs "^1.1.0" + browserify-aes "^1.2.0" + bs58check "^2.1.2" + create-hash "^1.2.0" + create-hmac "^1.1.7" + hash.js "^1.1.7" + keccak "^3.0.0" + pbkdf2 "^3.0.17" + randombytes "^2.1.0" + safe-buffer "^5.1.2" + scrypt-js "^3.0.0" + secp256k1 "^4.0.1" + setimmediate "^1.0.5" + +ethereum-cryptography@^1.0.3: + version "1.2.0" + resolved "https://registry.yarnpkg.com/ethereum-cryptography/-/ethereum-cryptography-1.2.0.tgz#5ccfa183e85fdaf9f9b299a79430c044268c9b3a" + integrity sha512-6yFQC9b5ug6/17CQpCyE3k9eKBMdhyVjzUy1WkiuY/E4vj/SXDBbCw8QEIaXqf0Mf2SnY6RmpDcwlUmBSS0EJw== + dependencies: + "@noble/hashes" "1.2.0" + "@noble/secp256k1" "1.7.1" + "@scure/bip32" "1.1.5" + "@scure/bip39" "1.1.1" + +ethereumjs-abi@^0.6.8: + version "0.6.8" + resolved "https://registry.yarnpkg.com/ethereumjs-abi/-/ethereumjs-abi-0.6.8.tgz#71bc152db099f70e62f108b7cdfca1b362c6fcae" + integrity sha512-Tx0r/iXI6r+lRsdvkFDlut0N08jWMnKRZ6Gkq+Nmw75lZe4e6o3EkSnkaBP5NF6+m5PTGAr9JP43N3LyeoglsA== + dependencies: + bn.js "^4.11.8" + ethereumjs-util "^6.0.0" + +ethereumjs-util@^6.0.0, ethereumjs-util@^6.2.1: + version "6.2.1" + resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz#fcb4e4dd5ceacb9d2305426ab1a5cd93e3163b69" + integrity sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw== + dependencies: + "@types/bn.js" "^4.11.3" + bn.js "^4.11.0" + create-hash "^1.1.2" + elliptic "^6.5.2" + ethereum-cryptography "^0.1.3" + ethjs-util "0.1.6" + rlp "^2.2.3" + +ethereumjs-util@^7.0.3, ethereumjs-util@^7.1.0, ethereumjs-util@^7.1.1, ethereumjs-util@^7.1.2, ethereumjs-util@^7.1.4, ethereumjs-util@^7.1.5: + version "7.1.5" + resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-7.1.5.tgz#9ecf04861e4fbbeed7465ece5f23317ad1129181" + integrity sha512-SDl5kKrQAudFBUe5OJM9Ac6WmMyYmXX/6sTmLZ3ffG2eY6ZIGBes3pEDxNN6V72WyOw4CPD5RomKdsa8DAAwLg== + dependencies: + "@types/bn.js" "^5.1.0" + bn.js "^5.1.2" + create-hash "^1.1.2" + ethereum-cryptography "^0.1.3" + rlp "^2.2.4" + +ethers@5.7.2, ethers@^5.0.13, ethers@^5.5.3, ethers@^5.7.1: + version "5.7.2" + resolved "https://registry.yarnpkg.com/ethers/-/ethers-5.7.2.tgz#3a7deeabbb8c030d4126b24f84e525466145872e" + integrity sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg== + dependencies: + "@ethersproject/abi" "5.7.0" + "@ethersproject/abstract-provider" "5.7.0" + "@ethersproject/abstract-signer" "5.7.0" + "@ethersproject/address" "5.7.0" + "@ethersproject/base64" "5.7.0" + "@ethersproject/basex" "5.7.0" + "@ethersproject/bignumber" "5.7.0" + "@ethersproject/bytes" "5.7.0" + "@ethersproject/constants" "5.7.0" + "@ethersproject/contracts" "5.7.0" + "@ethersproject/hash" "5.7.0" + "@ethersproject/hdnode" "5.7.0" + "@ethersproject/json-wallets" "5.7.0" + "@ethersproject/keccak256" "5.7.0" + "@ethersproject/logger" "5.7.0" + "@ethersproject/networks" "5.7.1" + "@ethersproject/pbkdf2" "5.7.0" + "@ethersproject/properties" "5.7.0" + "@ethersproject/providers" "5.7.2" + "@ethersproject/random" "5.7.0" + "@ethersproject/rlp" "5.7.0" + "@ethersproject/sha2" "5.7.0" + "@ethersproject/signing-key" "5.7.0" + "@ethersproject/solidity" "5.7.0" + "@ethersproject/strings" "5.7.0" + "@ethersproject/transactions" "5.7.0" + "@ethersproject/units" "5.7.0" + "@ethersproject/wallet" "5.7.0" + "@ethersproject/web" "5.7.1" + "@ethersproject/wordlists" "5.7.0" + +ethers@^4.0.32, ethers@^4.0.40: + version "4.0.49" + resolved "https://registry.yarnpkg.com/ethers/-/ethers-4.0.49.tgz#0eb0e9161a0c8b4761be547396bbe2fb121a8894" + integrity sha512-kPltTvWiyu+OktYy1IStSO16i2e7cS9D9OxZ81q2UUaiNPVrm/RTcbxamCXF9VUSKzJIdJV68EAIhTEVBalRWg== + dependencies: + aes-js "3.0.0" + bn.js "^4.11.9" + elliptic "6.5.4" + hash.js "1.1.3" + js-sha3 "0.5.7" + scrypt-js "2.0.4" + setimmediate "1.0.4" + uuid "2.0.1" + xmlhttprequest "1.8.0" + +ethjs-abi@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/ethjs-abi/-/ethjs-abi-0.2.1.tgz#e0a7a93a7e81163a94477bad56ede524ab6de533" + integrity sha512-g2AULSDYI6nEJyJaEVEXtTimRY2aPC2fi7ddSy0W+LXvEVL8Fe1y76o43ecbgdUKwZD+xsmEgX1yJr1Ia3r1IA== + dependencies: + bn.js "4.11.6" + js-sha3 "0.5.5" + number-to-bn "1.7.0" + +ethjs-unit@0.1.6: + version "0.1.6" + resolved "https://registry.yarnpkg.com/ethjs-unit/-/ethjs-unit-0.1.6.tgz#c665921e476e87bce2a9d588a6fe0405b2c41699" + integrity sha512-/Sn9Y0oKl0uqQuvgFk/zQgR7aw1g36qX/jzSQ5lSwlO0GigPymk4eGQfeNTD03w1dPOqfz8V77Cy43jH56pagw== + dependencies: + bn.js "4.11.6" + number-to-bn "1.7.0" + +ethjs-util@0.1.6, ethjs-util@^0.1.6: + version "0.1.6" + resolved "https://registry.yarnpkg.com/ethjs-util/-/ethjs-util-0.1.6.tgz#f308b62f185f9fe6237132fb2a9818866a5cd536" + integrity sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w== + dependencies: + is-hex-prefixed "1.0.0" + strip-hex-prefix "1.0.0" + +event-target-shim@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789" + integrity sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ== + +eventemitter3@4.0.4: + version "4.0.4" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.4.tgz#b5463ace635a083d018bdc7c917b4c5f10a85384" + integrity sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ== + +evp_bytestokey@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02" + integrity sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA== + dependencies: + md5.js "^1.3.4" + safe-buffer "^5.1.1" + +express@^4.14.0: + version "4.18.2" + resolved "https://registry.yarnpkg.com/express/-/express-4.18.2.tgz#3fabe08296e930c796c19e3c516979386ba9fd59" + integrity sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ== + dependencies: + accepts "~1.3.8" + array-flatten "1.1.1" + body-parser "1.20.1" + content-disposition "0.5.4" + content-type "~1.0.4" + cookie "0.5.0" + cookie-signature "1.0.6" + debug "2.6.9" + depd "2.0.0" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + finalhandler "1.2.0" + fresh "0.5.2" + http-errors "2.0.0" + merge-descriptors "1.0.1" + methods "~1.1.2" + on-finished "2.4.1" + parseurl "~1.3.3" + path-to-regexp "0.1.7" + proxy-addr "~2.0.7" + qs "6.11.0" + range-parser "~1.2.1" + safe-buffer "5.2.1" + send "0.18.0" + serve-static "1.15.0" + setprototypeof "1.2.0" + statuses "2.0.1" + type-is "~1.6.18" + utils-merge "1.0.1" + vary "~1.1.2" + +ext@^1.1.2: + version "1.7.0" + resolved "https://registry.yarnpkg.com/ext/-/ext-1.7.0.tgz#0ea4383c0103d60e70be99e9a7f11027a33c4f5f" + integrity sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw== + dependencies: + type "^2.7.2" + +extend@~3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" + integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== + +extsprintf@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" + integrity sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g== + +extsprintf@^1.2.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.1.tgz#8d172c064867f235c0c84a596806d279bf4bcc07" + integrity sha512-Wrk35e8ydCKDj/ArClo1VrPVmN8zph5V4AtHwIuHhvMXsKf73UT3BOD+azBIW+3wOJ4FhEH7zyaJCFvChjYvMA== + +fast-check@3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/fast-check/-/fast-check-3.1.1.tgz#72c5ae7022a4e86504762e773adfb8a5b0b01252" + integrity sha512-3vtXinVyuUKCKFKYcwXhGE6NtGWkqF8Yh3rvMZNzmwz8EPrgoc/v4pDdLHyLnCyCI5MZpZZkDEwFyXyEONOxpA== + dependencies: + pure-rand "^5.0.1" + +fast-deep-equal@^3.1.1: + version "3.1.3" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" + integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== + +fast-glob@^3.0.3: + version "3.2.12" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.12.tgz#7f39ec99c2e6ab030337142da9e0c18f37afae80" + integrity sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w== + dependencies: + "@nodelib/fs.stat" "^2.0.2" + "@nodelib/fs.walk" "^1.2.3" + glob-parent "^5.1.2" + merge2 "^1.3.0" + micromatch "^4.0.4" + +fast-json-stable-stringify@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" + integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== + +fast-levenshtein@~2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" + integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== + +fastq@^1.6.0: + version "1.15.0" + resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.15.0.tgz#d04d07c6a2a68fe4599fea8d2e103a937fae6b3a" + integrity sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw== + dependencies: + reusify "^1.0.4" + +fill-range@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" + integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== + dependencies: + to-regex-range "^5.0.1" + +finalhandler@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.2.0.tgz#7d23fe5731b207b4640e4fcd00aec1f9207a7b32" + integrity sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg== + dependencies: + debug "2.6.9" + encodeurl "~1.0.2" + escape-html "~1.0.3" + on-finished "2.4.1" + parseurl "~1.3.3" + statuses "2.0.1" + unpipe "~1.0.0" + +find-replace@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/find-replace/-/find-replace-3.0.0.tgz#3e7e23d3b05167a76f770c9fbd5258b0def68c38" + integrity sha512-6Tb2myMioCAgv5kfvP5/PkZZ/ntTpVK39fHY7WkWBgvbeE+VHd/tZuZ4mrC+bxh4cfOZeYKVPaJIZtZXV7GNCQ== + dependencies: + array-back "^3.0.1" + +find-up@3.0.0, find-up@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" + integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg== + dependencies: + locate-path "^3.0.0" + +find-up@5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" + integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== + dependencies: + locate-path "^6.0.0" + path-exists "^4.0.0" + +find-up@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" + integrity sha512-jvElSjyuo4EMQGoTwo1uJU5pQMwTW5lS1x05zzfJuTIyLR3zwO27LYrxNg+dlvKpGOuGy/MzBdXh80g0ve5+HA== + dependencies: + path-exists "^2.0.0" + pinkie-promise "^2.0.0" + +find-up@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" + integrity sha512-NWzkk0jSJtTt08+FBFMvXoeZnOJD+jTtsRmBYbAIzJdX6l7dLgR7CTubCM5/eDdPUBvLCeVasP1brfVR/9/EZQ== + dependencies: + locate-path "^2.0.0" + +find-up@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" + integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== + dependencies: + locate-path "^5.0.0" + path-exists "^4.0.0" + +flat@^4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/flat/-/flat-4.1.1.tgz#a392059cc382881ff98642f5da4dde0a959f309b" + integrity sha512-FmTtBsHskrU6FJ2VxCnsDb84wu9zhmO3cUX2kGFb5tuwhfXxGciiT0oRY+cck35QmG+NmGh5eLz6lLCpWTqwpA== + dependencies: + is-buffer "~2.0.3" + +flat@^5.0.2: + version "5.0.2" + resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241" + integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== + +fmix@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/fmix/-/fmix-0.1.0.tgz#c7bbf124dec42c9d191cfb947d0a9778dd986c0c" + integrity sha512-Y6hyofImk9JdzU8k5INtTXX1cu8LDlePWDFU5sftm9H+zKCr5SGrVjdhkvsim646cw5zD0nADj8oHyXMZmCZ9w== + dependencies: + imul "^1.0.0" + +follow-redirects@^1.12.1, follow-redirects@^1.14.0: + version "1.15.2" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.2.tgz#b460864144ba63f2681096f274c4e57026da2c13" + integrity sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA== + +for-each@^0.3.3: + version "0.3.3" + resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e" + integrity sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw== + dependencies: + is-callable "^1.1.3" + +forever-agent@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" + integrity sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw== + +form-data-encoder@1.7.1: + version "1.7.1" + resolved "https://registry.yarnpkg.com/form-data-encoder/-/form-data-encoder-1.7.1.tgz#ac80660e4f87ee0d3d3c3638b7da8278ddb8ec96" + integrity sha512-EFRDrsMm/kyqbTQocNvRXMLjc7Es2Vk+IQFx/YW7hkUH1eBl4J1fqiP34l74Yt0pFLCNpc06fkbVk00008mzjg== + +form-data@^2.2.0: + version "2.5.1" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.5.1.tgz#f2cbec57b5e59e23716e128fe44d4e5dd23895f4" + integrity sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.6" + mime-types "^2.1.12" + +form-data@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452" + integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.8" + mime-types "^2.1.12" + +form-data@~2.3.2: + version "2.3.3" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" + integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.6" + mime-types "^2.1.12" + +forwarded@0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.2.0.tgz#2269936428aad4c15c7ebe9779a84bf0b2a81811" + integrity sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow== + +fp-ts@1.19.3: + version "1.19.3" + resolved "https://registry.yarnpkg.com/fp-ts/-/fp-ts-1.19.3.tgz#261a60d1088fbff01f91256f91d21d0caaaaa96f" + integrity sha512-H5KQDspykdHuztLTg+ajGN0Z2qUjcEf3Ybxc6hLt0k7/zPkn29XnKnxlBPyW2XIddWrGaJBzBl4VLYOtk39yZg== + +fp-ts@^1.0.0: + version "1.19.5" + resolved "https://registry.yarnpkg.com/fp-ts/-/fp-ts-1.19.5.tgz#3da865e585dfa1fdfd51785417357ac50afc520a" + integrity sha512-wDNqTimnzs8QqpldiId9OavWK2NptormjXnRJTQecNjzwfyp6P/8s/zG8e4h3ja3oqkKaY72UlTjQYt/1yXf9A== + +fresh@0.5.2: + version "0.5.2" + resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" + integrity sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q== + +fs-extra@^0.30.0: + version "0.30.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-0.30.0.tgz#f233ffcc08d4da7d432daa449776989db1df93f0" + integrity sha512-UvSPKyhMn6LEd/WpUaV9C9t3zATuqoqfWc3QdPhPLb58prN9tqYPlPWi8Krxi44loBoUzlobqZ3+8tGpxxSzwA== + dependencies: + graceful-fs "^4.1.2" + jsonfile "^2.1.0" + klaw "^1.0.0" + path-is-absolute "^1.0.0" + rimraf "^2.2.8" + +fs-extra@^10.0.0: + version "10.1.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-10.1.0.tgz#02873cfbc4084dde127eaa5f9905eef2325d1abf" + integrity sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ== + dependencies: + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^2.0.0" + +fs-extra@^4.0.2: + version "4.0.3" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.3.tgz#0d852122e5bc5beb453fb028e9c0c9bf36340c94" + integrity sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg== + dependencies: + graceful-fs "^4.1.2" + jsonfile "^4.0.0" + universalify "^0.1.0" + +fs-extra@^7.0.0, fs-extra@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9" + integrity sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw== + dependencies: + graceful-fs "^4.1.2" + jsonfile "^4.0.0" + universalify "^0.1.0" + +fs-extra@^8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0" + integrity sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g== + dependencies: + graceful-fs "^4.2.0" + jsonfile "^4.0.0" + universalify "^0.1.0" + +fs-extra@^9.1.0: + version "9.1.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.1.0.tgz#5954460c764a8da2094ba3554bf839e6b9a7c86d" + integrity sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ== + dependencies: + at-least-node "^1.0.0" + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^2.0.0" + +fs-minipass@^1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.7.tgz#ccff8570841e7fe4265693da88936c55aed7f7c7" + integrity sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA== + dependencies: + minipass "^2.6.0" + +fs-readdir-recursive@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz#e32fc030a2ccee44a6b5371308da54be0b397d27" + integrity sha512-GNanXlVr2pf02+sPN40XN8HG+ePaNcvM0q5mZBd668Obwb0yD5GiUbZOFgwn8kGMY6I3mdyDJzieUy3PTYyTRA== + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== + +fsevents@~2.1.1: + version "2.1.3" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.3.tgz#fb738703ae8d2f9fe900c33836ddebee8b97f23e" + integrity sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ== + +fsevents@~2.3.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" + integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== + +function-bind@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" + integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== + +function.prototype.name@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.1.5.tgz#cce0505fe1ffb80503e6f9e46cc64e46a12a9621" + integrity sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.19.0" + functions-have-names "^1.2.2" + +functional-red-black-tree@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" + integrity sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g== + +functions-have-names@^1.2.2, functions-have-names@^1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" + integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ== + +get-caller-file@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a" + integrity sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w== + +get-caller-file@^2.0.1, get-caller-file@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" + integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== + +get-func-name@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.0.tgz#ead774abee72e20409433a066366023dd6887a41" + integrity sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig== + +get-intrinsic@^1.0.2, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3, get-intrinsic@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.0.tgz#7ad1dc0535f3a2904bba075772763e5051f6d05f" + integrity sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q== + dependencies: + function-bind "^1.1.1" + has "^1.0.3" + has-symbols "^1.0.3" + +get-port@^3.1.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/get-port/-/get-port-3.2.0.tgz#dd7ce7de187c06c8bf353796ac71e099f0980ebc" + integrity sha512-x5UJKlgeUiNT8nyo/AcnwLnZuZNcSjSw0kogRB+Whd1fjjFq4B1hySFxSFWWSn4mIBzg3sRNUDFYc4g5gjPoLg== + +get-stream@^5.1.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.2.0.tgz#4966a1795ee5ace65e706c4b7beb71257d6e22d3" + integrity sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA== + dependencies: + pump "^3.0.0" + +get-stream@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" + integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== + +get-symbol-description@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/get-symbol-description/-/get-symbol-description-1.0.0.tgz#7fdb81c900101fbd564dd5f1a30af5aadc1e58d6" + integrity sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.1.1" + +getpass@^0.1.1: + version "0.1.7" + resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" + integrity sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng== + dependencies: + assert-plus "^1.0.0" + +ghost-testrpc@^0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/ghost-testrpc/-/ghost-testrpc-0.0.2.tgz#c4de9557b1d1ae7b2d20bbe474a91378ca90ce92" + integrity sha512-i08dAEgJ2g8z5buJIrCTduwPIhih3DP+hOCTyyryikfV8T0bNvHnGXO67i0DD1H4GBDETTclPy9njZbfluQYrQ== + dependencies: + chalk "^2.4.2" + node-emoji "^1.10.0" + +glob-parent@^5.1.2, glob-parent@~5.1.0, glob-parent@~5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" + integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== + dependencies: + is-glob "^4.0.1" + +glob@7.1.3: + version "7.1.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1" + integrity sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +glob@7.1.7: + version "7.1.7" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.7.tgz#3b193e9233f01d42d0b3f78294bbeeb418f94a90" + integrity sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +glob@7.2.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023" + integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +glob@^5.0.15: + version "5.0.15" + resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1" + integrity sha512-c9IPMazfRITpmAAKi22dK1VKxGDX9ehhqfABDriL/lzO92xcUKEJPQHrVA/2YHSNFB4iFlykVmWvwo48nr3OxA== + dependencies: + inflight "^1.0.4" + inherits "2" + minimatch "2 || 3" + once "^1.3.0" + path-is-absolute "^1.0.0" + +glob@^7.0.0, glob@^7.1.3: + version "7.2.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" + integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.1.1" + once "^1.3.0" + path-is-absolute "^1.0.0" + +global-modules@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-2.0.0.tgz#997605ad2345f27f51539bea26574421215c7780" + integrity sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A== + dependencies: + global-prefix "^3.0.0" + +global-prefix@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/global-prefix/-/global-prefix-3.0.0.tgz#fc85f73064df69f50421f47f883fe5b913ba9b97" + integrity sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg== + dependencies: + ini "^1.3.5" + kind-of "^6.0.2" + which "^1.3.1" + +global@~4.4.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/global/-/global-4.4.0.tgz#3e7b105179006a323ed71aafca3e9c57a5cc6406" + integrity sha512-wv/LAoHdRE3BeTGz53FAamhGlPLhlssK45usmGFThIi4XqnBmjKQ16u+RNbP7WvigRZDxUsM0J3gcQ5yicaL0w== + dependencies: + min-document "^2.19.0" + process "^0.11.10" + +globalthis@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/globalthis/-/globalthis-1.0.3.tgz#5852882a52b80dc301b0660273e1ed082f0b6ccf" + integrity sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA== + dependencies: + define-properties "^1.1.3" + +globby@^10.0.1: + version "10.0.2" + resolved "https://registry.yarnpkg.com/globby/-/globby-10.0.2.tgz#277593e745acaa4646c3ab411289ec47a0392543" + integrity sha512-7dUi7RvCoT/xast/o/dLN53oqND4yk0nsHkhRgn9w65C4PofCLOoJ39iSOg+qVDdWQPIEj+eszMHQ+aLVwwQSg== + dependencies: + "@types/glob" "^7.1.1" + array-union "^2.1.0" + dir-glob "^3.0.1" + fast-glob "^3.0.3" + glob "^7.1.3" + ignore "^5.1.1" + merge2 "^1.2.3" + slash "^3.0.0" + +gopd@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.0.1.tgz#29ff76de69dac7489b7c0918a5788e56477c332c" + integrity sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA== + dependencies: + get-intrinsic "^1.1.3" + +got@12.1.0: + version "12.1.0" + resolved "https://registry.yarnpkg.com/got/-/got-12.1.0.tgz#099f3815305c682be4fd6b0ee0726d8e4c6b0af4" + integrity sha512-hBv2ty9QN2RdbJJMK3hesmSkFTjVIHyIDDbssCKnSmq62edGgImJWD10Eb1k77TiV1bxloxqcFAVK8+9pkhOig== + dependencies: + "@sindresorhus/is" "^4.6.0" + "@szmarczak/http-timer" "^5.0.1" + "@types/cacheable-request" "^6.0.2" + "@types/responselike" "^1.0.0" + cacheable-lookup "^6.0.4" + cacheable-request "^7.0.2" + decompress-response "^6.0.0" + form-data-encoder "1.7.1" + get-stream "^6.0.1" + http2-wrapper "^2.1.10" + lowercase-keys "^3.0.0" + p-cancelable "^3.0.0" + responselike "^2.0.0" + +got@^11.8.5: + version "11.8.6" + resolved "https://registry.yarnpkg.com/got/-/got-11.8.6.tgz#276e827ead8772eddbcfc97170590b841823233a" + integrity sha512-6tfZ91bOr7bOXnK7PRDCGBLa1H4U080YHNaAQ2KsMGlLEzRbk44nsZF2E1IeRc3vtJHPVbKCYgdFbaGO2ljd8g== + dependencies: + "@sindresorhus/is" "^4.0.0" + "@szmarczak/http-timer" "^4.0.5" + "@types/cacheable-request" "^6.0.1" + "@types/responselike" "^1.0.0" + cacheable-lookup "^5.0.3" + cacheable-request "^7.0.2" + decompress-response "^6.0.0" + http2-wrapper "^1.0.0-beta.5.2" + lowercase-keys "^2.0.0" + p-cancelable "^2.0.0" + responselike "^2.0.0" + +graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9, graceful-fs@^4.2.0, graceful-fs@^4.2.4: + version "4.2.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" + integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== + +growl@1.10.5: + version "1.10.5" + resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e" + integrity sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA== + +handlebars@^4.0.1: + version "4.7.7" + resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.7.tgz#9ce33416aad02dbd6c8fafa8240d5d98004945a1" + integrity sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA== + dependencies: + minimist "^1.2.5" + neo-async "^2.6.0" + source-map "^0.6.1" + wordwrap "^1.0.0" + optionalDependencies: + uglify-js "^3.1.4" + +har-schema@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" + integrity sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q== + +har-validator@~5.1.3: + version "5.1.5" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.5.tgz#1f0803b9f8cb20c0fa13822df1ecddb36bde1efd" + integrity sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w== + dependencies: + ajv "^6.12.3" + har-schema "^2.0.0" + +hardhat-deploy@^0.11.29: + version "0.11.29" + resolved "https://registry.yarnpkg.com/hardhat-deploy/-/hardhat-deploy-0.11.29.tgz#e6d76e37fa2ed74d76d15b01f3849da3bda49a81" + integrity sha512-9F+MRFkEocelzB8d+SDDCcTL7edBYAj2S63ldknvfIIBSajeB6q1/jm+dlK1GjcWzAzw7EVoxtjJXzxAxZfZcg== + dependencies: + "@ethersproject/abi" "^5.7.0" + "@ethersproject/abstract-signer" "^5.7.0" + "@ethersproject/address" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/contracts" "^5.7.0" + "@ethersproject/providers" "^5.7.2" + "@ethersproject/solidity" "^5.7.0" + "@ethersproject/transactions" "^5.7.0" + "@ethersproject/wallet" "^5.7.0" + "@types/qs" "^6.9.7" + axios "^0.21.1" + chalk "^4.1.2" + chokidar "^3.5.2" + debug "^4.3.2" + enquirer "^2.3.6" + ethers "^5.5.3" + form-data "^4.0.0" + fs-extra "^10.0.0" + match-all "^1.2.6" + murmur-128 "^0.2.1" + qs "^6.9.4" + zksync-web3 "^0.14.3" + +hardhat-gas-reporter@^1.0.8: + version "1.0.9" + resolved "https://registry.yarnpkg.com/hardhat-gas-reporter/-/hardhat-gas-reporter-1.0.9.tgz#9a2afb354bc3b6346aab55b1c02ca556d0e16450" + integrity sha512-INN26G3EW43adGKBNzYWOlI3+rlLnasXTwW79YNnUhXPDa+yHESgt639dJEs37gCjhkbNKcRRJnomXEuMFBXJg== + dependencies: + array-uniq "1.0.3" + eth-gas-reporter "^0.2.25" + sha1 "^1.1.1" + +hardhat-shorthand@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/hardhat-shorthand/-/hardhat-shorthand-1.0.0.tgz#ccc059c7e03115222b879c0347a18d20d0b31e3a" + integrity sha512-ixvUHrZBfGRXXrerBziNwGFmQZtz8iX43z2mJZTPnQasoaDbZ7oDZ4FqqI80EmZvP0hIml4wgpiQhrE3P/eqXQ== + dependencies: + "@fvictorio/tabtab" "^0.0.3" + debug "^4.1.1" + semver "^6.3.0" + +hardhat@^2.11.1: + version "2.14.0" + resolved "https://registry.yarnpkg.com/hardhat/-/hardhat-2.14.0.tgz#b60c74861494aeb1b50803cf04cc47865a42b87a" + integrity sha512-73jsInY4zZahMSVFurSK+5TNCJTXMv+vemvGia0Ac34Mm19fYp6vEPVGF3sucbumszsYxiTT2TbS8Ii2dsDSoQ== + dependencies: + "@ethersproject/abi" "^5.1.2" + "@metamask/eth-sig-util" "^4.0.0" + "@nomicfoundation/ethereumjs-block" "5.0.1" + "@nomicfoundation/ethereumjs-blockchain" "7.0.1" + "@nomicfoundation/ethereumjs-common" "4.0.1" + "@nomicfoundation/ethereumjs-evm" "2.0.1" + "@nomicfoundation/ethereumjs-rlp" "5.0.1" + "@nomicfoundation/ethereumjs-statemanager" "2.0.1" + "@nomicfoundation/ethereumjs-trie" "6.0.1" + "@nomicfoundation/ethereumjs-tx" "5.0.1" + "@nomicfoundation/ethereumjs-util" "9.0.1" + "@nomicfoundation/ethereumjs-vm" "7.0.1" + "@nomicfoundation/solidity-analyzer" "^0.1.0" + "@sentry/node" "^5.18.1" + "@types/bn.js" "^5.1.0" + "@types/lru-cache" "^5.1.0" + abort-controller "^3.0.0" + adm-zip "^0.4.16" + aggregate-error "^3.0.0" + ansi-escapes "^4.3.0" + chalk "^2.4.2" + chokidar "^3.4.0" + ci-info "^2.0.0" + debug "^4.1.1" + enquirer "^2.3.0" + env-paths "^2.2.0" + ethereum-cryptography "^1.0.3" + ethereumjs-abi "^0.6.8" + find-up "^2.1.0" + fp-ts "1.19.3" + fs-extra "^7.0.1" + glob "7.2.0" + immutable "^4.0.0-rc.12" + io-ts "1.10.4" + keccak "^3.0.2" + lodash "^4.17.11" + mnemonist "^0.38.0" + mocha "^10.0.0" + p-map "^4.0.0" + qs "^6.7.0" + raw-body "^2.4.1" + resolve "1.17.0" + semver "^6.3.0" + solc "0.7.3" + source-map-support "^0.5.13" + stacktrace-parser "^0.1.10" + tsort "0.0.1" + undici "^5.14.0" + uuid "^8.3.2" + ws "^7.4.6" + +has-bigints@^1.0.1, has-bigints@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.2.tgz#0871bd3e3d51626f6ca0966668ba35d5602d6eaa" + integrity sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ== + +has-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" + integrity sha512-DyYHfIYwAJmjAjSSPKANxI8bFY9YtFrgkAfinBojQ8YJTOuOuav64tMUJv584SES4xl74PmuaevIyaLESHdTAA== + +has-flag@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + integrity sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw== + +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== + +has-property-descriptors@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz#610708600606d36961ed04c196193b6a607fa861" + integrity sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ== + dependencies: + get-intrinsic "^1.1.1" + +has-proto@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.1.tgz#1885c1305538958aff469fef37937c22795408e0" + integrity sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg== + +has-symbols@^1.0.0, has-symbols@^1.0.2, has-symbols@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" + integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== + +has-tostringtag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.0.tgz#7e133818a7d394734f941e73c3d3f9291e658b25" + integrity sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ== + dependencies: + has-symbols "^1.0.2" + +has@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" + integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== + dependencies: + function-bind "^1.1.1" + +hash-base@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.1.0.tgz#55c381d9e06e1d2997a883b4a3fddfe7f0d3af33" + integrity sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA== + dependencies: + inherits "^2.0.4" + readable-stream "^3.6.0" + safe-buffer "^5.2.0" + +hash.js@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.3.tgz#340dedbe6290187151c1ea1d777a3448935df846" + integrity sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA== + dependencies: + inherits "^2.0.3" + minimalistic-assert "^1.0.0" + +hash.js@1.1.7, hash.js@^1.0.0, hash.js@^1.0.3, hash.js@^1.1.7: + version "1.1.7" + resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" + integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== + dependencies: + inherits "^2.0.3" + minimalistic-assert "^1.0.1" + +he@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" + integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== + +header-case@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/header-case/-/header-case-1.0.1.tgz#9535973197c144b09613cd65d317ef19963bd02d" + integrity sha512-i0q9mkOeSuhXw6bGgiQCCBgY/jlZuV/7dZXyZ9c6LcBrqwvT8eT719E9uxE5LiZftdl+z81Ugbg/VvXV4OJOeQ== + dependencies: + no-case "^2.2.0" + upper-case "^1.1.3" + +"heap@>= 0.2.0": + version "0.2.7" + resolved "https://registry.yarnpkg.com/heap/-/heap-0.2.7.tgz#1e6adf711d3f27ce35a81fe3b7bd576c2260a8fc" + integrity sha512-2bsegYkkHO+h/9MGbn6KWcE45cHZgPANo5LXF7EvWdT0yT2EguSVO1nDgU5c8+ZOPwp2vMNa7YFsJhVcDR9Sdg== + +highlight.js@^10.4.1: + version "10.7.3" + resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-10.7.3.tgz#697272e3991356e40c3cac566a74eef681756531" + integrity sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A== + +highlightjs-solidity@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/highlightjs-solidity/-/highlightjs-solidity-2.0.6.tgz#e7a702a2b05e0a97f185e6ba39fd4846ad23a990" + integrity sha512-DySXWfQghjm2l6a/flF+cteroJqD4gI8GSdL4PtvxZSsAHie8m3yVe2JFoRg03ROKT6hp2Lc/BxXkqerNmtQYg== + +hmac-drbg@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" + integrity sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg== + dependencies: + hash.js "^1.0.3" + minimalistic-assert "^1.0.0" + minimalistic-crypto-utils "^1.0.1" + +hosted-git-info@^2.1.4: + version "2.8.9" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.9.tgz#dffc0bf9a21c02209090f2aa69429e1414daf3f9" + integrity sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw== + +htmlparser2@^8.0.1: + version "8.0.2" + resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-8.0.2.tgz#f002151705b383e62433b5cf466f5b716edaec21" + integrity sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA== + dependencies: + domelementtype "^2.3.0" + domhandler "^5.0.3" + domutils "^3.0.1" + entities "^4.4.0" + +http-basic@^8.1.1: + version "8.1.3" + resolved "https://registry.yarnpkg.com/http-basic/-/http-basic-8.1.3.tgz#a7cabee7526869b9b710136970805b1004261bbf" + integrity sha512-/EcDMwJZh3mABI2NhGfHOGOeOZITqfkEO4p/xK+l3NpyncIHUQBoMvCSF/b5GqvKtySC2srL/GGG3+EtlqlmCw== + dependencies: + caseless "^0.12.0" + concat-stream "^1.6.2" + http-response-object "^3.0.1" + parse-cache-control "^1.0.1" + +http-cache-semantics@^4.0.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz#abe02fcb2985460bf0323be664436ec3476a6d5a" + integrity sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ== + +http-errors@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-2.0.0.tgz#b7774a1486ef73cf7667ac9ae0858c012c57b9d3" + integrity sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ== + dependencies: + depd "2.0.0" + inherits "2.0.4" + setprototypeof "1.2.0" + statuses "2.0.1" + toidentifier "1.0.1" + +http-https@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/http-https/-/http-https-1.0.0.tgz#2f908dd5f1db4068c058cd6e6d4ce392c913389b" + integrity sha512-o0PWwVCSp3O0wS6FvNr6xfBCHgt0m1tvPLFOCc2iFDKTRAXhB7m8klDf7ErowFH8POa6dVdGatKU5I1YYwzUyg== + +http-response-object@^3.0.1: + version "3.0.2" + resolved "https://registry.yarnpkg.com/http-response-object/-/http-response-object-3.0.2.tgz#7f435bb210454e4360d074ef1f989d5ea8aa9810" + integrity sha512-bqX0XTF6fnXSQcEJ2Iuyr75yVakyjIDCqroJQ/aHfSdlM743Cwqoi2nDYMzLGWUcuTWGWy8AAvOKXTfiv6q9RA== + dependencies: + "@types/node" "^10.0.3" + +http-signature@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" + integrity sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ== + dependencies: + assert-plus "^1.0.0" + jsprim "^1.2.2" + sshpk "^1.7.0" + +http2-wrapper@^1.0.0-beta.5.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/http2-wrapper/-/http2-wrapper-1.0.3.tgz#b8f55e0c1f25d4ebd08b3b0c2c079f9590800b3d" + integrity sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg== + dependencies: + quick-lru "^5.1.1" + resolve-alpn "^1.0.0" + +http2-wrapper@^2.1.10: + version "2.2.0" + resolved "https://registry.yarnpkg.com/http2-wrapper/-/http2-wrapper-2.2.0.tgz#b80ad199d216b7d3680195077bd7b9060fa9d7f3" + integrity sha512-kZB0wxMo0sh1PehyjJUWRFEd99KC5TLjZ2cULC4f9iqJBAmKQQXEICjxl5iPJRwP40dpeHFqqhm7tYCvODpqpQ== + dependencies: + quick-lru "^5.1.1" + resolve-alpn "^1.2.0" + +https-proxy-agent@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz#c59ef224a04fe8b754f3db0063a25ea30d0005d6" + integrity sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA== + dependencies: + agent-base "6" + debug "4" + +iconv-lite@0.4.24: + version "0.4.24" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" + integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== + dependencies: + safer-buffer ">= 2.1.2 < 3" + +idna-uts46-hx@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/idna-uts46-hx/-/idna-uts46-hx-2.3.1.tgz#a1dc5c4df37eee522bf66d969cc980e00e8711f9" + integrity sha512-PWoF9Keq6laYdIRwwCdhTPl60xRqAloYNMQLiyUnG42VjT53oW07BXIRM+NK7eQjzXjAk2gUvX9caRxlnF9TAA== + dependencies: + punycode "2.1.0" + +ieee754@^1.1.13, ieee754@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" + integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== + +ignore@^5.1.1: + version "5.2.4" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.4.tgz#a291c0c6178ff1b960befe47fcdec301674a6324" + integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ== + +immutable@^4.0.0-rc.12: + version "4.3.0" + resolved "https://registry.yarnpkg.com/immutable/-/immutable-4.3.0.tgz#eb1738f14ffb39fd068b1dbe1296117484dd34be" + integrity sha512-0AOCmOip+xgJwEVTQj1EfiDDOkPmuyllDuTuEX+DDXUgapLAsBIfkg3sxCYyCEA8mQqZrrxPUGjcOQ2JS3WLkg== + +imul@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/imul/-/imul-1.0.1.tgz#9d5867161e8b3de96c2c38d5dc7cb102f35e2ac9" + integrity sha512-WFAgfwPLAjU66EKt6vRdTlKj4nAgIDQzh29JonLa4Bqtl6D8JrIMvWjCnx7xEjVNmP3U0fM5o8ZObk7d0f62bA== + +indent-string@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251" + integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg== + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.3: + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + +ini@^1.3.5: + version "1.3.8" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" + integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== + +internal-slot@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.5.tgz#f2a2ee21f668f8627a4667f309dc0f4fb6674986" + integrity sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ== + dependencies: + get-intrinsic "^1.2.0" + has "^1.0.3" + side-channel "^1.0.4" + +interpret@^1.0.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.4.0.tgz#665ab8bc4da27a774a40584e812e3e0fa45b1a1e" + integrity sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA== + +invert-kv@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" + integrity sha512-xgs2NH9AE66ucSq4cNG1nhSFghr5l6tdL15Pk+jl46bmmBapgoaY/AacXyaDznAqmGL99TiLSQgO/XazFSKYeQ== + +io-ts@1.10.4: + version "1.10.4" + resolved "https://registry.yarnpkg.com/io-ts/-/io-ts-1.10.4.tgz#cd5401b138de88e4f920adbcb7026e2d1967e6e2" + integrity sha512-b23PteSnYXSONJ6JQXRAlvJhuw8KOtkqa87W4wDtvMrud/DTJd5X+NpOOI+O/zZwVq6v0VLAaJ+1EDViKEuN9g== + dependencies: + fp-ts "^1.0.0" + +ipaddr.js@1.9.1: + version "1.9.1" + resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" + integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== + +is-arguments@^1.0.4: + version "1.1.1" + resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.1.1.tgz#15b3f88fda01f2a97fec84ca761a560f123efa9b" + integrity sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA== + dependencies: + call-bind "^1.0.2" + has-tostringtag "^1.0.0" + +is-array-buffer@^3.0.1, is-array-buffer@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/is-array-buffer/-/is-array-buffer-3.0.2.tgz#f2653ced8412081638ecb0ebbd0c41c6e0aecbbe" + integrity sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.2.0" + is-typed-array "^1.1.10" + +is-arrayish@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + integrity sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg== + +is-bigint@^1.0.1: + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.4.tgz#08147a1875bc2b32005d41ccd8291dffc6691df3" + integrity sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg== + dependencies: + has-bigints "^1.0.1" + +is-binary-path@~2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" + integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== + dependencies: + binary-extensions "^2.0.0" + +is-boolean-object@^1.1.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.1.2.tgz#5c6dc200246dd9321ae4b885a114bb1f75f63719" + integrity sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA== + dependencies: + call-bind "^1.0.2" + has-tostringtag "^1.0.0" + +is-buffer@^2.0.5, is-buffer@~2.0.3: + version "2.0.5" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.5.tgz#ebc252e400d22ff8d77fa09888821a24a658c191" + integrity sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ== + +is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055" + integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== + +is-core-module@^2.11.0: + version "2.12.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.12.0.tgz#36ad62f6f73c8253fd6472517a12483cf03e7ec4" + integrity sha512-RECHCBCd/viahWmwj6enj19sKbHfJrddi/6cBDsNTKbNq0f7VeaUkBo60BqzvPqo/W54ChS62Z5qyun7cfOMqQ== + dependencies: + has "^1.0.3" + +is-date-object@^1.0.1: + version "1.0.5" + resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.5.tgz#0841d5536e724c25597bf6ea62e1bd38298df31f" + integrity sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ== + dependencies: + has-tostringtag "^1.0.0" + +is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== + +is-fullwidth-code-point@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" + integrity sha512-1pqUqRjkhPJ9miNq9SwMfdvi6lBJcd6eFxvfaivQhaH3SgisfiuudvFntdKOmxuee/77l+FPjKrQjWvmPjWrRw== + dependencies: + number-is-nan "^1.0.0" + +is-fullwidth-code-point@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" + integrity sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w== + +is-fullwidth-code-point@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" + integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== + +is-function@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-function/-/is-function-1.0.2.tgz#4f097f30abf6efadac9833b17ca5dc03f8144e08" + integrity sha512-lw7DUp0aWXYg+CBCN+JKkcE0Q2RayZnSvnZBlwgxHBQhqt5pZNVy4Ri7H9GmmXkdu7LUthszM+Tor1u/2iBcpQ== + +is-generator-function@^1.0.7: + version "1.0.10" + resolved "https://registry.yarnpkg.com/is-generator-function/-/is-generator-function-1.0.10.tgz#f1558baf1ac17e0deea7c0415c438351ff2b3c72" + integrity sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A== + dependencies: + has-tostringtag "^1.0.0" + +is-glob@^4.0.1, is-glob@~4.0.1: + version "4.0.3" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" + integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== + dependencies: + is-extglob "^2.1.1" + +is-hex-prefixed@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz#7d8d37e6ad77e5d127148913c573e082d777f554" + integrity sha512-WvtOiug1VFrE9v1Cydwm+FnXd3+w9GaeVUss5W4v/SLy3UW00vP+6iNF2SdnfiBoLy4bTqVdkftNGTUeOFVsbA== + +is-lower-case@^1.1.0: + version "1.1.3" + resolved "https://registry.yarnpkg.com/is-lower-case/-/is-lower-case-1.1.3.tgz#7e147be4768dc466db3bfb21cc60b31e6ad69393" + integrity sha512-+5A1e/WJpLLXZEDlgz4G//WYSHyQBD32qa4Jd3Lw06qQlv3fJHnp3YIHjTQSGzHMgzmVKz2ZP3rBxTHkPw/lxA== + dependencies: + lower-case "^1.1.0" + +is-negative-zero@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.2.tgz#7bf6f03a28003b8b3965de3ac26f664d765f3150" + integrity sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA== + +is-number-object@^1.0.4: + version "1.0.7" + resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.7.tgz#59d50ada4c45251784e9904f5246c742f07a42fc" + integrity sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ== + dependencies: + has-tostringtag "^1.0.0" + +is-number@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== + +is-plain-obj@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287" + integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA== + +is-regex@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958" + integrity sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg== + dependencies: + call-bind "^1.0.2" + has-tostringtag "^1.0.0" + +is-shared-array-buffer@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz#8f259c573b60b6a32d4058a1a07430c0a7344c79" + integrity sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA== + dependencies: + call-bind "^1.0.2" + +is-string@^1.0.5, is-string@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.7.tgz#0dd12bf2006f255bb58f695110eff7491eebc0fd" + integrity sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg== + dependencies: + has-tostringtag "^1.0.0" + +is-symbol@^1.0.2, is-symbol@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.4.tgz#a6dac93b635b063ca6872236de88910a57af139c" + integrity sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg== + dependencies: + has-symbols "^1.0.2" + +is-typed-array@^1.1.10, is-typed-array@^1.1.3, is-typed-array@^1.1.9: + version "1.1.10" + resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.10.tgz#36a5b5cb4189b575d1a3e4b08536bfb485801e3f" + integrity sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A== + dependencies: + available-typed-arrays "^1.0.5" + call-bind "^1.0.2" + for-each "^0.3.3" + gopd "^1.0.1" + has-tostringtag "^1.0.0" + +is-typedarray@^1.0.0, is-typedarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" + integrity sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA== + +is-unicode-supported@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7" + integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw== + +is-upper-case@^1.1.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/is-upper-case/-/is-upper-case-1.1.2.tgz#8d0b1fa7e7933a1e58483600ec7d9661cbaf756f" + integrity sha512-GQYSJMgfeAmVwh9ixyk888l7OIhNAGKtY6QA+IrWlu9MDTCaXmeozOZ2S9Knj7bQwBO/H6J2kb+pbyTUiMNbsw== + dependencies: + upper-case "^1.1.0" + +is-utf8@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" + integrity sha512-rMYPYvCzsXywIsldgLaSoPlw5PfoB/ssr7hY4pLfcodrA5M/eArza1a9VmTiNIBNMjOGr1Ow9mTyU2o69U6U9Q== + +is-weakref@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-weakref/-/is-weakref-1.0.2.tgz#9529f383a9338205e89765e0392efc2f100f06f2" + integrity sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ== + dependencies: + call-bind "^1.0.2" + +isarray@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.5.tgz#8af1e4c1221244cc62459faf38940d4e644a5723" + integrity sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw== + +isarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + integrity sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ== + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== + +isstream@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" + integrity sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g== + +js-sdsl@^4.1.4: + version "4.4.0" + resolved "https://registry.yarnpkg.com/js-sdsl/-/js-sdsl-4.4.0.tgz#8b437dbe642daa95760400b602378ed8ffea8430" + integrity sha512-FfVSdx6pJ41Oa+CF7RDaFmTnCaFhua+SNYQX74riGOpl96x+2jQCqEfQ2bnXu/5DPCqlRuiqyvTJM0Qjz26IVg== + +js-sha3@0.5.5: + version "0.5.5" + resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.5.5.tgz#baf0c0e8c54ad5903447df96ade7a4a1bca79a4a" + integrity sha512-yLLwn44IVeunwjpDVTDZmQeVbB0h+dZpY2eO68B/Zik8hu6dH+rKeLxwua79GGIvW6xr8NBAcrtiUbYrTjEFTA== + +js-sha3@0.5.7, js-sha3@^0.5.7: + version "0.5.7" + resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.5.7.tgz#0d4ffd8002d5333aabaf4a23eed2f6374c9f28e7" + integrity sha512-GII20kjaPX0zJ8wzkTbNDYMY7msuZcTWk8S5UOh6806Jq/wz1J8/bnr8uGU0DAUmYDjj2Mr4X1cW8v/GLYnR+g== + +js-sha3@0.8.0, js-sha3@^0.8.0: + version "0.8.0" + resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.8.0.tgz#b9b7a5da73afad7dedd0f8c463954cbde6818840" + integrity sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q== + +js-yaml@3.13.1: + version "3.13.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847" + integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw== + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + +js-yaml@3.x: + version "3.14.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" + integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + +js-yaml@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" + integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== + dependencies: + argparse "^2.0.1" + +jsbn@~0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" + integrity sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg== + +json-buffer@3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13" + integrity sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ== + +json-schema-traverse@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" + integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== + +json-schema-traverse@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2" + integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug== + +json-schema@0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.4.0.tgz#f7de4cf6efab838ebaeb3236474cbba5a1930ab5" + integrity sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA== + +json-stringify-safe@~5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" + integrity sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA== + +jsonfile@^2.1.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-2.4.0.tgz#3736a2b428b87bbda0cc83b53fa3d633a35c2ae8" + integrity sha512-PKllAqbgLgxHaj8TElYymKCAgrASebJrWpTnEkOaTowt23VKXXN0sUeriJ+eh7y6ufb/CC5ap11pz71/cM0hUw== + optionalDependencies: + graceful-fs "^4.1.6" + +jsonfile@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" + integrity sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg== + optionalDependencies: + graceful-fs "^4.1.6" + +jsonfile@^6.0.1: + version "6.1.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae" + integrity sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ== + dependencies: + universalify "^2.0.0" + optionalDependencies: + graceful-fs "^4.1.6" + +jsonschema@^1.2.4: + version "1.4.1" + resolved "https://registry.yarnpkg.com/jsonschema/-/jsonschema-1.4.1.tgz#cc4c3f0077fb4542982973d8a083b6b34f482dab" + integrity sha512-S6cATIPVv1z0IlxdN+zUk5EPjkGCdnhN4wVSBlvoUO1tOLJootbo9CquNJmbIh4yikWHiUedhRYrNPn1arpEmQ== + +jsprim@^1.2.2: + version "1.4.2" + resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.2.tgz#712c65533a15c878ba59e9ed5f0e26d5b77c5feb" + integrity sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw== + dependencies: + assert-plus "1.0.0" + extsprintf "1.3.0" + json-schema "0.4.0" + verror "1.10.0" + +keccak@^3.0.0, keccak@^3.0.2: + version "3.0.3" + resolved "https://registry.yarnpkg.com/keccak/-/keccak-3.0.3.tgz#4bc35ad917be1ef54ff246f904c2bbbf9ac61276" + integrity sha512-JZrLIAJWuZxKbCilMpNz5Vj7Vtb4scDG3dMXLOsbzBmQGyjwE61BbW7bJkfKKCShXiQZt3T6sBgALRtmd+nZaQ== + dependencies: + node-addon-api "^2.0.0" + node-gyp-build "^4.2.0" + readable-stream "^3.6.0" + +keyv@^4.0.0: + version "4.5.2" + resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.2.tgz#0e310ce73bf7851ec702f2eaf46ec4e3805cce56" + integrity sha512-5MHbFaKn8cNSmVW7BYnijeAVlE4cYA/SVkifVgrh7yotnfhKmjuXpDKjrABLnT0SfHWV21P8ow07OGfRrNDg8g== + dependencies: + json-buffer "3.0.1" + +kind-of@^6.0.2: + version "6.0.3" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" + integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== + +klaw@^1.0.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/klaw/-/klaw-1.3.1.tgz#4088433b46b3b1ba259d78785d8e96f73ba02439" + integrity sha512-TED5xi9gGQjGpNnvRWknrwAB1eL5GciPfVFOt3Vk1OJCVDQbzuSfrF3hkUQKlsgKrG1F+0t5W0m+Fje1jIt8rw== + optionalDependencies: + graceful-fs "^4.1.9" + +lcid@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" + integrity sha512-YiGkH6EnGrDGqLMITnGjXtGmNtjoXw9SVUzcaos8RBi7Ps0VBylkq+vOcY9QE5poLasPCR849ucFUkl0UzUyOw== + dependencies: + invert-kv "^1.0.0" + +level-supports@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/level-supports/-/level-supports-4.0.1.tgz#431546f9d81f10ff0fea0e74533a0e875c08c66a" + integrity sha512-PbXpve8rKeNcZ9C1mUicC9auIYFyGpkV9/i6g76tLgANwWhtG2v7I4xNBUlkn3lE2/dZF3Pi0ygYGtLc4RXXdA== + +level-transcoder@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/level-transcoder/-/level-transcoder-1.0.1.tgz#f8cef5990c4f1283d4c86d949e73631b0bc8ba9c" + integrity sha512-t7bFwFtsQeD8cl8NIoQ2iwxA0CL/9IFw7/9gAjOonH0PWTTiRfY7Hq+Ejbsxh86tXobDQ6IOiddjNYIfOBs06w== + dependencies: + buffer "^6.0.3" + module-error "^1.0.1" + +level@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/level/-/level-8.0.0.tgz#41b4c515dabe28212a3e881b61c161ffead14394" + integrity sha512-ypf0jjAk2BWI33yzEaaotpq7fkOPALKAgDBxggO6Q9HGX2MRXn0wbP1Jn/tJv1gtL867+YOjOB49WaUF3UoJNQ== + dependencies: + browser-level "^1.0.1" + classic-level "^1.2.0" + +levn@~0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" + integrity sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA== + dependencies: + prelude-ls "~1.1.2" + type-check "~0.3.2" + +load-json-file@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" + integrity sha512-cy7ZdNRXdablkXYNI049pthVeXFurRyb9+hA/dZzerZ0pGTx42z+y+ssxBaVV2l70t1muq5IdKhn4UtcoGUY9A== + dependencies: + graceful-fs "^4.1.2" + parse-json "^2.2.0" + pify "^2.0.0" + pinkie-promise "^2.0.0" + strip-bom "^2.0.0" + +locate-path@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" + integrity sha512-NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA== + dependencies: + p-locate "^2.0.0" + path-exists "^3.0.0" + +locate-path@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" + integrity sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A== + dependencies: + p-locate "^3.0.0" + path-exists "^3.0.0" + +locate-path@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" + integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== + dependencies: + p-locate "^4.1.0" + +locate-path@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" + integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== + dependencies: + p-locate "^5.0.0" + +lodash.assign@^4.0.3, lodash.assign@^4.0.6: + version "4.2.0" + resolved "https://registry.yarnpkg.com/lodash.assign/-/lodash.assign-4.2.0.tgz#0d99f3ccd7a6d261d19bdaeb9245005d285808e7" + integrity sha512-hFuH8TY+Yji7Eja3mGiuAxBqLagejScbG8GbG0j6o9vzn0YL14My+ktnqtZgFTosKymC9/44wP6s7xyuLfnClw== + +lodash.camelcase@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" + integrity sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA== + +lodash.flatten@^4.4.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/lodash.flatten/-/lodash.flatten-4.4.0.tgz#f31c22225a9632d2bbf8e4addbef240aa765a61f" + integrity sha512-C5N2Z3DgnnKr0LOpv/hKCgKdb7ZZwafIrsesve6lmzvZIRZRGaZ/l6Q8+2W7NaT+ZwO3fFlSCzCzrDCFdJfZ4g== + +lodash.merge@^4.6.2: + version "4.6.2" + resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" + integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== + +lodash.truncate@^4.4.2: + version "4.4.2" + resolved "https://registry.yarnpkg.com/lodash.truncate/-/lodash.truncate-4.4.2.tgz#5a350da0b1113b837ecfffd5812cbe58d6eae193" + integrity sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw== + +lodash@^4.17.11, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.16, lodash@^4.17.19, lodash@^4.17.21: + version "4.17.21" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" + integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== + +log-symbols@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-3.0.0.tgz#f3a08516a5dea893336a7dee14d18a1cfdab77c4" + integrity sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ== + dependencies: + chalk "^2.4.2" + +log-symbols@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.1.0.tgz#3fbdbb95b4683ac9fc785111e792e558d4abd503" + integrity sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg== + dependencies: + chalk "^4.1.0" + is-unicode-supported "^0.1.0" + +loupe@^2.3.1: + version "2.3.6" + resolved "https://registry.yarnpkg.com/loupe/-/loupe-2.3.6.tgz#76e4af498103c532d1ecc9be102036a21f787b53" + integrity sha512-RaPMZKiMy8/JruncMU5Bt6na1eftNoo++R4Y+N2FrxkDVTrGvcyzFTsaGif4QTeKESheMGegbhw6iUAq+5A8zA== + dependencies: + get-func-name "^2.0.0" + +lower-case-first@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/lower-case-first/-/lower-case-first-1.0.2.tgz#e5da7c26f29a7073be02d52bac9980e5922adfa1" + integrity sha512-UuxaYakO7XeONbKrZf5FEgkantPf5DUqDayzP5VXZrtRPdH86s4kN47I8B3TW10S4QKiE3ziHNf3kRN//okHjA== + dependencies: + lower-case "^1.1.2" + +lower-case@^1.1.0, lower-case@^1.1.1, lower-case@^1.1.2: + version "1.1.4" + resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-1.1.4.tgz#9a2cabd1b9e8e0ae993a4bf7d5875c39c42e8eac" + integrity sha512-2Fgx1Ycm599x+WGpIYwJOvsjmXFzTSc34IwDWALRA/8AopUKAVPwfJ+h5+f85BCp0PWmmJcWzEpxOpoXycMpdA== + +lowercase-keys@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-2.0.0.tgz#2603e78b7b4b0006cbca2fbcc8a3202558ac9479" + integrity sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA== + +lowercase-keys@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-3.0.0.tgz#c5e7d442e37ead247ae9db117a9d0a467c89d4f2" + integrity sha512-ozCC6gdQ+glXOQsveKD0YsDy8DSQFjDTz4zyzEHNV5+JP5D62LmfDZ6o1cycFx9ouG940M5dE8C8CTewdj2YWQ== + +lru-cache@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" + integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== + dependencies: + yallist "^3.0.2" + +lru-cache@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" + integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== + dependencies: + yallist "^4.0.0" + +lru_map@^0.3.3: + version "0.3.3" + resolved "https://registry.yarnpkg.com/lru_map/-/lru_map-0.3.3.tgz#b5c8351b9464cbd750335a79650a0ec0e56118dd" + integrity sha512-Pn9cox5CsMYngeDbmChANltQl+5pi6XmTrraMSzhPmMBbmgcxmqWry0U3PGapCU1yB4/LqCcom7qhHZiF/jGfQ== + +make-error@^1.1.1: + version "1.3.6" + resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" + integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== + +markdown-table@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/markdown-table/-/markdown-table-1.1.3.tgz#9fcb69bcfdb8717bfd0398c6ec2d93036ef8de60" + integrity sha512-1RUZVgQlpJSPWYbFSpmudq5nHY1doEIv89gBtF0s4gW1GF2XorxcA/70M5vq7rLv0a6mhOUccRsqkwhwLCIQ2Q== + +match-all@^1.2.6: + version "1.2.6" + resolved "https://registry.yarnpkg.com/match-all/-/match-all-1.2.6.tgz#66d276ad6b49655551e63d3a6ee53e8be0566f8d" + integrity sha512-0EESkXiTkWzrQQntBu2uzKvLu6vVkUGz40nGPbSZuegcfE5UuSzNjLaIu76zJWuaT/2I3Z/8M06OlUOZLGwLlQ== + +mcl-wasm@^0.7.1: + version "0.7.9" + resolved "https://registry.yarnpkg.com/mcl-wasm/-/mcl-wasm-0.7.9.tgz#c1588ce90042a8700c3b60e40efb339fc07ab87f" + integrity sha512-iJIUcQWA88IJB/5L15GnJVnSQJmf/YaxxV6zRavv83HILHaJQb6y0iFyDMdDO0gN8X37tdxmAOrH/P8B6RB8sQ== + +md5.js@^1.3.4: + version "1.3.5" + resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.5.tgz#b5d07b8e3216e3e27cd728d72f70d1e6a342005f" + integrity sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg== + dependencies: + hash-base "^3.0.0" + inherits "^2.0.1" + safe-buffer "^5.1.2" + +media-typer@0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" + integrity sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ== + +memory-level@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/memory-level/-/memory-level-1.0.0.tgz#7323c3fd368f9af2f71c3cd76ba403a17ac41692" + integrity sha512-UXzwewuWeHBz5krr7EvehKcmLFNoXxGcvuYhC41tRnkrTbJohtS7kVn9akmgirtRygg+f7Yjsfi8Uu5SGSQ4Og== + dependencies: + abstract-level "^1.0.0" + functional-red-black-tree "^1.0.1" + module-error "^1.0.1" + +memorystream@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/memorystream/-/memorystream-0.3.1.tgz#86d7090b30ce455d63fbae12dda51a47ddcaf9b2" + integrity sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw== + +merge-descriptors@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" + integrity sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w== + +merge2@^1.2.3, merge2@^1.3.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" + integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== + +methods@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" + integrity sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w== + +micromatch@^4.0.4: + version "4.0.5" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" + integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== + dependencies: + braces "^3.0.2" + picomatch "^2.3.1" + +mime-db@1.52.0: + version "1.52.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" + integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== + +mime-types@^2.1.12, mime-types@^2.1.16, mime-types@~2.1.19, mime-types@~2.1.24, mime-types@~2.1.34: + version "2.1.35" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" + integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== + dependencies: + mime-db "1.52.0" + +mime@1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" + integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== + +mimic-response@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.1.tgz#4923538878eef42063cb8a3e3b0798781487ab1b" + integrity sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ== + +mimic-response@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-3.1.0.tgz#2d1d59af9c1b129815accc2c46a022a5ce1fa3c9" + integrity sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ== + +min-document@^2.19.0: + version "2.19.0" + resolved "https://registry.yarnpkg.com/min-document/-/min-document-2.19.0.tgz#7bd282e3f5842ed295bb748cdd9f1ffa2c824685" + integrity sha512-9Wy1B3m3f66bPPmU5hdA4DR4PB2OfDU/+GS3yAB7IQozE3tqXaVv2zOjgla7MEGSRv95+ILmOuvhLkOK6wJtCQ== + dependencies: + dom-walk "^0.1.0" + +minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" + integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== + +minimalistic-crypto-utils@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" + integrity sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg== + +"minimatch@2 || 3", minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1: + version "3.1.2" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" + integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== + dependencies: + brace-expansion "^1.1.7" + +minimatch@3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== + dependencies: + brace-expansion "^1.1.7" + +minimatch@5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.0.1.tgz#fb9022f7528125187c92bd9e9b6366be1cf3415b" + integrity sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g== + dependencies: + brace-expansion "^2.0.1" + +minimist@^1.2.0, minimist@^1.2.5, minimist@^1.2.6: + version "1.2.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" + integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== + +minipass@^2.6.0, minipass@^2.9.0: + version "2.9.0" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.9.0.tgz#e713762e7d3e32fed803115cf93e04bca9fcc9a6" + integrity sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg== + dependencies: + safe-buffer "^5.1.2" + yallist "^3.0.0" + +minizlib@^1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.3.3.tgz#2290de96818a34c29551c8a8d301216bd65a861d" + integrity sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q== + dependencies: + minipass "^2.9.0" + +mkdirp-promise@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/mkdirp-promise/-/mkdirp-promise-5.0.1.tgz#e9b8f68e552c68a9c1713b84883f7a1dd039b8a1" + integrity sha512-Hepn5kb1lJPtVW84RFT40YG1OddBNTOVUZR2bzQUHc+Z03en8/3uX0+060JDhcEzyO08HmipsN9DcnFMxhIL9w== + dependencies: + mkdirp "*" + +mkdirp@*: + version "3.0.1" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-3.0.1.tgz#e44e4c5607fb279c168241713cc6e0fea9adcb50" + integrity sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg== + +mkdirp@0.5.5: + version "0.5.5" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" + integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== + dependencies: + minimist "^1.2.5" + +mkdirp@0.5.x, mkdirp@^0.5.5: + version "0.5.6" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.6.tgz#7def03d2432dcae4ba1d611445c48396062255f6" + integrity sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw== + dependencies: + minimist "^1.2.6" + +mkdirp@^1.0.3, mkdirp@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" + integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== + +mnemonist@^0.38.0: + version "0.38.5" + resolved "https://registry.yarnpkg.com/mnemonist/-/mnemonist-0.38.5.tgz#4adc7f4200491237fe0fa689ac0b86539685cade" + integrity sha512-bZTFT5rrPKtPJxj8KSV0WkPyNxl72vQepqqVUAW2ARUpUSF2qXMB6jZj7hW5/k7C1rtpzqbD/IIbJwLXUjCHeg== + dependencies: + obliterator "^2.0.0" + +mocha@7.1.2: + version "7.1.2" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-7.1.2.tgz#8e40d198acf91a52ace122cd7599c9ab857b29e6" + integrity sha512-o96kdRKMKI3E8U0bjnfqW4QMk12MwZ4mhdBTf+B5a1q9+aq2HRnj+3ZdJu0B/ZhJeK78MgYuv6L8d/rA5AeBJA== + dependencies: + ansi-colors "3.2.3" + browser-stdout "1.3.1" + chokidar "3.3.0" + debug "3.2.6" + diff "3.5.0" + escape-string-regexp "1.0.5" + find-up "3.0.0" + glob "7.1.3" + growl "1.10.5" + he "1.2.0" + js-yaml "3.13.1" + log-symbols "3.0.0" + minimatch "3.0.4" + mkdirp "0.5.5" + ms "2.1.1" + node-environment-flags "1.0.6" + object.assign "4.1.0" + strip-json-comments "2.0.1" + supports-color "6.0.0" + which "1.3.1" + wide-align "1.1.3" + yargs "13.3.2" + yargs-parser "13.1.2" + yargs-unparser "1.6.0" + +mocha@^10.0.0: + version "10.2.0" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-10.2.0.tgz#1fd4a7c32ba5ac372e03a17eef435bd00e5c68b8" + integrity sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg== + dependencies: + ansi-colors "4.1.1" + browser-stdout "1.3.1" + chokidar "3.5.3" + debug "4.3.4" + diff "5.0.0" + escape-string-regexp "4.0.0" + find-up "5.0.0" + glob "7.2.0" + he "1.2.0" + js-yaml "4.1.0" + log-symbols "4.1.0" + minimatch "5.0.1" + ms "2.1.3" + nanoid "3.3.3" + serialize-javascript "6.0.0" + strip-json-comments "3.1.1" + supports-color "8.1.1" + workerpool "6.2.1" + yargs "16.2.0" + yargs-parser "20.2.4" + yargs-unparser "2.0.0" + +mocha@^7.1.1: + version "7.2.0" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-7.2.0.tgz#01cc227b00d875ab1eed03a75106689cfed5a604" + integrity sha512-O9CIypScywTVpNaRrCAgoUnJgozpIofjKUYmJhiCIJMiuYnLI6otcb1/kpW9/n/tJODHGZ7i8aLQoDVsMtOKQQ== + dependencies: + ansi-colors "3.2.3" + browser-stdout "1.3.1" + chokidar "3.3.0" + debug "3.2.6" + diff "3.5.0" + escape-string-regexp "1.0.5" + find-up "3.0.0" + glob "7.1.3" + growl "1.10.5" + he "1.2.0" + js-yaml "3.13.1" + log-symbols "3.0.0" + minimatch "3.0.4" + mkdirp "0.5.5" + ms "2.1.1" + node-environment-flags "1.0.6" + object.assign "4.1.0" + strip-json-comments "2.0.1" + supports-color "6.0.0" + which "1.3.1" + wide-align "1.1.3" + yargs "13.3.2" + yargs-parser "13.1.2" + yargs-unparser "1.6.0" + +mock-fs@^4.1.0: + version "4.14.0" + resolved "https://registry.yarnpkg.com/mock-fs/-/mock-fs-4.14.0.tgz#ce5124d2c601421255985e6e94da80a7357b1b18" + integrity sha512-qYvlv/exQ4+svI3UOvPUpLDF0OMX5euvUH0Ny4N5QyRyhNdgAgUrVH3iUINSzEPLvx0kbo/Bp28GJKIqvE7URw== + +module-error@^1.0.1, module-error@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/module-error/-/module-error-1.0.2.tgz#8d1a48897ca883f47a45816d4fb3e3c6ba404d86" + integrity sha512-0yuvsqSCv8LbaOKhnsQ/T5JhyFlCYLPXK3U2sgV10zoKQwzs/MyfuQUOZQ1V/6OCOJsK/TRgNVrPuPDqtdMFtA== + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + integrity sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A== + +ms@2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" + integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg== + +ms@2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== + +ms@2.1.3, ms@^2.1.1: + version "2.1.3" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== + +multibase@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/multibase/-/multibase-0.7.0.tgz#1adfc1c50abe05eefeb5091ac0c2728d6b84581b" + integrity sha512-TW8q03O0f6PNFTQDvh3xxH03c8CjGaaYrjkl9UQPG6rz53TQzzxJVCIWVjzcbN/Q5Y53Zd0IBQBMVktVgNx4Fg== + dependencies: + base-x "^3.0.8" + buffer "^5.5.0" + +multibase@~0.6.0: + version "0.6.1" + resolved "https://registry.yarnpkg.com/multibase/-/multibase-0.6.1.tgz#b76df6298536cc17b9f6a6db53ec88f85f8cc12b" + integrity sha512-pFfAwyTjbbQgNc3G7D48JkJxWtoJoBMaR4xQUOuB8RnCgRqaYmWNFeJTTvrJ2w51bjLq2zTby6Rqj9TQ9elSUw== + dependencies: + base-x "^3.0.8" + buffer "^5.5.0" + +multicodec@^0.5.5: + version "0.5.7" + resolved "https://registry.yarnpkg.com/multicodec/-/multicodec-0.5.7.tgz#1fb3f9dd866a10a55d226e194abba2dcc1ee9ffd" + integrity sha512-PscoRxm3f+88fAtELwUnZxGDkduE2HD9Q6GHUOywQLjOGT/HAdhjLDYNZ1e7VR0s0TP0EwZ16LNUTFpoBGivOA== + dependencies: + varint "^5.0.0" + +multicodec@^1.0.0: + version "1.0.4" + resolved "https://registry.yarnpkg.com/multicodec/-/multicodec-1.0.4.tgz#46ac064657c40380c28367c90304d8ed175a714f" + integrity sha512-NDd7FeS3QamVtbgfvu5h7fd1IlbaC4EQ0/pgU4zqE2vdHCmBGsUa0TiM8/TdSeG6BMPC92OOCf8F1ocE/Wkrrg== + dependencies: + buffer "^5.6.0" + varint "^5.0.0" + +multihashes@^0.4.15, multihashes@~0.4.15: + version "0.4.21" + resolved "https://registry.yarnpkg.com/multihashes/-/multihashes-0.4.21.tgz#dc02d525579f334a7909ade8a122dabb58ccfcb5" + integrity sha512-uVSvmeCWf36pU2nB4/1kzYZjsXD9vofZKpgudqkceYY5g2aZZXJ5r9lxuzoRLl1OAp28XljXsEJ/X/85ZsKmKw== + dependencies: + buffer "^5.5.0" + multibase "^0.7.0" + varint "^5.0.0" + +murmur-128@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/murmur-128/-/murmur-128-0.2.1.tgz#a9f6568781d2350ecb1bf80c14968cadbeaa4b4d" + integrity sha512-WseEgiRkI6aMFBbj8Cg9yBj/y+OdipwVC7zUo3W2W1JAJITwouUOtpqsmGSg67EQmwwSyod7hsVsWY5LsrfQVg== + dependencies: + encode-utf8 "^1.0.2" + fmix "^0.1.0" + imul "^1.0.0" + +nano-base32@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/nano-base32/-/nano-base32-1.0.1.tgz#ba548c879efcfb90da1c4d9e097db4a46c9255ef" + integrity sha512-sxEtoTqAPdjWVGv71Q17koMFGsOMSiHsIFEvzOM7cNp8BXB4AnEwmDabm5dorusJf/v1z7QxaZYxUorU9RKaAw== + +nano-json-stream-parser@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/nano-json-stream-parser/-/nano-json-stream-parser-0.1.2.tgz#0cc8f6d0e2b622b479c40d499c46d64b755c6f5f" + integrity sha512-9MqxMH/BSJC7dnLsEMPyfN5Dvoo49IsPFYMcHw3Bcfc2kN0lpHRBSzlMSVx4HGyJ7s9B31CyBTVehWJoQ8Ctew== + +nanoid@3.3.3: + version "3.3.3" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.3.tgz#fd8e8b7aa761fe807dba2d1b98fb7241bb724a25" + integrity sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w== + +napi-macros@^2.2.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/napi-macros/-/napi-macros-2.2.2.tgz#817fef20c3e0e40a963fbf7b37d1600bd0201044" + integrity sha512-hmEVtAGYzVQpCKdbQea4skABsdXW4RUh5t5mJ2zzqowJS2OyXZTU1KhDVFhx+NlWZ4ap9mqR9TcDO3LTTttd+g== + +negotiator@0.6.3: + version "0.6.3" + resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd" + integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg== + +neo-async@^2.6.0: + version "2.6.2" + resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" + integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== + +next-tick@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.1.0.tgz#1836ee30ad56d67ef281b22bd199f709449b35eb" + integrity sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ== + +no-case@^2.2.0, no-case@^2.3.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/no-case/-/no-case-2.3.2.tgz#60b813396be39b3f1288a4c1ed5d1e7d28b464ac" + integrity sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ== + dependencies: + lower-case "^1.1.1" + +node-addon-api@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-2.0.2.tgz#432cfa82962ce494b132e9d72a15b29f71ff5d32" + integrity sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA== + +node-emoji@^1.10.0: + version "1.11.0" + resolved "https://registry.yarnpkg.com/node-emoji/-/node-emoji-1.11.0.tgz#69a0150e6946e2f115e9d7ea4df7971e2628301c" + integrity sha512-wo2DpQkQp7Sjm2A0cq+sN7EHKO6Sl0ctXeBdFZrL9T9+UywORbufTcTZxom8YqpLQt/FqNMUkOpkZrJVYSKD3A== + dependencies: + lodash "^4.17.21" + +node-environment-flags@1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/node-environment-flags/-/node-environment-flags-1.0.6.tgz#a30ac13621f6f7d674260a54dede048c3982c088" + integrity sha512-5Evy2epuL+6TM0lCQGpFIj6KwiEsGh1SrHUhTbNX+sLbBtjidPZFAnVK9y5yU1+h//RitLbRHTIMyxQPtxMdHw== + dependencies: + object.getownpropertydescriptors "^2.0.3" + semver "^5.7.0" + +node-fetch@2.6.7: + version "2.6.7" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad" + integrity sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ== + dependencies: + whatwg-url "^5.0.0" + +node-gyp-build@^4.2.0, node-gyp-build@^4.3.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.6.0.tgz#0c52e4cbf54bbd28b709820ef7b6a3c2d6209055" + integrity sha512-NTZVKn9IylLwUzaKjkas1e4u2DLNcV4rdYagA4PWdPwW87Bi7z+BznyKSRwS/761tV/lzCGXplWsiaMjLqP2zQ== + +nofilter@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/nofilter/-/nofilter-1.0.4.tgz#78d6f4b6a613e7ced8b015cec534625f7667006e" + integrity sha512-N8lidFp+fCz+TD51+haYdbDGrcBWwuHX40F5+z0qkUjMJ5Tp+rdSuAkMJ9N9eoolDlEVTf6u5icM+cNKkKW2mA== + +nofilter@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/nofilter/-/nofilter-3.1.0.tgz#c757ba68801d41ff930ba2ec55bab52ca184aa66" + integrity sha512-l2NNj07e9afPnhAhvgVrCD/oy2Ai1yfLpuo3EpiO1jFTsB4sFz6oIfAfSZyQzVpkZQ9xS8ZS5g1jCBgq4Hwo0g== + +nopt@3.x: + version "3.0.6" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9" + integrity sha512-4GUt3kSEYmk4ITxzB/b9vaIDfUVWN/Ml1Fwl11IlnIG2iaJ9O6WXZ9SrYM9NLI8OCBieN2Y8SWC2oJV0RQ7qYg== + dependencies: + abbrev "1" + +normalize-package-data@^2.3.2: + version "2.5.0" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" + integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA== + dependencies: + hosted-git-info "^2.1.4" + resolve "^1.10.0" + semver "2 || 3 || 4 || 5" + validate-npm-package-license "^3.0.1" + +normalize-path@^3.0.0, normalize-path@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" + integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== + +normalize-url@^6.0.1: + version "6.1.0" + resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-6.1.0.tgz#40d0885b535deffe3f3147bec877d05fe4c5668a" + integrity sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A== + +nth-check@^2.0.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-2.1.1.tgz#c9eab428effce36cd6b92c924bdb000ef1f1ed1d" + integrity sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w== + dependencies: + boolbase "^1.0.0" + +number-is-nan@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" + integrity sha512-4jbtZXNAsfZbAHiiqjLPBiCl16dES1zI4Hpzzxw61Tk+loF+sBDBKx1ICKKKwIqQ7M0mFn1TmkN7euSncWgHiQ== + +number-to-bn@1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/number-to-bn/-/number-to-bn-1.7.0.tgz#bb3623592f7e5f9e0030b1977bd41a0c53fe1ea0" + integrity sha512-wsJ9gfSz1/s4ZsJN01lyonwuxA1tml6X1yBDnfpMglypcBRFZZkus26EdPSlqS5GJfYddVZa22p3VNb3z5m5Ig== + dependencies: + bn.js "4.11.6" + strip-hex-prefix "1.0.0" + +oauth-sign@~0.9.0: + version "0.9.0" + resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" + integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== + +object-assign@^4, object-assign@^4.1.0, object-assign@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== + +object-inspect@^1.12.3, object-inspect@^1.9.0: + version "1.12.3" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.3.tgz#ba62dffd67ee256c8c086dfae69e016cd1f198b9" + integrity sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g== + +object-keys@^1.0.11, object-keys@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" + integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== + +object.assign@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.0.tgz#968bf1100d7956bb3ca086f006f846b3bc4008da" + integrity sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w== + dependencies: + define-properties "^1.1.2" + function-bind "^1.1.1" + has-symbols "^1.0.0" + object-keys "^1.0.11" + +object.assign@^4.1.4: + version "4.1.4" + resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.4.tgz#9673c7c7c351ab8c4d0b516f4343ebf4dfb7799f" + integrity sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.4" + has-symbols "^1.0.3" + object-keys "^1.1.1" + +object.getownpropertydescriptors@^2.0.3: + version "2.1.6" + resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.6.tgz#5e5c384dd209fa4efffead39e3a0512770ccc312" + integrity sha512-lq+61g26E/BgHv0ZTFgRvi7NMEPuAxLkFU7rukXjc/AlwH4Am5xXVnIXy3un1bg/JPbXHrixRkK1itUzzPiIjQ== + dependencies: + array.prototype.reduce "^1.0.5" + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.21.2" + safe-array-concat "^1.0.0" + +obliterator@^2.0.0: + version "2.0.4" + resolved "https://registry.yarnpkg.com/obliterator/-/obliterator-2.0.4.tgz#fa650e019b2d075d745e44f1effeb13a2adbe816" + integrity sha512-lgHwxlxV1qIg1Eap7LgIeoBWIMFibOjbrYPIPJZcI1mmGAI2m3lNYpK12Y+GBdPQ0U1hRwSord7GIaawz962qQ== + +oboe@2.1.5: + version "2.1.5" + resolved "https://registry.yarnpkg.com/oboe/-/oboe-2.1.5.tgz#5554284c543a2266d7a38f17e073821fbde393cd" + integrity sha512-zRFWiF+FoicxEs3jNI/WYUrVEgA7DeET/InK0XQuudGHRg8iIob3cNPrJTKaz4004uaA9Pbe+Dwa8iluhjLZWA== + dependencies: + http-https "^1.0.0" + +on-finished@2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.4.1.tgz#58c8c44116e54845ad57f14ab10b03533184ac3f" + integrity sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg== + dependencies: + ee-first "1.1.1" + +once@1.x, once@^1.3.0, once@^1.3.1, once@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== + dependencies: + wrappy "1" + +optionator@^0.8.1: + version "0.8.3" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" + integrity sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA== + dependencies: + deep-is "~0.1.3" + fast-levenshtein "~2.0.6" + levn "~0.3.0" + prelude-ls "~1.1.2" + type-check "~0.3.2" + word-wrap "~1.2.3" + +ordinal@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/ordinal/-/ordinal-1.0.3.tgz#1a3c7726a61728112f50944ad7c35c06ae3a0d4d" + integrity sha512-cMddMgb2QElm8G7vdaa02jhUNbTSrhsgAGUz1OokD83uJTwSUn+nKoNoKVVaRa08yF6sgfO7Maou1+bgLd9rdQ== + +os-locale@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-1.4.0.tgz#20f9f17ae29ed345e8bde583b13d2009803c14d9" + integrity sha512-PRT7ZORmwu2MEFt4/fv3Q+mEfN4zetKxufQrkShY2oGvUms9r8otu5HfdyIFHkYXjO7laNsoVGmM2MANfuTA8g== + dependencies: + lcid "^1.0.0" + +os-tmpdir@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + integrity sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g== + +p-cancelable@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-2.1.1.tgz#aab7fbd416582fa32a3db49859c122487c5ed2cf" + integrity sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg== + +p-cancelable@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-3.0.0.tgz#63826694b54d61ca1c20ebcb6d3ecf5e14cd8050" + integrity sha512-mlVgR3PGuzlo0MmTdk4cXqXWlwQDLnONTAg6sm62XkMJEiRxN3GL3SffkYvqwonbkJBcrI7Uvv5Zh9yjvn2iUw== + +p-limit@^1.1.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" + integrity sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q== + dependencies: + p-try "^1.0.0" + +p-limit@^2.0.0, p-limit@^2.2.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" + integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== + dependencies: + p-try "^2.0.0" + +p-limit@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" + integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== + dependencies: + yocto-queue "^0.1.0" + +p-locate@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" + integrity sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg== + dependencies: + p-limit "^1.1.0" + +p-locate@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" + integrity sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ== + dependencies: + p-limit "^2.0.0" + +p-locate@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" + integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== + dependencies: + p-limit "^2.2.0" + +p-locate@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" + integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== + dependencies: + p-limit "^3.0.2" + +p-map@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/p-map/-/p-map-4.0.0.tgz#bb2f95a5eda2ec168ec9274e06a747c3e2904d2b" + integrity sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ== + dependencies: + aggregate-error "^3.0.0" + +p-try@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" + integrity sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww== + +p-try@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" + integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== + +param-case@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/param-case/-/param-case-2.1.1.tgz#df94fd8cf6531ecf75e6bef9a0858fbc72be2247" + integrity sha512-eQE845L6ot89sk2N8liD8HAuH4ca6Vvr7VWAWwt7+kvvG5aBcPmmphQ68JsEG2qa9n1TykS2DLeMt363AAH8/w== + dependencies: + no-case "^2.2.0" + +parse-cache-control@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/parse-cache-control/-/parse-cache-control-1.0.1.tgz#8eeab3e54fa56920fe16ba38f77fa21aacc2d74e" + integrity sha512-60zvsJReQPX5/QP0Kzfd/VrpjScIQ7SHBW6bFCYfEP+fp0Eppr1SHhIO5nd1PjZtvclzSzES9D/p5nFJurwfWg== + +parse-headers@^2.0.0: + version "2.0.5" + resolved "https://registry.yarnpkg.com/parse-headers/-/parse-headers-2.0.5.tgz#069793f9356a54008571eb7f9761153e6c770da9" + integrity sha512-ft3iAoLOB/MlwbNXgzy43SWGP6sQki2jQvAyBg/zDFAgr9bfNWZIUj42Kw2eJIl8kEi4PbgE6U1Zau/HwI75HA== + +parse-json@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" + integrity sha512-QR/GGaKCkhwk1ePQNYDRKYZ3mwU9ypsKhB0XyFnLQdomyEqk3e8wpW3V5Jp88zbxK4n5ST1nqo+g9juTpownhQ== + dependencies: + error-ex "^1.2.0" + +parse5-htmlparser2-tree-adapter@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-7.0.0.tgz#23c2cc233bcf09bb7beba8b8a69d46b08c62c2f1" + integrity sha512-B77tOZrqqfUfnVcOrUvfdLbz4pu4RopLD/4vmu3HUPswwTA8OH0EMW9BlWR2B0RCoiZRAHEUu7IxeP1Pd1UU+g== + dependencies: + domhandler "^5.0.2" + parse5 "^7.0.0" + +parse5@^7.0.0: + version "7.1.2" + resolved "https://registry.yarnpkg.com/parse5/-/parse5-7.1.2.tgz#0736bebbfd77793823240a23b7fc5e010b7f8e32" + integrity sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw== + dependencies: + entities "^4.4.0" + +parseurl@~1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" + integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== + +pascal-case@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/pascal-case/-/pascal-case-2.0.1.tgz#2d578d3455f660da65eca18ef95b4e0de912761e" + integrity sha512-qjS4s8rBOJa2Xm0jmxXiyh1+OFf6ekCWOvUaRgAQSktzlTbMotS0nmG9gyYAybCWBcuP4fsBeRCKNwGBnMe2OQ== + dependencies: + camel-case "^3.0.0" + upper-case-first "^1.1.0" + +path-case@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/path-case/-/path-case-2.1.1.tgz#94b8037c372d3fe2906e465bb45e25d226e8eea5" + integrity sha512-Ou0N05MioItesaLr9q8TtHVWmJ6fxWdqKB2RohFmNWVyJ+2zeKIeDNWAN6B/Pe7wpzWChhZX6nONYmOnMeJQ/Q== + dependencies: + no-case "^2.2.0" + +path-exists@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" + integrity sha512-yTltuKuhtNeFJKa1PiRzfLAU5182q1y4Eb4XCJ3PBqyzEDkAZRzBrKKBct682ls9reBVHf9udYLN5Nd+K1B9BQ== + dependencies: + pinkie-promise "^2.0.0" + +path-exists@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" + integrity sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ== + +path-exists@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" + integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== + +path-parse@^1.0.6, path-parse@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" + integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== + +path-to-regexp@0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" + integrity sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ== + +path-type@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" + integrity sha512-S4eENJz1pkiQn9Znv33Q+deTOKmbl+jj1Fl+qiP/vYezj+S8x+J3Uo0ISrx/QoEvIlOaDWJhPaRd1flJ9HXZqg== + dependencies: + graceful-fs "^4.1.2" + pify "^2.0.0" + pinkie-promise "^2.0.0" + +path-type@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" + integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== + +pathval@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.1.tgz#8534e77a77ce7ac5a2512ea21e0fdb8fcf6c3d8d" + integrity sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ== + +pbkdf2@^3.0.17: + version "3.1.2" + resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.1.2.tgz#dd822aa0887580e52f1a039dc3eda108efae3075" + integrity sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA== + dependencies: + create-hash "^1.1.2" + create-hmac "^1.1.4" + ripemd160 "^2.0.1" + safe-buffer "^5.0.1" + sha.js "^2.4.8" + +performance-now@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" + integrity sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow== + +picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" + integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== + +pify@^2.0.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" + integrity sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog== + +pify@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231" + integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g== + +pinkie-promise@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" + integrity sha512-0Gni6D4UcLTbv9c57DfxDGdr41XfgUjqWZu492f0cIGr16zDU06BWP/RAEvOuo7CQ0CNjHaLlM59YJJFm3NWlw== + dependencies: + pinkie "^2.0.0" + +pinkie@^2.0.0: + version "2.0.4" + resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" + integrity sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg== + +prelude-ls@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" + integrity sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w== + +prettier@^2.3.1: + version "2.8.8" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.8.tgz#e8c5d7e98a4305ffe3de2e1fc4aca1a71c28b1da" + integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q== + +process-nextick-args@~2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" + integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== + +process@^0.11.10: + version "0.11.10" + resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" + integrity sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A== + +promise@^8.0.0: + version "8.3.0" + resolved "https://registry.yarnpkg.com/promise/-/promise-8.3.0.tgz#8cb333d1edeb61ef23869fbb8a4ea0279ab60e0a" + integrity sha512-rZPNPKTOYVNEEKFaq1HqTgOwZD+4/YHS5ukLzQCypkj+OkYx7iv0mA91lJlpPPZ8vMau3IIGj5Qlwrx+8iiSmg== + dependencies: + asap "~2.0.6" + +proper-lockfile@^4.1.1: + version "4.1.2" + resolved "https://registry.yarnpkg.com/proper-lockfile/-/proper-lockfile-4.1.2.tgz#c8b9de2af6b2f1601067f98e01ac66baa223141f" + integrity sha512-TjNPblN4BwAWMXU8s9AEz4JmQxnD1NNL7bNOY/AKUzyamc379FWASUhc/K1pL2noVb+XmZKLL68cjzLsiOAMaA== + dependencies: + graceful-fs "^4.2.4" + retry "^0.12.0" + signal-exit "^3.0.2" + +proxy-addr@~2.0.7: + version "2.0.7" + resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.7.tgz#f19fe69ceab311eeb94b42e70e8c2070f9ba1025" + integrity sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg== + dependencies: + forwarded "0.2.0" + ipaddr.js "1.9.1" + +psl@^1.1.28: + version "1.9.0" + resolved "https://registry.yarnpkg.com/psl/-/psl-1.9.0.tgz#d0df2a137f00794565fcaf3b2c00cd09f8d5a5a7" + integrity sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag== + +pump@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" + integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww== + dependencies: + end-of-stream "^1.1.0" + once "^1.3.1" + +punycode@2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.0.tgz#5f863edc89b96db09074bad7947bf09056ca4e7d" + integrity sha512-Yxz2kRwT90aPiWEMHVYnEf4+rhwF1tBmmZ4KepCP+Wkium9JxtWnUm1nqGwpiAHr/tnTSeHqr3wb++jgSkXjhA== + +punycode@^2.1.0, punycode@^2.1.1: + version "2.3.0" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.0.tgz#f67fa67c94da8f4d0cfff981aee4118064199b8f" + integrity sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA== + +pure-rand@^5.0.1: + version "5.0.5" + resolved "https://registry.yarnpkg.com/pure-rand/-/pure-rand-5.0.5.tgz#bda2a7f6a1fc0f284d78d78ca5902f26f2ad35cf" + integrity sha512-BwQpbqxSCBJVpamI6ydzcKqyFmnd5msMWUGvzXLm1aXvusbbgkbOto/EUPM00hjveJEaJtdbhUjKSzWRhQVkaw== + +qs@6.11.0: + version "6.11.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.0.tgz#fd0d963446f7a65e1367e01abd85429453f0c37a" + integrity sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q== + dependencies: + side-channel "^1.0.4" + +qs@^6.4.0, qs@^6.7.0: + version "6.11.1" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.1.tgz#6c29dff97f0c0060765911ba65cbc9764186109f" + integrity sha512-0wsrzgTz/kAVIeuxSjnpGC56rzYtr6JT/2BwEvMaPhFIoYa1aGO8LbzuU1R0uUYQkLpWBTOj0l/CLAJB64J6nQ== + dependencies: + side-channel "^1.0.4" + +qs@^6.9.4: + version "6.11.2" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.2.tgz#64bea51f12c1f5da1bc01496f48ffcff7c69d7d9" + integrity sha512-tDNIz22aBzCDxLtVH++VnTfzxlfeK5CbqohpSqpJgj1Wg/cQbStNAz3NuqCs5vV+pjBsK4x4pN9HlVh7rcYRiA== + dependencies: + side-channel "^1.0.4" + +qs@~6.5.2: + version "6.5.3" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.3.tgz#3aeeffc91967ef6e35c0e488ef46fb296ab76aad" + integrity sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA== + +query-string@^5.0.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/query-string/-/query-string-5.1.1.tgz#a78c012b71c17e05f2e3fa2319dd330682efb3cb" + integrity sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw== + dependencies: + decode-uri-component "^0.2.0" + object-assign "^4.1.0" + strict-uri-encode "^1.0.0" + +queue-microtask@^1.2.2, queue-microtask@^1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" + integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== + +quick-lru@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-5.1.1.tgz#366493e6b3e42a3a6885e2e99d18f80fb7a8c932" + integrity sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA== + +randombytes@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" + integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== + dependencies: + safe-buffer "^5.1.0" + +range-parser@~1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" + integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== + +raw-body@2.5.1: + version "2.5.1" + resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.5.1.tgz#fe1b1628b181b700215e5fd42389f98b71392857" + integrity sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig== + dependencies: + bytes "3.1.2" + http-errors "2.0.0" + iconv-lite "0.4.24" + unpipe "1.0.0" + +raw-body@2.5.2, raw-body@^2.4.1: + version "2.5.2" + resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.5.2.tgz#99febd83b90e08975087e8f1f9419a149366b68a" + integrity sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA== + dependencies: + bytes "3.1.2" + http-errors "2.0.0" + iconv-lite "0.4.24" + unpipe "1.0.0" + +read-pkg-up@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" + integrity sha512-WD9MTlNtI55IwYUS27iHh9tK3YoIVhxis8yKhLpTqWtml739uXc9NWTpxoHkfZf3+DkCCsXox94/VWZniuZm6A== + dependencies: + find-up "^1.0.0" + read-pkg "^1.0.0" + +read-pkg@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" + integrity sha512-7BGwRHqt4s/uVbuyoeejRn4YmFnYZiFl4AuaeXHlgZf3sONF0SOGlxs2Pw8g6hCKupo08RafIO5YXFNOKTfwsQ== + dependencies: + load-json-file "^1.0.0" + normalize-package-data "^2.3.2" + path-type "^1.0.0" + +readable-stream@^2.2.2: + version "2.3.8" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.8.tgz#91125e8042bba1b9887f49345f6277027ce8be9b" + integrity sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA== + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.3" + isarray "~1.0.0" + process-nextick-args "~2.0.0" + safe-buffer "~5.1.1" + string_decoder "~1.1.1" + util-deprecate "~1.0.1" + +readable-stream@^3.6.0: + version "3.6.2" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.2.tgz#56a9b36ea965c00c5a93ef31eb111a0f11056967" + integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== + dependencies: + inherits "^2.0.3" + string_decoder "^1.1.1" + util-deprecate "^1.0.1" + +readdirp@~3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.2.0.tgz#c30c33352b12c96dfb4b895421a49fd5a9593839" + integrity sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ== + dependencies: + picomatch "^2.0.4" + +readdirp@~3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" + integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== + dependencies: + picomatch "^2.2.1" + +rechoir@^0.6.2: + version "0.6.2" + resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" + integrity sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw== + dependencies: + resolve "^1.1.6" + +recursive-readdir@^2.2.2: + version "2.2.3" + resolved "https://registry.yarnpkg.com/recursive-readdir/-/recursive-readdir-2.2.3.tgz#e726f328c0d69153bcabd5c322d3195252379372" + integrity sha512-8HrF5ZsXk5FAH9dgsx3BlUer73nIhuj+9OrQwEbLTPOBzGkL1lsFCR01am+v+0m2Cmbs1nP12hLDl5FA7EszKA== + dependencies: + minimatch "^3.0.5" + +reduce-flatten@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/reduce-flatten/-/reduce-flatten-2.0.0.tgz#734fd84e65f375d7ca4465c69798c25c9d10ae27" + integrity sha512-EJ4UNY/U1t2P/2k6oqotuX2Cc3T6nxJwsM0N0asT7dhrtH1ltUxDn4NalSYmPE2rCkVpcf/X6R0wDwcFpzhd4w== + +regenerator-runtime@^0.13.11: + version "0.13.11" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz#f6dca3e7ceec20590d07ada785636a90cdca17f9" + integrity sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg== + +regexp.prototype.flags@^1.4.3: + version "1.5.0" + resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.0.tgz#fe7ce25e7e4cca8db37b6634c8a2c7009199b9cb" + integrity sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + functions-have-names "^1.2.3" + +req-cwd@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/req-cwd/-/req-cwd-2.0.0.tgz#d4082b4d44598036640fb73ddea01ed53db49ebc" + integrity sha512-ueoIoLo1OfB6b05COxAA9UpeoscNpYyM+BqYlA7H6LVF4hKGPXQQSSaD2YmvDVJMkk4UDpAHIeU1zG53IqjvlQ== + dependencies: + req-from "^2.0.0" + +req-from@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/req-from/-/req-from-2.0.0.tgz#d74188e47f93796f4aa71df6ee35ae689f3e0e70" + integrity sha512-LzTfEVDVQHBRfjOUMgNBA+V6DWsSnoeKzf42J7l0xa/B4jyPOuuF5MlNSmomLNGemWTnV2TIdjSSLnEn95fOQA== + dependencies: + resolve-from "^3.0.0" + +request-promise-core@1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/request-promise-core/-/request-promise-core-1.1.4.tgz#3eedd4223208d419867b78ce815167d10593a22f" + integrity sha512-TTbAfBBRdWD7aNNOoVOBH4pN/KigV6LyapYNNlAPA8JwbovRti1E88m3sYAwsLi5ryhPKsE9APwnjFTgdUjTpw== + dependencies: + lodash "^4.17.19" + +request-promise-native@^1.0.5: + version "1.0.9" + resolved "https://registry.yarnpkg.com/request-promise-native/-/request-promise-native-1.0.9.tgz#e407120526a5efdc9a39b28a5679bf47b9d9dc28" + integrity sha512-wcW+sIUiWnKgNY0dqCpOZkUbF/I+YPi+f09JZIDa39Ec+q82CpSYniDp+ISgTTbKmnpJWASeJBPZmoxH84wt3g== + dependencies: + request-promise-core "1.1.4" + stealthy-require "^1.1.1" + tough-cookie "^2.3.3" + +request@^2.79.0, request@^2.88.0: + version "2.88.2" + resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3" + integrity sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw== + dependencies: + aws-sign2 "~0.7.0" + aws4 "^1.8.0" + caseless "~0.12.0" + combined-stream "~1.0.6" + extend "~3.0.2" + forever-agent "~0.6.1" + form-data "~2.3.2" + har-validator "~5.1.3" + http-signature "~1.2.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.19" + oauth-sign "~0.9.0" + performance-now "^2.1.0" + qs "~6.5.2" + safe-buffer "^5.1.2" + tough-cookie "~2.5.0" + tunnel-agent "^0.6.0" + uuid "^3.3.2" + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== + +require-from-string@^1.1.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-1.2.1.tgz#529c9ccef27380adfec9a2f965b649bbee636418" + integrity sha512-H7AkJWMobeskkttHyhTVtS0fxpFLjxhbfMa6Bk3wimP7sdPRGL3EyCg3sAQenFfAe+xQ+oAc85Nmtvq0ROM83Q== + +require-from-string@^2.0.0, require-from-string@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" + integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== + +require-main-filename@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" + integrity sha512-IqSUtOVP4ksd1C/ej5zeEh/BIP2ajqpn8c5x+q99gvcIG/Qf0cud5raVnE/Dwd0ua9TXYDoDc0RE5hBSdz22Ug== + +require-main-filename@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" + integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== + +resolve-alpn@^1.0.0, resolve-alpn@^1.2.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/resolve-alpn/-/resolve-alpn-1.2.1.tgz#b7adbdac3546aaaec20b45e7d8265927072726f9" + integrity sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g== + +resolve-from@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" + integrity sha512-GnlH6vxLymXJNMBo7XP1fJIzBFbdYt49CuTwmB/6N53t+kMPRMFKz783LlQ4tv28XoQfMWinAJX6WCGf2IlaIw== + +resolve@1.1.x: + version "1.1.7" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" + integrity sha512-9znBF0vBcaSN3W2j7wKvdERPwqTxSpCq+if5C0WoTCyV9n24rua28jeuQ2pL/HOf+yUe/Mef+H/5p60K0Id3bg== + +resolve@1.17.0: + version "1.17.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.17.0.tgz#b25941b54968231cc2d1bb76a79cb7f2c0bf8444" + integrity sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w== + dependencies: + path-parse "^1.0.6" + +resolve@^1.1.6, resolve@^1.10.0: + version "1.22.2" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.2.tgz#0ed0943d4e301867955766c9f3e1ae6d01c6845f" + integrity sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g== + dependencies: + is-core-module "^2.11.0" + path-parse "^1.0.7" + supports-preserve-symlinks-flag "^1.0.0" + +responselike@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/responselike/-/responselike-2.0.1.tgz#9a0bc8fdc252f3fb1cca68b016591059ba1422bc" + integrity sha512-4gl03wn3hj1HP3yzgdI7d3lCkF95F21Pz4BPGvKHinyQzALR5CapwC8yIi0Rh58DEMQ/SguC03wFj2k0M/mHhw== + dependencies: + lowercase-keys "^2.0.0" + +retry@^0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/retry/-/retry-0.12.0.tgz#1b42a6266a21f07421d1b0b54b7dc167b01c013b" + integrity sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow== + +reusify@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" + integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== + +rimraf@^2.2.8: + version "2.7.1" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" + integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== + dependencies: + glob "^7.1.3" + +ripemd160-min@0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/ripemd160-min/-/ripemd160-min-0.0.6.tgz#a904b77658114474d02503e819dcc55853b67e62" + integrity sha512-+GcJgQivhs6S9qvLogusiTcS9kQUfgR75whKuy5jIhuiOfQuJ8fjqxV6EGD5duH1Y/FawFUMtMhyeq3Fbnib8A== + +ripemd160@^2.0.0, ripemd160@^2.0.1, ripemd160@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c" + integrity sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA== + dependencies: + hash-base "^3.0.0" + inherits "^2.0.1" + +rlp@^2.2.3, rlp@^2.2.4: + version "2.2.7" + resolved "https://registry.yarnpkg.com/rlp/-/rlp-2.2.7.tgz#33f31c4afac81124ac4b283e2bd4d9720b30beaf" + integrity sha512-d5gdPmgQ0Z+AklL2NVXr/IoSjNZFfTVvQWzL/AM2AOcSzYP2xjlb0AC8YyCLc41MSNf6P6QVtjgPdmVtzb+4lQ== + dependencies: + bn.js "^5.2.0" + +run-parallel-limit@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/run-parallel-limit/-/run-parallel-limit-1.1.0.tgz#be80e936f5768623a38a963262d6bef8ff11e7ba" + integrity sha512-jJA7irRNM91jaKc3Hcl1npHsFLOXOoTkPCUL1JEa1R82O2miplXXRaGdjW/KM/98YQWDhJLiSs793CnXfblJUw== + dependencies: + queue-microtask "^1.2.2" + +run-parallel@^1.1.9: + version "1.2.0" + resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" + integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== + dependencies: + queue-microtask "^1.2.2" + +rustbn.js@~0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/rustbn.js/-/rustbn.js-0.2.0.tgz#8082cb886e707155fd1cb6f23bd591ab8d55d0ca" + integrity sha512-4VlvkRUuCJvr2J6Y0ImW7NvTCriMi7ErOAqWk1y69vAdoNIzCF3yPmgeNzx+RQTLEDFq5sHfscn1MwHxP9hNfA== + +safe-array-concat@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/safe-array-concat/-/safe-array-concat-1.0.0.tgz#2064223cba3c08d2ee05148eedbc563cd6d84060" + integrity sha512-9dVEFruWIsnie89yym+xWTAYASdpw3CJV7Li/6zBewGf9z2i1j31rP6jnY0pHEO4QZh6N0K11bFjWmdR8UGdPQ== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.2.0" + has-symbols "^1.0.3" + isarray "^2.0.5" + +safe-buffer@5.2.1, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@^5.2.1, safe-buffer@~5.2.0: + version "5.2.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== + +safe-buffer@~5.1.0, safe-buffer@~5.1.1: + version "5.1.2" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" + integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== + +safe-regex-test@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/safe-regex-test/-/safe-regex-test-1.0.0.tgz#793b874d524eb3640d1873aad03596db2d4f2295" + integrity sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.1.3" + is-regex "^1.1.4" + +"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: + version "2.1.2" + resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== + +sc-istanbul@^0.4.5: + version "0.4.6" + resolved "https://registry.yarnpkg.com/sc-istanbul/-/sc-istanbul-0.4.6.tgz#cf6784355ff2076f92d70d59047d71c13703e839" + integrity sha512-qJFF/8tW/zJsbyfh/iT/ZM5QNHE3CXxtLJbZsL+CzdJLBsPD7SedJZoUA4d8iAcN2IoMp/Dx80shOOd2x96X/g== + dependencies: + abbrev "1.0.x" + async "1.x" + escodegen "1.8.x" + esprima "2.7.x" + glob "^5.0.15" + handlebars "^4.0.1" + js-yaml "3.x" + mkdirp "0.5.x" + nopt "3.x" + once "1.x" + resolve "1.1.x" + supports-color "^3.1.0" + which "^1.1.1" + wordwrap "^1.0.0" + +scrypt-js@2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/scrypt-js/-/scrypt-js-2.0.4.tgz#32f8c5149f0797672e551c07e230f834b6af5f16" + integrity sha512-4KsaGcPnuhtCZQCxFxN3GVYIhKFPTdLd8PLC552XwbMndtD0cjRFAhDuuydXQ0h08ZfPgzqe6EKHozpuH74iDw== + +scrypt-js@3.0.1, scrypt-js@^3.0.0, scrypt-js@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/scrypt-js/-/scrypt-js-3.0.1.tgz#d314a57c2aef69d1ad98a138a21fe9eafa9ee312" + integrity sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA== + +secp256k1@^4.0.1: + version "4.0.3" + resolved "https://registry.yarnpkg.com/secp256k1/-/secp256k1-4.0.3.tgz#c4559ecd1b8d3c1827ed2d1b94190d69ce267303" + integrity sha512-NLZVf+ROMxwtEj3Xa562qgv2BK5e2WNmXPiOdVIPLgs6lyTzMvBq0aWTYMI5XCP9jZMVKOcqZLw/Wc4vDkuxhA== + dependencies: + elliptic "^6.5.4" + node-addon-api "^2.0.0" + node-gyp-build "^4.2.0" + +"semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.5.0, semver@^5.6.0, semver@^5.7.0: + version "5.7.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" + integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== + +semver@7.3.7: + version "7.3.7" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.7.tgz#12c5b649afdbf9049707796e22a4028814ce523f" + integrity sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g== + dependencies: + lru-cache "^6.0.0" + +semver@^6.3.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" + integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== + +semver@^7.3.4: + version "7.5.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.0.tgz#ed8c5dc8efb6c629c88b23d41dc9bf40c1d96cd0" + integrity sha512-+XC0AD/R7Q2mPSRuy2Id0+CGTZ98+8f+KvwirxOKIEyid+XSx6HbC63p+O4IndTHuX5Z+JxQ0TghCkO5Cg/2HA== + dependencies: + lru-cache "^6.0.0" + +send@0.18.0: + version "0.18.0" + resolved "https://registry.yarnpkg.com/send/-/send-0.18.0.tgz#670167cc654b05f5aa4a767f9113bb371bc706be" + integrity sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg== + dependencies: + debug "2.6.9" + depd "2.0.0" + destroy "1.2.0" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + fresh "0.5.2" + http-errors "2.0.0" + mime "1.6.0" + ms "2.1.3" + on-finished "2.4.1" + range-parser "~1.2.1" + statuses "2.0.1" + +sentence-case@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/sentence-case/-/sentence-case-2.1.1.tgz#1f6e2dda39c168bf92d13f86d4a918933f667ed4" + integrity sha512-ENl7cYHaK/Ktwk5OTD+aDbQ3uC8IByu/6Bkg+HDv8Mm+XnBnppVNalcfJTNsp1ibstKh030/JKQQWglDvtKwEQ== + dependencies: + no-case "^2.2.0" + upper-case-first "^1.1.2" + +serialize-javascript@6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.0.tgz#efae5d88f45d7924141da8b5c3a7a7e663fefeb8" + integrity sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag== + dependencies: + randombytes "^2.1.0" + +serve-static@1.15.0: + version "1.15.0" + resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.15.0.tgz#faaef08cffe0a1a62f60cad0c4e513cff0ac9540" + integrity sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g== + dependencies: + encodeurl "~1.0.2" + escape-html "~1.0.3" + parseurl "~1.3.3" + send "0.18.0" + +servify@^0.1.12: + version "0.1.12" + resolved "https://registry.yarnpkg.com/servify/-/servify-0.1.12.tgz#142ab7bee1f1d033b66d0707086085b17c06db95" + integrity sha512-/xE6GvsKKqyo1BAY+KxOWXcLpPsUUyji7Qg3bVD7hh1eRze5bR1uYiuDA/k3Gof1s9BTzQZEJK8sNcNGFIzeWw== + dependencies: + body-parser "^1.16.0" + cors "^2.8.1" + express "^4.14.0" + request "^2.79.0" + xhr "^2.3.3" + +set-blocking@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" + integrity sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw== + +setimmediate@1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.4.tgz#20e81de622d4a02588ce0c8da8973cbcf1d3138f" + integrity sha512-/TjEmXQVEzdod/FFskf3o7oOAsGhHf2j1dZqRFbDzq4F3mvvxflIIi4Hd3bLQE9y/CpwqfSQam5JakI/mi3Pog== + +setimmediate@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" + integrity sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA== + +setprototypeof@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424" + integrity sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw== + +sha.js@^2.4.0, sha.js@^2.4.8: + version "2.4.11" + resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7" + integrity sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ== + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + +sha1@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/sha1/-/sha1-1.1.1.tgz#addaa7a93168f393f19eb2b15091618e2700f848" + integrity sha512-dZBS6OrMjtgVkopB1Gmo4RQCDKiZsqcpAQpkV/aaj+FCrCg8r4I4qMkDPQjBgLIxlmu9k4nUbWq6ohXahOneYA== + dependencies: + charenc ">= 0.0.1" + crypt ">= 0.0.1" + +sha3@^2.1.1: + version "2.1.4" + resolved "https://registry.yarnpkg.com/sha3/-/sha3-2.1.4.tgz#000fac0fe7c2feac1f48a25e7a31b52a6492cc8f" + integrity sha512-S8cNxbyb0UGUM2VhRD4Poe5N58gJnJsLJ5vC7FYWGUmGhcsj4++WaIOBFVDxlG0W3To6xBuiRh+i0Qp2oNCOtg== + dependencies: + buffer "6.0.3" + +shelljs@^0.8.3: + version "0.8.5" + resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.5.tgz#de055408d8361bed66c669d2f000538ced8ee20c" + integrity sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow== + dependencies: + glob "^7.0.0" + interpret "^1.0.0" + rechoir "^0.6.2" + +side-channel@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" + integrity sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw== + dependencies: + call-bind "^1.0.0" + get-intrinsic "^1.0.2" + object-inspect "^1.9.0" + +signal-exit@^3.0.2: + version "3.0.7" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" + integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== + +simple-concat@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/simple-concat/-/simple-concat-1.0.1.tgz#f46976082ba35c2263f1c8ab5edfe26c41c9552f" + integrity sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q== + +simple-get@^2.7.0: + version "2.8.2" + resolved "https://registry.yarnpkg.com/simple-get/-/simple-get-2.8.2.tgz#5708fb0919d440657326cd5fe7d2599d07705019" + integrity sha512-Ijd/rV5o+mSBBs4F/x9oDPtTx9Zb6X9brmnXvMW4J7IR15ngi9q5xxqWBKU744jTZiaXtxaPL7uHG6vtN8kUkw== + dependencies: + decompress-response "^3.3.0" + once "^1.3.1" + simple-concat "^1.0.0" + +slash@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" + integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== + +slice-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-4.0.0.tgz#500e8dd0fd55b05815086255b3195adf2a45fe6b" + integrity sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ== + dependencies: + ansi-styles "^4.0.0" + astral-regex "^2.0.0" + is-fullwidth-code-point "^3.0.0" + +snake-case@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/snake-case/-/snake-case-2.1.0.tgz#41bdb1b73f30ec66a04d4e2cad1b76387d4d6d9f" + integrity sha512-FMR5YoPFwOLuh4rRz92dywJjyKYZNLpMn1R5ujVpIYkbA9p01fq8RMg0FkO4M+Yobt4MjHeLTJVm5xFFBHSV2Q== + dependencies: + no-case "^2.2.0" + +solc@0.7.3: + version "0.7.3" + resolved "https://registry.yarnpkg.com/solc/-/solc-0.7.3.tgz#04646961bd867a744f63d2b4e3c0701ffdc7d78a" + integrity sha512-GAsWNAjGzIDg7VxzP6mPjdurby3IkGCjQcM8GFYZT6RyaoUZKmMU6Y7YwG+tFGhv7dwZ8rmR4iwFDrrD99JwqA== + dependencies: + command-exists "^1.2.8" + commander "3.0.2" + follow-redirects "^1.12.1" + fs-extra "^0.30.0" + js-sha3 "0.8.0" + memorystream "^0.3.1" + require-from-string "^2.0.0" + semver "^5.5.0" + tmp "0.0.33" + +solc@^0.4.20: + version "0.4.26" + resolved "https://registry.yarnpkg.com/solc/-/solc-0.4.26.tgz#5390a62a99f40806b86258c737c1cf653cc35cb5" + integrity sha512-o+c6FpkiHd+HPjmjEVpQgH7fqZ14tJpXhho+/bQXlXbliLIS/xjXb42Vxh+qQY1WCSTMQ0+a5vR9vi0MfhU6mA== + dependencies: + fs-extra "^0.30.0" + memorystream "^0.3.1" + require-from-string "^1.1.0" + semver "^5.3.0" + yargs "^4.7.1" + +solidity-ast@^0.4.15: + version "0.4.49" + resolved "https://registry.yarnpkg.com/solidity-ast/-/solidity-ast-0.4.49.tgz#ecba89d10c0067845b7848c3a3e8cc61a4fc5b82" + integrity sha512-Pr5sCAj1SFqzwFZw1HPKSq0PehlQNdM8GwKyAVYh2DOn7/cCK8LUKD1HeHnKtTgBW7hi9h4nnnan7hpAg5RhWQ== + +solidity-coverage@^0.8.0: + version "0.8.2" + resolved "https://registry.yarnpkg.com/solidity-coverage/-/solidity-coverage-0.8.2.tgz#bc39604ab7ce0a3fa7767b126b44191830c07813" + integrity sha512-cv2bWb7lOXPE9/SSleDO6czkFiMHgP4NXPj+iW9W7iEKLBk7Cj0AGBiNmGX3V1totl9wjPrT0gHmABZKZt65rQ== + dependencies: + "@ethersproject/abi" "^5.0.9" + "@solidity-parser/parser" "^0.14.1" + chalk "^2.4.2" + death "^1.1.0" + detect-port "^1.3.0" + difflib "^0.2.4" + fs-extra "^8.1.0" + ghost-testrpc "^0.0.2" + global-modules "^2.0.0" + globby "^10.0.1" + jsonschema "^1.2.4" + lodash "^4.17.15" + mocha "7.1.2" + node-emoji "^1.10.0" + pify "^4.0.1" + recursive-readdir "^2.2.2" + sc-istanbul "^0.4.5" + semver "^7.3.4" + shelljs "^0.8.3" + web3-utils "^1.3.6" + +source-map-support@^0.5.13: + version "0.5.21" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" + integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + +source-map@^0.6.0, source-map@^0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== + +source-map@~0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.2.0.tgz#dab73fbcfc2ba819b4de03bd6f6eaa48164b3f9d" + integrity sha512-CBdZ2oa/BHhS4xj5DlhjWNHcan57/5YuvfdLf17iVmIpd9KRm+DFLmC6nBNj+6Ua7Kt3TmOjDpQT1aTYOQtoUA== + dependencies: + amdefine ">=0.0.4" + +spdx-correct@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.2.0.tgz#4f5ab0668f0059e34f9c00dce331784a12de4e9c" + integrity sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA== + dependencies: + spdx-expression-parse "^3.0.0" + spdx-license-ids "^3.0.0" + +spdx-exceptions@^2.1.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz#3f28ce1a77a00372683eade4a433183527a2163d" + integrity sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A== + +spdx-expression-parse@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz#cf70f50482eefdc98e3ce0a6833e4a53ceeba679" + integrity sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q== + dependencies: + spdx-exceptions "^2.1.0" + spdx-license-ids "^3.0.0" + +spdx-license-ids@^3.0.0: + version "3.0.13" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.13.tgz#7189a474c46f8d47c7b0da4b987bb45e908bd2d5" + integrity sha512-XkD+zwiqXHikFZm4AX/7JSCXA98U5Db4AFd5XUg/+9UNtnH75+Z9KxtpYiJZx36mUDVOwH83pl7yvCer6ewM3w== + +sprintf-js@~1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g== + +sshpk@^1.7.0: + version "1.17.0" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.17.0.tgz#578082d92d4fe612b13007496e543fa0fbcbe4c5" + integrity sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ== + dependencies: + asn1 "~0.2.3" + assert-plus "^1.0.0" + bcrypt-pbkdf "^1.0.0" + dashdash "^1.12.0" + ecc-jsbn "~0.1.1" + getpass "^0.1.1" + jsbn "~0.1.0" + safer-buffer "^2.0.2" + tweetnacl "~0.14.0" + +stacktrace-parser@^0.1.10: + version "0.1.10" + resolved "https://registry.yarnpkg.com/stacktrace-parser/-/stacktrace-parser-0.1.10.tgz#29fb0cae4e0d0b85155879402857a1639eb6051a" + integrity sha512-KJP1OCML99+8fhOHxwwzyWrlUuVX5GQ0ZpJTd1DFXhdkrvg1szxfHhawXUZ3g9TkXORQd4/WG68jMlQZ2p8wlg== + dependencies: + type-fest "^0.7.1" + +statuses@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-2.0.1.tgz#55cb000ccf1d48728bd23c685a063998cf1a1b63" + integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ== + +stealthy-require@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/stealthy-require/-/stealthy-require-1.1.1.tgz#35b09875b4ff49f26a777e509b3090a3226bf24b" + integrity sha512-ZnWpYnYugiOVEY5GkcuJK1io5V8QmNYChG62gSit9pQVGErXtrKuPC55ITaVSukmMta5qpMU7vqLt2Lnni4f/g== + +streamsearch@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/streamsearch/-/streamsearch-1.1.0.tgz#404dd1e2247ca94af554e841a8ef0eaa238da764" + integrity sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg== + +strict-uri-encode@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713" + integrity sha512-R3f198pcvnB+5IpnBlRkphuE9n46WyVl8I39W/ZUTZLz4nqSP/oLYUrcnJrw462Ds8he4YKMov2efsTIw1BDGQ== + +string-format@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/string-format/-/string-format-2.0.0.tgz#f2df2e7097440d3b65de31b6d40d54c96eaffb9b" + integrity sha512-bbEs3scLeYNXLecRRuk6uJxdXUSj6le/8rNPHChIJTn2V79aXVTR1EH2OH5zLKKoz0V02fOUKZZcw01pLUShZA== + +string-width@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" + integrity sha512-0XsVpQLnVCXHJfyEs8tC0zpTVIr5PKKsQtkT29IwupnPTjtPmQ3xT/4yCREF9hYkV/3M3kzcUTSAZT6a6h81tw== + dependencies: + code-point-at "^1.0.0" + is-fullwidth-code-point "^1.0.0" + strip-ansi "^3.0.0" + +"string-width@^1.0.2 || 2", string-width@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" + integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== + dependencies: + is-fullwidth-code-point "^2.0.0" + strip-ansi "^4.0.0" + +string-width@^3.0.0, string-width@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961" + integrity sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w== + dependencies: + emoji-regex "^7.0.1" + is-fullwidth-code-point "^2.0.0" + strip-ansi "^5.1.0" + +string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +string.prototype.trim@^1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.7.tgz#a68352740859f6893f14ce3ef1bb3037f7a90533" + integrity sha512-p6TmeT1T3411M8Cgg9wBTMRtY2q9+PNy9EV1i2lIXUN/btt763oIfxwN3RR8VU6wHX8j/1CFy0L+YuThm6bgOg== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.4" + es-abstract "^1.20.4" + +string.prototype.trimend@^1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz#c4a27fa026d979d79c04f17397f250a462944533" + integrity sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.4" + es-abstract "^1.20.4" + +string.prototype.trimstart@^1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz#e90ab66aa8e4007d92ef591bbf3cd422c56bdcf4" + integrity sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.4" + es-abstract "^1.20.4" + +string_decoder@^1.1.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" + integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== + dependencies: + safe-buffer "~5.2.0" + +string_decoder@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" + integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== + dependencies: + safe-buffer "~5.1.0" + +strip-ansi@^3.0.0, strip-ansi@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" + integrity sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg== + dependencies: + ansi-regex "^2.0.0" + +strip-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" + integrity sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow== + dependencies: + ansi-regex "^3.0.0" + +strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" + integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA== + dependencies: + ansi-regex "^4.1.0" + +strip-ansi@^6.0.0, strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + +strip-bom@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" + integrity sha512-kwrX1y7czp1E69n2ajbG65mIo9dqvJ+8aBQXOGVxqwvNbsXdFM6Lq37dLAY3mknUwru8CfcCbfOLL/gMo+fi3g== + dependencies: + is-utf8 "^0.2.0" + +strip-hex-prefix@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz#0c5f155fef1151373377de9dbb588da05500e36f" + integrity sha512-q8d4ue7JGEiVcypji1bALTos+0pWtyGlivAWyPuTkHzuTCJqrK9sWxYQZUq6Nq3cuyv3bm734IhHvHtGGURU6A== + dependencies: + is-hex-prefixed "1.0.0" + +strip-indent@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-2.0.0.tgz#5ef8db295d01e6ed6cbf7aab96998d7822527b68" + integrity sha512-RsSNPLpq6YUL7QYy44RnPVTn/lcVZtb48Uof3X5JLbF4zD/Gs7ZFDv2HWol+leoQN2mT86LAzSshGfkTlSOpsA== + +strip-json-comments@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" + integrity sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ== + +strip-json-comments@3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" + integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== + +supports-color@6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-6.0.0.tgz#76cfe742cf1f41bb9b1c29ad03068c05b4c0e40a" + integrity sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg== + dependencies: + has-flag "^3.0.0" + +supports-color@8.1.1: + version "8.1.1" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" + integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== + dependencies: + has-flag "^4.0.0" + +supports-color@^3.1.0: + version "3.2.3" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6" + integrity sha512-Jds2VIYDrlp5ui7t8abHN2bjAu4LV/q4N2KivFPpGH0lrka0BMq/33AmECUXlKPcHigkNaqfXRENFju+rlcy+A== + dependencies: + has-flag "^1.0.0" + +supports-color@^5.3.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" + integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== + dependencies: + has-flag "^3.0.0" + +supports-color@^7.1.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" + integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== + dependencies: + has-flag "^4.0.0" + +supports-preserve-symlinks-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" + integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== + +swap-case@^1.1.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/swap-case/-/swap-case-1.1.2.tgz#c39203a4587385fad3c850a0bd1bcafa081974e3" + integrity sha512-BAmWG6/bx8syfc6qXPprof3Mn5vQgf5dwdUNJhsNqU9WdPt5P+ES/wQ5bxfijy8zwZgZZHslC3iAsxsuQMCzJQ== + dependencies: + lower-case "^1.1.1" + upper-case "^1.1.1" + +swarm-js@^0.1.40: + version "0.1.42" + resolved "https://registry.yarnpkg.com/swarm-js/-/swarm-js-0.1.42.tgz#497995c62df6696f6e22372f457120e43e727979" + integrity sha512-BV7c/dVlA3R6ya1lMlSSNPLYrntt0LUq4YMgy3iwpCIc6rZnS5W2wUoctarZ5pXlpKtxDDf9hNziEkcfrxdhqQ== + dependencies: + bluebird "^3.5.0" + buffer "^5.0.5" + eth-lib "^0.1.26" + fs-extra "^4.0.2" + got "^11.8.5" + mime-types "^2.1.16" + mkdirp-promise "^5.0.1" + mock-fs "^4.1.0" + setimmediate "^1.0.5" + tar "^4.0.2" + xhr-request "^1.0.1" + +sync-request@^6.0.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/sync-request/-/sync-request-6.1.0.tgz#e96217565b5e50bbffe179868ba75532fb597e68" + integrity sha512-8fjNkrNlNCrVc/av+Jn+xxqfCjYaBoHqCsDz6mt030UMxJGr+GSfCV1dQt2gRtlL63+VPidwDVLr7V2OcTSdRw== + dependencies: + http-response-object "^3.0.1" + sync-rpc "^1.2.1" + then-request "^6.0.0" + +sync-rpc@^1.2.1: + version "1.3.6" + resolved "https://registry.yarnpkg.com/sync-rpc/-/sync-rpc-1.3.6.tgz#b2e8b2550a12ccbc71df8644810529deb68665a7" + integrity sha512-J8jTXuZzRlvU7HemDgHi3pGnh/rkoqR/OZSjhTyyZrEkkYQbk7Z33AXp37mkPfPpfdOuj7Ex3H/TJM1z48uPQw== + dependencies: + get-port "^3.1.0" + +table-layout@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/table-layout/-/table-layout-1.0.2.tgz#c4038a1853b0136d63365a734b6931cf4fad4a04" + integrity sha512-qd/R7n5rQTRFi+Zf2sk5XVVd9UQl6ZkduPFC3S7WEGJAmetDTjY3qPN50eSKzwuzEyQKy5TN2TiZdkIjos2L6A== + dependencies: + array-back "^4.0.1" + deep-extend "~0.6.0" + typical "^5.2.0" + wordwrapjs "^4.0.0" + +table@^6.8.0: + version "6.8.1" + resolved "https://registry.yarnpkg.com/table/-/table-6.8.1.tgz#ea2b71359fe03b017a5fbc296204471158080bdf" + integrity sha512-Y4X9zqrCftUhMeH2EptSSERdVKt/nEdijTOacGD/97EKjhQ/Qs8RTlEGABSJNNN8lac9kheH+af7yAkEWlgneA== + dependencies: + ajv "^8.0.1" + lodash.truncate "^4.4.2" + slice-ansi "^4.0.0" + string-width "^4.2.3" + strip-ansi "^6.0.1" + +tar@^4.0.2: + version "4.4.19" + resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.19.tgz#2e4d7263df26f2b914dee10c825ab132123742f3" + integrity sha512-a20gEsvHnWe0ygBY8JbxoM4w3SJdhc7ZAuxkLqh+nvNQN2IOt0B5lLgM490X5Hl8FF0dl0tOf2ewFYAlIFgzVA== + dependencies: + chownr "^1.1.4" + fs-minipass "^1.2.7" + minipass "^2.9.0" + minizlib "^1.3.3" + mkdirp "^0.5.5" + safe-buffer "^5.2.1" + yallist "^3.1.1" + +testrpc@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/testrpc/-/testrpc-0.0.1.tgz#83e2195b1f5873aec7be1af8cbe6dcf39edb7aed" + integrity sha512-afH1hO+SQ/VPlmaLUFj2636QMeDvPCeQMc/9RBMW0IfjNe9gFD9Ra3ShqYkB7py0do1ZcCna/9acHyzTJ+GcNA== + +then-request@^6.0.0: + version "6.0.2" + resolved "https://registry.yarnpkg.com/then-request/-/then-request-6.0.2.tgz#ec18dd8b5ca43aaee5cb92f7e4c1630e950d4f0c" + integrity sha512-3ZBiG7JvP3wbDzA9iNY5zJQcHL4jn/0BWtXIkagfz7QgOL/LqjCEOBQuJNZfu0XYnv5JhKh+cDxCPM4ILrqruA== + dependencies: + "@types/concat-stream" "^1.6.0" + "@types/form-data" "0.0.33" + "@types/node" "^8.0.0" + "@types/qs" "^6.2.31" + caseless "~0.12.0" + concat-stream "^1.6.0" + form-data "^2.2.0" + http-basic "^8.1.1" + http-response-object "^3.0.1" + promise "^8.0.0" + qs "^6.4.0" + +timed-out@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-4.0.1.tgz#f32eacac5a175bea25d7fab565ab3ed8741ef56f" + integrity sha512-G7r3AhovYtr5YKOWQkta8RKAPb+J9IsO4uVmzjl8AZwfhs8UcUwTiD6gcJYSgOtzyjvQKrKYn41syHbUWMkafA== + +title-case@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/title-case/-/title-case-2.1.1.tgz#3e127216da58d2bc5becf137ab91dae3a7cd8faa" + integrity sha512-EkJoZ2O3zdCz3zJsYCsxyq2OC5hrxR9mfdd5I+w8h/tmFfeOxJ+vvkxsKxdmN0WtS9zLdHEgfgVOiMVgv+Po4Q== + dependencies: + no-case "^2.2.0" + upper-case "^1.0.3" + +tmp@0.0.33: + version "0.0.33" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" + integrity sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw== + dependencies: + os-tmpdir "~1.0.2" + +to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== + dependencies: + is-number "^7.0.0" + +toidentifier@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35" + integrity sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA== + +tough-cookie@^2.3.3, tough-cookie@~2.5.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" + integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g== + dependencies: + psl "^1.1.28" + punycode "^2.1.1" + +tr46@~0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" + integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== + +ts-command-line-args@^2.2.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/ts-command-line-args/-/ts-command-line-args-2.5.0.tgz#7eeed3a6937b2612ea08a0794cf9d43fbbea89c4" + integrity sha512-Ff7Xt04WWCjj/cmPO9eWTJX3qpBZWuPWyQYG1vnxJao+alWWYjwJBc5aYz3h5p5dE08A6AnpkgiCtP/0KXXBYw== + dependencies: + "@morgan-stanley/ts-mocking-bird" "^0.6.2" + chalk "^4.1.0" + command-line-args "^5.1.1" + command-line-usage "^6.1.0" + string-format "^2.0.0" + +ts-essentials@^7.0.1: + version "7.0.3" + resolved "https://registry.yarnpkg.com/ts-essentials/-/ts-essentials-7.0.3.tgz#686fd155a02133eedcc5362dc8b5056cde3e5a38" + integrity sha512-8+gr5+lqO3G84KdiTSMRLtuyJ+nTBVRKuCrK4lidMPdVeEp0uqC875uE5NMcaA7YYMN7XsNiFQuMvasF8HT/xQ== + +ts-node@>=8.0.0: + version "10.9.1" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.1.tgz#e73de9102958af9e1f0b168a6ff320e25adcff4b" + integrity sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw== + dependencies: + "@cspotcode/source-map-support" "^0.8.0" + "@tsconfig/node10" "^1.0.7" + "@tsconfig/node12" "^1.0.7" + "@tsconfig/node14" "^1.0.0" + "@tsconfig/node16" "^1.0.2" + acorn "^8.4.1" + acorn-walk "^8.1.1" + arg "^4.1.0" + create-require "^1.1.0" + diff "^4.0.1" + make-error "^1.1.1" + v8-compile-cache-lib "^3.0.1" + yn "3.1.1" + +tslib@^1.9.3: + version "1.14.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" + integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== + +tsort@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/tsort/-/tsort-0.0.1.tgz#e2280f5e817f8bf4275657fd0f9aebd44f5a2786" + integrity sha512-Tyrf5mxF8Ofs1tNoxA13lFeZ2Zrbd6cKbuH3V+MQ5sb6DtBj5FjrXVsRWT8YvNAQTqNoz66dz1WsbigI22aEnw== + +tunnel-agent@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" + integrity sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w== + dependencies: + safe-buffer "^5.0.1" + +tweetnacl-util@^0.15.1: + version "0.15.1" + resolved "https://registry.yarnpkg.com/tweetnacl-util/-/tweetnacl-util-0.15.1.tgz#b80fcdb5c97bcc508be18c44a4be50f022eea00b" + integrity sha512-RKJBIj8lySrShN4w6i/BonWp2Z/uxwC3h4y7xsRrpP59ZboCd0GpEVsOnMDYLMmKBpYhb5TgHzZXy7wTfYFBRw== + +tweetnacl@^0.14.3, tweetnacl@~0.14.0: + version "0.14.5" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" + integrity sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA== + +tweetnacl@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-1.0.3.tgz#ac0af71680458d8a6378d0d0d050ab1407d35596" + integrity sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw== + +type-check@~0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" + integrity sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg== + dependencies: + prelude-ls "~1.1.2" + +type-detect@^4.0.0, type-detect@^4.0.5: + version "4.0.8" + resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" + integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== + +type-fest@^0.21.3: + version "0.21.3" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" + integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== + +type-fest@^0.7.1: + version "0.7.1" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.7.1.tgz#8dda65feaf03ed78f0a3f9678f1869147f7c5c48" + integrity sha512-Ne2YiiGN8bmrmJJEuTWTLJR32nh/JdL1+PSicowtNb0WFpn59GK8/lfD61bVtzguz7b3PBt74nxpv/Pw5po5Rg== + +type-is@~1.6.18: + version "1.6.18" + resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" + integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g== + dependencies: + media-typer "0.3.0" + mime-types "~2.1.24" + +type@^1.0.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/type/-/type-1.2.0.tgz#848dd7698dafa3e54a6c479e759c4bc3f18847a0" + integrity sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg== + +type@^2.7.2: + version "2.7.2" + resolved "https://registry.yarnpkg.com/type/-/type-2.7.2.tgz#2376a15a3a28b1efa0f5350dcf72d24df6ef98d0" + integrity sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw== + +typechain@^8.1.0: + version "8.1.1" + resolved "https://registry.yarnpkg.com/typechain/-/typechain-8.1.1.tgz#9c2e8012c2c4c586536fc18402dcd7034c4ff0bd" + integrity sha512-uF/sUvnXTOVF2FHKhQYnxHk4su4JjZR8vr4mA2mBaRwHTbwh0jIlqARz9XJr1tA0l7afJGvEa1dTSi4zt039LQ== + dependencies: + "@types/prettier" "^2.1.1" + debug "^4.3.1" + fs-extra "^7.0.0" + glob "7.1.7" + js-sha3 "^0.8.0" + lodash "^4.17.15" + mkdirp "^1.0.4" + prettier "^2.3.1" + ts-command-line-args "^2.2.0" + ts-essentials "^7.0.1" + +typed-array-length@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/typed-array-length/-/typed-array-length-1.0.4.tgz#89d83785e5c4098bec72e08b319651f0eac9c1bb" + integrity sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng== + dependencies: + call-bind "^1.0.2" + for-each "^0.3.3" + is-typed-array "^1.1.9" + +typedarray-to-buffer@^3.1.5: + version "3.1.5" + resolved "https://registry.yarnpkg.com/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz#a97ee7a9ff42691b9f783ff1bc5112fe3fca9080" + integrity sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q== + dependencies: + is-typedarray "^1.0.0" + +typedarray@^0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" + integrity sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA== + +typescript@>=4.5.0: + version "5.0.4" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.0.4.tgz#b217fd20119bd61a94d4011274e0ab369058da3b" + integrity sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw== + +typical@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/typical/-/typical-4.0.0.tgz#cbeaff3b9d7ae1e2bbfaf5a4e6f11eccfde94fc4" + integrity sha512-VAH4IvQ7BDFYglMd7BPRDfLgxZZX4O4TFcRDA6EN5X7erNJJq+McIEp8np9aVtxrCJ6qx4GTYVfOWNjcqwZgRw== + +typical@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/typical/-/typical-5.2.0.tgz#4daaac4f2b5315460804f0acf6cb69c52bb93066" + integrity sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg== + +uglify-js@^3.1.4: + version "3.17.4" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.17.4.tgz#61678cf5fa3f5b7eb789bb345df29afb8257c22c" + integrity sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g== + +ultron@~1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.1.1.tgz#9fe1536a10a664a65266a1e3ccf85fd36302bc9c" + integrity sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og== + +unbox-primitive@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.2.tgz#29032021057d5e6cdbd08c5129c226dff8ed6f9e" + integrity sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw== + dependencies: + call-bind "^1.0.2" + has-bigints "^1.0.2" + has-symbols "^1.0.3" + which-boxed-primitive "^1.0.2" + +undici@^5.14.0: + version "5.22.0" + resolved "https://registry.yarnpkg.com/undici/-/undici-5.22.0.tgz#5e205d82a5aecc003fc4388ccd3d2c6e8674a0ad" + integrity sha512-fR9RXCc+6Dxav4P9VV/sp5w3eFiSdOjJYsbtWfd4s5L5C4ogyuVpdKIVHeW0vV1MloM65/f7W45nR9ZxwVdyiA== + dependencies: + busboy "^1.6.0" + +universalify@^0.1.0: + version "0.1.2" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" + integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== + +universalify@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717" + integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ== + +unpipe@1.0.0, unpipe@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" + integrity sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ== + +untildify@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/untildify/-/untildify-4.0.0.tgz#2bc947b953652487e4600949fb091e3ae8cd919b" + integrity sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw== + +upper-case-first@^1.1.0, upper-case-first@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/upper-case-first/-/upper-case-first-1.1.2.tgz#5d79bedcff14419518fd2edb0a0507c9b6859115" + integrity sha512-wINKYvI3Db8dtjikdAqoBbZoP6Q+PZUyfMR7pmwHzjC2quzSkUq5DmPrTtPEqHaz8AGtmsB4TqwapMTM1QAQOQ== + dependencies: + upper-case "^1.1.1" + +upper-case@^1.0.3, upper-case@^1.1.0, upper-case@^1.1.1, upper-case@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/upper-case/-/upper-case-1.1.3.tgz#f6b4501c2ec4cdd26ba78be7222961de77621598" + integrity sha512-WRbjgmYzgXkCV7zNVpy5YgrHgbBv126rMALQQMrmzOVC4GM2waQ9x7xtm8VU+1yF2kWyPzI9zbZ48n4vSxwfSA== + +uri-js@^4.2.2: + version "4.4.1" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" + integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== + dependencies: + punycode "^2.1.0" + +url-set-query@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/url-set-query/-/url-set-query-1.0.0.tgz#016e8cfd7c20ee05cafe7795e892bd0702faa339" + integrity sha512-3AChu4NiXquPfeckE5R5cGdiHCMWJx1dwCWOmWIL4KHAziJNOFIYJlpGFeKDvwLPHovZRCxK3cYlwzqI9Vp+Gg== + +utf-8-validate@^5.0.2: + version "5.0.10" + resolved "https://registry.yarnpkg.com/utf-8-validate/-/utf-8-validate-5.0.10.tgz#d7d10ea39318171ca982718b6b96a8d2442571a2" + integrity sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ== + dependencies: + node-gyp-build "^4.3.0" + +utf8@3.0.0, utf8@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/utf8/-/utf8-3.0.0.tgz#f052eed1364d696e769ef058b183df88c87f69d1" + integrity sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ== + +util-deprecate@^1.0.1, util-deprecate@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== + +util@^0.12.5: + version "0.12.5" + resolved "https://registry.yarnpkg.com/util/-/util-0.12.5.tgz#5f17a6059b73db61a875668781a1c2b136bd6fbc" + integrity sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA== + dependencies: + inherits "^2.0.3" + is-arguments "^1.0.4" + is-generator-function "^1.0.7" + is-typed-array "^1.1.3" + which-typed-array "^1.1.2" + +utils-merge@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" + integrity sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA== + +uuid@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-2.0.1.tgz#c2a30dedb3e535d72ccf82e343941a50ba8533ac" + integrity sha512-nWg9+Oa3qD2CQzHIP4qKUqwNfzKn8P0LtFhotaCTFchsV7ZfDhAybeip/HZVeMIpZi9JgY1E3nUlwaCmZT1sEg== + +uuid@^3.3.2: + version "3.4.0" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" + integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== + +uuid@^7.0.3: + version "7.0.3" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-7.0.3.tgz#c5c9f2c8cf25dc0a372c4df1441c41f5bd0c680b" + integrity sha512-DPSke0pXhTZgoF/d+WSt2QaKMCFSfx7QegxEWT+JOuHF5aWrKEn0G+ztjuJg/gG8/ItK+rbPCD/yNv8yyih6Cg== + +uuid@^8.3.2: + version "8.3.2" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" + integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== + +uuid@^9.0.0: + version "9.0.0" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-9.0.0.tgz#592f550650024a38ceb0c562f2f6aa435761efb5" + integrity sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg== + +v8-compile-cache-lib@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf" + integrity sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg== + +validate-npm-package-license@^3.0.1: + version "3.0.4" + resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" + integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew== + dependencies: + spdx-correct "^3.0.0" + spdx-expression-parse "^3.0.0" + +varint@^5.0.0: + version "5.0.2" + resolved "https://registry.yarnpkg.com/varint/-/varint-5.0.2.tgz#5b47f8a947eb668b848e034dcfa87d0ff8a7f7a4" + integrity sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow== + +vary@^1, vary@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" + integrity sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg== + +verror@1.10.0: + version "1.10.0" + resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" + integrity sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw== + dependencies: + assert-plus "^1.0.0" + core-util-is "1.0.2" + extsprintf "^1.2.0" + +web3-bzz@1.8.2: + version "1.8.2" + resolved "https://registry.yarnpkg.com/web3-bzz/-/web3-bzz-1.8.2.tgz#67ea1c775874056250eece551ded22905ed08784" + integrity sha512-1EEnxjPnFnvNWw3XeeKuTR8PBxYd0+XWzvaLK7OJC/Go9O8llLGxrxICbKV+8cgIE0sDRBxiYx02X+6OhoAQ9w== + dependencies: + "@types/node" "^12.12.6" + got "12.1.0" + swarm-js "^0.1.40" + +web3-bzz@1.9.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/web3-bzz/-/web3-bzz-1.9.0.tgz#3334049f386e73e2b3dcfa96432e65391538d8ac" + integrity sha512-9Zli9dikX8GdHwBb5/WPzpSVuy3EWMKY3P4EokCQra31fD7DLizqAAaTUsFwnK7xYkw5ogpHgelw9uKHHzNajg== + dependencies: + "@types/node" "^12.12.6" + got "12.1.0" + swarm-js "^0.1.40" + +web3-core-helpers@1.8.2: + version "1.8.2" + resolved "https://registry.yarnpkg.com/web3-core-helpers/-/web3-core-helpers-1.8.2.tgz#82066560f8085e6c7b93bcc8e88b441289ea9f9f" + integrity sha512-6B1eLlq9JFrfealZBomd1fmlq1o4A09vrCVQSa51ANoib/jllT3atZrRDr0zt1rfI7TSZTZBXdN/aTdeN99DWw== + dependencies: + web3-eth-iban "1.8.2" + web3-utils "1.8.2" + +web3-core-helpers@1.9.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/web3-core-helpers/-/web3-core-helpers-1.9.0.tgz#a1ca4ac7b9cec822886643312d2e98b0e4d8f1bc" + integrity sha512-NeJzylAp9Yj9xAt2uTT+kyug3X0DLnfBdnAcGZuY6HhoNPDIfQRA9CkJjLngVRlGTLZGjNp9x9eR+RyZQgUlXg== + dependencies: + web3-eth-iban "1.9.0" + web3-utils "1.9.0" + +web3-core-method@1.8.2: + version "1.8.2" + resolved "https://registry.yarnpkg.com/web3-core-method/-/web3-core-method-1.8.2.tgz#ba5ec68084e903f0516415010477618be017eac2" + integrity sha512-1qnr5mw5wVyULzLOrk4B+ryO3gfGjGd/fx8NR+J2xCGLf1e6OSjxT9vbfuQ3fErk/NjSTWWreieYWLMhaogcRA== + dependencies: + "@ethersproject/transactions" "^5.6.2" + web3-core-helpers "1.8.2" + web3-core-promievent "1.8.2" + web3-core-subscriptions "1.8.2" + web3-utils "1.8.2" + +web3-core-method@1.9.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/web3-core-method/-/web3-core-method-1.9.0.tgz#81da8aa21503b470537c9f075f30adfad194a2d8" + integrity sha512-sswbNsY2xRBBhGeaLt9c/eDc+0yDDhi6keUBAkgIRa9ueSx/VKzUY9HMqiV6bXDcGT2fJyejq74FfEB4lc/+/w== + dependencies: + "@ethersproject/transactions" "^5.6.2" + web3-core-helpers "1.9.0" + web3-core-promievent "1.9.0" + web3-core-subscriptions "1.9.0" + web3-utils "1.9.0" + +web3-core-promievent@1.8.2: + version "1.8.2" + resolved "https://registry.yarnpkg.com/web3-core-promievent/-/web3-core-promievent-1.8.2.tgz#e670d6b4453632e6ecfd9ad82da44f77ac1585c9" + integrity sha512-nvkJWDVgoOSsolJldN33tKW6bKKRJX3MCPDYMwP5SUFOA/mCzDEoI88N0JFofDTXkh1k7gOqp1pvwi9heuaxGg== + dependencies: + eventemitter3 "4.0.4" + +web3-core-promievent@1.9.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/web3-core-promievent/-/web3-core-promievent-1.9.0.tgz#2598a4d91b4edd3607366529f52bc96dee9f6d83" + integrity sha512-PHG1Mn23IGwMZhnPDN8dETKypqsFbHfiyRqP+XsVMPmTHkVfzDQTCBU/c2r6hUktBDoGKut5xZQpGfhFk71KbQ== + dependencies: + eventemitter3 "4.0.4" + +web3-core-requestmanager@1.8.2: + version "1.8.2" + resolved "https://registry.yarnpkg.com/web3-core-requestmanager/-/web3-core-requestmanager-1.8.2.tgz#dda95e83ca4808949612a41e54ecea557f78ef26" + integrity sha512-p1d090RYs5Mu7DK1yyc3GCBVZB/03rBtFhYFoS2EruGzOWs/5Q0grgtpwS/DScdRAm8wB8mYEBhY/RKJWF6B2g== + dependencies: + util "^0.12.5" + web3-core-helpers "1.8.2" + web3-providers-http "1.8.2" + web3-providers-ipc "1.8.2" + web3-providers-ws "1.8.2" + +web3-core-requestmanager@1.9.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/web3-core-requestmanager/-/web3-core-requestmanager-1.9.0.tgz#9d7d0e7f890cf7a24e9c568b9772c64d57fc4fcd" + integrity sha512-hcJ5PCtTIJpj+8qWxoseqlCovDo94JJjTX7dZOLXgwp8ah7E3WRYozhGyZocerx+KebKyg1mCQIhkDpMwjfo9Q== + dependencies: + util "^0.12.5" + web3-core-helpers "1.9.0" + web3-providers-http "1.9.0" + web3-providers-ipc "1.9.0" + web3-providers-ws "1.9.0" + +web3-core-subscriptions@1.8.2: + version "1.8.2" + resolved "https://registry.yarnpkg.com/web3-core-subscriptions/-/web3-core-subscriptions-1.8.2.tgz#0c8bd49439d83c6f0a03c70f00b24a915a70a5ed" + integrity sha512-vXQogHDmAIQcKpXvGiMddBUeP9lnKgYF64+yQJhPNE5PnWr1sAibXuIPV7mIPihpFr/n/DORRj6Wh1pUv9zaTw== + dependencies: + eventemitter3 "4.0.4" + web3-core-helpers "1.8.2" + +web3-core-subscriptions@1.9.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/web3-core-subscriptions/-/web3-core-subscriptions-1.9.0.tgz#dc67b478875dab1875844df3307a986dd7d468dd" + integrity sha512-MaIo29yz7hTV8X8bioclPDbHFOVuHmnbMv+D3PDH12ceJFJAXGyW8GL5KU1DYyWIj4TD1HM4WknyVA/YWBiiLA== + dependencies: + eventemitter3 "4.0.4" + web3-core-helpers "1.9.0" + +web3-core@1.8.2: + version "1.8.2" + resolved "https://registry.yarnpkg.com/web3-core/-/web3-core-1.8.2.tgz#333e93d7872b1a36efe758ed8b89a7acbdd962c2" + integrity sha512-DJTVEAYcNqxkqruJE+Rxp3CIv0y5AZMwPHQmOkz/cz+MM75SIzMTc0AUdXzGyTS8xMF8h3YWMQGgGEy8SBf1PQ== + dependencies: + "@types/bn.js" "^5.1.0" + "@types/node" "^12.12.6" + bignumber.js "^9.0.0" + web3-core-helpers "1.8.2" + web3-core-method "1.8.2" + web3-core-requestmanager "1.8.2" + web3-utils "1.8.2" + +web3-core@1.9.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/web3-core/-/web3-core-1.9.0.tgz#9cfafb2f8c01931429108af75205610406a5a1ab" + integrity sha512-DZ+TPmq/ZLlx4LSVzFgrHCP/QFpKDbGWO4HoquZSdu24cjk5SZ+FEU1SZB2OaK3/bgBh+25mRbmv8y56ysUu1w== + dependencies: + "@types/bn.js" "^5.1.1" + "@types/node" "^12.12.6" + bignumber.js "^9.0.0" + web3-core-helpers "1.9.0" + web3-core-method "1.9.0" + web3-core-requestmanager "1.9.0" + web3-utils "1.9.0" + +web3-eth-abi@1.8.2: + version "1.8.2" + resolved "https://registry.yarnpkg.com/web3-eth-abi/-/web3-eth-abi-1.8.2.tgz#16e1e9be40e2527404f041a4745111211488f31a" + integrity sha512-Om9g3kaRNjqiNPAgKwGT16y+ZwtBzRe4ZJFGjLiSs6v5I7TPNF+rRMWuKnR6jq0azQZDj6rblvKFMA49/k48Og== + dependencies: + "@ethersproject/abi" "^5.6.3" + web3-utils "1.8.2" + +web3-eth-abi@1.9.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/web3-eth-abi/-/web3-eth-abi-1.9.0.tgz#18662ef68bd3d25eedd9a1a1484089c39529c652" + integrity sha512-0BLQ3FKMrzJkA930jOX3fMaybAyubk06HChclLpiR0NWmgWXm1tmBrJdkyRy2ZTZpmfuZc9xTFRfl0yZID1voA== + dependencies: + "@ethersproject/abi" "^5.6.3" + web3-utils "1.9.0" + +web3-eth-accounts@1.8.2: + version "1.8.2" + resolved "https://registry.yarnpkg.com/web3-eth-accounts/-/web3-eth-accounts-1.8.2.tgz#b894f5d5158fcae429da42de75d96520d0712971" + integrity sha512-c367Ij63VCz9YdyjiHHWLFtN85l6QghgwMQH2B1eM/p9Y5lTlTX7t/Eg/8+f1yoIStXbk2w/PYM2lk+IkbqdLA== + dependencies: + "@ethereumjs/common" "2.5.0" + "@ethereumjs/tx" "3.3.2" + eth-lib "0.2.8" + ethereumjs-util "^7.1.5" + scrypt-js "^3.0.1" + uuid "^9.0.0" + web3-core "1.8.2" + web3-core-helpers "1.8.2" + web3-core-method "1.8.2" + web3-utils "1.8.2" + +web3-eth-accounts@1.9.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/web3-eth-accounts/-/web3-eth-accounts-1.9.0.tgz#fab7d563c63bdff2aa5ad89a94faf128961d9504" + integrity sha512-VeIZVevmnSll0AC1k5F/y398ZE89d1SRuYk8IewLUhL/tVAsFEsjl2SGgm0+aDcHmgPrkW+qsCJ+C7rWg/N4ZA== + dependencies: + "@ethereumjs/common" "2.5.0" + "@ethereumjs/tx" "3.3.2" + eth-lib "0.2.8" + ethereumjs-util "^7.1.5" + scrypt-js "^3.0.1" + uuid "^9.0.0" + web3-core "1.9.0" + web3-core-helpers "1.9.0" + web3-core-method "1.9.0" + web3-utils "1.9.0" + +web3-eth-contract@1.8.2: + version "1.8.2" + resolved "https://registry.yarnpkg.com/web3-eth-contract/-/web3-eth-contract-1.8.2.tgz#5388b7130923d2b790c09a420391a81312a867fb" + integrity sha512-ID5A25tHTSBNwOPjiXSVzxruz006ULRIDbzWTYIFTp7NJ7vXu/kynKK2ag/ObuTqBpMbobP8nXcA9b5EDkIdQA== + dependencies: + "@types/bn.js" "^5.1.0" + web3-core "1.8.2" + web3-core-helpers "1.8.2" + web3-core-method "1.8.2" + web3-core-promievent "1.8.2" + web3-core-subscriptions "1.8.2" + web3-eth-abi "1.8.2" + web3-utils "1.8.2" + +web3-eth-contract@1.9.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/web3-eth-contract/-/web3-eth-contract-1.9.0.tgz#00b7ac8314d562d10d7dd0c7d0f52555c3862995" + integrity sha512-+j26hpSaEtAdUed0TN5rnc+YZOcjPxMjFX4ZBKatvFkImdbVv/tzTvcHlltubSpgb2ZLyZ89lSL6phKYwd2zNQ== + dependencies: + "@types/bn.js" "^5.1.1" + web3-core "1.9.0" + web3-core-helpers "1.9.0" + web3-core-method "1.9.0" + web3-core-promievent "1.9.0" + web3-core-subscriptions "1.9.0" + web3-eth-abi "1.9.0" + web3-utils "1.9.0" + +web3-eth-ens@1.8.2: + version "1.8.2" + resolved "https://registry.yarnpkg.com/web3-eth-ens/-/web3-eth-ens-1.8.2.tgz#0a086ad4d919102e28b9fd3036df246add9df22a" + integrity sha512-PWph7C/CnqdWuu1+SH4U4zdrK4t2HNt0I4XzPYFdv9ugE8EuojselioPQXsVGvjql+Nt3jDLvQvggPqlMbvwRw== + dependencies: + content-hash "^2.5.2" + eth-ens-namehash "2.0.8" + web3-core "1.8.2" + web3-core-helpers "1.8.2" + web3-core-promievent "1.8.2" + web3-eth-abi "1.8.2" + web3-eth-contract "1.8.2" + web3-utils "1.8.2" + +web3-eth-ens@1.9.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/web3-eth-ens/-/web3-eth-ens-1.9.0.tgz#2014b16e1116be5ab34404a8db29ad1d8632ced0" + integrity sha512-LOJZeN+AGe9arhuExnrPPFYQr4WSxXEkpvYIlst/joOEUNLDwfndHnJIK6PI5mXaYSROBtTx6erv+HupzGo7vA== + dependencies: + content-hash "^2.5.2" + eth-ens-namehash "2.0.8" + web3-core "1.9.0" + web3-core-helpers "1.9.0" + web3-core-promievent "1.9.0" + web3-eth-abi "1.9.0" + web3-eth-contract "1.9.0" + web3-utils "1.9.0" + +web3-eth-iban@1.8.2: + version "1.8.2" + resolved "https://registry.yarnpkg.com/web3-eth-iban/-/web3-eth-iban-1.8.2.tgz#5cb3022234b13986f086353b53f0379a881feeaf" + integrity sha512-h3vNblDWkWMuYx93Q27TAJz6lhzpP93EiC3+45D6xoz983p6si773vntoQ+H+5aZhwglBtoiBzdh7PSSOnP/xQ== + dependencies: + bn.js "^5.2.1" + web3-utils "1.8.2" + +web3-eth-iban@1.9.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/web3-eth-iban/-/web3-eth-iban-1.9.0.tgz#a8f838e42c20d49ff58aaa9f67ece47a968e40b1" + integrity sha512-jPAm77PuEs1kE/UrrBFJdPD2PN42pwfXA0gFuuw35bZezhskYML9W4QCxcqnUtceyEA4FUn7K2qTMuCk+23fog== + dependencies: + bn.js "^5.2.1" + web3-utils "1.9.0" + +web3-eth-personal@1.8.2: + version "1.8.2" + resolved "https://registry.yarnpkg.com/web3-eth-personal/-/web3-eth-personal-1.8.2.tgz#3526c1ebaa4e7bf3a0a8ec77e34f067cc9a750b2" + integrity sha512-Vg4HfwCr7doiUF/RC+Jz0wT4+cYaXcOWMAW2AHIjHX6Z7Xwa8nrURIeQgeEE62qcEHAzajyAdB1u6bJyTfuCXw== + dependencies: + "@types/node" "^12.12.6" + web3-core "1.8.2" + web3-core-helpers "1.8.2" + web3-core-method "1.8.2" + web3-net "1.8.2" + web3-utils "1.8.2" + +web3-eth-personal@1.9.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/web3-eth-personal/-/web3-eth-personal-1.9.0.tgz#f5092bcb2688979dd7778d5a56ae6922c341ce52" + integrity sha512-r9Ldo/luBqJlv1vCUEQnUS+C3a3ZdbYxVHyfDkj6RWMyCqqo8JE41HWE+pfa0RmB1xnGL2g8TbYcHcqItck/qg== + dependencies: + "@types/node" "^12.12.6" + web3-core "1.9.0" + web3-core-helpers "1.9.0" + web3-core-method "1.9.0" + web3-net "1.9.0" + web3-utils "1.9.0" + +web3-eth@1.8.2: + version "1.8.2" + resolved "https://registry.yarnpkg.com/web3-eth/-/web3-eth-1.8.2.tgz#8562287ae1803c30eb54dc7d832092e5739ce06a" + integrity sha512-JoTiWWc4F4TInpbvDUGb0WgDYJsFhuIjJlinc5ByjWD88Gvh+GKLsRjjFdbqe5YtwIGT4NymwoC5LQd1K6u/QQ== + dependencies: + web3-core "1.8.2" + web3-core-helpers "1.8.2" + web3-core-method "1.8.2" + web3-core-subscriptions "1.8.2" + web3-eth-abi "1.8.2" + web3-eth-accounts "1.8.2" + web3-eth-contract "1.8.2" + web3-eth-ens "1.8.2" + web3-eth-iban "1.8.2" + web3-eth-personal "1.8.2" + web3-net "1.8.2" + web3-utils "1.8.2" + +web3-eth@1.9.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/web3-eth/-/web3-eth-1.9.0.tgz#1fe82ba429a44b1aa0a3b95de3e79e6c5a9eb00c" + integrity sha512-c5gSWk9bLNr6VPATHmZ1n7LTIefIZQnJMzfnvkoBcIFGKJbGmsuRhv6lEXsKdAO/FlqYnSbaw3fOq1fVFiIOFQ== + dependencies: + web3-core "1.9.0" + web3-core-helpers "1.9.0" + web3-core-method "1.9.0" + web3-core-subscriptions "1.9.0" + web3-eth-abi "1.9.0" + web3-eth-accounts "1.9.0" + web3-eth-contract "1.9.0" + web3-eth-ens "1.9.0" + web3-eth-iban "1.9.0" + web3-eth-personal "1.9.0" + web3-net "1.9.0" + web3-utils "1.9.0" + +web3-net@1.8.2: + version "1.8.2" + resolved "https://registry.yarnpkg.com/web3-net/-/web3-net-1.8.2.tgz#97e1e0015fabc4cda31017813e98d0b5468dd04f" + integrity sha512-1itkDMGmbgb83Dg9nporFes9/fxsU7smJ3oRXlFkg4ZHn8YJyP1MSQFPJWWwSc+GrcCFt4O5IrUTvEkHqE3xag== + dependencies: + web3-core "1.8.2" + web3-core-method "1.8.2" + web3-utils "1.8.2" + +web3-net@1.9.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/web3-net/-/web3-net-1.9.0.tgz#ee8799bf766039aa5b157d6db0be5ffdecd39d64" + integrity sha512-L+fDZFgrLM5Y15aonl2q6L+RvfaImAngmC0Jv45hV2FJ5IfRT0/2ob9etxZmvEBWvOpbqSvghfOhJIT3XZ37Pg== + dependencies: + web3-core "1.9.0" + web3-core-method "1.9.0" + web3-utils "1.9.0" + +web3-providers-http@1.8.2: + version "1.8.2" + resolved "https://registry.yarnpkg.com/web3-providers-http/-/web3-providers-http-1.8.2.tgz#fbda3a3bbc8db004af36e91bec35f80273b37885" + integrity sha512-2xY94IIEQd16+b+vIBF4IC1p7GVaz9q4EUFscvMUjtEq4ru4Atdzjs9GP+jmcoo49p70II0UV3bqQcz0TQfVyQ== + dependencies: + abortcontroller-polyfill "^1.7.3" + cross-fetch "^3.1.4" + es6-promise "^4.2.8" + web3-core-helpers "1.8.2" + +web3-providers-http@1.9.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/web3-providers-http/-/web3-providers-http-1.9.0.tgz#93cd3eb42fff974c9f7634ede1a9795d6435c3fe" + integrity sha512-5+dMNDAE0rRFz6SJpfnBqlVi2J5bB/Ivr2SanMt2YUrkxW5t8betZbzVwRkTbwtUvkqgj3xeUQzqpOttiv+IqQ== + dependencies: + abortcontroller-polyfill "^1.7.3" + cross-fetch "^3.1.4" + es6-promise "^4.2.8" + web3-core-helpers "1.9.0" + +web3-providers-ipc@1.8.2: + version "1.8.2" + resolved "https://registry.yarnpkg.com/web3-providers-ipc/-/web3-providers-ipc-1.8.2.tgz#e52a7250f40c83b99a2482ec5b4cf2728377ae5c" + integrity sha512-p6fqKVGFg+WiXGHWnB1hu43PbvPkDHTz4RgoEzbXugv5rtv5zfYLqm8Ba6lrJOS5ks9kGKR21a0y3NzE3u7V4w== + dependencies: + oboe "2.1.5" + web3-core-helpers "1.8.2" + +web3-providers-ipc@1.9.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/web3-providers-ipc/-/web3-providers-ipc-1.9.0.tgz#db486cb0dde9062ac6055478861e3d37535924d2" + integrity sha512-cPXU93Du40HCylvjaa5x62DbnGqH+86HpK/+kMcFIzF6sDUBhKpag2tSbYhGbj7GMpfkmDTUiiMLdWnFV6+uBA== + dependencies: + oboe "2.1.5" + web3-core-helpers "1.9.0" + +web3-providers-ws@1.8.2: + version "1.8.2" + resolved "https://registry.yarnpkg.com/web3-providers-ws/-/web3-providers-ws-1.8.2.tgz#56a2b701387011aca9154ca4bc06ea4b5f27e4ef" + integrity sha512-3s/4K+wHgbiN+Zrp9YjMq2eqAF6QGABw7wFftPdx+m5hWImV27/MoIx57c6HffNRqZXmCHnfWWFCNHHsi7wXnA== + dependencies: + eventemitter3 "4.0.4" + web3-core-helpers "1.8.2" + websocket "^1.0.32" + +web3-providers-ws@1.9.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/web3-providers-ws/-/web3-providers-ws-1.9.0.tgz#568330766e8abbb6eb43e1153a72fb24398fcb7e" + integrity sha512-JRVsnQZ7j2k1a2yzBNHe39xqk1ijOv01dfIBFw52VeEkSRzvrOcsPIM/ttSyBuJqt70ntMxXY0ekCrqfleKH/w== + dependencies: + eventemitter3 "4.0.4" + web3-core-helpers "1.9.0" + websocket "^1.0.32" + +web3-shh@1.8.2: + version "1.8.2" + resolved "https://registry.yarnpkg.com/web3-shh/-/web3-shh-1.8.2.tgz#217a417f0d6e243dd4d441848ffc2bd164cea8a0" + integrity sha512-uZ+3MAoNcaJsXXNCDnizKJ5viBNeHOFYsCbFhV755Uu52FswzTOw6DtE7yK9nYXMtIhiSgi7nwl1RYzP8pystw== + dependencies: + web3-core "1.8.2" + web3-core-method "1.8.2" + web3-core-subscriptions "1.8.2" + web3-net "1.8.2" + +web3-shh@1.9.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/web3-shh/-/web3-shh-1.9.0.tgz#75a37cd9f78d485ee5f018e2e66853e1e1c6ce4f" + integrity sha512-bIBZlralgz4ICCrwkefB2nPPJWfx28NuHIpjB7d9ADKynElubQuqudYhKtSEkKXACuME/BJm0pIFJcJs/gDnMg== + dependencies: + web3-core "1.9.0" + web3-core-method "1.9.0" + web3-core-subscriptions "1.9.0" + web3-net "1.9.0" + +web3-utils@1.8.2: + version "1.8.2" + resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.8.2.tgz#c32dec5e9b955acbab220eefd7715bc540b75cc9" + integrity sha512-v7j6xhfLQfY7xQDrUP0BKbaNrmZ2/+egbqP9q3KYmOiPpnvAfol+32slgL0WX/5n8VPvKCK5EZ1HGrAVICSToA== + dependencies: + bn.js "^5.2.1" + ethereum-bloom-filters "^1.0.6" + ethereumjs-util "^7.1.0" + ethjs-unit "0.1.6" + number-to-bn "1.7.0" + randombytes "^2.1.0" + utf8 "3.0.0" + +web3-utils@1.9.0, web3-utils@^1.0.0-beta.31, web3-utils@^1.2.5, web3-utils@^1.3.6: + version "1.9.0" + resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.9.0.tgz#7c5775a47586cefb4ad488831be8f6627be9283d" + integrity sha512-p++69rCNNfu2jM9n5+VD/g26l+qkEOQ1m6cfRQCbH8ZRrtquTmrirJMgTmyOoax5a5XRYOuws14aypCOs51pdQ== + dependencies: + bn.js "^5.2.1" + ethereum-bloom-filters "^1.0.6" + ethereumjs-util "^7.1.0" + ethjs-unit "0.1.6" + number-to-bn "1.7.0" + randombytes "^2.1.0" + utf8 "3.0.0" + +web3@1.8.2: + version "1.8.2" + resolved "https://registry.yarnpkg.com/web3/-/web3-1.8.2.tgz#95a4e5398fd0f01325264bf8e5e8cdc69a7afe86" + integrity sha512-92h0GdEHW9wqDICQQKyG4foZBYi0OQkyg4CRml2F7XBl/NG+fu9o6J19kzfFXzSBoA4DnJXbyRgj/RHZv5LRiw== + dependencies: + web3-bzz "1.8.2" + web3-core "1.8.2" + web3-eth "1.8.2" + web3-eth-personal "1.8.2" + web3-net "1.8.2" + web3-shh "1.8.2" + web3-utils "1.8.2" + +web3@^1.2.5: + version "1.9.0" + resolved "https://registry.yarnpkg.com/web3/-/web3-1.9.0.tgz#4fde5d134f8ee11355ed5bfa1bb41f8bc58e23f3" + integrity sha512-E9IvVy/d2ozfQQsCiV+zh/LmlZGv9fQxI0UedDVjm87yOKf4AYbBNEn1iWtHveiGzAk2CEMZMUzAZzaQNSSYog== + dependencies: + web3-bzz "1.9.0" + web3-core "1.9.0" + web3-eth "1.9.0" + web3-eth-personal "1.9.0" + web3-net "1.9.0" + web3-shh "1.9.0" + web3-utils "1.9.0" + +webidl-conversions@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" + integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== + +websocket@^1.0.32: + version "1.0.34" + resolved "https://registry.yarnpkg.com/websocket/-/websocket-1.0.34.tgz#2bdc2602c08bf2c82253b730655c0ef7dcab3111" + integrity sha512-PRDso2sGwF6kM75QykIesBijKSVceR6jL2G8NGYyq2XrItNC2P5/qL5XeR056GhA+Ly7JMFvJb9I312mJfmqnQ== + dependencies: + bufferutil "^4.0.1" + debug "^2.2.0" + es5-ext "^0.10.50" + typedarray-to-buffer "^3.1.5" + utf-8-validate "^5.0.2" + yaeti "^0.0.6" + +whatwg-url@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d" + integrity sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw== + dependencies: + tr46 "~0.0.3" + webidl-conversions "^3.0.0" + +which-boxed-primitive@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz#13757bc89b209b049fe5d86430e21cf40a89a8e6" + integrity sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg== + dependencies: + is-bigint "^1.0.1" + is-boolean-object "^1.1.0" + is-number-object "^1.0.4" + is-string "^1.0.5" + is-symbol "^1.0.3" + +which-module@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f" + integrity sha512-F6+WgncZi/mJDrammbTuHe1q0R5hOXv/mBaiNA2TCNT/LTHusX0V+CJnj9XT8ki5ln2UZyyddDgHfCzyrOH7MQ== + +which-module@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.1.tgz#776b1fe35d90aebe99e8ac15eb24093389a4a409" + integrity sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ== + +which-typed-array@^1.1.2, which-typed-array@^1.1.9: + version "1.1.9" + resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.9.tgz#307cf898025848cf995e795e8423c7f337efbde6" + integrity sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA== + dependencies: + available-typed-arrays "^1.0.5" + call-bind "^1.0.2" + for-each "^0.3.3" + gopd "^1.0.1" + has-tostringtag "^1.0.0" + is-typed-array "^1.1.10" + +which@1.3.1, which@^1.1.1, which@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" + integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== + dependencies: + isexe "^2.0.0" + +wide-align@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" + integrity sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA== + dependencies: + string-width "^1.0.2 || 2" + +window-size@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.2.0.tgz#b4315bb4214a3d7058ebeee892e13fa24d98b075" + integrity sha512-UD7d8HFA2+PZsbKyaOCEy8gMh1oDtHgJh1LfgjQ4zVXmYjAT/kvz3PueITKuqDiIXQe7yzpPnxX3lNc+AhQMyw== + +word-wrap@~1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" + integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== + +wordwrap@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" + integrity sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q== + +wordwrapjs@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/wordwrapjs/-/wordwrapjs-4.0.1.tgz#d9790bccfb110a0fc7836b5ebce0937b37a8b98f" + integrity sha512-kKlNACbvHrkpIw6oPeYDSmdCTu2hdMHoyXLTcUKala++lx5Y+wjJ/e474Jqv5abnVmwxw08DiTuHmw69lJGksA== + dependencies: + reduce-flatten "^2.0.0" + typical "^5.2.0" + +workerpool@6.2.1: + version "6.2.1" + resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.2.1.tgz#46fc150c17d826b86a008e5a4508656777e9c343" + integrity sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw== + +wrap-ansi@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" + integrity sha512-vAaEaDM946gbNpH5pLVNR+vX2ht6n0Bt3GXwVB1AuAqZosOvHNF3P7wDnh8KLkSqgUh0uh77le7Owgoz+Z9XBw== + dependencies: + string-width "^1.0.1" + strip-ansi "^3.0.1" + +wrap-ansi@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-5.1.0.tgz#1fd1f67235d5b6d0fee781056001bfb694c03b09" + integrity sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q== + dependencies: + ansi-styles "^3.2.0" + string-width "^3.0.0" + strip-ansi "^5.0.0" + +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== + +ws@7.4.6: + version "7.4.6" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.6.tgz#5654ca8ecdeee47c33a9a4bf6d28e2be2980377c" + integrity sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A== + +ws@^3.0.0: + version "3.3.3" + resolved "https://registry.yarnpkg.com/ws/-/ws-3.3.3.tgz#f1cf84fe2d5e901ebce94efaece785f187a228f2" + integrity sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA== + dependencies: + async-limiter "~1.0.0" + safe-buffer "~5.1.0" + ultron "~1.1.0" + +ws@^7.4.6: + version "7.5.9" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.9.tgz#54fa7db29f4c7cec68b1ddd3a89de099942bb591" + integrity sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q== + +xhr-request-promise@^0.1.2: + version "0.1.3" + resolved "https://registry.yarnpkg.com/xhr-request-promise/-/xhr-request-promise-0.1.3.tgz#2d5f4b16d8c6c893be97f1a62b0ed4cf3ca5f96c" + integrity sha512-YUBytBsuwgitWtdRzXDDkWAXzhdGB8bYm0sSzMPZT7Z2MBjMSTHFsyCT1yCRATY+XC69DUrQraRAEgcoCRaIPg== + dependencies: + xhr-request "^1.1.0" + +xhr-request@^1.0.1, xhr-request@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/xhr-request/-/xhr-request-1.1.0.tgz#f4a7c1868b9f198723444d82dcae317643f2e2ed" + integrity sha512-Y7qzEaR3FDtL3fP30k9wO/e+FBnBByZeybKOhASsGP30NIkRAAkKD/sCnLvgEfAIEC1rcmK7YG8f4oEnIrrWzA== + dependencies: + buffer-to-arraybuffer "^0.0.5" + object-assign "^4.1.1" + query-string "^5.0.1" + simple-get "^2.7.0" + timed-out "^4.0.1" + url-set-query "^1.0.0" + xhr "^2.0.4" + +xhr@^2.0.4, xhr@^2.3.3: + version "2.6.0" + resolved "https://registry.yarnpkg.com/xhr/-/xhr-2.6.0.tgz#b69d4395e792b4173d6b7df077f0fc5e4e2b249d" + integrity sha512-/eCGLb5rxjx5e3mF1A7s+pLlR6CGyqWN91fv1JgER5mVWg1MZmlhBvy9kjcsOdRk8RrIujotWyJamfyrp+WIcA== + dependencies: + global "~4.4.0" + is-function "^1.0.1" + parse-headers "^2.0.0" + xtend "^4.0.0" + +xmlhttprequest@1.8.0: + version "1.8.0" + resolved "https://registry.yarnpkg.com/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz#67fe075c5c24fef39f9d65f5f7b7fe75171968fc" + integrity sha512-58Im/U0mlVBLM38NdZjHyhuMtCqa61469k2YP/AaPbvCoV9aQGUpbJBj1QRm2ytRiVQBD/fsw7L2bJGDVQswBA== + +xtend@^4.0.0: + version "4.0.2" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" + integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== + +y18n@^3.2.1: + version "3.2.2" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.2.tgz#85c901bd6470ce71fc4bb723ad209b70f7f28696" + integrity sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ== + +y18n@^4.0.0: + version "4.0.3" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.3.tgz#b5f259c82cd6e336921efd7bfd8bf560de9eeedf" + integrity sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ== + +y18n@^5.0.5: + version "5.0.8" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" + integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== + +yaeti@^0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/yaeti/-/yaeti-0.0.6.tgz#f26f484d72684cf42bedfb76970aa1608fbf9577" + integrity sha512-MvQa//+KcZCUkBTIC9blM+CU9J2GzuTytsOUwf2lidtvkx/6gnEp1QvJv34t9vdjhFmha/mUiNDbN0D0mJWdug== + +yallist@^3.0.0, yallist@^3.0.2, yallist@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" + integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== + +yallist@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" + integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== + +yargs-parser@13.1.2, yargs-parser@^13.1.2: + version "13.1.2" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.2.tgz#130f09702ebaeef2650d54ce6e3e5706f7a4fb38" + integrity sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg== + dependencies: + camelcase "^5.0.0" + decamelize "^1.2.0" + +yargs-parser@20.2.4: + version "20.2.4" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54" + integrity sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA== + +yargs-parser@^2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-2.4.1.tgz#85568de3cf150ff49fa51825f03a8c880ddcc5c4" + integrity sha512-9pIKIJhnI5tonzG6OnCFlz/yln8xHYcGl+pn3xR0Vzff0vzN1PbNRaelgfgRUwZ3s4i3jvxT9WhmUGL4whnasA== + dependencies: + camelcase "^3.0.0" + lodash.assign "^4.0.6" + +yargs-parser@^20.2.2: + version "20.2.9" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" + integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== + +yargs-unparser@1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-1.6.0.tgz#ef25c2c769ff6bd09e4b0f9d7c605fb27846ea9f" + integrity sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw== + dependencies: + flat "^4.1.0" + lodash "^4.17.15" + yargs "^13.3.0" + +yargs-unparser@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-2.0.0.tgz#f131f9226911ae5d9ad38c432fe809366c2325eb" + integrity sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA== + dependencies: + camelcase "^6.0.0" + decamelize "^4.0.0" + flat "^5.0.2" + is-plain-obj "^2.1.0" + +yargs@13.3.2, yargs@^13.3.0: + version "13.3.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.2.tgz#ad7ffefec1aa59565ac915f82dccb38a9c31a2dd" + integrity sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw== + dependencies: + cliui "^5.0.0" + find-up "^3.0.0" + get-caller-file "^2.0.1" + require-directory "^2.1.1" + require-main-filename "^2.0.0" + set-blocking "^2.0.0" + string-width "^3.0.0" + which-module "^2.0.0" + y18n "^4.0.0" + yargs-parser "^13.1.2" + +yargs@16.2.0: + version "16.2.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" + integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== + dependencies: + cliui "^7.0.2" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.0" + y18n "^5.0.5" + yargs-parser "^20.2.2" + +yargs@^4.7.1: + version "4.8.1" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-4.8.1.tgz#c0c42924ca4aaa6b0e6da1739dfb216439f9ddc0" + integrity sha512-LqodLrnIDM3IFT+Hf/5sxBnEGECrfdC1uIbgZeJmESCSo4HoCAaKEus8MylXHAkdacGc0ye+Qa+dpkuom8uVYA== + dependencies: + cliui "^3.2.0" + decamelize "^1.1.1" + get-caller-file "^1.0.1" + lodash.assign "^4.0.3" + os-locale "^1.4.0" + read-pkg-up "^1.0.1" + require-directory "^2.1.1" + require-main-filename "^1.0.1" + set-blocking "^2.0.0" + string-width "^1.0.1" + which-module "^1.0.0" + window-size "^0.2.0" + y18n "^3.2.1" + yargs-parser "^2.4.1" + +yn@3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" + integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q== + +yocto-queue@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" + integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== + +zksync-web3@^0.14.3: + version "0.14.3" + resolved "https://registry.yarnpkg.com/zksync-web3/-/zksync-web3-0.14.3.tgz#64ac2a16d597464c3fc4ae07447a8007631c57c9" + integrity sha512-hT72th4AnqyLW1d5Jlv8N2B/qhEnl2NePK2A3org7tAa24niem/UAaHMkEvmWI3SF9waYUPtqAtjpf+yvQ9zvQ== From 99e2e9023d0419069e9e3ad4aa020133c82688ce Mon Sep 17 00:00:00 2001 From: alexstratos Date: Fri, 2 Jun 2023 11:26:42 -0400 Subject: [PATCH 84/95] update for conflicts --- x/register/keeper/store.go | 20 ++++++++++++++++++++ x/sds/keeper/keeper.go | 20 ++++---------------- 2 files changed, 24 insertions(+), 16 deletions(-) diff --git a/x/register/keeper/store.go b/x/register/keeper/store.go index bcd353bc..9e14e344 100644 --- a/x/register/keeper/store.go +++ b/x/register/keeper/store.go @@ -1,6 +1,7 @@ package keeper import ( + "fmt" "time" sdk "github.com/cosmos/cosmos-sdk/types" @@ -45,6 +46,25 @@ func (k Keeper) GetRemainingOzoneLimit(ctx sdk.Context) (value sdk.Int) { return } +func (k *Keeper) CalculatePurchaseAmount(ctx sdk.Context, amount sdk.Int) (sdk.Int, sdk.Int, error) { + St := k.GetEffectiveTotalDeposit(ctx) + Pt := k.GetTotalUnissuedPrepay(ctx).Amount + Lt := k.GetRemainingOzoneLimit(ctx) + + purchase := Lt.ToDec(). + Mul(amount.ToDec()). + Quo((St. + Add(Pt). + Add(amount)).ToDec()). + TruncateInt() + if purchase.GT(Lt) { + return sdk.NewInt(0), sdk.NewInt(0), fmt.Errorf("not enough remaining ozone limit to complete prepay") + } + remaining := Lt.Sub(purchase) + + return purchase, remaining, nil +} + func (k Keeper) IsUnbondable(ctx sdk.Context, unbondAmt sdk.Int) bool { remaining := k.GetRemainingOzoneLimit(ctx) depositNozRate := k.GetDepositNozRate(ctx) diff --git a/x/sds/keeper/keeper.go b/x/sds/keeper/keeper.go index 53ae09f0..43d34e24 100644 --- a/x/sds/keeper/keeper.go +++ b/x/sds/keeper/keeper.go @@ -1,7 +1,6 @@ package keeper import ( - "errors" "fmt" "github.com/kelindar/bitmap" @@ -88,29 +87,18 @@ func (k Keeper) FileUpload(ctx sdk.Context, fileHash string, reporter stratos.Sd // [X] is the total amount of STOS token prepaid by user at time t // the total amount of Ozone the user gets = Lt * X / (S + Pt + X) func (k Keeper) purchaseNozAndSubCoins(ctx sdk.Context, from sdk.AccAddress, amount sdk.Int) (sdk.Int, error) { - St := k.registerKeeper.GetEffectiveTotalDeposit(ctx) - Pt := k.registerKeeper.GetTotalUnissuedPrepay(ctx).Amount - Lt := k.registerKeeper.GetRemainingOzoneLimit(ctx) - - purchased := Lt.ToDec(). - Mul(amount.ToDec()). - Quo((St. - Add(Pt). - Add(amount)).ToDec()). - TruncateInt() - - if purchased.GT(Lt) { - return sdk.ZeroInt(), errors.New("not enough remaining ozone limit to complete prepay") + purchased, newRemainingOzoneLimit, err := k.registerKeeper.CalculatePurchaseAmount(ctx, amount) + if err != nil { + return sdk.ZeroInt(), err } // send coins to total unissued prepay pool prepayAmt := sdk.NewCoin(k.BondDenom(ctx), amount) - err := k.bankKeeper.SendCoinsFromAccountToModule(ctx, from, registertypes.TotalUnissuedPrepay, sdk.NewCoins(prepayAmt)) + err = k.bankKeeper.SendCoinsFromAccountToModule(ctx, from, registertypes.TotalUnissuedPrepay, sdk.NewCoins(prepayAmt)) if err != nil { return sdk.ZeroInt(), err } // update remaining noz limit - newRemainingOzoneLimit := Lt.Sub(purchased) k.registerKeeper.SetRemainingOzoneLimit(ctx, newRemainingOzoneLimit) return purchased, nil From b0405beb3cab1906f329cd27ad085c504527e451 Mon Sep 17 00:00:00 2001 From: alexstratos Date: Fri, 2 Jun 2023 11:29:18 -0400 Subject: [PATCH 85/95] update for conflicts --- x/register/keeper/store.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/register/keeper/store.go b/x/register/keeper/store.go index 9e14e344..8a257c9d 100644 --- a/x/register/keeper/store.go +++ b/x/register/keeper/store.go @@ -47,7 +47,7 @@ func (k Keeper) GetRemainingOzoneLimit(ctx sdk.Context) (value sdk.Int) { } func (k *Keeper) CalculatePurchaseAmount(ctx sdk.Context, amount sdk.Int) (sdk.Int, sdk.Int, error) { - St := k.GetEffectiveTotalDeposit(ctx) + St := k.GetEffectiveTotalStake(ctx) Pt := k.GetTotalUnissuedPrepay(ctx).Amount Lt := k.GetRemainingOzoneLimit(ctx) From c25555b361dcb829d6b20e22e2a898582bb15752 Mon Sep 17 00:00:00 2001 From: alexstratos <58865166+alexstratos@users.noreply.github.com> Date: Fri, 2 Jun 2023 11:30:06 -0400 Subject: [PATCH 86/95] Qb 1816 - implement proxy, add prepay (#265) (#279) * First test * Update with working test deploy * Add cli * Add genesis deployments * Update proxy owner * Add VM intrpreter * Add PREPAY opcode and test impl * Updat before state change checks * First state machine dsign * Add prpay with new keeper statedb * Rm revert from func * Refactor + some add hoc test + keeper mrge * Update test * Fix keeper issue * Rm comment, change gas for prepay fn --- .gitignore | 1 + app/ante/eth.go | 3 +- app/ante/interfaces.go | 2 +- app/app.go | 18 +- core/statedb/journal.go | 133 + core/statedb/state_object.go | 94 + core/statedb/statedb.go | 165 + core/statedb/types.go | 59 + go.mod | 5 +- go.sum | 7 +- package.json | 19 + packages/gov/.eslintignore | 4 + packages/gov/.eslintrc.js | 24 + packages/gov/.gitignore | 11 + packages/gov/.npmignore | 3 + packages/gov/.prettierignore | 5 + packages/gov/.solhint.json | 15 + packages/gov/README.md | 14 + packages/gov/contracts/Prepay.sol | 48 + .../gov/contracts/mock/PrepayMockOverride.sol | 46 + packages/gov/contracts/versions/Version0.sol | 11 + packages/gov/contracts/versions/Version1.sol | 11 + packages/gov/hardhat.config.ts | 41 + packages/gov/package.json | 42 + packages/gov/test/Prepay.test.ts | 38 + packages/gov/tsconfig.json | 11 + packages/tsconfig.package.json | 38 + proto/stratos/evm/v1/evm.proto | 26 + proto/stratos/evm/v1/proposal.proto | 21 + rpc/namespaces/ethereum/debug/api.go | 15 +- rpc/namespaces/ethereum/eth/api.go | 2 +- types/config.go | 3 +- x/evm/client/cli/tx.go | 99 + x/evm/client/proposal_handler.go | 25 + x/evm/keeper/abci.go | 11 + x/evm/keeper/grpc_query.go | 20 +- x/evm/keeper/keeper.go | 61 +- x/evm/keeper/proposal.go | 305 + x/evm/keeper/state_transition.go | 77 +- x/evm/keeper/store.go | 42 + x/evm/proposal_handler.go | 28 + x/evm/simulation/genesis.go | 4 +- x/evm/statedb/statedb.go | 36 +- x/evm/tracers/js/goja.go | 8 +- x/evm/tracers/logger/access_list_tracer.go | 184 + x/evm/tracers/logger/gen_structlog.go | 110 + x/evm/tracers/logger/logger.go | 464 + x/evm/tracers/logger/logger_json.go | 104 + x/evm/tracers/native/4byte.go | 21 +- x/evm/tracers/native/call.go | 4 +- x/evm/tracers/native/noop.go | 4 +- x/evm/tracers/native/prestate.go | 4 +- x/evm/tracers/native/revertreason.go | 4 +- x/evm/tracers/native/tracer.go | 10 +- x/evm/{types/tracer.go => tracers/tracers.go} | 82 +- x/evm/types/codec.go | 12 + x/evm/types/contracts.go | 23 + x/evm/types/evm.pb.go | 1011 ++- x/evm/types/interfaces.go | 14 +- x/evm/types/params.go | 107 +- x/evm/types/proposal.go | 79 + x/evm/types/proposal.pb.go | 487 ++ x/evm/vm/analysis.go | 118 + x/evm/vm/common.go | 82 + x/evm/vm/contract.go | 194 + x/evm/vm/contracts.go | 1043 +++ x/evm/vm/doc.go | 24 + x/evm/vm/eips.go | 194 + x/evm/vm/errors.go | 72 + x/evm/vm/evm.go | 630 ++ x/evm/vm/gas.go | 59 + x/evm/vm/gas_table.go | 458 + x/evm/vm/instructions.go | 1017 +++ x/evm/vm/interface.go | 106 + x/evm/vm/interpreter.go | 258 + x/evm/vm/jump_table.go | 1062 +++ x/evm/vm/keeper_amplifier.go | 28 + x/evm/vm/logger.go | 44 + x/evm/vm/memory.go | 105 + x/evm/vm/memory_table.go | 128 + x/evm/vm/opcodes.go | 562 ++ x/evm/vm/operations_acl.go | 244 + x/evm/vm/stack.go | 82 + x/evm/vm/stack_table.go | 42 + x/evm/vm/verifier.go | 39 + x/register/keeper/store_new.go | 35 + x/sds/keeper/keeper.go | 3 + yarn.lock | 7594 +++++++++++++++++ 88 files changed, 18391 insertions(+), 207 deletions(-) create mode 100644 core/statedb/journal.go create mode 100644 core/statedb/state_object.go create mode 100644 core/statedb/statedb.go create mode 100644 core/statedb/types.go create mode 100644 package.json create mode 100644 packages/gov/.eslintignore create mode 100644 packages/gov/.eslintrc.js create mode 100644 packages/gov/.gitignore create mode 100644 packages/gov/.npmignore create mode 100644 packages/gov/.prettierignore create mode 100644 packages/gov/.solhint.json create mode 100644 packages/gov/README.md create mode 100644 packages/gov/contracts/Prepay.sol create mode 100644 packages/gov/contracts/mock/PrepayMockOverride.sol create mode 100644 packages/gov/contracts/versions/Version0.sol create mode 100644 packages/gov/contracts/versions/Version1.sol create mode 100644 packages/gov/hardhat.config.ts create mode 100644 packages/gov/package.json create mode 100644 packages/gov/test/Prepay.test.ts create mode 100644 packages/gov/tsconfig.json create mode 100644 packages/tsconfig.package.json create mode 100644 proto/stratos/evm/v1/proposal.proto create mode 100644 x/evm/client/proposal_handler.go create mode 100644 x/evm/keeper/proposal.go create mode 100644 x/evm/keeper/store.go create mode 100644 x/evm/proposal_handler.go create mode 100644 x/evm/tracers/logger/access_list_tracer.go create mode 100644 x/evm/tracers/logger/gen_structlog.go create mode 100644 x/evm/tracers/logger/logger.go create mode 100644 x/evm/tracers/logger/logger_json.go rename x/evm/{types/tracer.go => tracers/tracers.go} (64%) create mode 100644 x/evm/types/contracts.go create mode 100644 x/evm/types/proposal.go create mode 100644 x/evm/types/proposal.pb.go create mode 100644 x/evm/vm/analysis.go create mode 100644 x/evm/vm/common.go create mode 100644 x/evm/vm/contract.go create mode 100644 x/evm/vm/contracts.go create mode 100644 x/evm/vm/doc.go create mode 100644 x/evm/vm/eips.go create mode 100644 x/evm/vm/errors.go create mode 100644 x/evm/vm/evm.go create mode 100644 x/evm/vm/gas.go create mode 100644 x/evm/vm/gas_table.go create mode 100644 x/evm/vm/instructions.go create mode 100644 x/evm/vm/interface.go create mode 100644 x/evm/vm/interpreter.go create mode 100644 x/evm/vm/jump_table.go create mode 100644 x/evm/vm/keeper_amplifier.go create mode 100644 x/evm/vm/logger.go create mode 100644 x/evm/vm/memory.go create mode 100644 x/evm/vm/memory_table.go create mode 100644 x/evm/vm/opcodes.go create mode 100644 x/evm/vm/operations_acl.go create mode 100644 x/evm/vm/stack.go create mode 100644 x/evm/vm/stack_table.go create mode 100644 x/evm/vm/verifier.go create mode 100644 x/register/keeper/store_new.go create mode 100644 yarn.lock diff --git a/.gitignore b/.gitignore index 62dfce57..2693ff77 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ playground.go /tmp-swagger-gen/ /github.com/ .DS_Store +node_modules/ diff --git a/app/ante/eth.go b/app/ante/eth.go index 71add19b..45ac713b 100644 --- a/app/ante/eth.go +++ b/app/ante/eth.go @@ -14,6 +14,7 @@ import ( stratos "github.com/stratosnet/stratos-chain/types" evmkeeper "github.com/stratosnet/stratos-chain/x/evm/keeper" "github.com/stratosnet/stratos-chain/x/evm/statedb" + "github.com/stratosnet/stratos-chain/x/evm/tracers" evmtypes "github.com/stratosnet/stratos-chain/x/evm/types" ) @@ -312,7 +313,7 @@ func (ctd CanTransferDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate BaseFee: baseFee, } stateDB := statedb.New(ctx, ctd.evmKeeper, statedb.NewEmptyTxConfig(common.BytesToHash(ctx.HeaderHash().Bytes()))) - evm := ctd.evmKeeper.NewEVM(ctx, coreMsg, cfg, evmtypes.NewNoOpTracer(), stateDB) + evm := ctd.evmKeeper.NewEVM(ctx, coreMsg, cfg, tracers.NewNoOpTracer(), stateDB) // check that caller has enough balance to cover asset transfer for **topmost** call // NOTE: here the gas consumed is from the context with the infinite gas meter diff --git a/app/ante/interfaces.go b/app/ante/interfaces.go index 89369928..b11dda54 100644 --- a/app/ante/interfaces.go +++ b/app/ante/interfaces.go @@ -9,11 +9,11 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core" - "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/params" "github.com/stratosnet/stratos-chain/x/evm/statedb" evmtypes "github.com/stratosnet/stratos-chain/x/evm/types" + "github.com/stratosnet/stratos-chain/x/evm/vm" ) // AccountKeeper defines the contract needed for AccountKeeper related APIs. diff --git a/app/app.go b/app/app.go index 40191b70..e7b0ea74 100644 --- a/app/app.go +++ b/app/app.go @@ -96,6 +96,7 @@ import ( srvflags "github.com/stratosnet/stratos-chain/server/flags" stratos "github.com/stratosnet/stratos-chain/types" "github.com/stratosnet/stratos-chain/x/evm" + evmclient "github.com/stratosnet/stratos-chain/x/evm/client" evmrest "github.com/stratosnet/stratos-chain/x/evm/client/rest" evmkeeper "github.com/stratosnet/stratos-chain/x/evm/keeper" evmtypes "github.com/stratosnet/stratos-chain/x/evm/types" @@ -136,6 +137,7 @@ var ( upgradeclient.CancelProposalHandler, ibcclientclient.UpdateClientProposalHandler, ibcclientclient.UpgradeProposalHandler, + evmclient.EVMChangeProxyImplementationHandler, ), params.AppModuleBasic{}, crisis.AppModuleBasic{}, @@ -187,8 +189,9 @@ var ( // module accounts that are allowed to receive tokens allowedReceivingModAcc = map[string]bool{ - distrtypes.ModuleName: true, - authtypes.FeeCollectorName: true, + distrtypes.ModuleName: true, + authtypes.FeeCollectorName: true, + registertypes.TotalUnissuedPrepay: true, //pot.FoundationAccount: true, } ) @@ -357,8 +360,7 @@ func NewInitApp( tracer := cast.ToString(appOpts.Get(srvflags.EVMTracer)) app.evmKeeper = evmkeeper.NewKeeper( appCodec, keys[evmtypes.StoreKey], tKeys[evmtypes.TransientKey], app.GetSubspace(evmtypes.ModuleName), - app.accountKeeper, app.bankKeeper, app.stakingKeeper, - tracer, + app.accountKeeper, app.bankKeeper, app.stakingKeeper, nil, tracer, ) // Create IBC Keeper @@ -371,7 +373,8 @@ func NewInitApp( AddRoute(paramproposal.RouterKey, params.NewParamChangeProposalHandler(app.paramsKeeper)). AddRoute(distrtypes.RouterKey, distr.NewCommunityPoolSpendProposalHandler(app.distrKeeper)). AddRoute(upgradetypes.RouterKey, upgrade.NewSoftwareUpgradeProposalHandler(app.upgradeKeeper)). - AddRoute(ibchost.RouterKey, ibcclient.NewClientProposalHandler(app.ibcKeeper.ClientKeeper)) + AddRoute(ibchost.RouterKey, ibcclient.NewClientProposalHandler(app.ibcKeeper.ClientKeeper)). + AddRoute(evmtypes.RouterKey, evm.NewEVMChangeProposalHandler(app.evmKeeper)) govKeeper := govkeeper.NewKeeper( appCodec, keys[govtypes.StoreKey], app.GetSubspace(govtypes.ModuleName), app.accountKeeper, app.bankKeeper, @@ -437,6 +440,11 @@ func NewInitApp( app.potKeeper, ) + // required because of weird order( + // possible solution is to make all keepers as pointers, hovewer this could break something + app.evmKeeper.SetRegisterKeeper(&app.registerKeeper) + app.evmKeeper.SetSdsKeeper(&app.sdsKeeper) + /**** Module Options ****/ // NOTE: we may consider parsing `appOpts` inside module constructors. For the moment diff --git a/core/statedb/journal.go b/core/statedb/journal.go new file mode 100644 index 00000000..d55b748e --- /dev/null +++ b/core/statedb/journal.go @@ -0,0 +1,133 @@ +package statedb + +import ( + "bytes" + "sort" + + sdk "github.com/cosmos/cosmos-sdk/types" +) + +type dirtyObj struct { + storeKey sdk.StoreKey + key StorageKey +} + +func (do *dirtyObj) ObjKey() []byte { + return append([]byte(do.storeKey.Name()), do.key[:]...) +} + +// journalEntry is a modification entry in the state change journal that can be +// reverted on demand. +type journalEntry interface { + // revert undoes the changes introduced by this journal entry. + revert(*KeestateDB) + + // dirtied returns the key modified by this journal entry. + dirtied() *dirtyObj +} + +// journal contains the list of state modifications applied since the last state +// commit. These are tracked to be able to be reverted in the case of an execution +// exception or request for reversal. +type journal struct { + entries []journalEntry // Current changes tracked by the journal + dirties map[sdk.StoreKey]map[StorageKey]int // Dirty accounts and the number of changes +} + +// newJournal creates a new initialized journal. +func newJournal() *journal { + return &journal{ + dirties: make(map[sdk.StoreKey]map[StorageKey]int), + } +} + +// sortedDirties sort the dirty addresses for deterministic iteration +func (j *journal) sortedDirties() []*dirtyObj { + keys := make([]*dirtyObj, 0) + t := 0 + for i := range j.dirties { + for k := range j.dirties[i] { + keys = append(keys, &dirtyObj{ + storeKey: i, + key: k, + }) + t++ + } + } + sort.Slice(keys, func(i, j int) bool { + return bytes.Compare(keys[i].ObjKey(), keys[j].ObjKey()) < 0 + }) + return keys +} + +// append inserts a new modification entry to the end of the change journal. +func (j *journal) append(entry journalEntry) { + j.entries = append(j.entries, entry) + if dirty := entry.dirtied(); dirty != nil { + if _, ok := j.dirties[dirty.storeKey]; !ok { + j.dirties[dirty.storeKey] = make(map[StorageKey]int) + } + j.dirties[dirty.storeKey][dirty.key]++ + } +} + +// revert undoes a batch of journalled modifications along with any reverted +// dirty handling too. +func (j *journal) revert(statedb *KeestateDB, snapshot int) { + for i := len(j.entries) - 1; i >= snapshot; i-- { + // Undo the changes made by the operation + j.entries[i].revert(statedb) + + // Drop any dirty tracking induced by the change + if dirty := j.entries[i].dirtied(); dirty != nil { + if j.dirties[dirty.storeKey][dirty.key]--; j.dirties[dirty.storeKey][dirty.key] == 0 { + delete(j.dirties[dirty.storeKey], dirty.key) + } + } + } + j.entries = j.entries[:snapshot] +} + +// length returns the current number of entries in the journal. +func (j *journal) length() int { + return len(j.entries) +} + +type ( + storageChange struct { + storeKey sdk.StoreKey + key StorageKey + prevalue StorageValue + } + createObjectChange struct { + storeKey sdk.StoreKey + key StorageKey + } + resetObjectChange struct { + prev *stateObject + } +) + +func (ch storageChange) revert(s *KeestateDB) { + s.getStateObject(ch.storeKey, []byte(ch.key)).SetState(ch.prevalue.Result()) +} + +func (ch storageChange) dirtied() *dirtyObj { + return &dirtyObj{storeKey: ch.storeKey, key: ch.key} +} + +func (ch createObjectChange) revert(s *KeestateDB) { + delete(s.stateObjects[ch.storeKey], ch.key) +} + +func (ch createObjectChange) dirtied() *dirtyObj { + return &dirtyObj{storeKey: ch.storeKey, key: ch.key} +} + +func (ch resetObjectChange) revert(s *KeestateDB) { + s.setStateObject(ch.prev) +} + +func (ch resetObjectChange) dirtied() *dirtyObj { + return nil +} diff --git a/core/statedb/state_object.go b/core/statedb/state_object.go new file mode 100644 index 00000000..2075a779 --- /dev/null +++ b/core/statedb/state_object.go @@ -0,0 +1,94 @@ +package statedb + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" +) + +// stateObject is the state of an acount +type stateObject struct { + ctx sdk.Context + db *KeestateDB + + storeKey sdk.StoreKey + key StorageKey + value StorageValue + + // state storage + originStorage Storage + dirtyStorage Storage +} + +// newObject creates a state object. +func newObject(db *KeestateDB, storeKey sdk.StoreKey, key StorageKey) *stateObject { + so := &stateObject{ + ctx: db.ctx, + db: db, + storeKey: storeKey, + key: key, + originStorage: make(Storage), + dirtyStorage: make(Storage), + } + if value := so.read(); value.Result() != nil { + so.value = value + } + return so +} + +func (s stateObject) read() StorageValue { + value := s.ctx.KVStore(s.storeKey).Get([]byte(s.key)) + if value != nil { + return NewStorageValue(value) + } + return StorageValue{} +} + +func (s stateObject) store(value StorageValue) { + store := s.ctx.KVStore(s.storeKey) + if value.IsNil() { + store.Delete([]byte(s.key)) + } else { + store.Set([]byte(s.key), value.Result()) + } +} + +// GetCommittedState query the committed state +func (s *stateObject) GetCommittedState() StorageValue { + if value, cached := s.originStorage[s.key]; cached { + return value + } + // If no live objects are available, load it from indexdb + value := s.read() + if value.IsNil() { + return StorageValue{} + } + s.originStorage[s.key] = value + return value +} + +// GetState query the current state (including dirty state) +func (s *stateObject) GetState() StorageValue { + if value, dirty := s.dirtyStorage[s.key]; dirty { + return value + } + return s.GetCommittedState() +} + +// SetState sets the contract state +func (s *stateObject) SetState(value []byte) { + // If the new value is the same as old, don't set + prev := s.GetState() + if prev.Eq(value) { + return + } + // New value is different, update and journal the change + s.db.journal.append(storageChange{ + storeKey: s.storeKey, + key: s.key, + prevalue: prev, + }) + s.setState(value) +} + +func (s *stateObject) setState(value []byte) { + s.dirtyStorage[s.key] = NewStorageValue(value) +} diff --git a/core/statedb/statedb.go b/core/statedb/statedb.go new file mode 100644 index 00000000..1f4c6fe9 --- /dev/null +++ b/core/statedb/statedb.go @@ -0,0 +1,165 @@ +package statedb + +import ( + "fmt" + "sort" + + sdk "github.com/cosmos/cosmos-sdk/types" +) + +// revision is the identifier of a version of state. +// it consists of an auto-increment id and a journal index. +// it's safer to use than using journal index alone. +type revision struct { + id int + journalIndex int +} + +type KeestateDB struct { + ctx sdk.Context + + // Journal of state modifications. This is the backbone of + // Snapshot and RevertToSnapshot. + journal *journal + validRevisions []revision + nextRevisionID int + + stateObjects map[sdk.StoreKey]map[StorageKey]*stateObject +} + +// New creates a new state from a given trie. +func New(ctx sdk.Context) *KeestateDB { + return &KeestateDB{ + ctx: ctx, + journal: newJournal(), + stateObjects: make(map[sdk.StoreKey]map[StorageKey]*stateObject), + } +} + +func (ks *KeestateDB) getStateObject(storeKey sdk.StoreKey, key []byte) *stateObject { + skey := StorageKey(key) + // Prefer live objects if any is available + if obj := ks.stateObjects[storeKey][skey]; obj != nil { + return obj + } + + // Insert into the live set + obj := newObject(ks, storeKey, skey) + if obj.value.IsNil() { + // if not, means issue with db, return nil obj + return nil + } + ks.setStateObject(obj) + return obj +} + +func (ks *KeestateDB) getOrNewStateObject(storeKey sdk.StoreKey, key []byte) *stateObject { + stateObject := ks.getStateObject(storeKey, key) + if stateObject == nil { + stateObject, _ = ks.createObject(storeKey, key) + } + return stateObject +} + +func (ks *KeestateDB) setStateObject(object *stateObject) { + if _, ok := ks.stateObjects[object.storeKey]; !ok { + ks.stateObjects[object.storeKey] = make(map[StorageKey]*stateObject) + } + ks.stateObjects[object.storeKey][object.key] = object +} + +func (ks *KeestateDB) createObject(storeKey sdk.StoreKey, key []byte) (newobj, prev *stateObject) { + prev = ks.getStateObject(storeKey, key) + + skey := StorageKey(key) + newobj = newObject(ks, storeKey, skey) + if prev == nil { + ks.journal.append(createObjectChange{storeKey, skey}) + } else { + ks.journal.append(resetObjectChange{prev: prev}) + } + ks.setStateObject(newobj) + if prev != nil { + return newobj, prev + } + return newobj, nil +} + +// SetState sets the keeper state. +func (ks *KeestateDB) SetState(storeKey sdk.StoreKey, key, value []byte) { + stateObject := ks.getOrNewStateObject(storeKey, key) + if stateObject != nil { + stateObject.SetState(value) + } +} + +// GetState retrieves a value from the given key's storage trie. +func (ks *KeestateDB) GetState(storeKey sdk.StoreKey, key []byte) []byte { + stateObject := ks.getStateObject(storeKey, key) + if stateObject != nil { + stateValue := stateObject.GetState() + if !stateValue.IsNil() { + return stateValue.Result() + } + } + return nil +} + +// GetCommittedState retrieves a value from the given key's committed storage trie. +func (ks *KeestateDB) GetCommittedState(storeKey sdk.StoreKey, key []byte) []byte { + stateObject := ks.getStateObject(storeKey, key) + if stateObject != nil { + stateValue := stateObject.GetCommittedState() + if !stateValue.IsNil() { + return stateValue.Result() + } + } + return nil +} + +// Commit all changes to a storage trie +func (ks *KeestateDB) Commit() error { + for _, dirtyObj := range ks.journal.sortedDirties() { + obj := ks.stateObjects[dirtyObj.storeKey][dirtyObj.key] + for _, key := range obj.dirtyStorage.SortedKeys() { + value := obj.dirtyStorage[key] + origin := obj.originStorage[key] + // Skip noop changes, persist actual changes + if value.Eq(origin.Result()) { + continue + } + obj.store(value) + } + } + // no need to clean up as it will be always on fresh ctx + return nil +} + +// Snapshot returns an identifier for the current revision of the state. +func (ks *KeestateDB) Snapshot() int { + id := ks.nextRevisionID + ks.nextRevisionID++ + ks.validRevisions = append(ks.validRevisions, revision{id, ks.journal.length()}) + return id +} + +// RevertToSnapshot reverts all state changes made since the given revision. +func (ks *KeestateDB) RevertToSnapshot(revid int) { + // Find the snapshot in the stack of valid snapshots. + idx := sort.Search(len(ks.validRevisions), func(i int) bool { + return ks.validRevisions[i].id >= revid + }) + if idx == len(ks.validRevisions) || ks.validRevisions[idx].id != revid { + panic(fmt.Errorf("revision id %v cannot be reverted", revid)) + } + snapshot := ks.validRevisions[idx].journalIndex + + // Replay the journal to undo changes and remove invalidated snapshots + ks.journal.revert(ks, snapshot) + ks.validRevisions = ks.validRevisions[:idx] +} + +// GetSdkCtx returns current cosmos sdk context +func (ks *KeestateDB) GetSdkCtx() sdk.Context { + return ks.ctx +} diff --git a/core/statedb/types.go b/core/statedb/types.go new file mode 100644 index 00000000..f1c60ee8 --- /dev/null +++ b/core/statedb/types.go @@ -0,0 +1,59 @@ +package statedb + +import ( + "bytes" + "sort" + "strings" +) + +type StorageKey string + +func (sk StorageKey) Len() int { + return len(sk) +} + +type StorageValue struct { + value []byte +} + +func (sv *StorageValue) Result() []byte { + return sv.value +} + +func (sv *StorageValue) Eq(v []byte) bool { + if sv.IsNil() && v == nil { + return true + } + if sv.IsNil() && v != nil { + return false + } + if !sv.IsNil() && v == nil { + return false + } + return bytes.Equal(sv.value, v) +} + +func (sv *StorageValue) IsNil() bool { + return sv.value == nil +} + +func NewStorageValue(v []byte) StorageValue { + return StorageValue{value: v} +} + +// Storage represents in-memory cache/buffer of contract storage. +type Storage map[StorageKey]StorageValue + +// SortedKeys sort the keys for deterministic iteration +func (s Storage) SortedKeys() []StorageKey { + keys := make([]StorageKey, len(s)) + i := 0 + for k := range s { + keys[i] = k + i++ + } + sort.Slice(keys, func(i, j int) bool { + return strings.Compare(string(keys[i]), string(keys[j])) < 0 + }) + return keys +} diff --git a/go.mod b/go.mod index d3c11406..93c528ac 100644 --- a/go.mod +++ b/go.mod @@ -6,9 +6,9 @@ require ( github.com/Nik-U/pbc v0.0.0-20181205041846-3e516ca0c5d6 github.com/btcsuite/btcd v0.23.4 github.com/btcsuite/btcd/btcutil v1.1.2 - github.com/cosmos/cosmos-sdk v0.45.9 + github.com/cosmos/cosmos-sdk v0.45.10 github.com/cosmos/go-bip39 v1.0.0 - github.com/cosmos/ibc-go/v3 v3.0.0 + github.com/cosmos/ibc-go/v3 v3.4.0 github.com/davecgh/go-spew v1.1.1 github.com/dop251/goja v0.0.0-20220405120441-9037c2b61cbf github.com/ethereum/go-ethereum v1.10.26 @@ -80,7 +80,6 @@ require ( github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.5.1 // indirect github.com/go-ole/go-ole v1.2.1 // indirect - github.com/go-playground/validator/v10 v10.4.1 // indirect github.com/go-sourcemap/sourcemap v2.1.3+incompatible // indirect github.com/go-stack/stack v1.8.0 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect diff --git a/go.sum b/go.sum index 0b47294f..ceeeb008 100644 --- a/go.sum +++ b/go.sum @@ -184,8 +184,8 @@ github.com/cosmos/gorocksdb v1.2.0 h1:d0l3jJG8M4hBouIZq0mDUHZ+zjOx044J3nGRskwTb4 github.com/cosmos/gorocksdb v1.2.0/go.mod h1:aaKvKItm514hKfNJpUJXnnOWeBnk2GL4+Qw9NHizILw= github.com/cosmos/iavl v0.19.4 h1:t82sN+Y0WeqxDLJRSpNd8YFX5URIrT+p8n6oJbJ2Dok= github.com/cosmos/iavl v0.19.4/go.mod h1:X9PKD3J0iFxdmgNLa7b2LYWdsGd90ToV5cAONApkEPw= -github.com/cosmos/ibc-go/v3 v3.0.0 h1:XUNplHVS51Q2gMnTFsFsH9QJ7flsovMamnltKbEgPQ4= -github.com/cosmos/ibc-go/v3 v3.0.0/go.mod h1:Mb+1NXiPOLd+CPFlOC6BKeAUaxXlhuWenMmRiUiSmwY= +github.com/cosmos/ibc-go/v3 v3.4.0 h1:ha3cqEG36pqMWqA1D+kxDWBTZXpeFMd/aZIQF7I0xro= +github.com/cosmos/ibc-go/v3 v3.4.0/go.mod h1:VwB/vWu4ysT5DN2aF78d17LYmx3omSAdq6gpKvM7XRA= github.com/cosmos/keyring v1.1.7-0.20210622111912-ef00f8ac3d76 h1:DdzS1m6o/pCqeZ8VOAit/gyATedRgjvkVI+UCrLpyuU= github.com/cosmos/keyring v1.1.7-0.20210622111912-ef00f8ac3d76/go.mod h1:0mkLWIoZuQ7uBoospo5Q9zIpqq6rYCPJDSUdeCJvPM8= github.com/cosmos/ledger-cosmos-go v0.12.2 h1:/XYaBlE2BJxtvpkHiBm97gFGSGmYGKunKyF3nNqAXZA= @@ -277,8 +277,8 @@ github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= +github.com/gin-gonic/gin v1.6.3 h1:ahKqKTFpO5KTPHxWZjEdPScmYaGtLo8Y4DMHoEsnp14= github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= -github.com/gin-gonic/gin v1.7.0 h1:jGB9xAJQ12AIGNB4HguylppmDK1Am9ppF7XnGXXJuoU= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -305,7 +305,6 @@ github.com/go-playground/universal-translator v0.17.0 h1:icxd5fm+REJzpZx7ZfpaD87 github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= github.com/go-playground/validator/v10 v10.4.1 h1:pH2c5ADXtd66mxoE0Zm9SUhxE20r7aM3F26W0hOn+GE= -github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4= github.com/go-sourcemap/sourcemap v2.1.2+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= github.com/go-sourcemap/sourcemap v2.1.3+incompatible h1:W1iEw64niKVGogNgBN3ePyLFfuisuzeidWPMPWmECqU= github.com/go-sourcemap/sourcemap v2.1.3+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= diff --git a/package.json b/package.json new file mode 100644 index 00000000..abe60ead --- /dev/null +++ b/package.json @@ -0,0 +1,19 @@ +{ + "name": "@stratosnet/stratos-chain", + "private": true, + "workspaces": [ + "packages/gov" + ], + "scripts": { + "gov": "yarn workspace @stratosnet/stratos-chain-gov hh", + "compile": "yarn gov compile", + "test": "yarn gov test" + }, + "packageManager": "yarn@3.2.0", + "version": "1.0.0", + "description": "Stratoschain base launcher for workspace packages", + "main": "index.js", + "repository": "https://github.com/stratosnet/stratos-chain.git", + "author": "BoThe1K ", + "license": "MIT OR Apache-2.0" +} \ No newline at end of file diff --git a/packages/gov/.eslintignore b/packages/gov/.eslintignore new file mode 100644 index 00000000..85f5562a --- /dev/null +++ b/packages/gov/.eslintignore @@ -0,0 +1,4 @@ +node_modules +artifacts +cache +coverage diff --git a/packages/gov/.eslintrc.js b/packages/gov/.eslintrc.js new file mode 100644 index 00000000..98ce1937 --- /dev/null +++ b/packages/gov/.eslintrc.js @@ -0,0 +1,24 @@ +module.exports = { + env: { + browser: false, + es2021: true, + mocha: true, + node: true, + }, + plugins: ["@typescript-eslint"], + extends: [ + "standard", + "plugin:prettier/recommended", + "plugin:node/recommended", + ], + parser: "@typescript-eslint/parser", + parserOptions: { + ecmaVersion: 12, + }, + rules: { + "node/no-unsupported-features/es-syntax": [ + "error", + { ignores: ["modules"] }, + ], + }, +}; diff --git a/packages/gov/.gitignore b/packages/gov/.gitignore new file mode 100644 index 00000000..00dad773 --- /dev/null +++ b/packages/gov/.gitignore @@ -0,0 +1,11 @@ +node_modules +.env +coverage +coverage.json +typechain +typechain-types + +# Hardhat files +cache +artifacts + diff --git a/packages/gov/.npmignore b/packages/gov/.npmignore new file mode 100644 index 00000000..dc037817 --- /dev/null +++ b/packages/gov/.npmignore @@ -0,0 +1,3 @@ +hardhat.config.ts +scripts +test diff --git a/packages/gov/.prettierignore b/packages/gov/.prettierignore new file mode 100644 index 00000000..f268596e --- /dev/null +++ b/packages/gov/.prettierignore @@ -0,0 +1,5 @@ +node_modules +artifacts +cache +coverage* +gasReporterOutput.json diff --git a/packages/gov/.solhint.json b/packages/gov/.solhint.json new file mode 100644 index 00000000..ec2551c5 --- /dev/null +++ b/packages/gov/.solhint.json @@ -0,0 +1,15 @@ +{ + "extends": "solhint:recommended", + "rules": { + "compiler-version": [ + "error", + "^0.8.18" + ], + "func-visibility": [ + "warn", + { + "ignoreConstructors": true + } + ] + } +} \ No newline at end of file diff --git a/packages/gov/README.md b/packages/gov/README.md new file mode 100644 index 00000000..5b7cba6f --- /dev/null +++ b/packages/gov/README.md @@ -0,0 +1,14 @@ +# Stratos chain gov contracts + +This contracts relatd to gov mechanics via proxy calls like: + - Prepay + +Try running some of the following tasks: + +```shell +npx hardhat help +npx hardhat test +REPORT_GAS=true npx hardhat test +npx hardhat node +npx hardhat run scripts/deploy.ts +``` diff --git a/packages/gov/contracts/Prepay.sol b/packages/gov/contracts/Prepay.sol new file mode 100644 index 00000000..7987ca25 --- /dev/null +++ b/packages/gov/contracts/Prepay.sol @@ -0,0 +1,48 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.8.18; + +import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; + +import "./versions/Version0.sol"; + +contract Prepay is Version0, OwnableUpgradeable { + event PrepayCreated( + address indexed sender, + address indexed beneficiery, + uint256 indexed amount, + uint256 purchased + ); + + // ----- proxy ------ + uint256[49] private __gap; + + // ===== fallbacks ===== + + receive() external payable {} + + // Initialize function for proxy constructor. Must be used atomically + function initialize() public initializer { + // proxy inits + __Context_init_unchained(); + __Ownable_init_unchained(); + } + + function prepay() external payable { + uint256 amount = msg.value; + require(amount != 0, "P: ZERO_AMOUNT"); + + uint256[1] memory input; + input[0] = uint256(uint160(msg.sender)); + + uint256[1] memory output; + + assembly { + if iszero(call(not(0), 0xf1, amount, input, 0x20, output, 0x20)) { + revert(0x0, 0x0) + } + } + + emit PrepayCreated(address(this), msg.sender, amount, output[0]); + } +} diff --git a/packages/gov/contracts/mock/PrepayMockOverride.sol b/packages/gov/contracts/mock/PrepayMockOverride.sol new file mode 100644 index 00000000..361a8289 --- /dev/null +++ b/packages/gov/contracts/mock/PrepayMockOverride.sol @@ -0,0 +1,46 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.8.18; + +import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; + +import "../versions/Version1.sol"; + +contract PrepayMockOverride is Version1, OwnableUpgradeable { + event PrepayCreated( + address indexed sender, + address indexed beneficiery, + uint256 indexed amount, + uint256 purchased + ); + + address public EXECUTOR; + uint8 public IS_TEST; + + // ----- proxy ------ + uint256[47] private __gap; + + // ===== fallbacks ===== + + receive() external payable {} + + function upgrade() public { + require( + _msgSender() == 0x1000000000000000000000000000000000000000, + "PMO: WRONG_SENDER" + ); + IS_TEST = 1; + EXECUTOR = _msgSender(); + } + + // Initialize function for proxy constructor. Must be used atomically + function initialize() public initializer { + // proxy inits + __Context_init_unchained(); + __Ownable_init_unchained(); + } + + function prepay() external { + emit PrepayCreated(address(this), msg.sender, 0, 0); + } +} diff --git a/packages/gov/contracts/versions/Version0.sol b/packages/gov/contracts/versions/Version0.sol new file mode 100644 index 00000000..cfa9f152 --- /dev/null +++ b/packages/gov/contracts/versions/Version0.sol @@ -0,0 +1,11 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.8.0; + +/** + * @title Version0 + * @notice Version getter for contracts + **/ +contract Version0 { + uint8 public constant VERSION = 0; +} diff --git a/packages/gov/contracts/versions/Version1.sol b/packages/gov/contracts/versions/Version1.sol new file mode 100644 index 00000000..28b6a25e --- /dev/null +++ b/packages/gov/contracts/versions/Version1.sol @@ -0,0 +1,11 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.8.0; + +/** + * @title Version1 + * @notice Version getter for contracts + **/ +contract Version1 { + uint8 public constant VERSION = 1; +} diff --git a/packages/gov/hardhat.config.ts b/packages/gov/hardhat.config.ts new file mode 100644 index 00000000..52325a7b --- /dev/null +++ b/packages/gov/hardhat.config.ts @@ -0,0 +1,41 @@ +import { HardhatUserConfig, task } from "hardhat/config"; + +import "@nomicfoundation/hardhat-toolbox"; +import "hardhat-gas-reporter"; +import "hardhat-deploy"; +import "@nomiclabs/hardhat-ethers"; + +task("accounts", "Prints the list of accounts", async (taskArgs, hre) => { + const accounts = await hre.ethers.getSigners(); + + for (const account of accounts) { + console.log(account.address); + } +}); + +const config: HardhatUserConfig = { + solidity: "0.8.18", + contractSizer: { + alphaSort: true, + disambiguatePaths: false, + runOnCompile: true, + strict: true, + }, + networks: { + localnet: { + url: "http://localhost:8545", + accounts: { + mnemonic: "test test test test test test test test test test test junk", + }, + loggingEnabled: true, + }, + }, + namedAccounts: { + tester: 0, + }, + mocha: { + timeout: 100000000 + }, +}; + +export default config; diff --git a/packages/gov/package.json b/packages/gov/package.json new file mode 100644 index 00000000..9649ca8f --- /dev/null +++ b/packages/gov/package.json @@ -0,0 +1,42 @@ +{ + "name": "@stratosnet/stratos-chain-gov", + "description": "Gov contracts", + "version": "1.0.0", + "main": "index.js", + "directories": { + "hh": "hh" + }, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "MIT", + "devDependencies": { + "@ethersproject/abi": "^5.4.7", + "@ethersproject/providers": "^5.4.7", + "@nomicfoundation/hardhat-chai-matchers": "^1.0.0", + "@nomicfoundation/hardhat-network-helpers": "^1.0.0", + "@nomicfoundation/hardhat-toolbox": "^2.0.0", + "@nomiclabs/hardhat-ethers": "npm:hardhat-deploy-ethers", + "@nomiclabs/hardhat-etherscan": "^3.0.0", + "@openzeppelin/contracts": "^4.8.3", + "@openzeppelin/contracts-upgradeable": "^4.8.3", + "@openzeppelin/hardhat-upgrades": "^1.23.1", + "@openzeppelin/test-helpers": "^0.5.16", + "@typechain/ethers-v5": "^10.1.0", + "@typechain/hardhat": "^6.1.2", + "@types/chai": "^4.2.0", + "@types/mocha": ">=9.1.0", + "@types/node": ">=12.0.0", + "chai": "^4.2.0", + "ethers": "5.7.2", + "hardhat": "^2.11.1", + "hardhat-deploy": "^0.11.29", + "hardhat-gas-reporter": "^1.0.8", + "hardhat-shorthand": "^1.0.0", + "solidity-coverage": "^0.8.0", + "ts-node": ">=8.0.0", + "typechain": "^8.1.0", + "typescript": ">=4.5.0" + } +} diff --git a/packages/gov/test/Prepay.test.ts b/packages/gov/test/Prepay.test.ts new file mode 100644 index 00000000..8d81894b --- /dev/null +++ b/packages/gov/test/Prepay.test.ts @@ -0,0 +1,38 @@ +import { ethers } from "hardhat" +import { Prepay } from "../typechain-types"; +import { expect } from "chai"; + +describe("Prepay local test", () => { + + // could be changed + const prepayContractAddress = '0x1000000000000000000000000000000000010101'; + const totalUnissuedPrepayAddress = '0xa2776119cb0503aaa30f11b6d3fb1b6ba539c61d'; + + const prepayValue = ethers.utils.parseUnits('1', 'gwei'); + const purchased = ethers.utils.parseUnits('999', 'wei') + + it("should prepay be executed", async () => { + const signer = await ethers.getNamedSigner("tester"); + + console.group('1. Unissued address check') + const balanceBefore = await ethers.provider.getBalance(totalUnissuedPrepayAddress); + console.log("Checking balance before next step for unissued address:", balanceBefore.toString()); + console.groupEnd(); + + console.group('2. Preparations for prepay') + const contract: Prepay = await ethers.getContractAt("Prepay", prepayContractAddress, signer); + console.log(`Executing prepay with "${prepayValue.toString()}" ETH on proxy contract "${prepayContractAddress}"...`) + const tx = contract.prepay({ value: prepayValue }); + + await expect(tx).to + .emit(contract, "PrepayCreated") + .withArgs(contract.address, signer.address, prepayValue, purchased); + + console.log(`Completed, result: "${(await tx).hash}"`); + + const balanceAfter = await ethers.provider.getBalance(totalUnissuedPrepayAddress); + console.log("Checking balance after next step for unissued address:", balanceAfter.toString()); + expect(balanceAfter).to.be.eq(balanceBefore.add(purchased)); + console.groupEnd(); + }) +}) diff --git a/packages/gov/tsconfig.json b/packages/gov/tsconfig.json new file mode 100644 index 00000000..574e785c --- /dev/null +++ b/packages/gov/tsconfig.json @@ -0,0 +1,11 @@ +{ + "compilerOptions": { + "target": "es2020", + "module": "commonjs", + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "strict": true, + "skipLibCheck": true, + "resolveJsonModule": true + } +} diff --git a/packages/tsconfig.package.json b/packages/tsconfig.package.json new file mode 100644 index 00000000..5f06d36d --- /dev/null +++ b/packages/tsconfig.package.json @@ -0,0 +1,38 @@ +{ + "exclude": [ + "**/dist/**", + "**/node_modules/**", + "**/test/**" + ], + "compilerOptions": { + "composite": true, + "declaration": true, + "declarationMap": true, + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "lib": [ + "es2015", + "es5", + "dom" + ], + "module": "commonjs", + "moduleResolution": "node", + "noEmitOnError": true, + "noFallthroughCasesInSwitch": true, + "noImplicitAny": false, + "noImplicitReturns": false, + "noUnusedLocals": true, + "preserveSymlinks": true, + "preserveWatchOutput": true, + "pretty": false, + "resolveJsonModule": true, + "sourceMap": true, + "target": "es6", + "strict": true + }, + "references": [ + { + "path": "./gov" + }, + ] +} \ No newline at end of file diff --git a/proto/stratos/evm/v1/evm.proto b/proto/stratos/evm/v1/evm.proto index 8d5dfe35..e308cb32 100644 --- a/proto/stratos/evm/v1/evm.proto +++ b/proto/stratos/evm/v1/evm.proto @@ -28,6 +28,10 @@ message Params { (gogoproto.moretags) = "yaml:\"fee_market_params\"", (gogoproto.nullable) = false ]; + ProxyProposalParams proxy_proposal_params = 7 [ + (gogoproto.moretags) = "yaml:\"proxy_proposal_params\"", + (gogoproto.nullable) = false + ]; } // ChainConfig defines the Ethereum ChainConfig parameters using *sdk.Int values @@ -261,4 +265,26 @@ message FeeMarketParams { (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false ]; +} + +message ProxyContractInitState { + // height where it should be applied + uint64 height = 1; + // address of proxy contract + string address = 2; + // solidity compiled code + string bin = 3; + // initializer method data + string init = 4; +} + +// Params defines default proxy addresses for futur gov contracts update +message ProxyProposalParams { + // consensus address as msg.sender, used to define admin authority, could be simply zero address or custom + // basically it is an owner of evrything. resposible to add proxies and update proxies implementations + string consensus_address = 1; + // proxy owner who basically the owner of proxy contract (for Ownable purpose, not admin) + string proxy_owner_address = 2; + // proxy contracts name per address reservations + map contracts = 3; } \ No newline at end of file diff --git a/proto/stratos/evm/v1/proposal.proto b/proto/stratos/evm/v1/proposal.proto new file mode 100644 index 00000000..6ec3ebbc --- /dev/null +++ b/proto/stratos/evm/v1/proposal.proto @@ -0,0 +1,21 @@ +syntax = "proto3"; +package stratos.evm.v1; + +import "gogoproto/gogo.proto"; + +option go_package = "github.com/stratosnet/stratos-chain/x/evm/types"; + +// UpdateImplmentationProposal used to update implemntation for genesis proxies +message UpdateImplmentationProposal { + // proxy address where data will be executed + string proxy_address = 1; + // implmentation address as API for a storage + string implementation_address = 2; + // data for execution + bytes data = 3; + // value for proxy func call + string value = 4 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.customname) = "Amount" + ]; +} \ No newline at end of file diff --git a/rpc/namespaces/ethereum/debug/api.go b/rpc/namespaces/ethereum/debug/api.go index 6ec028d4..89743869 100644 --- a/rpc/namespaces/ethereum/debug/api.go +++ b/rpc/namespaces/ethereum/debug/api.go @@ -16,11 +16,8 @@ import ( "time" "github.com/davecgh/go-spew/spew" - "github.com/ethereum/go-ethereum/eth/tracers" stderrors "github.com/pkg/errors" - "github.com/ethereum/go-ethereum/eth/tracers/logger" - "github.com/tendermint/tendermint/libs/log" tmrpctypes "github.com/tendermint/tendermint/rpc/core/types" @@ -36,7 +33,9 @@ import ( "github.com/stratosnet/stratos-chain/rpc/backend" rpctypes "github.com/stratosnet/stratos-chain/rpc/types" + "github.com/stratosnet/stratos-chain/x/evm/tracers" jstracers "github.com/stratosnet/stratos-chain/x/evm/tracers/js" + "github.com/stratosnet/stratos-chain/x/evm/tracers/logger" nativetracers "github.com/stratosnet/stratos-chain/x/evm/tracers/native" evmtypes "github.com/stratosnet/stratos-chain/x/evm/types" tmrpccore "github.com/tendermint/tendermint/rpc/core" @@ -197,7 +196,7 @@ func (a *API) TraceTransaction(ctx context.Context, hash common.Hash, config *tr // TraceBlockByNumber returns the structured logs created during the execution of // EVM and returns them as a JSON object. -func (a *API) TraceBlockByNumber(height rpctypes.BlockNumber, config *evmtypes.TraceConfig) ([]*evmtypes.TxTraceResult, error) { +func (a *API) TraceBlockByNumber(height rpctypes.BlockNumber, config *evmtypes.TraceConfig) ([]*tracers.TxTraceResult, error) { a.logger.Debug("debug_traceBlockByNumber", "height", height) if height == 0 { return nil, errors.New("genesis is not traceable") @@ -214,7 +213,7 @@ func (a *API) TraceBlockByNumber(height rpctypes.BlockNumber, config *evmtypes.T // TraceBlockByHash returns the structured logs created during the execution of // EVM and returns them as a JSON object. -func (a *API) TraceBlockByHash(hash common.Hash, config *evmtypes.TraceConfig) ([]*evmtypes.TxTraceResult, error) { +func (a *API) TraceBlockByHash(hash common.Hash, config *evmtypes.TraceConfig) ([]*tracers.TxTraceResult, error) { a.logger.Debug("debug_traceBlockByHash", "hash", hash) // Get Tendermint Block resBlock, err := a.backend.GetTendermintBlockByHash(hash) @@ -234,13 +233,13 @@ func (a *API) TraceBlockByHash(hash common.Hash, config *evmtypes.TraceConfig) ( // traceBlock configures a new tracer according to the provided configuration, and // executes all the transactions contained within. The return value will be one item // per transaction, dependent on the requested tracer. -func (a *API) traceBlock(height rpctypes.BlockNumber, config *evmtypes.TraceConfig, block *tmrpctypes.ResultBlock) ([]*evmtypes.TxTraceResult, error) { +func (a *API) traceBlock(height rpctypes.BlockNumber, config *evmtypes.TraceConfig, block *tmrpctypes.ResultBlock) ([]*tracers.TxTraceResult, error) { txs := block.Block.Txs txsLength := len(txs) if txsLength == 0 { // If there are no transactions return empty array - return []*evmtypes.TxTraceResult{}, nil + return []*tracers.TxTraceResult{}, nil } txDecoder := a.clientCtx.TxConfig.TxDecoder() @@ -288,7 +287,7 @@ func (a *API) traceBlock(height rpctypes.BlockNumber, config *evmtypes.TraceConf return nil, err } - decodedResults := make([]*evmtypes.TxTraceResult, txsLength) + decodedResults := make([]*tracers.TxTraceResult, txsLength) if err := json.Unmarshal(res.Data, &decodedResults); err != nil { return nil, err } diff --git a/rpc/namespaces/ethereum/eth/api.go b/rpc/namespaces/ethereum/eth/api.go index 047e2fb8..49ad7f2c 100644 --- a/rpc/namespaces/ethereum/eth/api.go +++ b/rpc/namespaces/ethereum/eth/api.go @@ -628,7 +628,7 @@ func (e *PublicAPI) doCall( // return if requested block height is greater than the current one or chain not synced if resBlock == nil || resBlock.Block == nil { - return nil, nil + return nil, fmt.Errorf("block not found '%d'", blockNr.Int64()) } sdkCtx, err := e.backend.GetEVMContext().GetSdkContextWithHeader(&resBlock.Block.Header) diff --git a/types/config.go b/types/config.go index 63251490..8116e5fb 100644 --- a/types/config.go +++ b/types/config.go @@ -91,7 +91,8 @@ func (config *Config) SetBech32PrefixForAccount(addressPrefix, pubKeyPrefix stri } // SetBech32PrefixForValidator builds the Config with Bech32 addressPrefix and publKeyPrefix for validators -// and returns the config instance +// +// and returns the config instance func (config *Config) SetBech32PrefixForValidator(addressPrefix, pubKeyPrefix string) { sdkConfig := sdk.GetConfig() sdkConfig.SetBech32PrefixForValidator(addressPrefix, pubKeyPrefix) diff --git a/x/evm/client/cli/tx.go b/x/evm/client/cli/tx.go index 466fd98e..b99366ea 100644 --- a/x/evm/client/cli/tx.go +++ b/x/evm/client/cli/tx.go @@ -11,7 +11,12 @@ import ( "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/input" + "github.com/cosmos/cosmos-sdk/client/tx" + sdk "github.com/cosmos/cosmos-sdk/types" + govcli "github.com/cosmos/cosmos-sdk/x/gov/client/cli" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" rpctypes "github.com/stratosnet/stratos-chain/rpc/types" @@ -111,3 +116,97 @@ func NewRawTxCmd() *cobra.Command { flags.AddTxFlagsToCmd(cmd) return cmd } + +const ( + FlagProxyAddress = "proxy-address" + FlagImplementationAddress = "implementation-address" + FlagData = "data" + FlagValue = "value" +) + +// NewEVMProxyImplmentationUpgrade implements a command handler for submitting a software upgrade with implementation upgrade for existing gensis proxies +func NewEVMProxyImplmentationUpgrade() *cobra.Command { + cmd := &cobra.Command{ + Use: "evm-proxy-upgrade (--proxy-address [address]) (--implmentation-address [address]) (--data [data]) (--value [value]) [flags]", + Args: cobra.ExactArgs(0), + Short: "Submit an implemntation upgrade for genesis proxy", + Long: "Initial proxy implementation upgrade for defined genesis proxy addresses", + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + from := clientCtx.GetFromAddress() + + proxyAddrStr, err := cmd.Flags().GetString(FlagProxyAddress) + if err != nil { + return err + } + if !common.IsHexAddress(proxyAddrStr) { + return fmt.Errorf("%s is not a valid Ethereum address", proxyAddrStr) + } + proxyAddr := common.HexToAddress(proxyAddrStr) + + implAddrStr, err := cmd.Flags().GetString(FlagImplementationAddress) + if err != nil { + return err + } + if !common.IsHexAddress(implAddrStr) { + return fmt.Errorf("%s is not a valid Ethereum address", implAddrStr) + } + implAddr := common.HexToAddress(implAddrStr) + + dataStr, err := cmd.Flags().GetString(FlagData) + if err != nil { + return err + } + data, err := hexutil.Decode(dataStr) + if err != nil { + return err + } + + fmt.Println("data", data) + + valueStr, err := cmd.Flags().GetString(FlagValue) + if err != nil { + return err + } + valueCoin, err := sdk.ParseCoinNormalized(valueStr) + if err != nil { + return err + } + value := valueCoin.Amount + + depositStr, err := cmd.Flags().GetString(govcli.FlagDeposit) + if err != nil { + return err + } + deposit, err := sdk.ParseCoinsNormalized(depositStr) + if err != nil { + return err + } + content := types.NewUpdateImplmentationProposal(proxyAddr, implAddr, data, &value) + + msg, err := govtypes.NewMsgSubmitProposal(content, deposit, from) + if err != nil { + return err + } + + if err = msg.ValidateBasic(); err != nil { + return err + } + + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) + }, + } + + cmd.Flags().String(FlagProxyAddress, "", "proxy address of the contract") + cmd.Flags().String(FlagImplementationAddress, "", "implementation address which should be used for proxy upgrade") + cmd.Flags().String(FlagData, "0x", "addition smart contract data for proxy execution (optional)") + cmd.Flags().String(FlagValue, "0wei", "value of tokens should be used in data execution with payable modifier (optional)") + cmd.Flags().String(govcli.FlagDeposit, "", "deposit of proposal (optional)") + cmd.MarkFlagRequired(FlagProxyAddress) + cmd.MarkFlagRequired(FlagImplementationAddress) + + return cmd +} diff --git a/x/evm/client/proposal_handler.go b/x/evm/client/proposal_handler.go new file mode 100644 index 00000000..d2ec18ee --- /dev/null +++ b/x/evm/client/proposal_handler.go @@ -0,0 +1,25 @@ +package client + +import ( + "net/http" + + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/types/rest" + govclient "github.com/cosmos/cosmos-sdk/x/gov/client" + govrest "github.com/cosmos/cosmos-sdk/x/gov/client/rest" + + "github.com/stratosnet/stratos-chain/x/evm/client/cli" +) + +var ( + EVMChangeProxyImplementationHandler = govclient.NewProposalHandler(cli.NewEVMProxyImplmentationUpgrade, emptyRestHandler) +) + +func emptyRestHandler(client.Context) govrest.ProposalRESTHandler { + return govrest.ProposalRESTHandler{ + SubRoute: "unsupported-evm-client", + Handler: func(w http.ResponseWriter, r *http.Request) { + rest.WriteErrorResponse(w, http.StatusBadRequest, "REST Routes are not supported for EVM proposals") + }, + } +} diff --git a/x/evm/keeper/abci.go b/x/evm/keeper/abci.go index 14396427..8d412cbe 100644 --- a/x/evm/keeper/abci.go +++ b/x/evm/keeper/abci.go @@ -22,6 +22,8 @@ func (k *Keeper) BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock) { k.SetBaseFeeParam(ctx, baseFee) + k.AddGenesisVerifier(ctx) + // Store current base fee in event ctx.EventManager().EmitEvents(sdk.Events{ sdk.NewEvent( @@ -56,5 +58,14 @@ func (k *Keeper) EndBlock(ctx sdk.Context, req abci.RequestEndBlock) []abci.Vali bloom := ethtypes.BytesToBloom(k.GetBlockBloomTransient(infCtx).Bytes()) k.EmitBlockBloomEvent(infCtx, bloom) + pc, err := NewProposalCounsil(k, ctx) + if err != nil { + panic(err) + } + + if err := pc.ApplyGenesisState(uint64(req.Height)); err != nil { + panic(err) + } + return []abci.ValidatorUpdate{} } diff --git a/x/evm/keeper/grpc_query.go b/x/evm/keeper/grpc_query.go index e18f5bdf..a8fe639d 100644 --- a/x/evm/keeper/grpc_query.go +++ b/x/evm/keeper/grpc_query.go @@ -17,14 +17,15 @@ import ( "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/core" ethtypes "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/core/vm" - "github.com/ethereum/go-ethereum/eth/tracers" - "github.com/ethereum/go-ethereum/eth/tracers/logger" + ethparams "github.com/ethereum/go-ethereum/params" + "github.com/stratosnet/stratos-chain/x/evm/tracers" + "github.com/stratosnet/stratos-chain/x/evm/tracers/logger" stratos "github.com/stratosnet/stratos-chain/types" "github.com/stratosnet/stratos-chain/x/evm/statedb" "github.com/stratosnet/stratos-chain/x/evm/types" + "github.com/stratosnet/stratos-chain/x/evm/vm" ) var _ types.QueryServer = Keeper{} @@ -387,7 +388,8 @@ func (k Keeper) TraceTx(c context.Context, req *types.QueryTraceTxRequest) (*typ } txConfig.TxHash = ethTx.Hash() txConfig.TxIndex = uint(i) - rsp, err := k.ApplyMessageWithConfig(ctx, msg, types.NewNoOpTracer(), true, cfg, txConfig) + tracer := tracers.NewNoOpTracer() + rsp, err := k.ApplyMessageWithConfig(ctx, msg, tracer, true, cfg, txConfig) if err != nil { continue } @@ -443,11 +445,11 @@ func (k Keeper) TraceBlock(c context.Context, req *types.QueryTraceBlockRequest) } signer := ethtypes.MakeSigner(cfg.ChainConfig, big.NewInt(ctx.BlockHeight())) txsLength := len(req.Txs) - results := make([]*types.TxTraceResult, 0, txsLength) + results := make([]*tracers.TxTraceResult, 0, txsLength) txConfig := statedb.NewEmptyTxConfig(common.BytesToHash(ctx.HeaderHash().Bytes())) for i, tx := range req.Txs { - result := types.TxTraceResult{} + result := tracers.TxTraceResult{} ethTx := tx.AsTransaction() txConfig.TxHash = ethTx.Hash() txConfig.TxIndex = uint(i) @@ -543,7 +545,7 @@ func (k *Keeper) traceTx( } tracer = logger.NewStructLogger(&logConfig) default: - tracer = types.NewTracer(types.TracerStruct, msg, cfg.ChainConfig, ctx.BlockHeight()) + tracer = tracers.NewTracer(tracers.TracerStruct, msg, cfg.ChainConfig, ctx.BlockHeight()) } res, err := k.ApplyMessageWithConfig(ctx, msg, tracer, commitMessage, cfg, txConfig) @@ -563,11 +565,11 @@ func (k *Keeper) traceTx( } else { returnVal = fmt.Sprintf("%x", res.Return()) } - result = types.ExecutionResult{ + result = tracers.ExecutionResult{ Gas: res.GasUsed, Failed: res.Failed(), ReturnValue: returnVal, - StructLogs: types.FormatLogs(tracer.StructLogs()), + StructLogs: tracers.FormatLogs(tracer.StructLogs()), } case tracers.Tracer: result, err = tracer.GetResult() diff --git a/x/evm/keeper/keeper.go b/x/evm/keeper/keeper.go index a1afccf3..c37acdf9 100644 --- a/x/evm/keeper/keeper.go +++ b/x/evm/keeper/keeper.go @@ -2,6 +2,7 @@ package keeper import ( "math/big" + "sort" "github.com/tendermint/tendermint/libs/log" @@ -14,12 +15,14 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core" ethtypes "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/core/vm" + "github.com/ethereum/go-ethereum/params" stratos "github.com/stratosnet/stratos-chain/types" "github.com/stratosnet/stratos-chain/x/evm/statedb" + "github.com/stratosnet/stratos-chain/x/evm/tracers" "github.com/stratosnet/stratos-chain/x/evm/types" + "github.com/stratosnet/stratos-chain/x/evm/vm" ) // Keeper grants access to the EVM module state and implements the go-ethereum StateDB interface. @@ -44,12 +47,22 @@ type Keeper struct { bankKeeper types.BankKeeper // access historical headers for EVM state transition execution stakingKeeper types.StakingKeeper + // access for registry functionality with related keeper + registerKeeper types.RegisterKeeper + // access for sds functionality with related keeper + sdsKeeper types.SdsKeeper // Tracer used to collect execution traces from the EVM transaction execution tracer string + // genesisContractVerifier verifies is contract is trusted in order to allow curtain opcodes + verifier *vm.GenesisContractVerifier + // EVM Hooks for tx post-processing hooks types.EvmHooks + + // cosmos events to execute when all execution passed + events sdk.Events } // NewKeeper generates new evm module keeper @@ -57,6 +70,7 @@ func NewKeeper( cdc codec.BinaryCodec, storeKey, transientKey sdk.StoreKey, paramSpace paramtypes.Subspace, ak types.AccountKeeper, bankKeeper types.BankKeeper, sk types.StakingKeeper, + sdsKeeper types.SdsKeeper, tracer string, ) *Keeper { // ensure evm module account is set @@ -76,9 +90,11 @@ func NewKeeper( accountKeeper: ak, bankKeeper: bankKeeper, stakingKeeper: sk, + sdsKeeper: sdsKeeper, storeKey: storeKey, transientKey: transientKey, tracer: tracer, + events: make(sdk.Events, 0, 12), } } @@ -87,6 +103,47 @@ func (k Keeper) Logger(ctx sdk.Context) log.Logger { return ctx.Logger().With("module", types.ModuleName) } +func (k *Keeper) SetRegisterKeeper(rk types.RegisterKeeper) { + k.registerKeeper = rk +} + +func (k *Keeper) SetSdsKeeper(sdsk types.SdsKeeper) { + k.sdsKeeper = sdsk +} + +// cosmos events +func (k *Keeper) AddEvents(events sdk.Events) { + k.events = append(k.events, events...) +} + +func (k *Keeper) ApplyEvents(ctx sdk.Context, isVmError bool) { + if len(k.events) > 0 && !isVmError { + ctx.EventManager().EmitEvents(k.events) + } + k.events = k.events[:0] // clear prvious events to avoid conflicts +} + +// AddVerifier adding verifier with initial contracts +func (k *Keeper) AddGenesisVerifier(ctx sdk.Context) { + // could be as cached + if k.verifier != nil { + return + } + + k.verifier = vm.NewGenesisContractVerifier() + + params := k.GetParams(ctx) + keys := make([]string, 0) + for k := range params.ProxyProposalParams.Contracts { + keys = append(keys, k) + } + sort.Strings(keys) + for _, key := range keys { + contract := params.ProxyProposalParams.Contracts[key] + k.verifier.AddContract(contract, true) + } +} + // ---------------------------------------------------------------------------- // Block Bloom // Required by Web3 API. @@ -206,7 +263,7 @@ func (k *Keeper) PostTxProcessing(ctx sdk.Context, msg core.Message, receipt *et // Tracer return a default vm.Tracer based on current keeper state func (k Keeper) Tracer(ctx sdk.Context, msg core.Message, ethCfg *params.ChainConfig) vm.EVMLogger { - return types.NewTracer(k.tracer, msg, ethCfg, ctx.BlockHeight()) + return tracers.NewTracer(k.tracer, msg, ethCfg, ctx.BlockHeight()) } // GetAccountWithoutBalance load nonce and codehash without balance, diff --git a/x/evm/keeper/proposal.go b/x/evm/keeper/proposal.go new file mode 100644 index 00000000..797bedd3 --- /dev/null +++ b/x/evm/keeper/proposal.go @@ -0,0 +1,305 @@ +package keeper + +import ( + "bytes" + "fmt" + "math" + "math/big" + + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/ethereum/go-ethereum/crypto" + "github.com/ethereum/go-ethereum/params" + + stratos "github.com/stratosnet/stratos-chain/types" + "github.com/stratosnet/stratos-chain/x/evm/statedb" + "github.com/stratosnet/stratos-chain/x/evm/tracers" + "github.com/stratosnet/stratos-chain/x/evm/types" + "github.com/stratosnet/stratos-chain/x/evm/vm" +) + +var ( + emptyCodeHash = crypto.Keccak256Hash(nil) +) + +type ProposalCounsil struct { + keeper *Keeper + ctx sdk.Context + stateDB *statedb.StateDB + evm *vm.EVM + consensusOwner common.Address + proxyOwner common.Address + verifier *vm.GenesisContractVerifier +} + +func NewProposalCounsil(k *Keeper, ctx sdk.Context) (*ProposalCounsil, error) { + params := k.GetParams(ctx) + + pc := &ProposalCounsil{ + keeper: k, + ctx: ctx, + consensusOwner: common.HexToAddress(params.ProxyProposalParams.ConsensusAddress), + proxyOwner: common.HexToAddress(params.ProxyProposalParams.ProxyOwnerAddress), + verifier: k.verifier, + } + cfg, err := k.EVMConfig(ctx) + if err != nil { + return nil, sdkerrors.Wrap(err, "failed to load evm config") + } + + blockCtx := vm.BlockContext{ + CanTransfer: vm.CanTransfer, + Transfer: vm.Transfer, + GetHash: k.GetHashFn(ctx), + Coinbase: cfg.CoinBase, + GasLimit: stratos.BlockGasLimit(ctx), + BlockNumber: big.NewInt(ctx.BlockHeight()), + Time: big.NewInt(ctx.BlockHeader().Time.Unix()), + Difficulty: big.NewInt(0), // unused. Only required in PoW context + BaseFee: cfg.BaseFee, + } + + txCtx := vm.TxContext{ + Origin: pc.consensusOwner, + GasPrice: big.NewInt(0), + } + tracer := tracers.NewNoOpTracer() + vmConfig := k.VMConfig(ctx, cfg, tracer) + + txConfig := statedb.NewEmptyTxConfig(common.BytesToHash(ctx.HeaderHash())) + pc.stateDB = statedb.New(ctx, pc.keeper, txConfig) + pc.evm = vm.NewEVM(blockCtx, txCtx, pc.stateDB, cfg.ChainConfig, vmConfig, pc.verifier) + + return pc, nil +} + +func (pc *ProposalCounsil) finalize() error { + if err := pc.stateDB.Commit(); err != nil { + return err + } + return nil +} + +func (pc *ProposalCounsil) call(sender, contractAddress common.Address, data []byte, value *big.Int) error { + // required + txCtx := vm.TxContext{ + Origin: sender, + GasPrice: big.NewInt(0), + } + pc.evm.Reset(txCtx, pc.stateDB) + + nonce := pc.stateDB.GetNonce(sender) + // we do not care about gas during consil execution + gas := uint64(math.MaxUint64) + // for safety + if value == nil { + value = big.NewInt(0) + } + + { + pc.stateDB.SetNonce(sender, nonce+1) + } + + if _, _, vmErr := pc.evm.Call(vm.AccountRef(sender), contractAddress, data, gas, value); vmErr != nil { + return vmErr + } + return nil +} + +func (pc *ProposalCounsil) create(sender, contractAddress common.Address, data []byte, value *big.Int) (*common.Address, error) { + // required + txCtx := vm.TxContext{ + Origin: sender, + GasPrice: big.NewInt(0), + } + pc.evm.Reset(txCtx, pc.stateDB) + + nonce := pc.stateDB.GetNonce(sender) + // we do not care about gas during consil execution + gas := uint64(math.MaxUint64) + + // for safety + if value == nil { + value = big.NewInt(0) + } + + interpreter := vm.NewEVMInterpreter(pc.evm, pc.evm.Config) + + accRef := vm.AccountRef(sender) + + { + pc.stateDB.SetNonce(accRef.Address(), nonce+1) + } + + contractHash := pc.evm.StateDB.GetCodeHash(contractAddress) + if pc.evm.StateDB.GetNonce(contractAddress) != 0 || (contractHash != (common.Hash{}) && contractHash != emptyCodeHash) { + return nil, vm.ErrContractAddressCollision + } + + snapshot := pc.evm.StateDB.Snapshot() + + pc.evm.StateDB.CreateAccount(contractAddress) + pc.evm.StateDB.SetNonce(contractAddress, 1) + pc.evm.Context.Transfer(pc.evm.StateDB, sender, contractAddress, value) + + contract := vm.NewContract(accRef, vm.AccountRef(contractAddress), value, gas) + contract.SetCallCode(&contractAddress, common.Hash{}, data) + + ret, err := interpreter.Run(contract, nil, false) + if err != nil { + return nil, err + } + + // Check whether the max code size has been exceeded, assign err if the case. + if err == nil && len(ret) > params.MaxCodeSize { + err = vm.ErrMaxCodeSizeExceeded + } + + // Reject code starting with 0xEF if EIP-3541 is enabled. + if err == nil && len(ret) >= 1 && ret[0] == 0xEF { + err = vm.ErrInvalidCode + } + + // if the contract creation ran successfully and no errors were returned + // calculate the gas required to store the code. If the code could not + // be stored due to not enough gas set an error and let it be handled + // by the error checking condition below. + if err == nil { + createDataGas := uint64(len(ret)) * params.CreateDataGas + if contract.UseGas(createDataGas) { + pc.evm.StateDB.SetCode(contractAddress, ret) + } else { + err = vm.ErrCodeStoreOutOfGas + } + } + + // When an error was returned by the EVM or when setting the creation code + // above we revert to the snapshot and consume any gas remaining. Additionally + // when we're in homestead this also counts for code storage gas errors. + if err != nil { + pc.evm.StateDB.RevertToSnapshot(snapshot) + if err != vm.ErrExecutionReverted { + contract.UseGas(contract.Gas) + } + } + + return &contractAddress, nil +} + +func (pc *ProposalCounsil) ApplyGenesisState(height uint64) error { + contracts := pc.verifier.GetContracts(height) + + if len(contracts) == 0 { + return nil + } + + for _, contract := range contracts { + implAddr := crypto.CreateAddress(pc.consensusOwner, pc.stateDB.GetNonce(pc.consensusOwner)) + proxyAddr := common.HexToAddress(contract.GetAddress()) + + bin, err := hexutil.Decode(contract.GetBin()) + if err != nil { + return err + } + + data, err := hexutil.Decode(contract.GetInit()) + if err != nil { + return err + } + + implCode := pc.stateDB.GetCode(implAddr) + if implCode == nil { + if _, err := pc.create(pc.proxyOwner, implAddr, bin, nil); err != nil { + return sdkerrors.Wrapf(err, "failed to get or create address on '%s'", implAddr) + } + } + + value := sdk.NewInt(0) + c := types.NewUpdateImplmentationProposal( + proxyAddr, + implAddr, + data, + &value, + ) + + if err := c.ValidateBasic(); err != nil { + return err + } + + if err = pc.updateProxyImplementation(c.(*types.UpdateImplmentationProposal), false); err != nil { + return err + } + } + if err := pc.finalize(); err != nil { + return err + } + return nil +} + +func (pc *ProposalCounsil) UpdateProxyImplementation(p *types.UpdateImplmentationProposal) error { + return pc.updateProxyImplementation(p, true) +} + +// updateProxyImplementation execute provided function to a proxy contract for impl upgrade +func (pc *ProposalCounsil) updateProxyImplementation(p *types.UpdateImplmentationProposal, commit bool) error { + if !pc.verifier.IsTrustedAddress(p.ProxyAddress) { + return fmt.Errorf("proxy '%s' has not been verified", p.ProxyAddress) + } + + proxyAddress := common.HexToAddress(p.ProxyAddress) + implAddress := common.HexToAddress(p.ImplementationAddress) + + implCode := pc.stateDB.GetCode(implAddress) + if implCode == nil { + return fmt.Errorf("implementation '%s' not found", implAddress) + } + + if bytes.Equal(implCode, emptyCodeHash[:]) { + return fmt.Errorf("implementation '%s' is EOA", implAddress) + } + + proxyCode := pc.stateDB.GetCode(proxyAddress) + if proxyCode != nil { + upgradeData, err := types.EncodeContractFunc( + types.TransparentUpgradableProxyABI, + "upgradeToAndCall", + implAddress, + p.Data, + ) + if err != nil { + return err + } + + if err := pc.call(pc.consensusOwner, proxyAddress, upgradeData, p.Amount.BigInt()); err != nil { + return err + } + } else { + proxyConstructorData, err := types.EncodeContractFunc( + types.TransparentUpgradableProxyABI, + "", + implAddress, + pc.consensusOwner, + p.Data, + ) + if err != nil { + return err + } + + proxyConstructorData = append(common.FromHex(types.TransparentUpgradableProxyBin), proxyConstructorData...) + + if _, err := pc.create(pc.proxyOwner, proxyAddress, proxyConstructorData, p.Amount.BigInt()); err != nil { + return err + } + } + + if commit { + if err := pc.finalize(); err != nil { + return err + } + } + + return nil +} diff --git a/x/evm/keeper/state_transition.go b/x/evm/keeper/state_transition.go index b9dd1588..bd434ca7 100644 --- a/x/evm/keeper/state_transition.go +++ b/x/evm/keeper/state_transition.go @@ -15,13 +15,16 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core" ethtypes "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/params" stratos "github.com/stratosnet/stratos-chain/types" "github.com/stratosnet/stratos-chain/x/evm/statedb" + "github.com/stratosnet/stratos-chain/x/evm/tracers" "github.com/stratosnet/stratos-chain/x/evm/types" + "github.com/stratosnet/stratos-chain/x/evm/vm" + registertypes "github.com/stratosnet/stratos-chain/x/register/types" + sdstypes "github.com/stratosnet/stratos-chain/x/sds/types" ) // GasToRefund calculates the amount of gas the state machine should refund to the sender. It is @@ -41,7 +44,6 @@ func (k *Keeper) EVMConfig(ctx sdk.Context) (*types.EVMConfig, error) { params := k.GetParams(ctx) ethCfg := params.ChainConfig.EthereumConfig() - // get the coinbase address from the block proposer coinbase, err := k.GetCoinbaseAddress(ctx) if err != nil { return nil, sdkerrors.Wrap(err, "failed to obtain coinbase address") @@ -78,9 +80,10 @@ func (k *Keeper) NewEVM( stateDB vm.StateDB, ) *vm.EVM { blockCtx := vm.BlockContext{ - CanTransfer: core.CanTransfer, - Transfer: core.Transfer, + CanTransfer: vm.CanTransfer, + Transfer: vm.Transfer, GetHash: k.GetHashFn(ctx), + Prepay: k.PrepayFn(ctx), Coinbase: cfg.CoinBase, GasLimit: stratos.BlockGasLimit(ctx), BlockNumber: big.NewInt(ctx.BlockHeight()), @@ -89,24 +92,25 @@ func (k *Keeper) NewEVM( BaseFee: cfg.BaseFee, } - txCtx := core.NewEVMTxContext(msg) + txCtx := vm.NewEVMTxContext(msg) if tracer == nil { tracer = k.Tracer(ctx, msg, cfg.ChainConfig) } - vmConfig := k.VMConfig(ctx, msg, cfg, tracer) - return vm.NewEVM(blockCtx, txCtx, stateDB, cfg.ChainConfig, vmConfig) + vmConfig := k.VMConfig(ctx, cfg, tracer) + return vm.NewEVM(blockCtx, txCtx, stateDB, cfg.ChainConfig, vmConfig, k.verifier) } // VMConfig creates an EVM configuration from the debug setting and the extra EIPs enabled on the // module parameters. The config generated uses the default JumpTable from the EVM. -func (k Keeper) VMConfig(ctx sdk.Context, msg core.Message, cfg *types.EVMConfig, tracer vm.EVMLogger) vm.Config { +func (k Keeper) VMConfig(ctx sdk.Context, cfg *types.EVMConfig, tracer vm.EVMLogger) vm.Config { noBaseFee := true if types.IsLondon(cfg.ChainConfig, ctx.BlockHeight()) { noBaseFee = k.GetParams(ctx).FeeMarketParams.NoBaseFee } var debug bool - if _, ok := tracer.(types.NoOpTracer); !ok { + + if _, ok := tracer.(tracers.NoOpTracer); !ok { debug = true noBaseFee = true } @@ -119,6 +123,59 @@ func (k Keeper) VMConfig(ctx sdk.Context, msg core.Message, cfg *types.EVMConfig } } +func (k *Keeper) PrepayFn(ctx sdk.Context) vm.PrepayFunc { + return func(evm *vm.EVM, from, beneficiary common.Address, amount *big.Int, gas uint64) (*big.Int, uint64, error) { + if amount.Sign() == 0 { + return nil, gas, vm.ErrExecutionReverted + } + if gas < vm.ReturnGasPrepay { + return nil, gas, vm.ErrGasUintOverflow + } + // NOTE: Required to return correct left gas amount to solidity + returnGas := gas - vm.ReturnGasPrepay + + kdb := evm.StateDB.GetKeestateDB() + kSnapshot := evm.StateDB.KeeSnapshot() + + accFrom := sdk.AccAddress(from.Bytes()) + accBeneficiary := sdk.AccAddress(beneficiary.Bytes()) + + purchased, remaining, err := k.KeeCalculatePrepayPurchaseAmount(evm.StateDB, sdk.NewIntFromBigInt(amount)) + if err != nil { + evm.StateDB.RevertToKeeSnapshot(kSnapshot) + + return nil, returnGas, vm.ErrExecutionReverted + } + + to := common.BytesToAddress(authtypes.NewModuleAddress(registertypes.TotalUnissuedPrepay)) + + if !evm.StateDB.Exist(to) { + evm.StateDB.CreateAccount(to) + } + + evm.Context.Transfer(evm.StateDB, from, to, purchased.BigInt()) + + k.registerKeeper.KeeSetRemainingOzoneLimit(kdb, remaining) + + k.AddEvents(sdk.Events{ + sdk.NewEvent( + sdstypes.EventTypePrepay, + sdk.NewAttribute(sdk.AttributeKeySender, accFrom.String()), + sdk.NewAttribute(sdstypes.AttributeKeyBeneficiary, accBeneficiary.String()), + sdk.NewAttribute(sdstypes.AttributeKeyAmount, sdk.NewIntFromBigInt(amount).String()), + sdk.NewAttribute(sdstypes.AttributeKeyPurchasedNoz, purchased.String()), + ), + sdk.NewEvent( + sdk.EventTypeMessage, + sdk.NewAttribute(sdk.AttributeKeyModule, sdstypes.AttributeValueCategory), + sdk.NewAttribute(sdk.AttributeKeySender, accFrom.String()), + ), + }) + + return purchased.BigInt(), returnGas, nil + } +} + // GetHashFn implements vm.GetHashFunc for stratos. It handles 3 cases: // 1. The requested height matches the current height from context (and thus same epoch number) // 2. The requested height is from an previous height from the same chain epoch @@ -426,6 +483,8 @@ func (k *Keeper) ApplyMessageWithConfig(ctx sdk.Context, msg core.Message, trace } } + k.ApplyEvents(ctx, vmErr != nil) + return &types.MsgEthereumTxResponse{ GasUsed: gasUsed, VmError: vmError, diff --git a/x/evm/keeper/store.go b/x/evm/keeper/store.go new file mode 100644 index 00000000..fcf4fec3 --- /dev/null +++ b/x/evm/keeper/store.go @@ -0,0 +1,42 @@ +package keeper + +import ( + "fmt" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/ethereum/go-ethereum/common" + "github.com/stratosnet/stratos-chain/x/evm/vm" + regtypes "github.com/stratosnet/stratos-chain/x/register/types" +) + +func (k Keeper) KeeGetTotalUnissuedPrepay(statedb vm.StateDB) (value sdk.Int) { + totalUnissuedPrepayAccAddr := k.accountKeeper.GetModuleAddress(regtypes.TotalUnissuedPrepay) + if totalUnissuedPrepayAccAddr == nil { + value = sdk.ZeroInt() + } else { + value = sdk.NewIntFromBigInt(statedb.GetBalance(common.BytesToAddress(totalUnissuedPrepayAccAddr))) + } + + return +} + +func (k *Keeper) KeeCalculatePrepayPurchaseAmount(statedb vm.StateDB, amount sdk.Int) (sdk.Int, sdk.Int, error) { + kdb := statedb.GetKeestateDB() + St := k.registerKeeper.KeeGetEffectiveTotalStake(kdb) + Pt := k.KeeGetTotalUnissuedPrepay(statedb) + Lt := k.registerKeeper.KeeGetRemainingOzoneLimit(kdb) + + purchase := Lt.ToDec(). + Mul(amount.ToDec()). + Quo((St. + Add(Pt). + Add(amount)).ToDec()). + TruncateInt() + if purchase.GT(Lt) { + return sdk.NewInt(0), sdk.NewInt(0), fmt.Errorf("not enough remaining ozone limit to complete prepay") + } + + remaining := Lt.Sub(purchase) + + return purchase, remaining, nil +} diff --git a/x/evm/proposal_handler.go b/x/evm/proposal_handler.go new file mode 100644 index 00000000..8ac002d3 --- /dev/null +++ b/x/evm/proposal_handler.go @@ -0,0 +1,28 @@ +package evm + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + + "github.com/stratosnet/stratos-chain/x/evm/keeper" + "github.com/stratosnet/stratos-chain/x/evm/types" +) + +// NewEVMChangeProposalHandler defines the evm changes proposals +func NewEVMChangeProposalHandler(k *keeper.Keeper) govtypes.Handler { + return func(ctx sdk.Context, content govtypes.Content) error { + pc, err := keeper.NewProposalCounsil(k, ctx) + if err != nil { + return err + } + + switch c := content.(type) { + case *types.UpdateImplmentationProposal: + return pc.UpdateProxyImplementation(c) + + default: + return sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "unrecognized proxy proposal content type: %T", c) + } + } +} diff --git a/x/evm/simulation/genesis.go b/x/evm/simulation/genesis.go index 7cd73a3c..f6d60a98 100644 --- a/x/evm/simulation/genesis.go +++ b/x/evm/simulation/genesis.go @@ -41,7 +41,7 @@ func GenEnableCall(r *rand.Rand) bool { // RandomizedGenState generates a random GenesisState for the EVM module func RandomizedGenState(simState *module.SimulationState) { feeMarketParams := types.NewFeeMarketParams(simState.Rand.Uint32()%2 == 0, simState.Rand.Uint32(), simState.Rand.Uint32(), simState.Rand.Uint64(), simState.Rand.Int63()) - + proxyParams := types.DefaultProxyProposalParams() // evm params var extraEIPs []int64 @@ -50,7 +50,7 @@ func RandomizedGenState(simState *module.SimulationState) { func(r *rand.Rand) { extraEIPs = GenExtraEIPs(r) }, ) - params := types.NewParams(types.DefaultEVMDenom, true, true, types.DefaultChainConfig(), feeMarketParams, extraEIPs...) + params := types.NewParams(types.DefaultEVMDenom, true, true, types.DefaultChainConfig(), feeMarketParams, proxyParams, extraEIPs...) evmGenesis := types.NewGenesisState(params, []types.GenesisAccount{}) bz, err := json.MarshalIndent(evmGenesis, "", " ") diff --git a/x/evm/statedb/statedb.go b/x/evm/statedb/statedb.go index e075308d..c13e1e5a 100644 --- a/x/evm/statedb/statedb.go +++ b/x/evm/statedb/statedb.go @@ -9,8 +9,9 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/ethereum/go-ethereum/common" ethtypes "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/crypto" + keestatedb "github.com/stratosnet/stratos-chain/core/statedb" + "github.com/stratosnet/stratos-chain/x/evm/vm" ) // revision is the identifier of a version of state. @@ -50,6 +51,9 @@ type StateDB struct { // Per-transaction access list accessList *accessList + + // core keestatedb for basic keeper commit state changes + keestatedb *keestatedb.KeestateDB } // New creates a new state from a given trie. @@ -62,6 +66,7 @@ func New(ctx sdk.Context, keeper Keeper, txConfig TxConfig) *StateDB { accessList: newAccessList(), logs: make([]*ethtypes.Log, 0), txConfig: txConfig, + keestatedb: keestatedb.New(ctx), } } @@ -250,8 +255,8 @@ func (s *StateDB) createObject(addr common.Address) (newobj, prev *stateObject) // CreateAccount is called during the EVM CREATE operation. The situation might arise that // a contract does the following: // -// 1. sends funds to sha(account ++ (nonce + 1)) -// 2. tx_create(sha(account ++ nonce)) (note that this gets the address of 1) +// 1. sends funds to sha(account ++ (nonce + 1)) +// 2. tx_create(sha(account ++ nonce)) (note that this gets the address of 1) // // Carrying over the balance ensures that Ether doesn't disappear. func (s *StateDB) CreateAccount(addr common.Address) { @@ -459,5 +464,30 @@ func (s *StateDB) Commit() error { } } } + if err := s.keestatedb.Commit(); err != nil { + return err + } return nil } + +// proxy methods to keestatedb + +func (s *StateDB) GetKeestateDB() *keestatedb.KeestateDB { + return s.keestatedb +} + +func (s *StateDB) GetKeeState(storeKey sdk.StoreKey, key []byte) []byte { + return s.keestatedb.GetState(storeKey, key) +} + +func (s *StateDB) SetKeeState(storeKey sdk.StoreKey, key, value []byte) { + s.keestatedb.SetState(storeKey, key, value) +} + +func (s *StateDB) RevertToKeeSnapshot(revid int) { + s.keestatedb.RevertToSnapshot(revid) +} + +func (s *StateDB) KeeSnapshot() int { + return s.keestatedb.Snapshot() +} diff --git a/x/evm/tracers/js/goja.go b/x/evm/tracers/js/goja.go index adbcfcaf..2129e89c 100644 --- a/x/evm/tracers/js/goja.go +++ b/x/evm/tracers/js/goja.go @@ -27,9 +27,11 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/ethereum/go-ethereum/core/vm" + ethvm "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/eth/tracers" + "github.com/stratosnet/stratos-chain/x/evm/tracers" + "github.com/stratosnet/stratos-chain/x/evm/vm" + jsassets "github.com/stratosnet/stratos-chain/x/evm/tracers/js/internal/tracers" ) @@ -641,7 +643,7 @@ func (s *stackObj) setupObject() *goja.Object { } type dbObj struct { - db vm.StateDB + db ethvm.StateDB vm *goja.Runtime toBig toBigFn toBuf toBufFn diff --git a/x/evm/tracers/logger/access_list_tracer.go b/x/evm/tracers/logger/access_list_tracer.go new file mode 100644 index 00000000..88cad6c1 --- /dev/null +++ b/x/evm/tracers/logger/access_list_tracer.go @@ -0,0 +1,184 @@ +// Copyright 2021 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package logger + +import ( + "math/big" + "time" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/stratosnet/stratos-chain/x/evm/vm" +) + +// accessList is an accumulator for the set of accounts and storage slots an EVM +// contract execution touches. +type accessList map[common.Address]accessListSlots + +// accessListSlots is an accumulator for the set of storage slots within a single +// contract that an EVM contract execution touches. +type accessListSlots map[common.Hash]struct{} + +// newAccessList creates a new accessList. +func newAccessList() accessList { + return make(map[common.Address]accessListSlots) +} + +// addAddress adds an address to the accesslist. +func (al accessList) addAddress(address common.Address) { + // Set address if not previously present + if _, present := al[address]; !present { + al[address] = make(map[common.Hash]struct{}) + } +} + +// addSlot adds a storage slot to the accesslist. +func (al accessList) addSlot(address common.Address, slot common.Hash) { + // Set address if not previously present + al.addAddress(address) + + // Set the slot on the surely existent storage set + al[address][slot] = struct{}{} +} + +// equal checks if the content of the current access list is the same as the +// content of the other one. +func (al accessList) equal(other accessList) bool { + // Cross reference the accounts first + if len(al) != len(other) { + return false + } + // Given that len(al) == len(other), we only need to check that + // all the items from al are in other. + for addr := range al { + if _, ok := other[addr]; !ok { + return false + } + } + + // Accounts match, cross reference the storage slots too + for addr, slots := range al { + otherslots := other[addr] + + if len(slots) != len(otherslots) { + return false + } + // Given that len(slots) == len(otherslots), we only need to check that + // all the items from slots are in otherslots. + for hash := range slots { + if _, ok := otherslots[hash]; !ok { + return false + } + } + } + return true +} + +// accesslist converts the accesslist to a types.AccessList. +func (al accessList) accessList() types.AccessList { + acl := make(types.AccessList, 0, len(al)) + for addr, slots := range al { + tuple := types.AccessTuple{Address: addr, StorageKeys: []common.Hash{}} + for slot := range slots { + tuple.StorageKeys = append(tuple.StorageKeys, slot) + } + acl = append(acl, tuple) + } + return acl +} + +// AccessListTracer is a tracer that accumulates touched accounts and storage +// slots into an internal set. +type AccessListTracer struct { + excl map[common.Address]struct{} // Set of account to exclude from the list + list accessList // Set of accounts and storage slots touched +} + +// NewAccessListTracer creates a new tracer that can generate AccessLists. +// An optional AccessList can be specified to occupy slots and addresses in +// the resulting accesslist. +func NewAccessListTracer(acl types.AccessList, from, to common.Address, precompiles []common.Address) *AccessListTracer { + excl := map[common.Address]struct{}{ + from: {}, to: {}, + } + for _, addr := range precompiles { + excl[addr] = struct{}{} + } + list := newAccessList() + for _, al := range acl { + if _, ok := excl[al.Address]; !ok { + list.addAddress(al.Address) + } + for _, slot := range al.StorageKeys { + list.addSlot(al.Address, slot) + } + } + return &AccessListTracer{ + excl: excl, + list: list, + } +} + +func (a *AccessListTracer) CaptureStart(env *vm.EVM, from common.Address, to common.Address, create bool, input []byte, gas uint64, value *big.Int) { +} + +// CaptureState captures all opcodes that touch storage or addresses and adds them to the accesslist. +func (a *AccessListTracer) CaptureState(pc uint64, op vm.OpCode, gas, cost uint64, scope *vm.ScopeContext, rData []byte, depth int, err error) { + stack := scope.Stack + stackData := stack.Data() + stackLen := len(stackData) + if (op == vm.SLOAD || op == vm.SSTORE) && stackLen >= 1 { + slot := common.Hash(stackData[stackLen-1].Bytes32()) + a.list.addSlot(scope.Contract.Address(), slot) + } + if (op == vm.EXTCODECOPY || op == vm.EXTCODEHASH || op == vm.EXTCODESIZE || op == vm.BALANCE || op == vm.SELFDESTRUCT) && stackLen >= 1 { + addr := common.Address(stackData[stackLen-1].Bytes20()) + if _, ok := a.excl[addr]; !ok { + a.list.addAddress(addr) + } + } + if (op == vm.DELEGATECALL || op == vm.CALL || op == vm.STATICCALL || op == vm.CALLCODE) && stackLen >= 5 { + addr := common.Address(stackData[stackLen-2].Bytes20()) + if _, ok := a.excl[addr]; !ok { + a.list.addAddress(addr) + } + } +} + +func (*AccessListTracer) CaptureFault(pc uint64, op vm.OpCode, gas, cost uint64, scope *vm.ScopeContext, depth int, err error) { +} + +func (*AccessListTracer) CaptureEnd(output []byte, gasUsed uint64, t time.Duration, err error) {} + +func (*AccessListTracer) CaptureEnter(typ vm.OpCode, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) { +} + +func (*AccessListTracer) CaptureExit(output []byte, gasUsed uint64, err error) {} + +func (*AccessListTracer) CaptureTxStart(gasLimit uint64) {} + +func (*AccessListTracer) CaptureTxEnd(restGas uint64) {} + +// AccessList returns the current accesslist maintained by the tracer. +func (a *AccessListTracer) AccessList() types.AccessList { + return a.list.accessList() +} + +// Equal returns if the content of two access list traces are equal. +func (a *AccessListTracer) Equal(other *AccessListTracer) bool { + return a.list.equal(other.list) +} diff --git a/x/evm/tracers/logger/gen_structlog.go b/x/evm/tracers/logger/gen_structlog.go new file mode 100644 index 00000000..f6968a0f --- /dev/null +++ b/x/evm/tracers/logger/gen_structlog.go @@ -0,0 +1,110 @@ +// Code generated by github.com/fjl/gencodec. DO NOT EDIT. + +package logger + +import ( + "encoding/json" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/ethereum/go-ethereum/common/math" + "github.com/stratosnet/stratos-chain/x/evm/vm" + "github.com/holiman/uint256" +) + +var _ = (*structLogMarshaling)(nil) + +// MarshalJSON marshals as JSON. +func (s StructLog) MarshalJSON() ([]byte, error) { + type StructLog struct { + Pc uint64 `json:"pc"` + Op vm.OpCode `json:"op"` + Gas math.HexOrDecimal64 `json:"gas"` + GasCost math.HexOrDecimal64 `json:"gasCost"` + Memory hexutil.Bytes `json:"memory,omitempty"` + MemorySize int `json:"memSize"` + Stack []uint256.Int `json:"stack"` + ReturnData hexutil.Bytes `json:"returnData,omitempty"` + Storage map[common.Hash]common.Hash `json:"-"` + Depth int `json:"depth"` + RefundCounter uint64 `json:"refund"` + Err error `json:"-"` + OpName string `json:"opName"` + ErrorString string `json:"error,omitempty"` + } + var enc StructLog + enc.Pc = s.Pc + enc.Op = s.Op + enc.Gas = math.HexOrDecimal64(s.Gas) + enc.GasCost = math.HexOrDecimal64(s.GasCost) + enc.Memory = s.Memory + enc.MemorySize = s.MemorySize + enc.Stack = s.Stack + enc.ReturnData = s.ReturnData + enc.Storage = s.Storage + enc.Depth = s.Depth + enc.RefundCounter = s.RefundCounter + enc.Err = s.Err + enc.OpName = s.OpName() + enc.ErrorString = s.ErrorString() + return json.Marshal(&enc) +} + +// UnmarshalJSON unmarshals from JSON. +func (s *StructLog) UnmarshalJSON(input []byte) error { + type StructLog struct { + Pc *uint64 `json:"pc"` + Op *vm.OpCode `json:"op"` + Gas *math.HexOrDecimal64 `json:"gas"` + GasCost *math.HexOrDecimal64 `json:"gasCost"` + Memory *hexutil.Bytes `json:"memory,omitempty"` + MemorySize *int `json:"memSize"` + Stack []uint256.Int `json:"stack"` + ReturnData *hexutil.Bytes `json:"returnData,omitempty"` + Storage map[common.Hash]common.Hash `json:"-"` + Depth *int `json:"depth"` + RefundCounter *uint64 `json:"refund"` + Err error `json:"-"` + } + var dec StructLog + if err := json.Unmarshal(input, &dec); err != nil { + return err + } + if dec.Pc != nil { + s.Pc = *dec.Pc + } + if dec.Op != nil { + s.Op = *dec.Op + } + if dec.Gas != nil { + s.Gas = uint64(*dec.Gas) + } + if dec.GasCost != nil { + s.GasCost = uint64(*dec.GasCost) + } + if dec.Memory != nil { + s.Memory = *dec.Memory + } + if dec.MemorySize != nil { + s.MemorySize = *dec.MemorySize + } + if dec.Stack != nil { + s.Stack = dec.Stack + } + if dec.ReturnData != nil { + s.ReturnData = *dec.ReturnData + } + if dec.Storage != nil { + s.Storage = dec.Storage + } + if dec.Depth != nil { + s.Depth = *dec.Depth + } + if dec.RefundCounter != nil { + s.RefundCounter = *dec.RefundCounter + } + if dec.Err != nil { + s.Err = dec.Err + } + return nil +} diff --git a/x/evm/tracers/logger/logger.go b/x/evm/tracers/logger/logger.go new file mode 100644 index 00000000..bfedb004 --- /dev/null +++ b/x/evm/tracers/logger/logger.go @@ -0,0 +1,464 @@ +// Copyright 2021 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package logger + +import ( + "encoding/hex" + "encoding/json" + "fmt" + "io" + "math/big" + "strings" + "sync/atomic" + "time" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/ethereum/go-ethereum/common/math" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/params" + "github.com/holiman/uint256" + "github.com/stratosnet/stratos-chain/x/evm/vm" +) + +// Storage represents a contract's storage. +type Storage map[common.Hash]common.Hash + +// Copy duplicates the current storage. +func (s Storage) Copy() Storage { + cpy := make(Storage, len(s)) + for key, value := range s { + cpy[key] = value + } + return cpy +} + +// Config are the configuration options for structured logger the EVM +type Config struct { + EnableMemory bool // enable memory capture + DisableStack bool // disable stack capture + DisableStorage bool // disable storage capture + EnableReturnData bool // enable return data capture + Debug bool // print output during capture end + Limit int // maximum length of output, but zero means unlimited + // Chain overrides, can be used to execute a trace using future fork rules + Overrides *params.ChainConfig `json:"overrides,omitempty"` +} + +//go:generate go run github.com/fjl/gencodec -type StructLog -field-override structLogMarshaling -out gen_structlog.go + +// StructLog is emitted to the EVM each cycle and lists information about the current internal state +// prior to the execution of the statement. +type StructLog struct { + Pc uint64 `json:"pc"` + Op vm.OpCode `json:"op"` + Gas uint64 `json:"gas"` + GasCost uint64 `json:"gasCost"` + Memory []byte `json:"memory,omitempty"` + MemorySize int `json:"memSize"` + Stack []uint256.Int `json:"stack"` + ReturnData []byte `json:"returnData,omitempty"` + Storage map[common.Hash]common.Hash `json:"-"` + Depth int `json:"depth"` + RefundCounter uint64 `json:"refund"` + Err error `json:"-"` +} + +// overrides for gencodec +type structLogMarshaling struct { + Gas math.HexOrDecimal64 + GasCost math.HexOrDecimal64 + Memory hexutil.Bytes + ReturnData hexutil.Bytes + OpName string `json:"opName"` // adds call to OpName() in MarshalJSON + ErrorString string `json:"error,omitempty"` // adds call to ErrorString() in MarshalJSON +} + +// OpName formats the operand name in a human-readable format. +func (s *StructLog) OpName() string { + return s.Op.String() +} + +// ErrorString formats the log's error as a string. +func (s *StructLog) ErrorString() string { + if s.Err != nil { + return s.Err.Error() + } + return "" +} + +// StructLogger is an EVM state logger and implements EVMLogger. +// +// StructLogger can capture state based on the given Log configuration and also keeps +// a track record of modified storage which is used in reporting snapshots of the +// contract their storage. +type StructLogger struct { + cfg Config + env *vm.EVM + + storage map[common.Address]Storage + logs []StructLog + output []byte + err error + gasLimit uint64 + usedGas uint64 + + interrupt uint32 // Atomic flag to signal execution interruption + reason error // Textual reason for the interruption +} + +// NewStructLogger returns a new logger +func NewStructLogger(cfg *Config) *StructLogger { + logger := &StructLogger{ + storage: make(map[common.Address]Storage), + } + if cfg != nil { + logger.cfg = *cfg + } + return logger +} + +// Reset clears the data held by the logger. +func (l *StructLogger) Reset() { + l.storage = make(map[common.Address]Storage) + l.output = make([]byte, 0) + l.logs = l.logs[:0] + l.err = nil +} + +// CaptureStart implements the EVMLogger interface to initialize the tracing operation. +func (l *StructLogger) CaptureStart(env *vm.EVM, from common.Address, to common.Address, create bool, input []byte, gas uint64, value *big.Int) { + l.env = env +} + +// CaptureState logs a new structured log message and pushes it out to the environment +// +// CaptureState also tracks SLOAD/SSTORE ops to track storage change. +func (l *StructLogger) CaptureState(pc uint64, op vm.OpCode, gas, cost uint64, scope *vm.ScopeContext, rData []byte, depth int, err error) { + // If tracing was interrupted, set the error and stop + if atomic.LoadUint32(&l.interrupt) > 0 { + l.env.Cancel() + return + } + // check if already accumulated the specified number of logs + if l.cfg.Limit != 0 && l.cfg.Limit <= len(l.logs) { + return + } + + memory := scope.Memory + stack := scope.Stack + contract := scope.Contract + // Copy a snapshot of the current memory state to a new buffer + var mem []byte + if l.cfg.EnableMemory { + mem = make([]byte, len(memory.Data())) + copy(mem, memory.Data()) + } + // Copy a snapshot of the current stack state to a new buffer + var stck []uint256.Int + if !l.cfg.DisableStack { + stck = make([]uint256.Int, len(stack.Data())) + for i, item := range stack.Data() { + stck[i] = item + } + } + stackData := stack.Data() + stackLen := len(stackData) + // Copy a snapshot of the current storage to a new container + var storage Storage + if !l.cfg.DisableStorage && (op == vm.SLOAD || op == vm.SSTORE) { + // initialise new changed values storage container for this contract + // if not present. + if l.storage[contract.Address()] == nil { + l.storage[contract.Address()] = make(Storage) + } + // capture SLOAD opcodes and record the read entry in the local storage + if op == vm.SLOAD && stackLen >= 1 { + var ( + address = common.Hash(stackData[stackLen-1].Bytes32()) + value = l.env.StateDB.GetState(contract.Address(), address) + ) + l.storage[contract.Address()][address] = value + storage = l.storage[contract.Address()].Copy() + } else if op == vm.SSTORE && stackLen >= 2 { + // capture SSTORE opcodes and record the written entry in the local storage. + var ( + value = common.Hash(stackData[stackLen-2].Bytes32()) + address = common.Hash(stackData[stackLen-1].Bytes32()) + ) + l.storage[contract.Address()][address] = value + storage = l.storage[contract.Address()].Copy() + } + } + var rdata []byte + if l.cfg.EnableReturnData { + rdata = make([]byte, len(rData)) + copy(rdata, rData) + } + // create a new snapshot of the EVM. + log := StructLog{pc, op, gas, cost, mem, memory.Len(), stck, rdata, storage, depth, l.env.StateDB.GetRefund(), err} + l.logs = append(l.logs, log) +} + +// CaptureFault implements the EVMLogger interface to trace an execution fault +// while running an opcode. +func (l *StructLogger) CaptureFault(pc uint64, op vm.OpCode, gas, cost uint64, scope *vm.ScopeContext, depth int, err error) { +} + +// CaptureEnd is called after the call finishes to finalize the tracing. +func (l *StructLogger) CaptureEnd(output []byte, gasUsed uint64, t time.Duration, err error) { + l.output = output + l.err = err + if l.cfg.Debug { + fmt.Printf("%#x\n", output) + if err != nil { + fmt.Printf(" error: %v\n", err) + } + } +} + +func (l *StructLogger) CaptureEnter(typ vm.OpCode, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) { +} + +func (l *StructLogger) CaptureExit(output []byte, gasUsed uint64, err error) { +} + +func (l *StructLogger) GetResult() (json.RawMessage, error) { + // Tracing aborted + if l.reason != nil { + return nil, l.reason + } + failed := l.err != nil + returnData := common.CopyBytes(l.output) + // Return data when successful and revert reason when reverted, otherwise empty. + returnVal := fmt.Sprintf("%x", returnData) + if failed && l.err != vm.ErrExecutionReverted { + returnVal = "" + } + return json.Marshal(&ExecutionResult{ + Gas: l.usedGas, + Failed: failed, + ReturnValue: returnVal, + StructLogs: formatLogs(l.StructLogs()), + }) +} + +// Stop terminates execution of the tracer at the first opportune moment. +func (l *StructLogger) Stop(err error) { + l.reason = err + atomic.StoreUint32(&l.interrupt, 1) +} + +func (l *StructLogger) CaptureTxStart(gasLimit uint64) { + l.gasLimit = gasLimit +} + +func (l *StructLogger) CaptureTxEnd(restGas uint64) { + l.usedGas = l.gasLimit - restGas +} + +// StructLogs returns the captured log entries. +func (l *StructLogger) StructLogs() []StructLog { return l.logs } + +// Error returns the VM error captured by the trace. +func (l *StructLogger) Error() error { return l.err } + +// Output returns the VM return value captured by the trace. +func (l *StructLogger) Output() []byte { return l.output } + +// WriteTrace writes a formatted trace to the given writer +func WriteTrace(writer io.Writer, logs []StructLog) { + for _, log := range logs { + fmt.Fprintf(writer, "%-16spc=%08d gas=%v cost=%v", log.Op, log.Pc, log.Gas, log.GasCost) + if log.Err != nil { + fmt.Fprintf(writer, " ERROR: %v", log.Err) + } + fmt.Fprintln(writer) + + if len(log.Stack) > 0 { + fmt.Fprintln(writer, "Stack:") + for i := len(log.Stack) - 1; i >= 0; i-- { + fmt.Fprintf(writer, "%08d %s\n", len(log.Stack)-i-1, log.Stack[i].Hex()) + } + } + if len(log.Memory) > 0 { + fmt.Fprintln(writer, "Memory:") + fmt.Fprint(writer, hex.Dump(log.Memory)) + } + if len(log.Storage) > 0 { + fmt.Fprintln(writer, "Storage:") + for h, item := range log.Storage { + fmt.Fprintf(writer, "%x: %x\n", h, item) + } + } + if len(log.ReturnData) > 0 { + fmt.Fprintln(writer, "ReturnData:") + fmt.Fprint(writer, hex.Dump(log.ReturnData)) + } + fmt.Fprintln(writer) + } +} + +// WriteLogs writes vm logs in a readable format to the given writer +func WriteLogs(writer io.Writer, logs []*types.Log) { + for _, log := range logs { + fmt.Fprintf(writer, "LOG%d: %x bn=%d txi=%x\n", len(log.Topics), log.Address, log.BlockNumber, log.TxIndex) + + for i, topic := range log.Topics { + fmt.Fprintf(writer, "%08d %x\n", i, topic) + } + + fmt.Fprint(writer, hex.Dump(log.Data)) + fmt.Fprintln(writer) + } +} + +type mdLogger struct { + out io.Writer + cfg *Config + env *vm.EVM +} + +// NewMarkdownLogger creates a logger which outputs information in a format adapted +// for human readability, and is also a valid markdown table +func NewMarkdownLogger(cfg *Config, writer io.Writer) *mdLogger { + l := &mdLogger{out: writer, cfg: cfg} + if l.cfg == nil { + l.cfg = &Config{} + } + return l +} + +func (t *mdLogger) CaptureStart(env *vm.EVM, from common.Address, to common.Address, create bool, input []byte, gas uint64, value *big.Int) { + t.env = env + if !create { + fmt.Fprintf(t.out, "From: `%v`\nTo: `%v`\nData: `%#x`\nGas: `%d`\nValue `%v` wei\n", + from.String(), to.String(), + input, gas, value) + } else { + fmt.Fprintf(t.out, "From: `%v`\nCreate at: `%v`\nData: `%#x`\nGas: `%d`\nValue `%v` wei\n", + from.String(), to.String(), + input, gas, value) + } + + fmt.Fprintf(t.out, ` +| Pc | Op | Cost | Stack | RStack | Refund | +|-------|-------------|------|-----------|-----------|---------| +`) +} + +// CaptureState also tracks SLOAD/SSTORE ops to track storage change. +func (t *mdLogger) CaptureState(pc uint64, op vm.OpCode, gas, cost uint64, scope *vm.ScopeContext, rData []byte, depth int, err error) { + stack := scope.Stack + fmt.Fprintf(t.out, "| %4d | %10v | %3d |", pc, op, cost) + + if !t.cfg.DisableStack { + // format stack + var a []string + for _, elem := range stack.Data() { + a = append(a, elem.Hex()) + } + b := fmt.Sprintf("[%v]", strings.Join(a, ",")) + fmt.Fprintf(t.out, "%10v |", b) + } + fmt.Fprintf(t.out, "%10v |", t.env.StateDB.GetRefund()) + fmt.Fprintln(t.out, "") + if err != nil { + fmt.Fprintf(t.out, "Error: %v\n", err) + } +} + +func (t *mdLogger) CaptureFault(pc uint64, op vm.OpCode, gas, cost uint64, scope *vm.ScopeContext, depth int, err error) { + fmt.Fprintf(t.out, "\nError: at pc=%d, op=%v: %v\n", pc, op, err) +} + +func (t *mdLogger) CaptureEnd(output []byte, gasUsed uint64, tm time.Duration, err error) { + fmt.Fprintf(t.out, "\nOutput: `%#x`\nConsumed gas: `%d`\nError: `%v`\n", + output, gasUsed, err) +} + +func (t *mdLogger) CaptureEnter(typ vm.OpCode, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) { +} + +func (t *mdLogger) CaptureExit(output []byte, gasUsed uint64, err error) {} + +func (*mdLogger) CaptureTxStart(gasLimit uint64) {} + +func (*mdLogger) CaptureTxEnd(restGas uint64) {} + +// ExecutionResult groups all structured logs emitted by the EVM +// while replaying a transaction in debug mode as well as transaction +// execution status, the amount of gas used and the return value +type ExecutionResult struct { + Gas uint64 `json:"gas"` + Failed bool `json:"failed"` + ReturnValue string `json:"returnValue"` + StructLogs []StructLogRes `json:"structLogs"` +} + +// StructLogRes stores a structured log emitted by the EVM while replaying a +// transaction in debug mode +type StructLogRes struct { + Pc uint64 `json:"pc"` + Op string `json:"op"` + Gas uint64 `json:"gas"` + GasCost uint64 `json:"gasCost"` + Depth int `json:"depth"` + Error string `json:"error,omitempty"` + Stack *[]string `json:"stack,omitempty"` + Memory *[]string `json:"memory,omitempty"` + Storage *map[string]string `json:"storage,omitempty"` + RefundCounter uint64 `json:"refund,omitempty"` +} + +// formatLogs formats EVM returned structured logs for json output +func formatLogs(logs []StructLog) []StructLogRes { + formatted := make([]StructLogRes, len(logs)) + for index, trace := range logs { + formatted[index] = StructLogRes{ + Pc: trace.Pc, + Op: trace.Op.String(), + Gas: trace.Gas, + GasCost: trace.GasCost, + Depth: trace.Depth, + Error: trace.ErrorString(), + RefundCounter: trace.RefundCounter, + } + if trace.Stack != nil { + stack := make([]string, len(trace.Stack)) + for i, stackValue := range trace.Stack { + stack[i] = stackValue.Hex() + } + formatted[index].Stack = &stack + } + if trace.Memory != nil { + memory := make([]string, 0, (len(trace.Memory)+31)/32) + for i := 0; i+32 <= len(trace.Memory); i += 32 { + memory = append(memory, fmt.Sprintf("%x", trace.Memory[i:i+32])) + } + formatted[index].Memory = &memory + } + if trace.Storage != nil { + storage := make(map[string]string) + for i, storageValue := range trace.Storage { + storage[fmt.Sprintf("%x", i)] = fmt.Sprintf("%x", storageValue) + } + formatted[index].Storage = &storage + } + } + return formatted +} diff --git a/x/evm/tracers/logger/logger_json.go b/x/evm/tracers/logger/logger_json.go new file mode 100644 index 00000000..fb5a4e10 --- /dev/null +++ b/x/evm/tracers/logger/logger_json.go @@ -0,0 +1,104 @@ +// Copyright 2021 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package logger + +import ( + "encoding/json" + "io" + "math/big" + "time" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/common/math" + "github.com/stratosnet/stratos-chain/x/evm/vm" +) + +type JSONLogger struct { + encoder *json.Encoder + cfg *Config + env *vm.EVM +} + +// NewJSONLogger creates a new EVM tracer that prints execution steps as JSON objects +// into the provided stream. +func NewJSONLogger(cfg *Config, writer io.Writer) *JSONLogger { + l := &JSONLogger{encoder: json.NewEncoder(writer), cfg: cfg} + if l.cfg == nil { + l.cfg = &Config{} + } + return l +} + +func (l *JSONLogger) CaptureStart(env *vm.EVM, from, to common.Address, create bool, input []byte, gas uint64, value *big.Int) { + l.env = env +} + +func (l *JSONLogger) CaptureFault(pc uint64, op vm.OpCode, gas uint64, cost uint64, scope *vm.ScopeContext, depth int, err error) { + // TODO: Add rData to this interface as well + l.CaptureState(pc, op, gas, cost, scope, nil, depth, err) +} + +// CaptureState outputs state information on the logger. +func (l *JSONLogger) CaptureState(pc uint64, op vm.OpCode, gas, cost uint64, scope *vm.ScopeContext, rData []byte, depth int, err error) { + memory := scope.Memory + stack := scope.Stack + + log := StructLog{ + Pc: pc, + Op: op, + Gas: gas, + GasCost: cost, + MemorySize: memory.Len(), + Depth: depth, + RefundCounter: l.env.StateDB.GetRefund(), + Err: err, + } + if l.cfg.EnableMemory { + log.Memory = memory.Data() + } + if !l.cfg.DisableStack { + log.Stack = stack.Data() + } + if l.cfg.EnableReturnData { + log.ReturnData = rData + } + l.encoder.Encode(log) +} + +// CaptureEnd is triggered at end of execution. +func (l *JSONLogger) CaptureEnd(output []byte, gasUsed uint64, t time.Duration, err error) { + type endLog struct { + Output string `json:"output"` + GasUsed math.HexOrDecimal64 `json:"gasUsed"` + Time time.Duration `json:"time"` + Err string `json:"error,omitempty"` + } + var errMsg string + if err != nil { + errMsg = err.Error() + } + l.encoder.Encode(endLog{common.Bytes2Hex(output), math.HexOrDecimal64(gasUsed), t, errMsg}) +} + +func (l *JSONLogger) CaptureEnter(typ vm.OpCode, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) { +} + +func (l *JSONLogger) CaptureExit(output []byte, gasUsed uint64, err error) {} + +func (l *JSONLogger) CaptureTxStart(gasLimit uint64) {} + +func (l *JSONLogger) CaptureTxEnd(restGas uint64) {} diff --git a/x/evm/tracers/native/4byte.go b/x/evm/tracers/native/4byte.go index 34e608bf..6f5081db 100644 --- a/x/evm/tracers/native/4byte.go +++ b/x/evm/tracers/native/4byte.go @@ -24,8 +24,8 @@ import ( "time" "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/vm" - "github.com/ethereum/go-ethereum/eth/tracers" + "github.com/stratosnet/stratos-chain/x/evm/tracers" + "github.com/stratosnet/stratos-chain/x/evm/vm" ) func init() { @@ -37,14 +37,15 @@ func init() { // a reversed signature can be matched against the size of the data. // // Example: -// > debug.traceTransaction( "0x214e597e35da083692f5386141e69f47e973b2c56e7a8073b1ea08fd7571e9de", {tracer: "4byteTracer"}) -// { -// 0x27dc297e-128: 1, -// 0x38cc4831-0: 2, -// 0x524f3889-96: 1, -// 0xadf59f99-288: 1, -// 0xc281d19e-0: 1 -// } +// +// > debug.traceTransaction( "0x214e597e35da083692f5386141e69f47e973b2c56e7a8073b1ea08fd7571e9de", {tracer: "4byteTracer"}) +// { +// 0x27dc297e-128: 1, +// 0x38cc4831-0: 2, +// 0x524f3889-96: 1, +// 0xadf59f99-288: 1, +// 0xc281d19e-0: 1 +// } type fourByteTracer struct { env *vm.EVM ids map[string]int // ids aggregates the 4byte ids found diff --git a/x/evm/tracers/native/call.go b/x/evm/tracers/native/call.go index 7af0e658..a224e244 100644 --- a/x/evm/tracers/native/call.go +++ b/x/evm/tracers/native/call.go @@ -26,8 +26,8 @@ import ( "time" "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/vm" - "github.com/ethereum/go-ethereum/eth/tracers" + "github.com/stratosnet/stratos-chain/x/evm/tracers" + "github.com/stratosnet/stratos-chain/x/evm/vm" ) func init() { diff --git a/x/evm/tracers/native/noop.go b/x/evm/tracers/native/noop.go index c252b240..fa7f73be 100644 --- a/x/evm/tracers/native/noop.go +++ b/x/evm/tracers/native/noop.go @@ -22,8 +22,8 @@ import ( "time" "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/vm" - "github.com/ethereum/go-ethereum/eth/tracers" + "github.com/stratosnet/stratos-chain/x/evm/tracers" + "github.com/stratosnet/stratos-chain/x/evm/vm" ) func init() { diff --git a/x/evm/tracers/native/prestate.go b/x/evm/tracers/native/prestate.go index b513f383..83279e1f 100644 --- a/x/evm/tracers/native/prestate.go +++ b/x/evm/tracers/native/prestate.go @@ -24,9 +24,9 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/eth/tracers" + "github.com/stratosnet/stratos-chain/x/evm/tracers" + "github.com/stratosnet/stratos-chain/x/evm/vm" ) func init() { diff --git a/x/evm/tracers/native/revertreason.go b/x/evm/tracers/native/revertreason.go index d09b8610..db9fbcf4 100644 --- a/x/evm/tracers/native/revertreason.go +++ b/x/evm/tracers/native/revertreason.go @@ -25,9 +25,9 @@ import ( "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/eth/tracers" + "github.com/stratosnet/stratos-chain/x/evm/tracers" + "github.com/stratosnet/stratos-chain/x/evm/vm" ) func init() { diff --git a/x/evm/tracers/native/tracer.go b/x/evm/tracers/native/tracer.go index fda3e659..468e44b3 100644 --- a/x/evm/tracers/native/tracer.go +++ b/x/evm/tracers/native/tracer.go @@ -27,9 +27,11 @@ Aside from implementing the tracer, it also needs to register itself, using the Example: ```golang -func init() { - register("noopTracerNative", newNoopTracer) -} + + func init() { + register("noopTracerNative", newNoopTracer) + } + ``` */ package native @@ -38,7 +40,7 @@ import ( "encoding/json" "errors" - "github.com/ethereum/go-ethereum/eth/tracers" + "github.com/stratosnet/stratos-chain/x/evm/tracers" ) // InitTracer retrieves the Go transaction tracers included in go-ethereum. diff --git a/x/evm/types/tracer.go b/x/evm/tracers/tracers.go similarity index 64% rename from x/evm/types/tracer.go rename to x/evm/tracers/tracers.go index ea22fd55..4f2f9d9a 100644 --- a/x/evm/types/tracer.go +++ b/x/evm/tracers/tracers.go @@ -1,6 +1,25 @@ -package types +// Copyright 2017 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +// Package tracers is a manager for transaction tracing engines. +package tracers import ( + "encoding/json" + "errors" "fmt" "math/big" "os" @@ -8,11 +27,68 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core" - "github.com/ethereum/go-ethereum/core/vm" - "github.com/ethereum/go-ethereum/eth/tracers/logger" "github.com/ethereum/go-ethereum/params" + + "github.com/stratosnet/stratos-chain/x/evm/tracers/logger" + "github.com/stratosnet/stratos-chain/x/evm/vm" ) +type TraceConfig struct { + *logger.Config + Tracer *string + Timeout *string + Reexec *uint64 + // Config specific to given tracer. Note struct logger + // config are historically embedded in main object. + TracerConfig json.RawMessage +} + +// Context contains some contextual infos for a transaction execution that is not +// available from within the EVM object. +type Context struct { + BlockHash common.Hash // Hash of the block the tx is contained within (zero if dangling tx or call) + TxIndex int // Index of the transaction within a block (zero if dangling tx or call) + TxHash common.Hash // Hash of the transaction being traced (zero if dangling call) +} + +// Tracer interface extends vm.EVMLogger and additionally +// allows collecting the tracing result. +type Tracer interface { + vm.EVMLogger + GetResult() (json.RawMessage, error) + // Stop terminates execution of the tracer at the first opportune moment. + Stop(err error) +} + +type lookupFunc func(string, *Context, json.RawMessage) (Tracer, error) + +var ( + lookups []lookupFunc +) + +// RegisterLookup registers a method as a lookup for tracers, meaning that +// users can invoke a named tracer through that lookup. If 'wildcard' is true, +// then the lookup will be placed last. This is typically meant for interpreted +// engines (js) which can evaluate dynamic user-supplied code. +func RegisterLookup(wildcard bool, lookup lookupFunc) { + if wildcard { + lookups = append(lookups, lookup) + } else { + lookups = append([]lookupFunc{lookup}, lookups...) + } +} + +// New returns a new instance of a tracer, by iterating through the +// registered lookups. +func New(code string, ctx *Context, cfg json.RawMessage) (Tracer, error) { + for _, lookup := range lookups { + if tracer, err := lookup(code, ctx, cfg); err == nil { + return tracer, nil + } + } + return nil, errors.New("tracer not found") +} + const ( TracerAccessList = "access_list" TracerJSON = "json" diff --git a/x/evm/types/codec.go b/x/evm/types/codec.go index 0e0af3cd..a6e7889c 100644 --- a/x/evm/types/codec.go +++ b/x/evm/types/codec.go @@ -6,6 +6,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/types/msgservice" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" "github.com/gogo/protobuf/proto" ) @@ -15,6 +16,11 @@ type ( ExtensionOptionsEthereumTxI interface{} ) +// RegisterLegacyAminoCodec RegisterCodec registers concrete types on codec +func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { + cdc.RegisterConcrete(&UpdateImplmentationProposal{}, "cosmos-sdk/UpdateImplmentationProposal", nil) +} + // RegisterInterfaces registers the client interfaces to protobuf Any. func RegisterInterfaces(registry codectypes.InterfaceRegistry) { registry.RegisterImplementations( @@ -33,6 +39,12 @@ func RegisterInterfaces(registry codectypes.InterfaceRegistry) { &AccessListTx{}, &LegacyTx{}, ) + // for gov + registry.RegisterInterface( + "cosmos.gov.v1beta1.Content", + (*govtypes.Content)(nil), + &UpdateImplmentationProposal{}, + ) msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) } diff --git a/x/evm/types/contracts.go b/x/evm/types/contracts.go new file mode 100644 index 00000000..6fa1f154 --- /dev/null +++ b/x/evm/types/contracts.go @@ -0,0 +1,23 @@ +package types + +import ( + "strings" + + "github.com/ethereum/go-ethereum/accounts/abi" +) + +const ( + TransparentUpgradableProxyABI = "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"changeAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}]" +) + +var ( + TransparentUpgradableProxyBin = "0x608060405260405162000ed038038062000ed08339810160408190526200002691620004a0565b828162000036828260006200004d565b50620000449050826200008a565b505050620005d3565b6200005883620000e5565b600082511180620000665750805b1562000085576200008383836200012760201b620001691760201c565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f620000b562000156565b604080516001600160a01b03928316815291841660208301520160405180910390a1620000e2816200018f565b50565b620000f08162000244565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606200014f838360405180606001604052806027815260200162000ea960279139620002f8565b9392505050565b60006200018060008051602062000e8983398151915260001b6200037760201b620001951760201c565b546001600160a01b0316919050565b6001600160a01b038116620001fa5760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b806200022360008051602062000e8983398151915260001b6200037760201b620001951760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b6200025a816200037a60201b620001981760201c565b620002be5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401620001f1565b80620002237f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b6200037760201b620001951760201c565b6060600080856001600160a01b03168560405162000317919062000580565b600060405180830381855af49150503d806000811462000354576040519150601f19603f3d011682016040523d82523d6000602084013e62000359565b606091505b5090925090506200036d8683838762000389565b9695505050505050565b90565b6001600160a01b03163b151590565b60608315620003fd578251600003620003f5576001600160a01b0385163b620003f55760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401620001f1565b508162000409565b62000409838362000411565b949350505050565b815115620004225781518083602001fd5b8060405162461bcd60e51b8152600401620001f191906200059e565b80516001600160a01b03811681146200045657600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b838110156200048e57818101518382015260200162000474565b83811115620000835750506000910152565b600080600060608486031215620004b657600080fd5b620004c1846200043e565b9250620004d1602085016200043e565b60408501519092506001600160401b0380821115620004ef57600080fd5b818601915086601f8301126200050457600080fd5b8151818111156200051957620005196200045b565b604051601f8201601f19908116603f011681019083821181831017156200054457620005446200045b565b816040528281528960208487010111156200055e57600080fd5b6200057183602083016020880162000471565b80955050505050509250925092565b600082516200059481846020870162000471565b9190910192915050565b6020815260008251806020840152620005bf81604085016020870162000471565b601f01601f19169190910160400192915050565b6108a680620005e36000396000f3fe60806040523661001357610011610017565b005b6100115b61001f6101a7565b6001600160a01b0316330361015f5760606001600160e01b0319600035166364d3180d60e11b810161005a576100536101da565b9150610157565b63587086bd60e11b6001600160e01b031982160161007a57610053610231565b63070d7c6960e41b6001600160e01b031982160161009a57610053610277565b621eb96f60e61b6001600160e01b03198216016100b9576100536102a8565b63a39f25e560e01b6001600160e01b03198216016100d9576100536102e8565b60405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b815160208301f35b6101676102fc565b565b606061018e838360405180606001604052806027815260200161084a6027913961030c565b9392505050565b90565b6001600160a01b03163b151590565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b60606101e4610384565b60006101f33660048184610695565b81019061020091906106db565b905061021d8160405180602001604052806000815250600061038f565b505060408051602081019091526000815290565b60606000806102433660048184610695565b810190610250919061070c565b915091506102608282600161038f565b604051806020016040528060008152509250505090565b6060610281610384565b60006102903660048184610695565b81019061029d91906106db565b905061021d816103bb565b60606102b2610384565b60006102bc6101a7565b604080516001600160a01b03831660208201529192500160405160208183030381529060405291505090565b60606102f2610384565b60006102bc610412565b610167610307610412565b610421565b6060600080856001600160a01b03168560405161032991906107fa565b600060405180830381855af49150503d8060008114610364576040519150601f19603f3d011682016040523d82523d6000602084013e610369565b606091505b509150915061037a86838387610445565b9695505050505050565b341561016757600080fd5b610398836104c6565b6000825111806103a55750805b156103b6576103b48383610169565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6103e46101a7565b604080516001600160a01b03928316815291841660208301520160405180910390a161040f81610506565b50565b600061041c6105af565b905090565b3660008037600080366000845af43d6000803e808015610440573d6000f35b3d6000fd5b606083156104b45782516000036104ad576001600160a01b0385163b6104ad5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161014e565b50816104be565b6104be83836105d7565b949350505050565b6104cf81610601565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6001600160a01b03811661056b5760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b606482015260840161014e565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc6101cb565b8151156105e75781518083602001fd5b8060405162461bcd60e51b815260040161014e9190610816565b6001600160a01b0381163b61066e5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b606482015260840161014e565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61058e565b600080858511156106a557600080fd5b838611156106b257600080fd5b5050820193919092039150565b80356001600160a01b03811681146106d657600080fd5b919050565b6000602082840312156106ed57600080fd5b61018e826106bf565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561071f57600080fd5b610728836106bf565b9150602083013567ffffffffffffffff8082111561074557600080fd5b818501915085601f83011261075957600080fd5b81358181111561076b5761076b6106f6565b604051601f8201601f19908116603f01168101908382118183101715610793576107936106f6565b816040528281528860208487010111156107ac57600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b60005b838110156107e95781810151838201526020016107d1565b838111156103b45750506000910152565b6000825161080c8184602087016107ce565b9190910192915050565b60208152600082518060208401526108358160408501602087016107ce565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122081bdb2c4d7ec00ca91134719260d0c14c35df5f50dba8a8c2c59a0ef40e1066064736f6c634300080f0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564" +) + +func EncodeContractFunc(contractsABI string, name string, params ...interface{}) ([]byte, error) { + parsedABI, err := abi.JSON(strings.NewReader(contractsABI)) + if err != nil { + return nil, err + } + return parsedABI.Pack(name, params...) +} diff --git a/x/evm/types/evm.pb.go b/x/evm/types/evm.pb.go index dc6e18f2..b6d46461 100644 --- a/x/evm/types/evm.pb.go +++ b/x/evm/types/evm.pb.go @@ -36,8 +36,9 @@ type Params struct { // extra eips defines the additional EIPs for the vm.Config ExtraEIPs []int64 `protobuf:"varint,4,rep,packed,name=extra_eips,json=extraEips,proto3" json:"extra_eips,omitempty" yaml:"extra_eips"` // chain config defines the EVM chain configuration parameters - ChainConfig ChainConfig `protobuf:"bytes,5,opt,name=chain_config,json=chainConfig,proto3" json:"chain_config" yaml:"chain_config"` - FeeMarketParams FeeMarketParams `protobuf:"bytes,6,opt,name=fee_market_params,json=feeMarketParams,proto3" json:"fee_market_params" yaml:"fee_market_params"` + ChainConfig ChainConfig `protobuf:"bytes,5,opt,name=chain_config,json=chainConfig,proto3" json:"chain_config" yaml:"chain_config"` + FeeMarketParams FeeMarketParams `protobuf:"bytes,6,opt,name=fee_market_params,json=feeMarketParams,proto3" json:"fee_market_params" yaml:"fee_market_params"` + ProxyProposalParams ProxyProposalParams `protobuf:"bytes,7,opt,name=proxy_proposal_params,json=proxyProposalParams,proto3" json:"proxy_proposal_params" yaml:"proxy_proposal_params"` } func (m *Params) Reset() { *m = Params{} } @@ -115,6 +116,13 @@ func (m *Params) GetFeeMarketParams() FeeMarketParams { return FeeMarketParams{} } +func (m *Params) GetProxyProposalParams() ProxyProposalParams { + if m != nil { + return m.ProxyProposalParams + } + return ProxyProposalParams{} +} + // ChainConfig defines the Ethereum ChainConfig parameters using *sdk.Int values // instead of *big.Int. type ChainConfig struct { @@ -730,6 +738,143 @@ func (m *FeeMarketParams) GetEnableHeight() int64 { return 0 } +type ProxyContractInitState struct { + // height where it should be applied + Height uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` + // address of proxy contract + Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` + // solidity compiled code + Bin string `protobuf:"bytes,3,opt,name=bin,proto3" json:"bin,omitempty"` + // initializer method data + Init string `protobuf:"bytes,4,opt,name=init,proto3" json:"init,omitempty"` +} + +func (m *ProxyContractInitState) Reset() { *m = ProxyContractInitState{} } +func (m *ProxyContractInitState) String() string { return proto.CompactTextString(m) } +func (*ProxyContractInitState) ProtoMessage() {} +func (*ProxyContractInitState) Descriptor() ([]byte, []int) { + return fileDescriptor_6ee18d4714e9d670, []int{9} +} +func (m *ProxyContractInitState) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ProxyContractInitState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ProxyContractInitState.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 *ProxyContractInitState) XXX_Merge(src proto.Message) { + xxx_messageInfo_ProxyContractInitState.Merge(m, src) +} +func (m *ProxyContractInitState) XXX_Size() int { + return m.Size() +} +func (m *ProxyContractInitState) XXX_DiscardUnknown() { + xxx_messageInfo_ProxyContractInitState.DiscardUnknown(m) +} + +var xxx_messageInfo_ProxyContractInitState proto.InternalMessageInfo + +func (m *ProxyContractInitState) GetHeight() uint64 { + if m != nil { + return m.Height + } + return 0 +} + +func (m *ProxyContractInitState) GetAddress() string { + if m != nil { + return m.Address + } + return "" +} + +func (m *ProxyContractInitState) GetBin() string { + if m != nil { + return m.Bin + } + return "" +} + +func (m *ProxyContractInitState) GetInit() string { + if m != nil { + return m.Init + } + return "" +} + +// Params defines default proxy addresses for futur gov contracts update +type ProxyProposalParams struct { + // consensus address as msg.sender, used to define admin authority, could be simply zero address or custom + // basically it is an owner of evrything. resposible to add proxies and update proxies implementations + ConsensusAddress string `protobuf:"bytes,1,opt,name=consensus_address,json=consensusAddress,proto3" json:"consensus_address,omitempty"` + // proxy owner who basically the owner of proxy contract (for Ownable purpose, not admin) + ProxyOwnerAddress string `protobuf:"bytes,2,opt,name=proxy_owner_address,json=proxyOwnerAddress,proto3" json:"proxy_owner_address,omitempty"` + // proxy contracts name per address reservations + Contracts map[string]*ProxyContractInitState `protobuf:"bytes,3,rep,name=contracts,proto3" json:"contracts,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (m *ProxyProposalParams) Reset() { *m = ProxyProposalParams{} } +func (m *ProxyProposalParams) String() string { return proto.CompactTextString(m) } +func (*ProxyProposalParams) ProtoMessage() {} +func (*ProxyProposalParams) Descriptor() ([]byte, []int) { + return fileDescriptor_6ee18d4714e9d670, []int{10} +} +func (m *ProxyProposalParams) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ProxyProposalParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ProxyProposalParams.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 *ProxyProposalParams) XXX_Merge(src proto.Message) { + xxx_messageInfo_ProxyProposalParams.Merge(m, src) +} +func (m *ProxyProposalParams) XXX_Size() int { + return m.Size() +} +func (m *ProxyProposalParams) XXX_DiscardUnknown() { + xxx_messageInfo_ProxyProposalParams.DiscardUnknown(m) +} + +var xxx_messageInfo_ProxyProposalParams proto.InternalMessageInfo + +func (m *ProxyProposalParams) GetConsensusAddress() string { + if m != nil { + return m.ConsensusAddress + } + return "" +} + +func (m *ProxyProposalParams) GetProxyOwnerAddress() string { + if m != nil { + return m.ProxyOwnerAddress + } + return "" +} + +func (m *ProxyProposalParams) GetContracts() map[string]*ProxyContractInitState { + if m != nil { + return m.Contracts + } + return nil +} + func init() { proto.RegisterType((*Params)(nil), "stratos.evm.v1.Params") proto.RegisterType((*ChainConfig)(nil), "stratos.evm.v1.ChainConfig") @@ -740,117 +885,132 @@ func init() { proto.RegisterType((*AccessTuple)(nil), "stratos.evm.v1.AccessTuple") proto.RegisterType((*TraceConfig)(nil), "stratos.evm.v1.TraceConfig") proto.RegisterType((*FeeMarketParams)(nil), "stratos.evm.v1.FeeMarketParams") + proto.RegisterType((*ProxyContractInitState)(nil), "stratos.evm.v1.ProxyContractInitState") + proto.RegisterType((*ProxyProposalParams)(nil), "stratos.evm.v1.ProxyProposalParams") + proto.RegisterMapType((map[string]*ProxyContractInitState)(nil), "stratos.evm.v1.ProxyProposalParams.ContractsEntry") } func init() { proto.RegisterFile("stratos/evm/v1/evm.proto", fileDescriptor_6ee18d4714e9d670) } var fileDescriptor_6ee18d4714e9d670 = []byte{ - // 1677 bytes of a gzipped FileDescriptorProto + // 1867 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x58, 0x4f, 0x6f, 0x1b, 0xb9, - 0x15, 0xb7, 0x2d, 0xd9, 0x1a, 0x51, 0xb2, 0x34, 0xa6, 0xb5, 0xa9, 0x36, 0x06, 0x3c, 0xc6, 0x14, - 0x68, 0x7d, 0xd8, 0x58, 0xeb, 0x04, 0x46, 0xd3, 0x2d, 0xf6, 0x60, 0xd9, 0xce, 0x46, 0x6e, 0xb2, - 0x35, 0x98, 0x14, 0x05, 0xda, 0xc3, 0x80, 0x9a, 0xa1, 0x47, 0x53, 0xcf, 0x0c, 0x05, 0x92, 0xd2, - 0x4a, 0x45, 0x3f, 0x40, 0x7b, 0xeb, 0xa9, 0xe7, 0x7e, 0x81, 0x7e, 0x89, 0x9e, 0x16, 0x3d, 0xed, - 0xb1, 0xe8, 0x61, 0x50, 0x38, 0x37, 0x1f, 0xf5, 0x09, 0x8a, 0x79,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 0xc6, 0x56, 0x26, 0x5a, 0x70, + 0xbf, 0x46, 0xf5, 0x77, 0x82, 0x26, 0x92, 0xfa, 0x2a, 0xe4, 0xc9, 0x6b, 0xde, 0x91, 0x18, 0xa3, + 0x22, 0x1c, 0xd4, 0x3a, 0x16, 0xc6, 0xf8, 0xa7, 0xa8, 0x18, 0xf1, 0x8e, 0x6c, 0x2c, 0x6e, 0x17, + 0x76, 0x2a, 0x07, 0x6b, 0xf3, 0xd7, 0x8b, 0xd7, 0xbc, 0x43, 0xc0, 0xc1, 0xfd, 0xcf, 0x22, 0x2a, + 0xbc, 0xe6, 0x1d, 0xdc, 0x40, 0x25, 0x1a, 0x04, 0x82, 0x49, 0x69, 0x70, 0x46, 0x22, 0xde, 0x40, + 0xcb, 0x8a, 0xa7, 0xa1, 0xaf, 0xc1, 0xca, 0xc4, 0x48, 0x39, 0x6d, 0x40, 0x15, 0x85, 0x2e, 0x5b, + 0x25, 0x30, 0xc6, 0x07, 0xa8, 0x0a, 0xeb, 0xf2, 0x92, 0x6e, 0xdc, 0x66, 0x02, 0x9a, 0x60, 0xb1, + 0x59, 0xbf, 0xc9, 0x9c, 0x0a, 0xe8, 0xbf, 0x06, 0x35, 0x99, 0x16, 0xf0, 0xe7, 0xa8, 0xa4, 0xfa, + 0xba, 0xd5, 0xe8, 0xf6, 0xb6, 0x76, 0x93, 0x39, 0x75, 0x35, 0x59, 0x64, 0xde, 0x49, 0xc8, 0xb2, + 0xea, 0x43, 0x47, 0xd9, 0x43, 0x96, 0xea, 0x7b, 0x61, 0x12, 0xb0, 0x3e, 0x74, 0xa6, 0x62, 0x73, + 0xfd, 0x26, 0x73, 0xec, 0x29, 0xf7, 0x56, 0x6e, 0x23, 0x25, 0xd5, 0x87, 0x01, 0xfe, 0x1c, 0x21, + 0x3d, 0x25, 0x60, 0xd0, 0x0d, 0x68, 0xe5, 0x26, 0x73, 0xca, 0xa0, 0x05, 0xec, 0xc9, 0x10, 0xbb, + 0x68, 0x49, 0x63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0x59, 0x01, 0x55, 0xde, 0x09, 0xea, 0x33, + 0x73, 0xab, 0xcd, 0x2b, 0x35, 0x17, 0x85, 0xa1, 0x30, 0x52, 0xce, 0xad, 0xc2, 0x98, 0xf1, 0xae, + 0x32, 0x7b, 0x69, 0x24, 0xe6, 0x11, 0x82, 0xb1, 0x3e, 0xf3, 0x21, 0x89, 0x45, 0x62, 0x24, 0x7c, + 0x88, 0x56, 0x82, 0x50, 0xc2, 0xd3, 0x46, 0x2a, 0x6a, 0x2e, 0x5e, 0x56, 0xd3, 0xbe, 0xc9, 0x9c, + 0xaa, 0x31, 0xbc, 0xcd, 0xf5, 0x64, 0x46, 0xc2, 0xbf, 0x44, 0xf5, 0x49, 0x18, 0xcc, 0x16, 0x72, + 0x63, 0x35, 0xf1, 0x4d, 0xe6, 0xd4, 0xc6, 0xae, 0x60, 0x21, 0x73, 0x72, 0xfe, 0x9d, 0x03, 0xd6, + 0xee, 0x76, 0xa0, 0xf4, 0x2c, 0xa2, 0x85, 0x5c, 0x1b, 0x85, 0x71, 0xa8, 0xa0, 0xd4, 0x96, 0x88, + 0x16, 0xf0, 0x2f, 0x50, 0x99, 0xf7, 0x98, 0x10, 0x61, 0xc0, 0x24, 0xf4, 0xfc, 0x1f, 0x7e, 0x17, + 0x91, 0x89, 0x77, 0xbe, 0x34, 0xf3, 0x68, 0x8b, 0x59, 0xcc, 0xc5, 0x00, 0x1a, 0xb7, 0x59, 0x9a, + 0x36, 0xbc, 0x01, 0x3d, 0x99, 0x91, 0x70, 0x13, 0x61, 0x13, 0x26, 0x98, 0xea, 0x8a, 0xc4, 0x83, + 0xbd, 0x5f, 0x85, 0x58, 0xd8, 0x81, 0xda, 0x4a, 0xc0, 0x78, 0x42, 0x15, 0x25, 0xb7, 0x34, 0x67, + 0x45, 0xab, 0x68, 0x2f, 0x9d, 0x15, 0xad, 0x92, 0x6d, 0x8d, 0x57, 0x6f, 0x66, 0x41, 0xd6, 0x46, + 0xf2, 0x14, 0xbc, 0x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ee, 0x78, 0xab, 0xe2, 0x9f, + 0xa1, 0xd5, 0xfc, 0xe2, 0xc8, 0x12, 0xd9, 0x95, 0xb3, 0xa7, 0x1f, 0xb1, 0xc7, 0x86, 0xd1, 0x09, + 0xb7, 0x8b, 0xf4, 0xa3, 0xd5, 0xe3, 0xef, 0x13, 0x26, 0xbc, 0xd9, 0x09, 0xad, 0x82, 0xe9, 0x9b, + 0xdc, 0x32, 0xf2, 0x3f, 0x47, 0xe5, 0xd1, 0x21, 0x99, 0x9f, 0x7e, 0x79, 0x87, 0x3b, 0xf8, 0x88, + 0x07, 0xf4, 0xee, 0x28, 0x2d, 0xf2, 0x34, 0x51, 0x62, 0x40, 0x26, 0x20, 0x4f, 0x02, 0x54, 0x9b, + 0x35, 0xde, 0xd1, 0x8f, 0x7f, 0x35, 0xdd, 0x8f, 0x2b, 0x07, 0x9f, 0xdd, 0xc9, 0x78, 0x2b, 0xf3, + 0xa6, 0x6f, 0xbf, 0x58, 0x7c, 0xbe, 0xd0, 0x6c, 0x7d, 0x7b, 0xbd, 0xb5, 0xf0, 0xdd, 0xf5, 0xd6, + 0xc2, 0xff, 0xaf, 0xb7, 0x16, 0xfe, 0xf6, 0x61, 0xeb, 0xd1, 0x77, 0x1f, 0xb6, 0x1e, 0xfd, 0xf7, + 0xc3, 0xd6, 0xa3, 0xdf, 0xed, 0x4d, 0x55, 0x80, 0x81, 0x4d, 0x98, 0x1a, 0x0d, 0x9f, 0xc2, 0x8b, + 0x7a, 0xaf, 0x0f, 0xff, 0x20, 0x41, 0x39, 0xb4, 0x97, 0xe1, 0xbf, 0xa1, 0x67, 0xdf, 0x07, 0x00, + 0x00, 0xff, 0xff, 0x22, 0x98, 0x3a, 0x17, 0x5d, 0x12, 0x00, 0x00, } func (m *Params) Marshal() (dAtA []byte, err error) { @@ -873,6 +1033,16 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + { + size, err := m.ProxyProposalParams.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvm(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a { size, err := m.FeeMarketParams.MarshalToSizedBuffer(dAtA[:i]) if err != nil { @@ -894,21 +1064,21 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x2a if len(m.ExtraEIPs) > 0 { - dAtA4 := make([]byte, len(m.ExtraEIPs)*10) - var j3 int + dAtA5 := make([]byte, len(m.ExtraEIPs)*10) + var j4 int for _, num1 := range m.ExtraEIPs { num := uint64(num1) for num >= 1<<7 { - dAtA4[j3] = uint8(uint64(num)&0x7f | 0x80) + dAtA5[j4] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 - j3++ + j4++ } - dAtA4[j3] = uint8(num) - j3++ + dAtA5[j4] = uint8(num) + j4++ } - i -= j3 - copy(dAtA[i:], dAtA4[:j3]) - i = encodeVarintEvm(dAtA, i, uint64(j3)) + i -= j4 + copy(dAtA[i:], dAtA5[:j4]) + i = encodeVarintEvm(dAtA, i, uint64(j4)) i-- dAtA[i] = 0x22 } @@ -1609,6 +1779,118 @@ func (m *FeeMarketParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *ProxyContractInitState) 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 *ProxyContractInitState) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ProxyContractInitState) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Init) > 0 { + i -= len(m.Init) + copy(dAtA[i:], m.Init) + i = encodeVarintEvm(dAtA, i, uint64(len(m.Init))) + i-- + dAtA[i] = 0x22 + } + if len(m.Bin) > 0 { + i -= len(m.Bin) + copy(dAtA[i:], m.Bin) + i = encodeVarintEvm(dAtA, i, uint64(len(m.Bin))) + i-- + dAtA[i] = 0x1a + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintEvm(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0x12 + } + if m.Height != 0 { + i = encodeVarintEvm(dAtA, i, uint64(m.Height)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *ProxyProposalParams) 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 *ProxyProposalParams) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ProxyProposalParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Contracts) > 0 { + for k := range m.Contracts { + v := m.Contracts[k] + baseI := i + if v != nil { + { + size, err := v.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvm(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintEvm(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintEvm(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x1a + } + } + if len(m.ProxyOwnerAddress) > 0 { + i -= len(m.ProxyOwnerAddress) + copy(dAtA[i:], m.ProxyOwnerAddress) + i = encodeVarintEvm(dAtA, i, uint64(len(m.ProxyOwnerAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.ConsensusAddress) > 0 { + i -= len(m.ConsensusAddress) + copy(dAtA[i:], m.ConsensusAddress) + i = encodeVarintEvm(dAtA, i, uint64(len(m.ConsensusAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func encodeVarintEvm(dAtA []byte, offset int, v uint64) int { offset -= sovEvm(v) base := offset @@ -1647,6 +1929,8 @@ func (m *Params) Size() (n int) { n += 1 + l + sovEvm(uint64(l)) l = m.FeeMarketParams.Size() n += 1 + l + sovEvm(uint64(l)) + l = m.ProxyProposalParams.Size() + n += 1 + l + sovEvm(uint64(l)) return n } @@ -1918,6 +2202,60 @@ func (m *FeeMarketParams) Size() (n int) { return n } +func (m *ProxyContractInitState) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Height != 0 { + n += 1 + sovEvm(uint64(m.Height)) + } + l = len(m.Address) + if l > 0 { + n += 1 + l + sovEvm(uint64(l)) + } + l = len(m.Bin) + if l > 0 { + n += 1 + l + sovEvm(uint64(l)) + } + l = len(m.Init) + if l > 0 { + n += 1 + l + sovEvm(uint64(l)) + } + return n +} + +func (m *ProxyProposalParams) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ConsensusAddress) + if l > 0 { + n += 1 + l + sovEvm(uint64(l)) + } + l = len(m.ProxyOwnerAddress) + if l > 0 { + n += 1 + l + sovEvm(uint64(l)) + } + if len(m.Contracts) > 0 { + for k, v := range m.Contracts { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovEvm(uint64(l)) + } + mapEntrySize := 1 + len(k) + sovEvm(uint64(len(k))) + l + n += mapEntrySize + 1 + sovEvm(uint64(mapEntrySize)) + } + } + return n +} + func sovEvm(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -2167,6 +2505,39 @@ func (m *Params) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProxyProposalParams", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ProxyProposalParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipEvm(dAtA[iNdEx:]) @@ -4134,6 +4505,414 @@ func (m *FeeMarketParams) Unmarshal(dAtA []byte) error { } return nil } +func (m *ProxyContractInitState) 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 ErrIntOverflowEvm + } + 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: ProxyContractInitState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ProxyContractInitState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) + } + m.Height = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Height |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + 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 ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Bin", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + 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 ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Bin = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Init", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + 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 ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Init = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvm(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ProxyProposalParams) 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 ErrIntOverflowEvm + } + 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: ProxyProposalParams: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ProxyProposalParams: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ConsensusAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + 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 ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ConsensusAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProxyOwnerAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + 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 ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ProxyOwnerAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Contracts", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Contracts == nil { + m.Contracts = make(map[string]*ProxyContractInitState) + } + var mapkey string + var mapvalue *ProxyContractInitState + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthEvm + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthEvm + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthEvm + } + postmsgIndex := iNdEx + mapmsglen + if postmsgIndex < 0 { + return ErrInvalidLengthEvm + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &ProxyContractInitState{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipEvm(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvm + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Contracts[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipEvm(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvm + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipEvm(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/evm/types/interfaces.go b/x/evm/types/interfaces.go index c32f7811..5bbbad55 100644 --- a/x/evm/types/interfaces.go +++ b/x/evm/types/interfaces.go @@ -7,7 +7,7 @@ import ( "github.com/ethereum/go-ethereum/core" ethtypes "github.com/ethereum/go-ethereum/core/types" - //feemarkettypes "github.com/stratosnet/stratos-chain/x/feemarket/types" + keestatedb "github.com/stratosnet/stratos-chain/core/statedb" ) // AccountKeeper defines the expected account keeper interface @@ -39,6 +39,18 @@ type StakingKeeper interface { GetValidatorByConsAddr(ctx sdk.Context, consAddr sdk.ConsAddress) (validator stakingtypes.Validator, found bool) } +// RegisterKeeper defines functionality related for meta and resource node +type RegisterKeeper interface { + KeeGetEffectiveTotalStake(kdb *keestatedb.KeestateDB) sdk.Int + KeeGetRemainingOzoneLimit(kdb *keestatedb.KeestateDB) sdk.Int + KeeSetRemainingOzoneLimit(kdb *keestatedb.KeestateDB, value sdk.Int) +} + +// SdsKeper defines functionality related for ozone purchase +type SdsKeeper interface { + Prepay(ctx sdk.Context, sender sdk.AccAddress, coins sdk.Coins) (sdk.Int, error) +} + // Event Hooks // These can be utilized to customize evm transaction processing. diff --git a/x/evm/types/params.go b/x/evm/types/params.go index f77fbf33..b4ebb2f0 100644 --- a/x/evm/types/params.go +++ b/x/evm/types/params.go @@ -3,10 +3,13 @@ package types import ( "fmt" "math/big" + "sort" sdk "github.com/cosmos/cosmos-sdk/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/params" @@ -40,6 +43,11 @@ var ( ParamStoreKeyElasticityMultiplier = []byte("ElasticityMultiplier") ParamStoreKeyBaseFee = []byte("BaseFee") ParamStoreKeyEnableHeight = []byte("EnableHeight") + + // proposal proxy + ParamStoreKeyConsensusAddress = []byte("ProposalConsensusAddress") + ParamStoreKeyProxyOwnerAddress = []byte("ProxyOwnerAddress") + ParamStoreKeyContracts = []byte("ProposalContracts") ) // ParamKeyTable returns the parameter key table. @@ -48,14 +56,15 @@ func ParamKeyTable() paramtypes.KeyTable { } // NewParams creates a new Params instance -func NewParams(evmDenom string, enableCreate, enableCall bool, config ChainConfig, feeMarketParams FeeMarketParams, extraEIPs ...int64) Params { +func NewParams(evmDenom string, enableCreate, enableCall bool, config ChainConfig, feeMarketParams FeeMarketParams, proxyProposalParams ProxyProposalParams, extraEIPs ...int64) Params { return Params{ - EvmDenom: evmDenom, - EnableCreate: enableCreate, - EnableCall: enableCall, - ExtraEIPs: extraEIPs, - ChainConfig: config, - FeeMarketParams: feeMarketParams, + EvmDenom: evmDenom, + EnableCreate: enableCreate, + EnableCall: enableCall, + ExtraEIPs: extraEIPs, + ChainConfig: config, + FeeMarketParams: feeMarketParams, + ProxyProposalParams: proxyProposalParams, } } @@ -63,12 +72,13 @@ func NewParams(evmDenom string, enableCreate, enableCall bool, config ChainConfi // ExtraEIPs is empty to prevent overriding the latest hard fork instruction set func DefaultParams() Params { return Params{ - EvmDenom: DefaultEVMDenom, - EnableCreate: true, - EnableCall: true, - ChainConfig: DefaultChainConfig(), - ExtraEIPs: nil, - FeeMarketParams: DefaultFeeMarketParams(), + EvmDenom: DefaultEVMDenom, + EnableCreate: true, + EnableCall: true, + ChainConfig: DefaultChainConfig(), + ExtraEIPs: nil, + FeeMarketParams: DefaultFeeMarketParams(), + ProxyProposalParams: DefaultProxyProposalParams(), } } @@ -86,6 +96,10 @@ func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { paramtypes.NewParamSetPair(ParamStoreKeyElasticityMultiplier, &p.FeeMarketParams.ElasticityMultiplier, validateElasticityMultiplier), paramtypes.NewParamSetPair(ParamStoreKeyBaseFee, &p.FeeMarketParams.BaseFee, validateBaseFee), paramtypes.NewParamSetPair(ParamStoreKeyEnableHeight, &p.FeeMarketParams.EnableHeight, validateEnableHeight), + //proposal proxy + paramtypes.NewParamSetPair(ParamStoreKeyConsensusAddress, &p.ProxyProposalParams.ConsensusAddress, validateAddress), + paramtypes.NewParamSetPair(ParamStoreKeyProxyOwnerAddress, &p.ProxyProposalParams.ProxyOwnerAddress, validateAddress), + paramtypes.NewParamSetPair(ParamStoreKeyContracts, &p.ProxyProposalParams.Contracts, validateContracts), } } @@ -250,3 +264,70 @@ func validateEnableHeight(i interface{}) error { return nil } + +// creates a new ProxyProposalParams instance +func NewProxyProposalParams(consensusAddress, proxyOwnerAddress common.Address) ProxyProposalParams { + return ProxyProposalParams{ + ConsensusAddress: consensusAddress.Hex(), + ProxyOwnerAddress: proxyOwnerAddress.Hex(), + Contracts: make(map[string]*ProxyContractInitState), + } +} + +// ProxyProposalParams returns default proxy parameters +func DefaultProxyProposalParams() ProxyProposalParams { + ppp := NewProxyProposalParams( + common.HexToAddress("0x1000000000000000000000000000000000000000"), + common.HexToAddress("0x1000000000000000000000000000000000000001"), + ) + // TODO: Maybe create some pretty method? + ppp.Contracts["prepay"] = &ProxyContractInitState{ + Height: 1, + Address: "0x1000000000000000000000000000000000010101", + Bin: "0x608060405234801561001057600080fd5b50610b19806100206000396000f3fe6080604052600436106100595760003560e01c806334fe1d1e14610065578063715018a61461006f5780638129fc1c146100865780638da5cb5b1461009d578063f2fde38b146100c8578063ffa1ad74146100f157610060565b3661006057005b600080fd5b61006d61011c565b005b34801561007b57600080fd5b50610084610241565b005b34801561009257600080fd5b5061009b610255565b005b3480156100a957600080fd5b506100b261039b565b6040516100bf91906106d1565b60405180910390f35b3480156100d457600080fd5b506100ef60048036038101906100ea919061071d565b6103c5565b005b3480156100fd57600080fd5b50610106610448565b6040516101139190610766565b60405180910390f35b600034905060008103610164576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161015b906107de565b60405180910390fd5b61016c61066e565b3373ffffffffffffffffffffffffffffffffffffffff1681600060018110610197576101966107fe565b5b6020020181815250506101a861066e565b6020816020848660f1600019f16101be57600080fd5b823373ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff167fa9fdf2e446d7225a2b445bc7c21ca59dcea69b5b23f5c4e6f54f87a5db6cdaee84600060018110610222576102216107fe565b5b60200201516040516102349190610846565b60405180910390a4505050565b61024961044d565b61025360006104cb565b565b60008060019054906101000a900460ff161590508080156102865750600160008054906101000a900460ff1660ff16105b806102b3575061029530610591565b1580156102b25750600160008054906101000a900460ff1660ff16145b5b6102f2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102e9906108d3565b60405180910390fd5b60016000806101000a81548160ff021916908360ff160217905550801561032f576001600060016101000a81548160ff0219169083151502179055505b6103376105b4565b61033f610605565b80156103985760008060016101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498600160405161038f9190610938565b60405180910390a15b50565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6103cd61044d565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361043c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610433906109c5565b60405180910390fd5b610445816104cb565b50565b600081565b610455610666565b73ffffffffffffffffffffffffffffffffffffffff1661047361039b565b73ffffffffffffffffffffffffffffffffffffffff16146104c9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104c090610a31565b60405180910390fd5b565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081603360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b600060019054906101000a900460ff16610603576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105fa90610ac3565b60405180910390fd5b565b600060019054906101000a900460ff16610654576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161064b90610ac3565b60405180910390fd5b61066461065f610666565b6104cb565b565b600033905090565b6040518060200160405280600190602082028036833780820191505090505090565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006106bb82610690565b9050919050565b6106cb816106b0565b82525050565b60006020820190506106e660008301846106c2565b92915050565b600080fd5b6106fa816106b0565b811461070557600080fd5b50565b600081359050610717816106f1565b92915050565b600060208284031215610733576107326106ec565b5b600061074184828501610708565b91505092915050565b600060ff82169050919050565b6107608161074a565b82525050565b600060208201905061077b6000830184610757565b92915050565b600082825260208201905092915050565b7f503a205a45524f5f414d4f554e54000000000000000000000000000000000000600082015250565b60006107c8600e83610781565b91506107d382610792565b602082019050919050565b600060208201905081810360008301526107f7816107bb565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000819050919050565b6108408161082d565b82525050565b600060208201905061085b6000830184610837565b92915050565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160008201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b60006108bd602e83610781565b91506108c882610861565b604082019050919050565b600060208201905081810360008301526108ec816108b0565b9050919050565b6000819050919050565b6000819050919050565b600061092261091d610918846108f3565b6108fd565b61074a565b9050919050565b61093281610907565b82525050565b600060208201905061094d6000830184610929565b92915050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b60006109af602683610781565b91506109ba82610953565b604082019050919050565b600060208201905081810360008301526109de816109a2565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000610a1b602083610781565b9150610a26826109e5565b602082019050919050565b60006020820190508181036000830152610a4a81610a0e565b9050919050565b7f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960008201527f6e697469616c697a696e67000000000000000000000000000000000000000000602082015250565b6000610aad602b83610781565b9150610ab882610a51565b604082019050919050565b60006020820190508181036000830152610adc81610aa0565b905091905056fea2646970667358221220af723f0b659da0cdaa0d447e54bb8c0c3af22886c04139bf5fc7ee74f487451c64736f6c63430008120033", + Init: "0x8129fc1c", + } + return ppp +} + +func validateAddress(i interface{}) error { + value, ok := i.(string) + if !ok { + return fmt.Errorf("invalid parameter type: %T", i) + } + if !common.IsHexAddress(value) { + return fmt.Errorf("address '%s' is not a hex", value) + } + return nil +} + +func validateContracts(i interface{}) error { + contracts, ok := i.(map[string]*ProxyContractInitState) + if !ok { + return fmt.Errorf("invalid parameter type: %T", i) + } + + keys := make([]string, 0) + for k := range contracts { + keys = append(keys, k) + } + sort.Strings(keys) + + for _, k := range keys { + state := contracts[k] + if err := validateAddress(state.Address); err != nil { + return err + } + if state.Height < 1 { + return fmt.Errorf("invalid height '%d'", state.Height) + } + if _, err := hexutil.Decode(state.Bin); err != nil { + return err + } + if _, err := hexutil.Decode(state.Init); len(state.Init) != 0 && err != nil { + return err + } + } + + return nil +} diff --git a/x/evm/types/proposal.go b/x/evm/types/proposal.go new file mode 100644 index 00000000..83aad802 --- /dev/null +++ b/x/evm/types/proposal.go @@ -0,0 +1,79 @@ +package types + +import ( + "bytes" + "fmt" + + sdk "github.com/cosmos/cosmos-sdk/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + "github.com/ethereum/go-ethereum/common" +) + +const ( + ProposalTypeUpdateImplementation = "UpdateImplementation" +) + +var ( + _ govtypes.Content = &UpdateImplmentationProposal{} +) + +func init() { + govtypes.RegisterProposalType(ProposalTypeUpdateImplementation) +} + +// NewUpdateImplmentationProposal creates a new proxy update proposal. +func NewUpdateImplmentationProposal(proxy, impl common.Address, data []byte, amt *sdk.Int) govtypes.Content { + return &UpdateImplmentationProposal{ + ProxyAddress: proxy.Hex(), + ImplementationAddress: impl.Hex(), + Data: data, + Amount: amt, + } +} + +// GetTitle returns the title of a new proxy update proposal. +func (epd *UpdateImplmentationProposal) GetTitle() string { + return "New proxy upgrade function call" +} + +// GetDescription returns the description of a new proxy update proposal. +func (epd *UpdateImplmentationProposal) GetDescription() string { + return fmt.Sprintf( + "This is upgrade for proxy '%s' address with a new implementation '%s'", + epd.ProxyAddress, epd.ImplementationAddress, + ) +} + +// ProposalRoute returns the routing key of a new proxy update proposal. +func (epd *UpdateImplmentationProposal) ProposalRoute() string { return RouterKey } + +// ProposalType returns the type of a new proxy update proposal. +func (epd *UpdateImplmentationProposal) ProposalType() string { + return ProposalTypeUpdateImplementation +} + +// ValidateBasic runs basic stateless validity checks +func (epd *UpdateImplmentationProposal) ValidateBasic() error { + err := govtypes.ValidateAbstract(epd) + if err != nil { + return err + } + + if !common.IsHexAddress(epd.ProxyAddress) { + return fmt.Errorf("address '%s' is not valid", epd.ProxyAddress) + } + + if !common.IsHexAddress(epd.ImplementationAddress) { + return fmt.Errorf("address '%s' is not valid", epd.ImplementationAddress) + } + + if bytes.Equal(common.HexToAddress(epd.ImplementationAddress).Bytes(), common.Address{}.Bytes()) { + return fmt.Errorf("implementation address could not be zero address") + } + + if epd.Amount == nil { + return fmt.Errorf("amount should be zero or greater") + } + + return nil +} diff --git a/x/evm/types/proposal.pb.go b/x/evm/types/proposal.pb.go new file mode 100644 index 00000000..f538179f --- /dev/null +++ b/x/evm/types/proposal.pb.go @@ -0,0 +1,487 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: stratos/evm/v1/proposal.proto + +package types + +import ( + fmt "fmt" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// UpdateImplmentationProposal used to update implemntation for genesis proxies +type UpdateImplmentationProposal struct { + // proxy address where data will be executed + ProxyAddress string `protobuf:"bytes,1,opt,name=proxy_address,json=proxyAddress,proto3" json:"proxy_address,omitempty"` + // implmentation address as API for a storage + ImplementationAddress string `protobuf:"bytes,2,opt,name=implementation_address,json=implementationAddress,proto3" json:"implementation_address,omitempty"` + // data for execution + Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` + // value for proxy func call + Amount *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,4,opt,name=value,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"value,omitempty"` +} + +func (m *UpdateImplmentationProposal) Reset() { *m = UpdateImplmentationProposal{} } +func (m *UpdateImplmentationProposal) String() string { return proto.CompactTextString(m) } +func (*UpdateImplmentationProposal) ProtoMessage() {} +func (*UpdateImplmentationProposal) Descriptor() ([]byte, []int) { + return fileDescriptor_3c6013e0da139f02, []int{0} +} +func (m *UpdateImplmentationProposal) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *UpdateImplmentationProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_UpdateImplmentationProposal.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 *UpdateImplmentationProposal) XXX_Merge(src proto.Message) { + xxx_messageInfo_UpdateImplmentationProposal.Merge(m, src) +} +func (m *UpdateImplmentationProposal) XXX_Size() int { + return m.Size() +} +func (m *UpdateImplmentationProposal) XXX_DiscardUnknown() { + xxx_messageInfo_UpdateImplmentationProposal.DiscardUnknown(m) +} + +var xxx_messageInfo_UpdateImplmentationProposal proto.InternalMessageInfo + +func (m *UpdateImplmentationProposal) GetProxyAddress() string { + if m != nil { + return m.ProxyAddress + } + return "" +} + +func (m *UpdateImplmentationProposal) GetImplementationAddress() string { + if m != nil { + return m.ImplementationAddress + } + return "" +} + +func (m *UpdateImplmentationProposal) GetData() []byte { + if m != nil { + return m.Data + } + return nil +} + +func init() { + proto.RegisterType((*UpdateImplmentationProposal)(nil), "stratos.evm.v1.UpdateImplmentationProposal") +} + +func init() { proto.RegisterFile("stratos/evm/v1/proposal.proto", fileDescriptor_3c6013e0da139f02) } + +var fileDescriptor_3c6013e0da139f02 = []byte{ + // 290 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x90, 0xc1, 0x4a, 0xf3, 0x40, + 0x14, 0x85, 0x3b, 0xff, 0x5f, 0x0b, 0x0e, 0xd5, 0x45, 0x50, 0x29, 0x8a, 0xd3, 0xa2, 0x20, 0xdd, + 0x34, 0x43, 0x51, 0x1f, 0xa0, 0xdd, 0xd5, 0x95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, 0x63, + 0xb9, 0xe9, 0x77, 0x26, 0x0a, 0x72, 0x8d, 0x41, 0x8d, 0x98, 0xce, 0xde, 0x4b, 0x46, 0xd6, 0x25, + 0x23, 0xdf, 0x25, 0x23, 0x6f, 0x15, 0x6b, 0xad, 0x2b, 0xd6, 0xfa, 0xa8, 0x58, 0xeb, 0x99, 0xff, + 0x42, 0x36, 0x33, 0x69, 0x89, 0x3b, 0x39, 0x0a, 0x17, 0x22, 0xd1, 0x7c, 0xe9, 0x86, 0x75, 0xfc, + 0x79, 0xc7, 0xad, 0x75, 0xfb, 0x13, 0x00, 0x00, 0xff, 0xff, 0xfb, 0x01, 0xc9, 0x85, 0x74, 0x01, + 0x00, 0x00, +} + +func (m *UpdateImplmentationProposal) 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 *UpdateImplmentationProposal) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *UpdateImplmentationProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Amount != nil { + { + size := m.Amount.Size() + i -= size + if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if len(m.Data) > 0 { + i -= len(m.Data) + copy(dAtA[i:], m.Data) + i = encodeVarintProposal(dAtA, i, uint64(len(m.Data))) + i-- + dAtA[i] = 0x1a + } + if len(m.ImplementationAddress) > 0 { + i -= len(m.ImplementationAddress) + copy(dAtA[i:], m.ImplementationAddress) + i = encodeVarintProposal(dAtA, i, uint64(len(m.ImplementationAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.ProxyAddress) > 0 { + i -= len(m.ProxyAddress) + copy(dAtA[i:], m.ProxyAddress) + i = encodeVarintProposal(dAtA, i, uint64(len(m.ProxyAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintProposal(dAtA []byte, offset int, v uint64) int { + offset -= sovProposal(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *UpdateImplmentationProposal) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ProxyAddress) + if l > 0 { + n += 1 + l + sovProposal(uint64(l)) + } + l = len(m.ImplementationAddress) + if l > 0 { + n += 1 + l + sovProposal(uint64(l)) + } + l = len(m.Data) + if l > 0 { + n += 1 + l + sovProposal(uint64(l)) + } + if m.Amount != nil { + l = m.Amount.Size() + n += 1 + l + sovProposal(uint64(l)) + } + return n +} + +func sovProposal(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozProposal(x uint64) (n int) { + return sovProposal(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *UpdateImplmentationProposal) 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 ErrIntOverflowProposal + } + 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: UpdateImplmentationProposal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UpdateImplmentationProposal: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProxyAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + 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 ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ProxyAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ImplementationAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + 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 ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ImplementationAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) + if m.Data == nil { + m.Data = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + 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 ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_cosmos_cosmos_sdk_types.Int + m.Amount = &v + if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProposal(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProposal + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipProposal(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowProposal + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowProposal + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowProposal + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthProposal + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupProposal + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthProposal + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthProposal = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowProposal = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupProposal = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/evm/vm/analysis.go b/x/evm/vm/analysis.go new file mode 100644 index 00000000..4aa8cfe7 --- /dev/null +++ b/x/evm/vm/analysis.go @@ -0,0 +1,118 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package vm + +const ( + set2BitsMask = uint16(0b11) + set3BitsMask = uint16(0b111) + set4BitsMask = uint16(0b1111) + set5BitsMask = uint16(0b1_1111) + set6BitsMask = uint16(0b11_1111) + set7BitsMask = uint16(0b111_1111) +) + +// bitvec is a bit vector which maps bytes in a program. +// An unset bit means the byte is an opcode, a set bit means +// it's data (i.e. argument of PUSHxx). +type bitvec []byte + +func (bits bitvec) set1(pos uint64) { + bits[pos/8] |= 1 << (pos % 8) +} + +func (bits bitvec) setN(flag uint16, pos uint64) { + a := flag << (pos % 8) + bits[pos/8] |= byte(a) + if b := byte(a >> 8); b != 0 { + bits[pos/8+1] = b + } +} + +func (bits bitvec) set8(pos uint64) { + a := byte(0xFF << (pos % 8)) + bits[pos/8] |= a + bits[pos/8+1] = ^a +} + +func (bits bitvec) set16(pos uint64) { + a := byte(0xFF << (pos % 8)) + bits[pos/8] |= a + bits[pos/8+1] = 0xFF + bits[pos/8+2] = ^a +} + +// codeSegment checks if the position is in a code segment. +func (bits *bitvec) codeSegment(pos uint64) bool { + return (((*bits)[pos/8] >> (pos % 8)) & 1) == 0 +} + +// codeBitmap collects data locations in code. +func codeBitmap(code []byte) bitvec { + // The bitmap is 4 bytes longer than necessary, in case the code + // ends with a PUSH32, the algorithm will push zeroes onto the + // bitvector outside the bounds of the actual code. + bits := make(bitvec, len(code)/8+1+4) + return codeBitmapInternal(code, bits) +} + +// codeBitmapInternal is the internal implementation of codeBitmap. +// It exists for the purpose of being able to run benchmark tests +// without dynamic allocations affecting the results. +func codeBitmapInternal(code, bits bitvec) bitvec { + for pc := uint64(0); pc < uint64(len(code)); { + op := OpCode(code[pc]) + pc++ + if int8(op) < int8(PUSH1) { // If not PUSH (the int8(op) > int(PUSH32) is always false). + continue + } + numbits := op - PUSH1 + 1 + if numbits >= 8 { + for ; numbits >= 16; numbits -= 16 { + bits.set16(pc) + pc += 16 + } + for ; numbits >= 8; numbits -= 8 { + bits.set8(pc) + pc += 8 + } + } + switch numbits { + case 1: + bits.set1(pc) + pc += 1 + case 2: + bits.setN(set2BitsMask, pc) + pc += 2 + case 3: + bits.setN(set3BitsMask, pc) + pc += 3 + case 4: + bits.setN(set4BitsMask, pc) + pc += 4 + case 5: + bits.setN(set5BitsMask, pc) + pc += 5 + case 6: + bits.setN(set6BitsMask, pc) + pc += 6 + case 7: + bits.setN(set7BitsMask, pc) + pc += 7 + } + } + return bits +} diff --git a/x/evm/vm/common.go b/x/evm/vm/common.go new file mode 100644 index 00000000..90ba4a4a --- /dev/null +++ b/x/evm/vm/common.go @@ -0,0 +1,82 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package vm + +import ( + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/common/math" + "github.com/holiman/uint256" +) + +// calcMemSize64 calculates the required memory size, and returns +// the size and whether the result overflowed uint64 +func calcMemSize64(off, l *uint256.Int) (uint64, bool) { + if !l.IsUint64() { + return 0, true + } + return calcMemSize64WithUint(off, l.Uint64()) +} + +// calcMemSize64WithUint calculates the required memory size, and returns +// the size and whether the result overflowed uint64 +// Identical to calcMemSize64, but length is a uint64 +func calcMemSize64WithUint(off *uint256.Int, length64 uint64) (uint64, bool) { + // if length is zero, memsize is always zero, regardless of offset + if length64 == 0 { + return 0, false + } + // Check that offset doesn't overflow + offset64, overflow := off.Uint64WithOverflow() + if overflow { + return 0, true + } + val := offset64 + length64 + // if value < either of it's parts, then it overflowed + return val, val < offset64 +} + +// getData returns a slice from the data based on the start and size and pads +// up to size with zero's. This function is overflow safe. +func getData(data []byte, start uint64, size uint64) []byte { + length := uint64(len(data)) + if start > length { + start = length + } + end := start + size + if end > length { + end = length + } + return common.RightPadBytes(data[start:end], int(size)) +} + +// toWordSize returns the ceiled word size required for memory expansion. +func toWordSize(size uint64) uint64 { + if size > math.MaxUint64-31 { + return math.MaxUint64/32 + 1 + } + + return (size + 31) / 32 +} + +func allZero(b []byte) bool { + for _, byte := range b { + if byte != 0 { + return false + } + } + return true +} diff --git a/x/evm/vm/contract.go b/x/evm/vm/contract.go new file mode 100644 index 00000000..bb090296 --- /dev/null +++ b/x/evm/vm/contract.go @@ -0,0 +1,194 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package vm + +import ( + "math/big" + + "github.com/ethereum/go-ethereum/common" + "github.com/holiman/uint256" +) + +// ContractRef is a reference to the contract's backing object +type ContractRef interface { + Address() common.Address +} + +// AccountRef implements ContractRef. +// +// Account references are used during EVM initialisation and +// it's primary use is to fetch addresses. Removing this object +// proves difficult because of the cached jump destinations which +// are fetched from the parent contract (i.e. the caller), which +// is a ContractRef. +type AccountRef common.Address + +// Address casts AccountRef to a Address +func (ar AccountRef) Address() common.Address { return (common.Address)(ar) } + +// Contract represents an ethereum contract in the state database. It contains +// the contract code, calling arguments. Contract implements ContractRef +type Contract struct { + // CallerAddress is the result of the caller which initialised this + // contract. However when the "call method" is delegated this value + // needs to be initialised to that of the caller's caller. + CallerAddress common.Address + caller ContractRef + self ContractRef + + jumpdests map[common.Hash]bitvec // Aggregated result of JUMPDEST analysis. + analysis bitvec // Locally cached result of JUMPDEST analysis + + Code []byte + CodeHash common.Hash + CodeAddr *common.Address + Input []byte + + Gas uint64 + value *big.Int +} + +// NewContract returns a new contract environment for the execution of EVM. +func NewContract(caller ContractRef, object ContractRef, value *big.Int, gas uint64) *Contract { + c := &Contract{CallerAddress: caller.Address(), caller: caller, self: object} + + if parent, ok := caller.(*Contract); ok { + // Reuse JUMPDEST analysis from parent context if available. + c.jumpdests = parent.jumpdests + } else { + c.jumpdests = make(map[common.Hash]bitvec) + } + + // Gas should be a pointer so it can safely be reduced through the run + // This pointer will be off the state transition + c.Gas = gas + // ensures a value is set + c.value = value + + return c +} + +func (c *Contract) validJumpdest(dest *uint256.Int) bool { + udest, overflow := dest.Uint64WithOverflow() + // PC cannot go beyond len(code) and certainly can't be bigger than 63bits. + // Don't bother checking for JUMPDEST in that case. + if overflow || udest >= uint64(len(c.Code)) { + return false + } + // Only JUMPDESTs allowed for destinations + if OpCode(c.Code[udest]) != JUMPDEST { + return false + } + return c.isCode(udest) +} + +// isCode returns true if the provided PC location is an actual opcode, as +// opposed to a data-segment following a PUSHN operation. +func (c *Contract) isCode(udest uint64) bool { + // Do we already have an analysis laying around? + if c.analysis != nil { + return c.analysis.codeSegment(udest) + } + // Do we have a contract hash already? + // If we do have a hash, that means it's a 'regular' contract. For regular + // contracts ( not temporary initcode), we store the analysis in a map + if c.CodeHash != (common.Hash{}) { + // Does parent context have the analysis? + analysis, exist := c.jumpdests[c.CodeHash] + if !exist { + // Do the analysis and save in parent context + // We do not need to store it in c.analysis + analysis = codeBitmap(c.Code) + c.jumpdests[c.CodeHash] = analysis + } + // Also stash it in current contract for faster access + c.analysis = analysis + return analysis.codeSegment(udest) + } + // We don't have the code hash, most likely a piece of initcode not already + // in state trie. In that case, we do an analysis, and save it locally, so + // we don't have to recalculate it for every JUMP instruction in the execution + // However, we don't save it within the parent context + if c.analysis == nil { + c.analysis = codeBitmap(c.Code) + } + return c.analysis.codeSegment(udest) +} + +// AsDelegate sets the contract to be a delegate call and returns the current +// contract (for chaining calls) +func (c *Contract) AsDelegate() *Contract { + // NOTE: caller must, at all times be a contract. It should never happen + // that caller is something other than a Contract. + parent := c.caller.(*Contract) + c.CallerAddress = parent.CallerAddress + c.value = parent.value + + return c +} + +// GetOp returns the n'th element in the contract's byte array +func (c *Contract) GetOp(n uint64) OpCode { + if n < uint64(len(c.Code)) { + return OpCode(c.Code[n]) + } + + return STOP +} + +// Caller returns the caller of the contract. +// +// Caller will recursively call caller when the contract is a delegate +// call, including that of caller's caller. +func (c *Contract) Caller() common.Address { + return c.CallerAddress +} + +// UseGas attempts the use gas and subtracts it and returns true on success +func (c *Contract) UseGas(gas uint64) (ok bool) { + if c.Gas < gas { + return false + } + c.Gas -= gas + return true +} + +// Address returns the contracts address +func (c *Contract) Address() common.Address { + return c.self.Address() +} + +// Value returns the contract's value (sent to it from it's caller) +func (c *Contract) Value() *big.Int { + return c.value +} + +// SetCallCode sets the code of the contract and address of the backing data +// object +func (c *Contract) SetCallCode(addr *common.Address, hash common.Hash, code []byte) { + c.Code = code + c.CodeHash = hash + c.CodeAddr = addr +} + +// SetCodeOptionalHash can be used to provide code, but it's optional to provide hash. +// In case hash is not provided, the jumpdest analysis will not be saved to the parent context +func (c *Contract) SetCodeOptionalHash(addr *common.Address, codeAndHash *codeAndHash) { + c.Code = codeAndHash.code + c.CodeHash = codeAndHash.hash + c.CodeAddr = addr +} diff --git a/x/evm/vm/contracts.go b/x/evm/vm/contracts.go new file mode 100644 index 00000000..1b832b63 --- /dev/null +++ b/x/evm/vm/contracts.go @@ -0,0 +1,1043 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package vm + +import ( + "crypto/sha256" + "encoding/binary" + "errors" + "math/big" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/common/math" + "github.com/ethereum/go-ethereum/crypto" + "github.com/ethereum/go-ethereum/crypto/blake2b" + "github.com/ethereum/go-ethereum/crypto/bls12381" + "github.com/ethereum/go-ethereum/crypto/bn256" + "github.com/ethereum/go-ethereum/params" + "golang.org/x/crypto/ripemd160" +) + +// PrecompiledContract is the basic interface for native Go contracts. The implementation +// requires a deterministic gas count based on the input size of the Run method of the +// contract. +type PrecompiledContract interface { + RequiredGas(input []byte) uint64 // RequiredPrice calculates the contract gas use + Run(input []byte) ([]byte, error) // Run runs the precompiled contract +} + +// PrecompiledContractsHomestead contains the default set of pre-compiled Ethereum +// contracts used in the Frontier and Homestead releases. +var PrecompiledContractsHomestead = map[common.Address]PrecompiledContract{ + common.BytesToAddress([]byte{1}): &ecrecover{}, + common.BytesToAddress([]byte{2}): &sha256hash{}, + common.BytesToAddress([]byte{3}): &ripemd160hash{}, + common.BytesToAddress([]byte{4}): &dataCopy{}, +} + +// PrecompiledContractsByzantium contains the default set of pre-compiled Ethereum +// contracts used in the Byzantium release. +var PrecompiledContractsByzantium = map[common.Address]PrecompiledContract{ + common.BytesToAddress([]byte{1}): &ecrecover{}, + common.BytesToAddress([]byte{2}): &sha256hash{}, + common.BytesToAddress([]byte{3}): &ripemd160hash{}, + common.BytesToAddress([]byte{4}): &dataCopy{}, + common.BytesToAddress([]byte{5}): &bigModExp{eip2565: false}, + common.BytesToAddress([]byte{6}): &bn256AddByzantium{}, + common.BytesToAddress([]byte{7}): &bn256ScalarMulByzantium{}, + common.BytesToAddress([]byte{8}): &bn256PairingByzantium{}, +} + +// PrecompiledContractsIstanbul contains the default set of pre-compiled Ethereum +// contracts used in the Istanbul release. +var PrecompiledContractsIstanbul = map[common.Address]PrecompiledContract{ + common.BytesToAddress([]byte{1}): &ecrecover{}, + common.BytesToAddress([]byte{2}): &sha256hash{}, + common.BytesToAddress([]byte{3}): &ripemd160hash{}, + common.BytesToAddress([]byte{4}): &dataCopy{}, + common.BytesToAddress([]byte{5}): &bigModExp{eip2565: false}, + common.BytesToAddress([]byte{6}): &bn256AddIstanbul{}, + common.BytesToAddress([]byte{7}): &bn256ScalarMulIstanbul{}, + common.BytesToAddress([]byte{8}): &bn256PairingIstanbul{}, + common.BytesToAddress([]byte{9}): &blake2F{}, +} + +// PrecompiledContractsBerlin contains the default set of pre-compiled Ethereum +// contracts used in the Berlin release. +var PrecompiledContractsBerlin = map[common.Address]PrecompiledContract{ + common.BytesToAddress([]byte{1}): &ecrecover{}, + common.BytesToAddress([]byte{2}): &sha256hash{}, + common.BytesToAddress([]byte{3}): &ripemd160hash{}, + common.BytesToAddress([]byte{4}): &dataCopy{}, + common.BytesToAddress([]byte{5}): &bigModExp{eip2565: true}, + common.BytesToAddress([]byte{6}): &bn256AddIstanbul{}, + common.BytesToAddress([]byte{7}): &bn256ScalarMulIstanbul{}, + common.BytesToAddress([]byte{8}): &bn256PairingIstanbul{}, + common.BytesToAddress([]byte{9}): &blake2F{}, +} + +// PrecompiledContractsBLS contains the set of pre-compiled Ethereum +// contracts specified in EIP-2537. These are exported for testing purposes. +var PrecompiledContractsBLS = map[common.Address]PrecompiledContract{ + common.BytesToAddress([]byte{10}): &bls12381G1Add{}, + common.BytesToAddress([]byte{11}): &bls12381G1Mul{}, + common.BytesToAddress([]byte{12}): &bls12381G1MultiExp{}, + common.BytesToAddress([]byte{13}): &bls12381G2Add{}, + common.BytesToAddress([]byte{14}): &bls12381G2Mul{}, + common.BytesToAddress([]byte{15}): &bls12381G2MultiExp{}, + common.BytesToAddress([]byte{16}): &bls12381Pairing{}, + common.BytesToAddress([]byte{17}): &bls12381MapG1{}, + common.BytesToAddress([]byte{18}): &bls12381MapG2{}, +} + +var ( + PrecompiledAddressesBerlin []common.Address + PrecompiledAddressesIstanbul []common.Address + PrecompiledAddressesByzantium []common.Address + PrecompiledAddressesHomestead []common.Address +) + +func init() { + for k := range PrecompiledContractsHomestead { + PrecompiledAddressesHomestead = append(PrecompiledAddressesHomestead, k) + } + for k := range PrecompiledContractsByzantium { + PrecompiledAddressesByzantium = append(PrecompiledAddressesByzantium, k) + } + for k := range PrecompiledContractsIstanbul { + PrecompiledAddressesIstanbul = append(PrecompiledAddressesIstanbul, k) + } + for k := range PrecompiledContractsBerlin { + PrecompiledAddressesBerlin = append(PrecompiledAddressesBerlin, k) + } +} + +// ActivePrecompiles returns the precompiles enabled with the current configuration. +func ActivePrecompiles(rules params.Rules) []common.Address { + switch { + case rules.IsBerlin: + return PrecompiledAddressesBerlin + case rules.IsIstanbul: + return PrecompiledAddressesIstanbul + case rules.IsByzantium: + return PrecompiledAddressesByzantium + default: + return PrecompiledAddressesHomestead + } +} + +// RunPrecompiledContract runs and evaluates the output of a precompiled contract. +// It returns +// - the returned bytes, +// - the _remaining_ gas, +// - any error that occurred +func RunPrecompiledContract(p PrecompiledContract, input []byte, suppliedGas uint64) (ret []byte, remainingGas uint64, err error) { + gasCost := p.RequiredGas(input) + if suppliedGas < gasCost { + return nil, 0, ErrOutOfGas + } + suppliedGas -= gasCost + output, err := p.Run(input) + return output, suppliedGas, err +} + +// ECRECOVER implemented as a native contract. +type ecrecover struct{} + +func (c *ecrecover) RequiredGas(input []byte) uint64 { + return params.EcrecoverGas +} + +func (c *ecrecover) Run(input []byte) ([]byte, error) { + const ecRecoverInputLength = 128 + + input = common.RightPadBytes(input, ecRecoverInputLength) + // "input" is (hash, v, r, s), each 32 bytes + // but for ecrecover we want (r, s, v) + + r := new(big.Int).SetBytes(input[64:96]) + s := new(big.Int).SetBytes(input[96:128]) + v := input[63] - 27 + + // tighter sig s values input homestead only apply to tx sigs + if !allZero(input[32:63]) || !crypto.ValidateSignatureValues(v, r, s, false) { + return nil, nil + } + // We must make sure not to modify the 'input', so placing the 'v' along with + // the signature needs to be done on a new allocation + sig := make([]byte, 65) + copy(sig, input[64:128]) + sig[64] = v + // v needs to be at the end for libsecp256k1 + pubKey, err := crypto.Ecrecover(input[:32], sig) + // make sure the public key is a valid one + if err != nil { + return nil, nil + } + + // the first byte of pubkey is bitcoin heritage + return common.LeftPadBytes(crypto.Keccak256(pubKey[1:])[12:], 32), nil +} + +// SHA256 implemented as a native contract. +type sha256hash struct{} + +// RequiredGas returns the gas required to execute the pre-compiled contract. +// +// This method does not require any overflow checking as the input size gas costs +// required for anything significant is so high it's impossible to pay for. +func (c *sha256hash) RequiredGas(input []byte) uint64 { + return uint64(len(input)+31)/32*params.Sha256PerWordGas + params.Sha256BaseGas +} +func (c *sha256hash) Run(input []byte) ([]byte, error) { + h := sha256.Sum256(input) + return h[:], nil +} + +// RIPEMD160 implemented as a native contract. +type ripemd160hash struct{} + +// RequiredGas returns the gas required to execute the pre-compiled contract. +// +// This method does not require any overflow checking as the input size gas costs +// required for anything significant is so high it's impossible to pay for. +func (c *ripemd160hash) RequiredGas(input []byte) uint64 { + return uint64(len(input)+31)/32*params.Ripemd160PerWordGas + params.Ripemd160BaseGas +} +func (c *ripemd160hash) Run(input []byte) ([]byte, error) { + ripemd := ripemd160.New() + ripemd.Write(input) + return common.LeftPadBytes(ripemd.Sum(nil), 32), nil +} + +// data copy implemented as a native contract. +type dataCopy struct{} + +// RequiredGas returns the gas required to execute the pre-compiled contract. +// +// This method does not require any overflow checking as the input size gas costs +// required for anything significant is so high it's impossible to pay for. +func (c *dataCopy) RequiredGas(input []byte) uint64 { + return uint64(len(input)+31)/32*params.IdentityPerWordGas + params.IdentityBaseGas +} +func (c *dataCopy) Run(in []byte) ([]byte, error) { + return in, nil +} + +// bigModExp implements a native big integer exponential modular operation. +type bigModExp struct { + eip2565 bool +} + +var ( + big0 = big.NewInt(0) + big1 = big.NewInt(1) + big3 = big.NewInt(3) + big4 = big.NewInt(4) + big7 = big.NewInt(7) + big8 = big.NewInt(8) + big16 = big.NewInt(16) + big20 = big.NewInt(20) + big32 = big.NewInt(32) + big64 = big.NewInt(64) + big96 = big.NewInt(96) + big480 = big.NewInt(480) + big1024 = big.NewInt(1024) + big3072 = big.NewInt(3072) + big199680 = big.NewInt(199680) +) + +// modexpMultComplexity implements bigModexp multComplexity formula, as defined in EIP-198 +// +// def mult_complexity(x): +// if x <= 64: return x ** 2 +// elif x <= 1024: return x ** 2 // 4 + 96 * x - 3072 +// else: return x ** 2 // 16 + 480 * x - 199680 +// +// where is x is max(length_of_MODULUS, length_of_BASE) +func modexpMultComplexity(x *big.Int) *big.Int { + switch { + case x.Cmp(big64) <= 0: + x.Mul(x, x) // x ** 2 + case x.Cmp(big1024) <= 0: + // (x ** 2 // 4 ) + ( 96 * x - 3072) + x = new(big.Int).Add( + new(big.Int).Div(new(big.Int).Mul(x, x), big4), + new(big.Int).Sub(new(big.Int).Mul(big96, x), big3072), + ) + default: + // (x ** 2 // 16) + (480 * x - 199680) + x = new(big.Int).Add( + new(big.Int).Div(new(big.Int).Mul(x, x), big16), + new(big.Int).Sub(new(big.Int).Mul(big480, x), big199680), + ) + } + return x +} + +// RequiredGas returns the gas required to execute the pre-compiled contract. +func (c *bigModExp) RequiredGas(input []byte) uint64 { + var ( + baseLen = new(big.Int).SetBytes(getData(input, 0, 32)) + expLen = new(big.Int).SetBytes(getData(input, 32, 32)) + modLen = new(big.Int).SetBytes(getData(input, 64, 32)) + ) + if len(input) > 96 { + input = input[96:] + } else { + input = input[:0] + } + // Retrieve the head 32 bytes of exp for the adjusted exponent length + var expHead *big.Int + if big.NewInt(int64(len(input))).Cmp(baseLen) <= 0 { + expHead = new(big.Int) + } else { + if expLen.Cmp(big32) > 0 { + expHead = new(big.Int).SetBytes(getData(input, baseLen.Uint64(), 32)) + } else { + expHead = new(big.Int).SetBytes(getData(input, baseLen.Uint64(), expLen.Uint64())) + } + } + // Calculate the adjusted exponent length + var msb int + if bitlen := expHead.BitLen(); bitlen > 0 { + msb = bitlen - 1 + } + adjExpLen := new(big.Int) + if expLen.Cmp(big32) > 0 { + adjExpLen.Sub(expLen, big32) + adjExpLen.Mul(big8, adjExpLen) + } + adjExpLen.Add(adjExpLen, big.NewInt(int64(msb))) + // Calculate the gas cost of the operation + gas := new(big.Int).Set(math.BigMax(modLen, baseLen)) + if c.eip2565 { + // EIP-2565 has three changes + // 1. Different multComplexity (inlined here) + // in EIP-2565 (https://eips.ethereum.org/EIPS/eip-2565): + // + // def mult_complexity(x): + // ceiling(x/8)^2 + // + //where is x is max(length_of_MODULUS, length_of_BASE) + gas = gas.Add(gas, big7) + gas = gas.Div(gas, big8) + gas.Mul(gas, gas) + + gas.Mul(gas, math.BigMax(adjExpLen, big1)) + // 2. Different divisor (`GQUADDIVISOR`) (3) + gas.Div(gas, big3) + if gas.BitLen() > 64 { + return math.MaxUint64 + } + // 3. Minimum price of 200 gas + if gas.Uint64() < 200 { + return 200 + } + return gas.Uint64() + } + gas = modexpMultComplexity(gas) + gas.Mul(gas, math.BigMax(adjExpLen, big1)) + gas.Div(gas, big20) + + if gas.BitLen() > 64 { + return math.MaxUint64 + } + return gas.Uint64() +} + +func (c *bigModExp) Run(input []byte) ([]byte, error) { + var ( + baseLen = new(big.Int).SetBytes(getData(input, 0, 32)).Uint64() + expLen = new(big.Int).SetBytes(getData(input, 32, 32)).Uint64() + modLen = new(big.Int).SetBytes(getData(input, 64, 32)).Uint64() + ) + if len(input) > 96 { + input = input[96:] + } else { + input = input[:0] + } + // Handle a special case when both the base and mod length is zero + if baseLen == 0 && modLen == 0 { + return []byte{}, nil + } + // Retrieve the operands and execute the exponentiation + var ( + base = new(big.Int).SetBytes(getData(input, 0, baseLen)) + exp = new(big.Int).SetBytes(getData(input, baseLen, expLen)) + mod = new(big.Int).SetBytes(getData(input, baseLen+expLen, modLen)) + ) + if mod.BitLen() == 0 { + // Modulo 0 is undefined, return zero + return common.LeftPadBytes([]byte{}, int(modLen)), nil + } + return common.LeftPadBytes(base.Exp(base, exp, mod).Bytes(), int(modLen)), nil +} + +// newCurvePoint unmarshals a binary blob into a bn256 elliptic curve point, +// returning it, or an error if the point is invalid. +func newCurvePoint(blob []byte) (*bn256.G1, error) { + p := new(bn256.G1) + if _, err := p.Unmarshal(blob); err != nil { + return nil, err + } + return p, nil +} + +// newTwistPoint unmarshals a binary blob into a bn256 elliptic curve point, +// returning it, or an error if the point is invalid. +func newTwistPoint(blob []byte) (*bn256.G2, error) { + p := new(bn256.G2) + if _, err := p.Unmarshal(blob); err != nil { + return nil, err + } + return p, nil +} + +// runBn256Add implements the Bn256Add precompile, referenced by both +// Byzantium and Istanbul operations. +func runBn256Add(input []byte) ([]byte, error) { + x, err := newCurvePoint(getData(input, 0, 64)) + if err != nil { + return nil, err + } + y, err := newCurvePoint(getData(input, 64, 64)) + if err != nil { + return nil, err + } + res := new(bn256.G1) + res.Add(x, y) + return res.Marshal(), nil +} + +// bn256Add implements a native elliptic curve point addition conforming to +// Istanbul consensus rules. +type bn256AddIstanbul struct{} + +// RequiredGas returns the gas required to execute the pre-compiled contract. +func (c *bn256AddIstanbul) RequiredGas(input []byte) uint64 { + return params.Bn256AddGasIstanbul +} + +func (c *bn256AddIstanbul) Run(input []byte) ([]byte, error) { + return runBn256Add(input) +} + +// bn256AddByzantium implements a native elliptic curve point addition +// conforming to Byzantium consensus rules. +type bn256AddByzantium struct{} + +// RequiredGas returns the gas required to execute the pre-compiled contract. +func (c *bn256AddByzantium) RequiredGas(input []byte) uint64 { + return params.Bn256AddGasByzantium +} + +func (c *bn256AddByzantium) Run(input []byte) ([]byte, error) { + return runBn256Add(input) +} + +// runBn256ScalarMul implements the Bn256ScalarMul precompile, referenced by +// both Byzantium and Istanbul operations. +func runBn256ScalarMul(input []byte) ([]byte, error) { + p, err := newCurvePoint(getData(input, 0, 64)) + if err != nil { + return nil, err + } + res := new(bn256.G1) + res.ScalarMult(p, new(big.Int).SetBytes(getData(input, 64, 32))) + return res.Marshal(), nil +} + +// bn256ScalarMulIstanbul implements a native elliptic curve scalar +// multiplication conforming to Istanbul consensus rules. +type bn256ScalarMulIstanbul struct{} + +// RequiredGas returns the gas required to execute the pre-compiled contract. +func (c *bn256ScalarMulIstanbul) RequiredGas(input []byte) uint64 { + return params.Bn256ScalarMulGasIstanbul +} + +func (c *bn256ScalarMulIstanbul) Run(input []byte) ([]byte, error) { + return runBn256ScalarMul(input) +} + +// bn256ScalarMulByzantium implements a native elliptic curve scalar +// multiplication conforming to Byzantium consensus rules. +type bn256ScalarMulByzantium struct{} + +// RequiredGas returns the gas required to execute the pre-compiled contract. +func (c *bn256ScalarMulByzantium) RequiredGas(input []byte) uint64 { + return params.Bn256ScalarMulGasByzantium +} + +func (c *bn256ScalarMulByzantium) Run(input []byte) ([]byte, error) { + return runBn256ScalarMul(input) +} + +var ( + // true32Byte is returned if the bn256 pairing check succeeds. + true32Byte = []byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1} + + // false32Byte is returned if the bn256 pairing check fails. + false32Byte = make([]byte, 32) + + // errBadPairingInput is returned if the bn256 pairing input is invalid. + errBadPairingInput = errors.New("bad elliptic curve pairing size") +) + +// runBn256Pairing implements the Bn256Pairing precompile, referenced by both +// Byzantium and Istanbul operations. +func runBn256Pairing(input []byte) ([]byte, error) { + // Handle some corner cases cheaply + if len(input)%192 > 0 { + return nil, errBadPairingInput + } + // Convert the input into a set of coordinates + var ( + cs []*bn256.G1 + ts []*bn256.G2 + ) + for i := 0; i < len(input); i += 192 { + c, err := newCurvePoint(input[i : i+64]) + if err != nil { + return nil, err + } + t, err := newTwistPoint(input[i+64 : i+192]) + if err != nil { + return nil, err + } + cs = append(cs, c) + ts = append(ts, t) + } + // Execute the pairing checks and return the results + if bn256.PairingCheck(cs, ts) { + return true32Byte, nil + } + return false32Byte, nil +} + +// bn256PairingIstanbul implements a pairing pre-compile for the bn256 curve +// conforming to Istanbul consensus rules. +type bn256PairingIstanbul struct{} + +// RequiredGas returns the gas required to execute the pre-compiled contract. +func (c *bn256PairingIstanbul) RequiredGas(input []byte) uint64 { + return params.Bn256PairingBaseGasIstanbul + uint64(len(input)/192)*params.Bn256PairingPerPointGasIstanbul +} + +func (c *bn256PairingIstanbul) Run(input []byte) ([]byte, error) { + return runBn256Pairing(input) +} + +// bn256PairingByzantium implements a pairing pre-compile for the bn256 curve +// conforming to Byzantium consensus rules. +type bn256PairingByzantium struct{} + +// RequiredGas returns the gas required to execute the pre-compiled contract. +func (c *bn256PairingByzantium) RequiredGas(input []byte) uint64 { + return params.Bn256PairingBaseGasByzantium + uint64(len(input)/192)*params.Bn256PairingPerPointGasByzantium +} + +func (c *bn256PairingByzantium) Run(input []byte) ([]byte, error) { + return runBn256Pairing(input) +} + +type blake2F struct{} + +func (c *blake2F) RequiredGas(input []byte) uint64 { + // If the input is malformed, we can't calculate the gas, return 0 and let the + // actual call choke and fault. + if len(input) != blake2FInputLength { + return 0 + } + return uint64(binary.BigEndian.Uint32(input[0:4])) +} + +const ( + blake2FInputLength = 213 + blake2FFinalBlockBytes = byte(1) + blake2FNonFinalBlockBytes = byte(0) +) + +var ( + errBlake2FInvalidInputLength = errors.New("invalid input length") + errBlake2FInvalidFinalFlag = errors.New("invalid final flag") +) + +func (c *blake2F) Run(input []byte) ([]byte, error) { + // Make sure the input is valid (correct length and final flag) + if len(input) != blake2FInputLength { + return nil, errBlake2FInvalidInputLength + } + if input[212] != blake2FNonFinalBlockBytes && input[212] != blake2FFinalBlockBytes { + return nil, errBlake2FInvalidFinalFlag + } + // Parse the input into the Blake2b call parameters + var ( + rounds = binary.BigEndian.Uint32(input[0:4]) + final = input[212] == blake2FFinalBlockBytes + + h [8]uint64 + m [16]uint64 + t [2]uint64 + ) + for i := 0; i < 8; i++ { + offset := 4 + i*8 + h[i] = binary.LittleEndian.Uint64(input[offset : offset+8]) + } + for i := 0; i < 16; i++ { + offset := 68 + i*8 + m[i] = binary.LittleEndian.Uint64(input[offset : offset+8]) + } + t[0] = binary.LittleEndian.Uint64(input[196:204]) + t[1] = binary.LittleEndian.Uint64(input[204:212]) + + // Execute the compression function, extract and return the result + blake2b.F(&h, m, t, final, rounds) + + output := make([]byte, 64) + for i := 0; i < 8; i++ { + offset := i * 8 + binary.LittleEndian.PutUint64(output[offset:offset+8], h[i]) + } + return output, nil +} + +var ( + errBLS12381InvalidInputLength = errors.New("invalid input length") + errBLS12381InvalidFieldElementTopBytes = errors.New("invalid field element top bytes") + errBLS12381G1PointSubgroup = errors.New("g1 point is not on correct subgroup") + errBLS12381G2PointSubgroup = errors.New("g2 point is not on correct subgroup") +) + +// bls12381G1Add implements EIP-2537 G1Add precompile. +type bls12381G1Add struct{} + +// RequiredGas returns the gas required to execute the pre-compiled contract. +func (c *bls12381G1Add) RequiredGas(input []byte) uint64 { + return params.Bls12381G1AddGas +} + +func (c *bls12381G1Add) Run(input []byte) ([]byte, error) { + // Implements EIP-2537 G1Add precompile. + // > G1 addition call expects `256` bytes as an input that is interpreted as byte concatenation of two G1 points (`128` bytes each). + // > Output is an encoding of addition operation result - single G1 point (`128` bytes). + if len(input) != 256 { + return nil, errBLS12381InvalidInputLength + } + var err error + var p0, p1 *bls12381.PointG1 + + // Initialize G1 + g := bls12381.NewG1() + + // Decode G1 point p_0 + if p0, err = g.DecodePoint(input[:128]); err != nil { + return nil, err + } + // Decode G1 point p_1 + if p1, err = g.DecodePoint(input[128:]); err != nil { + return nil, err + } + + // Compute r = p_0 + p_1 + r := g.New() + g.Add(r, p0, p1) + + // Encode the G1 point result into 128 bytes + return g.EncodePoint(r), nil +} + +// bls12381G1Mul implements EIP-2537 G1Mul precompile. +type bls12381G1Mul struct{} + +// RequiredGas returns the gas required to execute the pre-compiled contract. +func (c *bls12381G1Mul) RequiredGas(input []byte) uint64 { + return params.Bls12381G1MulGas +} + +func (c *bls12381G1Mul) Run(input []byte) ([]byte, error) { + // Implements EIP-2537 G1Mul precompile. + // > G1 multiplication call expects `160` bytes as an input that is interpreted as byte concatenation of encoding of G1 point (`128` bytes) and encoding of a scalar value (`32` bytes). + // > Output is an encoding of multiplication operation result - single G1 point (`128` bytes). + if len(input) != 160 { + return nil, errBLS12381InvalidInputLength + } + var err error + var p0 *bls12381.PointG1 + + // Initialize G1 + g := bls12381.NewG1() + + // Decode G1 point + if p0, err = g.DecodePoint(input[:128]); err != nil { + return nil, err + } + // Decode scalar value + e := new(big.Int).SetBytes(input[128:]) + + // Compute r = e * p_0 + r := g.New() + g.MulScalar(r, p0, e) + + // Encode the G1 point into 128 bytes + return g.EncodePoint(r), nil +} + +// bls12381G1MultiExp implements EIP-2537 G1MultiExp precompile. +type bls12381G1MultiExp struct{} + +// RequiredGas returns the gas required to execute the pre-compiled contract. +func (c *bls12381G1MultiExp) RequiredGas(input []byte) uint64 { + // Calculate G1 point, scalar value pair length + k := len(input) / 160 + if k == 0 { + // Return 0 gas for small input length + return 0 + } + // Lookup discount value for G1 point, scalar value pair length + var discount uint64 + if dLen := len(params.Bls12381MultiExpDiscountTable); k < dLen { + discount = params.Bls12381MultiExpDiscountTable[k-1] + } else { + discount = params.Bls12381MultiExpDiscountTable[dLen-1] + } + // Calculate gas and return the result + return (uint64(k) * params.Bls12381G1MulGas * discount) / 1000 +} + +func (c *bls12381G1MultiExp) Run(input []byte) ([]byte, error) { + // Implements EIP-2537 G1MultiExp precompile. + // G1 multiplication call expects `160*k` bytes as an input that is interpreted as byte concatenation of `k` slices each of them being a byte concatenation of encoding of G1 point (`128` bytes) and encoding of a scalar value (`32` bytes). + // Output is an encoding of multiexponentiation operation result - single G1 point (`128` bytes). + k := len(input) / 160 + if len(input) == 0 || len(input)%160 != 0 { + return nil, errBLS12381InvalidInputLength + } + var err error + points := make([]*bls12381.PointG1, k) + scalars := make([]*big.Int, k) + + // Initialize G1 + g := bls12381.NewG1() + + // Decode point scalar pairs + for i := 0; i < k; i++ { + off := 160 * i + t0, t1, t2 := off, off+128, off+160 + // Decode G1 point + if points[i], err = g.DecodePoint(input[t0:t1]); err != nil { + return nil, err + } + // Decode scalar value + scalars[i] = new(big.Int).SetBytes(input[t1:t2]) + } + + // Compute r = e_0 * p_0 + e_1 * p_1 + ... + e_(k-1) * p_(k-1) + r := g.New() + g.MultiExp(r, points, scalars) + + // Encode the G1 point to 128 bytes + return g.EncodePoint(r), nil +} + +// bls12381G2Add implements EIP-2537 G2Add precompile. +type bls12381G2Add struct{} + +// RequiredGas returns the gas required to execute the pre-compiled contract. +func (c *bls12381G2Add) RequiredGas(input []byte) uint64 { + return params.Bls12381G2AddGas +} + +func (c *bls12381G2Add) Run(input []byte) ([]byte, error) { + // Implements EIP-2537 G2Add precompile. + // > G2 addition call expects `512` bytes as an input that is interpreted as byte concatenation of two G2 points (`256` bytes each). + // > Output is an encoding of addition operation result - single G2 point (`256` bytes). + if len(input) != 512 { + return nil, errBLS12381InvalidInputLength + } + var err error + var p0, p1 *bls12381.PointG2 + + // Initialize G2 + g := bls12381.NewG2() + r := g.New() + + // Decode G2 point p_0 + if p0, err = g.DecodePoint(input[:256]); err != nil { + return nil, err + } + // Decode G2 point p_1 + if p1, err = g.DecodePoint(input[256:]); err != nil { + return nil, err + } + + // Compute r = p_0 + p_1 + g.Add(r, p0, p1) + + // Encode the G2 point into 256 bytes + return g.EncodePoint(r), nil +} + +// bls12381G2Mul implements EIP-2537 G2Mul precompile. +type bls12381G2Mul struct{} + +// RequiredGas returns the gas required to execute the pre-compiled contract. +func (c *bls12381G2Mul) RequiredGas(input []byte) uint64 { + return params.Bls12381G2MulGas +} + +func (c *bls12381G2Mul) Run(input []byte) ([]byte, error) { + // Implements EIP-2537 G2MUL precompile logic. + // > G2 multiplication call expects `288` bytes as an input that is interpreted as byte concatenation of encoding of G2 point (`256` bytes) and encoding of a scalar value (`32` bytes). + // > Output is an encoding of multiplication operation result - single G2 point (`256` bytes). + if len(input) != 288 { + return nil, errBLS12381InvalidInputLength + } + var err error + var p0 *bls12381.PointG2 + + // Initialize G2 + g := bls12381.NewG2() + + // Decode G2 point + if p0, err = g.DecodePoint(input[:256]); err != nil { + return nil, err + } + // Decode scalar value + e := new(big.Int).SetBytes(input[256:]) + + // Compute r = e * p_0 + r := g.New() + g.MulScalar(r, p0, e) + + // Encode the G2 point into 256 bytes + return g.EncodePoint(r), nil +} + +// bls12381G2MultiExp implements EIP-2537 G2MultiExp precompile. +type bls12381G2MultiExp struct{} + +// RequiredGas returns the gas required to execute the pre-compiled contract. +func (c *bls12381G2MultiExp) RequiredGas(input []byte) uint64 { + // Calculate G2 point, scalar value pair length + k := len(input) / 288 + if k == 0 { + // Return 0 gas for small input length + return 0 + } + // Lookup discount value for G2 point, scalar value pair length + var discount uint64 + if dLen := len(params.Bls12381MultiExpDiscountTable); k < dLen { + discount = params.Bls12381MultiExpDiscountTable[k-1] + } else { + discount = params.Bls12381MultiExpDiscountTable[dLen-1] + } + // Calculate gas and return the result + return (uint64(k) * params.Bls12381G2MulGas * discount) / 1000 +} + +func (c *bls12381G2MultiExp) Run(input []byte) ([]byte, error) { + // Implements EIP-2537 G2MultiExp precompile logic + // > G2 multiplication call expects `288*k` bytes as an input that is interpreted as byte concatenation of `k` slices each of them being a byte concatenation of encoding of G2 point (`256` bytes) and encoding of a scalar value (`32` bytes). + // > Output is an encoding of multiexponentiation operation result - single G2 point (`256` bytes). + k := len(input) / 288 + if len(input) == 0 || len(input)%288 != 0 { + return nil, errBLS12381InvalidInputLength + } + var err error + points := make([]*bls12381.PointG2, k) + scalars := make([]*big.Int, k) + + // Initialize G2 + g := bls12381.NewG2() + + // Decode point scalar pairs + for i := 0; i < k; i++ { + off := 288 * i + t0, t1, t2 := off, off+256, off+288 + // Decode G1 point + if points[i], err = g.DecodePoint(input[t0:t1]); err != nil { + return nil, err + } + // Decode scalar value + scalars[i] = new(big.Int).SetBytes(input[t1:t2]) + } + + // Compute r = e_0 * p_0 + e_1 * p_1 + ... + e_(k-1) * p_(k-1) + r := g.New() + g.MultiExp(r, points, scalars) + + // Encode the G2 point to 256 bytes. + return g.EncodePoint(r), nil +} + +// bls12381Pairing implements EIP-2537 Pairing precompile. +type bls12381Pairing struct{} + +// RequiredGas returns the gas required to execute the pre-compiled contract. +func (c *bls12381Pairing) RequiredGas(input []byte) uint64 { + return params.Bls12381PairingBaseGas + uint64(len(input)/384)*params.Bls12381PairingPerPairGas +} + +func (c *bls12381Pairing) Run(input []byte) ([]byte, error) { + // Implements EIP-2537 Pairing precompile logic. + // > Pairing call expects `384*k` bytes as an inputs that is interpreted as byte concatenation of `k` slices. Each slice has the following structure: + // > - `128` bytes of G1 point encoding + // > - `256` bytes of G2 point encoding + // > Output is a `32` bytes where last single byte is `0x01` if pairing result is equal to multiplicative identity in a pairing target field and `0x00` otherwise + // > (which is equivalent of Big Endian encoding of Solidity values `uint256(1)` and `uin256(0)` respectively). + k := len(input) / 384 + if len(input) == 0 || len(input)%384 != 0 { + return nil, errBLS12381InvalidInputLength + } + + // Initialize BLS12-381 pairing engine + e := bls12381.NewPairingEngine() + g1, g2 := e.G1, e.G2 + + // Decode pairs + for i := 0; i < k; i++ { + off := 384 * i + t0, t1, t2 := off, off+128, off+384 + + // Decode G1 point + p1, err := g1.DecodePoint(input[t0:t1]) + if err != nil { + return nil, err + } + // Decode G2 point + p2, err := g2.DecodePoint(input[t1:t2]) + if err != nil { + return nil, err + } + + // 'point is on curve' check already done, + // Here we need to apply subgroup checks. + if !g1.InCorrectSubgroup(p1) { + return nil, errBLS12381G1PointSubgroup + } + if !g2.InCorrectSubgroup(p2) { + return nil, errBLS12381G2PointSubgroup + } + + // Update pairing engine with G1 and G2 ponits + e.AddPair(p1, p2) + } + // Prepare 32 byte output + out := make([]byte, 32) + + // Compute pairing and set the result + if e.Check() { + out[31] = 1 + } + return out, nil +} + +// decodeBLS12381FieldElement decodes BLS12-381 elliptic curve field element. +// Removes top 16 bytes of 64 byte input. +func decodeBLS12381FieldElement(in []byte) ([]byte, error) { + if len(in) != 64 { + return nil, errors.New("invalid field element length") + } + // check top bytes + for i := 0; i < 16; i++ { + if in[i] != byte(0x00) { + return nil, errBLS12381InvalidFieldElementTopBytes + } + } + out := make([]byte, 48) + copy(out[:], in[16:]) + return out, nil +} + +// bls12381MapG1 implements EIP-2537 MapG1 precompile. +type bls12381MapG1 struct{} + +// RequiredGas returns the gas required to execute the pre-compiled contract. +func (c *bls12381MapG1) RequiredGas(input []byte) uint64 { + return params.Bls12381MapG1Gas +} + +func (c *bls12381MapG1) Run(input []byte) ([]byte, error) { + // Implements EIP-2537 Map_To_G1 precompile. + // > Field-to-curve call expects `64` bytes an an input that is interpreted as a an element of the base field. + // > Output of this call is `128` bytes and is G1 point following respective encoding rules. + if len(input) != 64 { + return nil, errBLS12381InvalidInputLength + } + + // Decode input field element + fe, err := decodeBLS12381FieldElement(input) + if err != nil { + return nil, err + } + + // Initialize G1 + g := bls12381.NewG1() + + // Compute mapping + r, err := g.MapToCurve(fe) + if err != nil { + return nil, err + } + + // Encode the G1 point to 128 bytes + return g.EncodePoint(r), nil +} + +// bls12381MapG2 implements EIP-2537 MapG2 precompile. +type bls12381MapG2 struct{} + +// RequiredGas returns the gas required to execute the pre-compiled contract. +func (c *bls12381MapG2) RequiredGas(input []byte) uint64 { + return params.Bls12381MapG2Gas +} + +func (c *bls12381MapG2) Run(input []byte) ([]byte, error) { + // Implements EIP-2537 Map_FP2_TO_G2 precompile logic. + // > Field-to-curve call expects `128` bytes an an input that is interpreted as a an element of the quadratic extension field. + // > Output of this call is `256` bytes and is G2 point following respective encoding rules. + if len(input) != 128 { + return nil, errBLS12381InvalidInputLength + } + + // Decode input field element + fe := make([]byte, 96) + c0, err := decodeBLS12381FieldElement(input[:64]) + if err != nil { + return nil, err + } + copy(fe[48:], c0) + c1, err := decodeBLS12381FieldElement(input[64:]) + if err != nil { + return nil, err + } + copy(fe[:48], c1) + + // Initialize G2 + g := bls12381.NewG2() + + // Compute mapping + r, err := g.MapToCurve(fe) + if err != nil { + return nil, err + } + + // Encode the G2 point to 256 bytes + return g.EncodePoint(r), nil +} diff --git a/x/evm/vm/doc.go b/x/evm/vm/doc.go new file mode 100644 index 00000000..5864d0cf --- /dev/null +++ b/x/evm/vm/doc.go @@ -0,0 +1,24 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +/* +Package vm implements the Ethereum Virtual Machine. + +The vm package implements one EVM, a byte code VM. The BC (Byte Code) VM loops +over a set of bytes and executes them according to the set of rules defined +in the Ethereum yellow paper. +*/ +package vm diff --git a/x/evm/vm/eips.go b/x/evm/vm/eips.go new file mode 100644 index 00000000..93f5c399 --- /dev/null +++ b/x/evm/vm/eips.go @@ -0,0 +1,194 @@ +// Copyright 2019 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package vm + +import ( + "fmt" + "sort" + + "github.com/ethereum/go-ethereum/params" + "github.com/holiman/uint256" +) + +var activators = map[int]func(*JumpTable){ + 3855: enable3855, + 3529: enable3529, + 3198: enable3198, + 2929: enable2929, + 2200: enable2200, + 1884: enable1884, + 1344: enable1344, +} + +// EnableEIP enables the given EIP on the config. +// This operation writes in-place, and callers need to ensure that the globally +// defined jump tables are not polluted. +func EnableEIP(eipNum int, jt *JumpTable) error { + enablerFn, ok := activators[eipNum] + if !ok { + return fmt.Errorf("undefined eip %d", eipNum) + } + enablerFn(jt) + return nil +} + +func ValidEip(eipNum int) bool { + _, ok := activators[eipNum] + return ok +} +func ActivateableEips() []string { + var nums []string + for k := range activators { + nums = append(nums, fmt.Sprintf("%d", k)) + } + sort.Strings(nums) + return nums +} + +// enable1884 applies EIP-1884 to the given jump table: +// - Increase cost of BALANCE to 700 +// - Increase cost of EXTCODEHASH to 700 +// - Increase cost of SLOAD to 800 +// - Define SELFBALANCE, with cost GasFastStep (5) +func enable1884(jt *JumpTable) { + // Gas cost changes + jt[SLOAD].constantGas = params.SloadGasEIP1884 + jt[BALANCE].constantGas = params.BalanceGasEIP1884 + jt[EXTCODEHASH].constantGas = params.ExtcodeHashGasEIP1884 + + // New opcode + jt[SELFBALANCE] = &operation{ + execute: opSelfBalance, + constantGas: GasFastStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + } +} + +func opSelfBalance(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + balance, _ := uint256.FromBig(interpreter.evm.StateDB.GetBalance(scope.Contract.Address())) + scope.Stack.push(balance) + return nil, nil +} + +// enable1344 applies EIP-1344 (ChainID Opcode) +// - Adds an opcode that returns the current chain’s EIP-155 unique identifier +func enable1344(jt *JumpTable) { + // New opcode + jt[CHAINID] = &operation{ + execute: opChainID, + constantGas: GasQuickStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + } +} + +// opChainID implements CHAINID opcode +func opChainID(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + chainId, _ := uint256.FromBig(interpreter.evm.chainConfig.ChainID) + scope.Stack.push(chainId) + return nil, nil +} + +// enable2200 applies EIP-2200 (Rebalance net-metered SSTORE) +func enable2200(jt *JumpTable) { + jt[SLOAD].constantGas = params.SloadGasEIP2200 + jt[SSTORE].dynamicGas = gasSStoreEIP2200 +} + +// enable2929 enables "EIP-2929: Gas cost increases for state access opcodes" +// https://eips.ethereum.org/EIPS/eip-2929 +func enable2929(jt *JumpTable) { + jt[SSTORE].dynamicGas = gasSStoreEIP2929 + + jt[SLOAD].constantGas = 0 + jt[SLOAD].dynamicGas = gasSLoadEIP2929 + + jt[EXTCODECOPY].constantGas = params.WarmStorageReadCostEIP2929 + jt[EXTCODECOPY].dynamicGas = gasExtCodeCopyEIP2929 + + jt[EXTCODESIZE].constantGas = params.WarmStorageReadCostEIP2929 + jt[EXTCODESIZE].dynamicGas = gasEip2929AccountCheck + + jt[EXTCODEHASH].constantGas = params.WarmStorageReadCostEIP2929 + jt[EXTCODEHASH].dynamicGas = gasEip2929AccountCheck + + jt[BALANCE].constantGas = params.WarmStorageReadCostEIP2929 + jt[BALANCE].dynamicGas = gasEip2929AccountCheck + + jt[CALL].constantGas = params.WarmStorageReadCostEIP2929 + jt[CALL].dynamicGas = gasCallEIP2929 + + jt[CALLCODE].constantGas = params.WarmStorageReadCostEIP2929 + jt[CALLCODE].dynamicGas = gasCallCodeEIP2929 + + jt[STATICCALL].constantGas = params.WarmStorageReadCostEIP2929 + jt[STATICCALL].dynamicGas = gasStaticCallEIP2929 + + jt[DELEGATECALL].constantGas = params.WarmStorageReadCostEIP2929 + jt[DELEGATECALL].dynamicGas = gasDelegateCallEIP2929 + + // This was previously part of the dynamic cost, but we're using it as a constantGas + // factor here + jt[SELFDESTRUCT].constantGas = params.SelfdestructGasEIP150 + jt[SELFDESTRUCT].dynamicGas = gasSelfdestructEIP2929 +} + +// enable3529 enabled "EIP-3529: Reduction in refunds": +// - Removes refunds for selfdestructs +// - Reduces refunds for SSTORE +// - Reduces max refunds to 20% gas +func enable3529(jt *JumpTable) { + jt[SSTORE].dynamicGas = gasSStoreEIP3529 + jt[SELFDESTRUCT].dynamicGas = gasSelfdestructEIP3529 +} + +// enable3198 applies EIP-3198 (BASEFEE Opcode) +// - Adds an opcode that returns the current block's base fee. +func enable3198(jt *JumpTable) { + // New opcode + jt[BASEFEE] = &operation{ + execute: opBaseFee, + constantGas: GasQuickStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + } +} + +// opBaseFee implements BASEFEE opcode +func opBaseFee(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + baseFee, _ := uint256.FromBig(interpreter.evm.Context.BaseFee) + scope.Stack.push(baseFee) + return nil, nil +} + +// enable3855 applies EIP-3855 (PUSH0 opcode) +func enable3855(jt *JumpTable) { + // New opcode + jt[PUSH0] = &operation{ + execute: opPush0, + constantGas: GasQuickStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + } +} + +// opPush0 implements the PUSH0 opcode +func opPush0(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + scope.Stack.push(new(uint256.Int)) + return nil, nil +} diff --git a/x/evm/vm/errors.go b/x/evm/vm/errors.go new file mode 100644 index 00000000..004f8ef1 --- /dev/null +++ b/x/evm/vm/errors.go @@ -0,0 +1,72 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package vm + +import ( + "errors" + "fmt" +) + +// List evm execution errors +var ( + ErrOutOfGas = errors.New("out of gas") + ErrCodeStoreOutOfGas = errors.New("contract creation code storage out of gas") + ErrDepth = errors.New("max call depth exceeded") + ErrInsufficientBalance = errors.New("insufficient balance for transfer") + ErrContractAddressCollision = errors.New("contract address collision") + ErrExecutionReverted = errors.New("execution reverted") + ErrMaxCodeSizeExceeded = errors.New("max code size exceeded") + ErrInvalidJump = errors.New("invalid jump destination") + ErrWriteProtection = errors.New("write protection") + ErrReturnDataOutOfBounds = errors.New("return data out of bounds") + ErrGasUintOverflow = errors.New("gas uint64 overflow") + ErrInvalidCode = errors.New("invalid code: must not begin with 0xef") + ErrNonceUintOverflow = errors.New("nonce uint64 overflow") + + // errStopToken is an internal token indicating interpreter loop termination, + // never returned to outside callers. + errStopToken = errors.New("stop token") +) + +// ErrStackUnderflow wraps an evm error when the items on the stack less +// than the minimal requirement. +type ErrStackUnderflow struct { + stackLen int + required int +} + +func (e *ErrStackUnderflow) Error() string { + return fmt.Sprintf("stack underflow (%d <=> %d)", e.stackLen, e.required) +} + +// ErrStackOverflow wraps an evm error when the items on the stack exceeds +// the maximum allowance. +type ErrStackOverflow struct { + stackLen int + limit int +} + +func (e *ErrStackOverflow) Error() string { + return fmt.Sprintf("stack limit reached %d (%d)", e.stackLen, e.limit) +} + +// ErrInvalidOpCode wraps an evm error when an invalid opcode is encountered. +type ErrInvalidOpCode struct { + opcode OpCode +} + +func (e *ErrInvalidOpCode) Error() string { return fmt.Sprintf("invalid opcode: %s", e.opcode) } diff --git a/x/evm/vm/evm.go b/x/evm/vm/evm.go new file mode 100644 index 00000000..84df83cb --- /dev/null +++ b/x/evm/vm/evm.go @@ -0,0 +1,630 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package vm + +import ( + "math/big" + "sync/atomic" + "time" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/consensus" + "github.com/ethereum/go-ethereum/core" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/crypto" + "github.com/ethereum/go-ethereum/params" + "github.com/holiman/uint256" +) + +// emptyCodeHash is used by create to ensure deployment is disallowed to already +// deployed contract addresses (relevant after the account abstraction). +var emptyCodeHash = crypto.Keccak256Hash(nil) + +type ( + // CanTransferFunc is the signature of a transfer guard function + CanTransferFunc func(StateDB, common.Address, *big.Int) bool + // TransferFunc is the signature of a transfer function + TransferFunc func(StateDB, common.Address, common.Address, *big.Int) + // GetHashFunc returns the n'th block hash in the blockchain + // and is used by the BLOCKHASH EVM op code. + GetHashFunc func(uint64) common.Hash + + // custom + // PrepayFunc execute prepay with provided data in PREPAY OpCode + PrepayFunc func(evm *EVM, from, beneficiary common.Address, amount *big.Int, gas uint64) (*big.Int, uint64, error) +) + +func (evm *EVM) precompile(addr common.Address) (PrecompiledContract, bool) { + var precompiles map[common.Address]PrecompiledContract + switch { + case evm.chainRules.IsBerlin: + precompiles = PrecompiledContractsBerlin + case evm.chainRules.IsIstanbul: + precompiles = PrecompiledContractsIstanbul + case evm.chainRules.IsByzantium: + precompiles = PrecompiledContractsByzantium + default: + precompiles = PrecompiledContractsHomestead + } + p, ok := precompiles[addr] + return p, ok +} + +// BlockContext provides the EVM with auxiliary information. Once provided +// it shouldn't be modified. +type BlockContext struct { + // CanTransfer returns whether the account contains + // sufficient ether to transfer the value + CanTransfer CanTransferFunc + // Transfer transfers ether from one account to the other + Transfer TransferFunc + // GetHash returns the hash corresponding to n + GetHash GetHashFunc + // Prepay execute prepay with given context + Prepay PrepayFunc + + // Block information + Coinbase common.Address // Provides information for COINBASE + GasLimit uint64 // Provides information for GASLIMIT + BlockNumber *big.Int // Provides information for NUMBER + Time *big.Int // Provides information for TIME + Difficulty *big.Int // Provides information for DIFFICULTY + BaseFee *big.Int // Provides information for BASEFEE + Random *common.Hash // Provides information for RANDOM +} + +// TxContext provides the EVM with information about a transaction. +// All fields can change between transactions. +type TxContext struct { + // Message information + Origin common.Address // Provides information for ORIGIN + GasPrice *big.Int // Provides information for GASPRICE +} + +// EVM is the Ethereum Virtual Machine base object and provides +// the necessary tools to run a contract on the given state with +// the provided context. It should be noted that any error +// generated through any of the calls should be considered a +// revert-state-and-consume-all-gas operation, no checks on +// specific errors should ever be performed. The interpreter makes +// sure that any errors generated are to be considered faulty code. +// +// The EVM should never be reused and is not thread safe. +type EVM struct { + // Context provides auxiliary blockchain related information + Context BlockContext + TxContext + // StateDB gives access to the underlying state + StateDB StateDB + // Depth is the current call stack + depth int + + // chainConfig contains information about the current chain + chainConfig *params.ChainConfig + // chain rules contains the chain rules for the current epoch + chainRules params.Rules + // virtual machine configuration options used to initialise the + // evm. + Config Config + // global (to this context) ethereum virtual machine + // used throughout the execution of the tx. + interpreter *EVMInterpreter + // abort is used to abort the EVM calling operations + // NOTE: must be set atomically + abort int32 + // callGasTemp holds the gas available for the current call. This is needed because the + // available gas is calculated in gasCall* according to the 63/64 rule and later + // applied in opCall*. + callGasTemp uint64 + // genesisContractVerifier verifies is contract is trusted in order to allow curtain opcodes + genesisContractVerifier *GenesisContractVerifier +} + +// NewEVM returns a new EVM. The returned EVM is not thread safe and should +// only ever be used *once*. +func NewEVM(blockCtx BlockContext, txCtx TxContext, statedb StateDB, chainConfig *params.ChainConfig, config Config, genesisContractVerifier *GenesisContractVerifier) *EVM { + evm := &EVM{ + Context: blockCtx, + TxContext: txCtx, + StateDB: statedb, + Config: config, + chainConfig: chainConfig, + chainRules: chainConfig.Rules(blockCtx.BlockNumber, blockCtx.Random != nil), + genesisContractVerifier: genesisContractVerifier, + } + evm.interpreter = NewEVMInterpreter(evm, config) + return evm +} + +// Reset resets the EVM with a new transaction context.Reset +// This is not threadsafe and should only be done very cautiously. +func (evm *EVM) Reset(txCtx TxContext, statedb StateDB) { + evm.TxContext = txCtx + evm.StateDB = statedb +} + +// Cancel cancels any running EVM operation. This may be called concurrently and +// it's safe to be called multiple times. +func (evm *EVM) Cancel() { + atomic.StoreInt32(&evm.abort, 1) +} + +// Cancelled returns true if Cancel has been called +func (evm *EVM) Cancelled() bool { + return atomic.LoadInt32(&evm.abort) == 1 +} + +// Interpreter returns the current interpreter +func (evm *EVM) Interpreter() *EVMInterpreter { + return evm.interpreter +} + +// Call executes the contract associated with the addr with the given input as +// parameters. It also handles any necessary value transfer required and takes +// the necessary steps to create accounts and reverses the state in case of an +// execution error or failed value transfer. +func (evm *EVM) Call(caller ContractRef, addr common.Address, input []byte, gas uint64, value *big.Int) (ret []byte, leftOverGas uint64, err error) { + // Fail if we're trying to execute above the call depth limit + if evm.depth > int(params.CallCreateDepth) { + return nil, gas, ErrDepth + } + // Fail if we're trying to transfer more than the available balance + if value.Sign() != 0 && !evm.Context.CanTransfer(evm.StateDB, caller.Address(), value) { + return nil, gas, ErrInsufficientBalance + } + snapshot := evm.StateDB.Snapshot() + p, isPrecompile := evm.precompile(addr) + + if !evm.StateDB.Exist(addr) { + if !isPrecompile && evm.chainRules.IsEIP158 && value.Sign() == 0 { + // Calling a non existing account, don't do anything, but ping the tracer + if evm.Config.Debug { + if evm.depth == 0 { + evm.Config.Tracer.CaptureStart(evm, caller.Address(), addr, false, input, gas, value) + evm.Config.Tracer.CaptureEnd(ret, 0, 0, nil) + } else { + evm.Config.Tracer.CaptureEnter(CALL, caller.Address(), addr, input, gas, value) + evm.Config.Tracer.CaptureExit(ret, 0, nil) + } + } + return nil, gas, nil + } + evm.StateDB.CreateAccount(addr) + } + evm.Context.Transfer(evm.StateDB, caller.Address(), addr, value) + + // Capture the tracer start/end events in debug mode + if evm.Config.Debug { + if evm.depth == 0 { + evm.Config.Tracer.CaptureStart(evm, caller.Address(), addr, false, input, gas, value) + defer func(startGas uint64, startTime time.Time) { // Lazy evaluation of the parameters + evm.Config.Tracer.CaptureEnd(ret, startGas-gas, time.Since(startTime), err) + }(gas, time.Now()) + } else { + // Handle tracer events for entering and exiting a call frame + evm.Config.Tracer.CaptureEnter(CALL, caller.Address(), addr, input, gas, value) + defer func(startGas uint64) { + evm.Config.Tracer.CaptureExit(ret, startGas-gas, err) + }(gas) + } + } + + if isPrecompile { + ret, gas, err = RunPrecompiledContract(p, input, gas) + } else { + // Initialise a new contract and set the code that is to be used by the EVM. + // The contract is a scoped environment for this execution context only. + code := evm.StateDB.GetCode(addr) + if len(code) == 0 { + ret, err = nil, nil // gas is unchanged + } else { + addrCopy := addr + // If the account has no code, we can abort here + // The depth-check is already done, and precompiles handled above + contract := NewContract(caller, AccountRef(addrCopy), value, gas) + contract.SetCallCode(&addrCopy, evm.StateDB.GetCodeHash(addrCopy), code) + ret, err = evm.interpreter.Run(contract, input, false) + gas = contract.Gas + } + } + // When an error was returned by the EVM or when setting the creation code + // above we revert to the snapshot and consume any gas remaining. Additionally + // when we're in homestead this also counts for code storage gas errors. + if err != nil { + evm.StateDB.RevertToSnapshot(snapshot) + if err != ErrExecutionReverted { + gas = 0 + } + // TODO: consider clearing up unused snapshots: + //} else { + // evm.StateDB.DiscardSnapshot(snapshot) + } + return ret, gas, err +} + +// CallCode executes the contract associated with the addr with the given input +// as parameters. It also handles any necessary value transfer required and takes +// the necessary steps to create accounts and reverses the state in case of an +// execution error or failed value transfer. +// +// CallCode differs from Call in the sense that it executes the given address' +// code with the caller as context. +func (evm *EVM) CallCode(caller ContractRef, addr common.Address, input []byte, gas uint64, value *big.Int) (ret []byte, leftOverGas uint64, err error) { + // Fail if we're trying to execute above the call depth limit + if evm.depth > int(params.CallCreateDepth) { + return nil, gas, ErrDepth + } + // Fail if we're trying to transfer more than the available balance + // Note although it's noop to transfer X ether to caller itself. But + // if caller doesn't have enough balance, it would be an error to allow + // over-charging itself. So the check here is necessary. + if !evm.Context.CanTransfer(evm.StateDB, caller.Address(), value) { + return nil, gas, ErrInsufficientBalance + } + var snapshot = evm.StateDB.Snapshot() + + // Invoke tracer hooks that signal entering/exiting a call frame + if evm.Config.Debug { + evm.Config.Tracer.CaptureEnter(CALLCODE, caller.Address(), addr, input, gas, value) + defer func(startGas uint64) { + evm.Config.Tracer.CaptureExit(ret, startGas-gas, err) + }(gas) + } + + // It is allowed to call precompiles, even via delegatecall + if p, isPrecompile := evm.precompile(addr); isPrecompile { + ret, gas, err = RunPrecompiledContract(p, input, gas) + } else { + addrCopy := addr + // Initialise a new contract and set the code that is to be used by the EVM. + // The contract is a scoped environment for this execution context only. + contract := NewContract(caller, AccountRef(caller.Address()), value, gas) + contract.SetCallCode(&addrCopy, evm.StateDB.GetCodeHash(addrCopy), evm.StateDB.GetCode(addrCopy)) + ret, err = evm.interpreter.Run(contract, input, false) + gas = contract.Gas + } + if err != nil { + evm.StateDB.RevertToSnapshot(snapshot) + if err != ErrExecutionReverted { + gas = 0 + } + } + return ret, gas, err +} + +// DelegateCall executes the contract associated with the addr with the given input +// as parameters. It reverses the state in case of an execution error. +// +// DelegateCall differs from CallCode in the sense that it executes the given address' +// code with the caller as context and the caller is set to the caller of the caller. +func (evm *EVM) DelegateCall(caller ContractRef, addr common.Address, input []byte, gas uint64) (ret []byte, leftOverGas uint64, err error) { + // Fail if we're trying to execute above the call depth limit + if evm.depth > int(params.CallCreateDepth) { + return nil, gas, ErrDepth + } + var snapshot = evm.StateDB.Snapshot() + + // Invoke tracer hooks that signal entering/exiting a call frame + if evm.Config.Debug { + evm.Config.Tracer.CaptureEnter(DELEGATECALL, caller.Address(), addr, input, gas, nil) + defer func(startGas uint64) { + evm.Config.Tracer.CaptureExit(ret, startGas-gas, err) + }(gas) + } + + // It is allowed to call precompiles, even via delegatecall + if p, isPrecompile := evm.precompile(addr); isPrecompile { + ret, gas, err = RunPrecompiledContract(p, input, gas) + } else { + addrCopy := addr + // Initialise a new contract and make initialise the delegate values + contract := NewContract(caller, AccountRef(caller.Address()), nil, gas).AsDelegate() + contract.SetCallCode(&addrCopy, evm.StateDB.GetCodeHash(addrCopy), evm.StateDB.GetCode(addrCopy)) + ret, err = evm.interpreter.Run(contract, input, false) + gas = contract.Gas + } + if err != nil { + evm.StateDB.RevertToSnapshot(snapshot) + if err != ErrExecutionReverted { + gas = 0 + } + } + return ret, gas, err +} + +// StaticCall executes the contract associated with the addr with the given input +// as parameters while disallowing any modifications to the state during the call. +// Opcodes that attempt to perform such modifications will result in exceptions +// instead of performing the modifications. +func (evm *EVM) StaticCall(caller ContractRef, addr common.Address, input []byte, gas uint64) (ret []byte, leftOverGas uint64, err error) { + // Fail if we're trying to execute above the call depth limit + if evm.depth > int(params.CallCreateDepth) { + return nil, gas, ErrDepth + } + // We take a snapshot here. This is a bit counter-intuitive, and could probably be skipped. + // However, even a staticcall is considered a 'touch'. On mainnet, static calls were introduced + // after all empty accounts were deleted, so this is not required. However, if we omit this, + // then certain tests start failing; stRevertTest/RevertPrecompiledTouchExactOOG.json. + // We could change this, but for now it's left for legacy reasons + var snapshot = evm.StateDB.Snapshot() + + // We do an AddBalance of zero here, just in order to trigger a touch. + // This doesn't matter on Mainnet, where all empties are gone at the time of Byzantium, + // but is the correct thing to do and matters on other networks, in tests, and potential + // future scenarios + evm.StateDB.AddBalance(addr, big0) + + // Invoke tracer hooks that signal entering/exiting a call frame + if evm.Config.Debug { + evm.Config.Tracer.CaptureEnter(STATICCALL, caller.Address(), addr, input, gas, nil) + defer func(startGas uint64) { + evm.Config.Tracer.CaptureExit(ret, startGas-gas, err) + }(gas) + } + + if p, isPrecompile := evm.precompile(addr); isPrecompile { + ret, gas, err = RunPrecompiledContract(p, input, gas) + } else { + // At this point, we use a copy of address. If we don't, the go compiler will + // leak the 'contract' to the outer scope, and make allocation for 'contract' + // even if the actual execution ends on RunPrecompiled above. + addrCopy := addr + // Initialise a new contract and set the code that is to be used by the EVM. + // The contract is a scoped environment for this execution context only. + contract := NewContract(caller, AccountRef(addrCopy), new(big.Int), gas) + contract.SetCallCode(&addrCopy, evm.StateDB.GetCodeHash(addrCopy), evm.StateDB.GetCode(addrCopy)) + // When an error was returned by the EVM or when setting the creation code + // above we revert to the snapshot and consume any gas remaining. Additionally + // when we're in Homestead this also counts for code storage gas errors. + ret, err = evm.interpreter.Run(contract, input, true) + gas = contract.Gas + } + if err != nil { + evm.StateDB.RevertToSnapshot(snapshot) + if err != ErrExecutionReverted { + gas = 0 + } + } + return ret, gas, err +} + +type codeAndHash struct { + code []byte + hash common.Hash +} + +func (c *codeAndHash) Hash() common.Hash { + if c.hash == (common.Hash{}) { + c.hash = crypto.Keccak256Hash(c.code) + } + return c.hash +} + +// create creates a new contract using code as deployment code. +func (evm *EVM) create(caller ContractRef, codeAndHash *codeAndHash, gas uint64, value *big.Int, address common.Address, typ OpCode) ([]byte, common.Address, uint64, error) { + // Depth check execution. Fail if we're trying to execute above the + // limit. + if evm.depth > int(params.CallCreateDepth) { + return nil, common.Address{}, gas, ErrDepth + } + if !evm.Context.CanTransfer(evm.StateDB, caller.Address(), value) { + return nil, common.Address{}, gas, ErrInsufficientBalance + } + nonce := evm.StateDB.GetNonce(caller.Address()) + if nonce+1 < nonce { + return nil, common.Address{}, gas, ErrNonceUintOverflow + } + evm.StateDB.SetNonce(caller.Address(), nonce+1) + // We add this to the access list _before_ taking a snapshot. Even if the creation fails, + // the access-list change should not be rolled back + if evm.chainRules.IsBerlin { + evm.StateDB.AddAddressToAccessList(address) + } + // Ensure there's no existing contract already at the designated address + contractHash := evm.StateDB.GetCodeHash(address) + if evm.StateDB.GetNonce(address) != 0 || (contractHash != (common.Hash{}) && contractHash != emptyCodeHash) { + return nil, common.Address{}, 0, ErrContractAddressCollision + } + // Create a new account on the state + snapshot := evm.StateDB.Snapshot() + evm.StateDB.CreateAccount(address) + if evm.chainRules.IsEIP158 { + evm.StateDB.SetNonce(address, 1) + } + evm.Context.Transfer(evm.StateDB, caller.Address(), address, value) + + // Initialise a new contract and set the code that is to be used by the EVM. + // The contract is a scoped environment for this execution context only. + contract := NewContract(caller, AccountRef(address), value, gas) + contract.SetCodeOptionalHash(&address, codeAndHash) + + if evm.Config.Debug { + if evm.depth == 0 { + evm.Config.Tracer.CaptureStart(evm, caller.Address(), address, true, codeAndHash.code, gas, value) + } else { + evm.Config.Tracer.CaptureEnter(typ, caller.Address(), address, codeAndHash.code, gas, value) + } + } + + start := time.Now() + + ret, err := evm.interpreter.Run(contract, nil, false) + + // Check whether the max code size has been exceeded, assign err if the case. + if err == nil && evm.chainRules.IsEIP158 && len(ret) > params.MaxCodeSize { + err = ErrMaxCodeSizeExceeded + } + + // Reject code starting with 0xEF if EIP-3541 is enabled. + if err == nil && len(ret) >= 1 && ret[0] == 0xEF && evm.chainRules.IsLondon { + err = ErrInvalidCode + } + + // if the contract creation ran successfully and no errors were returned + // calculate the gas required to store the code. If the code could not + // be stored due to not enough gas set an error and let it be handled + // by the error checking condition below. + if err == nil { + createDataGas := uint64(len(ret)) * params.CreateDataGas + if contract.UseGas(createDataGas) { + evm.StateDB.SetCode(address, ret) + } else { + err = ErrCodeStoreOutOfGas + } + } + + // When an error was returned by the EVM or when setting the creation code + // above we revert to the snapshot and consume any gas remaining. Additionally + // when we're in homestead this also counts for code storage gas errors. + if err != nil && (evm.chainRules.IsHomestead || err != ErrCodeStoreOutOfGas) { + evm.StateDB.RevertToSnapshot(snapshot) + if err != ErrExecutionReverted { + contract.UseGas(contract.Gas) + } + } + + if evm.Config.Debug { + if evm.depth == 0 { + evm.Config.Tracer.CaptureEnd(ret, gas-contract.Gas, time.Since(start), err) + } else { + evm.Config.Tracer.CaptureExit(ret, gas-contract.Gas, err) + } + } + return ret, address, contract.Gas, err +} + +// Create creates a new contract using code as deployment code. +func (evm *EVM) Create(caller ContractRef, code []byte, gas uint64, value *big.Int) (ret []byte, contractAddr common.Address, leftOverGas uint64, err error) { + contractAddr = crypto.CreateAddress(caller.Address(), evm.StateDB.GetNonce(caller.Address())) + return evm.create(caller, &codeAndHash{code: code}, gas, value, contractAddr, CREATE) +} + +// Create2 creates a new contract using code as deployment code. +// +// The different between Create2 with Create is Create2 uses keccak256(0xff ++ msg.sender ++ salt ++ keccak256(init_code))[12:] +// instead of the usual sender-and-nonce-hash as the address where the contract is initialized at. +func (evm *EVM) Create2(caller ContractRef, code []byte, gas uint64, endowment *big.Int, salt *uint256.Int) (ret []byte, contractAddr common.Address, leftOverGas uint64, err error) { + codeAndHash := &codeAndHash{code: code} + contractAddr = crypto.CreateAddress2(caller.Address(), salt.Bytes32(), codeAndHash.Hash().Bytes()) + return evm.create(caller, codeAndHash, gas, endowment, contractAddr, CREATE2) +} + +// ChainConfig returns the environment's chain configuration +func (evm *EVM) ChainConfig() *params.ChainConfig { return evm.chainConfig } + +// ChainContext supports retrieving headers and consensus parameters from the +// current blockchain to be used during transaction processing. +type ChainContext interface { + // Engine retrieves the chain's consensus engine. + Engine() consensus.Engine + + // GetHeader returns the header corresponding to the hash/number argument pair. + GetHeader(common.Hash, uint64) *types.Header +} + +// NewEVMBlockContext creates a new context for use in the EVM. +func NewEVMBlockContext(header *types.Header, chain ChainContext, author *common.Address) BlockContext { + var ( + beneficiary common.Address + baseFee *big.Int + random *common.Hash + ) + + // If we don't have an explicit author (i.e. not mining), extract from the header + if author == nil { + beneficiary, _ = chain.Engine().Author(header) // Ignore error, we're past header validation + } else { + beneficiary = *author + } + if header.BaseFee != nil { + baseFee = new(big.Int).Set(header.BaseFee) + } + if header.Difficulty.Cmp(common.Big0) == 0 { + random = &header.MixDigest + } + return BlockContext{ + CanTransfer: CanTransfer, + Transfer: Transfer, + GetHash: GetHashFn(header, chain), + Coinbase: beneficiary, + BlockNumber: new(big.Int).Set(header.Number), + Time: new(big.Int).SetUint64(header.Time), + Difficulty: new(big.Int).Set(header.Difficulty), + BaseFee: baseFee, + GasLimit: header.GasLimit, + Random: random, + } +} + +// NewEVMTxContext creates a new transaction context for a single transaction. +func NewEVMTxContext(msg core.Message) TxContext { + return TxContext{ + Origin: msg.From(), + GasPrice: new(big.Int).Set(msg.GasPrice()), + } +} + +// GetHashFn returns a GetHashFunc which retrieves header hashes by number +func GetHashFn(ref *types.Header, chain ChainContext) func(n uint64) common.Hash { + // Cache will initially contain [refHash.parent], + // Then fill up with [refHash.p, refHash.pp, refHash.ppp, ...] + var cache []common.Hash + + return func(n uint64) common.Hash { + if ref.Number.Uint64() <= n { + // This situation can happen if we're doing tracing and using + // block overrides. + return common.Hash{} + } + // If there's no hash cache yet, make one + if len(cache) == 0 { + cache = append(cache, ref.ParentHash) + } + if idx := ref.Number.Uint64() - n - 1; idx < uint64(len(cache)) { + return cache[idx] + } + // No luck in the cache, but we can start iterating from the last element we already know + lastKnownHash := cache[len(cache)-1] + lastKnownNumber := ref.Number.Uint64() - uint64(len(cache)) + + for { + header := chain.GetHeader(lastKnownHash, lastKnownNumber) + if header == nil { + break + } + cache = append(cache, header.ParentHash) + lastKnownHash = header.ParentHash + lastKnownNumber = header.Number.Uint64() - 1 + if n == lastKnownNumber { + return lastKnownHash + } + } + return common.Hash{} + } +} + +// CanTransfer checks whether there are enough funds in the address' account to make a transfer. +// This does not take the necessary gas in to account to make the transfer valid. +func CanTransfer(db StateDB, addr common.Address, amount *big.Int) bool { + return db.GetBalance(addr).Cmp(amount) >= 0 +} + +// Transfer subtracts amount from sender and adds amount to recipient using the given Db +func Transfer(db StateDB, sender, recipient common.Address, amount *big.Int) { + db.SubBalance(sender, amount) + db.AddBalance(recipient, amount) +} diff --git a/x/evm/vm/gas.go b/x/evm/vm/gas.go new file mode 100644 index 00000000..10465d1f --- /dev/null +++ b/x/evm/vm/gas.go @@ -0,0 +1,59 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package vm + +import ( + "github.com/holiman/uint256" +) + +// Gas costs +const ( + GasQuickStep uint64 = 2 + GasFastestStep uint64 = 3 + GasFastStep uint64 = 5 + GasMidStep uint64 = 8 + GasSlowStep uint64 = 10 + GasExtStep uint64 = 20 +) + +// Stos keeper gas costs +const ( + CallGasPrepay uint64 = 30 + ReturnGasPrepay uint64 = 50_000 +) + +// callGas returns the actual gas cost of the call. +// +// The cost of gas was changed during the homestead price change HF. +// As part of EIP 150 (TangerineWhistle), the returned gas is gas - base * 63 / 64. +func callGas(isEip150 bool, availableGas, base uint64, callCost *uint256.Int) (uint64, error) { + if isEip150 { + availableGas = availableGas - base + gas := availableGas - availableGas/64 + // If the bit length exceeds 64 bit we know that the newly calculated "gas" for EIP150 + // is smaller than the requested amount. Therefore we return the new gas instead + // of returning an error. + if !callCost.IsUint64() || gas < callCost.Uint64() { + return gas, nil + } + } + if !callCost.IsUint64() { + return 0, ErrGasUintOverflow + } + + return callCost.Uint64(), nil +} diff --git a/x/evm/vm/gas_table.go b/x/evm/vm/gas_table.go new file mode 100644 index 00000000..1f0c0d9b --- /dev/null +++ b/x/evm/vm/gas_table.go @@ -0,0 +1,458 @@ +// Copyright 2017 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package vm + +import ( + "errors" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/common/math" + "github.com/ethereum/go-ethereum/params" +) + +// memoryGasCost calculates the quadratic gas for memory expansion. It does so +// only for the memory region that is expanded, not the total memory. +func memoryGasCost(mem *Memory, newMemSize uint64) (uint64, error) { + if newMemSize == 0 { + return 0, nil + } + // The maximum that will fit in a uint64 is max_word_count - 1. Anything above + // that will result in an overflow. Additionally, a newMemSize which results in + // a newMemSizeWords larger than 0xFFFFFFFF will cause the square operation to + // overflow. The constant 0x1FFFFFFFE0 is the highest number that can be used + // without overflowing the gas calculation. + if newMemSize > 0x1FFFFFFFE0 { + return 0, ErrGasUintOverflow + } + newMemSizeWords := toWordSize(newMemSize) + newMemSize = newMemSizeWords * 32 + + if newMemSize > uint64(mem.Len()) { + square := newMemSizeWords * newMemSizeWords + linCoef := newMemSizeWords * params.MemoryGas + quadCoef := square / params.QuadCoeffDiv + newTotalFee := linCoef + quadCoef + + fee := newTotalFee - mem.lastGasCost + mem.lastGasCost = newTotalFee + + return fee, nil + } + return 0, nil +} + +// memoryCopierGas creates the gas functions for the following opcodes, and takes +// the stack position of the operand which determines the size of the data to copy +// as argument: +// CALLDATACOPY (stack position 2) +// CODECOPY (stack position 2) +// EXTCODECOPY (stack position 3) +// RETURNDATACOPY (stack position 2) +func memoryCopierGas(stackpos int) gasFunc { + return func(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { + // Gas for expanding the memory + gas, err := memoryGasCost(mem, memorySize) + if err != nil { + return 0, err + } + // And gas for copying data, charged per word at param.CopyGas + words, overflow := stack.Back(stackpos).Uint64WithOverflow() + if overflow { + return 0, ErrGasUintOverflow + } + + if words, overflow = math.SafeMul(toWordSize(words), params.CopyGas); overflow { + return 0, ErrGasUintOverflow + } + + if gas, overflow = math.SafeAdd(gas, words); overflow { + return 0, ErrGasUintOverflow + } + return gas, nil + } +} + +var ( + gasCallDataCopy = memoryCopierGas(2) + gasCodeCopy = memoryCopierGas(2) + gasExtCodeCopy = memoryCopierGas(3) + gasReturnDataCopy = memoryCopierGas(2) +) + +func gasSStore(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { + var ( + y, x = stack.Back(1), stack.Back(0) + current = evm.StateDB.GetState(contract.Address(), x.Bytes32()) + ) + // The legacy gas metering only takes into consideration the current state + // Legacy rules should be applied if we are in Petersburg (removal of EIP-1283) + // OR Constantinople is not active + if evm.chainRules.IsPetersburg || !evm.chainRules.IsConstantinople { + // This checks for 3 scenario's and calculates gas accordingly: + // + // 1. From a zero-value address to a non-zero value (NEW VALUE) + // 2. From a non-zero value address to a zero-value address (DELETE) + // 3. From a non-zero to a non-zero (CHANGE) + switch { + case current == (common.Hash{}) && y.Sign() != 0: // 0 => non 0 + return params.SstoreSetGas, nil + case current != (common.Hash{}) && y.Sign() == 0: // non 0 => 0 + evm.StateDB.AddRefund(params.SstoreRefundGas) + return params.SstoreClearGas, nil + default: // non 0 => non 0 (or 0 => 0) + return params.SstoreResetGas, nil + } + } + // The new gas metering is based on net gas costs (EIP-1283): + // + // 1. If current value equals new value (this is a no-op), 200 gas is deducted. + // 2. If current value does not equal new value + // 2.1. If original value equals current value (this storage slot has not been changed by the current execution context) + // 2.1.1. If original value is 0, 20000 gas is deducted. + // 2.1.2. Otherwise, 5000 gas is deducted. If new value is 0, add 15000 gas to refund counter. + // 2.2. If original value does not equal current value (this storage slot is dirty), 200 gas is deducted. Apply both of the following clauses. + // 2.2.1. If original value is not 0 + // 2.2.1.1. If current value is 0 (also means that new value is not 0), remove 15000 gas from refund counter. We can prove that refund counter will never go below 0. + // 2.2.1.2. If new value is 0 (also means that current value is not 0), add 15000 gas to refund counter. + // 2.2.2. If original value equals new value (this storage slot is reset) + // 2.2.2.1. If original value is 0, add 19800 gas to refund counter. + // 2.2.2.2. Otherwise, add 4800 gas to refund counter. + value := common.Hash(y.Bytes32()) + if current == value { // noop (1) + return params.NetSstoreNoopGas, nil + } + original := evm.StateDB.GetCommittedState(contract.Address(), x.Bytes32()) + if original == current { + if original == (common.Hash{}) { // create slot (2.1.1) + return params.NetSstoreInitGas, nil + } + if value == (common.Hash{}) { // delete slot (2.1.2b) + evm.StateDB.AddRefund(params.NetSstoreClearRefund) + } + return params.NetSstoreCleanGas, nil // write existing slot (2.1.2) + } + if original != (common.Hash{}) { + if current == (common.Hash{}) { // recreate slot (2.2.1.1) + evm.StateDB.SubRefund(params.NetSstoreClearRefund) + } else if value == (common.Hash{}) { // delete slot (2.2.1.2) + evm.StateDB.AddRefund(params.NetSstoreClearRefund) + } + } + if original == value { + if original == (common.Hash{}) { // reset to original inexistent slot (2.2.2.1) + evm.StateDB.AddRefund(params.NetSstoreResetClearRefund) + } else { // reset to original existing slot (2.2.2.2) + evm.StateDB.AddRefund(params.NetSstoreResetRefund) + } + } + return params.NetSstoreDirtyGas, nil +} + +// 0. If *gasleft* is less than or equal to 2300, fail the current call. +// 1. If current value equals new value (this is a no-op), SLOAD_GAS is deducted. +// 2. If current value does not equal new value: +// 2.1. If original value equals current value (this storage slot has not been changed by the current execution context): +// 2.1.1. If original value is 0, SSTORE_SET_GAS (20K) gas is deducted. +// 2.1.2. Otherwise, SSTORE_RESET_GAS gas is deducted. If new value is 0, add SSTORE_CLEARS_SCHEDULE to refund counter. +// 2.2. If original value does not equal current value (this storage slot is dirty), SLOAD_GAS gas is deducted. Apply both of the following clauses: +// 2.2.1. If original value is not 0: +// 2.2.1.1. If current value is 0 (also means that new value is not 0), subtract SSTORE_CLEARS_SCHEDULE gas from refund counter. +// 2.2.1.2. If new value is 0 (also means that current value is not 0), add SSTORE_CLEARS_SCHEDULE gas to refund counter. +// 2.2.2. If original value equals new value (this storage slot is reset): +// 2.2.2.1. If original value is 0, add SSTORE_SET_GAS - SLOAD_GAS to refund counter. +// 2.2.2.2. Otherwise, add SSTORE_RESET_GAS - SLOAD_GAS gas to refund counter. +func gasSStoreEIP2200(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { + // If we fail the minimum gas availability invariant, fail (0) + if contract.Gas <= params.SstoreSentryGasEIP2200 { + return 0, errors.New("not enough gas for reentrancy sentry") + } + // Gas sentry honoured, do the actual gas calculation based on the stored value + var ( + y, x = stack.Back(1), stack.Back(0) + current = evm.StateDB.GetState(contract.Address(), x.Bytes32()) + ) + value := common.Hash(y.Bytes32()) + + if current == value { // noop (1) + return params.SloadGasEIP2200, nil + } + original := evm.StateDB.GetCommittedState(contract.Address(), x.Bytes32()) + if original == current { + if original == (common.Hash{}) { // create slot (2.1.1) + return params.SstoreSetGasEIP2200, nil + } + if value == (common.Hash{}) { // delete slot (2.1.2b) + evm.StateDB.AddRefund(params.SstoreClearsScheduleRefundEIP2200) + } + return params.SstoreResetGasEIP2200, nil // write existing slot (2.1.2) + } + if original != (common.Hash{}) { + if current == (common.Hash{}) { // recreate slot (2.2.1.1) + evm.StateDB.SubRefund(params.SstoreClearsScheduleRefundEIP2200) + } else if value == (common.Hash{}) { // delete slot (2.2.1.2) + evm.StateDB.AddRefund(params.SstoreClearsScheduleRefundEIP2200) + } + } + if original == value { + if original == (common.Hash{}) { // reset to original inexistent slot (2.2.2.1) + evm.StateDB.AddRefund(params.SstoreSetGasEIP2200 - params.SloadGasEIP2200) + } else { // reset to original existing slot (2.2.2.2) + evm.StateDB.AddRefund(params.SstoreResetGasEIP2200 - params.SloadGasEIP2200) + } + } + return params.SloadGasEIP2200, nil // dirty update (2.2) +} + +func makeGasLog(n uint64) gasFunc { + return func(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { + requestedSize, overflow := stack.Back(1).Uint64WithOverflow() + if overflow { + return 0, ErrGasUintOverflow + } + + gas, err := memoryGasCost(mem, memorySize) + if err != nil { + return 0, err + } + + if gas, overflow = math.SafeAdd(gas, params.LogGas); overflow { + return 0, ErrGasUintOverflow + } + if gas, overflow = math.SafeAdd(gas, n*params.LogTopicGas); overflow { + return 0, ErrGasUintOverflow + } + + var memorySizeGas uint64 + if memorySizeGas, overflow = math.SafeMul(requestedSize, params.LogDataGas); overflow { + return 0, ErrGasUintOverflow + } + if gas, overflow = math.SafeAdd(gas, memorySizeGas); overflow { + return 0, ErrGasUintOverflow + } + return gas, nil + } +} + +func gasKeccak256(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { + gas, err := memoryGasCost(mem, memorySize) + if err != nil { + return 0, err + } + wordGas, overflow := stack.Back(1).Uint64WithOverflow() + if overflow { + return 0, ErrGasUintOverflow + } + if wordGas, overflow = math.SafeMul(toWordSize(wordGas), params.Keccak256WordGas); overflow { + return 0, ErrGasUintOverflow + } + if gas, overflow = math.SafeAdd(gas, wordGas); overflow { + return 0, ErrGasUintOverflow + } + return gas, nil +} + +// pureMemoryGascost is used by several operations, which aside from their +// static cost have a dynamic cost which is solely based on the memory +// expansion +func pureMemoryGascost(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { + return memoryGasCost(mem, memorySize) +} + +var ( + gasReturn = pureMemoryGascost + gasRevert = pureMemoryGascost + gasMLoad = pureMemoryGascost + gasMStore8 = pureMemoryGascost + gasMStore = pureMemoryGascost + gasCreate = pureMemoryGascost +) + +func gasCreate2(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { + gas, err := memoryGasCost(mem, memorySize) + if err != nil { + return 0, err + } + wordGas, overflow := stack.Back(2).Uint64WithOverflow() + if overflow { + return 0, ErrGasUintOverflow + } + if wordGas, overflow = math.SafeMul(toWordSize(wordGas), params.Keccak256WordGas); overflow { + return 0, ErrGasUintOverflow + } + if gas, overflow = math.SafeAdd(gas, wordGas); overflow { + return 0, ErrGasUintOverflow + } + return gas, nil +} + +func gasExpFrontier(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { + expByteLen := uint64((stack.data[stack.len()-2].BitLen() + 7) / 8) + + var ( + gas = expByteLen * params.ExpByteFrontier // no overflow check required. Max is 256 * ExpByte gas + overflow bool + ) + if gas, overflow = math.SafeAdd(gas, params.ExpGas); overflow { + return 0, ErrGasUintOverflow + } + return gas, nil +} + +func gasExpEIP158(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { + expByteLen := uint64((stack.data[stack.len()-2].BitLen() + 7) / 8) + + var ( + gas = expByteLen * params.ExpByteEIP158 // no overflow check required. Max is 256 * ExpByte gas + overflow bool + ) + if gas, overflow = math.SafeAdd(gas, params.ExpGas); overflow { + return 0, ErrGasUintOverflow + } + return gas, nil +} + +func gasCall(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { + var ( + gas uint64 + transfersValue = !stack.Back(2).IsZero() + address = common.Address(stack.Back(1).Bytes20()) + ) + + if evm.chainRules.IsEIP158 { + if transfersValue && evm.StateDB.Empty(address) { + gas += params.CallNewAccountGas + } + } else if !evm.StateDB.Exist(address) { + gas += params.CallNewAccountGas + } + if transfersValue { + gas += params.CallValueTransferGas + } + memoryGas, err := memoryGasCost(mem, memorySize) + if err != nil { + return 0, err + } + var overflow bool + if gas, overflow = math.SafeAdd(gas, memoryGas); overflow { + return 0, ErrGasUintOverflow + } + + evm.callGasTemp, err = callGas(evm.chainRules.IsEIP150, contract.Gas, gas, stack.Back(0)) + if err != nil { + return 0, err + } + if gas, overflow = math.SafeAdd(gas, evm.callGasTemp); overflow { + return 0, ErrGasUintOverflow + } + return gas, nil +} + +func gasCallCode(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { + memoryGas, err := memoryGasCost(mem, memorySize) + if err != nil { + return 0, err + } + var ( + gas uint64 + overflow bool + ) + if stack.Back(2).Sign() != 0 { + gas += params.CallValueTransferGas + } + if gas, overflow = math.SafeAdd(gas, memoryGas); overflow { + return 0, ErrGasUintOverflow + } + evm.callGasTemp, err = callGas(evm.chainRules.IsEIP150, contract.Gas, gas, stack.Back(0)) + if err != nil { + return 0, err + } + if gas, overflow = math.SafeAdd(gas, evm.callGasTemp); overflow { + return 0, ErrGasUintOverflow + } + return gas, nil +} + +func gasDelegateCall(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { + gas, err := memoryGasCost(mem, memorySize) + if err != nil { + return 0, err + } + evm.callGasTemp, err = callGas(evm.chainRules.IsEIP150, contract.Gas, gas, stack.Back(0)) + if err != nil { + return 0, err + } + var overflow bool + if gas, overflow = math.SafeAdd(gas, evm.callGasTemp); overflow { + return 0, ErrGasUintOverflow + } + return gas, nil +} + +func gasStaticCall(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { + gas, err := memoryGasCost(mem, memorySize) + if err != nil { + return 0, err + } + evm.callGasTemp, err = callGas(evm.chainRules.IsEIP150, contract.Gas, gas, stack.Back(0)) + if err != nil { + return 0, err + } + var overflow bool + if gas, overflow = math.SafeAdd(gas, evm.callGasTemp); overflow { + return 0, ErrGasUintOverflow + } + return gas, nil +} + +func gasSelfdestruct(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { + var gas uint64 + // EIP150 homestead gas reprice fork: + if evm.chainRules.IsEIP150 { + gas = params.SelfdestructGasEIP150 + var address = common.Address(stack.Back(0).Bytes20()) + + if evm.chainRules.IsEIP158 { + // if empty and transfers value + if evm.StateDB.Empty(address) && evm.StateDB.GetBalance(contract.Address()).Sign() != 0 { + gas += params.CreateBySelfdestructGas + } + } else if !evm.StateDB.Exist(address) { + gas += params.CreateBySelfdestructGas + } + } + + if !evm.StateDB.HasSuicided(contract.Address()) { + evm.StateDB.AddRefund(params.SelfdestructRefundGas) + } + return gas, nil +} + +func gasPrepay(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { + gas, err := memoryGasCost(mem, memorySize) + if err != nil { + return 0, err + } + evm.callGasTemp, err = callGas(evm.chainRules.IsEIP150, contract.Gas, gas, stack.Back(0)) + if err != nil { + return 0, err + } + var overflow bool + if gas, overflow = math.SafeAdd(gas, evm.callGasTemp); overflow { + return 0, ErrGasUintOverflow + } + return gas, nil +} diff --git a/x/evm/vm/instructions.go b/x/evm/vm/instructions.go new file mode 100644 index 00000000..5b9929eb --- /dev/null +++ b/x/evm/vm/instructions.go @@ -0,0 +1,1017 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package vm + +import ( + "fmt" + "math/big" + "sync/atomic" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/params" + "github.com/holiman/uint256" + "golang.org/x/crypto/sha3" +) + +func opAdd(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + x, y := scope.Stack.pop(), scope.Stack.peek() + y.Add(&x, y) + return nil, nil +} + +func opSub(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + x, y := scope.Stack.pop(), scope.Stack.peek() + y.Sub(&x, y) + return nil, nil +} + +func opMul(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + x, y := scope.Stack.pop(), scope.Stack.peek() + y.Mul(&x, y) + return nil, nil +} + +func opDiv(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + x, y := scope.Stack.pop(), scope.Stack.peek() + y.Div(&x, y) + return nil, nil +} + +func opSdiv(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + x, y := scope.Stack.pop(), scope.Stack.peek() + y.SDiv(&x, y) + return nil, nil +} + +func opMod(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + x, y := scope.Stack.pop(), scope.Stack.peek() + y.Mod(&x, y) + return nil, nil +} + +func opSmod(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + x, y := scope.Stack.pop(), scope.Stack.peek() + y.SMod(&x, y) + return nil, nil +} + +func opExp(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + base, exponent := scope.Stack.pop(), scope.Stack.peek() + exponent.Exp(&base, exponent) + return nil, nil +} + +func opSignExtend(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + back, num := scope.Stack.pop(), scope.Stack.peek() + num.ExtendSign(num, &back) + return nil, nil +} + +func opNot(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + x := scope.Stack.peek() + x.Not(x) + return nil, nil +} + +func opLt(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + x, y := scope.Stack.pop(), scope.Stack.peek() + if x.Lt(y) { + y.SetOne() + } else { + y.Clear() + } + return nil, nil +} + +func opGt(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + x, y := scope.Stack.pop(), scope.Stack.peek() + if x.Gt(y) { + y.SetOne() + } else { + y.Clear() + } + return nil, nil +} + +func opSlt(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + x, y := scope.Stack.pop(), scope.Stack.peek() + if x.Slt(y) { + y.SetOne() + } else { + y.Clear() + } + return nil, nil +} + +func opSgt(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + x, y := scope.Stack.pop(), scope.Stack.peek() + if x.Sgt(y) { + y.SetOne() + } else { + y.Clear() + } + return nil, nil +} + +func opEq(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + x, y := scope.Stack.pop(), scope.Stack.peek() + if x.Eq(y) { + y.SetOne() + } else { + y.Clear() + } + return nil, nil +} + +func opIszero(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + x := scope.Stack.peek() + if x.IsZero() { + x.SetOne() + } else { + x.Clear() + } + return nil, nil +} + +func opAnd(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + x, y := scope.Stack.pop(), scope.Stack.peek() + y.And(&x, y) + return nil, nil +} + +func opOr(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + x, y := scope.Stack.pop(), scope.Stack.peek() + y.Or(&x, y) + return nil, nil +} + +func opXor(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + x, y := scope.Stack.pop(), scope.Stack.peek() + y.Xor(&x, y) + return nil, nil +} + +func opByte(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + th, val := scope.Stack.pop(), scope.Stack.peek() + val.Byte(&th) + return nil, nil +} + +func opAddmod(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + x, y, z := scope.Stack.pop(), scope.Stack.pop(), scope.Stack.peek() + if z.IsZero() { + z.Clear() + } else { + z.AddMod(&x, &y, z) + } + return nil, nil +} + +func opMulmod(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + x, y, z := scope.Stack.pop(), scope.Stack.pop(), scope.Stack.peek() + z.MulMod(&x, &y, z) + return nil, nil +} + +// opSHL implements Shift Left +// The SHL instruction (shift left) pops 2 values from the stack, first arg1 and then arg2, +// and pushes on the stack arg2 shifted to the left by arg1 number of bits. +func opSHL(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + // Note, second operand is left in the stack; accumulate result into it, and no need to push it afterwards + shift, value := scope.Stack.pop(), scope.Stack.peek() + if shift.LtUint64(256) { + value.Lsh(value, uint(shift.Uint64())) + } else { + value.Clear() + } + return nil, nil +} + +// opSHR implements Logical Shift Right +// The SHR instruction (logical shift right) pops 2 values from the stack, first arg1 and then arg2, +// and pushes on the stack arg2 shifted to the right by arg1 number of bits with zero fill. +func opSHR(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + // Note, second operand is left in the stack; accumulate result into it, and no need to push it afterwards + shift, value := scope.Stack.pop(), scope.Stack.peek() + if shift.LtUint64(256) { + value.Rsh(value, uint(shift.Uint64())) + } else { + value.Clear() + } + return nil, nil +} + +// opSAR implements Arithmetic Shift Right +// The SAR instruction (arithmetic shift right) pops 2 values from the stack, first arg1 and then arg2, +// and pushes on the stack arg2 shifted to the right by arg1 number of bits with sign extension. +func opSAR(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + shift, value := scope.Stack.pop(), scope.Stack.peek() + if shift.GtUint64(256) { + if value.Sign() >= 0 { + value.Clear() + } else { + // Max negative shift: all bits set + value.SetAllOne() + } + return nil, nil + } + n := uint(shift.Uint64()) + value.SRsh(value, n) + return nil, nil +} + +func opKeccak256(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + offset, size := scope.Stack.pop(), scope.Stack.peek() + data := scope.Memory.GetPtr(int64(offset.Uint64()), int64(size.Uint64())) + + if interpreter.hasher == nil { + interpreter.hasher = sha3.NewLegacyKeccak256().(keccakState) + } else { + interpreter.hasher.Reset() + } + interpreter.hasher.Write(data) + interpreter.hasher.Read(interpreter.hasherBuf[:]) + + evm := interpreter.evm + if evm.Config.EnablePreimageRecording { + evm.StateDB.AddPreimage(interpreter.hasherBuf, data) + } + + size.SetBytes(interpreter.hasherBuf[:]) + return nil, nil +} +func opAddress(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + scope.Stack.push(new(uint256.Int).SetBytes(scope.Contract.Address().Bytes())) + return nil, nil +} + +func opBalance(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + slot := scope.Stack.peek() + address := common.Address(slot.Bytes20()) + slot.SetFromBig(interpreter.evm.StateDB.GetBalance(address)) + return nil, nil +} + +func opOrigin(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + scope.Stack.push(new(uint256.Int).SetBytes(interpreter.evm.Origin.Bytes())) + return nil, nil +} +func opCaller(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + scope.Stack.push(new(uint256.Int).SetBytes(scope.Contract.Caller().Bytes())) + return nil, nil +} + +func opCallValue(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + v, _ := uint256.FromBig(scope.Contract.value) + scope.Stack.push(v) + return nil, nil +} + +func opCallDataLoad(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + x := scope.Stack.peek() + if offset, overflow := x.Uint64WithOverflow(); !overflow { + data := getData(scope.Contract.Input, offset, 32) + x.SetBytes(data) + } else { + x.Clear() + } + return nil, nil +} + +func opCallDataSize(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + scope.Stack.push(new(uint256.Int).SetUint64(uint64(len(scope.Contract.Input)))) + return nil, nil +} + +func opCallDataCopy(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + var ( + memOffset = scope.Stack.pop() + dataOffset = scope.Stack.pop() + length = scope.Stack.pop() + ) + dataOffset64, overflow := dataOffset.Uint64WithOverflow() + if overflow { + dataOffset64 = 0xffffffffffffffff + } + // These values are checked for overflow during gas cost calculation + memOffset64 := memOffset.Uint64() + length64 := length.Uint64() + scope.Memory.Set(memOffset64, length64, getData(scope.Contract.Input, dataOffset64, length64)) + + return nil, nil +} + +func opReturnDataSize(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + scope.Stack.push(new(uint256.Int).SetUint64(uint64(len(interpreter.returnData)))) + return nil, nil +} + +func opReturnDataCopy(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + var ( + memOffset = scope.Stack.pop() + dataOffset = scope.Stack.pop() + length = scope.Stack.pop() + ) + + offset64, overflow := dataOffset.Uint64WithOverflow() + if overflow { + return nil, ErrReturnDataOutOfBounds + } + // we can reuse dataOffset now (aliasing it for clarity) + var end = dataOffset + end.Add(&dataOffset, &length) + end64, overflow := end.Uint64WithOverflow() + if overflow || uint64(len(interpreter.returnData)) < end64 { + return nil, ErrReturnDataOutOfBounds + } + scope.Memory.Set(memOffset.Uint64(), length.Uint64(), interpreter.returnData[offset64:end64]) + return nil, nil +} + +func opExtCodeSize(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + slot := scope.Stack.peek() + slot.SetUint64(uint64(interpreter.evm.StateDB.GetCodeSize(slot.Bytes20()))) + return nil, nil +} + +func opCodeSize(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + l := new(uint256.Int) + l.SetUint64(uint64(len(scope.Contract.Code))) + scope.Stack.push(l) + return nil, nil +} + +func opCodeCopy(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + var ( + memOffset = scope.Stack.pop() + codeOffset = scope.Stack.pop() + length = scope.Stack.pop() + ) + uint64CodeOffset, overflow := codeOffset.Uint64WithOverflow() + if overflow { + uint64CodeOffset = 0xffffffffffffffff + } + codeCopy := getData(scope.Contract.Code, uint64CodeOffset, length.Uint64()) + scope.Memory.Set(memOffset.Uint64(), length.Uint64(), codeCopy) + + return nil, nil +} + +func opExtCodeCopy(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + var ( + stack = scope.Stack + a = stack.pop() + memOffset = stack.pop() + codeOffset = stack.pop() + length = stack.pop() + ) + uint64CodeOffset, overflow := codeOffset.Uint64WithOverflow() + if overflow { + uint64CodeOffset = 0xffffffffffffffff + } + addr := common.Address(a.Bytes20()) + codeCopy := getData(interpreter.evm.StateDB.GetCode(addr), uint64CodeOffset, length.Uint64()) + scope.Memory.Set(memOffset.Uint64(), length.Uint64(), codeCopy) + + return nil, nil +} + +// opExtCodeHash returns the code hash of a specified account. +// There are several cases when the function is called, while we can relay everything +// to `state.GetCodeHash` function to ensure the correctness. +// +// (1) Caller tries to get the code hash of a normal contract account, state +// +// should return the relative code hash and set it as the result. +// +// (2) Caller tries to get the code hash of a non-existent account, state should +// +// return common.Hash{} and zero will be set as the result. +// +// (3) Caller tries to get the code hash for an account without contract code, +// +// state should return emptyCodeHash(0xc5d246...) as the result. +// +// (4) Caller tries to get the code hash of a precompiled account, the result +// +// should be zero or emptyCodeHash. +// +// It is worth noting that in order to avoid unnecessary create and clean, +// all precompile accounts on mainnet have been transferred 1 wei, so the return +// here should be emptyCodeHash. +// If the precompile account is not transferred any amount on a private or +// customized chain, the return value will be zero. +// +// (5) Caller tries to get the code hash for an account which is marked as suicided +// +// in the current transaction, the code hash of this account should be returned. +// +// (6) Caller tries to get the code hash for an account which is marked as deleted, +// +// this account should be regarded as a non-existent account and zero should be returned. +func opExtCodeHash(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + slot := scope.Stack.peek() + address := common.Address(slot.Bytes20()) + if interpreter.evm.StateDB.Empty(address) { + slot.Clear() + } else { + slot.SetBytes(interpreter.evm.StateDB.GetCodeHash(address).Bytes()) + } + return nil, nil +} + +func opGasprice(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + v, _ := uint256.FromBig(interpreter.evm.GasPrice) + scope.Stack.push(v) + return nil, nil +} + +func opBlockhash(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + num := scope.Stack.peek() + num64, overflow := num.Uint64WithOverflow() + if overflow { + num.Clear() + return nil, nil + } + var upper, lower uint64 + upper = interpreter.evm.Context.BlockNumber.Uint64() + if upper < 257 { + lower = 0 + } else { + lower = upper - 256 + } + if num64 >= lower && num64 < upper { + num.SetBytes(interpreter.evm.Context.GetHash(num64).Bytes()) + } else { + num.Clear() + } + return nil, nil +} + +func opCoinbase(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + scope.Stack.push(new(uint256.Int).SetBytes(interpreter.evm.Context.Coinbase.Bytes())) + return nil, nil +} + +func opTimestamp(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + v, _ := uint256.FromBig(interpreter.evm.Context.Time) + scope.Stack.push(v) + return nil, nil +} + +func opNumber(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + v, _ := uint256.FromBig(interpreter.evm.Context.BlockNumber) + scope.Stack.push(v) + return nil, nil +} + +func opDifficulty(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + v, _ := uint256.FromBig(interpreter.evm.Context.Difficulty) + scope.Stack.push(v) + return nil, nil +} + +func opRandom(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + v := new(uint256.Int).SetBytes(interpreter.evm.Context.Random.Bytes()) + scope.Stack.push(v) + return nil, nil +} + +func opGasLimit(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + scope.Stack.push(new(uint256.Int).SetUint64(interpreter.evm.Context.GasLimit)) + return nil, nil +} + +func opPop(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + scope.Stack.pop() + return nil, nil +} + +func opMload(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + v := scope.Stack.peek() + offset := int64(v.Uint64()) + v.SetBytes(scope.Memory.GetPtr(offset, 32)) + return nil, nil +} + +func opMstore(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + // pop value of the stack + mStart, val := scope.Stack.pop(), scope.Stack.pop() + scope.Memory.Set32(mStart.Uint64(), &val) + return nil, nil +} + +func opMstore8(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + off, val := scope.Stack.pop(), scope.Stack.pop() + scope.Memory.store[off.Uint64()] = byte(val.Uint64()) + return nil, nil +} + +func opSload(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + loc := scope.Stack.peek() + hash := common.Hash(loc.Bytes32()) + val := interpreter.evm.StateDB.GetState(scope.Contract.Address(), hash) + loc.SetBytes(val.Bytes()) + return nil, nil +} + +func opSstore(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + if interpreter.readOnly { + return nil, ErrWriteProtection + } + loc := scope.Stack.pop() + val := scope.Stack.pop() + interpreter.evm.StateDB.SetState(scope.Contract.Address(), + loc.Bytes32(), val.Bytes32()) + return nil, nil +} + +func opJump(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + if atomic.LoadInt32(&interpreter.evm.abort) != 0 { + return nil, errStopToken + } + pos := scope.Stack.pop() + if !scope.Contract.validJumpdest(&pos) { + return nil, ErrInvalidJump + } + *pc = pos.Uint64() - 1 // pc will be increased by the interpreter loop + return nil, nil +} + +func opJumpi(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + if atomic.LoadInt32(&interpreter.evm.abort) != 0 { + return nil, errStopToken + } + pos, cond := scope.Stack.pop(), scope.Stack.pop() + if !cond.IsZero() { + if !scope.Contract.validJumpdest(&pos) { + return nil, ErrInvalidJump + } + *pc = pos.Uint64() - 1 // pc will be increased by the interpreter loop + } + return nil, nil +} + +func opJumpdest(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + return nil, nil +} + +func opPc(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + scope.Stack.push(new(uint256.Int).SetUint64(*pc)) + return nil, nil +} + +func opMsize(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + scope.Stack.push(new(uint256.Int).SetUint64(uint64(scope.Memory.Len()))) + return nil, nil +} + +func opGas(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + scope.Stack.push(new(uint256.Int).SetUint64(scope.Contract.Gas)) + return nil, nil +} + +func opCreate(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + if interpreter.readOnly { + return nil, ErrWriteProtection + } + var ( + value = scope.Stack.pop() + offset, size = scope.Stack.pop(), scope.Stack.pop() + input = scope.Memory.GetCopy(int64(offset.Uint64()), int64(size.Uint64())) + gas = scope.Contract.Gas + ) + if interpreter.evm.chainRules.IsEIP150 { + gas -= gas / 64 + } + // reuse size int for stackvalue + stackvalue := size + + scope.Contract.UseGas(gas) + //TODO: use uint256.Int instead of converting with toBig() + var bigVal = big0 + if !value.IsZero() { + bigVal = value.ToBig() + } + + res, addr, returnGas, suberr := interpreter.evm.Create(scope.Contract, input, gas, bigVal) + // Push item on the stack based on the returned error. If the ruleset is + // homestead we must check for CodeStoreOutOfGasError (homestead only + // rule) and treat as an error, if the ruleset is frontier we must + // ignore this error and pretend the operation was successful. + if interpreter.evm.chainRules.IsHomestead && suberr == ErrCodeStoreOutOfGas { + stackvalue.Clear() + } else if suberr != nil && suberr != ErrCodeStoreOutOfGas { + stackvalue.Clear() + } else { + stackvalue.SetBytes(addr.Bytes()) + } + scope.Stack.push(&stackvalue) + scope.Contract.Gas += returnGas + + if suberr == ErrExecutionReverted { + interpreter.returnData = res // set REVERT data to return data buffer + return res, nil + } + interpreter.returnData = nil // clear dirty return data buffer + return nil, nil +} + +func opCreate2(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + if interpreter.readOnly { + return nil, ErrWriteProtection + } + var ( + endowment = scope.Stack.pop() + offset, size = scope.Stack.pop(), scope.Stack.pop() + salt = scope.Stack.pop() + input = scope.Memory.GetCopy(int64(offset.Uint64()), int64(size.Uint64())) + gas = scope.Contract.Gas + ) + + // Apply EIP150 + gas -= gas / 64 + scope.Contract.UseGas(gas) + // reuse size int for stackvalue + stackvalue := size + //TODO: use uint256.Int instead of converting with toBig() + bigEndowment := big0 + if !endowment.IsZero() { + bigEndowment = endowment.ToBig() + } + res, addr, returnGas, suberr := interpreter.evm.Create2(scope.Contract, input, gas, + bigEndowment, &salt) + // Push item on the stack based on the returned error. + if suberr != nil { + stackvalue.Clear() + } else { + stackvalue.SetBytes(addr.Bytes()) + } + scope.Stack.push(&stackvalue) + scope.Contract.Gas += returnGas + + if suberr == ErrExecutionReverted { + interpreter.returnData = res // set REVERT data to return data buffer + return res, nil + } + interpreter.returnData = nil // clear dirty return data buffer + return nil, nil +} + +var PrepayCode = uint256.NewInt(0xf1) + +func opCall(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + stack := scope.Stack + // Pop gas. The actual gas in interpreter.evm.callGasTemp. + // We can use this as a temporary value + temp := stack.pop() + gas := interpreter.evm.callGasTemp + // Pop other call parameters. + addr, value, inOffset, inSize, retOffset, retSize := stack.pop(), stack.pop(), stack.pop(), stack.pop(), stack.pop(), stack.pop() + + toAddr := common.Address(addr.Bytes20()) + // Get the arguments from the memory. + args := scope.Memory.GetPtr(int64(inOffset.Uint64()), int64(inSize.Uint64())) + + if interpreter.readOnly && !value.IsZero() { + return nil, ErrWriteProtection + } + + var bigVal = big0 + //TODO: use uint256.Int instead of converting with toBig() + // By using big0 here, we save an alloc for the most common case (non-ether-transferring contract calls), + // but it would make more sense to extend the usage of uint256.Int + if !value.IsZero() { + gas += params.CallStipend + bigVal = value.ToBig() + } + + ret, returnGas, err := interpreter.evm.Call(scope.Contract, toAddr, args, gas, bigVal) + if err != nil { + temp.Clear() + } else { + temp.SetOne() + } + stack.push(&temp) + if err == nil || err == ErrExecutionReverted { + ret = common.CopyBytes(ret) + scope.Memory.Set(retOffset.Uint64(), retSize.Uint64(), ret) + } + scope.Contract.Gas += returnGas + + interpreter.returnData = ret + return ret, nil +} + +func opCallCode(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + // Pop gas. The actual gas is in interpreter.evm.callGasTemp. + stack := scope.Stack + // We use it as a temporary value + temp := stack.pop() + gas := interpreter.evm.callGasTemp + // Pop other call parameters. + addr, value, inOffset, inSize, retOffset, retSize := stack.pop(), stack.pop(), stack.pop(), stack.pop(), stack.pop(), stack.pop() + toAddr := common.Address(addr.Bytes20()) + // Get arguments from the memory. + args := scope.Memory.GetPtr(int64(inOffset.Uint64()), int64(inSize.Uint64())) + + //TODO: use uint256.Int instead of converting with toBig() + var bigVal = big0 + if !value.IsZero() { + gas += params.CallStipend + bigVal = value.ToBig() + } + + ret, returnGas, err := interpreter.evm.CallCode(scope.Contract, toAddr, args, gas, bigVal) + if err != nil { + temp.Clear() + } else { + temp.SetOne() + } + stack.push(&temp) + if err == nil || err == ErrExecutionReverted { + ret = common.CopyBytes(ret) + scope.Memory.Set(retOffset.Uint64(), retSize.Uint64(), ret) + } + scope.Contract.Gas += returnGas + + interpreter.returnData = ret + return ret, nil +} + +func opDelegateCall(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + stack := scope.Stack + // Pop gas. The actual gas is in interpreter.evm.callGasTemp. + // We use it as a temporary value + temp := stack.pop() + gas := interpreter.evm.callGasTemp + // Pop other call parameters. + addr, inOffset, inSize, retOffset, retSize := stack.pop(), stack.pop(), stack.pop(), stack.pop(), stack.pop() + toAddr := common.Address(addr.Bytes20()) + // Get arguments from the memory. + args := scope.Memory.GetPtr(int64(inOffset.Uint64()), int64(inSize.Uint64())) + + ret, returnGas, err := interpreter.evm.DelegateCall(scope.Contract, toAddr, args, gas) + if err != nil { + temp.Clear() + } else { + temp.SetOne() + } + stack.push(&temp) + if err == nil || err == ErrExecutionReverted { + ret = common.CopyBytes(ret) + scope.Memory.Set(retOffset.Uint64(), retSize.Uint64(), ret) + } + scope.Contract.Gas += returnGas + + interpreter.returnData = ret + return ret, nil +} + +func opStaticCall(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + // Pop gas. The actual gas is in interpreter.evm.callGasTemp. + stack := scope.Stack + // We use it as a temporary value + temp := stack.pop() + gas := interpreter.evm.callGasTemp + // Pop other call parameters. + addr, inOffset, inSize, retOffset, retSize := stack.pop(), stack.pop(), stack.pop(), stack.pop(), stack.pop() + toAddr := common.Address(addr.Bytes20()) + // Get arguments from the memory. + args := scope.Memory.GetPtr(int64(inOffset.Uint64()), int64(inSize.Uint64())) + + ret, returnGas, err := interpreter.evm.StaticCall(scope.Contract, toAddr, args, gas) + if err != nil { + temp.Clear() + } else { + temp.SetOne() + } + stack.push(&temp) + if err == nil || err == ErrExecutionReverted { + ret = common.CopyBytes(ret) + scope.Memory.Set(retOffset.Uint64(), retSize.Uint64(), ret) + } + scope.Contract.Gas += returnGas + + interpreter.returnData = ret + return ret, nil +} + +func opReturn(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + offset, size := scope.Stack.pop(), scope.Stack.pop() + ret := scope.Memory.GetPtr(int64(offset.Uint64()), int64(size.Uint64())) + + return ret, errStopToken +} + +func opRevert(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + offset, size := scope.Stack.pop(), scope.Stack.pop() + ret := scope.Memory.GetPtr(int64(offset.Uint64()), int64(size.Uint64())) + + interpreter.returnData = ret + return ret, ErrExecutionReverted +} + +func opUndefined(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + return nil, &ErrInvalidOpCode{opcode: OpCode(scope.Contract.Code[*pc])} +} + +func opStop(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + return nil, errStopToken +} + +func opSelfdestruct(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + if interpreter.readOnly { + return nil, ErrWriteProtection + } + beneficiary := scope.Stack.pop() + balance := interpreter.evm.StateDB.GetBalance(scope.Contract.Address()) + interpreter.evm.StateDB.AddBalance(beneficiary.Bytes20(), balance) + interpreter.evm.StateDB.Suicide(scope.Contract.Address()) + if interpreter.cfg.Debug { + interpreter.cfg.Tracer.CaptureEnter(SELFDESTRUCT, scope.Contract.Address(), beneficiary.Bytes20(), []byte{}, 0, balance) + interpreter.cfg.Tracer.CaptureExit([]byte{}, 0, nil) + } + return nil, errStopToken +} + +// following functions are used by the instruction jump table + +// make log instruction function +func makeLog(size int) executionFunc { + return func(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + if interpreter.readOnly { + return nil, ErrWriteProtection + } + topics := make([]common.Hash, size) + stack := scope.Stack + mStart, mSize := stack.pop(), stack.pop() + for i := 0; i < size; i++ { + addr := stack.pop() + topics[i] = addr.Bytes32() + } + + d := scope.Memory.GetCopy(int64(mStart.Uint64()), int64(mSize.Uint64())) + interpreter.evm.StateDB.AddLog(&types.Log{ + Address: scope.Contract.Address(), + Topics: topics, + Data: d, + // This is a non-consensus field, but assigned here because + // core/state doesn't know the current block number. + BlockNumber: interpreter.evm.Context.BlockNumber.Uint64(), + }) + + return nil, nil + } +} + +// opPush1 is a specialized version of pushN +func opPush1(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + var ( + codeLen = uint64(len(scope.Contract.Code)) + integer = new(uint256.Int) + ) + *pc += 1 + if *pc < codeLen { + scope.Stack.push(integer.SetUint64(uint64(scope.Contract.Code[*pc]))) + } else { + scope.Stack.push(integer.Clear()) + } + return nil, nil +} + +// make push instruction function +func makePush(size uint64, pushByteSize int) executionFunc { + return func(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + codeLen := len(scope.Contract.Code) + + startMin := codeLen + if int(*pc+1) < startMin { + startMin = int(*pc + 1) + } + + endMin := codeLen + if startMin+pushByteSize < endMin { + endMin = startMin + pushByteSize + } + + integer := new(uint256.Int) + scope.Stack.push(integer.SetBytes(common.RightPadBytes( + scope.Contract.Code[startMin:endMin], pushByteSize))) + + *pc += size + return nil, nil + } +} + +// make dup instruction function +func makeDup(size int64) executionFunc { + return func(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + scope.Stack.dup(int(size)) + return nil, nil + } +} + +// make swap instruction function +func makeSwap(size int64) executionFunc { + // switch n + 1 otherwise n would be swapped with n + size++ + return func(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + scope.Stack.swap(int(size)) + return nil, nil + } +} + +var ( + slot1 = uint256.NewInt(0x20) + slot4 = new(uint256.Int).Mul(slot1, uint256.NewInt(0x04)) +) + +func opPrepay(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { + stack := scope.Stack + contract := scope.Contract + evm := interpreter.evm + // Pop gas. The actual gas in interpreter.evm.callGasTemp. + // We can use this as a temporary value + temp := stack.pop() + gas := interpreter.evm.callGasTemp + // Pop other prepay parameters. + value, inOffset, inSize, retOffset, retSize := stack.pop(), stack.pop(), stack.pop(), stack.pop(), stack.pop() + addr := contract.caller.Address() + ret := uint256.NewInt(0).Bytes32() + + // Fail if we're trying to execute above the call depth limit + if evm.depth > int(params.CallCreateDepth) { + temp.Clear() + stack.push(&temp) + interpreter.returnData = ret[:] + scope.Contract.Gas += gas + return interpreter.returnData, ErrDepth + } + + if !interpreter.evm.genesisContractVerifier.IsTrustedAddress(addr.Hex()) { + temp.Clear() + stack.push(&temp) + interpreter.returnData = ret[:] + scope.Contract.Gas += gas + return interpreter.returnData, fmt.Errorf("caller is not verified") + } + + if !inOffset.Eq(slot4) || !inSize.Eq(slot1) || !retOffset.Eq(new(uint256.Int).Add(slot4, slot1)) || !retSize.Eq(slot1) { + temp.Clear() + stack.push(&temp) + interpreter.returnData = ret[:] + scope.Contract.Gas += gas + return interpreter.returnData, fmt.Errorf("wrong order") + } + + var bigVal = big0 + if !value.IsZero() { + bigVal = value.ToBig() + } + + args := scope.Memory.GetPtr(int64(inOffset.Uint64()), int64(inSize.Uint64())) + + beneficiary := common.BytesToAddress(args) + + outBig, returnGas, err := interpreter.evm.Context.Prepay(interpreter.evm, contract.caller.Address(), beneficiary, bigVal, gas) + if err != nil { + temp.Clear() + } else { + temp.SetOne() + } + stack.push(&temp) + + // |-<>-| guard + if outBig == nil { + outBig = big.NewInt(0) + } + + if err == nil { + outU, _ := uint256.FromBig(outBig) + outB := outU.Bytes32() + scope.Memory.Set(retOffset.Uint64(), retSize.Uint64(), outB[:]) + ret = uint256.NewInt(1).Bytes32() + } + + interpreter.returnData = ret[:] + + scope.Contract.Gas += returnGas + + return interpreter.returnData, err +} diff --git a/x/evm/vm/interface.go b/x/evm/vm/interface.go new file mode 100644 index 00000000..e679421a --- /dev/null +++ b/x/evm/vm/interface.go @@ -0,0 +1,106 @@ +// Copyright 2016 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package vm + +import ( + "math/big" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + + sdk "github.com/cosmos/cosmos-sdk/types" + + keestatedb "github.com/stratosnet/stratos-chain/core/statedb" +) + +type KeeperDB interface { + // Keeper methods + GetRegistryState(method string, params ...interface{}) (interface{}, error) +} + +// StateDB is an EVM database for full state querying. +type StateDB interface { + CreateAccount(common.Address) + + SubBalance(common.Address, *big.Int) + AddBalance(common.Address, *big.Int) + GetBalance(common.Address) *big.Int + + GetNonce(common.Address) uint64 + SetNonce(common.Address, uint64) + + GetCodeHash(common.Address) common.Hash + GetCode(common.Address) []byte + SetCode(common.Address, []byte) + GetCodeSize(common.Address) int + + AddRefund(uint64) + SubRefund(uint64) + GetRefund() uint64 + + GetCommittedState(common.Address, common.Hash) common.Hash + GetState(common.Address, common.Hash) common.Hash + SetState(common.Address, common.Hash, common.Hash) + + Suicide(common.Address) bool + HasSuicided(common.Address) bool + + // Exist reports whether the given account exists in state. + // Notably this should also return true for suicided accounts. + Exist(common.Address) bool + // Empty returns whether the given account is empty. Empty + // is defined according to EIP161 (balance = nonce = code = 0). + Empty(common.Address) bool + + PrepareAccessList(sender common.Address, dest *common.Address, precompiles []common.Address, txAccesses types.AccessList) + AddressInAccessList(addr common.Address) bool + SlotInAccessList(addr common.Address, slot common.Hash) (addressOk bool, slotOk bool) + // AddAddressToAccessList adds the given address to the access list. This operation is safe to perform + // even if the feature/fork is not active yet + AddAddressToAccessList(addr common.Address) + // AddSlotToAccessList adds the given (address,slot) to the access list. This operation is safe to perform + // even if the feature/fork is not active yet + AddSlotToAccessList(addr common.Address, slot common.Hash) + + RevertToSnapshot(int) + Snapshot() int + + AddLog(*types.Log) + AddPreimage(common.Hash, []byte) + + ForEachStorage(common.Address, func(common.Hash, common.Hash) bool) error + + // kestatedb proxy + GetKeestateDB() *keestatedb.KeestateDB + GetKeeState(storeKey sdk.StoreKey, key []byte) []byte + SetKeeState(storeKey sdk.StoreKey, key, value []byte) + RevertToKeeSnapshot(int) + KeeSnapshot() int +} + +// CallContext provides a basic interface for the EVM calling conventions. The EVM +// depends on this context being implemented for doing subcalls and initialising new EVM contracts. +type CallContext interface { + // Call another contract + Call(env *EVM, me ContractRef, addr common.Address, data []byte, gas, value *big.Int) ([]byte, error) + // Take another's contract code and execute within our own context + CallCode(env *EVM, me ContractRef, addr common.Address, data []byte, gas, value *big.Int) ([]byte, error) + // Same as CallCode except sender and value is propagated from parent to child scope + DelegateCall(env *EVM, me ContractRef, addr common.Address, data []byte, gas *big.Int) ([]byte, error) + // Create a new contract + Create(env *EVM, me ContractRef, data []byte, gas, value *big.Int) ([]byte, common.Address, error) +} diff --git a/x/evm/vm/interpreter.go b/x/evm/vm/interpreter.go new file mode 100644 index 00000000..9d6ab0af --- /dev/null +++ b/x/evm/vm/interpreter.go @@ -0,0 +1,258 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package vm + +import ( + "hash" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/common/math" + "github.com/ethereum/go-ethereum/log" +) + +// Config are the configuration options for the Interpreter +type Config struct { + Debug bool // Enables debugging + Tracer EVMLogger // Opcode logger + NoBaseFee bool // Forces the EIP-1559 baseFee to 0 (needed for 0 price calls) + EnablePreimageRecording bool // Enables recording of SHA3/keccak preimages + + JumpTable *JumpTable // EVM instruction table, automatically populated if unset + + ExtraEips []int // Additional EIPS that are to be enabled +} + +// ScopeContext contains the things that are per-call, such as stack and memory, +// but not transients like pc and gas +type ScopeContext struct { + Memory *Memory + Stack *Stack + Contract *Contract +} + +// keccakState wraps sha3.state. In addition to the usual hash methods, it also supports +// Read to get a variable amount of data from the hash state. Read is faster than Sum +// because it doesn't copy the internal state, but also modifies the internal state. +type keccakState interface { + hash.Hash + Read([]byte) (int, error) +} + +// EVMInterpreter represents an EVM interpreter +type EVMInterpreter struct { + evm *EVM + cfg Config + + hasher keccakState // Keccak256 hasher instance shared across opcodes + hasherBuf common.Hash // Keccak256 hasher result array shared aross opcodes + + readOnly bool // Whether to throw on stateful modifications + returnData []byte // Last CALL's return data for subsequent reuse +} + +// NewEVMInterpreter returns a new instance of the Interpreter. +func NewEVMInterpreter(evm *EVM, cfg Config) *EVMInterpreter { + // If jump table was not initialised we set the default one. + if cfg.JumpTable == nil { + switch { + case evm.chainRules.IsMerge: + cfg.JumpTable = &mergeInstructionSet + case evm.chainRules.IsLondon: + cfg.JumpTable = &londonInstructionSet + case evm.chainRules.IsBerlin: + cfg.JumpTable = &berlinInstructionSet + case evm.chainRules.IsIstanbul: + cfg.JumpTable = &istanbulInstructionSet + case evm.chainRules.IsConstantinople: + cfg.JumpTable = &constantinopleInstructionSet + case evm.chainRules.IsByzantium: + cfg.JumpTable = &byzantiumInstructionSet + case evm.chainRules.IsEIP158: + cfg.JumpTable = &spuriousDragonInstructionSet + case evm.chainRules.IsEIP150: + cfg.JumpTable = &tangerineWhistleInstructionSet + case evm.chainRules.IsHomestead: + cfg.JumpTable = &homesteadInstructionSet + default: + cfg.JumpTable = &frontierInstructionSet + } + for i, eip := range cfg.ExtraEips { + copy := *cfg.JumpTable + if err := EnableEIP(eip, ©); err != nil { + // Disable it, so caller can check if it's activated or not + cfg.ExtraEips = append(cfg.ExtraEips[:i], cfg.ExtraEips[i+1:]...) + log.Error("EIP activation failed", "eip", eip, "error", err) + } + cfg.JumpTable = © + } + } + + // stratos keeper jump table update + jt := newKeeperInstructionSet(*cfg.JumpTable) + cfg.JumpTable = &jt + + return &EVMInterpreter{ + evm: evm, + cfg: cfg, + } +} + +// Run loops and evaluates the contract's code with the given input data and returns +// the return byte-slice and an error if one occurred. +// +// It's important to note that any errors returned by the interpreter should be +// considered a revert-and-consume-all-gas operation except for +// ErrExecutionReverted which means revert-and-keep-gas-left. +func (in *EVMInterpreter) Run(contract *Contract, input []byte, readOnly bool) (ret []byte, err error) { + // Increment the call depth which is restricted to 1024 + in.evm.depth++ + defer func() { in.evm.depth-- }() + + // Make sure the readOnly is only set if we aren't in readOnly yet. + // This also makes sure that the readOnly flag isn't removed for child calls. + if readOnly && !in.readOnly { + in.readOnly = true + defer func() { in.readOnly = false }() + } + + // Reset the previous call's return data. It's unimportant to preserve the old buffer + // as every returning call will return new data anyway. + in.returnData = nil + + // Don't bother with the execution if there's no code. + if len(contract.Code) == 0 { + return nil, nil + } + + var ( + op OpCode // current opcode + mem = NewMemory() // bound memory + stack = newstack() // local stack + callContext = &ScopeContext{ + Memory: mem, + Stack: stack, + Contract: contract, + } + // For optimisation reason we're using uint64 as the program counter. + // It's theoretically possible to go above 2^64. The YP defines the PC + // to be uint256. Practically much less so feasible. + pc = uint64(0) // program counter + cost uint64 + // copies used by tracer + pcCopy uint64 // needed for the deferred EVMLogger + gasCopy uint64 // for EVMLogger to log gas remaining before execution + logged bool // deferred EVMLogger should ignore already logged steps + res []byte // result of the opcode execution function + ) + // Don't move this deferred function, it's placed before the capturestate-deferred method, + // so that it get's executed _after_: the capturestate needs the stacks before + // they are returned to the pools + defer func() { + returnStack(stack) + }() + contract.Input = input + + if in.cfg.Debug { + defer func() { + if err != nil { + if !logged { + in.cfg.Tracer.CaptureState(pcCopy, op, gasCopy, cost, callContext, in.returnData, in.evm.depth, err) + } else { + in.cfg.Tracer.CaptureFault(pcCopy, op, gasCopy, cost, callContext, in.evm.depth, err) + } + } + }() + } + // The Interpreter main run loop (contextual). This loop runs until either an + // explicit STOP, RETURN or SELFDESTRUCT is executed, an error occurred during + // the execution of one of the operations or until the done flag is set by the + // parent context. + for { + if in.cfg.Debug { + // Capture pre-execution values for tracing. + logged, pcCopy, gasCopy = false, pc, contract.Gas + } + // Get the operation from the jump table and validate the stack to ensure there are + // enough stack items available to perform the operation. + op = contract.GetOp(pc) + operation := wrapWithKeeper(op, in, callContext) + cost = operation.constantGas // For tracing + // Validate stack + if sLen := stack.len(); sLen < operation.minStack { + return nil, &ErrStackUnderflow{stackLen: sLen, required: operation.minStack} + } else if sLen > operation.maxStack { + return nil, &ErrStackOverflow{stackLen: sLen, limit: operation.maxStack} + } + if !contract.UseGas(cost) { + return nil, ErrOutOfGas + } + if operation.dynamicGas != nil { + // All ops with a dynamic memory usage also has a dynamic gas cost. + var memorySize uint64 + // calculate the new memory size and expand the memory to fit + // the operation + // Memory check needs to be done prior to evaluating the dynamic gas portion, + // to detect calculation overflows + if operation.memorySize != nil { + memSize, overflow := operation.memorySize(stack) + if overflow { + return nil, ErrGasUintOverflow + } + // memory is expanded in words of 32 bytes. Gas + // is also calculated in words. + if memorySize, overflow = math.SafeMul(toWordSize(memSize), 32); overflow { + return nil, ErrGasUintOverflow + } + } + // Consume the gas and return an error if not enough gas is available. + // cost is explicitly set so that the capture state defer method can get the proper cost + var dynamicCost uint64 + dynamicCost, err = operation.dynamicGas(in.evm, contract, stack, mem, memorySize) + cost += dynamicCost // for tracing + if err != nil || !contract.UseGas(dynamicCost) { + return nil, ErrOutOfGas + } + // Do tracing before memory expansion + if in.cfg.Debug { + in.cfg.Tracer.CaptureState(pc, op, gasCopy, cost, callContext, in.returnData, in.evm.depth, err) + logged = true + } + if memorySize > 0 { + mem.Resize(memorySize) + } + } else if in.cfg.Debug { + in.cfg.Tracer.CaptureState(pc, op, gasCopy, cost, callContext, in.returnData, in.evm.depth, err) + logged = true + } + // execute the operation + res, err = operation.execute(&pc, in, callContext) + if err != nil { + break + } + pc++ + } + + if err == errStopToken { + err = nil // clear stop token error + } + + return res, err +} + +func (in *EVMInterpreter) getOperation(opCode OpCode) *operation { + return in.cfg.JumpTable[opCode] +} diff --git a/x/evm/vm/jump_table.go b/x/evm/vm/jump_table.go new file mode 100644 index 00000000..e6d0b6d5 --- /dev/null +++ b/x/evm/vm/jump_table.go @@ -0,0 +1,1062 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package vm + +import ( + "fmt" + + "github.com/ethereum/go-ethereum/params" +) + +type ( + executionFunc func(pc *uint64, interpreter *EVMInterpreter, callContext *ScopeContext) ([]byte, error) + gasFunc func(*EVM, *Contract, *Stack, *Memory, uint64) (uint64, error) // last parameter is the requested memory size as a uint64 + // memorySizeFunc returns the required size, and whether the operation overflowed a uint64 + memorySizeFunc func(*Stack) (size uint64, overflow bool) +) + +type operation struct { + // execute is the operation function + execute executionFunc + constantGas uint64 + dynamicGas gasFunc + // minStack tells how many stack items are required + minStack int + // maxStack specifies the max length the stack can have for this operation + // to not overflow the stack. + maxStack int + + // memorySize returns the memory size required for the operation + memorySize memorySizeFunc +} + +var ( + frontierInstructionSet = newFrontierInstructionSet() + homesteadInstructionSet = newHomesteadInstructionSet() + tangerineWhistleInstructionSet = newTangerineWhistleInstructionSet() + spuriousDragonInstructionSet = newSpuriousDragonInstructionSet() + byzantiumInstructionSet = newByzantiumInstructionSet() + constantinopleInstructionSet = newConstantinopleInstructionSet() + istanbulInstructionSet = newIstanbulInstructionSet() + berlinInstructionSet = newBerlinInstructionSet() + londonInstructionSet = newLondonInstructionSet() + mergeInstructionSet = newMergeInstructionSet() +) + +// JumpTable contains the EVM opcodes supported at a given fork. +type JumpTable [256]*operation + +func validate(jt JumpTable) JumpTable { + for i, op := range jt { + if op == nil { + panic(fmt.Sprintf("op %#x is not set", i)) + } + // The interpreter has an assumption that if the memorySize function is + // set, then the dynamicGas function is also set. This is a somewhat + // arbitrary assumption, and can be removed if we need to -- but it + // allows us to avoid a condition check. As long as we have that assumption + // in there, this little sanity check prevents us from merging in a + // change which violates it. + if op.memorySize != nil && op.dynamicGas == nil { + panic(fmt.Sprintf("op %v has dynamic memory but not dynamic gas", OpCode(i).String())) + } + } + return jt +} + +func newMergeInstructionSet() JumpTable { + instructionSet := newLondonInstructionSet() + instructionSet[RANDOM] = &operation{ + execute: opRandom, + constantGas: GasQuickStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + } + return validate(instructionSet) +} + +// newLondonInstructionSet returns the frontier, homestead, byzantium, +// contantinople, istanbul, petersburg, berlin and london instructions. +func newLondonInstructionSet() JumpTable { + instructionSet := newBerlinInstructionSet() + enable3529(&instructionSet) // EIP-3529: Reduction in refunds https://eips.ethereum.org/EIPS/eip-3529 + enable3198(&instructionSet) // Base fee opcode https://eips.ethereum.org/EIPS/eip-3198 + return validate(instructionSet) +} + +// newBerlinInstructionSet returns the frontier, homestead, byzantium, +// contantinople, istanbul, petersburg and berlin instructions. +func newBerlinInstructionSet() JumpTable { + instructionSet := newIstanbulInstructionSet() + enable2929(&instructionSet) // Access lists for trie accesses https://eips.ethereum.org/EIPS/eip-2929 + return validate(instructionSet) +} + +// newIstanbulInstructionSet returns the frontier, homestead, byzantium, +// contantinople, istanbul and petersburg instructions. +func newIstanbulInstructionSet() JumpTable { + instructionSet := newConstantinopleInstructionSet() + + enable1344(&instructionSet) // ChainID opcode - https://eips.ethereum.org/EIPS/eip-1344 + enable1884(&instructionSet) // Reprice reader opcodes - https://eips.ethereum.org/EIPS/eip-1884 + enable2200(&instructionSet) // Net metered SSTORE - https://eips.ethereum.org/EIPS/eip-2200 + + return validate(instructionSet) +} + +// newConstantinopleInstructionSet returns the frontier, homestead, +// byzantium and contantinople instructions. +func newConstantinopleInstructionSet() JumpTable { + instructionSet := newByzantiumInstructionSet() + instructionSet[SHL] = &operation{ + execute: opSHL, + constantGas: GasFastestStep, + minStack: minStack(2, 1), + maxStack: maxStack(2, 1), + } + instructionSet[SHR] = &operation{ + execute: opSHR, + constantGas: GasFastestStep, + minStack: minStack(2, 1), + maxStack: maxStack(2, 1), + } + instructionSet[SAR] = &operation{ + execute: opSAR, + constantGas: GasFastestStep, + minStack: minStack(2, 1), + maxStack: maxStack(2, 1), + } + instructionSet[EXTCODEHASH] = &operation{ + execute: opExtCodeHash, + constantGas: params.ExtcodeHashGasConstantinople, + minStack: minStack(1, 1), + maxStack: maxStack(1, 1), + } + instructionSet[CREATE2] = &operation{ + execute: opCreate2, + constantGas: params.Create2Gas, + dynamicGas: gasCreate2, + minStack: minStack(4, 1), + maxStack: maxStack(4, 1), + memorySize: memoryCreate2, + } + return validate(instructionSet) +} + +// newByzantiumInstructionSet returns the frontier, homestead and +// byzantium instructions. +func newByzantiumInstructionSet() JumpTable { + instructionSet := newSpuriousDragonInstructionSet() + instructionSet[STATICCALL] = &operation{ + execute: opStaticCall, + constantGas: params.CallGasEIP150, + dynamicGas: gasStaticCall, + minStack: minStack(6, 1), + maxStack: maxStack(6, 1), + memorySize: memoryStaticCall, + } + instructionSet[RETURNDATASIZE] = &operation{ + execute: opReturnDataSize, + constantGas: GasQuickStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + } + instructionSet[RETURNDATACOPY] = &operation{ + execute: opReturnDataCopy, + constantGas: GasFastestStep, + dynamicGas: gasReturnDataCopy, + minStack: minStack(3, 0), + maxStack: maxStack(3, 0), + memorySize: memoryReturnDataCopy, + } + instructionSet[REVERT] = &operation{ + execute: opRevert, + dynamicGas: gasRevert, + minStack: minStack(2, 0), + maxStack: maxStack(2, 0), + memorySize: memoryRevert, + } + return validate(instructionSet) +} + +// EIP 158 a.k.a Spurious Dragon +func newSpuriousDragonInstructionSet() JumpTable { + instructionSet := newTangerineWhistleInstructionSet() + instructionSet[EXP].dynamicGas = gasExpEIP158 + return validate(instructionSet) +} + +// EIP 150 a.k.a Tangerine Whistle +func newTangerineWhistleInstructionSet() JumpTable { + instructionSet := newHomesteadInstructionSet() + instructionSet[BALANCE].constantGas = params.BalanceGasEIP150 + instructionSet[EXTCODESIZE].constantGas = params.ExtcodeSizeGasEIP150 + instructionSet[SLOAD].constantGas = params.SloadGasEIP150 + instructionSet[EXTCODECOPY].constantGas = params.ExtcodeCopyBaseEIP150 + instructionSet[CALL].constantGas = params.CallGasEIP150 + instructionSet[CALLCODE].constantGas = params.CallGasEIP150 + instructionSet[DELEGATECALL].constantGas = params.CallGasEIP150 + return validate(instructionSet) +} + +// newHomesteadInstructionSet returns the frontier and homestead +// instructions that can be executed during the homestead phase. +func newHomesteadInstructionSet() JumpTable { + instructionSet := newFrontierInstructionSet() + instructionSet[DELEGATECALL] = &operation{ + execute: opDelegateCall, + dynamicGas: gasDelegateCall, + constantGas: params.CallGasFrontier, + minStack: minStack(6, 1), + maxStack: maxStack(6, 1), + memorySize: memoryDelegateCall, + } + return validate(instructionSet) +} + +// newFrontierInstructionSet returns the frontier instructions +// that can be executed during the frontier phase. +func newFrontierInstructionSet() JumpTable { + tbl := JumpTable{ + STOP: { + execute: opStop, + constantGas: 0, + minStack: minStack(0, 0), + maxStack: maxStack(0, 0), + }, + ADD: { + execute: opAdd, + constantGas: GasFastestStep, + minStack: minStack(2, 1), + maxStack: maxStack(2, 1), + }, + MUL: { + execute: opMul, + constantGas: GasFastStep, + minStack: minStack(2, 1), + maxStack: maxStack(2, 1), + }, + SUB: { + execute: opSub, + constantGas: GasFastestStep, + minStack: minStack(2, 1), + maxStack: maxStack(2, 1), + }, + DIV: { + execute: opDiv, + constantGas: GasFastStep, + minStack: minStack(2, 1), + maxStack: maxStack(2, 1), + }, + SDIV: { + execute: opSdiv, + constantGas: GasFastStep, + minStack: minStack(2, 1), + maxStack: maxStack(2, 1), + }, + MOD: { + execute: opMod, + constantGas: GasFastStep, + minStack: minStack(2, 1), + maxStack: maxStack(2, 1), + }, + SMOD: { + execute: opSmod, + constantGas: GasFastStep, + minStack: minStack(2, 1), + maxStack: maxStack(2, 1), + }, + ADDMOD: { + execute: opAddmod, + constantGas: GasMidStep, + minStack: minStack(3, 1), + maxStack: maxStack(3, 1), + }, + MULMOD: { + execute: opMulmod, + constantGas: GasMidStep, + minStack: minStack(3, 1), + maxStack: maxStack(3, 1), + }, + EXP: { + execute: opExp, + dynamicGas: gasExpFrontier, + minStack: minStack(2, 1), + maxStack: maxStack(2, 1), + }, + SIGNEXTEND: { + execute: opSignExtend, + constantGas: GasFastStep, + minStack: minStack(2, 1), + maxStack: maxStack(2, 1), + }, + LT: { + execute: opLt, + constantGas: GasFastestStep, + minStack: minStack(2, 1), + maxStack: maxStack(2, 1), + }, + GT: { + execute: opGt, + constantGas: GasFastestStep, + minStack: minStack(2, 1), + maxStack: maxStack(2, 1), + }, + SLT: { + execute: opSlt, + constantGas: GasFastestStep, + minStack: minStack(2, 1), + maxStack: maxStack(2, 1), + }, + SGT: { + execute: opSgt, + constantGas: GasFastestStep, + minStack: minStack(2, 1), + maxStack: maxStack(2, 1), + }, + EQ: { + execute: opEq, + constantGas: GasFastestStep, + minStack: minStack(2, 1), + maxStack: maxStack(2, 1), + }, + ISZERO: { + execute: opIszero, + constantGas: GasFastestStep, + minStack: minStack(1, 1), + maxStack: maxStack(1, 1), + }, + AND: { + execute: opAnd, + constantGas: GasFastestStep, + minStack: minStack(2, 1), + maxStack: maxStack(2, 1), + }, + XOR: { + execute: opXor, + constantGas: GasFastestStep, + minStack: minStack(2, 1), + maxStack: maxStack(2, 1), + }, + OR: { + execute: opOr, + constantGas: GasFastestStep, + minStack: minStack(2, 1), + maxStack: maxStack(2, 1), + }, + NOT: { + execute: opNot, + constantGas: GasFastestStep, + minStack: minStack(1, 1), + maxStack: maxStack(1, 1), + }, + BYTE: { + execute: opByte, + constantGas: GasFastestStep, + minStack: minStack(2, 1), + maxStack: maxStack(2, 1), + }, + KECCAK256: { + execute: opKeccak256, + constantGas: params.Keccak256Gas, + dynamicGas: gasKeccak256, + minStack: minStack(2, 1), + maxStack: maxStack(2, 1), + memorySize: memoryKeccak256, + }, + ADDRESS: { + execute: opAddress, + constantGas: GasQuickStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + BALANCE: { + execute: opBalance, + constantGas: params.BalanceGasFrontier, + minStack: minStack(1, 1), + maxStack: maxStack(1, 1), + }, + ORIGIN: { + execute: opOrigin, + constantGas: GasQuickStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + CALLER: { + execute: opCaller, + constantGas: GasQuickStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + CALLVALUE: { + execute: opCallValue, + constantGas: GasQuickStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + CALLDATALOAD: { + execute: opCallDataLoad, + constantGas: GasFastestStep, + minStack: minStack(1, 1), + maxStack: maxStack(1, 1), + }, + CALLDATASIZE: { + execute: opCallDataSize, + constantGas: GasQuickStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + CALLDATACOPY: { + execute: opCallDataCopy, + constantGas: GasFastestStep, + dynamicGas: gasCallDataCopy, + minStack: minStack(3, 0), + maxStack: maxStack(3, 0), + memorySize: memoryCallDataCopy, + }, + CODESIZE: { + execute: opCodeSize, + constantGas: GasQuickStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + CODECOPY: { + execute: opCodeCopy, + constantGas: GasFastestStep, + dynamicGas: gasCodeCopy, + minStack: minStack(3, 0), + maxStack: maxStack(3, 0), + memorySize: memoryCodeCopy, + }, + GASPRICE: { + execute: opGasprice, + constantGas: GasQuickStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + EXTCODESIZE: { + execute: opExtCodeSize, + constantGas: params.ExtcodeSizeGasFrontier, + minStack: minStack(1, 1), + maxStack: maxStack(1, 1), + }, + EXTCODECOPY: { + execute: opExtCodeCopy, + constantGas: params.ExtcodeCopyBaseFrontier, + dynamicGas: gasExtCodeCopy, + minStack: minStack(4, 0), + maxStack: maxStack(4, 0), + memorySize: memoryExtCodeCopy, + }, + BLOCKHASH: { + execute: opBlockhash, + constantGas: GasExtStep, + minStack: minStack(1, 1), + maxStack: maxStack(1, 1), + }, + COINBASE: { + execute: opCoinbase, + constantGas: GasQuickStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + TIMESTAMP: { + execute: opTimestamp, + constantGas: GasQuickStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + NUMBER: { + execute: opNumber, + constantGas: GasQuickStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + DIFFICULTY: { + execute: opDifficulty, + constantGas: GasQuickStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + GASLIMIT: { + execute: opGasLimit, + constantGas: GasQuickStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + POP: { + execute: opPop, + constantGas: GasQuickStep, + minStack: minStack(1, 0), + maxStack: maxStack(1, 0), + }, + MLOAD: { + execute: opMload, + constantGas: GasFastestStep, + dynamicGas: gasMLoad, + minStack: minStack(1, 1), + maxStack: maxStack(1, 1), + memorySize: memoryMLoad, + }, + MSTORE: { + execute: opMstore, + constantGas: GasFastestStep, + dynamicGas: gasMStore, + minStack: minStack(2, 0), + maxStack: maxStack(2, 0), + memorySize: memoryMStore, + }, + MSTORE8: { + execute: opMstore8, + constantGas: GasFastestStep, + dynamicGas: gasMStore8, + memorySize: memoryMStore8, + minStack: minStack(2, 0), + maxStack: maxStack(2, 0), + }, + SLOAD: { + execute: opSload, + constantGas: params.SloadGasFrontier, + minStack: minStack(1, 1), + maxStack: maxStack(1, 1), + }, + SSTORE: { + execute: opSstore, + dynamicGas: gasSStore, + minStack: minStack(2, 0), + maxStack: maxStack(2, 0), + }, + JUMP: { + execute: opJump, + constantGas: GasMidStep, + minStack: minStack(1, 0), + maxStack: maxStack(1, 0), + }, + JUMPI: { + execute: opJumpi, + constantGas: GasSlowStep, + minStack: minStack(2, 0), + maxStack: maxStack(2, 0), + }, + PC: { + execute: opPc, + constantGas: GasQuickStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + MSIZE: { + execute: opMsize, + constantGas: GasQuickStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + GAS: { + execute: opGas, + constantGas: GasQuickStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + JUMPDEST: { + execute: opJumpdest, + constantGas: params.JumpdestGas, + minStack: minStack(0, 0), + maxStack: maxStack(0, 0), + }, + PUSH1: { + execute: opPush1, + constantGas: GasFastestStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + PUSH2: { + execute: makePush(2, 2), + constantGas: GasFastestStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + PUSH3: { + execute: makePush(3, 3), + constantGas: GasFastestStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + PUSH4: { + execute: makePush(4, 4), + constantGas: GasFastestStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + PUSH5: { + execute: makePush(5, 5), + constantGas: GasFastestStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + PUSH6: { + execute: makePush(6, 6), + constantGas: GasFastestStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + PUSH7: { + execute: makePush(7, 7), + constantGas: GasFastestStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + PUSH8: { + execute: makePush(8, 8), + constantGas: GasFastestStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + PUSH9: { + execute: makePush(9, 9), + constantGas: GasFastestStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + PUSH10: { + execute: makePush(10, 10), + constantGas: GasFastestStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + PUSH11: { + execute: makePush(11, 11), + constantGas: GasFastestStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + PUSH12: { + execute: makePush(12, 12), + constantGas: GasFastestStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + PUSH13: { + execute: makePush(13, 13), + constantGas: GasFastestStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + PUSH14: { + execute: makePush(14, 14), + constantGas: GasFastestStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + PUSH15: { + execute: makePush(15, 15), + constantGas: GasFastestStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + PUSH16: { + execute: makePush(16, 16), + constantGas: GasFastestStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + PUSH17: { + execute: makePush(17, 17), + constantGas: GasFastestStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + PUSH18: { + execute: makePush(18, 18), + constantGas: GasFastestStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + PUSH19: { + execute: makePush(19, 19), + constantGas: GasFastestStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + PUSH20: { + execute: makePush(20, 20), + constantGas: GasFastestStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + PUSH21: { + execute: makePush(21, 21), + constantGas: GasFastestStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + PUSH22: { + execute: makePush(22, 22), + constantGas: GasFastestStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + PUSH23: { + execute: makePush(23, 23), + constantGas: GasFastestStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + PUSH24: { + execute: makePush(24, 24), + constantGas: GasFastestStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + PUSH25: { + execute: makePush(25, 25), + constantGas: GasFastestStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + PUSH26: { + execute: makePush(26, 26), + constantGas: GasFastestStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + PUSH27: { + execute: makePush(27, 27), + constantGas: GasFastestStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + PUSH28: { + execute: makePush(28, 28), + constantGas: GasFastestStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + PUSH29: { + execute: makePush(29, 29), + constantGas: GasFastestStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + PUSH30: { + execute: makePush(30, 30), + constantGas: GasFastestStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + PUSH31: { + execute: makePush(31, 31), + constantGas: GasFastestStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + PUSH32: { + execute: makePush(32, 32), + constantGas: GasFastestStep, + minStack: minStack(0, 1), + maxStack: maxStack(0, 1), + }, + DUP1: { + execute: makeDup(1), + constantGas: GasFastestStep, + minStack: minDupStack(1), + maxStack: maxDupStack(1), + }, + DUP2: { + execute: makeDup(2), + constantGas: GasFastestStep, + minStack: minDupStack(2), + maxStack: maxDupStack(2), + }, + DUP3: { + execute: makeDup(3), + constantGas: GasFastestStep, + minStack: minDupStack(3), + maxStack: maxDupStack(3), + }, + DUP4: { + execute: makeDup(4), + constantGas: GasFastestStep, + minStack: minDupStack(4), + maxStack: maxDupStack(4), + }, + DUP5: { + execute: makeDup(5), + constantGas: GasFastestStep, + minStack: minDupStack(5), + maxStack: maxDupStack(5), + }, + DUP6: { + execute: makeDup(6), + constantGas: GasFastestStep, + minStack: minDupStack(6), + maxStack: maxDupStack(6), + }, + DUP7: { + execute: makeDup(7), + constantGas: GasFastestStep, + minStack: minDupStack(7), + maxStack: maxDupStack(7), + }, + DUP8: { + execute: makeDup(8), + constantGas: GasFastestStep, + minStack: minDupStack(8), + maxStack: maxDupStack(8), + }, + DUP9: { + execute: makeDup(9), + constantGas: GasFastestStep, + minStack: minDupStack(9), + maxStack: maxDupStack(9), + }, + DUP10: { + execute: makeDup(10), + constantGas: GasFastestStep, + minStack: minDupStack(10), + maxStack: maxDupStack(10), + }, + DUP11: { + execute: makeDup(11), + constantGas: GasFastestStep, + minStack: minDupStack(11), + maxStack: maxDupStack(11), + }, + DUP12: { + execute: makeDup(12), + constantGas: GasFastestStep, + minStack: minDupStack(12), + maxStack: maxDupStack(12), + }, + DUP13: { + execute: makeDup(13), + constantGas: GasFastestStep, + minStack: minDupStack(13), + maxStack: maxDupStack(13), + }, + DUP14: { + execute: makeDup(14), + constantGas: GasFastestStep, + minStack: minDupStack(14), + maxStack: maxDupStack(14), + }, + DUP15: { + execute: makeDup(15), + constantGas: GasFastestStep, + minStack: minDupStack(15), + maxStack: maxDupStack(15), + }, + DUP16: { + execute: makeDup(16), + constantGas: GasFastestStep, + minStack: minDupStack(16), + maxStack: maxDupStack(16), + }, + SWAP1: { + execute: makeSwap(1), + constantGas: GasFastestStep, + minStack: minSwapStack(2), + maxStack: maxSwapStack(2), + }, + SWAP2: { + execute: makeSwap(2), + constantGas: GasFastestStep, + minStack: minSwapStack(3), + maxStack: maxSwapStack(3), + }, + SWAP3: { + execute: makeSwap(3), + constantGas: GasFastestStep, + minStack: minSwapStack(4), + maxStack: maxSwapStack(4), + }, + SWAP4: { + execute: makeSwap(4), + constantGas: GasFastestStep, + minStack: minSwapStack(5), + maxStack: maxSwapStack(5), + }, + SWAP5: { + execute: makeSwap(5), + constantGas: GasFastestStep, + minStack: minSwapStack(6), + maxStack: maxSwapStack(6), + }, + SWAP6: { + execute: makeSwap(6), + constantGas: GasFastestStep, + minStack: minSwapStack(7), + maxStack: maxSwapStack(7), + }, + SWAP7: { + execute: makeSwap(7), + constantGas: GasFastestStep, + minStack: minSwapStack(8), + maxStack: maxSwapStack(8), + }, + SWAP8: { + execute: makeSwap(8), + constantGas: GasFastestStep, + minStack: minSwapStack(9), + maxStack: maxSwapStack(9), + }, + SWAP9: { + execute: makeSwap(9), + constantGas: GasFastestStep, + minStack: minSwapStack(10), + maxStack: maxSwapStack(10), + }, + SWAP10: { + execute: makeSwap(10), + constantGas: GasFastestStep, + minStack: minSwapStack(11), + maxStack: maxSwapStack(11), + }, + SWAP11: { + execute: makeSwap(11), + constantGas: GasFastestStep, + minStack: minSwapStack(12), + maxStack: maxSwapStack(12), + }, + SWAP12: { + execute: makeSwap(12), + constantGas: GasFastestStep, + minStack: minSwapStack(13), + maxStack: maxSwapStack(13), + }, + SWAP13: { + execute: makeSwap(13), + constantGas: GasFastestStep, + minStack: minSwapStack(14), + maxStack: maxSwapStack(14), + }, + SWAP14: { + execute: makeSwap(14), + constantGas: GasFastestStep, + minStack: minSwapStack(15), + maxStack: maxSwapStack(15), + }, + SWAP15: { + execute: makeSwap(15), + constantGas: GasFastestStep, + minStack: minSwapStack(16), + maxStack: maxSwapStack(16), + }, + SWAP16: { + execute: makeSwap(16), + constantGas: GasFastestStep, + minStack: minSwapStack(17), + maxStack: maxSwapStack(17), + }, + LOG0: { + execute: makeLog(0), + dynamicGas: makeGasLog(0), + minStack: minStack(2, 0), + maxStack: maxStack(2, 0), + memorySize: memoryLog, + }, + LOG1: { + execute: makeLog(1), + dynamicGas: makeGasLog(1), + minStack: minStack(3, 0), + maxStack: maxStack(3, 0), + memorySize: memoryLog, + }, + LOG2: { + execute: makeLog(2), + dynamicGas: makeGasLog(2), + minStack: minStack(4, 0), + maxStack: maxStack(4, 0), + memorySize: memoryLog, + }, + LOG3: { + execute: makeLog(3), + dynamicGas: makeGasLog(3), + minStack: minStack(5, 0), + maxStack: maxStack(5, 0), + memorySize: memoryLog, + }, + LOG4: { + execute: makeLog(4), + dynamicGas: makeGasLog(4), + minStack: minStack(6, 0), + maxStack: maxStack(6, 0), + memorySize: memoryLog, + }, + CREATE: { + execute: opCreate, + constantGas: params.CreateGas, + dynamicGas: gasCreate, + minStack: minStack(3, 1), + maxStack: maxStack(3, 1), + memorySize: memoryCreate, + }, + CALL: { + execute: opCall, + constantGas: params.CallGasFrontier, + dynamicGas: gasCall, + minStack: minStack(7, 1), + maxStack: maxStack(7, 1), + memorySize: memoryCall, + }, + CALLCODE: { + execute: opCallCode, + constantGas: params.CallGasFrontier, + dynamicGas: gasCallCode, + minStack: minStack(7, 1), + maxStack: maxStack(7, 1), + memorySize: memoryCall, + }, + RETURN: { + execute: opReturn, + dynamicGas: gasReturn, + minStack: minStack(2, 0), + maxStack: maxStack(2, 0), + memorySize: memoryReturn, + }, + SELFDESTRUCT: { + execute: opSelfdestruct, + dynamicGas: gasSelfdestruct, + minStack: minStack(1, 0), + maxStack: maxStack(1, 0), + }, + } + + // Fill all unassigned slots with opUndefined. + for i, entry := range tbl { + if entry == nil { + tbl[i] = &operation{execute: opUndefined, maxStack: maxStack(0, 0)} + } + } + + return validate(tbl) +} + +// newKeeperInstructionSet returns an updated instructions with modified "call" call for +// custom stratos execution +// NOTE: Maybe we should make on our specific update, instead of apply on go-ethereum update +// see a top lines with instructions sets +func newKeeperInstructionSet(instructionSet JumpTable) JumpTable { + instructionSet[PREPAY] = &operation{ + execute: opPrepay, + constantGas: CallGasPrepay, + dynamicGas: gasPrepay, + minStack: minStack(6, 1), + maxStack: maxStack(6, 1), + memorySize: memoryPrepay, + } + + return validate(instructionSet) +} diff --git a/x/evm/vm/keeper_amplifier.go b/x/evm/vm/keeper_amplifier.go new file mode 100644 index 00000000..28f0ac9d --- /dev/null +++ b/x/evm/vm/keeper_amplifier.go @@ -0,0 +1,28 @@ +package vm + +var handlerNumToOpcode = map[int64]OpCode{ + 0xf1: PREPAY, +} + +func wrapWithKeeper(op OpCode, interpreter *EVMInterpreter, scope *ScopeContext) *operation { + // only CALL for solpatching + if op != CALL { + return interpreter.getOperation(op) + } + + stack := scope.Stack + addr := stack.Back(1) + opKey := addr.ToBig().Int64() + + // determine opcode with reserved address for amplification + opToOverride, ok := handlerNumToOpcode[opKey] + if !ok { + return interpreter.getOperation(op) + } + + // swaping callGasTemp with addr and replace with gas to decrase params + stack.swap(2) + stack.pop() + + return interpreter.getOperation(opToOverride) +} diff --git a/x/evm/vm/logger.go b/x/evm/vm/logger.go new file mode 100644 index 00000000..50fccafc --- /dev/null +++ b/x/evm/vm/logger.go @@ -0,0 +1,44 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package vm + +import ( + "math/big" + "time" + + "github.com/ethereum/go-ethereum/common" +) + +// EVMLogger is used to collect execution traces from an EVM transaction +// execution. CaptureState is called for each step of the VM with the +// current VM state. +// Note that reference types are actual VM data structures; make copies +// if you need to retain them beyond the current call. +type EVMLogger interface { + // Transaction level + CaptureTxStart(gasLimit uint64) + CaptureTxEnd(restGas uint64) + // Top call frame + CaptureStart(env *EVM, from common.Address, to common.Address, create bool, input []byte, gas uint64, value *big.Int) + CaptureEnd(output []byte, gasUsed uint64, t time.Duration, err error) + // Rest of call frames + CaptureEnter(typ OpCode, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) + CaptureExit(output []byte, gasUsed uint64, err error) + // Opcode level + CaptureState(pc uint64, op OpCode, gas, cost uint64, scope *ScopeContext, rData []byte, depth int, err error) + CaptureFault(pc uint64, op OpCode, gas, cost uint64, scope *ScopeContext, depth int, err error) +} diff --git a/x/evm/vm/memory.go b/x/evm/vm/memory.go new file mode 100644 index 00000000..35b72999 --- /dev/null +++ b/x/evm/vm/memory.go @@ -0,0 +1,105 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package vm + +import ( + "github.com/holiman/uint256" +) + +// Memory implements a simple memory model for the ethereum virtual machine. +type Memory struct { + store []byte + lastGasCost uint64 +} + +// NewMemory returns a new memory model. +func NewMemory() *Memory { + return &Memory{} +} + +// Set sets offset + size to value +func (m *Memory) Set(offset, size uint64, value []byte) { + // It's possible the offset is greater than 0 and size equals 0. This is because + // the calcMemSize (common.go) could potentially return 0 when size is zero (NO-OP) + if size > 0 { + // length of store may never be less than offset + size. + // The store should be resized PRIOR to setting the memory + if offset+size > uint64(len(m.store)) { + panic("invalid memory: store empty") + } + copy(m.store[offset:offset+size], value) + } +} + +// Set32 sets the 32 bytes starting at offset to the value of val, left-padded with zeroes to +// 32 bytes. +func (m *Memory) Set32(offset uint64, val *uint256.Int) { + // length of store may never be less than offset + size. + // The store should be resized PRIOR to setting the memory + if offset+32 > uint64(len(m.store)) { + panic("invalid memory: store empty") + } + // Fill in relevant bits + b32 := val.Bytes32() + copy(m.store[offset:], b32[:]) +} + +// Resize resizes the memory to size +func (m *Memory) Resize(size uint64) { + if uint64(m.Len()) < size { + m.store = append(m.store, make([]byte, size-uint64(m.Len()))...) + } +} + +// GetCopy returns offset + size as a new slice +func (m *Memory) GetCopy(offset, size int64) (cpy []byte) { + if size == 0 { + return nil + } + + if len(m.store) > int(offset) { + cpy = make([]byte, size) + copy(cpy, m.store[offset:offset+size]) + + return + } + + return +} + +// GetPtr returns the offset + size +func (m *Memory) GetPtr(offset, size int64) []byte { + if size == 0 { + return nil + } + + if len(m.store) > int(offset) { + return m.store[offset : offset+size] + } + + return nil +} + +// Len returns the length of the backing slice +func (m *Memory) Len() int { + return len(m.store) +} + +// Data returns the backing slice +func (m *Memory) Data() []byte { + return m.store +} diff --git a/x/evm/vm/memory_table.go b/x/evm/vm/memory_table.go new file mode 100644 index 00000000..0769e88e --- /dev/null +++ b/x/evm/vm/memory_table.go @@ -0,0 +1,128 @@ +// Copyright 2017 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package vm + +func memoryKeccak256(stack *Stack) (uint64, bool) { + return calcMemSize64(stack.Back(0), stack.Back(1)) +} + +func memoryCallDataCopy(stack *Stack) (uint64, bool) { + return calcMemSize64(stack.Back(0), stack.Back(2)) +} + +func memoryReturnDataCopy(stack *Stack) (uint64, bool) { + return calcMemSize64(stack.Back(0), stack.Back(2)) +} + +func memoryCodeCopy(stack *Stack) (uint64, bool) { + return calcMemSize64(stack.Back(0), stack.Back(2)) +} + +func memoryExtCodeCopy(stack *Stack) (uint64, bool) { + return calcMemSize64(stack.Back(1), stack.Back(3)) +} + +func memoryMLoad(stack *Stack) (uint64, bool) { + return calcMemSize64WithUint(stack.Back(0), 32) +} + +func memoryMStore8(stack *Stack) (uint64, bool) { + return calcMemSize64WithUint(stack.Back(0), 1) +} + +func memoryMStore(stack *Stack) (uint64, bool) { + return calcMemSize64WithUint(stack.Back(0), 32) +} + +func memoryCreate(stack *Stack) (uint64, bool) { + return calcMemSize64(stack.Back(1), stack.Back(2)) +} + +func memoryCreate2(stack *Stack) (uint64, bool) { + return calcMemSize64(stack.Back(1), stack.Back(2)) +} + +func memoryCall(stack *Stack) (uint64, bool) { + x, overflow := calcMemSize64(stack.Back(5), stack.Back(6)) + if overflow { + return 0, true + } + y, overflow := calcMemSize64(stack.Back(3), stack.Back(4)) + if overflow { + return 0, true + } + if x > y { + return x, false + } + return y, false +} +func memoryDelegateCall(stack *Stack) (uint64, bool) { + x, overflow := calcMemSize64(stack.Back(4), stack.Back(5)) + if overflow { + return 0, true + } + y, overflow := calcMemSize64(stack.Back(2), stack.Back(3)) + if overflow { + return 0, true + } + if x > y { + return x, false + } + return y, false +} + +func memoryStaticCall(stack *Stack) (uint64, bool) { + x, overflow := calcMemSize64(stack.Back(4), stack.Back(5)) + if overflow { + return 0, true + } + y, overflow := calcMemSize64(stack.Back(2), stack.Back(3)) + if overflow { + return 0, true + } + if x > y { + return x, false + } + return y, false +} + +func memoryReturn(stack *Stack) (uint64, bool) { + return calcMemSize64(stack.Back(0), stack.Back(1)) +} + +func memoryRevert(stack *Stack) (uint64, bool) { + return calcMemSize64(stack.Back(0), stack.Back(1)) +} + +func memoryLog(stack *Stack) (uint64, bool) { + return calcMemSize64(stack.Back(0), stack.Back(1)) +} + +func memoryPrepay(stack *Stack) (uint64, bool) { + x, overflow := calcMemSize64(stack.Back(4), stack.Back(5)) + if overflow { + return 0, true + } + y, overflow := calcMemSize64(stack.Back(2), stack.Back(3)) + if overflow { + return 0, true + } + if x > y { + return x, false + } + return y, false +} diff --git a/x/evm/vm/opcodes.go b/x/evm/vm/opcodes.go new file mode 100644 index 00000000..9caae9d2 --- /dev/null +++ b/x/evm/vm/opcodes.go @@ -0,0 +1,562 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package vm + +import ( + "fmt" +) + +// OpCode is an EVM opcode +type OpCode byte + +// IsPush specifies if an opcode is a PUSH opcode. +func (op OpCode) IsPush() bool { + switch op { + case PUSH1, PUSH2, PUSH3, PUSH4, PUSH5, PUSH6, PUSH7, PUSH8, PUSH9, PUSH10, PUSH11, PUSH12, PUSH13, PUSH14, PUSH15, PUSH16, PUSH17, PUSH18, PUSH19, PUSH20, PUSH21, PUSH22, PUSH23, PUSH24, PUSH25, PUSH26, PUSH27, PUSH28, PUSH29, PUSH30, PUSH31, PUSH32: + return true + } + return false +} + +// 0x0 range - arithmetic ops. +const ( + STOP OpCode = 0x0 + ADD OpCode = 0x1 + MUL OpCode = 0x2 + SUB OpCode = 0x3 + DIV OpCode = 0x4 + SDIV OpCode = 0x5 + MOD OpCode = 0x6 + SMOD OpCode = 0x7 + ADDMOD OpCode = 0x8 + MULMOD OpCode = 0x9 + EXP OpCode = 0xa + SIGNEXTEND OpCode = 0xb +) + +// 0x10 range - comparison ops. +const ( + LT OpCode = 0x10 + GT OpCode = 0x11 + SLT OpCode = 0x12 + SGT OpCode = 0x13 + EQ OpCode = 0x14 + ISZERO OpCode = 0x15 + AND OpCode = 0x16 + OR OpCode = 0x17 + XOR OpCode = 0x18 + NOT OpCode = 0x19 + BYTE OpCode = 0x1a + SHL OpCode = 0x1b + SHR OpCode = 0x1c + SAR OpCode = 0x1d +) + +// 0x20 range - crypto. +const ( + KECCAK256 OpCode = 0x20 +) + +// 0x30 range - closure state. +const ( + ADDRESS OpCode = 0x30 + BALANCE OpCode = 0x31 + ORIGIN OpCode = 0x32 + CALLER OpCode = 0x33 + CALLVALUE OpCode = 0x34 + CALLDATALOAD OpCode = 0x35 + CALLDATASIZE OpCode = 0x36 + CALLDATACOPY OpCode = 0x37 + CODESIZE OpCode = 0x38 + CODECOPY OpCode = 0x39 + GASPRICE OpCode = 0x3a + EXTCODESIZE OpCode = 0x3b + EXTCODECOPY OpCode = 0x3c + RETURNDATASIZE OpCode = 0x3d + RETURNDATACOPY OpCode = 0x3e + EXTCODEHASH OpCode = 0x3f +) + +// 0x40 range - block operations. +const ( + BLOCKHASH OpCode = 0x40 + COINBASE OpCode = 0x41 + TIMESTAMP OpCode = 0x42 + NUMBER OpCode = 0x43 + DIFFICULTY OpCode = 0x44 + RANDOM OpCode = 0x44 // Same as DIFFICULTY + GASLIMIT OpCode = 0x45 + CHAINID OpCode = 0x46 + SELFBALANCE OpCode = 0x47 + BASEFEE OpCode = 0x48 +) + +// 0x50 range - 'storage' and execution. +const ( + POP OpCode = 0x50 + MLOAD OpCode = 0x51 + MSTORE OpCode = 0x52 + MSTORE8 OpCode = 0x53 + SLOAD OpCode = 0x54 + SSTORE OpCode = 0x55 + JUMP OpCode = 0x56 + JUMPI OpCode = 0x57 + PC OpCode = 0x58 + MSIZE OpCode = 0x59 + GAS OpCode = 0x5a + JUMPDEST OpCode = 0x5b + PUSH0 OpCode = 0x5f +) + +// 0x60 range - pushes. +const ( + PUSH1 OpCode = 0x60 + iota + PUSH2 + PUSH3 + PUSH4 + PUSH5 + PUSH6 + PUSH7 + PUSH8 + PUSH9 + PUSH10 + PUSH11 + PUSH12 + PUSH13 + PUSH14 + PUSH15 + PUSH16 + PUSH17 + PUSH18 + PUSH19 + PUSH20 + PUSH21 + PUSH22 + PUSH23 + PUSH24 + PUSH25 + PUSH26 + PUSH27 + PUSH28 + PUSH29 + PUSH30 + PUSH31 + PUSH32 +) + +// 0x80 range - dups. +const ( + DUP1 = 0x80 + iota + DUP2 + DUP3 + DUP4 + DUP5 + DUP6 + DUP7 + DUP8 + DUP9 + DUP10 + DUP11 + DUP12 + DUP13 + DUP14 + DUP15 + DUP16 +) + +// 0x90 range - swaps. +const ( + SWAP1 = 0x90 + iota + SWAP2 + SWAP3 + SWAP4 + SWAP5 + SWAP6 + SWAP7 + SWAP8 + SWAP9 + SWAP10 + SWAP11 + SWAP12 + SWAP13 + SWAP14 + SWAP15 + SWAP16 +) + +// 0xa0 range - logging ops. +const ( + LOG0 OpCode = 0xa0 + iota + LOG1 + LOG2 + LOG3 + LOG4 +) + +// 0xdc range - closures. Stratos chain only +const ( + PREPAY OpCode = 0xdc +) + +// 0xf0 range - closures. +const ( + CREATE OpCode = 0xf0 + CALL OpCode = 0xf1 + CALLCODE OpCode = 0xf2 + RETURN OpCode = 0xf3 + DELEGATECALL OpCode = 0xf4 + CREATE2 OpCode = 0xf5 + + STATICCALL OpCode = 0xfa + REVERT OpCode = 0xfd + INVALID OpCode = 0xfe + SELFDESTRUCT OpCode = 0xff +) + +// Since the opcodes aren't all in order we can't use a regular slice. +var opCodeToString = map[OpCode]string{ + // 0x0 range - arithmetic ops. + STOP: "STOP", + ADD: "ADD", + MUL: "MUL", + SUB: "SUB", + DIV: "DIV", + SDIV: "SDIV", + MOD: "MOD", + SMOD: "SMOD", + EXP: "EXP", + NOT: "NOT", + LT: "LT", + GT: "GT", + SLT: "SLT", + SGT: "SGT", + EQ: "EQ", + ISZERO: "ISZERO", + SIGNEXTEND: "SIGNEXTEND", + + // 0x10 range - bit ops. + AND: "AND", + OR: "OR", + XOR: "XOR", + BYTE: "BYTE", + SHL: "SHL", + SHR: "SHR", + SAR: "SAR", + ADDMOD: "ADDMOD", + MULMOD: "MULMOD", + + // 0x20 range - crypto. + KECCAK256: "KECCAK256", + + // 0x30 range - closure state. + ADDRESS: "ADDRESS", + BALANCE: "BALANCE", + ORIGIN: "ORIGIN", + CALLER: "CALLER", + CALLVALUE: "CALLVALUE", + CALLDATALOAD: "CALLDATALOAD", + CALLDATASIZE: "CALLDATASIZE", + CALLDATACOPY: "CALLDATACOPY", + CODESIZE: "CODESIZE", + CODECOPY: "CODECOPY", + GASPRICE: "GASPRICE", + EXTCODESIZE: "EXTCODESIZE", + EXTCODECOPY: "EXTCODECOPY", + RETURNDATASIZE: "RETURNDATASIZE", + RETURNDATACOPY: "RETURNDATACOPY", + EXTCODEHASH: "EXTCODEHASH", + + // 0x40 range - block operations. + BLOCKHASH: "BLOCKHASH", + COINBASE: "COINBASE", + TIMESTAMP: "TIMESTAMP", + NUMBER: "NUMBER", + DIFFICULTY: "DIFFICULTY", // TODO (MariusVanDerWijden) rename to RANDOM post merge + GASLIMIT: "GASLIMIT", + CHAINID: "CHAINID", + SELFBALANCE: "SELFBALANCE", + BASEFEE: "BASEFEE", + + // 0x50 range - 'storage' and execution. + POP: "POP", + //DUP: "DUP", + //SWAP: "SWAP", + MLOAD: "MLOAD", + MSTORE: "MSTORE", + MSTORE8: "MSTORE8", + SLOAD: "SLOAD", + SSTORE: "SSTORE", + JUMP: "JUMP", + JUMPI: "JUMPI", + PC: "PC", + MSIZE: "MSIZE", + GAS: "GAS", + JUMPDEST: "JUMPDEST", + PUSH0: "PUSH0", + + // 0x60 range - push. + PUSH1: "PUSH1", + PUSH2: "PUSH2", + PUSH3: "PUSH3", + PUSH4: "PUSH4", + PUSH5: "PUSH5", + PUSH6: "PUSH6", + PUSH7: "PUSH7", + PUSH8: "PUSH8", + PUSH9: "PUSH9", + PUSH10: "PUSH10", + PUSH11: "PUSH11", + PUSH12: "PUSH12", + PUSH13: "PUSH13", + PUSH14: "PUSH14", + PUSH15: "PUSH15", + PUSH16: "PUSH16", + PUSH17: "PUSH17", + PUSH18: "PUSH18", + PUSH19: "PUSH19", + PUSH20: "PUSH20", + PUSH21: "PUSH21", + PUSH22: "PUSH22", + PUSH23: "PUSH23", + PUSH24: "PUSH24", + PUSH25: "PUSH25", + PUSH26: "PUSH26", + PUSH27: "PUSH27", + PUSH28: "PUSH28", + PUSH29: "PUSH29", + PUSH30: "PUSH30", + PUSH31: "PUSH31", + PUSH32: "PUSH32", + + DUP1: "DUP1", + DUP2: "DUP2", + DUP3: "DUP3", + DUP4: "DUP4", + DUP5: "DUP5", + DUP6: "DUP6", + DUP7: "DUP7", + DUP8: "DUP8", + DUP9: "DUP9", + DUP10: "DUP10", + DUP11: "DUP11", + DUP12: "DUP12", + DUP13: "DUP13", + DUP14: "DUP14", + DUP15: "DUP15", + DUP16: "DUP16", + + SWAP1: "SWAP1", + SWAP2: "SWAP2", + SWAP3: "SWAP3", + SWAP4: "SWAP4", + SWAP5: "SWAP5", + SWAP6: "SWAP6", + SWAP7: "SWAP7", + SWAP8: "SWAP8", + SWAP9: "SWAP9", + SWAP10: "SWAP10", + SWAP11: "SWAP11", + SWAP12: "SWAP12", + SWAP13: "SWAP13", + SWAP14: "SWAP14", + SWAP15: "SWAP15", + SWAP16: "SWAP16", + LOG0: "LOG0", + LOG1: "LOG1", + LOG2: "LOG2", + LOG3: "LOG3", + LOG4: "LOG4", + + // 0xdc range. + PREPAY: "PREPAY", + + // 0xf0 range. + CREATE: "CREATE", + CALL: "CALL", + RETURN: "RETURN", + CALLCODE: "CALLCODE", + DELEGATECALL: "DELEGATECALL", + CREATE2: "CREATE2", + STATICCALL: "STATICCALL", + REVERT: "REVERT", + INVALID: "INVALID", + SELFDESTRUCT: "SELFDESTRUCT", +} + +func (op OpCode) String() string { + str := opCodeToString[op] + if len(str) == 0 { + return fmt.Sprintf("opcode %#x not defined", int(op)) + } + + return str +} + +var stringToOp = map[string]OpCode{ + "STOP": STOP, + "ADD": ADD, + "MUL": MUL, + "SUB": SUB, + "DIV": DIV, + "SDIV": SDIV, + "MOD": MOD, + "SMOD": SMOD, + "EXP": EXP, + "NOT": NOT, + "LT": LT, + "GT": GT, + "SLT": SLT, + "SGT": SGT, + "EQ": EQ, + "ISZERO": ISZERO, + "SIGNEXTEND": SIGNEXTEND, + "AND": AND, + "OR": OR, + "XOR": XOR, + "BYTE": BYTE, + "SHL": SHL, + "SHR": SHR, + "SAR": SAR, + "ADDMOD": ADDMOD, + "MULMOD": MULMOD, + "KECCAK256": KECCAK256, + "ADDRESS": ADDRESS, + "BALANCE": BALANCE, + "ORIGIN": ORIGIN, + "CALLER": CALLER, + "CALLVALUE": CALLVALUE, + "CALLDATALOAD": CALLDATALOAD, + "CALLDATASIZE": CALLDATASIZE, + "CALLDATACOPY": CALLDATACOPY, + "CHAINID": CHAINID, + "BASEFEE": BASEFEE, + "DELEGATECALL": DELEGATECALL, + "STATICCALL": STATICCALL, + "CODESIZE": CODESIZE, + "CODECOPY": CODECOPY, + "GASPRICE": GASPRICE, + "EXTCODESIZE": EXTCODESIZE, + "EXTCODECOPY": EXTCODECOPY, + "RETURNDATASIZE": RETURNDATASIZE, + "RETURNDATACOPY": RETURNDATACOPY, + "EXTCODEHASH": EXTCODEHASH, + "BLOCKHASH": BLOCKHASH, + "COINBASE": COINBASE, + "TIMESTAMP": TIMESTAMP, + "NUMBER": NUMBER, + "DIFFICULTY": DIFFICULTY, + "GASLIMIT": GASLIMIT, + "SELFBALANCE": SELFBALANCE, + "POP": POP, + "MLOAD": MLOAD, + "MSTORE": MSTORE, + "MSTORE8": MSTORE8, + "SLOAD": SLOAD, + "SSTORE": SSTORE, + "JUMP": JUMP, + "JUMPI": JUMPI, + "PC": PC, + "MSIZE": MSIZE, + "GAS": GAS, + "JUMPDEST": JUMPDEST, + "PUSH0": PUSH0, + "PUSH1": PUSH1, + "PUSH2": PUSH2, + "PUSH3": PUSH3, + "PUSH4": PUSH4, + "PUSH5": PUSH5, + "PUSH6": PUSH6, + "PUSH7": PUSH7, + "PUSH8": PUSH8, + "PUSH9": PUSH9, + "PUSH10": PUSH10, + "PUSH11": PUSH11, + "PUSH12": PUSH12, + "PUSH13": PUSH13, + "PUSH14": PUSH14, + "PUSH15": PUSH15, + "PUSH16": PUSH16, + "PUSH17": PUSH17, + "PUSH18": PUSH18, + "PUSH19": PUSH19, + "PUSH20": PUSH20, + "PUSH21": PUSH21, + "PUSH22": PUSH22, + "PUSH23": PUSH23, + "PUSH24": PUSH24, + "PUSH25": PUSH25, + "PUSH26": PUSH26, + "PUSH27": PUSH27, + "PUSH28": PUSH28, + "PUSH29": PUSH29, + "PUSH30": PUSH30, + "PUSH31": PUSH31, + "PUSH32": PUSH32, + "DUP1": DUP1, + "DUP2": DUP2, + "DUP3": DUP3, + "DUP4": DUP4, + "DUP5": DUP5, + "DUP6": DUP6, + "DUP7": DUP7, + "DUP8": DUP8, + "DUP9": DUP9, + "DUP10": DUP10, + "DUP11": DUP11, + "DUP12": DUP12, + "DUP13": DUP13, + "DUP14": DUP14, + "DUP15": DUP15, + "DUP16": DUP16, + "SWAP1": SWAP1, + "SWAP2": SWAP2, + "SWAP3": SWAP3, + "SWAP4": SWAP4, + "SWAP5": SWAP5, + "SWAP6": SWAP6, + "SWAP7": SWAP7, + "SWAP8": SWAP8, + "SWAP9": SWAP9, + "SWAP10": SWAP10, + "SWAP11": SWAP11, + "SWAP12": SWAP12, + "SWAP13": SWAP13, + "SWAP14": SWAP14, + "SWAP15": SWAP15, + "SWAP16": SWAP16, + "LOG0": LOG0, + "LOG1": LOG1, + "LOG2": LOG2, + "LOG3": LOG3, + "LOG4": LOG4, + "CREATE": CREATE, + "CREATE2": CREATE2, + "CALL": CALL, + "RETURN": RETURN, + "CALLCODE": CALLCODE, + "REVERT": REVERT, + "INVALID": INVALID, + "SELFDESTRUCT": SELFDESTRUCT, + + // new + "PREPAY": PREPAY, +} + +// StringToOp finds the opcode whose name is stored in `str`. +func StringToOp(str string) OpCode { + return stringToOp[str] +} diff --git a/x/evm/vm/operations_acl.go b/x/evm/vm/operations_acl.go new file mode 100644 index 00000000..551e1f5f --- /dev/null +++ b/x/evm/vm/operations_acl.go @@ -0,0 +1,244 @@ +// Copyright 2020 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package vm + +import ( + "errors" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/common/math" + "github.com/ethereum/go-ethereum/params" +) + +func makeGasSStoreFunc(clearingRefund uint64) gasFunc { + return func(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { + // If we fail the minimum gas availability invariant, fail (0) + if contract.Gas <= params.SstoreSentryGasEIP2200 { + return 0, errors.New("not enough gas for reentrancy sentry") + } + // Gas sentry honoured, do the actual gas calculation based on the stored value + var ( + y, x = stack.Back(1), stack.peek() + slot = common.Hash(x.Bytes32()) + current = evm.StateDB.GetState(contract.Address(), slot) + cost = uint64(0) + ) + // Check slot presence in the access list + if addrPresent, slotPresent := evm.StateDB.SlotInAccessList(contract.Address(), slot); !slotPresent { + cost = params.ColdSloadCostEIP2929 + // If the caller cannot afford the cost, this change will be rolled back + evm.StateDB.AddSlotToAccessList(contract.Address(), slot) + if !addrPresent { + // Once we're done with YOLOv2 and schedule this for mainnet, might + // be good to remove this panic here, which is just really a + // canary to have during testing + panic("impossible case: address was not present in access list during sstore op") + } + } + value := common.Hash(y.Bytes32()) + + if current == value { // noop (1) + // EIP 2200 original clause: + // return params.SloadGasEIP2200, nil + return cost + params.WarmStorageReadCostEIP2929, nil // SLOAD_GAS + } + original := evm.StateDB.GetCommittedState(contract.Address(), x.Bytes32()) + if original == current { + if original == (common.Hash{}) { // create slot (2.1.1) + return cost + params.SstoreSetGasEIP2200, nil + } + if value == (common.Hash{}) { // delete slot (2.1.2b) + evm.StateDB.AddRefund(clearingRefund) + } + // EIP-2200 original clause: + // return params.SstoreResetGasEIP2200, nil // write existing slot (2.1.2) + return cost + (params.SstoreResetGasEIP2200 - params.ColdSloadCostEIP2929), nil // write existing slot (2.1.2) + } + if original != (common.Hash{}) { + if current == (common.Hash{}) { // recreate slot (2.2.1.1) + evm.StateDB.SubRefund(clearingRefund) + } else if value == (common.Hash{}) { // delete slot (2.2.1.2) + evm.StateDB.AddRefund(clearingRefund) + } + } + if original == value { + if original == (common.Hash{}) { // reset to original inexistent slot (2.2.2.1) + // EIP 2200 Original clause: + //evm.StateDB.AddRefund(params.SstoreSetGasEIP2200 - params.SloadGasEIP2200) + evm.StateDB.AddRefund(params.SstoreSetGasEIP2200 - params.WarmStorageReadCostEIP2929) + } else { // reset to original existing slot (2.2.2.2) + // EIP 2200 Original clause: + // evm.StateDB.AddRefund(params.SstoreResetGasEIP2200 - params.SloadGasEIP2200) + // - SSTORE_RESET_GAS redefined as (5000 - COLD_SLOAD_COST) + // - SLOAD_GAS redefined as WARM_STORAGE_READ_COST + // Final: (5000 - COLD_SLOAD_COST) - WARM_STORAGE_READ_COST + evm.StateDB.AddRefund((params.SstoreResetGasEIP2200 - params.ColdSloadCostEIP2929) - params.WarmStorageReadCostEIP2929) + } + } + // EIP-2200 original clause: + //return params.SloadGasEIP2200, nil // dirty update (2.2) + return cost + params.WarmStorageReadCostEIP2929, nil // dirty update (2.2) + } +} + +// gasSLoadEIP2929 calculates dynamic gas for SLOAD according to EIP-2929 +// For SLOAD, if the (address, storage_key) pair (where address is the address of the contract +// whose storage is being read) is not yet in accessed_storage_keys, +// charge 2100 gas and add the pair to accessed_storage_keys. +// If the pair is already in accessed_storage_keys, charge 100 gas. +func gasSLoadEIP2929(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { + loc := stack.peek() + slot := common.Hash(loc.Bytes32()) + // Check slot presence in the access list + if _, slotPresent := evm.StateDB.SlotInAccessList(contract.Address(), slot); !slotPresent { + // If the caller cannot afford the cost, this change will be rolled back + // If he does afford it, we can skip checking the same thing later on, during execution + evm.StateDB.AddSlotToAccessList(contract.Address(), slot) + return params.ColdSloadCostEIP2929, nil + } + return params.WarmStorageReadCostEIP2929, nil +} + +// gasExtCodeCopyEIP2929 implements extcodecopy according to EIP-2929 +// EIP spec: +// > If the target is not in accessed_addresses, +// > charge COLD_ACCOUNT_ACCESS_COST gas, and add the address to accessed_addresses. +// > Otherwise, charge WARM_STORAGE_READ_COST gas. +func gasExtCodeCopyEIP2929(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { + // memory expansion first (dynamic part of pre-2929 implementation) + gas, err := gasExtCodeCopy(evm, contract, stack, mem, memorySize) + if err != nil { + return 0, err + } + addr := common.Address(stack.peek().Bytes20()) + // Check slot presence in the access list + if !evm.StateDB.AddressInAccessList(addr) { + evm.StateDB.AddAddressToAccessList(addr) + var overflow bool + // We charge (cold-warm), since 'warm' is already charged as constantGas + if gas, overflow = math.SafeAdd(gas, params.ColdAccountAccessCostEIP2929-params.WarmStorageReadCostEIP2929); overflow { + return 0, ErrGasUintOverflow + } + return gas, nil + } + return gas, nil +} + +// gasEip2929AccountCheck checks whether the first stack item (as address) is present in the access list. +// If it is, this method returns '0', otherwise 'cold-warm' gas, presuming that the opcode using it +// is also using 'warm' as constant factor. +// This method is used by: +// - extcodehash, +// - extcodesize, +// - (ext) balance +func gasEip2929AccountCheck(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { + addr := common.Address(stack.peek().Bytes20()) + // Check slot presence in the access list + if !evm.StateDB.AddressInAccessList(addr) { + // If the caller cannot afford the cost, this change will be rolled back + evm.StateDB.AddAddressToAccessList(addr) + // The warm storage read cost is already charged as constantGas + return params.ColdAccountAccessCostEIP2929 - params.WarmStorageReadCostEIP2929, nil + } + return 0, nil +} + +func makeCallVariantGasCallEIP2929(oldCalculator gasFunc) gasFunc { + return func(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { + addr := common.Address(stack.Back(1).Bytes20()) + // Check slot presence in the access list + warmAccess := evm.StateDB.AddressInAccessList(addr) + // The WarmStorageReadCostEIP2929 (100) is already deducted in the form of a constant cost, so + // the cost to charge for cold access, if any, is Cold - Warm + coldCost := params.ColdAccountAccessCostEIP2929 - params.WarmStorageReadCostEIP2929 + if !warmAccess { + evm.StateDB.AddAddressToAccessList(addr) + // Charge the remaining difference here already, to correctly calculate available + // gas for call + if !contract.UseGas(coldCost) { + return 0, ErrOutOfGas + } + } + // Now call the old calculator, which takes into account + // - create new account + // - transfer value + // - memory expansion + // - 63/64ths rule + gas, err := oldCalculator(evm, contract, stack, mem, memorySize) + if warmAccess || err != nil { + return gas, err + } + // In case of a cold access, we temporarily add the cold charge back, and also + // add it to the returned gas. By adding it to the return, it will be charged + // outside of this function, as part of the dynamic gas, and that will make it + // also become correctly reported to tracers. + contract.Gas += coldCost + return gas + coldCost, nil + } +} + +var ( + gasCallEIP2929 = makeCallVariantGasCallEIP2929(gasCall) + gasDelegateCallEIP2929 = makeCallVariantGasCallEIP2929(gasDelegateCall) + gasStaticCallEIP2929 = makeCallVariantGasCallEIP2929(gasStaticCall) + gasCallCodeEIP2929 = makeCallVariantGasCallEIP2929(gasCallCode) + gasSelfdestructEIP2929 = makeSelfdestructGasFn(true) + // gasSelfdestructEIP3529 implements the changes in EIP-2539 (no refunds) + gasSelfdestructEIP3529 = makeSelfdestructGasFn(false) + + // gasSStoreEIP2929 implements gas cost for SSTORE according to EIP-2929 + // + // When calling SSTORE, check if the (address, storage_key) pair is in accessed_storage_keys. + // If it is not, charge an additional COLD_SLOAD_COST gas, and add the pair to accessed_storage_keys. + // Additionally, modify the parameters defined in EIP 2200 as follows: + // + // Parameter Old value New value + // SLOAD_GAS 800 = WARM_STORAGE_READ_COST + // SSTORE_RESET_GAS 5000 5000 - COLD_SLOAD_COST + // + //The other parameters defined in EIP 2200 are unchanged. + // see gasSStoreEIP2200(...) in core/vm/gas_table.go for more info about how EIP 2200 is specified + gasSStoreEIP2929 = makeGasSStoreFunc(params.SstoreClearsScheduleRefundEIP2200) + + // gasSStoreEIP2539 implements gas cost for SSTORE according to EIP-2539 + // Replace `SSTORE_CLEARS_SCHEDULE` with `SSTORE_RESET_GAS + ACCESS_LIST_STORAGE_KEY_COST` (4,800) + gasSStoreEIP3529 = makeGasSStoreFunc(params.SstoreClearsScheduleRefundEIP3529) +) + +// makeSelfdestructGasFn can create the selfdestruct dynamic gas function for EIP-2929 and EIP-2539 +func makeSelfdestructGasFn(refundsEnabled bool) gasFunc { + gasFunc := func(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { + var ( + gas uint64 + address = common.Address(stack.peek().Bytes20()) + ) + if !evm.StateDB.AddressInAccessList(address) { + // If the caller cannot afford the cost, this change will be rolled back + evm.StateDB.AddAddressToAccessList(address) + gas = params.ColdAccountAccessCostEIP2929 + } + // if empty and transfers value + if evm.StateDB.Empty(address) && evm.StateDB.GetBalance(contract.Address()).Sign() != 0 { + gas += params.CreateBySelfdestructGas + } + if refundsEnabled && !evm.StateDB.HasSuicided(contract.Address()) { + evm.StateDB.AddRefund(params.SelfdestructRefundGas) + } + return gas, nil + } + return gasFunc +} diff --git a/x/evm/vm/stack.go b/x/evm/vm/stack.go new file mode 100644 index 00000000..e1a957e2 --- /dev/null +++ b/x/evm/vm/stack.go @@ -0,0 +1,82 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package vm + +import ( + "sync" + + "github.com/holiman/uint256" +) + +var stackPool = sync.Pool{ + New: func() interface{} { + return &Stack{data: make([]uint256.Int, 0, 16)} + }, +} + +// Stack is an object for basic stack operations. Items popped to the stack are +// expected to be changed and modified. stack does not take care of adding newly +// initialised objects. +type Stack struct { + data []uint256.Int +} + +func newstack() *Stack { + return stackPool.Get().(*Stack) +} + +func returnStack(s *Stack) { + s.data = s.data[:0] + stackPool.Put(s) +} + +// Data returns the underlying uint256.Int array. +func (st *Stack) Data() []uint256.Int { + return st.data +} + +func (st *Stack) push(d *uint256.Int) { + // NOTE push limit (1024) is checked in baseCheck + st.data = append(st.data, *d) +} + +func (st *Stack) pop() (ret uint256.Int) { + ret = st.data[len(st.data)-1] + st.data = st.data[:len(st.data)-1] + return +} + +func (st *Stack) len() int { + return len(st.data) +} + +func (st *Stack) swap(n int) { + st.data[st.len()-n], st.data[st.len()-1] = st.data[st.len()-1], st.data[st.len()-n] +} + +func (st *Stack) dup(n int) { + st.push(&st.data[st.len()-n]) +} + +func (st *Stack) peek() *uint256.Int { + return &st.data[st.len()-1] +} + +// Back returns the n'th item in stack +func (st *Stack) Back(n int) *uint256.Int { + return &st.data[st.len()-n-1] +} diff --git a/x/evm/vm/stack_table.go b/x/evm/vm/stack_table.go new file mode 100644 index 00000000..10c12901 --- /dev/null +++ b/x/evm/vm/stack_table.go @@ -0,0 +1,42 @@ +// Copyright 2017 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package vm + +import ( + "github.com/ethereum/go-ethereum/params" +) + +func minSwapStack(n int) int { + return minStack(n, n) +} +func maxSwapStack(n int) int { + return maxStack(n, n) +} + +func minDupStack(n int) int { + return minStack(n, n+1) +} +func maxDupStack(n int) int { + return maxStack(n, n+1) +} + +func maxStack(pop, push int) int { + return int(params.StackLimit) + pop - push +} +func minStack(pops, push int) int { + return pops +} diff --git a/x/evm/vm/verifier.go b/x/evm/vm/verifier.go new file mode 100644 index 00000000..5d92ce32 --- /dev/null +++ b/x/evm/vm/verifier.go @@ -0,0 +1,39 @@ +package vm + +type VerifiedContract interface { + GetHeight() uint64 + GetAddress() string + GetBin() string + GetInit() string +} + +type GenesisContractVerifier struct { + applyState map[uint64][]VerifiedContract + verifiedAddresses map[string]bool +} + +func NewGenesisContractVerifier() *GenesisContractVerifier { + return &GenesisContractVerifier{ + applyState: make(map[uint64][]VerifiedContract), + verifiedAddresses: map[string]bool{}, + } +} + +func (gcv *GenesisContractVerifier) GetContracts(height uint64) []VerifiedContract { + return gcv.applyState[height] +} + +func (gcv *GenesisContractVerifier) AddContract(contract VerifiedContract, trusted bool) { + gcv.applyState[contract.GetHeight()] = append(gcv.applyState[contract.GetHeight()], contract) + if trusted { + gcv.AddTrustedAddress(contract.GetAddress()) + } +} + +func (gcv *GenesisContractVerifier) AddTrustedAddress(addr string) { + gcv.verifiedAddresses[addr] = true +} + +func (gcv *GenesisContractVerifier) IsTrustedAddress(addr string) bool { + return gcv.verifiedAddresses[addr] +} diff --git a/x/register/keeper/store_new.go b/x/register/keeper/store_new.go new file mode 100644 index 00000000..9396e550 --- /dev/null +++ b/x/register/keeper/store_new.go @@ -0,0 +1,35 @@ +package keeper + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/stratosnet/stratos-chain/core/statedb" + stratos "github.com/stratosnet/stratos-chain/types" + "github.com/stratosnet/stratos-chain/x/register/types" +) + +func (k *Keeper) KeeGetEffectiveTotalStake(kstatedb *statedb.KeestateDB) (stake sdk.Int) { + bz := kstatedb.GetState(k.storeKey, types.EffectiveGenesisStakeTotalKey) + if bz == nil { + return sdk.ZeroInt() + } + intValue := stratos.Int{} + k.cdc.MustUnmarshalLengthPrefixed(bz, &intValue) + stake = *intValue.Value + return +} + +func (k *Keeper) KeeGetRemainingOzoneLimit(kstatedb *statedb.KeestateDB) (value sdk.Int) { + bz := kstatedb.GetState(k.storeKey, types.UpperBoundOfTotalOzoneKey) + if bz == nil { + return sdk.ZeroInt() + } + intVal := stratos.Int{} + k.cdc.MustUnmarshalLengthPrefixed(bz, &intVal) + value = *intVal.Value + return +} + +func (k *Keeper) KeeSetRemainingOzoneLimit(kstatedb *statedb.KeestateDB, value sdk.Int) { + bz := k.cdc.MustMarshalLengthPrefixed(&stratos.Int{Value: &value}) + kstatedb.SetState(k.storeKey, types.UpperBoundOfTotalOzoneKey, bz) +} diff --git a/x/sds/keeper/keeper.go b/x/sds/keeper/keeper.go index 43d34e24..7615ade0 100644 --- a/x/sds/keeper/keeper.go +++ b/x/sds/keeper/keeper.go @@ -14,12 +14,15 @@ import ( paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" stratos "github.com/stratosnet/stratos-chain/types" + evmtypes "github.com/stratosnet/stratos-chain/x/evm/types" potKeeper "github.com/stratosnet/stratos-chain/x/pot/keeper" registerKeeper "github.com/stratosnet/stratos-chain/x/register/keeper" registertypes "github.com/stratosnet/stratos-chain/x/register/types" "github.com/stratosnet/stratos-chain/x/sds/types" ) +var _ evmtypes.SdsKeeper = &Keeper{} + // Keeper encodes/decodes files using the go-amino (binary) // encoding/decoding library. type Keeper struct { diff --git a/yarn.lock b/yarn.lock new file mode 100644 index 00000000..698a002d --- /dev/null +++ b/yarn.lock @@ -0,0 +1,7594 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@babel/runtime@^7.4.4": + version "7.21.5" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.21.5.tgz#8492dddda9644ae3bda3b45eabe87382caee7200" + integrity sha512-8jI69toZqqcsnqGGqwGS4Qb1VwLOEp4hz+CXPywcvjs60u3B4Pom/U/7rm4W8tMOYEB+E9wgD0mW1l3r8qlI9Q== + dependencies: + regenerator-runtime "^0.13.11" + +"@chainsafe/as-sha256@^0.3.1": + version "0.3.1" + resolved "https://registry.yarnpkg.com/@chainsafe/as-sha256/-/as-sha256-0.3.1.tgz#3639df0e1435cab03f4d9870cc3ac079e57a6fc9" + integrity sha512-hldFFYuf49ed7DAakWVXSJODuq3pzJEguD8tQ7h+sGkM18vja+OFoJI9krnGmgzyuZC2ETX0NOIcCTy31v2Mtg== + +"@chainsafe/persistent-merkle-tree@^0.4.2": + version "0.4.2" + resolved "https://registry.yarnpkg.com/@chainsafe/persistent-merkle-tree/-/persistent-merkle-tree-0.4.2.tgz#4c9ee80cc57cd3be7208d98c40014ad38f36f7ff" + integrity sha512-lLO3ihKPngXLTus/L7WHKaw9PnNJWizlOF1H9NNzHP6Xvh82vzg9F2bzkXhYIFshMZ2gTCEz8tq6STe7r5NDfQ== + dependencies: + "@chainsafe/as-sha256" "^0.3.1" + +"@chainsafe/persistent-merkle-tree@^0.5.0": + version "0.5.0" + resolved "https://registry.yarnpkg.com/@chainsafe/persistent-merkle-tree/-/persistent-merkle-tree-0.5.0.tgz#2b4a62c9489a5739dedd197250d8d2f5427e9f63" + integrity sha512-l0V1b5clxA3iwQLXP40zYjyZYospQLZXzBVIhhr9kDg/1qHZfzzHw0jj4VPBijfYCArZDlPkRi1wZaV2POKeuw== + dependencies: + "@chainsafe/as-sha256" "^0.3.1" + +"@chainsafe/ssz@^0.10.0": + version "0.10.2" + resolved "https://registry.yarnpkg.com/@chainsafe/ssz/-/ssz-0.10.2.tgz#c782929e1bb25fec66ba72e75934b31fd087579e" + integrity sha512-/NL3Lh8K+0q7A3LsiFq09YXS9fPE+ead2rr7vM2QK8PLzrNsw3uqrif9bpRX5UxgeRjM+vYi+boCM3+GM4ovXg== + dependencies: + "@chainsafe/as-sha256" "^0.3.1" + "@chainsafe/persistent-merkle-tree" "^0.5.0" + +"@chainsafe/ssz@^0.9.2": + version "0.9.4" + resolved "https://registry.yarnpkg.com/@chainsafe/ssz/-/ssz-0.9.4.tgz#696a8db46d6975b600f8309ad3a12f7c0e310497" + integrity sha512-77Qtg2N1ayqs4Bg/wvnWfg5Bta7iy7IRh8XqXh7oNMeP2HBbBwx8m6yTpA8p0EHItWPEBkgZd5S5/LSlp3GXuQ== + dependencies: + "@chainsafe/as-sha256" "^0.3.1" + "@chainsafe/persistent-merkle-tree" "^0.4.2" + case "^1.6.3" + +"@cspotcode/source-map-support@^0.8.0": + version "0.8.1" + resolved "https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz#00629c35a688e05a88b1cda684fb9d5e73f000a1" + integrity sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw== + dependencies: + "@jridgewell/trace-mapping" "0.3.9" + +"@ensdomains/address-encoder@^0.1.7": + version "0.1.9" + resolved "https://registry.yarnpkg.com/@ensdomains/address-encoder/-/address-encoder-0.1.9.tgz#f948c485443d9ef7ed2c0c4790e931c33334d02d" + integrity sha512-E2d2gP4uxJQnDu2Kfg1tHNspefzbLT8Tyjrm5sEuim32UkU2sm5xL4VXtgc2X33fmPEw9+jUMpGs4veMbf+PYg== + dependencies: + bech32 "^1.1.3" + blakejs "^1.1.0" + bn.js "^4.11.8" + bs58 "^4.0.1" + crypto-addr-codec "^0.1.7" + nano-base32 "^1.0.1" + ripemd160 "^2.0.2" + +"@ensdomains/ens@0.4.5": + version "0.4.5" + resolved "https://registry.yarnpkg.com/@ensdomains/ens/-/ens-0.4.5.tgz#e0aebc005afdc066447c6e22feb4eda89a5edbfc" + integrity sha512-JSvpj1iNMFjK6K+uVl4unqMoa9rf5jopb8cya5UGBWz23Nw8hSNT7efgUx4BTlAPAgpNlEioUfeTyQ6J9ZvTVw== + dependencies: + bluebird "^3.5.2" + eth-ens-namehash "^2.0.8" + solc "^0.4.20" + testrpc "0.0.1" + web3-utils "^1.0.0-beta.31" + +"@ensdomains/ensjs@^2.1.0": + version "2.1.0" + resolved "https://registry.yarnpkg.com/@ensdomains/ensjs/-/ensjs-2.1.0.tgz#0a7296c1f3d735ef019320d863a7846a0760c460" + integrity sha512-GRbGPT8Z/OJMDuxs75U/jUNEC0tbL0aj7/L/QQznGYKm/tiasp+ndLOaoULy9kKJFC0TBByqfFliEHDgoLhyog== + dependencies: + "@babel/runtime" "^7.4.4" + "@ensdomains/address-encoder" "^0.1.7" + "@ensdomains/ens" "0.4.5" + "@ensdomains/resolver" "0.2.4" + content-hash "^2.5.2" + eth-ens-namehash "^2.0.8" + ethers "^5.0.13" + js-sha3 "^0.8.0" + +"@ensdomains/resolver@0.2.4": + version "0.2.4" + resolved "https://registry.yarnpkg.com/@ensdomains/resolver/-/resolver-0.2.4.tgz#c10fe28bf5efbf49bff4666d909aed0265efbc89" + integrity sha512-bvaTH34PMCbv6anRa9I/0zjLJgY4EuznbEMgbV77JBCQ9KNC46rzi0avuxpOfu+xDjPEtSFGqVEOr5GlUSGudA== + +"@ethereumjs/common@2.5.0": + version "2.5.0" + resolved "https://registry.yarnpkg.com/@ethereumjs/common/-/common-2.5.0.tgz#ec61551b31bef7a69d1dc634d8932468866a4268" + integrity sha512-DEHjW6e38o+JmB/NO3GZBpW4lpaiBpkFgXF6jLcJ6gETBYpEyaA5nTimsWBUJR3Vmtm/didUEbNjajskugZORg== + dependencies: + crc-32 "^1.2.0" + ethereumjs-util "^7.1.1" + +"@ethereumjs/common@^2.5.0": + version "2.6.5" + resolved "https://registry.yarnpkg.com/@ethereumjs/common/-/common-2.6.5.tgz#0a75a22a046272579d91919cb12d84f2756e8d30" + integrity sha512-lRyVQOeCDaIVtgfbowla32pzeDv2Obr8oR8Put5RdUBNRGr1VGPGQNGP6elWIpgK3YdpzqTOh4GyUGOureVeeA== + dependencies: + crc-32 "^1.2.0" + ethereumjs-util "^7.1.5" + +"@ethereumjs/tx@3.3.2": + version "3.3.2" + resolved "https://registry.yarnpkg.com/@ethereumjs/tx/-/tx-3.3.2.tgz#348d4624bf248aaab6c44fec2ae67265efe3db00" + integrity sha512-6AaJhwg4ucmwTvw/1qLaZUX5miWrwZ4nLOUsKyb/HtzS3BMw/CasKhdi1ims9mBKeK9sOJCH4qGKOBGyJCeeog== + dependencies: + "@ethereumjs/common" "^2.5.0" + ethereumjs-util "^7.1.2" + +"@ethersproject/abi@5.7.0", "@ethersproject/abi@^5.0.0-beta.146", "@ethersproject/abi@^5.0.9", "@ethersproject/abi@^5.1.2", "@ethersproject/abi@^5.4.7", "@ethersproject/abi@^5.6.3", "@ethersproject/abi@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/abi/-/abi-5.7.0.tgz#b3f3e045bbbeed1af3947335c247ad625a44e449" + integrity sha512-351ktp42TiRcYB3H1OP8yajPeAQstMW/yCFokj/AthP9bLHzQFPlOrxOcwYEDkUAICmOHljvN4K39OMTMUa9RA== + dependencies: + "@ethersproject/address" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/hash" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + +"@ethersproject/abstract-provider@5.7.0", "@ethersproject/abstract-provider@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/abstract-provider/-/abstract-provider-5.7.0.tgz#b0a8550f88b6bf9d51f90e4795d48294630cb9ef" + integrity sha512-R41c9UkchKCpAqStMYUpdunjo3pkEvZC3FAwZn5S5MGbXoMQOHIdHItezTETxAO5bevtMApSyEhn9+CHcDsWBw== + dependencies: + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/networks" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/transactions" "^5.7.0" + "@ethersproject/web" "^5.7.0" + +"@ethersproject/abstract-signer@5.7.0", "@ethersproject/abstract-signer@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/abstract-signer/-/abstract-signer-5.7.0.tgz#13f4f32117868452191a4649723cb086d2b596b2" + integrity sha512-a16V8bq1/Cz+TGCkE2OPMTOUDLS3grCpdjoJCYNnVBbdYEMSgKrU0+B90s8b6H+ByYTBZN7a3g76jdIJi7UfKQ== + dependencies: + "@ethersproject/abstract-provider" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + +"@ethersproject/address@5.7.0", "@ethersproject/address@^5.0.2", "@ethersproject/address@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/address/-/address-5.7.0.tgz#19b56c4d74a3b0a46bfdbb6cfcc0a153fc697f37" + integrity sha512-9wYhYt7aghVGo758POM5nqcOMaE168Q6aRLJZwUmiqSrAungkG74gSSeKEIR7ukixesdRZGPgVqme6vmxs1fkA== + dependencies: + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/rlp" "^5.7.0" + +"@ethersproject/base64@5.7.0", "@ethersproject/base64@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/base64/-/base64-5.7.0.tgz#ac4ee92aa36c1628173e221d0d01f53692059e1c" + integrity sha512-Dr8tcHt2mEbsZr/mwTPIQAf3Ai0Bks/7gTw9dSqk1mQvhW3XvRlmDJr/4n+wg1JmCl16NZue17CDh8xb/vZ0sQ== + dependencies: + "@ethersproject/bytes" "^5.7.0" + +"@ethersproject/basex@5.7.0", "@ethersproject/basex@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/basex/-/basex-5.7.0.tgz#97034dc7e8938a8ca943ab20f8a5e492ece4020b" + integrity sha512-ywlh43GwZLv2Voc2gQVTKBoVQ1mti3d8HK5aMxsfu/nRDnMmNqaSJ3r3n85HBByT8OpoY96SXM1FogC533T4zw== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + +"@ethersproject/bignumber@5.7.0", "@ethersproject/bignumber@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/bignumber/-/bignumber-5.7.0.tgz#e2f03837f268ba655ffba03a57853e18a18dc9c2" + integrity sha512-n1CAdIHRWjSucQO3MC1zPSVgV/6dy/fjL9pMrPP9peL+QxEg9wOsVqwD4+818B6LUEtaXzVHQiuivzRoxPxUGw== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + bn.js "^5.2.1" + +"@ethersproject/bytes@5.7.0", "@ethersproject/bytes@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/bytes/-/bytes-5.7.0.tgz#a00f6ea8d7e7534d6d87f47188af1148d71f155d" + integrity sha512-nsbxwgFXWh9NyYWo+U8atvmMsSdKJprTcICAkvbBffT75qDocbuggBU0SJiVK2MuTrp0q+xvLkTnGMPK1+uA9A== + dependencies: + "@ethersproject/logger" "^5.7.0" + +"@ethersproject/constants@5.7.0", "@ethersproject/constants@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/constants/-/constants-5.7.0.tgz#df80a9705a7e08984161f09014ea012d1c75295e" + integrity sha512-DHI+y5dBNvkpYUMiRQyxRBYBefZkJfo70VUkUAsRjcPs47muV9evftfZ0PJVCXYbAiCgght0DtcF9srFQmIgWA== + dependencies: + "@ethersproject/bignumber" "^5.7.0" + +"@ethersproject/contracts@5.7.0", "@ethersproject/contracts@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/contracts/-/contracts-5.7.0.tgz#c305e775abd07e48aa590e1a877ed5c316f8bd1e" + integrity sha512-5GJbzEU3X+d33CdfPhcyS+z8MzsTrBGk/sc+G+59+tPa9yFkl6HQ9D6L0QMgNTA9q8dT0XKxxkyp883XsQvbbg== + dependencies: + "@ethersproject/abi" "^5.7.0" + "@ethersproject/abstract-provider" "^5.7.0" + "@ethersproject/abstract-signer" "^5.7.0" + "@ethersproject/address" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/transactions" "^5.7.0" + +"@ethersproject/hash@5.7.0", "@ethersproject/hash@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/hash/-/hash-5.7.0.tgz#eb7aca84a588508369562e16e514b539ba5240a7" + integrity sha512-qX5WrQfnah1EFnO5zJv1v46a8HW0+E5xuBBDTwMFZLuVTx0tbU2kkx15NqdjxecrLGatQN9FGQKpb1FKdHCt+g== + dependencies: + "@ethersproject/abstract-signer" "^5.7.0" + "@ethersproject/address" "^5.7.0" + "@ethersproject/base64" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + +"@ethersproject/hdnode@5.7.0", "@ethersproject/hdnode@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/hdnode/-/hdnode-5.7.0.tgz#e627ddc6b466bc77aebf1a6b9e47405ca5aef9cf" + integrity sha512-OmyYo9EENBPPf4ERhR7oj6uAtUAhYGqOnIS+jE5pTXvdKBS99ikzq1E7Iv0ZQZ5V36Lqx1qZLeak0Ra16qpeOg== + dependencies: + "@ethersproject/abstract-signer" "^5.7.0" + "@ethersproject/basex" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/pbkdf2" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/sha2" "^5.7.0" + "@ethersproject/signing-key" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + "@ethersproject/transactions" "^5.7.0" + "@ethersproject/wordlists" "^5.7.0" + +"@ethersproject/json-wallets@5.7.0", "@ethersproject/json-wallets@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/json-wallets/-/json-wallets-5.7.0.tgz#5e3355287b548c32b368d91014919ebebddd5360" + integrity sha512-8oee5Xgu6+RKgJTkvEMl2wDgSPSAQ9MB/3JYjFV9jlKvcYHUXZC+cQp0njgmxdHkYWn8s6/IqIZYm0YWCjO/0g== + dependencies: + "@ethersproject/abstract-signer" "^5.7.0" + "@ethersproject/address" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/hdnode" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/pbkdf2" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/random" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + "@ethersproject/transactions" "^5.7.0" + aes-js "3.0.0" + scrypt-js "3.0.1" + +"@ethersproject/keccak256@5.7.0", "@ethersproject/keccak256@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/keccak256/-/keccak256-5.7.0.tgz#3186350c6e1cd6aba7940384ec7d6d9db01f335a" + integrity sha512-2UcPboeL/iW+pSg6vZ6ydF8tCnv3Iu/8tUmLLzWWGzxWKFFqOBQFLo6uLUv6BDrLgCDfN28RJ/wtByx+jZ4KBg== + dependencies: + "@ethersproject/bytes" "^5.7.0" + js-sha3 "0.8.0" + +"@ethersproject/logger@5.7.0", "@ethersproject/logger@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.7.0.tgz#6ce9ae168e74fecf287be17062b590852c311892" + integrity sha512-0odtFdXu/XHtjQXJYA3u9G0G8btm0ND5Cu8M7i5vhEcE8/HmF4Lbdqanwyv4uQTr2tx6b7fQRmgLrsnpQlmnig== + +"@ethersproject/networks@5.7.1", "@ethersproject/networks@^5.7.0": + version "5.7.1" + resolved "https://registry.yarnpkg.com/@ethersproject/networks/-/networks-5.7.1.tgz#118e1a981d757d45ccea6bb58d9fd3d9db14ead6" + integrity sha512-n/MufjFYv3yFcUyfhnXotyDlNdFb7onmkSy8aQERi2PjNcnWQ66xXxa3XlS8nCcA8aJKJjIIMNJTC7tu80GwpQ== + dependencies: + "@ethersproject/logger" "^5.7.0" + +"@ethersproject/pbkdf2@5.7.0", "@ethersproject/pbkdf2@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/pbkdf2/-/pbkdf2-5.7.0.tgz#d2267d0a1f6e123f3771007338c47cccd83d3102" + integrity sha512-oR/dBRZR6GTyaofd86DehG72hY6NpAjhabkhxgr3X2FpJtJuodEl2auADWBZfhDHgVCbu3/H/Ocq2uC6dpNjjw== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/sha2" "^5.7.0" + +"@ethersproject/properties@5.7.0", "@ethersproject/properties@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/properties/-/properties-5.7.0.tgz#a6e12cb0439b878aaf470f1902a176033067ed30" + integrity sha512-J87jy8suntrAkIZtecpxEPxY//szqr1mlBaYlQ0r4RCaiD2hjheqF9s1LVE8vVuJCXisjIP+JgtK/Do54ej4Sw== + dependencies: + "@ethersproject/logger" "^5.7.0" + +"@ethersproject/providers@5.7.2", "@ethersproject/providers@^5.4.7", "@ethersproject/providers@^5.7.1", "@ethersproject/providers@^5.7.2": + version "5.7.2" + resolved "https://registry.yarnpkg.com/@ethersproject/providers/-/providers-5.7.2.tgz#f8b1a4f275d7ce58cf0a2eec222269a08beb18cb" + integrity sha512-g34EWZ1WWAVgr4aptGlVBF8mhl3VWjv+8hoAnzStu8Ah22VHBsuGzP17eb6xDVRzw895G4W7vvx60lFFur/1Rg== + dependencies: + "@ethersproject/abstract-provider" "^5.7.0" + "@ethersproject/abstract-signer" "^5.7.0" + "@ethersproject/address" "^5.7.0" + "@ethersproject/base64" "^5.7.0" + "@ethersproject/basex" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/hash" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/networks" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/random" "^5.7.0" + "@ethersproject/rlp" "^5.7.0" + "@ethersproject/sha2" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + "@ethersproject/transactions" "^5.7.0" + "@ethersproject/web" "^5.7.0" + bech32 "1.1.4" + ws "7.4.6" + +"@ethersproject/random@5.7.0", "@ethersproject/random@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/random/-/random-5.7.0.tgz#af19dcbc2484aae078bb03656ec05df66253280c" + integrity sha512-19WjScqRA8IIeWclFme75VMXSBvi4e6InrUNuaR4s5pTF2qNhcGdCUwdxUVGtDDqC00sDLCO93jPQoDUH4HVmQ== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + +"@ethersproject/rlp@5.7.0", "@ethersproject/rlp@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/rlp/-/rlp-5.7.0.tgz#de39e4d5918b9d74d46de93af80b7685a9c21304" + integrity sha512-rBxzX2vK8mVF7b0Tol44t5Tb8gomOHkj5guL+HhzQ1yBh/ydjGnpw6at+X6Iw0Kp3OzzzkcKp8N9r0W4kYSs9w== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + +"@ethersproject/sha2@5.7.0", "@ethersproject/sha2@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/sha2/-/sha2-5.7.0.tgz#9a5f7a7824ef784f7f7680984e593a800480c9fb" + integrity sha512-gKlH42riwb3KYp0reLsFTokByAKoJdgFCwI+CCiX/k+Jm2mbNs6oOaCjYQSlI1+XBVejwH2KrmCbMAT/GnRDQw== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + hash.js "1.1.7" + +"@ethersproject/signing-key@5.7.0", "@ethersproject/signing-key@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/signing-key/-/signing-key-5.7.0.tgz#06b2df39411b00bc57c7c09b01d1e41cf1b16ab3" + integrity sha512-MZdy2nL3wO0u7gkB4nA/pEf8lu1TlFswPNmy8AiYkfKTdO6eXBJyUdmHO/ehm/htHw9K/qF8ujnTyUAD+Ry54Q== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + bn.js "^5.2.1" + elliptic "6.5.4" + hash.js "1.1.7" + +"@ethersproject/solidity@5.7.0", "@ethersproject/solidity@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/solidity/-/solidity-5.7.0.tgz#5e9c911d8a2acce2a5ebb48a5e2e0af20b631cb8" + integrity sha512-HmabMd2Dt/raavyaGukF4XxizWKhKQ24DoLtdNbBmNKUOPqwjsKQSdV9GQtj9CBEea9DlzETlVER1gYeXXBGaA== + dependencies: + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/sha2" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + +"@ethersproject/strings@5.7.0", "@ethersproject/strings@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/strings/-/strings-5.7.0.tgz#54c9d2a7c57ae8f1205c88a9d3a56471e14d5ed2" + integrity sha512-/9nu+lj0YswRNSH0NXYqrh8775XNyEdUQAuf3f+SmOrnVewcJ5SBNAjF7lpgehKi4abvNNXyf+HX86czCdJ8Mg== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + +"@ethersproject/transactions@5.7.0", "@ethersproject/transactions@^5.6.2", "@ethersproject/transactions@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/transactions/-/transactions-5.7.0.tgz#91318fc24063e057885a6af13fdb703e1f993d3b" + integrity sha512-kmcNicCp1lp8qanMTC3RIikGgoJ80ztTyvtsFvCYpSCfkjhD0jZ2LOrnbcuxuToLIUYYf+4XwD1rP+B/erDIhQ== + dependencies: + "@ethersproject/address" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/rlp" "^5.7.0" + "@ethersproject/signing-key" "^5.7.0" + +"@ethersproject/units@5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/units/-/units-5.7.0.tgz#637b563d7e14f42deeee39245275d477aae1d8b1" + integrity sha512-pD3xLMy3SJu9kG5xDGI7+xhTEmGXlEqXU4OfNapmfnxLVY4EMSSRp7j1k7eezutBPH7RBN/7QPnwR7hzNlEFeg== + dependencies: + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + +"@ethersproject/wallet@5.7.0", "@ethersproject/wallet@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/wallet/-/wallet-5.7.0.tgz#4e5d0790d96fe21d61d38fb40324e6c7ef350b2d" + integrity sha512-MhmXlJXEJFBFVKrDLB4ZdDzxcBxQ3rLyCkhNqVu3CDYvR97E+8r01UgrI+TI99Le+aYm/in/0vp86guJuM7FCA== + dependencies: + "@ethersproject/abstract-provider" "^5.7.0" + "@ethersproject/abstract-signer" "^5.7.0" + "@ethersproject/address" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/hash" "^5.7.0" + "@ethersproject/hdnode" "^5.7.0" + "@ethersproject/json-wallets" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/random" "^5.7.0" + "@ethersproject/signing-key" "^5.7.0" + "@ethersproject/transactions" "^5.7.0" + "@ethersproject/wordlists" "^5.7.0" + +"@ethersproject/web@5.7.1", "@ethersproject/web@^5.7.0": + version "5.7.1" + resolved "https://registry.yarnpkg.com/@ethersproject/web/-/web-5.7.1.tgz#de1f285b373149bee5928f4eb7bcb87ee5fbb4ae" + integrity sha512-Gueu8lSvyjBWL4cYsWsjh6MtMwM0+H4HvqFPZfB6dV8ctbP9zFAO73VG1cMWae0FLPCtz0peKPpZY8/ugJJX2w== + dependencies: + "@ethersproject/base64" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + +"@ethersproject/wordlists@5.7.0", "@ethersproject/wordlists@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/wordlists/-/wordlists-5.7.0.tgz#8fb2c07185d68c3e09eb3bfd6e779ba2774627f5" + integrity sha512-S2TFNJNfHWVHNE6cNDjbVlZ6MgE17MIxMbMg2zv3wn+3XSJGosL1m9ZVv3GXCf/2ymSsQ+hRI5IzoMJTG6aoVA== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/hash" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + +"@fvictorio/tabtab@^0.0.3": + version "0.0.3" + resolved "https://registry.yarnpkg.com/@fvictorio/tabtab/-/tabtab-0.0.3.tgz#1b97981424386490fa2a5818706d2afd1f6e4659" + integrity sha512-bT/BSy8MJThrTebqTCjXRnGSgZWthHLigZ4k2AvfNtC79vPyBS1myaxw8gRU6RxIcdDD3HBtm7pOsOoyC086Zg== + dependencies: + debug "^4.1.1" + enquirer "^2.3.4" + minimist "^1.2.0" + mkdirp "^1.0.3" + untildify "^4.0.0" + +"@jridgewell/resolve-uri@^3.0.3": + version "3.1.1" + resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz#c08679063f279615a3326583ba3a90d1d82cc721" + integrity sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA== + +"@jridgewell/sourcemap-codec@^1.4.10": + version "1.4.15" + resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32" + integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== + +"@jridgewell/trace-mapping@0.3.9": + version "0.3.9" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz#6534fd5933a53ba7cbf3a17615e273a0d1273ff9" + integrity sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ== + dependencies: + "@jridgewell/resolve-uri" "^3.0.3" + "@jridgewell/sourcemap-codec" "^1.4.10" + +"@metamask/eth-sig-util@^4.0.0": + version "4.0.1" + resolved "https://registry.yarnpkg.com/@metamask/eth-sig-util/-/eth-sig-util-4.0.1.tgz#3ad61f6ea9ad73ba5b19db780d40d9aae5157088" + integrity sha512-tghyZKLHZjcdlDqCA3gNZmLeR0XvOE9U1qoQO9ohyAZT6Pya+H9vkBPcsyXytmYLNgVoin7CKCmweo/R43V+tQ== + dependencies: + ethereumjs-abi "^0.6.8" + ethereumjs-util "^6.2.1" + ethjs-util "^0.1.6" + tweetnacl "^1.0.3" + tweetnacl-util "^0.15.1" + +"@morgan-stanley/ts-mocking-bird@^0.6.2": + version "0.6.4" + resolved "https://registry.yarnpkg.com/@morgan-stanley/ts-mocking-bird/-/ts-mocking-bird-0.6.4.tgz#2e4b60d42957bab3b50b67dbf14c3da2f62a39f7" + integrity sha512-57VJIflP8eR2xXa9cD1LUawh+Gh+BVQfVu0n6GALyg/AqV/Nz25kDRvws3i9kIe1PTrbsZZOYpsYp6bXPd6nVA== + dependencies: + lodash "^4.17.16" + uuid "^7.0.3" + +"@noble/hashes@1.2.0", "@noble/hashes@~1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.2.0.tgz#a3150eeb09cc7ab207ebf6d7b9ad311a9bdbed12" + integrity sha512-FZfhjEDbT5GRswV3C6uvLPHMiVD6lQBmpoX5+eSiPaMTXte/IKqI5dykDxzZB/WBeK/CDuQRBWarPdi3FNY2zQ== + +"@noble/secp256k1@1.7.1", "@noble/secp256k1@~1.7.0": + version "1.7.1" + resolved "https://registry.yarnpkg.com/@noble/secp256k1/-/secp256k1-1.7.1.tgz#b251c70f824ce3ca7f8dc3df08d58f005cc0507c" + integrity sha512-hOUk6AyBFmqVrv7k5WAw/LpszxVbj9gGN4JRkIX52fdFAj1UA61KXmZDvqVEm+pOyec3+fIeZB02LYa/pWOArw== + +"@nodelib/fs.scandir@2.1.5": + version "2.1.5" + resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" + integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== + dependencies: + "@nodelib/fs.stat" "2.0.5" + run-parallel "^1.1.9" + +"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" + integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== + +"@nodelib/fs.walk@^1.2.3": + version "1.2.8" + resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" + integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== + dependencies: + "@nodelib/fs.scandir" "2.1.5" + fastq "^1.6.0" + +"@nomicfoundation/ethereumjs-block@5.0.1": + version "5.0.1" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-block/-/ethereumjs-block-5.0.1.tgz#6f89664f55febbd723195b6d0974773d29ee133d" + integrity sha512-u1Yioemi6Ckj3xspygu/SfFvm8vZEO8/Yx5a1QLzi6nVU0jz3Pg2OmHKJ5w+D9Ogk1vhwRiqEBAqcb0GVhCyHw== + dependencies: + "@nomicfoundation/ethereumjs-common" "4.0.1" + "@nomicfoundation/ethereumjs-rlp" "5.0.1" + "@nomicfoundation/ethereumjs-trie" "6.0.1" + "@nomicfoundation/ethereumjs-tx" "5.0.1" + "@nomicfoundation/ethereumjs-util" "9.0.1" + ethereum-cryptography "0.1.3" + ethers "^5.7.1" + +"@nomicfoundation/ethereumjs-blockchain@7.0.1": + version "7.0.1" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-blockchain/-/ethereumjs-blockchain-7.0.1.tgz#80e0bd3535bfeb9baa29836b6f25123dab06a726" + integrity sha512-NhzndlGg829XXbqJEYrF1VeZhAwSPgsK/OB7TVrdzft3y918hW5KNd7gIZ85sn6peDZOdjBsAXIpXZ38oBYE5A== + dependencies: + "@nomicfoundation/ethereumjs-block" "5.0.1" + "@nomicfoundation/ethereumjs-common" "4.0.1" + "@nomicfoundation/ethereumjs-ethash" "3.0.1" + "@nomicfoundation/ethereumjs-rlp" "5.0.1" + "@nomicfoundation/ethereumjs-trie" "6.0.1" + "@nomicfoundation/ethereumjs-tx" "5.0.1" + "@nomicfoundation/ethereumjs-util" "9.0.1" + abstract-level "^1.0.3" + debug "^4.3.3" + ethereum-cryptography "0.1.3" + level "^8.0.0" + lru-cache "^5.1.1" + memory-level "^1.0.0" + +"@nomicfoundation/ethereumjs-common@4.0.1": + version "4.0.1" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-common/-/ethereumjs-common-4.0.1.tgz#4702d82df35b07b5407583b54a45bf728e46a2f0" + integrity sha512-OBErlkfp54GpeiE06brBW/TTbtbuBJV5YI5Nz/aB2evTDo+KawyEzPjBlSr84z/8MFfj8wS2wxzQX1o32cev5g== + dependencies: + "@nomicfoundation/ethereumjs-util" "9.0.1" + crc-32 "^1.2.0" + +"@nomicfoundation/ethereumjs-ethash@3.0.1": + version "3.0.1" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-ethash/-/ethereumjs-ethash-3.0.1.tgz#65ca494d53e71e8415c9a49ef48bc921c538fc41" + integrity sha512-KDjGIB5igzWOp8Ik5I6QiRH5DH+XgILlplsHR7TEuWANZA759G6krQ6o8bvj+tRUz08YygMQu/sGd9mJ1DYT8w== + dependencies: + "@nomicfoundation/ethereumjs-block" "5.0.1" + "@nomicfoundation/ethereumjs-rlp" "5.0.1" + "@nomicfoundation/ethereumjs-util" "9.0.1" + abstract-level "^1.0.3" + bigint-crypto-utils "^3.0.23" + ethereum-cryptography "0.1.3" + +"@nomicfoundation/ethereumjs-evm@2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-evm/-/ethereumjs-evm-2.0.1.tgz#f35681e203363f69ce2b3d3bf9f44d4e883ca1f1" + integrity sha512-oL8vJcnk0Bx/onl+TgQOQ1t/534GKFaEG17fZmwtPFeH8S5soiBYPCLUrvANOl4sCp9elYxIMzIiTtMtNNN8EQ== + dependencies: + "@ethersproject/providers" "^5.7.1" + "@nomicfoundation/ethereumjs-common" "4.0.1" + "@nomicfoundation/ethereumjs-tx" "5.0.1" + "@nomicfoundation/ethereumjs-util" "9.0.1" + debug "^4.3.3" + ethereum-cryptography "0.1.3" + mcl-wasm "^0.7.1" + rustbn.js "~0.2.0" + +"@nomicfoundation/ethereumjs-rlp@5.0.1": + version "5.0.1" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-rlp/-/ethereumjs-rlp-5.0.1.tgz#0b30c1cf77d125d390408e391c4bb5291ef43c28" + integrity sha512-xtxrMGa8kP4zF5ApBQBtjlSbN5E2HI8m8FYgVSYAnO6ssUoY5pVPGy2H8+xdf/bmMa22Ce8nWMH3aEW8CcqMeQ== + +"@nomicfoundation/ethereumjs-statemanager@2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-statemanager/-/ethereumjs-statemanager-2.0.1.tgz#8824a97938db4471911e2d2f140f79195def5935" + integrity sha512-B5ApMOnlruVOR7gisBaYwFX+L/AP7i/2oAahatssjPIBVDF6wTX1K7Qpa39E/nzsH8iYuL3krkYeUFIdO3EMUQ== + dependencies: + "@nomicfoundation/ethereumjs-common" "4.0.1" + "@nomicfoundation/ethereumjs-rlp" "5.0.1" + debug "^4.3.3" + ethereum-cryptography "0.1.3" + ethers "^5.7.1" + js-sdsl "^4.1.4" + +"@nomicfoundation/ethereumjs-trie@6.0.1": + version "6.0.1" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-trie/-/ethereumjs-trie-6.0.1.tgz#662c55f6b50659fd4b22ea9f806a7401cafb7717" + integrity sha512-A64It/IMpDVODzCgxDgAAla8jNjNtsoQZIzZUfIV5AY6Coi4nvn7+VReBn5itlxMiL2yaTlQr9TRWp3CSI6VoA== + dependencies: + "@nomicfoundation/ethereumjs-rlp" "5.0.1" + "@nomicfoundation/ethereumjs-util" "9.0.1" + "@types/readable-stream" "^2.3.13" + ethereum-cryptography "0.1.3" + readable-stream "^3.6.0" + +"@nomicfoundation/ethereumjs-tx@5.0.1": + version "5.0.1" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-tx/-/ethereumjs-tx-5.0.1.tgz#7629dc2036b4a33c34e9f0a592b43227ef4f0c7d" + integrity sha512-0HwxUF2u2hrsIM1fsasjXvlbDOq1ZHFV2dd1yGq8CA+MEYhaxZr8OTScpVkkxqMwBcc5y83FyPl0J9MZn3kY0w== + dependencies: + "@chainsafe/ssz" "^0.9.2" + "@ethersproject/providers" "^5.7.2" + "@nomicfoundation/ethereumjs-common" "4.0.1" + "@nomicfoundation/ethereumjs-rlp" "5.0.1" + "@nomicfoundation/ethereumjs-util" "9.0.1" + ethereum-cryptography "0.1.3" + +"@nomicfoundation/ethereumjs-util@9.0.1": + version "9.0.1" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-util/-/ethereumjs-util-9.0.1.tgz#530cda8bae33f8b5020a8f199ed1d0a2ce48ec89" + integrity sha512-TwbhOWQ8QoSCFhV/DDfSmyfFIHjPjFBj957219+V3jTZYZ2rf9PmDtNOeZWAE3p3vlp8xb02XGpd0v6nTUPbsA== + dependencies: + "@chainsafe/ssz" "^0.10.0" + "@nomicfoundation/ethereumjs-rlp" "5.0.1" + ethereum-cryptography "0.1.3" + +"@nomicfoundation/ethereumjs-vm@7.0.1": + version "7.0.1" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-vm/-/ethereumjs-vm-7.0.1.tgz#7d035e0993bcad10716c8b36e61dfb87fa3ca05f" + integrity sha512-rArhyn0jPsS/D+ApFsz3yVJMQ29+pVzNZ0VJgkzAZ+7FqXSRtThl1C1prhmlVr3YNUlfpZ69Ak+RUT4g7VoOuQ== + dependencies: + "@nomicfoundation/ethereumjs-block" "5.0.1" + "@nomicfoundation/ethereumjs-blockchain" "7.0.1" + "@nomicfoundation/ethereumjs-common" "4.0.1" + "@nomicfoundation/ethereumjs-evm" "2.0.1" + "@nomicfoundation/ethereumjs-rlp" "5.0.1" + "@nomicfoundation/ethereumjs-statemanager" "2.0.1" + "@nomicfoundation/ethereumjs-trie" "6.0.1" + "@nomicfoundation/ethereumjs-tx" "5.0.1" + "@nomicfoundation/ethereumjs-util" "9.0.1" + debug "^4.3.3" + ethereum-cryptography "0.1.3" + mcl-wasm "^0.7.1" + rustbn.js "~0.2.0" + +"@nomicfoundation/hardhat-chai-matchers@^1.0.0": + version "1.0.6" + resolved "https://registry.yarnpkg.com/@nomicfoundation/hardhat-chai-matchers/-/hardhat-chai-matchers-1.0.6.tgz#72a2e312e1504ee5dd73fe302932736432ba96bc" + integrity sha512-f5ZMNmabZeZegEfuxn/0kW+mm7+yV7VNDxLpMOMGXWFJ2l/Ct3QShujzDRF9cOkK9Ui/hbDeOWGZqyQALDXVCQ== + dependencies: + "@ethersproject/abi" "^5.1.2" + "@types/chai-as-promised" "^7.1.3" + chai-as-promised "^7.1.1" + deep-eql "^4.0.1" + ordinal "^1.0.3" + +"@nomicfoundation/hardhat-network-helpers@^1.0.0": + version "1.0.8" + resolved "https://registry.yarnpkg.com/@nomicfoundation/hardhat-network-helpers/-/hardhat-network-helpers-1.0.8.tgz#e4fe1be93e8a65508c46d73c41fa26c7e9f84931" + integrity sha512-MNqQbzUJZnCMIYvlniC3U+kcavz/PhhQSsY90tbEtUyMj/IQqsLwIRZa4ctjABh3Bz0KCh9OXUZ7Yk/d9hr45Q== + dependencies: + ethereumjs-util "^7.1.4" + +"@nomicfoundation/hardhat-toolbox@^2.0.0": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@nomicfoundation/hardhat-toolbox/-/hardhat-toolbox-2.0.2.tgz#ec95f23b53cb4e71a1a7091380fa223aad18f156" + integrity sha512-vnN1AzxbvpSx9pfdRHbUzTRIXpMLPXnUlkW855VaDk6N1pwRaQ2gNzEmFAABk4lWf11E00PKwFd/q27HuwYrYg== + +"@nomicfoundation/solidity-analyzer-darwin-arm64@0.1.1": + version "0.1.1" + resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-darwin-arm64/-/solidity-analyzer-darwin-arm64-0.1.1.tgz#4c858096b1c17fe58a474fe81b46815f93645c15" + integrity sha512-KcTodaQw8ivDZyF+D76FokN/HdpgGpfjc/gFCImdLUyqB6eSWVaZPazMbeAjmfhx3R0zm/NYVzxwAokFKgrc0w== + +"@nomicfoundation/solidity-analyzer-darwin-x64@0.1.1": + version "0.1.1" + resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-darwin-x64/-/solidity-analyzer-darwin-x64-0.1.1.tgz#6e25ccdf6e2d22389c35553b64fe6f3fdaec432c" + integrity sha512-XhQG4BaJE6cIbjAVtzGOGbK3sn1BO9W29uhk9J8y8fZF1DYz0Doj8QDMfpMu+A6TjPDs61lbsmeYodIDnfveSA== + +"@nomicfoundation/solidity-analyzer-freebsd-x64@0.1.1": + version "0.1.1" + resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-freebsd-x64/-/solidity-analyzer-freebsd-x64-0.1.1.tgz#0a224ea50317139caeebcdedd435c28a039d169c" + integrity sha512-GHF1VKRdHW3G8CndkwdaeLkVBi5A9u2jwtlS7SLhBc8b5U/GcoL39Q+1CSO3hYqePNP+eV5YI7Zgm0ea6kMHoA== + +"@nomicfoundation/solidity-analyzer-linux-arm64-gnu@0.1.1": + version "0.1.1" + resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-linux-arm64-gnu/-/solidity-analyzer-linux-arm64-gnu-0.1.1.tgz#dfa085d9ffab9efb2e7b383aed3f557f7687ac2b" + integrity sha512-g4Cv2fO37ZsUENQ2vwPnZc2zRenHyAxHcyBjKcjaSmmkKrFr64yvzeNO8S3GBFCo90rfochLs99wFVGT/0owpg== + +"@nomicfoundation/solidity-analyzer-linux-arm64-musl@0.1.1": + version "0.1.1" + resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-linux-arm64-musl/-/solidity-analyzer-linux-arm64-musl-0.1.1.tgz#c9e06b5d513dd3ab02a7ac069c160051675889a4" + integrity sha512-WJ3CE5Oek25OGE3WwzK7oaopY8xMw9Lhb0mlYuJl/maZVo+WtP36XoQTb7bW/i8aAdHW5Z+BqrHMux23pvxG3w== + +"@nomicfoundation/solidity-analyzer-linux-x64-gnu@0.1.1": + version "0.1.1" + resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-linux-x64-gnu/-/solidity-analyzer-linux-x64-gnu-0.1.1.tgz#8d328d16839e52571f72f2998c81e46bf320f893" + integrity sha512-5WN7leSr5fkUBBjE4f3wKENUy9HQStu7HmWqbtknfXkkil+eNWiBV275IOlpXku7v3uLsXTOKpnnGHJYI2qsdA== + +"@nomicfoundation/solidity-analyzer-linux-x64-musl@0.1.1": + version "0.1.1" + resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-linux-x64-musl/-/solidity-analyzer-linux-x64-musl-0.1.1.tgz#9b49d0634b5976bb5ed1604a1e1b736f390959bb" + integrity sha512-KdYMkJOq0SYPQMmErv/63CwGwMm5XHenEna9X9aB8mQmhDBrYrlAOSsIPgFCUSL0hjxE3xHP65/EPXR/InD2+w== + +"@nomicfoundation/solidity-analyzer-win32-arm64-msvc@0.1.1": + version "0.1.1" + resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-win32-arm64-msvc/-/solidity-analyzer-win32-arm64-msvc-0.1.1.tgz#e2867af7264ebbcc3131ef837878955dd6a3676f" + integrity sha512-VFZASBfl4qiBYwW5xeY20exWhmv6ww9sWu/krWSesv3q5hA0o1JuzmPHR4LPN6SUZj5vcqci0O6JOL8BPw+APg== + +"@nomicfoundation/solidity-analyzer-win32-ia32-msvc@0.1.1": + version "0.1.1" + resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-win32-ia32-msvc/-/solidity-analyzer-win32-ia32-msvc-0.1.1.tgz#0685f78608dd516c8cdfb4896ed451317e559585" + integrity sha512-JnFkYuyCSA70j6Si6cS1A9Gh1aHTEb8kOTBApp/c7NRTFGNMH8eaInKlyuuiIbvYFhlXW4LicqyYuWNNq9hkpQ== + +"@nomicfoundation/solidity-analyzer-win32-x64-msvc@0.1.1": + version "0.1.1" + resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-win32-x64-msvc/-/solidity-analyzer-win32-x64-msvc-0.1.1.tgz#c9a44f7108646f083b82e851486e0f6aeb785836" + integrity sha512-HrVJr6+WjIXGnw3Q9u6KQcbZCtk0caVWhCdFADySvRyUxJ8PnzlaP+MhwNE8oyT8OZ6ejHBRrrgjSqDCFXGirw== + +"@nomicfoundation/solidity-analyzer@^0.1.0": + version "0.1.1" + resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer/-/solidity-analyzer-0.1.1.tgz#f5f4d36d3f66752f59a57e7208cd856f3ddf6f2d" + integrity sha512-1LMtXj1puAxyFusBgUIy5pZk3073cNXYnXUpuNKFghHbIit/xZgbk0AokpUADbNm3gyD6bFWl3LRFh3dhVdREg== + optionalDependencies: + "@nomicfoundation/solidity-analyzer-darwin-arm64" "0.1.1" + "@nomicfoundation/solidity-analyzer-darwin-x64" "0.1.1" + "@nomicfoundation/solidity-analyzer-freebsd-x64" "0.1.1" + "@nomicfoundation/solidity-analyzer-linux-arm64-gnu" "0.1.1" + "@nomicfoundation/solidity-analyzer-linux-arm64-musl" "0.1.1" + "@nomicfoundation/solidity-analyzer-linux-x64-gnu" "0.1.1" + "@nomicfoundation/solidity-analyzer-linux-x64-musl" "0.1.1" + "@nomicfoundation/solidity-analyzer-win32-arm64-msvc" "0.1.1" + "@nomicfoundation/solidity-analyzer-win32-ia32-msvc" "0.1.1" + "@nomicfoundation/solidity-analyzer-win32-x64-msvc" "0.1.1" + +"@nomiclabs/hardhat-ethers@npm:hardhat-deploy-ethers": + version "0.3.0-beta.13" + resolved "https://registry.yarnpkg.com/hardhat-deploy-ethers/-/hardhat-deploy-ethers-0.3.0-beta.13.tgz#b96086ff768ddf69928984d5eb0a8d78cfca9366" + integrity sha512-PdWVcKB9coqWV1L7JTpfXRCI91Cgwsm7KLmBcwZ8f0COSm1xtABHZTyz3fvF6p42cTnz1VM0QnfDvMFlIRkSNw== + +"@nomiclabs/hardhat-etherscan@^3.0.0": + version "3.1.7" + resolved "https://registry.yarnpkg.com/@nomiclabs/hardhat-etherscan/-/hardhat-etherscan-3.1.7.tgz#72e3d5bd5d0ceb695e097a7f6f5ff6fcbf062b9a" + integrity sha512-tZ3TvSgpvsQ6B6OGmo1/Au6u8BrAkvs1mIC/eURA3xgIfznUZBhmpne8hv7BXUzw9xNL3fXdpOYgOQlVMTcoHQ== + dependencies: + "@ethersproject/abi" "^5.1.2" + "@ethersproject/address" "^5.0.2" + cbor "^8.1.0" + chalk "^2.4.2" + debug "^4.1.1" + fs-extra "^7.0.1" + lodash "^4.17.11" + semver "^6.3.0" + table "^6.8.0" + undici "^5.14.0" + +"@openzeppelin/contract-loader@^0.6.2": + version "0.6.3" + resolved "https://registry.yarnpkg.com/@openzeppelin/contract-loader/-/contract-loader-0.6.3.tgz#61a7b44de327e40b7d53f39e0fb59bbf847335c3" + integrity sha512-cOFIjBjwbGgZhDZsitNgJl0Ye1rd5yu/Yx5LMgeq3u0ZYzldm4uObzHDFq4gjDdoypvyORjjJa3BlFA7eAnVIg== + dependencies: + find-up "^4.1.0" + fs-extra "^8.1.0" + +"@openzeppelin/contracts-upgradeable@^4.8.3": + version "4.8.3" + resolved "https://registry.yarnpkg.com/@openzeppelin/contracts-upgradeable/-/contracts-upgradeable-4.8.3.tgz#6b076a7b751811b90fe3a172a7faeaa603e13a3f" + integrity sha512-SXDRl7HKpl2WDoJpn7CK/M9U4Z8gNXDHHChAKh0Iz+Wew3wu6CmFYBeie3je8V0GSXZAIYYwUktSrnW/kwVPtg== + +"@openzeppelin/contracts@^4.8.3": + version "4.8.3" + resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-4.8.3.tgz#cbef3146bfc570849405f59cba18235da95a252a" + integrity sha512-bQHV8R9Me8IaJoJ2vPG4rXcL7seB7YVuskr4f+f5RyOStSZetwzkWtoqDMl5erkBJy0lDRUnIR2WIkPiC0GJlg== + +"@openzeppelin/hardhat-upgrades@^1.23.1": + version "1.24.0" + resolved "https://registry.yarnpkg.com/@openzeppelin/hardhat-upgrades/-/hardhat-upgrades-1.24.0.tgz#b56f9858fcbb852d5db7caa9cc0367fa1239a64d" + integrity sha512-PmNf6y1eXSZ4k4f6Y42mcHeMfwY81MBiuh6vne+fOnWNZANCpjMV9b2Dy7SoS6IgFjq0umAtQYBsHWVWiaMSaw== + dependencies: + "@openzeppelin/upgrades-core" "^1.25.0" + chalk "^4.1.0" + debug "^4.1.1" + proper-lockfile "^4.1.1" + +"@openzeppelin/test-helpers@^0.5.16": + version "0.5.16" + resolved "https://registry.yarnpkg.com/@openzeppelin/test-helpers/-/test-helpers-0.5.16.tgz#2c9054f85069dfbfb5e8cef3ed781e8caf241fb3" + integrity sha512-T1EvspSfH1qQO/sgGlskLfYVBbqzJR23SZzYl/6B2JnT4EhThcI85UpvDk0BkLWKaDScQTabGHt4GzHW+3SfZg== + dependencies: + "@openzeppelin/contract-loader" "^0.6.2" + "@truffle/contract" "^4.0.35" + ansi-colors "^3.2.3" + chai "^4.2.0" + chai-bn "^0.2.1" + ethjs-abi "^0.2.1" + lodash.flatten "^4.4.0" + semver "^5.6.0" + web3 "^1.2.5" + web3-utils "^1.2.5" + +"@openzeppelin/upgrades-core@^1.25.0": + version "1.25.0" + resolved "https://registry.yarnpkg.com/@openzeppelin/upgrades-core/-/upgrades-core-1.25.0.tgz#4f540e2043b98f8b59a4e8a988b9aeb5b5f23a35" + integrity sha512-vSxOSm1k+P156nNm15ydhOmSPGC37mnl092FMVOH+eGaoqLjr2Za6ULVjDMFzvMnG+sGE1UoDOqBNPfTm0ch8w== + dependencies: + cbor "^8.0.0" + chalk "^4.1.0" + compare-versions "^5.0.0" + debug "^4.1.1" + ethereumjs-util "^7.0.3" + proper-lockfile "^4.1.1" + solidity-ast "^0.4.15" + +"@scure/base@~1.1.0": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.1.1.tgz#ebb651ee52ff84f420097055f4bf46cfba403938" + integrity sha512-ZxOhsSyxYwLJj3pLZCefNitxsj093tb2vq90mp2txoYeBqbcjDjqFhyM8eUjq/uFm6zJ+mUuqxlS2FkuSY1MTA== + +"@scure/bip32@1.1.5": + version "1.1.5" + resolved "https://registry.yarnpkg.com/@scure/bip32/-/bip32-1.1.5.tgz#d2ccae16dcc2e75bc1d75f5ef3c66a338d1ba300" + integrity sha512-XyNh1rB0SkEqd3tXcXMi+Xe1fvg+kUIcoRIEujP1Jgv7DqW2r9lg3Ah0NkFaCs9sTkQAQA8kw7xiRXzENi9Rtw== + dependencies: + "@noble/hashes" "~1.2.0" + "@noble/secp256k1" "~1.7.0" + "@scure/base" "~1.1.0" + +"@scure/bip39@1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@scure/bip39/-/bip39-1.1.1.tgz#b54557b2e86214319405db819c4b6a370cf340c5" + integrity sha512-t+wDck2rVkh65Hmv280fYdVdY25J9YeEUIgn2LG1WM6gxFkGzcksoDiUkWVpVp3Oex9xGC68JU2dSbUfwZ2jPg== + dependencies: + "@noble/hashes" "~1.2.0" + "@scure/base" "~1.1.0" + +"@sentry/core@5.30.0": + version "5.30.0" + resolved "https://registry.yarnpkg.com/@sentry/core/-/core-5.30.0.tgz#6b203664f69e75106ee8b5a2fe1d717379b331f3" + integrity sha512-TmfrII8w1PQZSZgPpUESqjB+jC6MvZJZdLtE/0hZ+SrnKhW3x5WlYLvTXZpcWePYBku7rl2wn1RZu6uT0qCTeg== + dependencies: + "@sentry/hub" "5.30.0" + "@sentry/minimal" "5.30.0" + "@sentry/types" "5.30.0" + "@sentry/utils" "5.30.0" + tslib "^1.9.3" + +"@sentry/hub@5.30.0": + version "5.30.0" + resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-5.30.0.tgz#2453be9b9cb903404366e198bd30c7ca74cdc100" + integrity sha512-2tYrGnzb1gKz2EkMDQcfLrDTvmGcQPuWxLnJKXJvYTQDGLlEvi2tWz1VIHjunmOvJrB5aIQLhm+dcMRwFZDCqQ== + dependencies: + "@sentry/types" "5.30.0" + "@sentry/utils" "5.30.0" + tslib "^1.9.3" + +"@sentry/minimal@5.30.0": + version "5.30.0" + resolved "https://registry.yarnpkg.com/@sentry/minimal/-/minimal-5.30.0.tgz#ce3d3a6a273428e0084adcb800bc12e72d34637b" + integrity sha512-BwWb/owZKtkDX+Sc4zCSTNcvZUq7YcH3uAVlmh/gtR9rmUvbzAA3ewLuB3myi4wWRAMEtny6+J/FN/x+2wn9Xw== + dependencies: + "@sentry/hub" "5.30.0" + "@sentry/types" "5.30.0" + tslib "^1.9.3" + +"@sentry/node@^5.18.1": + version "5.30.0" + resolved "https://registry.yarnpkg.com/@sentry/node/-/node-5.30.0.tgz#4ca479e799b1021285d7fe12ac0858951c11cd48" + integrity sha512-Br5oyVBF0fZo6ZS9bxbJZG4ApAjRqAnqFFurMVJJdunNb80brh7a5Qva2kjhm+U6r9NJAB5OmDyPkA1Qnt+QVg== + dependencies: + "@sentry/core" "5.30.0" + "@sentry/hub" "5.30.0" + "@sentry/tracing" "5.30.0" + "@sentry/types" "5.30.0" + "@sentry/utils" "5.30.0" + cookie "^0.4.1" + https-proxy-agent "^5.0.0" + lru_map "^0.3.3" + tslib "^1.9.3" + +"@sentry/tracing@5.30.0": + version "5.30.0" + resolved "https://registry.yarnpkg.com/@sentry/tracing/-/tracing-5.30.0.tgz#501d21f00c3f3be7f7635d8710da70d9419d4e1f" + integrity sha512-dUFowCr0AIMwiLD7Fs314Mdzcug+gBVo/+NCMyDw8tFxJkwWAKl7Qa2OZxLQ0ZHjakcj1hNKfCQJ9rhyfOl4Aw== + dependencies: + "@sentry/hub" "5.30.0" + "@sentry/minimal" "5.30.0" + "@sentry/types" "5.30.0" + "@sentry/utils" "5.30.0" + tslib "^1.9.3" + +"@sentry/types@5.30.0": + version "5.30.0" + resolved "https://registry.yarnpkg.com/@sentry/types/-/types-5.30.0.tgz#19709bbe12a1a0115bc790b8942917da5636f402" + integrity sha512-R8xOqlSTZ+htqrfteCWU5Nk0CDN5ApUTvrlvBuiH1DyP6czDZ4ktbZB0hAgBlVcK0U+qpD3ag3Tqqpa5Q67rPw== + +"@sentry/utils@5.30.0": + version "5.30.0" + resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-5.30.0.tgz#9a5bd7ccff85ccfe7856d493bffa64cabc41e980" + integrity sha512-zaYmoH0NWWtvnJjC9/CBseXMtKHm/tm40sz3YfJRxeQjyzRqNQPgivpd9R/oDJCYj999mzdW382p/qi2ypjLww== + dependencies: + "@sentry/types" "5.30.0" + tslib "^1.9.3" + +"@sindresorhus/is@^4.0.0", "@sindresorhus/is@^4.6.0": + version "4.6.0" + resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-4.6.0.tgz#3c7c9c46e678feefe7a2e5bb609d3dbd665ffb3f" + integrity sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw== + +"@solidity-parser/parser@^0.14.0", "@solidity-parser/parser@^0.14.1": + version "0.14.5" + resolved "https://registry.yarnpkg.com/@solidity-parser/parser/-/parser-0.14.5.tgz#87bc3cc7b068e08195c219c91cd8ddff5ef1a804" + integrity sha512-6dKnHZn7fg/iQATVEzqyUOyEidbn05q7YA2mQ9hC0MMXhhV3/JrsxmFSYZAcr7j1yUP700LLhTruvJ3MiQmjJg== + dependencies: + antlr4ts "^0.5.0-alpha.4" + +"@szmarczak/http-timer@^4.0.5": + version "4.0.6" + resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-4.0.6.tgz#b4a914bb62e7c272d4e5989fe4440f812ab1d807" + integrity sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w== + dependencies: + defer-to-connect "^2.0.0" + +"@szmarczak/http-timer@^5.0.1": + version "5.0.1" + resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-5.0.1.tgz#c7c1bf1141cdd4751b0399c8fc7b8b664cd5be3a" + integrity sha512-+PmQX0PiAYPMeVYe237LJAYvOMYW1j2rH5YROyS3b4CTVJum34HfRvKvAzozHAQG0TnHNdUfY9nCeUyRAs//cw== + dependencies: + defer-to-connect "^2.0.1" + +"@truffle/abi-utils@^0.3.9": + version "0.3.9" + resolved "https://registry.yarnpkg.com/@truffle/abi-utils/-/abi-utils-0.3.9.tgz#c476f5cfe01072b513b3e93fd7bea05cf7bd9d96" + integrity sha512-G5dqgwRHx5zwlXjz3QT8OJVfB2cOqWwD6DwKso0KttUt/zejhCjnkKq72rSgyeLMkz7wBB9ERLOsupLBILM8MA== + dependencies: + change-case "3.0.2" + fast-check "3.1.1" + web3-utils "1.8.2" + +"@truffle/blockchain-utils@^0.1.7": + version "0.1.7" + resolved "https://registry.yarnpkg.com/@truffle/blockchain-utils/-/blockchain-utils-0.1.7.tgz#cf7923a3ae5b591ae4c2a5ee45994a310ccaf1ee" + integrity sha512-1nibqGjEHC7KAyDThEFvbm2+EO8zAHee/VjCtxkYBE3ySwP50joh0QCEBjy7K/9z+icpMoDucfxmgaKToBFUgQ== + +"@truffle/codec@^0.14.17": + version "0.14.17" + resolved "https://registry.yarnpkg.com/@truffle/codec/-/codec-0.14.17.tgz#4ab11fab335854dad0d4aef75db2960ebd76fcd8" + integrity sha512-kD4dD86huLeaBEq5R8D1zleJEu6NsXbyYLdXl1V1TKdiO8odw5CBC6Y/+wdu5d3t1dyEYrTbhn1dqknZa52pmw== + dependencies: + "@truffle/abi-utils" "^0.3.9" + "@truffle/compile-common" "^0.9.4" + big.js "^6.0.3" + bn.js "^5.1.3" + cbor "^5.2.0" + debug "^4.3.1" + lodash "^4.17.21" + semver "7.3.7" + utf8 "^3.0.0" + web3-utils "1.8.2" + +"@truffle/compile-common@^0.9.4": + version "0.9.4" + resolved "https://registry.yarnpkg.com/@truffle/compile-common/-/compile-common-0.9.4.tgz#064208cda70491692b538f717809bb904a122c20" + integrity sha512-mnqJB/hLiPHNf+WKwt/2MH6lv34xSG/SFCib7+ckAklutUqVLeFo8EwQxinuHNkU7LY0C+YgZXhK1WTCO5YRJQ== + dependencies: + "@truffle/error" "^0.2.0" + colors "1.4.0" + +"@truffle/contract-schema@^3.4.13": + version "3.4.13" + resolved "https://registry.yarnpkg.com/@truffle/contract-schema/-/contract-schema-3.4.13.tgz#48447673f29380830f5821e8139ceefbbd545aac" + integrity sha512-emG7upuryYFrsPDbHqeASPWXL824M1tinhQwSPG0phSoa3g+RX9fUNNN/VPmF3tSkXLWUMhRnb7ehxnaCuRbZg== + dependencies: + ajv "^6.10.0" + debug "^4.3.1" + +"@truffle/contract@^4.0.35": + version "4.6.20" + resolved "https://registry.yarnpkg.com/@truffle/contract/-/contract-4.6.20.tgz#48237b9d3fe3e5019eac2c8ce9794201ae84fdf8" + integrity sha512-s7Mbc37L/CF5Apy/cjPnalkgACmG9tTAmcIW28cIZLRLOUAze18pqhtdHryxAQhEOtKGaDAho6TriqL7/74uHw== + dependencies: + "@ensdomains/ensjs" "^2.1.0" + "@truffle/blockchain-utils" "^0.1.7" + "@truffle/contract-schema" "^3.4.13" + "@truffle/debug-utils" "^6.0.48" + "@truffle/error" "^0.2.0" + "@truffle/interface-adapter" "^0.5.32" + bignumber.js "^7.2.1" + debug "^4.3.1" + ethers "^4.0.32" + web3 "1.8.2" + web3-core-helpers "1.8.2" + web3-core-promievent "1.8.2" + web3-eth-abi "1.8.2" + web3-utils "1.8.2" + +"@truffle/debug-utils@^6.0.48": + version "6.0.48" + resolved "https://registry.yarnpkg.com/@truffle/debug-utils/-/debug-utils-6.0.48.tgz#218caa0e00d95a03abadb05dfe63d621530e113a" + integrity sha512-HdK/7eH5EFrcTPeZVEgKaKkkzuZ4xsrH8yw+EoLEsScLsOEuQeKynY61NctjuU93voATWrYmV99Sfb/MRq2i2g== + dependencies: + "@truffle/codec" "^0.14.17" + "@trufflesuite/chromafi" "^3.0.0" + bn.js "^5.1.3" + chalk "^2.4.2" + debug "^4.3.1" + highlightjs-solidity "^2.0.6" + +"@truffle/error@^0.2.0": + version "0.2.0" + resolved "https://registry.yarnpkg.com/@truffle/error/-/error-0.2.0.tgz#65de6f03f5c041f883cc87677eecf8231428f1ab" + integrity sha512-Fe0/z4WWb7IP2gBnv3l6zqP87Y0kSMs7oiSLakKJq17q3GUunrHSdioKuNspdggxkXIBhEQLhi8C+LJdwmHKWQ== + +"@truffle/interface-adapter@^0.5.32": + version "0.5.32" + resolved "https://registry.yarnpkg.com/@truffle/interface-adapter/-/interface-adapter-0.5.32.tgz#2ae896ea85a9d267abcd5d0139afc0f06ebc5745" + integrity sha512-7Hgmdb4nJUcWtq4vvgWY7Mr2RLOTOp5FZaWyMiFmjkcEEhDlezm2QstALWAXgT0W6q7tDmDBpw3vTIFenRhHBA== + dependencies: + bn.js "^5.1.3" + ethers "^4.0.32" + web3 "1.8.2" + +"@trufflesuite/chromafi@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@trufflesuite/chromafi/-/chromafi-3.0.0.tgz#f6956408c1af6a38a6ed1657783ce59504a1eb8b" + integrity sha512-oqWcOqn8nT1bwlPPfidfzS55vqcIDdpfzo3HbU9EnUmcSTX+I8z0UyUFI3tZQjByVJulbzxHxUGS3ZJPwK/GPQ== + dependencies: + camelcase "^4.1.0" + chalk "^2.3.2" + cheerio "^1.0.0-rc.2" + detect-indent "^5.0.0" + highlight.js "^10.4.1" + lodash.merge "^4.6.2" + strip-ansi "^4.0.0" + strip-indent "^2.0.0" + +"@tsconfig/node10@^1.0.7": + version "1.0.9" + resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.9.tgz#df4907fc07a886922637b15e02d4cebc4c0021b2" + integrity sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA== + +"@tsconfig/node12@^1.0.7": + version "1.0.11" + resolved "https://registry.yarnpkg.com/@tsconfig/node12/-/node12-1.0.11.tgz#ee3def1f27d9ed66dac6e46a295cffb0152e058d" + integrity sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag== + +"@tsconfig/node14@^1.0.0": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@tsconfig/node14/-/node14-1.0.3.tgz#e4386316284f00b98435bf40f72f75a09dabf6c1" + integrity sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow== + +"@tsconfig/node16@^1.0.2": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.3.tgz#472eaab5f15c1ffdd7f8628bd4c4f753995ec79e" + integrity sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ== + +"@typechain/ethers-v5@^10.1.0": + version "10.2.0" + resolved "https://registry.yarnpkg.com/@typechain/ethers-v5/-/ethers-v5-10.2.0.tgz#68f5963efb5214cb2d881477228e4b5b315473e1" + integrity sha512-ikaq0N/w9fABM+G01OFmU3U3dNnyRwEahkdvi9mqy1a3XwKiPZaF/lu54OcNaEWnpvEYyhhS0N7buCtLQqC92w== + dependencies: + lodash "^4.17.15" + ts-essentials "^7.0.1" + +"@typechain/hardhat@^6.1.2": + version "6.1.5" + resolved "https://registry.yarnpkg.com/@typechain/hardhat/-/hardhat-6.1.5.tgz#caad58a1d3e9cd88061a584eb4f4fa763d5dcad1" + integrity sha512-lg7LW4qDZpxFMknp3Xool61Fg6Lays8F8TXdFGBG+MxyYcYU5795P1U2XdStuzGq9S2Dzdgh+1jGww9wvZ6r4Q== + dependencies: + fs-extra "^9.1.0" + +"@types/bn.js@^4.11.3": + version "4.11.6" + resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-4.11.6.tgz#c306c70d9358aaea33cd4eda092a742b9505967c" + integrity sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg== + dependencies: + "@types/node" "*" + +"@types/bn.js@^5.1.0", "@types/bn.js@^5.1.1": + version "5.1.1" + resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-5.1.1.tgz#b51e1b55920a4ca26e9285ff79936bbdec910682" + integrity sha512-qNrYbZqMx0uJAfKnKclPh+dTwK33KfLHYqtyODwd5HnXOjnkhc4qgn3BrK6RWyGZm5+sIFE7Q7Vz6QQtJB7w7g== + dependencies: + "@types/node" "*" + +"@types/cacheable-request@^6.0.1", "@types/cacheable-request@^6.0.2": + version "6.0.3" + resolved "https://registry.yarnpkg.com/@types/cacheable-request/-/cacheable-request-6.0.3.tgz#a430b3260466ca7b5ca5bfd735693b36e7a9d183" + integrity sha512-IQ3EbTzGxIigb1I3qPZc1rWJnH0BmSKv5QYTalEwweFvyBDLSAe24zP0le/hyi7ecGfZVlIVAg4BZqb8WBwKqw== + dependencies: + "@types/http-cache-semantics" "*" + "@types/keyv" "^3.1.4" + "@types/node" "*" + "@types/responselike" "^1.0.0" + +"@types/chai-as-promised@^7.1.3": + version "7.1.5" + resolved "https://registry.yarnpkg.com/@types/chai-as-promised/-/chai-as-promised-7.1.5.tgz#6e016811f6c7a64f2eed823191c3a6955094e255" + integrity sha512-jStwss93SITGBwt/niYrkf2C+/1KTeZCZl1LaeezTlqppAKeoQC7jxyqYuP72sxBGKCIbw7oHgbYssIRzT5FCQ== + dependencies: + "@types/chai" "*" + +"@types/chai@*", "@types/chai@^4.2.0": + version "4.3.5" + resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.3.5.tgz#ae69bcbb1bebb68c4ac0b11e9d8ed04526b3562b" + integrity sha512-mEo1sAde+UCE6b2hxn332f1g1E8WfYRu6p5SvTKr2ZKC1f7gFJXk4h5PyGP9Dt6gCaG8y8XhwnXWC6Iy2cmBng== + +"@types/concat-stream@^1.6.0": + version "1.6.1" + resolved "https://registry.yarnpkg.com/@types/concat-stream/-/concat-stream-1.6.1.tgz#24bcfc101ecf68e886aaedce60dfd74b632a1b74" + integrity sha512-eHE4cQPoj6ngxBZMvVf6Hw7Mh4jMW4U9lpGmS5GBPB9RYxlFg+CHaVN7ErNY4W9XfLIEn20b4VDYaIrbq0q4uA== + dependencies: + "@types/node" "*" + +"@types/form-data@0.0.33": + version "0.0.33" + resolved "https://registry.yarnpkg.com/@types/form-data/-/form-data-0.0.33.tgz#c9ac85b2a5fd18435b8c85d9ecb50e6d6c893ff8" + integrity sha512-8BSvG1kGm83cyJITQMZSulnl6QV8jqAGreJsc5tPu1Jq0vTSOiY/k24Wx82JRpWwZSqrala6sd5rWi6aNXvqcw== + dependencies: + "@types/node" "*" + +"@types/glob@^7.1.1": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.2.0.tgz#bc1b5bf3aa92f25bd5dd39f35c57361bdce5b2eb" + integrity sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA== + dependencies: + "@types/minimatch" "*" + "@types/node" "*" + +"@types/http-cache-semantics@*": + version "4.0.1" + resolved "https://registry.yarnpkg.com/@types/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz#0ea7b61496902b95890dc4c3a116b60cb8dae812" + integrity sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ== + +"@types/keyv@^3.1.4": + version "3.1.4" + resolved "https://registry.yarnpkg.com/@types/keyv/-/keyv-3.1.4.tgz#3ccdb1c6751b0c7e52300bcdacd5bcbf8faa75b6" + integrity sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg== + dependencies: + "@types/node" "*" + +"@types/lru-cache@^5.1.0": + version "5.1.1" + resolved "https://registry.yarnpkg.com/@types/lru-cache/-/lru-cache-5.1.1.tgz#c48c2e27b65d2a153b19bfc1a317e30872e01eef" + integrity sha512-ssE3Vlrys7sdIzs5LOxCzTVMsU7i9oa/IaW92wF32JFb3CVczqOkru2xspuKczHEbG3nvmPY7IFqVmGGHdNbYw== + +"@types/minimatch@*": + version "5.1.2" + resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-5.1.2.tgz#07508b45797cb81ec3f273011b054cd0755eddca" + integrity sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA== + +"@types/mocha@>=9.1.0": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-10.0.1.tgz#2f4f65bb08bc368ac39c96da7b2f09140b26851b" + integrity sha512-/fvYntiO1GeICvqbQ3doGDIP97vWmvFt83GKguJ6prmQM2iXZfFcq6YE8KteFyRtX2/h5Hf91BYvPodJKFYv5Q== + +"@types/node@*", "@types/node@>=12.0.0": + version "20.0.0" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.0.0.tgz#081d9afd28421be956c1a47ced1c9a0034b467e2" + integrity sha512-cD2uPTDnQQCVpmRefonO98/PPijuOnnEy5oytWJFPY1N9aJCz2wJ5kSGWO+zJoed2cY2JxQh6yBuUq4vIn61hw== + +"@types/node@^10.0.3": + version "10.17.60" + resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.60.tgz#35f3d6213daed95da7f0f73e75bcc6980e90597b" + integrity sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw== + +"@types/node@^12.12.6": + version "12.20.55" + resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.55.tgz#c329cbd434c42164f846b909bd6f85b5537f6240" + integrity sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ== + +"@types/node@^8.0.0": + version "8.10.66" + resolved "https://registry.yarnpkg.com/@types/node/-/node-8.10.66.tgz#dd035d409df322acc83dff62a602f12a5783bbb3" + integrity sha512-tktOkFUA4kXx2hhhrB8bIFb5TbwzS4uOhKEmwiD+NoiL0qtP2OQ9mFldbgD4dV1djrlBYP6eBuQZiWjuHUpqFw== + +"@types/pbkdf2@^3.0.0": + version "3.1.0" + resolved "https://registry.yarnpkg.com/@types/pbkdf2/-/pbkdf2-3.1.0.tgz#039a0e9b67da0cdc4ee5dab865caa6b267bb66b1" + integrity sha512-Cf63Rv7jCQ0LaL8tNXmEyqTHuIJxRdlS5vMh1mj5voN4+QFhVZnlZruezqpWYDiJ8UTzhP0VmeLXCmBk66YrMQ== + dependencies: + "@types/node" "*" + +"@types/prettier@^2.1.1": + version "2.7.2" + resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.7.2.tgz#6c2324641cc4ba050a8c710b2b251b377581fbf0" + integrity sha512-KufADq8uQqo1pYKVIYzfKbJfBAc0sOeXqGbFaSpv8MRmC/zXgowNZmFcbngndGk922QDmOASEXUZCaY48gs4cg== + +"@types/qs@^6.2.31", "@types/qs@^6.9.7": + version "6.9.7" + resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.7.tgz#63bb7d067db107cc1e457c303bc25d511febf6cb" + integrity sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw== + +"@types/readable-stream@^2.3.13": + version "2.3.15" + resolved "https://registry.yarnpkg.com/@types/readable-stream/-/readable-stream-2.3.15.tgz#3d79c9ceb1b6a57d5f6e6976f489b9b5384321ae" + integrity sha512-oM5JSKQCcICF1wvGgmecmHldZ48OZamtMxcGGVICOJA8o8cahXC1zEVAif8iwoc5j8etxFaRFnf095+CDsuoFQ== + dependencies: + "@types/node" "*" + safe-buffer "~5.1.1" + +"@types/responselike@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@types/responselike/-/responselike-1.0.0.tgz#251f4fe7d154d2bad125abe1b429b23afd262e29" + integrity sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA== + dependencies: + "@types/node" "*" + +"@types/secp256k1@^4.0.1": + version "4.0.3" + resolved "https://registry.yarnpkg.com/@types/secp256k1/-/secp256k1-4.0.3.tgz#1b8e55d8e00f08ee7220b4d59a6abe89c37a901c" + integrity sha512-Da66lEIFeIz9ltsdMZcpQvmrmmoqrfju8pm1BH8WbYjZSwUgCwXLb9C+9XYogwBITnbsSaMdVPb2ekf7TV+03w== + dependencies: + "@types/node" "*" + +abbrev@1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" + integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== + +abbrev@1.0.x: + version "1.0.9" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.0.9.tgz#91b4792588a7738c25f35dd6f63752a2f8776135" + integrity sha512-LEyx4aLEC3x6T0UguF6YILf+ntvmOaWsVfENmIW0E9H09vKlLDGelMjjSm0jkDHALj8A8quZ/HapKNigzwge+Q== + +abort-controller@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/abort-controller/-/abort-controller-3.0.0.tgz#eaf54d53b62bae4138e809ca225c8439a6efb392" + integrity sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg== + dependencies: + event-target-shim "^5.0.0" + +abortcontroller-polyfill@^1.7.3: + version "1.7.5" + resolved "https://registry.yarnpkg.com/abortcontroller-polyfill/-/abortcontroller-polyfill-1.7.5.tgz#6738495f4e901fbb57b6c0611d0c75f76c485bed" + integrity sha512-JMJ5soJWP18htbbxJjG7bG6yuI6pRhgJ0scHHTfkUjf6wjP912xZWvM+A4sJK3gqd9E8fcPbDnOefbA9Th/FIQ== + +abstract-level@^1.0.0, abstract-level@^1.0.2, abstract-level@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/abstract-level/-/abstract-level-1.0.3.tgz#78a67d3d84da55ee15201486ab44c09560070741" + integrity sha512-t6jv+xHy+VYwc4xqZMn2Pa9DjcdzvzZmQGRjTFc8spIbRGHgBrEKbPq+rYXc7CCo0lxgYvSgKVg9qZAhpVQSjA== + dependencies: + buffer "^6.0.3" + catering "^2.1.0" + is-buffer "^2.0.5" + level-supports "^4.0.0" + level-transcoder "^1.0.1" + module-error "^1.0.1" + queue-microtask "^1.2.3" + +accepts@~1.3.8: + version "1.3.8" + resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.8.tgz#0bf0be125b67014adcb0b0921e62db7bffe16b2e" + integrity sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw== + dependencies: + mime-types "~2.1.34" + negotiator "0.6.3" + +acorn-walk@^8.1.1: + version "8.2.0" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1" + integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA== + +acorn@^8.4.1: + version "8.8.2" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.2.tgz#1b2f25db02af965399b9776b0c2c391276d37c4a" + integrity sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw== + +address@^1.0.1: + version "1.2.2" + resolved "https://registry.yarnpkg.com/address/-/address-1.2.2.tgz#2b5248dac5485a6390532c6a517fda2e3faac89e" + integrity sha512-4B/qKCfeE/ODUaAUpSwfzazo5x29WD4r3vXiWsB7I2mSDAihwEqKO+g8GELZUQSSAo5e1XTYh3ZVfLyxBc12nA== + +adm-zip@^0.4.16: + version "0.4.16" + resolved "https://registry.yarnpkg.com/adm-zip/-/adm-zip-0.4.16.tgz#cf4c508fdffab02c269cbc7f471a875f05570365" + integrity sha512-TFi4HBKSGfIKsK5YCkKaaFG2m4PEDyViZmEwof3MTIgzimHLto6muaHVpbrljdIvIrFZzEq/p4nafOeLcYegrg== + +aes-js@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-3.0.0.tgz#e21df10ad6c2053295bcbb8dab40b09dbea87e4d" + integrity sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw== + +agent-base@6: + version "6.0.2" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" + integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ== + dependencies: + debug "4" + +aggregate-error@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/aggregate-error/-/aggregate-error-3.1.0.tgz#92670ff50f5359bdb7a3e0d40d0ec30c5737687a" + integrity sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA== + dependencies: + clean-stack "^2.0.0" + indent-string "^4.0.0" + +ajv@^6.10.0, ajv@^6.12.3: + version "6.12.6" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" + integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== + dependencies: + fast-deep-equal "^3.1.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" + +ajv@^8.0.1: + version "8.12.0" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.12.0.tgz#d1a0527323e22f53562c567c00991577dfbe19d1" + integrity sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA== + dependencies: + fast-deep-equal "^3.1.1" + json-schema-traverse "^1.0.0" + require-from-string "^2.0.2" + uri-js "^4.2.2" + +amdefine@>=0.0.4: + version "1.0.1" + resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" + integrity sha512-S2Hw0TtNkMJhIabBwIojKL9YHO5T0n5eNqWJ7Lrlel/zDbftQpxpapi8tZs3X1HWa+u+QeydGmzzNU0m09+Rcg== + +ansi-colors@3.2.3: + version "3.2.3" + resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-3.2.3.tgz#57d35b8686e851e2cc04c403f1c00203976a1813" + integrity sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw== + +ansi-colors@4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" + integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== + +ansi-colors@^3.2.3: + version "3.2.4" + resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-3.2.4.tgz#e3a3da4bfbae6c86a9c285625de124a234026fbf" + integrity sha512-hHUXGagefjN2iRrID63xckIvotOXOojhQKWIPUZ4mNUZ9nLZW+7FMNoE1lOkEhNWYsx/7ysGIuJYCiMAA9FnrA== + +ansi-colors@^4.1.1: + version "4.1.3" + resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.3.tgz#37611340eb2243e70cc604cad35d63270d48781b" + integrity sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw== + +ansi-escapes@^4.3.0: + version "4.3.2" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" + integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== + dependencies: + type-fest "^0.21.3" + +ansi-regex@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" + integrity sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA== + +ansi-regex@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.1.tgz#123d6479e92ad45ad897d4054e3c7ca7db4944e1" + integrity sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw== + +ansi-regex@^4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.1.tgz#164daac87ab2d6f6db3a29875e2d1766582dabed" + integrity sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g== + +ansi-regex@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" + integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== + +ansi-styles@^3.2.0, ansi-styles@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" + integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== + dependencies: + color-convert "^1.9.0" + +ansi-styles@^4.0.0, ansi-styles@^4.1.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" + integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== + dependencies: + color-convert "^2.0.1" + +antlr4ts@^0.5.0-alpha.4: + version "0.5.0-alpha.4" + resolved "https://registry.yarnpkg.com/antlr4ts/-/antlr4ts-0.5.0-alpha.4.tgz#71702865a87478ed0b40c0709f422cf14d51652a" + integrity sha512-WPQDt1B74OfPv/IMS2ekXAKkTZIHl88uMetg6q3OTqgFxZ/dxDXI0EWLyZid/1Pe6hTftyg5N7gel5wNAGxXyQ== + +anymatch@~3.1.1, anymatch@~3.1.2: + version "3.1.3" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e" + integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== + dependencies: + normalize-path "^3.0.0" + picomatch "^2.0.4" + +arg@^4.1.0: + version "4.1.3" + resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" + integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== + +argparse@^1.0.7: + version "1.0.10" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" + integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== + dependencies: + sprintf-js "~1.0.2" + +argparse@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" + integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== + +array-back@^3.0.1, array-back@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/array-back/-/array-back-3.1.0.tgz#b8859d7a508871c9a7b2cf42f99428f65e96bfb0" + integrity sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q== + +array-back@^4.0.1, array-back@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/array-back/-/array-back-4.0.2.tgz#8004e999a6274586beeb27342168652fdb89fa1e" + integrity sha512-NbdMezxqf94cnNfWLL7V/im0Ub+Anbb0IoZhvzie8+4HJ4nMQuzHuy49FkGYCJK2yAloZ3meiB6AVMClbrI1vg== + +array-buffer-byte-length@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz#fabe8bc193fea865f317fe7807085ee0dee5aead" + integrity sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A== + dependencies: + call-bind "^1.0.2" + is-array-buffer "^3.0.1" + +array-flatten@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" + integrity sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg== + +array-union@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" + integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== + +array-uniq@1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" + integrity sha512-MNha4BWQ6JbwhFhj03YK552f7cb3AzoE8SzeljgChvL1dl3IcvggXVz1DilzySZkCja+CXuZbdW7yATchWn8/Q== + +array.prototype.reduce@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/array.prototype.reduce/-/array.prototype.reduce-1.0.5.tgz#6b20b0daa9d9734dd6bc7ea66b5bbce395471eac" + integrity sha512-kDdugMl7id9COE8R7MHF5jWk7Dqt/fs4Pv+JXoICnYwqpjjjbUurz6w5fT5IG6brLdJhv6/VoHB0H7oyIBXd+Q== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.4" + es-abstract "^1.20.4" + es-array-method-boxes-properly "^1.0.0" + is-string "^1.0.7" + +asap@~2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" + integrity sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA== + +asn1@~0.2.3: + version "0.2.6" + resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.6.tgz#0d3a7bb6e64e02a90c0303b31f292868ea09a08d" + integrity sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ== + dependencies: + safer-buffer "~2.1.0" + +assert-plus@1.0.0, assert-plus@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" + integrity sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw== + +assertion-error@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b" + integrity sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw== + +astral-regex@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31" + integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ== + +async-limiter@~1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.1.tgz#dd379e94f0db8310b08291f9d64c3209766617fd" + integrity sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ== + +async@1.x: + version "1.5.2" + resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" + integrity sha512-nSVgobk4rv61R9PUSDtYt7mPVB2olxNR5RWJcAsH676/ef11bUZwvu7+RGYrYauVdDPcO519v68wRhXQtxsV9w== + +asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== + +at-least-node@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2" + integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg== + +available-typed-arrays@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7" + integrity sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw== + +aws-sign2@~0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" + integrity sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA== + +aws4@^1.8.0: + version "1.12.0" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.12.0.tgz#ce1c9d143389679e253b314241ea9aa5cec980d3" + integrity sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg== + +axios@^0.21.1: + version "0.21.4" + resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.4.tgz#c67b90dc0568e5c1cf2b0b858c43ba28e2eda575" + integrity sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg== + dependencies: + follow-redirects "^1.14.0" + +balanced-match@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" + integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== + +base-x@^3.0.2, base-x@^3.0.8: + version "3.0.9" + resolved "https://registry.yarnpkg.com/base-x/-/base-x-3.0.9.tgz#6349aaabb58526332de9f60995e548a53fe21320" + integrity sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ== + dependencies: + safe-buffer "^5.0.1" + +base64-js@^1.3.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" + integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== + +bcrypt-pbkdf@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e" + integrity sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w== + dependencies: + tweetnacl "^0.14.3" + +bech32@1.1.4, bech32@^1.1.3: + version "1.1.4" + resolved "https://registry.yarnpkg.com/bech32/-/bech32-1.1.4.tgz#e38c9f37bf179b8eb16ae3a772b40c356d4832e9" + integrity sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ== + +big-integer@1.6.36: + version "1.6.36" + resolved "https://registry.yarnpkg.com/big-integer/-/big-integer-1.6.36.tgz#78631076265d4ae3555c04f85e7d9d2f3a071a36" + integrity sha512-t70bfa7HYEA1D9idDbmuv7YbsbVkQ+Hp+8KFSul4aE5e/i1bjCNIRYJZlA8Q8p0r9T8cF/RVvwUgRA//FydEyg== + +big.js@^6.0.3: + version "6.2.1" + resolved "https://registry.yarnpkg.com/big.js/-/big.js-6.2.1.tgz#7205ce763efb17c2e41f26f121c420c6a7c2744f" + integrity sha512-bCtHMwL9LeDIozFn+oNhhFoq+yQ3BNdnsLSASUxLciOb1vgvpHsIO1dsENiGMgbb4SkP5TrzWzRiLddn8ahVOQ== + +bigint-crypto-utils@^3.0.23: + version "3.2.2" + resolved "https://registry.yarnpkg.com/bigint-crypto-utils/-/bigint-crypto-utils-3.2.2.tgz#e30a49ec38357c6981cd3da5aaa6480b1f752ee4" + integrity sha512-U1RbE3aX9ayCUVcIPHuPDPKcK3SFOXf93J1UK/iHlJuQB7bhagPIX06/CLpLEsDThJ7KA4Dhrnzynl+d2weTiw== + +bignumber.js@^7.2.1: + version "7.2.1" + resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-7.2.1.tgz#80c048759d826800807c4bfd521e50edbba57a5f" + integrity sha512-S4XzBk5sMB+Rcb/LNcpzXr57VRTxgAvaAEDAl1AwRx27j00hT84O6OkteE7u8UB3NuaaygCRrEpqox4uDOrbdQ== + +bignumber.js@^9.0.0, bignumber.js@^9.0.1: + version "9.1.1" + resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.1.1.tgz#c4df7dc496bd849d4c9464344c1aa74228b4dac6" + integrity sha512-pHm4LsMJ6lzgNGVfZHjMoO8sdoRhOzOH4MLmY65Jg70bpxCKu5iOHNJyfF6OyvYw7t8Fpf35RuzUyqnQsj8Vig== + +binary-extensions@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" + integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== + +blakejs@^1.1.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/blakejs/-/blakejs-1.2.1.tgz#5057e4206eadb4a97f7c0b6e197a505042fc3814" + integrity sha512-QXUSXI3QVc/gJME0dBpXrag1kbzOqCjCX8/b54ntNyW6sjtoqxqRk3LTmXzaJoh71zMsDCjM+47jS7XiwN/+fQ== + +bluebird@^3.5.0, bluebird@^3.5.2: + version "3.7.2" + resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" + integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== + +bn.js@4.11.6: + version "4.11.6" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.6.tgz#53344adb14617a13f6e8dd2ce28905d1c0ba3215" + integrity sha512-XWwnNNFCuuSQ0m3r3C4LE3EiORltHd9M05pq6FOlVeiophzRbMo50Sbz1ehl8K3Z+jw9+vmgnXefY1hz8X+2wA== + +bn.js@^4.11.0, bn.js@^4.11.6, bn.js@^4.11.8, bn.js@^4.11.9: + version "4.12.0" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88" + integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA== + +bn.js@^5.1.2, bn.js@^5.1.3, bn.js@^5.2.0, bn.js@^5.2.1: + version "5.2.1" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.1.tgz#0bc527a6a0d18d0aa8d5b0538ce4a77dccfa7b70" + integrity sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ== + +body-parser@1.20.1: + version "1.20.1" + resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.1.tgz#b1812a8912c195cd371a3ee5e66faa2338a5c668" + integrity sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw== + dependencies: + bytes "3.1.2" + content-type "~1.0.4" + debug "2.6.9" + depd "2.0.0" + destroy "1.2.0" + http-errors "2.0.0" + iconv-lite "0.4.24" + on-finished "2.4.1" + qs "6.11.0" + raw-body "2.5.1" + type-is "~1.6.18" + unpipe "1.0.0" + +body-parser@^1.16.0: + version "1.20.2" + resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.2.tgz#6feb0e21c4724d06de7ff38da36dad4f57a747fd" + integrity sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA== + dependencies: + bytes "3.1.2" + content-type "~1.0.5" + debug "2.6.9" + depd "2.0.0" + destroy "1.2.0" + http-errors "2.0.0" + iconv-lite "0.4.24" + on-finished "2.4.1" + qs "6.11.0" + raw-body "2.5.2" + type-is "~1.6.18" + unpipe "1.0.0" + +boolbase@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" + integrity sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww== + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +brace-expansion@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae" + integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== + dependencies: + balanced-match "^1.0.0" + +braces@^3.0.2, braces@~3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" + integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== + dependencies: + fill-range "^7.0.1" + +brorand@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" + integrity sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w== + +browser-level@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/browser-level/-/browser-level-1.0.1.tgz#36e8c3183d0fe1c405239792faaab5f315871011" + integrity sha512-XECYKJ+Dbzw0lbydyQuJzwNXtOpbMSq737qxJN11sIRTErOMShvDpbzTlgju7orJKvx4epULolZAuJGLzCmWRQ== + dependencies: + abstract-level "^1.0.2" + catering "^2.1.1" + module-error "^1.0.2" + run-parallel-limit "^1.1.0" + +browser-stdout@1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" + integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== + +browserify-aes@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48" + integrity sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA== + dependencies: + buffer-xor "^1.0.3" + cipher-base "^1.0.0" + create-hash "^1.1.0" + evp_bytestokey "^1.0.3" + inherits "^2.0.1" + safe-buffer "^5.0.1" + +bs58@^4.0.0, bs58@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/bs58/-/bs58-4.0.1.tgz#be161e76c354f6f788ae4071f63f34e8c4f0a42a" + integrity sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw== + dependencies: + base-x "^3.0.2" + +bs58check@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/bs58check/-/bs58check-2.1.2.tgz#53b018291228d82a5aa08e7d796fdafda54aebfc" + integrity sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA== + dependencies: + bs58 "^4.0.0" + create-hash "^1.1.0" + safe-buffer "^5.1.2" + +buffer-from@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" + integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== + +buffer-to-arraybuffer@^0.0.5: + version "0.0.5" + resolved "https://registry.yarnpkg.com/buffer-to-arraybuffer/-/buffer-to-arraybuffer-0.0.5.tgz#6064a40fa76eb43c723aba9ef8f6e1216d10511a" + integrity sha512-3dthu5CYiVB1DEJp61FtApNnNndTckcqe4pFcLdvHtrpG+kcyekCJKg4MRiDcFW7A6AODnXB9U4dwQiCW5kzJQ== + +buffer-xor@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" + integrity sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ== + +buffer@6.0.3, buffer@^6.0.3: + version "6.0.3" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6" + integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA== + dependencies: + base64-js "^1.3.1" + ieee754 "^1.2.1" + +buffer@^5.0.5, buffer@^5.5.0, buffer@^5.6.0: + version "5.7.1" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" + integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== + dependencies: + base64-js "^1.3.1" + ieee754 "^1.1.13" + +bufferutil@^4.0.1: + version "4.0.7" + resolved "https://registry.yarnpkg.com/bufferutil/-/bufferutil-4.0.7.tgz#60c0d19ba2c992dd8273d3f73772ffc894c153ad" + integrity sha512-kukuqc39WOHtdxtw4UScxF/WVnMFVSQVKhtx3AjZJzhd0RGZZldcrfSEbVsWWe6KNH253574cq5F+wpv0G9pJw== + dependencies: + node-gyp-build "^4.3.0" + +busboy@^1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/busboy/-/busboy-1.6.0.tgz#966ea36a9502e43cdb9146962523b92f531f6893" + integrity sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA== + dependencies: + streamsearch "^1.1.0" + +bytes@3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5" + integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg== + +cacheable-lookup@^5.0.3: + version "5.0.4" + resolved "https://registry.yarnpkg.com/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz#5a6b865b2c44357be3d5ebc2a467b032719a7005" + integrity sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA== + +cacheable-lookup@^6.0.4: + version "6.1.0" + resolved "https://registry.yarnpkg.com/cacheable-lookup/-/cacheable-lookup-6.1.0.tgz#0330a543471c61faa4e9035db583aad753b36385" + integrity sha512-KJ/Dmo1lDDhmW2XDPMo+9oiy/CeqosPguPCrgcVzKyZrL6pM1gU2GmPY/xo6OQPTUaA/c0kwHuywB4E6nmT9ww== + +cacheable-request@^7.0.2: + version "7.0.2" + resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-7.0.2.tgz#ea0d0b889364a25854757301ca12b2da77f91d27" + integrity sha512-pouW8/FmiPQbuGpkXQ9BAPv/Mo5xDGANgSNXzTzJ8DrKGuXOssM4wIQRjfanNRh3Yu5cfYPvcorqbhg2KIJtew== + dependencies: + clone-response "^1.0.2" + get-stream "^5.1.0" + http-cache-semantics "^4.0.0" + keyv "^4.0.0" + lowercase-keys "^2.0.0" + normalize-url "^6.0.1" + responselike "^2.0.0" + +call-bind@^1.0.0, call-bind@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" + integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA== + dependencies: + function-bind "^1.1.1" + get-intrinsic "^1.0.2" + +camel-case@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/camel-case/-/camel-case-3.0.0.tgz#ca3c3688a4e9cf3a4cda777dc4dcbc713249cf73" + integrity sha512-+MbKztAYHXPr1jNTSKQF52VpcFjwY5RkR7fxksV8Doo4KAYc5Fl4UJRgthBbTmEx8C54DqahhbLJkDwjI3PI/w== + dependencies: + no-case "^2.2.0" + upper-case "^1.1.1" + +camelcase@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a" + integrity sha512-4nhGqUkc4BqbBBB4Q6zLuD7lzzrHYrjKGeYaEji/3tFR5VdJu9v+LilhGIVe8wxEJPPOeWo7eg8dwY13TZ1BNg== + +camelcase@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" + integrity sha512-FxAv7HpHrXbh3aPo4o2qxHay2lkLY3x5Mw3KeE4KQE8ysVfziWeRZDwcjauvwBSGEC/nXUPzZy8zeh4HokqOnw== + +camelcase@^5.0.0: + version "5.3.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" + integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== + +camelcase@^6.0.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" + integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== + +case@^1.6.3: + version "1.6.3" + resolved "https://registry.yarnpkg.com/case/-/case-1.6.3.tgz#0a4386e3e9825351ca2e6216c60467ff5f1ea1c9" + integrity sha512-mzDSXIPaFwVDvZAHqZ9VlbyF4yyXRuX6IvB06WvPYkqJVO24kX1PPhv9bfpKNFZyxYFmmgo03HUiD8iklmJYRQ== + +caseless@^0.12.0, caseless@~0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" + integrity sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw== + +catering@^2.1.0, catering@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/catering/-/catering-2.1.1.tgz#66acba06ed5ee28d5286133982a927de9a04b510" + integrity sha512-K7Qy8O9p76sL3/3m7/zLKbRkyOlSZAgzEaLhyj2mXS8PsCud2Eo4hAb8aLtZqHh0QGqLcb9dlJSu6lHRVENm1w== + +cbor@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/cbor/-/cbor-5.2.0.tgz#4cca67783ccd6de7b50ab4ed62636712f287a67c" + integrity sha512-5IMhi9e1QU76ppa5/ajP1BmMWZ2FHkhAhjeVKQ/EFCgYSEaeVaoGtL7cxJskf9oCCk+XjzaIdc3IuU/dbA/o2A== + dependencies: + bignumber.js "^9.0.1" + nofilter "^1.0.4" + +cbor@^8.0.0, cbor@^8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/cbor/-/cbor-8.1.0.tgz#cfc56437e770b73417a2ecbfc9caf6b771af60d5" + integrity sha512-DwGjNW9omn6EwP70aXsn7FQJx5kO12tX0bZkaTjzdVFM6/7nhA4t0EENocKGx6D2Bch9PE2KzCUf5SceBdeijg== + dependencies: + nofilter "^3.1.0" + +chai-as-promised@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/chai-as-promised/-/chai-as-promised-7.1.1.tgz#08645d825deb8696ee61725dbf590c012eb00ca0" + integrity sha512-azL6xMoi+uxu6z4rhWQ1jbdUhOMhis2PvscD/xjLqNMkv3BPPp2JyyuTHOrf9BOosGpNQ11v6BKv/g57RXbiaA== + dependencies: + check-error "^1.0.2" + +chai-bn@^0.2.1: + version "0.2.2" + resolved "https://registry.yarnpkg.com/chai-bn/-/chai-bn-0.2.2.tgz#4dcf30dbc79db2378a00781693bc749c972bf34f" + integrity sha512-MzjelH0p8vWn65QKmEq/DLBG1Hle4WeyqT79ANhXZhn/UxRWO0OogkAxi5oGGtfzwU9bZR8mvbvYdoqNVWQwFg== + +chai@^4.2.0: + version "4.3.7" + resolved "https://registry.yarnpkg.com/chai/-/chai-4.3.7.tgz#ec63f6df01829088e8bf55fca839bcd464a8ec51" + integrity sha512-HLnAzZ2iupm25PlN0xFreAlBA5zaBSv3og0DdeGA4Ar6h6rJ3A0rolRUKJhSF2V10GZKDgWF/VmAEsNWjCRB+A== + dependencies: + assertion-error "^1.1.0" + check-error "^1.0.2" + deep-eql "^4.1.2" + get-func-name "^2.0.0" + loupe "^2.3.1" + pathval "^1.1.1" + type-detect "^4.0.5" + +chalk@^2.3.2, chalk@^2.4.2: + version "2.4.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" + integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + +chalk@^4.1.0, chalk@^4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" + integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + +change-case@3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/change-case/-/change-case-3.0.2.tgz#fd48746cce02f03f0a672577d1d3a8dc2eceb037" + integrity sha512-Mww+SLF6MZ0U6kdg11algyKd5BARbyM4TbFBepwowYSR5ClfQGCGtxNXgykpN0uF/bstWeaGDT4JWaDh8zWAHA== + dependencies: + camel-case "^3.0.0" + constant-case "^2.0.0" + dot-case "^2.1.0" + header-case "^1.0.0" + is-lower-case "^1.1.0" + is-upper-case "^1.1.0" + lower-case "^1.1.1" + lower-case-first "^1.0.0" + no-case "^2.3.2" + param-case "^2.1.0" + pascal-case "^2.0.0" + path-case "^2.1.0" + sentence-case "^2.1.0" + snake-case "^2.1.0" + swap-case "^1.1.0" + title-case "^2.1.0" + upper-case "^1.1.1" + upper-case-first "^1.1.0" + +"charenc@>= 0.0.1": + version "0.0.2" + resolved "https://registry.yarnpkg.com/charenc/-/charenc-0.0.2.tgz#c0a1d2f3a7092e03774bfa83f14c0fc5790a8667" + integrity sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA== + +check-error@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82" + integrity sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA== + +cheerio-select@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cheerio-select/-/cheerio-select-2.1.0.tgz#4d8673286b8126ca2a8e42740d5e3c4884ae21b4" + integrity sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g== + dependencies: + boolbase "^1.0.0" + css-select "^5.1.0" + css-what "^6.1.0" + domelementtype "^2.3.0" + domhandler "^5.0.3" + domutils "^3.0.1" + +cheerio@^1.0.0-rc.2: + version "1.0.0-rc.12" + resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-1.0.0-rc.12.tgz#788bf7466506b1c6bf5fae51d24a2c4d62e47683" + integrity sha512-VqR8m68vM46BNnuZ5NtnGBKIE/DfN0cRIzg9n40EIq9NOv90ayxLBXA8fXC5gquFRGJSTRqBq25Jt2ECLR431Q== + dependencies: + cheerio-select "^2.1.0" + dom-serializer "^2.0.0" + domhandler "^5.0.3" + domutils "^3.0.1" + htmlparser2 "^8.0.1" + parse5 "^7.0.0" + parse5-htmlparser2-tree-adapter "^7.0.0" + +chokidar@3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.3.0.tgz#12c0714668c55800f659e262d4962a97faf554a6" + integrity sha512-dGmKLDdT3Gdl7fBUe8XK+gAtGmzy5Fn0XkkWQuYxGIgWVPPse2CxFA5mtrlD0TOHaHjEUqkWNyP1XdHoJES/4A== + dependencies: + anymatch "~3.1.1" + braces "~3.0.2" + glob-parent "~5.1.0" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.2.0" + optionalDependencies: + fsevents "~2.1.1" + +chokidar@3.5.3, chokidar@^3.4.0, chokidar@^3.5.2: + version "3.5.3" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" + integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== + dependencies: + anymatch "~3.1.2" + braces "~3.0.2" + glob-parent "~5.1.2" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.6.0" + optionalDependencies: + fsevents "~2.3.2" + +chownr@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" + integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg== + +ci-info@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" + integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ== + +cids@^0.7.1: + version "0.7.5" + resolved "https://registry.yarnpkg.com/cids/-/cids-0.7.5.tgz#60a08138a99bfb69b6be4ceb63bfef7a396b28b2" + integrity sha512-zT7mPeghoWAu+ppn8+BS1tQ5qGmbMfB4AregnQjA/qHY3GC1m1ptI9GkWNlgeu38r7CuRdXB47uY2XgAYt6QVA== + dependencies: + buffer "^5.5.0" + class-is "^1.1.0" + multibase "~0.6.0" + multicodec "^1.0.0" + multihashes "~0.4.15" + +cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" + integrity sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q== + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + +class-is@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/class-is/-/class-is-1.1.0.tgz#9d3c0fba0440d211d843cec3dedfa48055005825" + integrity sha512-rhjH9AG1fvabIDoGRVH587413LPjTZgmDF9fOFCbFJQV4yuocX1mHxxvXI4g3cGwbVY9wAYIoKlg1N79frJKQw== + +classic-level@^1.2.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/classic-level/-/classic-level-1.3.0.tgz#5e36680e01dc6b271775c093f2150844c5edd5c8" + integrity sha512-iwFAJQYtqRTRM0F6L8h4JCt00ZSGdOyqh7yVrhhjrOpFhmBjNlRUey64MCiyo6UmQHMJ+No3c81nujPv+n9yrg== + dependencies: + abstract-level "^1.0.2" + catering "^2.1.0" + module-error "^1.0.1" + napi-macros "^2.2.2" + node-gyp-build "^4.3.0" + +clean-stack@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" + integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A== + +cli-table3@^0.5.0: + version "0.5.1" + resolved "https://registry.yarnpkg.com/cli-table3/-/cli-table3-0.5.1.tgz#0252372d94dfc40dbd8df06005f48f31f656f202" + integrity sha512-7Qg2Jrep1S/+Q3EceiZtQcDPWxhAvBw+ERf1162v4sikJrvojMHFqXt8QIVha8UlH9rgU0BeWPytZ9/TzYqlUw== + dependencies: + object-assign "^4.1.0" + string-width "^2.1.1" + optionalDependencies: + colors "^1.1.2" + +cliui@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" + integrity sha512-0yayqDxWQbqk3ojkYqUKqaAQ6AfNKeKWRNA8kR0WXzAsdHpP4BIaOmMAG87JGuO6qcobyW4GjxHd9PmhEd+T9w== + dependencies: + string-width "^1.0.1" + strip-ansi "^3.0.1" + wrap-ansi "^2.0.0" + +cliui@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-5.0.0.tgz#deefcfdb2e800784aa34f46fa08e06851c7bbbc5" + integrity sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA== + dependencies: + string-width "^3.1.0" + strip-ansi "^5.2.0" + wrap-ansi "^5.1.0" + +cliui@^7.0.2: + version "7.0.4" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" + integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.0" + wrap-ansi "^7.0.0" + +clone-response@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/clone-response/-/clone-response-1.0.3.tgz#af2032aa47816399cf5f0a1d0db902f517abb8c3" + integrity sha512-ROoL94jJH2dUVML2Y/5PEDNaSHgeOdSDicUyS7izcF63G6sTc/FTjLub4b8Il9S8S0beOfYt0TaA5qvFK+w0wA== + dependencies: + mimic-response "^1.0.0" + +code-point-at@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" + integrity sha512-RpAVKQA5T63xEj6/giIbUEtZwJ4UFIc3ZtvEkiaUERylqe8xb5IvqcgOurZLahv93CLKfxcw5YI+DZcUBRyLXA== + +color-convert@^1.9.0: + version "1.9.3" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" + integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== + dependencies: + color-name "1.1.3" + +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== + dependencies: + color-name "~1.1.4" + +color-name@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== + +color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + +colors@1.4.0, colors@^1.1.2: + version "1.4.0" + resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" + integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA== + +combined-stream@^1.0.6, combined-stream@^1.0.8, combined-stream@~1.0.6: + version "1.0.8" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" + integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== + dependencies: + delayed-stream "~1.0.0" + +command-exists@^1.2.8: + version "1.2.9" + resolved "https://registry.yarnpkg.com/command-exists/-/command-exists-1.2.9.tgz#c50725af3808c8ab0260fd60b01fbfa25b954f69" + integrity sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w== + +command-line-args@^5.1.1: + version "5.2.1" + resolved "https://registry.yarnpkg.com/command-line-args/-/command-line-args-5.2.1.tgz#c44c32e437a57d7c51157696893c5909e9cec42e" + integrity sha512-H4UfQhZyakIjC74I9d34fGYDwk3XpSr17QhEd0Q3I9Xq1CETHo4Hcuo87WyWHpAF1aSLjLRf5lD9ZGX2qStUvg== + dependencies: + array-back "^3.1.0" + find-replace "^3.0.0" + lodash.camelcase "^4.3.0" + typical "^4.0.0" + +command-line-usage@^6.1.0: + version "6.1.3" + resolved "https://registry.yarnpkg.com/command-line-usage/-/command-line-usage-6.1.3.tgz#428fa5acde6a838779dfa30e44686f4b6761d957" + integrity sha512-sH5ZSPr+7UStsloltmDh7Ce5fb8XPlHyoPzTpyyMuYCtervL65+ubVZ6Q61cFtFl62UyJlc8/JwERRbAFPUqgw== + dependencies: + array-back "^4.0.2" + chalk "^2.4.2" + table-layout "^1.0.2" + typical "^5.2.0" + +commander@3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/commander/-/commander-3.0.2.tgz#6837c3fb677ad9933d1cfba42dd14d5117d6b39e" + integrity sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow== + +compare-versions@^5.0.0: + version "5.0.3" + resolved "https://registry.yarnpkg.com/compare-versions/-/compare-versions-5.0.3.tgz#a9b34fea217472650ef4a2651d905f42c28ebfd7" + integrity sha512-4UZlZP8Z99MGEY+Ovg/uJxJuvoXuN4M6B3hKaiackiHrgzQFEe3diJi1mf1PNHbFujM7FvLrK2bpgIaImbtZ1A== + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== + +concat-stream@^1.6.0, concat-stream@^1.6.2: + version "1.6.2" + resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" + integrity sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw== + dependencies: + buffer-from "^1.0.0" + inherits "^2.0.3" + readable-stream "^2.2.2" + typedarray "^0.0.6" + +constant-case@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/constant-case/-/constant-case-2.0.0.tgz#4175764d389d3fa9c8ecd29186ed6005243b6a46" + integrity sha512-eS0N9WwmjTqrOmR3o83F5vW8Z+9R1HnVz3xmzT2PMFug9ly+Au/fxRWlEBSb6LcZwspSsEn9Xs1uw9YgzAg1EQ== + dependencies: + snake-case "^2.1.0" + upper-case "^1.1.1" + +content-disposition@0.5.4: + version "0.5.4" + resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.4.tgz#8b82b4efac82512a02bb0b1dcec9d2c5e8eb5bfe" + integrity sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ== + dependencies: + safe-buffer "5.2.1" + +content-hash@^2.5.2: + version "2.5.2" + resolved "https://registry.yarnpkg.com/content-hash/-/content-hash-2.5.2.tgz#bbc2655e7c21f14fd3bfc7b7d4bfe6e454c9e211" + integrity sha512-FvIQKy0S1JaWV10sMsA7TRx8bpU+pqPkhbsfvOJAdjRXvYxEckAwQWGwtRjiaJfh+E0DvcWUGqcdjwMGFjsSdw== + dependencies: + cids "^0.7.1" + multicodec "^0.5.5" + multihashes "^0.4.15" + +content-type@~1.0.4, content-type@~1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.5.tgz#8b773162656d1d1086784c8f23a54ce6d73d7918" + integrity sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA== + +cookie-signature@1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" + integrity sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ== + +cookie@0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.5.0.tgz#d1f5d71adec6558c58f389987c366aa47e994f8b" + integrity sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw== + +cookie@^0.4.1: + version "0.4.2" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.2.tgz#0e41f24de5ecf317947c82fc789e06a884824432" + integrity sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA== + +core-util-is@1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" + integrity sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ== + +core-util-is@~1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" + integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== + +cors@^2.8.1: + version "2.8.5" + resolved "https://registry.yarnpkg.com/cors/-/cors-2.8.5.tgz#eac11da51592dd86b9f06f6e7ac293b3df875d29" + integrity sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g== + dependencies: + object-assign "^4" + vary "^1" + +crc-32@^1.2.0: + version "1.2.2" + resolved "https://registry.yarnpkg.com/crc-32/-/crc-32-1.2.2.tgz#3cad35a934b8bf71f25ca524b6da51fb7eace2ff" + integrity sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ== + +create-hash@^1.1.0, create-hash@^1.1.2, create-hash@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" + integrity sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg== + dependencies: + cipher-base "^1.0.1" + inherits "^2.0.1" + md5.js "^1.3.4" + ripemd160 "^2.0.1" + sha.js "^2.4.0" + +create-hmac@^1.1.4, create-hmac@^1.1.7: + version "1.1.7" + resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.7.tgz#69170c78b3ab957147b2b8b04572e47ead2243ff" + integrity sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg== + dependencies: + cipher-base "^1.0.3" + create-hash "^1.1.0" + inherits "^2.0.1" + ripemd160 "^2.0.0" + safe-buffer "^5.0.1" + sha.js "^2.4.8" + +create-require@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" + integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== + +cross-fetch@^3.1.4: + version "3.1.5" + resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.1.5.tgz#e1389f44d9e7ba767907f7af8454787952ab534f" + integrity sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw== + dependencies: + node-fetch "2.6.7" + +"crypt@>= 0.0.1": + version "0.0.2" + resolved "https://registry.yarnpkg.com/crypt/-/crypt-0.0.2.tgz#88d7ff7ec0dfb86f713dc87bbb42d044d3e6c41b" + integrity sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow== + +crypto-addr-codec@^0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/crypto-addr-codec/-/crypto-addr-codec-0.1.7.tgz#e16cea892730178fe25a38f6d15b680cab3124ae" + integrity sha512-X4hzfBzNhy4mAc3UpiXEC/L0jo5E8wAa9unsnA8nNXYzXjCcGk83hfC5avJWCSGT8V91xMnAS9AKMHmjw5+XCg== + dependencies: + base-x "^3.0.8" + big-integer "1.6.36" + blakejs "^1.1.0" + bs58 "^4.0.1" + ripemd160-min "0.0.6" + safe-buffer "^5.2.0" + sha3 "^2.1.1" + +css-select@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/css-select/-/css-select-5.1.0.tgz#b8ebd6554c3637ccc76688804ad3f6a6fdaea8a6" + integrity sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg== + dependencies: + boolbase "^1.0.0" + css-what "^6.1.0" + domhandler "^5.0.2" + domutils "^3.0.1" + nth-check "^2.0.1" + +css-what@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/css-what/-/css-what-6.1.0.tgz#fb5effcf76f1ddea2c81bdfaa4de44e79bac70f4" + integrity sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw== + +d@1, d@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/d/-/d-1.0.1.tgz#8698095372d58dbee346ffd0c7093f99f8f9eb5a" + integrity sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA== + dependencies: + es5-ext "^0.10.50" + type "^1.0.1" + +dashdash@^1.12.0: + version "1.14.1" + resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" + integrity sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g== + dependencies: + assert-plus "^1.0.0" + +death@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/death/-/death-1.1.0.tgz#01aa9c401edd92750514470b8266390c66c67318" + integrity sha512-vsV6S4KVHvTGxbEcij7hkWRv0It+sGGWVOM67dQde/o5Xjnr+KmLjxWJii2uEObIrt1CcM9w0Yaovx+iOlIL+w== + +debug@2.6.9, debug@^2.2.0: + version "2.6.9" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== + dependencies: + ms "2.0.0" + +debug@3.2.6: + version "3.2.6" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" + integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== + dependencies: + ms "^2.1.1" + +debug@4, debug@4.3.4, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.3: + version "4.3.4" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" + integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== + dependencies: + ms "2.1.2" + +decamelize@^1.1.1, decamelize@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" + integrity sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA== + +decamelize@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-4.0.0.tgz#aa472d7bf660eb15f3494efd531cab7f2a709837" + integrity sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ== + +decode-uri-component@^0.2.0: + version "0.2.2" + resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.2.tgz#e69dbe25d37941171dd540e024c444cd5188e1e9" + integrity sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ== + +decompress-response@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-3.3.0.tgz#80a4dd323748384bfa248083622aedec982adff3" + integrity sha512-BzRPQuY1ip+qDonAOz42gRm/pg9F768C+npV/4JOsxRC2sq+Rlk+Q4ZCAsOhnIaMrgarILY+RMUIvMmmX1qAEA== + dependencies: + mimic-response "^1.0.0" + +decompress-response@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-6.0.0.tgz#ca387612ddb7e104bd16d85aab00d5ecf09c66fc" + integrity sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ== + dependencies: + mimic-response "^3.1.0" + +deep-eql@^4.0.1, deep-eql@^4.1.2: + version "4.1.3" + resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-4.1.3.tgz#7c7775513092f7df98d8df9996dd085eb668cc6d" + integrity sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw== + dependencies: + type-detect "^4.0.0" + +deep-extend@~0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" + integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== + +deep-is@~0.1.3: + version "0.1.4" + resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" + integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== + +defer-to-connect@^2.0.0, defer-to-connect@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-2.0.1.tgz#8016bdb4143e4632b77a3449c6236277de520587" + integrity sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg== + +define-properties@^1.1.2, define-properties@^1.1.3, define-properties@^1.1.4, define-properties@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.2.0.tgz#52988570670c9eacedd8064f4a990f2405849bd5" + integrity sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA== + dependencies: + has-property-descriptors "^1.0.0" + object-keys "^1.1.1" + +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== + +depd@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df" + integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== + +destroy@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.2.0.tgz#4803735509ad8be552934c67df614f94e66fa015" + integrity sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg== + +detect-indent@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-5.0.0.tgz#3871cc0a6a002e8c3e5b3cf7f336264675f06b9d" + integrity sha512-rlpvsxUtM0PQvy9iZe640/IWwWYyBsTApREbA1pHOpmOUIl9MkP/U4z7vTtg4Oaojvqhxt7sdufnT0EzGaR31g== + +detect-port@^1.3.0: + version "1.5.1" + resolved "https://registry.yarnpkg.com/detect-port/-/detect-port-1.5.1.tgz#451ca9b6eaf20451acb0799b8ab40dff7718727b" + integrity sha512-aBzdj76lueB6uUst5iAs7+0H/oOjqI5D16XUWxlWMIMROhcM0rfsNVk93zTngq1dDNpoXRr++Sus7ETAExppAQ== + dependencies: + address "^1.0.1" + debug "4" + +diff@3.5.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" + integrity sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA== + +diff@5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-5.0.0.tgz#7ed6ad76d859d030787ec35855f5b1daf31d852b" + integrity sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w== + +diff@^4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" + integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== + +difflib@^0.2.4: + version "0.2.4" + resolved "https://registry.yarnpkg.com/difflib/-/difflib-0.2.4.tgz#b5e30361a6db023176d562892db85940a718f47e" + integrity sha512-9YVwmMb0wQHQNr5J9m6BSj6fk4pfGITGQOOs+D9Fl+INODWFOfvhIU1hNv6GgR1RBoC/9NJcwu77zShxV0kT7w== + dependencies: + heap ">= 0.2.0" + +dir-glob@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" + integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== + dependencies: + path-type "^4.0.0" + +dom-serializer@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-2.0.0.tgz#e41b802e1eedf9f6cae183ce5e622d789d7d8e53" + integrity sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg== + dependencies: + domelementtype "^2.3.0" + domhandler "^5.0.2" + entities "^4.2.0" + +dom-walk@^0.1.0: + version "0.1.2" + resolved "https://registry.yarnpkg.com/dom-walk/-/dom-walk-0.1.2.tgz#0c548bef048f4d1f2a97249002236060daa3fd84" + integrity sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w== + +domelementtype@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.3.0.tgz#5c45e8e869952626331d7aab326d01daf65d589d" + integrity sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw== + +domhandler@^5.0.2, domhandler@^5.0.3: + version "5.0.3" + resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-5.0.3.tgz#cc385f7f751f1d1fc650c21374804254538c7d31" + integrity sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w== + dependencies: + domelementtype "^2.3.0" + +domutils@^3.0.1: + version "3.1.0" + resolved "https://registry.yarnpkg.com/domutils/-/domutils-3.1.0.tgz#c47f551278d3dc4b0b1ab8cbb42d751a6f0d824e" + integrity sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA== + dependencies: + dom-serializer "^2.0.0" + domelementtype "^2.3.0" + domhandler "^5.0.3" + +dot-case@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/dot-case/-/dot-case-2.1.1.tgz#34dcf37f50a8e93c2b3bca8bb7fb9155c7da3bee" + integrity sha512-HnM6ZlFqcajLsyudHq7LeeLDr2rFAVYtDv/hV5qchQEidSck8j9OPUsXY9KwJv/lHMtYlX4DjRQqwFYa+0r8Ug== + dependencies: + no-case "^2.2.0" + +ecc-jsbn@~0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" + integrity sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw== + dependencies: + jsbn "~0.1.0" + safer-buffer "^2.1.0" + +ee-first@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" + integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow== + +elliptic@6.5.4, elliptic@^6.4.0, elliptic@^6.5.2, elliptic@^6.5.4: + version "6.5.4" + resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb" + integrity sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ== + dependencies: + bn.js "^4.11.9" + brorand "^1.1.0" + hash.js "^1.0.0" + hmac-drbg "^1.0.1" + inherits "^2.0.4" + minimalistic-assert "^1.0.1" + minimalistic-crypto-utils "^1.0.1" + +emoji-regex@^7.0.1: + version "7.0.3" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" + integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA== + +emoji-regex@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" + integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== + +encode-utf8@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/encode-utf8/-/encode-utf8-1.0.3.tgz#f30fdd31da07fb596f281beb2f6b027851994cda" + integrity sha512-ucAnuBEhUK4boH2HjVYG5Q2mQyPorvv0u/ocS+zhdw0S8AlHYY+GOFhP1Gio5z4icpP2ivFSvhtFjQi8+T9ppw== + +encodeurl@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" + integrity sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w== + +end-of-stream@^1.1.0: + version "1.4.4" + resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" + integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== + dependencies: + once "^1.4.0" + +enquirer@^2.3.0, enquirer@^2.3.4, enquirer@^2.3.6: + version "2.3.6" + resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.3.6.tgz#2a7fe5dd634a1e4125a975ec994ff5456dc3734d" + integrity sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg== + dependencies: + ansi-colors "^4.1.1" + +entities@^4.2.0, entities@^4.4.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/entities/-/entities-4.5.0.tgz#5d268ea5e7113ec74c4d033b79ea5a35a488fb48" + integrity sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw== + +env-paths@^2.2.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.1.tgz#420399d416ce1fbe9bc0a07c62fa68d67fd0f8f2" + integrity sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A== + +error-ex@^1.2.0: + version "1.3.2" + resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" + integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== + dependencies: + is-arrayish "^0.2.1" + +es-abstract@^1.19.0, es-abstract@^1.20.4, es-abstract@^1.21.2: + version "1.21.2" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.21.2.tgz#a56b9695322c8a185dc25975aa3b8ec31d0e7eff" + integrity sha512-y/B5POM2iBnIxCiernH1G7rC9qQoM77lLIMQLuob0zhp8C56Po81+2Nj0WFKnd0pNReDTnkYryc+zhOzpEIROg== + dependencies: + array-buffer-byte-length "^1.0.0" + available-typed-arrays "^1.0.5" + call-bind "^1.0.2" + es-set-tostringtag "^2.0.1" + es-to-primitive "^1.2.1" + function.prototype.name "^1.1.5" + get-intrinsic "^1.2.0" + get-symbol-description "^1.0.0" + globalthis "^1.0.3" + gopd "^1.0.1" + has "^1.0.3" + has-property-descriptors "^1.0.0" + has-proto "^1.0.1" + has-symbols "^1.0.3" + internal-slot "^1.0.5" + is-array-buffer "^3.0.2" + is-callable "^1.2.7" + is-negative-zero "^2.0.2" + is-regex "^1.1.4" + is-shared-array-buffer "^1.0.2" + is-string "^1.0.7" + is-typed-array "^1.1.10" + is-weakref "^1.0.2" + object-inspect "^1.12.3" + object-keys "^1.1.1" + object.assign "^4.1.4" + regexp.prototype.flags "^1.4.3" + safe-regex-test "^1.0.0" + string.prototype.trim "^1.2.7" + string.prototype.trimend "^1.0.6" + string.prototype.trimstart "^1.0.6" + typed-array-length "^1.0.4" + unbox-primitive "^1.0.2" + which-typed-array "^1.1.9" + +es-array-method-boxes-properly@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz#873f3e84418de4ee19c5be752990b2e44718d09e" + integrity sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA== + +es-set-tostringtag@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz#338d502f6f674301d710b80c8592de8a15f09cd8" + integrity sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg== + dependencies: + get-intrinsic "^1.1.3" + has "^1.0.3" + has-tostringtag "^1.0.0" + +es-to-primitive@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" + integrity sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA== + dependencies: + is-callable "^1.1.4" + is-date-object "^1.0.1" + is-symbol "^1.0.2" + +es5-ext@^0.10.35, es5-ext@^0.10.50: + version "0.10.62" + resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.62.tgz#5e6adc19a6da524bf3d1e02bbc8960e5eb49a9a5" + integrity sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA== + dependencies: + es6-iterator "^2.0.3" + es6-symbol "^3.1.3" + next-tick "^1.1.0" + +es6-iterator@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.3.tgz#a7de889141a05a94b0854403b2d0a0fbfa98f3b7" + integrity sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g== + dependencies: + d "1" + es5-ext "^0.10.35" + es6-symbol "^3.1.1" + +es6-promise@^4.2.8: + version "4.2.8" + resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.8.tgz#4eb21594c972bc40553d276e510539143db53e0a" + integrity sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w== + +es6-symbol@^3.1.1, es6-symbol@^3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.3.tgz#bad5d3c1bcdac28269f4cb331e431c78ac705d18" + integrity sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA== + dependencies: + d "^1.0.1" + ext "^1.1.2" + +escalade@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" + integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== + +escape-html@~1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" + integrity sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow== + +escape-string-regexp@1.0.5, escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== + +escape-string-regexp@4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" + integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== + +escodegen@1.8.x: + version "1.8.1" + resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.8.1.tgz#5a5b53af4693110bebb0867aa3430dd3b70a1018" + integrity sha512-yhi5S+mNTOuRvyW4gWlg5W1byMaQGWWSYHXsuFZ7GBo7tpyOwi2EdzMP/QWxh9hwkD2m+wDVHJsxhRIj+v/b/A== + dependencies: + esprima "^2.7.1" + estraverse "^1.9.1" + esutils "^2.0.2" + optionator "^0.8.1" + optionalDependencies: + source-map "~0.2.0" + +esprima@2.7.x, esprima@^2.7.1: + version "2.7.3" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" + integrity sha512-OarPfz0lFCiW4/AV2Oy1Rp9qu0iusTKqykwTspGCZtPxmF81JR4MmIebvF1F9+UOKth2ZubLQ4XGGaU+hSn99A== + +esprima@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" + integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== + +estraverse@^1.9.1: + version "1.9.3" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-1.9.3.tgz#af67f2dc922582415950926091a4005d29c9bb44" + integrity sha512-25w1fMXQrGdoquWnScXZGckOv+Wes+JDnuN/+7ex3SauFRS72r2lFDec0EKPt2YD1wUJ/IrfEex+9yp4hfSOJA== + +esutils@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" + integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== + +etag@~1.8.1: + version "1.8.1" + resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" + integrity sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg== + +eth-ens-namehash@2.0.8, eth-ens-namehash@^2.0.8: + version "2.0.8" + resolved "https://registry.yarnpkg.com/eth-ens-namehash/-/eth-ens-namehash-2.0.8.tgz#229ac46eca86d52e0c991e7cb2aef83ff0f68bcf" + integrity sha512-VWEI1+KJfz4Km//dadyvBBoBeSQ0MHTXPvr8UIXiLW6IanxvAV+DmlZAijZwAyggqGUfwQBeHf7tc9wzc1piSw== + dependencies: + idna-uts46-hx "^2.3.1" + js-sha3 "^0.5.7" + +eth-gas-reporter@^0.2.25: + version "0.2.25" + resolved "https://registry.yarnpkg.com/eth-gas-reporter/-/eth-gas-reporter-0.2.25.tgz#546dfa946c1acee93cb1a94c2a1162292d6ff566" + integrity sha512-1fRgyE4xUB8SoqLgN3eDfpDfwEfRxh2Sz1b7wzFbyQA+9TekMmvSjjoRu9SKcSVyK+vLkLIsVbJDsTWjw195OQ== + dependencies: + "@ethersproject/abi" "^5.0.0-beta.146" + "@solidity-parser/parser" "^0.14.0" + cli-table3 "^0.5.0" + colors "1.4.0" + ethereum-cryptography "^1.0.3" + ethers "^4.0.40" + fs-readdir-recursive "^1.1.0" + lodash "^4.17.14" + markdown-table "^1.1.3" + mocha "^7.1.1" + req-cwd "^2.0.0" + request "^2.88.0" + request-promise-native "^1.0.5" + sha1 "^1.1.1" + sync-request "^6.0.0" + +eth-lib@0.2.8: + version "0.2.8" + resolved "https://registry.yarnpkg.com/eth-lib/-/eth-lib-0.2.8.tgz#b194058bef4b220ad12ea497431d6cb6aa0623c8" + integrity sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw== + dependencies: + bn.js "^4.11.6" + elliptic "^6.4.0" + xhr-request-promise "^0.1.2" + +eth-lib@^0.1.26: + version "0.1.29" + resolved "https://registry.yarnpkg.com/eth-lib/-/eth-lib-0.1.29.tgz#0c11f5060d42da9f931eab6199084734f4dbd1d9" + integrity sha512-bfttrr3/7gG4E02HoWTDUcDDslN003OlOoBxk9virpAZQ1ja/jDgwkWB8QfJF7ojuEowrqy+lzp9VcJG7/k5bQ== + dependencies: + bn.js "^4.11.6" + elliptic "^6.4.0" + nano-json-stream-parser "^0.1.2" + servify "^0.1.12" + ws "^3.0.0" + xhr-request-promise "^0.1.2" + +ethereum-bloom-filters@^1.0.6: + version "1.0.10" + resolved "https://registry.yarnpkg.com/ethereum-bloom-filters/-/ethereum-bloom-filters-1.0.10.tgz#3ca07f4aed698e75bd134584850260246a5fed8a" + integrity sha512-rxJ5OFN3RwjQxDcFP2Z5+Q9ho4eIdEmSc2ht0fCu8Se9nbXjZ7/031uXoUYJ87KHCOdVeiUuwSnoS7hmYAGVHA== + dependencies: + js-sha3 "^0.8.0" + +ethereum-cryptography@0.1.3, ethereum-cryptography@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz#8d6143cfc3d74bf79bbd8edecdf29e4ae20dd191" + integrity sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ== + dependencies: + "@types/pbkdf2" "^3.0.0" + "@types/secp256k1" "^4.0.1" + blakejs "^1.1.0" + browserify-aes "^1.2.0" + bs58check "^2.1.2" + create-hash "^1.2.0" + create-hmac "^1.1.7" + hash.js "^1.1.7" + keccak "^3.0.0" + pbkdf2 "^3.0.17" + randombytes "^2.1.0" + safe-buffer "^5.1.2" + scrypt-js "^3.0.0" + secp256k1 "^4.0.1" + setimmediate "^1.0.5" + +ethereum-cryptography@^1.0.3: + version "1.2.0" + resolved "https://registry.yarnpkg.com/ethereum-cryptography/-/ethereum-cryptography-1.2.0.tgz#5ccfa183e85fdaf9f9b299a79430c044268c9b3a" + integrity sha512-6yFQC9b5ug6/17CQpCyE3k9eKBMdhyVjzUy1WkiuY/E4vj/SXDBbCw8QEIaXqf0Mf2SnY6RmpDcwlUmBSS0EJw== + dependencies: + "@noble/hashes" "1.2.0" + "@noble/secp256k1" "1.7.1" + "@scure/bip32" "1.1.5" + "@scure/bip39" "1.1.1" + +ethereumjs-abi@^0.6.8: + version "0.6.8" + resolved "https://registry.yarnpkg.com/ethereumjs-abi/-/ethereumjs-abi-0.6.8.tgz#71bc152db099f70e62f108b7cdfca1b362c6fcae" + integrity sha512-Tx0r/iXI6r+lRsdvkFDlut0N08jWMnKRZ6Gkq+Nmw75lZe4e6o3EkSnkaBP5NF6+m5PTGAr9JP43N3LyeoglsA== + dependencies: + bn.js "^4.11.8" + ethereumjs-util "^6.0.0" + +ethereumjs-util@^6.0.0, ethereumjs-util@^6.2.1: + version "6.2.1" + resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz#fcb4e4dd5ceacb9d2305426ab1a5cd93e3163b69" + integrity sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw== + dependencies: + "@types/bn.js" "^4.11.3" + bn.js "^4.11.0" + create-hash "^1.1.2" + elliptic "^6.5.2" + ethereum-cryptography "^0.1.3" + ethjs-util "0.1.6" + rlp "^2.2.3" + +ethereumjs-util@^7.0.3, ethereumjs-util@^7.1.0, ethereumjs-util@^7.1.1, ethereumjs-util@^7.1.2, ethereumjs-util@^7.1.4, ethereumjs-util@^7.1.5: + version "7.1.5" + resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-7.1.5.tgz#9ecf04861e4fbbeed7465ece5f23317ad1129181" + integrity sha512-SDl5kKrQAudFBUe5OJM9Ac6WmMyYmXX/6sTmLZ3ffG2eY6ZIGBes3pEDxNN6V72WyOw4CPD5RomKdsa8DAAwLg== + dependencies: + "@types/bn.js" "^5.1.0" + bn.js "^5.1.2" + create-hash "^1.1.2" + ethereum-cryptography "^0.1.3" + rlp "^2.2.4" + +ethers@5.7.2, ethers@^5.0.13, ethers@^5.5.3, ethers@^5.7.1: + version "5.7.2" + resolved "https://registry.yarnpkg.com/ethers/-/ethers-5.7.2.tgz#3a7deeabbb8c030d4126b24f84e525466145872e" + integrity sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg== + dependencies: + "@ethersproject/abi" "5.7.0" + "@ethersproject/abstract-provider" "5.7.0" + "@ethersproject/abstract-signer" "5.7.0" + "@ethersproject/address" "5.7.0" + "@ethersproject/base64" "5.7.0" + "@ethersproject/basex" "5.7.0" + "@ethersproject/bignumber" "5.7.0" + "@ethersproject/bytes" "5.7.0" + "@ethersproject/constants" "5.7.0" + "@ethersproject/contracts" "5.7.0" + "@ethersproject/hash" "5.7.0" + "@ethersproject/hdnode" "5.7.0" + "@ethersproject/json-wallets" "5.7.0" + "@ethersproject/keccak256" "5.7.0" + "@ethersproject/logger" "5.7.0" + "@ethersproject/networks" "5.7.1" + "@ethersproject/pbkdf2" "5.7.0" + "@ethersproject/properties" "5.7.0" + "@ethersproject/providers" "5.7.2" + "@ethersproject/random" "5.7.0" + "@ethersproject/rlp" "5.7.0" + "@ethersproject/sha2" "5.7.0" + "@ethersproject/signing-key" "5.7.0" + "@ethersproject/solidity" "5.7.0" + "@ethersproject/strings" "5.7.0" + "@ethersproject/transactions" "5.7.0" + "@ethersproject/units" "5.7.0" + "@ethersproject/wallet" "5.7.0" + "@ethersproject/web" "5.7.1" + "@ethersproject/wordlists" "5.7.0" + +ethers@^4.0.32, ethers@^4.0.40: + version "4.0.49" + resolved "https://registry.yarnpkg.com/ethers/-/ethers-4.0.49.tgz#0eb0e9161a0c8b4761be547396bbe2fb121a8894" + integrity sha512-kPltTvWiyu+OktYy1IStSO16i2e7cS9D9OxZ81q2UUaiNPVrm/RTcbxamCXF9VUSKzJIdJV68EAIhTEVBalRWg== + dependencies: + aes-js "3.0.0" + bn.js "^4.11.9" + elliptic "6.5.4" + hash.js "1.1.3" + js-sha3 "0.5.7" + scrypt-js "2.0.4" + setimmediate "1.0.4" + uuid "2.0.1" + xmlhttprequest "1.8.0" + +ethjs-abi@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/ethjs-abi/-/ethjs-abi-0.2.1.tgz#e0a7a93a7e81163a94477bad56ede524ab6de533" + integrity sha512-g2AULSDYI6nEJyJaEVEXtTimRY2aPC2fi7ddSy0W+LXvEVL8Fe1y76o43ecbgdUKwZD+xsmEgX1yJr1Ia3r1IA== + dependencies: + bn.js "4.11.6" + js-sha3 "0.5.5" + number-to-bn "1.7.0" + +ethjs-unit@0.1.6: + version "0.1.6" + resolved "https://registry.yarnpkg.com/ethjs-unit/-/ethjs-unit-0.1.6.tgz#c665921e476e87bce2a9d588a6fe0405b2c41699" + integrity sha512-/Sn9Y0oKl0uqQuvgFk/zQgR7aw1g36qX/jzSQ5lSwlO0GigPymk4eGQfeNTD03w1dPOqfz8V77Cy43jH56pagw== + dependencies: + bn.js "4.11.6" + number-to-bn "1.7.0" + +ethjs-util@0.1.6, ethjs-util@^0.1.6: + version "0.1.6" + resolved "https://registry.yarnpkg.com/ethjs-util/-/ethjs-util-0.1.6.tgz#f308b62f185f9fe6237132fb2a9818866a5cd536" + integrity sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w== + dependencies: + is-hex-prefixed "1.0.0" + strip-hex-prefix "1.0.0" + +event-target-shim@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789" + integrity sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ== + +eventemitter3@4.0.4: + version "4.0.4" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.4.tgz#b5463ace635a083d018bdc7c917b4c5f10a85384" + integrity sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ== + +evp_bytestokey@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02" + integrity sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA== + dependencies: + md5.js "^1.3.4" + safe-buffer "^5.1.1" + +express@^4.14.0: + version "4.18.2" + resolved "https://registry.yarnpkg.com/express/-/express-4.18.2.tgz#3fabe08296e930c796c19e3c516979386ba9fd59" + integrity sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ== + dependencies: + accepts "~1.3.8" + array-flatten "1.1.1" + body-parser "1.20.1" + content-disposition "0.5.4" + content-type "~1.0.4" + cookie "0.5.0" + cookie-signature "1.0.6" + debug "2.6.9" + depd "2.0.0" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + finalhandler "1.2.0" + fresh "0.5.2" + http-errors "2.0.0" + merge-descriptors "1.0.1" + methods "~1.1.2" + on-finished "2.4.1" + parseurl "~1.3.3" + path-to-regexp "0.1.7" + proxy-addr "~2.0.7" + qs "6.11.0" + range-parser "~1.2.1" + safe-buffer "5.2.1" + send "0.18.0" + serve-static "1.15.0" + setprototypeof "1.2.0" + statuses "2.0.1" + type-is "~1.6.18" + utils-merge "1.0.1" + vary "~1.1.2" + +ext@^1.1.2: + version "1.7.0" + resolved "https://registry.yarnpkg.com/ext/-/ext-1.7.0.tgz#0ea4383c0103d60e70be99e9a7f11027a33c4f5f" + integrity sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw== + dependencies: + type "^2.7.2" + +extend@~3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" + integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== + +extsprintf@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" + integrity sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g== + +extsprintf@^1.2.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.1.tgz#8d172c064867f235c0c84a596806d279bf4bcc07" + integrity sha512-Wrk35e8ydCKDj/ArClo1VrPVmN8zph5V4AtHwIuHhvMXsKf73UT3BOD+azBIW+3wOJ4FhEH7zyaJCFvChjYvMA== + +fast-check@3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/fast-check/-/fast-check-3.1.1.tgz#72c5ae7022a4e86504762e773adfb8a5b0b01252" + integrity sha512-3vtXinVyuUKCKFKYcwXhGE6NtGWkqF8Yh3rvMZNzmwz8EPrgoc/v4pDdLHyLnCyCI5MZpZZkDEwFyXyEONOxpA== + dependencies: + pure-rand "^5.0.1" + +fast-deep-equal@^3.1.1: + version "3.1.3" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" + integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== + +fast-glob@^3.0.3: + version "3.2.12" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.12.tgz#7f39ec99c2e6ab030337142da9e0c18f37afae80" + integrity sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w== + dependencies: + "@nodelib/fs.stat" "^2.0.2" + "@nodelib/fs.walk" "^1.2.3" + glob-parent "^5.1.2" + merge2 "^1.3.0" + micromatch "^4.0.4" + +fast-json-stable-stringify@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" + integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== + +fast-levenshtein@~2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" + integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== + +fastq@^1.6.0: + version "1.15.0" + resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.15.0.tgz#d04d07c6a2a68fe4599fea8d2e103a937fae6b3a" + integrity sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw== + dependencies: + reusify "^1.0.4" + +fill-range@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" + integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== + dependencies: + to-regex-range "^5.0.1" + +finalhandler@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.2.0.tgz#7d23fe5731b207b4640e4fcd00aec1f9207a7b32" + integrity sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg== + dependencies: + debug "2.6.9" + encodeurl "~1.0.2" + escape-html "~1.0.3" + on-finished "2.4.1" + parseurl "~1.3.3" + statuses "2.0.1" + unpipe "~1.0.0" + +find-replace@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/find-replace/-/find-replace-3.0.0.tgz#3e7e23d3b05167a76f770c9fbd5258b0def68c38" + integrity sha512-6Tb2myMioCAgv5kfvP5/PkZZ/ntTpVK39fHY7WkWBgvbeE+VHd/tZuZ4mrC+bxh4cfOZeYKVPaJIZtZXV7GNCQ== + dependencies: + array-back "^3.0.1" + +find-up@3.0.0, find-up@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" + integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg== + dependencies: + locate-path "^3.0.0" + +find-up@5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" + integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== + dependencies: + locate-path "^6.0.0" + path-exists "^4.0.0" + +find-up@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" + integrity sha512-jvElSjyuo4EMQGoTwo1uJU5pQMwTW5lS1x05zzfJuTIyLR3zwO27LYrxNg+dlvKpGOuGy/MzBdXh80g0ve5+HA== + dependencies: + path-exists "^2.0.0" + pinkie-promise "^2.0.0" + +find-up@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" + integrity sha512-NWzkk0jSJtTt08+FBFMvXoeZnOJD+jTtsRmBYbAIzJdX6l7dLgR7CTubCM5/eDdPUBvLCeVasP1brfVR/9/EZQ== + dependencies: + locate-path "^2.0.0" + +find-up@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" + integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== + dependencies: + locate-path "^5.0.0" + path-exists "^4.0.0" + +flat@^4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/flat/-/flat-4.1.1.tgz#a392059cc382881ff98642f5da4dde0a959f309b" + integrity sha512-FmTtBsHskrU6FJ2VxCnsDb84wu9zhmO3cUX2kGFb5tuwhfXxGciiT0oRY+cck35QmG+NmGh5eLz6lLCpWTqwpA== + dependencies: + is-buffer "~2.0.3" + +flat@^5.0.2: + version "5.0.2" + resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241" + integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== + +fmix@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/fmix/-/fmix-0.1.0.tgz#c7bbf124dec42c9d191cfb947d0a9778dd986c0c" + integrity sha512-Y6hyofImk9JdzU8k5INtTXX1cu8LDlePWDFU5sftm9H+zKCr5SGrVjdhkvsim646cw5zD0nADj8oHyXMZmCZ9w== + dependencies: + imul "^1.0.0" + +follow-redirects@^1.12.1, follow-redirects@^1.14.0: + version "1.15.2" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.2.tgz#b460864144ba63f2681096f274c4e57026da2c13" + integrity sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA== + +for-each@^0.3.3: + version "0.3.3" + resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e" + integrity sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw== + dependencies: + is-callable "^1.1.3" + +forever-agent@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" + integrity sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw== + +form-data-encoder@1.7.1: + version "1.7.1" + resolved "https://registry.yarnpkg.com/form-data-encoder/-/form-data-encoder-1.7.1.tgz#ac80660e4f87ee0d3d3c3638b7da8278ddb8ec96" + integrity sha512-EFRDrsMm/kyqbTQocNvRXMLjc7Es2Vk+IQFx/YW7hkUH1eBl4J1fqiP34l74Yt0pFLCNpc06fkbVk00008mzjg== + +form-data@^2.2.0: + version "2.5.1" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.5.1.tgz#f2cbec57b5e59e23716e128fe44d4e5dd23895f4" + integrity sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.6" + mime-types "^2.1.12" + +form-data@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452" + integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.8" + mime-types "^2.1.12" + +form-data@~2.3.2: + version "2.3.3" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" + integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.6" + mime-types "^2.1.12" + +forwarded@0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.2.0.tgz#2269936428aad4c15c7ebe9779a84bf0b2a81811" + integrity sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow== + +fp-ts@1.19.3: + version "1.19.3" + resolved "https://registry.yarnpkg.com/fp-ts/-/fp-ts-1.19.3.tgz#261a60d1088fbff01f91256f91d21d0caaaaa96f" + integrity sha512-H5KQDspykdHuztLTg+ajGN0Z2qUjcEf3Ybxc6hLt0k7/zPkn29XnKnxlBPyW2XIddWrGaJBzBl4VLYOtk39yZg== + +fp-ts@^1.0.0: + version "1.19.5" + resolved "https://registry.yarnpkg.com/fp-ts/-/fp-ts-1.19.5.tgz#3da865e585dfa1fdfd51785417357ac50afc520a" + integrity sha512-wDNqTimnzs8QqpldiId9OavWK2NptormjXnRJTQecNjzwfyp6P/8s/zG8e4h3ja3oqkKaY72UlTjQYt/1yXf9A== + +fresh@0.5.2: + version "0.5.2" + resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" + integrity sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q== + +fs-extra@^0.30.0: + version "0.30.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-0.30.0.tgz#f233ffcc08d4da7d432daa449776989db1df93f0" + integrity sha512-UvSPKyhMn6LEd/WpUaV9C9t3zATuqoqfWc3QdPhPLb58prN9tqYPlPWi8Krxi44loBoUzlobqZ3+8tGpxxSzwA== + dependencies: + graceful-fs "^4.1.2" + jsonfile "^2.1.0" + klaw "^1.0.0" + path-is-absolute "^1.0.0" + rimraf "^2.2.8" + +fs-extra@^10.0.0: + version "10.1.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-10.1.0.tgz#02873cfbc4084dde127eaa5f9905eef2325d1abf" + integrity sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ== + dependencies: + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^2.0.0" + +fs-extra@^4.0.2: + version "4.0.3" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.3.tgz#0d852122e5bc5beb453fb028e9c0c9bf36340c94" + integrity sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg== + dependencies: + graceful-fs "^4.1.2" + jsonfile "^4.0.0" + universalify "^0.1.0" + +fs-extra@^7.0.0, fs-extra@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9" + integrity sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw== + dependencies: + graceful-fs "^4.1.2" + jsonfile "^4.0.0" + universalify "^0.1.0" + +fs-extra@^8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0" + integrity sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g== + dependencies: + graceful-fs "^4.2.0" + jsonfile "^4.0.0" + universalify "^0.1.0" + +fs-extra@^9.1.0: + version "9.1.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.1.0.tgz#5954460c764a8da2094ba3554bf839e6b9a7c86d" + integrity sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ== + dependencies: + at-least-node "^1.0.0" + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^2.0.0" + +fs-minipass@^1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.7.tgz#ccff8570841e7fe4265693da88936c55aed7f7c7" + integrity sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA== + dependencies: + minipass "^2.6.0" + +fs-readdir-recursive@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz#e32fc030a2ccee44a6b5371308da54be0b397d27" + integrity sha512-GNanXlVr2pf02+sPN40XN8HG+ePaNcvM0q5mZBd668Obwb0yD5GiUbZOFgwn8kGMY6I3mdyDJzieUy3PTYyTRA== + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== + +fsevents@~2.1.1: + version "2.1.3" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.3.tgz#fb738703ae8d2f9fe900c33836ddebee8b97f23e" + integrity sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ== + +fsevents@~2.3.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" + integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== + +function-bind@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" + integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== + +function.prototype.name@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.1.5.tgz#cce0505fe1ffb80503e6f9e46cc64e46a12a9621" + integrity sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.19.0" + functions-have-names "^1.2.2" + +functional-red-black-tree@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" + integrity sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g== + +functions-have-names@^1.2.2, functions-have-names@^1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" + integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ== + +get-caller-file@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a" + integrity sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w== + +get-caller-file@^2.0.1, get-caller-file@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" + integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== + +get-func-name@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.0.tgz#ead774abee72e20409433a066366023dd6887a41" + integrity sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig== + +get-intrinsic@^1.0.2, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3, get-intrinsic@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.0.tgz#7ad1dc0535f3a2904bba075772763e5051f6d05f" + integrity sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q== + dependencies: + function-bind "^1.1.1" + has "^1.0.3" + has-symbols "^1.0.3" + +get-port@^3.1.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/get-port/-/get-port-3.2.0.tgz#dd7ce7de187c06c8bf353796ac71e099f0980ebc" + integrity sha512-x5UJKlgeUiNT8nyo/AcnwLnZuZNcSjSw0kogRB+Whd1fjjFq4B1hySFxSFWWSn4mIBzg3sRNUDFYc4g5gjPoLg== + +get-stream@^5.1.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.2.0.tgz#4966a1795ee5ace65e706c4b7beb71257d6e22d3" + integrity sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA== + dependencies: + pump "^3.0.0" + +get-stream@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" + integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== + +get-symbol-description@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/get-symbol-description/-/get-symbol-description-1.0.0.tgz#7fdb81c900101fbd564dd5f1a30af5aadc1e58d6" + integrity sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.1.1" + +getpass@^0.1.1: + version "0.1.7" + resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" + integrity sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng== + dependencies: + assert-plus "^1.0.0" + +ghost-testrpc@^0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/ghost-testrpc/-/ghost-testrpc-0.0.2.tgz#c4de9557b1d1ae7b2d20bbe474a91378ca90ce92" + integrity sha512-i08dAEgJ2g8z5buJIrCTduwPIhih3DP+hOCTyyryikfV8T0bNvHnGXO67i0DD1H4GBDETTclPy9njZbfluQYrQ== + dependencies: + chalk "^2.4.2" + node-emoji "^1.10.0" + +glob-parent@^5.1.2, glob-parent@~5.1.0, glob-parent@~5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" + integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== + dependencies: + is-glob "^4.0.1" + +glob@7.1.3: + version "7.1.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1" + integrity sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +glob@7.1.7: + version "7.1.7" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.7.tgz#3b193e9233f01d42d0b3f78294bbeeb418f94a90" + integrity sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +glob@7.2.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023" + integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +glob@^5.0.15: + version "5.0.15" + resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1" + integrity sha512-c9IPMazfRITpmAAKi22dK1VKxGDX9ehhqfABDriL/lzO92xcUKEJPQHrVA/2YHSNFB4iFlykVmWvwo48nr3OxA== + dependencies: + inflight "^1.0.4" + inherits "2" + minimatch "2 || 3" + once "^1.3.0" + path-is-absolute "^1.0.0" + +glob@^7.0.0, glob@^7.1.3: + version "7.2.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" + integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.1.1" + once "^1.3.0" + path-is-absolute "^1.0.0" + +global-modules@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-2.0.0.tgz#997605ad2345f27f51539bea26574421215c7780" + integrity sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A== + dependencies: + global-prefix "^3.0.0" + +global-prefix@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/global-prefix/-/global-prefix-3.0.0.tgz#fc85f73064df69f50421f47f883fe5b913ba9b97" + integrity sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg== + dependencies: + ini "^1.3.5" + kind-of "^6.0.2" + which "^1.3.1" + +global@~4.4.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/global/-/global-4.4.0.tgz#3e7b105179006a323ed71aafca3e9c57a5cc6406" + integrity sha512-wv/LAoHdRE3BeTGz53FAamhGlPLhlssK45usmGFThIi4XqnBmjKQ16u+RNbP7WvigRZDxUsM0J3gcQ5yicaL0w== + dependencies: + min-document "^2.19.0" + process "^0.11.10" + +globalthis@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/globalthis/-/globalthis-1.0.3.tgz#5852882a52b80dc301b0660273e1ed082f0b6ccf" + integrity sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA== + dependencies: + define-properties "^1.1.3" + +globby@^10.0.1: + version "10.0.2" + resolved "https://registry.yarnpkg.com/globby/-/globby-10.0.2.tgz#277593e745acaa4646c3ab411289ec47a0392543" + integrity sha512-7dUi7RvCoT/xast/o/dLN53oqND4yk0nsHkhRgn9w65C4PofCLOoJ39iSOg+qVDdWQPIEj+eszMHQ+aLVwwQSg== + dependencies: + "@types/glob" "^7.1.1" + array-union "^2.1.0" + dir-glob "^3.0.1" + fast-glob "^3.0.3" + glob "^7.1.3" + ignore "^5.1.1" + merge2 "^1.2.3" + slash "^3.0.0" + +gopd@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.0.1.tgz#29ff76de69dac7489b7c0918a5788e56477c332c" + integrity sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA== + dependencies: + get-intrinsic "^1.1.3" + +got@12.1.0: + version "12.1.0" + resolved "https://registry.yarnpkg.com/got/-/got-12.1.0.tgz#099f3815305c682be4fd6b0ee0726d8e4c6b0af4" + integrity sha512-hBv2ty9QN2RdbJJMK3hesmSkFTjVIHyIDDbssCKnSmq62edGgImJWD10Eb1k77TiV1bxloxqcFAVK8+9pkhOig== + dependencies: + "@sindresorhus/is" "^4.6.0" + "@szmarczak/http-timer" "^5.0.1" + "@types/cacheable-request" "^6.0.2" + "@types/responselike" "^1.0.0" + cacheable-lookup "^6.0.4" + cacheable-request "^7.0.2" + decompress-response "^6.0.0" + form-data-encoder "1.7.1" + get-stream "^6.0.1" + http2-wrapper "^2.1.10" + lowercase-keys "^3.0.0" + p-cancelable "^3.0.0" + responselike "^2.0.0" + +got@^11.8.5: + version "11.8.6" + resolved "https://registry.yarnpkg.com/got/-/got-11.8.6.tgz#276e827ead8772eddbcfc97170590b841823233a" + integrity sha512-6tfZ91bOr7bOXnK7PRDCGBLa1H4U080YHNaAQ2KsMGlLEzRbk44nsZF2E1IeRc3vtJHPVbKCYgdFbaGO2ljd8g== + dependencies: + "@sindresorhus/is" "^4.0.0" + "@szmarczak/http-timer" "^4.0.5" + "@types/cacheable-request" "^6.0.1" + "@types/responselike" "^1.0.0" + cacheable-lookup "^5.0.3" + cacheable-request "^7.0.2" + decompress-response "^6.0.0" + http2-wrapper "^1.0.0-beta.5.2" + lowercase-keys "^2.0.0" + p-cancelable "^2.0.0" + responselike "^2.0.0" + +graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9, graceful-fs@^4.2.0, graceful-fs@^4.2.4: + version "4.2.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" + integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== + +growl@1.10.5: + version "1.10.5" + resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e" + integrity sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA== + +handlebars@^4.0.1: + version "4.7.7" + resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.7.tgz#9ce33416aad02dbd6c8fafa8240d5d98004945a1" + integrity sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA== + dependencies: + minimist "^1.2.5" + neo-async "^2.6.0" + source-map "^0.6.1" + wordwrap "^1.0.0" + optionalDependencies: + uglify-js "^3.1.4" + +har-schema@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" + integrity sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q== + +har-validator@~5.1.3: + version "5.1.5" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.5.tgz#1f0803b9f8cb20c0fa13822df1ecddb36bde1efd" + integrity sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w== + dependencies: + ajv "^6.12.3" + har-schema "^2.0.0" + +hardhat-deploy@^0.11.29: + version "0.11.29" + resolved "https://registry.yarnpkg.com/hardhat-deploy/-/hardhat-deploy-0.11.29.tgz#e6d76e37fa2ed74d76d15b01f3849da3bda49a81" + integrity sha512-9F+MRFkEocelzB8d+SDDCcTL7edBYAj2S63ldknvfIIBSajeB6q1/jm+dlK1GjcWzAzw7EVoxtjJXzxAxZfZcg== + dependencies: + "@ethersproject/abi" "^5.7.0" + "@ethersproject/abstract-signer" "^5.7.0" + "@ethersproject/address" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/contracts" "^5.7.0" + "@ethersproject/providers" "^5.7.2" + "@ethersproject/solidity" "^5.7.0" + "@ethersproject/transactions" "^5.7.0" + "@ethersproject/wallet" "^5.7.0" + "@types/qs" "^6.9.7" + axios "^0.21.1" + chalk "^4.1.2" + chokidar "^3.5.2" + debug "^4.3.2" + enquirer "^2.3.6" + ethers "^5.5.3" + form-data "^4.0.0" + fs-extra "^10.0.0" + match-all "^1.2.6" + murmur-128 "^0.2.1" + qs "^6.9.4" + zksync-web3 "^0.14.3" + +hardhat-gas-reporter@^1.0.8: + version "1.0.9" + resolved "https://registry.yarnpkg.com/hardhat-gas-reporter/-/hardhat-gas-reporter-1.0.9.tgz#9a2afb354bc3b6346aab55b1c02ca556d0e16450" + integrity sha512-INN26G3EW43adGKBNzYWOlI3+rlLnasXTwW79YNnUhXPDa+yHESgt639dJEs37gCjhkbNKcRRJnomXEuMFBXJg== + dependencies: + array-uniq "1.0.3" + eth-gas-reporter "^0.2.25" + sha1 "^1.1.1" + +hardhat-shorthand@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/hardhat-shorthand/-/hardhat-shorthand-1.0.0.tgz#ccc059c7e03115222b879c0347a18d20d0b31e3a" + integrity sha512-ixvUHrZBfGRXXrerBziNwGFmQZtz8iX43z2mJZTPnQasoaDbZ7oDZ4FqqI80EmZvP0hIml4wgpiQhrE3P/eqXQ== + dependencies: + "@fvictorio/tabtab" "^0.0.3" + debug "^4.1.1" + semver "^6.3.0" + +hardhat@^2.11.1: + version "2.14.0" + resolved "https://registry.yarnpkg.com/hardhat/-/hardhat-2.14.0.tgz#b60c74861494aeb1b50803cf04cc47865a42b87a" + integrity sha512-73jsInY4zZahMSVFurSK+5TNCJTXMv+vemvGia0Ac34Mm19fYp6vEPVGF3sucbumszsYxiTT2TbS8Ii2dsDSoQ== + dependencies: + "@ethersproject/abi" "^5.1.2" + "@metamask/eth-sig-util" "^4.0.0" + "@nomicfoundation/ethereumjs-block" "5.0.1" + "@nomicfoundation/ethereumjs-blockchain" "7.0.1" + "@nomicfoundation/ethereumjs-common" "4.0.1" + "@nomicfoundation/ethereumjs-evm" "2.0.1" + "@nomicfoundation/ethereumjs-rlp" "5.0.1" + "@nomicfoundation/ethereumjs-statemanager" "2.0.1" + "@nomicfoundation/ethereumjs-trie" "6.0.1" + "@nomicfoundation/ethereumjs-tx" "5.0.1" + "@nomicfoundation/ethereumjs-util" "9.0.1" + "@nomicfoundation/ethereumjs-vm" "7.0.1" + "@nomicfoundation/solidity-analyzer" "^0.1.0" + "@sentry/node" "^5.18.1" + "@types/bn.js" "^5.1.0" + "@types/lru-cache" "^5.1.0" + abort-controller "^3.0.0" + adm-zip "^0.4.16" + aggregate-error "^3.0.0" + ansi-escapes "^4.3.0" + chalk "^2.4.2" + chokidar "^3.4.0" + ci-info "^2.0.0" + debug "^4.1.1" + enquirer "^2.3.0" + env-paths "^2.2.0" + ethereum-cryptography "^1.0.3" + ethereumjs-abi "^0.6.8" + find-up "^2.1.0" + fp-ts "1.19.3" + fs-extra "^7.0.1" + glob "7.2.0" + immutable "^4.0.0-rc.12" + io-ts "1.10.4" + keccak "^3.0.2" + lodash "^4.17.11" + mnemonist "^0.38.0" + mocha "^10.0.0" + p-map "^4.0.0" + qs "^6.7.0" + raw-body "^2.4.1" + resolve "1.17.0" + semver "^6.3.0" + solc "0.7.3" + source-map-support "^0.5.13" + stacktrace-parser "^0.1.10" + tsort "0.0.1" + undici "^5.14.0" + uuid "^8.3.2" + ws "^7.4.6" + +has-bigints@^1.0.1, has-bigints@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.2.tgz#0871bd3e3d51626f6ca0966668ba35d5602d6eaa" + integrity sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ== + +has-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" + integrity sha512-DyYHfIYwAJmjAjSSPKANxI8bFY9YtFrgkAfinBojQ8YJTOuOuav64tMUJv584SES4xl74PmuaevIyaLESHdTAA== + +has-flag@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + integrity sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw== + +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== + +has-property-descriptors@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz#610708600606d36961ed04c196193b6a607fa861" + integrity sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ== + dependencies: + get-intrinsic "^1.1.1" + +has-proto@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.1.tgz#1885c1305538958aff469fef37937c22795408e0" + integrity sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg== + +has-symbols@^1.0.0, has-symbols@^1.0.2, has-symbols@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" + integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== + +has-tostringtag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.0.tgz#7e133818a7d394734f941e73c3d3f9291e658b25" + integrity sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ== + dependencies: + has-symbols "^1.0.2" + +has@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" + integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== + dependencies: + function-bind "^1.1.1" + +hash-base@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.1.0.tgz#55c381d9e06e1d2997a883b4a3fddfe7f0d3af33" + integrity sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA== + dependencies: + inherits "^2.0.4" + readable-stream "^3.6.0" + safe-buffer "^5.2.0" + +hash.js@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.3.tgz#340dedbe6290187151c1ea1d777a3448935df846" + integrity sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA== + dependencies: + inherits "^2.0.3" + minimalistic-assert "^1.0.0" + +hash.js@1.1.7, hash.js@^1.0.0, hash.js@^1.0.3, hash.js@^1.1.7: + version "1.1.7" + resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" + integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== + dependencies: + inherits "^2.0.3" + minimalistic-assert "^1.0.1" + +he@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" + integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== + +header-case@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/header-case/-/header-case-1.0.1.tgz#9535973197c144b09613cd65d317ef19963bd02d" + integrity sha512-i0q9mkOeSuhXw6bGgiQCCBgY/jlZuV/7dZXyZ9c6LcBrqwvT8eT719E9uxE5LiZftdl+z81Ugbg/VvXV4OJOeQ== + dependencies: + no-case "^2.2.0" + upper-case "^1.1.3" + +"heap@>= 0.2.0": + version "0.2.7" + resolved "https://registry.yarnpkg.com/heap/-/heap-0.2.7.tgz#1e6adf711d3f27ce35a81fe3b7bd576c2260a8fc" + integrity sha512-2bsegYkkHO+h/9MGbn6KWcE45cHZgPANo5LXF7EvWdT0yT2EguSVO1nDgU5c8+ZOPwp2vMNa7YFsJhVcDR9Sdg== + +highlight.js@^10.4.1: + version "10.7.3" + resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-10.7.3.tgz#697272e3991356e40c3cac566a74eef681756531" + integrity sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A== + +highlightjs-solidity@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/highlightjs-solidity/-/highlightjs-solidity-2.0.6.tgz#e7a702a2b05e0a97f185e6ba39fd4846ad23a990" + integrity sha512-DySXWfQghjm2l6a/flF+cteroJqD4gI8GSdL4PtvxZSsAHie8m3yVe2JFoRg03ROKT6hp2Lc/BxXkqerNmtQYg== + +hmac-drbg@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" + integrity sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg== + dependencies: + hash.js "^1.0.3" + minimalistic-assert "^1.0.0" + minimalistic-crypto-utils "^1.0.1" + +hosted-git-info@^2.1.4: + version "2.8.9" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.9.tgz#dffc0bf9a21c02209090f2aa69429e1414daf3f9" + integrity sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw== + +htmlparser2@^8.0.1: + version "8.0.2" + resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-8.0.2.tgz#f002151705b383e62433b5cf466f5b716edaec21" + integrity sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA== + dependencies: + domelementtype "^2.3.0" + domhandler "^5.0.3" + domutils "^3.0.1" + entities "^4.4.0" + +http-basic@^8.1.1: + version "8.1.3" + resolved "https://registry.yarnpkg.com/http-basic/-/http-basic-8.1.3.tgz#a7cabee7526869b9b710136970805b1004261bbf" + integrity sha512-/EcDMwJZh3mABI2NhGfHOGOeOZITqfkEO4p/xK+l3NpyncIHUQBoMvCSF/b5GqvKtySC2srL/GGG3+EtlqlmCw== + dependencies: + caseless "^0.12.0" + concat-stream "^1.6.2" + http-response-object "^3.0.1" + parse-cache-control "^1.0.1" + +http-cache-semantics@^4.0.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz#abe02fcb2985460bf0323be664436ec3476a6d5a" + integrity sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ== + +http-errors@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-2.0.0.tgz#b7774a1486ef73cf7667ac9ae0858c012c57b9d3" + integrity sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ== + dependencies: + depd "2.0.0" + inherits "2.0.4" + setprototypeof "1.2.0" + statuses "2.0.1" + toidentifier "1.0.1" + +http-https@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/http-https/-/http-https-1.0.0.tgz#2f908dd5f1db4068c058cd6e6d4ce392c913389b" + integrity sha512-o0PWwVCSp3O0wS6FvNr6xfBCHgt0m1tvPLFOCc2iFDKTRAXhB7m8klDf7ErowFH8POa6dVdGatKU5I1YYwzUyg== + +http-response-object@^3.0.1: + version "3.0.2" + resolved "https://registry.yarnpkg.com/http-response-object/-/http-response-object-3.0.2.tgz#7f435bb210454e4360d074ef1f989d5ea8aa9810" + integrity sha512-bqX0XTF6fnXSQcEJ2Iuyr75yVakyjIDCqroJQ/aHfSdlM743Cwqoi2nDYMzLGWUcuTWGWy8AAvOKXTfiv6q9RA== + dependencies: + "@types/node" "^10.0.3" + +http-signature@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" + integrity sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ== + dependencies: + assert-plus "^1.0.0" + jsprim "^1.2.2" + sshpk "^1.7.0" + +http2-wrapper@^1.0.0-beta.5.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/http2-wrapper/-/http2-wrapper-1.0.3.tgz#b8f55e0c1f25d4ebd08b3b0c2c079f9590800b3d" + integrity sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg== + dependencies: + quick-lru "^5.1.1" + resolve-alpn "^1.0.0" + +http2-wrapper@^2.1.10: + version "2.2.0" + resolved "https://registry.yarnpkg.com/http2-wrapper/-/http2-wrapper-2.2.0.tgz#b80ad199d216b7d3680195077bd7b9060fa9d7f3" + integrity sha512-kZB0wxMo0sh1PehyjJUWRFEd99KC5TLjZ2cULC4f9iqJBAmKQQXEICjxl5iPJRwP40dpeHFqqhm7tYCvODpqpQ== + dependencies: + quick-lru "^5.1.1" + resolve-alpn "^1.2.0" + +https-proxy-agent@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz#c59ef224a04fe8b754f3db0063a25ea30d0005d6" + integrity sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA== + dependencies: + agent-base "6" + debug "4" + +iconv-lite@0.4.24: + version "0.4.24" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" + integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== + dependencies: + safer-buffer ">= 2.1.2 < 3" + +idna-uts46-hx@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/idna-uts46-hx/-/idna-uts46-hx-2.3.1.tgz#a1dc5c4df37eee522bf66d969cc980e00e8711f9" + integrity sha512-PWoF9Keq6laYdIRwwCdhTPl60xRqAloYNMQLiyUnG42VjT53oW07BXIRM+NK7eQjzXjAk2gUvX9caRxlnF9TAA== + dependencies: + punycode "2.1.0" + +ieee754@^1.1.13, ieee754@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" + integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== + +ignore@^5.1.1: + version "5.2.4" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.4.tgz#a291c0c6178ff1b960befe47fcdec301674a6324" + integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ== + +immutable@^4.0.0-rc.12: + version "4.3.0" + resolved "https://registry.yarnpkg.com/immutable/-/immutable-4.3.0.tgz#eb1738f14ffb39fd068b1dbe1296117484dd34be" + integrity sha512-0AOCmOip+xgJwEVTQj1EfiDDOkPmuyllDuTuEX+DDXUgapLAsBIfkg3sxCYyCEA8mQqZrrxPUGjcOQ2JS3WLkg== + +imul@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/imul/-/imul-1.0.1.tgz#9d5867161e8b3de96c2c38d5dc7cb102f35e2ac9" + integrity sha512-WFAgfwPLAjU66EKt6vRdTlKj4nAgIDQzh29JonLa4Bqtl6D8JrIMvWjCnx7xEjVNmP3U0fM5o8ZObk7d0f62bA== + +indent-string@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251" + integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg== + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.3: + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + +ini@^1.3.5: + version "1.3.8" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" + integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== + +internal-slot@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.5.tgz#f2a2ee21f668f8627a4667f309dc0f4fb6674986" + integrity sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ== + dependencies: + get-intrinsic "^1.2.0" + has "^1.0.3" + side-channel "^1.0.4" + +interpret@^1.0.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.4.0.tgz#665ab8bc4da27a774a40584e812e3e0fa45b1a1e" + integrity sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA== + +invert-kv@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" + integrity sha512-xgs2NH9AE66ucSq4cNG1nhSFghr5l6tdL15Pk+jl46bmmBapgoaY/AacXyaDznAqmGL99TiLSQgO/XazFSKYeQ== + +io-ts@1.10.4: + version "1.10.4" + resolved "https://registry.yarnpkg.com/io-ts/-/io-ts-1.10.4.tgz#cd5401b138de88e4f920adbcb7026e2d1967e6e2" + integrity sha512-b23PteSnYXSONJ6JQXRAlvJhuw8KOtkqa87W4wDtvMrud/DTJd5X+NpOOI+O/zZwVq6v0VLAaJ+1EDViKEuN9g== + dependencies: + fp-ts "^1.0.0" + +ipaddr.js@1.9.1: + version "1.9.1" + resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" + integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== + +is-arguments@^1.0.4: + version "1.1.1" + resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.1.1.tgz#15b3f88fda01f2a97fec84ca761a560f123efa9b" + integrity sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA== + dependencies: + call-bind "^1.0.2" + has-tostringtag "^1.0.0" + +is-array-buffer@^3.0.1, is-array-buffer@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/is-array-buffer/-/is-array-buffer-3.0.2.tgz#f2653ced8412081638ecb0ebbd0c41c6e0aecbbe" + integrity sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.2.0" + is-typed-array "^1.1.10" + +is-arrayish@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + integrity sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg== + +is-bigint@^1.0.1: + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.4.tgz#08147a1875bc2b32005d41ccd8291dffc6691df3" + integrity sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg== + dependencies: + has-bigints "^1.0.1" + +is-binary-path@~2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" + integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== + dependencies: + binary-extensions "^2.0.0" + +is-boolean-object@^1.1.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.1.2.tgz#5c6dc200246dd9321ae4b885a114bb1f75f63719" + integrity sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA== + dependencies: + call-bind "^1.0.2" + has-tostringtag "^1.0.0" + +is-buffer@^2.0.5, is-buffer@~2.0.3: + version "2.0.5" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.5.tgz#ebc252e400d22ff8d77fa09888821a24a658c191" + integrity sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ== + +is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055" + integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== + +is-core-module@^2.11.0: + version "2.12.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.12.0.tgz#36ad62f6f73c8253fd6472517a12483cf03e7ec4" + integrity sha512-RECHCBCd/viahWmwj6enj19sKbHfJrddi/6cBDsNTKbNq0f7VeaUkBo60BqzvPqo/W54ChS62Z5qyun7cfOMqQ== + dependencies: + has "^1.0.3" + +is-date-object@^1.0.1: + version "1.0.5" + resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.5.tgz#0841d5536e724c25597bf6ea62e1bd38298df31f" + integrity sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ== + dependencies: + has-tostringtag "^1.0.0" + +is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== + +is-fullwidth-code-point@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" + integrity sha512-1pqUqRjkhPJ9miNq9SwMfdvi6lBJcd6eFxvfaivQhaH3SgisfiuudvFntdKOmxuee/77l+FPjKrQjWvmPjWrRw== + dependencies: + number-is-nan "^1.0.0" + +is-fullwidth-code-point@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" + integrity sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w== + +is-fullwidth-code-point@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" + integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== + +is-function@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-function/-/is-function-1.0.2.tgz#4f097f30abf6efadac9833b17ca5dc03f8144e08" + integrity sha512-lw7DUp0aWXYg+CBCN+JKkcE0Q2RayZnSvnZBlwgxHBQhqt5pZNVy4Ri7H9GmmXkdu7LUthszM+Tor1u/2iBcpQ== + +is-generator-function@^1.0.7: + version "1.0.10" + resolved "https://registry.yarnpkg.com/is-generator-function/-/is-generator-function-1.0.10.tgz#f1558baf1ac17e0deea7c0415c438351ff2b3c72" + integrity sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A== + dependencies: + has-tostringtag "^1.0.0" + +is-glob@^4.0.1, is-glob@~4.0.1: + version "4.0.3" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" + integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== + dependencies: + is-extglob "^2.1.1" + +is-hex-prefixed@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz#7d8d37e6ad77e5d127148913c573e082d777f554" + integrity sha512-WvtOiug1VFrE9v1Cydwm+FnXd3+w9GaeVUss5W4v/SLy3UW00vP+6iNF2SdnfiBoLy4bTqVdkftNGTUeOFVsbA== + +is-lower-case@^1.1.0: + version "1.1.3" + resolved "https://registry.yarnpkg.com/is-lower-case/-/is-lower-case-1.1.3.tgz#7e147be4768dc466db3bfb21cc60b31e6ad69393" + integrity sha512-+5A1e/WJpLLXZEDlgz4G//WYSHyQBD32qa4Jd3Lw06qQlv3fJHnp3YIHjTQSGzHMgzmVKz2ZP3rBxTHkPw/lxA== + dependencies: + lower-case "^1.1.0" + +is-negative-zero@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.2.tgz#7bf6f03a28003b8b3965de3ac26f664d765f3150" + integrity sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA== + +is-number-object@^1.0.4: + version "1.0.7" + resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.7.tgz#59d50ada4c45251784e9904f5246c742f07a42fc" + integrity sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ== + dependencies: + has-tostringtag "^1.0.0" + +is-number@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== + +is-plain-obj@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287" + integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA== + +is-regex@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958" + integrity sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg== + dependencies: + call-bind "^1.0.2" + has-tostringtag "^1.0.0" + +is-shared-array-buffer@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz#8f259c573b60b6a32d4058a1a07430c0a7344c79" + integrity sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA== + dependencies: + call-bind "^1.0.2" + +is-string@^1.0.5, is-string@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.7.tgz#0dd12bf2006f255bb58f695110eff7491eebc0fd" + integrity sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg== + dependencies: + has-tostringtag "^1.0.0" + +is-symbol@^1.0.2, is-symbol@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.4.tgz#a6dac93b635b063ca6872236de88910a57af139c" + integrity sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg== + dependencies: + has-symbols "^1.0.2" + +is-typed-array@^1.1.10, is-typed-array@^1.1.3, is-typed-array@^1.1.9: + version "1.1.10" + resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.10.tgz#36a5b5cb4189b575d1a3e4b08536bfb485801e3f" + integrity sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A== + dependencies: + available-typed-arrays "^1.0.5" + call-bind "^1.0.2" + for-each "^0.3.3" + gopd "^1.0.1" + has-tostringtag "^1.0.0" + +is-typedarray@^1.0.0, is-typedarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" + integrity sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA== + +is-unicode-supported@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7" + integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw== + +is-upper-case@^1.1.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/is-upper-case/-/is-upper-case-1.1.2.tgz#8d0b1fa7e7933a1e58483600ec7d9661cbaf756f" + integrity sha512-GQYSJMgfeAmVwh9ixyk888l7OIhNAGKtY6QA+IrWlu9MDTCaXmeozOZ2S9Knj7bQwBO/H6J2kb+pbyTUiMNbsw== + dependencies: + upper-case "^1.1.0" + +is-utf8@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" + integrity sha512-rMYPYvCzsXywIsldgLaSoPlw5PfoB/ssr7hY4pLfcodrA5M/eArza1a9VmTiNIBNMjOGr1Ow9mTyU2o69U6U9Q== + +is-weakref@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-weakref/-/is-weakref-1.0.2.tgz#9529f383a9338205e89765e0392efc2f100f06f2" + integrity sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ== + dependencies: + call-bind "^1.0.2" + +isarray@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.5.tgz#8af1e4c1221244cc62459faf38940d4e644a5723" + integrity sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw== + +isarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + integrity sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ== + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== + +isstream@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" + integrity sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g== + +js-sdsl@^4.1.4: + version "4.4.0" + resolved "https://registry.yarnpkg.com/js-sdsl/-/js-sdsl-4.4.0.tgz#8b437dbe642daa95760400b602378ed8ffea8430" + integrity sha512-FfVSdx6pJ41Oa+CF7RDaFmTnCaFhua+SNYQX74riGOpl96x+2jQCqEfQ2bnXu/5DPCqlRuiqyvTJM0Qjz26IVg== + +js-sha3@0.5.5: + version "0.5.5" + resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.5.5.tgz#baf0c0e8c54ad5903447df96ade7a4a1bca79a4a" + integrity sha512-yLLwn44IVeunwjpDVTDZmQeVbB0h+dZpY2eO68B/Zik8hu6dH+rKeLxwua79GGIvW6xr8NBAcrtiUbYrTjEFTA== + +js-sha3@0.5.7, js-sha3@^0.5.7: + version "0.5.7" + resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.5.7.tgz#0d4ffd8002d5333aabaf4a23eed2f6374c9f28e7" + integrity sha512-GII20kjaPX0zJ8wzkTbNDYMY7msuZcTWk8S5UOh6806Jq/wz1J8/bnr8uGU0DAUmYDjj2Mr4X1cW8v/GLYnR+g== + +js-sha3@0.8.0, js-sha3@^0.8.0: + version "0.8.0" + resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.8.0.tgz#b9b7a5da73afad7dedd0f8c463954cbde6818840" + integrity sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q== + +js-yaml@3.13.1: + version "3.13.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847" + integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw== + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + +js-yaml@3.x: + version "3.14.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" + integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + +js-yaml@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" + integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== + dependencies: + argparse "^2.0.1" + +jsbn@~0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" + integrity sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg== + +json-buffer@3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13" + integrity sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ== + +json-schema-traverse@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" + integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== + +json-schema-traverse@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2" + integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug== + +json-schema@0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.4.0.tgz#f7de4cf6efab838ebaeb3236474cbba5a1930ab5" + integrity sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA== + +json-stringify-safe@~5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" + integrity sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA== + +jsonfile@^2.1.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-2.4.0.tgz#3736a2b428b87bbda0cc83b53fa3d633a35c2ae8" + integrity sha512-PKllAqbgLgxHaj8TElYymKCAgrASebJrWpTnEkOaTowt23VKXXN0sUeriJ+eh7y6ufb/CC5ap11pz71/cM0hUw== + optionalDependencies: + graceful-fs "^4.1.6" + +jsonfile@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" + integrity sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg== + optionalDependencies: + graceful-fs "^4.1.6" + +jsonfile@^6.0.1: + version "6.1.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae" + integrity sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ== + dependencies: + universalify "^2.0.0" + optionalDependencies: + graceful-fs "^4.1.6" + +jsonschema@^1.2.4: + version "1.4.1" + resolved "https://registry.yarnpkg.com/jsonschema/-/jsonschema-1.4.1.tgz#cc4c3f0077fb4542982973d8a083b6b34f482dab" + integrity sha512-S6cATIPVv1z0IlxdN+zUk5EPjkGCdnhN4wVSBlvoUO1tOLJootbo9CquNJmbIh4yikWHiUedhRYrNPn1arpEmQ== + +jsprim@^1.2.2: + version "1.4.2" + resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.2.tgz#712c65533a15c878ba59e9ed5f0e26d5b77c5feb" + integrity sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw== + dependencies: + assert-plus "1.0.0" + extsprintf "1.3.0" + json-schema "0.4.0" + verror "1.10.0" + +keccak@^3.0.0, keccak@^3.0.2: + version "3.0.3" + resolved "https://registry.yarnpkg.com/keccak/-/keccak-3.0.3.tgz#4bc35ad917be1ef54ff246f904c2bbbf9ac61276" + integrity sha512-JZrLIAJWuZxKbCilMpNz5Vj7Vtb4scDG3dMXLOsbzBmQGyjwE61BbW7bJkfKKCShXiQZt3T6sBgALRtmd+nZaQ== + dependencies: + node-addon-api "^2.0.0" + node-gyp-build "^4.2.0" + readable-stream "^3.6.0" + +keyv@^4.0.0: + version "4.5.2" + resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.2.tgz#0e310ce73bf7851ec702f2eaf46ec4e3805cce56" + integrity sha512-5MHbFaKn8cNSmVW7BYnijeAVlE4cYA/SVkifVgrh7yotnfhKmjuXpDKjrABLnT0SfHWV21P8ow07OGfRrNDg8g== + dependencies: + json-buffer "3.0.1" + +kind-of@^6.0.2: + version "6.0.3" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" + integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== + +klaw@^1.0.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/klaw/-/klaw-1.3.1.tgz#4088433b46b3b1ba259d78785d8e96f73ba02439" + integrity sha512-TED5xi9gGQjGpNnvRWknrwAB1eL5GciPfVFOt3Vk1OJCVDQbzuSfrF3hkUQKlsgKrG1F+0t5W0m+Fje1jIt8rw== + optionalDependencies: + graceful-fs "^4.1.9" + +lcid@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" + integrity sha512-YiGkH6EnGrDGqLMITnGjXtGmNtjoXw9SVUzcaos8RBi7Ps0VBylkq+vOcY9QE5poLasPCR849ucFUkl0UzUyOw== + dependencies: + invert-kv "^1.0.0" + +level-supports@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/level-supports/-/level-supports-4.0.1.tgz#431546f9d81f10ff0fea0e74533a0e875c08c66a" + integrity sha512-PbXpve8rKeNcZ9C1mUicC9auIYFyGpkV9/i6g76tLgANwWhtG2v7I4xNBUlkn3lE2/dZF3Pi0ygYGtLc4RXXdA== + +level-transcoder@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/level-transcoder/-/level-transcoder-1.0.1.tgz#f8cef5990c4f1283d4c86d949e73631b0bc8ba9c" + integrity sha512-t7bFwFtsQeD8cl8NIoQ2iwxA0CL/9IFw7/9gAjOonH0PWTTiRfY7Hq+Ejbsxh86tXobDQ6IOiddjNYIfOBs06w== + dependencies: + buffer "^6.0.3" + module-error "^1.0.1" + +level@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/level/-/level-8.0.0.tgz#41b4c515dabe28212a3e881b61c161ffead14394" + integrity sha512-ypf0jjAk2BWI33yzEaaotpq7fkOPALKAgDBxggO6Q9HGX2MRXn0wbP1Jn/tJv1gtL867+YOjOB49WaUF3UoJNQ== + dependencies: + browser-level "^1.0.1" + classic-level "^1.2.0" + +levn@~0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" + integrity sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA== + dependencies: + prelude-ls "~1.1.2" + type-check "~0.3.2" + +load-json-file@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" + integrity sha512-cy7ZdNRXdablkXYNI049pthVeXFurRyb9+hA/dZzerZ0pGTx42z+y+ssxBaVV2l70t1muq5IdKhn4UtcoGUY9A== + dependencies: + graceful-fs "^4.1.2" + parse-json "^2.2.0" + pify "^2.0.0" + pinkie-promise "^2.0.0" + strip-bom "^2.0.0" + +locate-path@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" + integrity sha512-NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA== + dependencies: + p-locate "^2.0.0" + path-exists "^3.0.0" + +locate-path@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" + integrity sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A== + dependencies: + p-locate "^3.0.0" + path-exists "^3.0.0" + +locate-path@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" + integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== + dependencies: + p-locate "^4.1.0" + +locate-path@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" + integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== + dependencies: + p-locate "^5.0.0" + +lodash.assign@^4.0.3, lodash.assign@^4.0.6: + version "4.2.0" + resolved "https://registry.yarnpkg.com/lodash.assign/-/lodash.assign-4.2.0.tgz#0d99f3ccd7a6d261d19bdaeb9245005d285808e7" + integrity sha512-hFuH8TY+Yji7Eja3mGiuAxBqLagejScbG8GbG0j6o9vzn0YL14My+ktnqtZgFTosKymC9/44wP6s7xyuLfnClw== + +lodash.camelcase@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" + integrity sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA== + +lodash.flatten@^4.4.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/lodash.flatten/-/lodash.flatten-4.4.0.tgz#f31c22225a9632d2bbf8e4addbef240aa765a61f" + integrity sha512-C5N2Z3DgnnKr0LOpv/hKCgKdb7ZZwafIrsesve6lmzvZIRZRGaZ/l6Q8+2W7NaT+ZwO3fFlSCzCzrDCFdJfZ4g== + +lodash.merge@^4.6.2: + version "4.6.2" + resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" + integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== + +lodash.truncate@^4.4.2: + version "4.4.2" + resolved "https://registry.yarnpkg.com/lodash.truncate/-/lodash.truncate-4.4.2.tgz#5a350da0b1113b837ecfffd5812cbe58d6eae193" + integrity sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw== + +lodash@^4.17.11, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.16, lodash@^4.17.19, lodash@^4.17.21: + version "4.17.21" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" + integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== + +log-symbols@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-3.0.0.tgz#f3a08516a5dea893336a7dee14d18a1cfdab77c4" + integrity sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ== + dependencies: + chalk "^2.4.2" + +log-symbols@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.1.0.tgz#3fbdbb95b4683ac9fc785111e792e558d4abd503" + integrity sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg== + dependencies: + chalk "^4.1.0" + is-unicode-supported "^0.1.0" + +loupe@^2.3.1: + version "2.3.6" + resolved "https://registry.yarnpkg.com/loupe/-/loupe-2.3.6.tgz#76e4af498103c532d1ecc9be102036a21f787b53" + integrity sha512-RaPMZKiMy8/JruncMU5Bt6na1eftNoo++R4Y+N2FrxkDVTrGvcyzFTsaGif4QTeKESheMGegbhw6iUAq+5A8zA== + dependencies: + get-func-name "^2.0.0" + +lower-case-first@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/lower-case-first/-/lower-case-first-1.0.2.tgz#e5da7c26f29a7073be02d52bac9980e5922adfa1" + integrity sha512-UuxaYakO7XeONbKrZf5FEgkantPf5DUqDayzP5VXZrtRPdH86s4kN47I8B3TW10S4QKiE3ziHNf3kRN//okHjA== + dependencies: + lower-case "^1.1.2" + +lower-case@^1.1.0, lower-case@^1.1.1, lower-case@^1.1.2: + version "1.1.4" + resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-1.1.4.tgz#9a2cabd1b9e8e0ae993a4bf7d5875c39c42e8eac" + integrity sha512-2Fgx1Ycm599x+WGpIYwJOvsjmXFzTSc34IwDWALRA/8AopUKAVPwfJ+h5+f85BCp0PWmmJcWzEpxOpoXycMpdA== + +lowercase-keys@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-2.0.0.tgz#2603e78b7b4b0006cbca2fbcc8a3202558ac9479" + integrity sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA== + +lowercase-keys@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-3.0.0.tgz#c5e7d442e37ead247ae9db117a9d0a467c89d4f2" + integrity sha512-ozCC6gdQ+glXOQsveKD0YsDy8DSQFjDTz4zyzEHNV5+JP5D62LmfDZ6o1cycFx9ouG940M5dE8C8CTewdj2YWQ== + +lru-cache@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" + integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== + dependencies: + yallist "^3.0.2" + +lru-cache@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" + integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== + dependencies: + yallist "^4.0.0" + +lru_map@^0.3.3: + version "0.3.3" + resolved "https://registry.yarnpkg.com/lru_map/-/lru_map-0.3.3.tgz#b5c8351b9464cbd750335a79650a0ec0e56118dd" + integrity sha512-Pn9cox5CsMYngeDbmChANltQl+5pi6XmTrraMSzhPmMBbmgcxmqWry0U3PGapCU1yB4/LqCcom7qhHZiF/jGfQ== + +make-error@^1.1.1: + version "1.3.6" + resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" + integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== + +markdown-table@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/markdown-table/-/markdown-table-1.1.3.tgz#9fcb69bcfdb8717bfd0398c6ec2d93036ef8de60" + integrity sha512-1RUZVgQlpJSPWYbFSpmudq5nHY1doEIv89gBtF0s4gW1GF2XorxcA/70M5vq7rLv0a6mhOUccRsqkwhwLCIQ2Q== + +match-all@^1.2.6: + version "1.2.6" + resolved "https://registry.yarnpkg.com/match-all/-/match-all-1.2.6.tgz#66d276ad6b49655551e63d3a6ee53e8be0566f8d" + integrity sha512-0EESkXiTkWzrQQntBu2uzKvLu6vVkUGz40nGPbSZuegcfE5UuSzNjLaIu76zJWuaT/2I3Z/8M06OlUOZLGwLlQ== + +mcl-wasm@^0.7.1: + version "0.7.9" + resolved "https://registry.yarnpkg.com/mcl-wasm/-/mcl-wasm-0.7.9.tgz#c1588ce90042a8700c3b60e40efb339fc07ab87f" + integrity sha512-iJIUcQWA88IJB/5L15GnJVnSQJmf/YaxxV6zRavv83HILHaJQb6y0iFyDMdDO0gN8X37tdxmAOrH/P8B6RB8sQ== + +md5.js@^1.3.4: + version "1.3.5" + resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.5.tgz#b5d07b8e3216e3e27cd728d72f70d1e6a342005f" + integrity sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg== + dependencies: + hash-base "^3.0.0" + inherits "^2.0.1" + safe-buffer "^5.1.2" + +media-typer@0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" + integrity sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ== + +memory-level@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/memory-level/-/memory-level-1.0.0.tgz#7323c3fd368f9af2f71c3cd76ba403a17ac41692" + integrity sha512-UXzwewuWeHBz5krr7EvehKcmLFNoXxGcvuYhC41tRnkrTbJohtS7kVn9akmgirtRygg+f7Yjsfi8Uu5SGSQ4Og== + dependencies: + abstract-level "^1.0.0" + functional-red-black-tree "^1.0.1" + module-error "^1.0.1" + +memorystream@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/memorystream/-/memorystream-0.3.1.tgz#86d7090b30ce455d63fbae12dda51a47ddcaf9b2" + integrity sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw== + +merge-descriptors@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" + integrity sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w== + +merge2@^1.2.3, merge2@^1.3.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" + integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== + +methods@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" + integrity sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w== + +micromatch@^4.0.4: + version "4.0.5" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" + integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== + dependencies: + braces "^3.0.2" + picomatch "^2.3.1" + +mime-db@1.52.0: + version "1.52.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" + integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== + +mime-types@^2.1.12, mime-types@^2.1.16, mime-types@~2.1.19, mime-types@~2.1.24, mime-types@~2.1.34: + version "2.1.35" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" + integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== + dependencies: + mime-db "1.52.0" + +mime@1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" + integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== + +mimic-response@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.1.tgz#4923538878eef42063cb8a3e3b0798781487ab1b" + integrity sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ== + +mimic-response@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-3.1.0.tgz#2d1d59af9c1b129815accc2c46a022a5ce1fa3c9" + integrity sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ== + +min-document@^2.19.0: + version "2.19.0" + resolved "https://registry.yarnpkg.com/min-document/-/min-document-2.19.0.tgz#7bd282e3f5842ed295bb748cdd9f1ffa2c824685" + integrity sha512-9Wy1B3m3f66bPPmU5hdA4DR4PB2OfDU/+GS3yAB7IQozE3tqXaVv2zOjgla7MEGSRv95+ILmOuvhLkOK6wJtCQ== + dependencies: + dom-walk "^0.1.0" + +minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" + integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== + +minimalistic-crypto-utils@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" + integrity sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg== + +"minimatch@2 || 3", minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1: + version "3.1.2" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" + integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== + dependencies: + brace-expansion "^1.1.7" + +minimatch@3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== + dependencies: + brace-expansion "^1.1.7" + +minimatch@5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.0.1.tgz#fb9022f7528125187c92bd9e9b6366be1cf3415b" + integrity sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g== + dependencies: + brace-expansion "^2.0.1" + +minimist@^1.2.0, minimist@^1.2.5, minimist@^1.2.6: + version "1.2.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" + integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== + +minipass@^2.6.0, minipass@^2.9.0: + version "2.9.0" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.9.0.tgz#e713762e7d3e32fed803115cf93e04bca9fcc9a6" + integrity sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg== + dependencies: + safe-buffer "^5.1.2" + yallist "^3.0.0" + +minizlib@^1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.3.3.tgz#2290de96818a34c29551c8a8d301216bd65a861d" + integrity sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q== + dependencies: + minipass "^2.9.0" + +mkdirp-promise@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/mkdirp-promise/-/mkdirp-promise-5.0.1.tgz#e9b8f68e552c68a9c1713b84883f7a1dd039b8a1" + integrity sha512-Hepn5kb1lJPtVW84RFT40YG1OddBNTOVUZR2bzQUHc+Z03en8/3uX0+060JDhcEzyO08HmipsN9DcnFMxhIL9w== + dependencies: + mkdirp "*" + +mkdirp@*: + version "3.0.1" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-3.0.1.tgz#e44e4c5607fb279c168241713cc6e0fea9adcb50" + integrity sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg== + +mkdirp@0.5.5: + version "0.5.5" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" + integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== + dependencies: + minimist "^1.2.5" + +mkdirp@0.5.x, mkdirp@^0.5.5: + version "0.5.6" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.6.tgz#7def03d2432dcae4ba1d611445c48396062255f6" + integrity sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw== + dependencies: + minimist "^1.2.6" + +mkdirp@^1.0.3, mkdirp@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" + integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== + +mnemonist@^0.38.0: + version "0.38.5" + resolved "https://registry.yarnpkg.com/mnemonist/-/mnemonist-0.38.5.tgz#4adc7f4200491237fe0fa689ac0b86539685cade" + integrity sha512-bZTFT5rrPKtPJxj8KSV0WkPyNxl72vQepqqVUAW2ARUpUSF2qXMB6jZj7hW5/k7C1rtpzqbD/IIbJwLXUjCHeg== + dependencies: + obliterator "^2.0.0" + +mocha@7.1.2: + version "7.1.2" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-7.1.2.tgz#8e40d198acf91a52ace122cd7599c9ab857b29e6" + integrity sha512-o96kdRKMKI3E8U0bjnfqW4QMk12MwZ4mhdBTf+B5a1q9+aq2HRnj+3ZdJu0B/ZhJeK78MgYuv6L8d/rA5AeBJA== + dependencies: + ansi-colors "3.2.3" + browser-stdout "1.3.1" + chokidar "3.3.0" + debug "3.2.6" + diff "3.5.0" + escape-string-regexp "1.0.5" + find-up "3.0.0" + glob "7.1.3" + growl "1.10.5" + he "1.2.0" + js-yaml "3.13.1" + log-symbols "3.0.0" + minimatch "3.0.4" + mkdirp "0.5.5" + ms "2.1.1" + node-environment-flags "1.0.6" + object.assign "4.1.0" + strip-json-comments "2.0.1" + supports-color "6.0.0" + which "1.3.1" + wide-align "1.1.3" + yargs "13.3.2" + yargs-parser "13.1.2" + yargs-unparser "1.6.0" + +mocha@^10.0.0: + version "10.2.0" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-10.2.0.tgz#1fd4a7c32ba5ac372e03a17eef435bd00e5c68b8" + integrity sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg== + dependencies: + ansi-colors "4.1.1" + browser-stdout "1.3.1" + chokidar "3.5.3" + debug "4.3.4" + diff "5.0.0" + escape-string-regexp "4.0.0" + find-up "5.0.0" + glob "7.2.0" + he "1.2.0" + js-yaml "4.1.0" + log-symbols "4.1.0" + minimatch "5.0.1" + ms "2.1.3" + nanoid "3.3.3" + serialize-javascript "6.0.0" + strip-json-comments "3.1.1" + supports-color "8.1.1" + workerpool "6.2.1" + yargs "16.2.0" + yargs-parser "20.2.4" + yargs-unparser "2.0.0" + +mocha@^7.1.1: + version "7.2.0" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-7.2.0.tgz#01cc227b00d875ab1eed03a75106689cfed5a604" + integrity sha512-O9CIypScywTVpNaRrCAgoUnJgozpIofjKUYmJhiCIJMiuYnLI6otcb1/kpW9/n/tJODHGZ7i8aLQoDVsMtOKQQ== + dependencies: + ansi-colors "3.2.3" + browser-stdout "1.3.1" + chokidar "3.3.0" + debug "3.2.6" + diff "3.5.0" + escape-string-regexp "1.0.5" + find-up "3.0.0" + glob "7.1.3" + growl "1.10.5" + he "1.2.0" + js-yaml "3.13.1" + log-symbols "3.0.0" + minimatch "3.0.4" + mkdirp "0.5.5" + ms "2.1.1" + node-environment-flags "1.0.6" + object.assign "4.1.0" + strip-json-comments "2.0.1" + supports-color "6.0.0" + which "1.3.1" + wide-align "1.1.3" + yargs "13.3.2" + yargs-parser "13.1.2" + yargs-unparser "1.6.0" + +mock-fs@^4.1.0: + version "4.14.0" + resolved "https://registry.yarnpkg.com/mock-fs/-/mock-fs-4.14.0.tgz#ce5124d2c601421255985e6e94da80a7357b1b18" + integrity sha512-qYvlv/exQ4+svI3UOvPUpLDF0OMX5euvUH0Ny4N5QyRyhNdgAgUrVH3iUINSzEPLvx0kbo/Bp28GJKIqvE7URw== + +module-error@^1.0.1, module-error@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/module-error/-/module-error-1.0.2.tgz#8d1a48897ca883f47a45816d4fb3e3c6ba404d86" + integrity sha512-0yuvsqSCv8LbaOKhnsQ/T5JhyFlCYLPXK3U2sgV10zoKQwzs/MyfuQUOZQ1V/6OCOJsK/TRgNVrPuPDqtdMFtA== + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + integrity sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A== + +ms@2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" + integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg== + +ms@2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== + +ms@2.1.3, ms@^2.1.1: + version "2.1.3" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== + +multibase@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/multibase/-/multibase-0.7.0.tgz#1adfc1c50abe05eefeb5091ac0c2728d6b84581b" + integrity sha512-TW8q03O0f6PNFTQDvh3xxH03c8CjGaaYrjkl9UQPG6rz53TQzzxJVCIWVjzcbN/Q5Y53Zd0IBQBMVktVgNx4Fg== + dependencies: + base-x "^3.0.8" + buffer "^5.5.0" + +multibase@~0.6.0: + version "0.6.1" + resolved "https://registry.yarnpkg.com/multibase/-/multibase-0.6.1.tgz#b76df6298536cc17b9f6a6db53ec88f85f8cc12b" + integrity sha512-pFfAwyTjbbQgNc3G7D48JkJxWtoJoBMaR4xQUOuB8RnCgRqaYmWNFeJTTvrJ2w51bjLq2zTby6Rqj9TQ9elSUw== + dependencies: + base-x "^3.0.8" + buffer "^5.5.0" + +multicodec@^0.5.5: + version "0.5.7" + resolved "https://registry.yarnpkg.com/multicodec/-/multicodec-0.5.7.tgz#1fb3f9dd866a10a55d226e194abba2dcc1ee9ffd" + integrity sha512-PscoRxm3f+88fAtELwUnZxGDkduE2HD9Q6GHUOywQLjOGT/HAdhjLDYNZ1e7VR0s0TP0EwZ16LNUTFpoBGivOA== + dependencies: + varint "^5.0.0" + +multicodec@^1.0.0: + version "1.0.4" + resolved "https://registry.yarnpkg.com/multicodec/-/multicodec-1.0.4.tgz#46ac064657c40380c28367c90304d8ed175a714f" + integrity sha512-NDd7FeS3QamVtbgfvu5h7fd1IlbaC4EQ0/pgU4zqE2vdHCmBGsUa0TiM8/TdSeG6BMPC92OOCf8F1ocE/Wkrrg== + dependencies: + buffer "^5.6.0" + varint "^5.0.0" + +multihashes@^0.4.15, multihashes@~0.4.15: + version "0.4.21" + resolved "https://registry.yarnpkg.com/multihashes/-/multihashes-0.4.21.tgz#dc02d525579f334a7909ade8a122dabb58ccfcb5" + integrity sha512-uVSvmeCWf36pU2nB4/1kzYZjsXD9vofZKpgudqkceYY5g2aZZXJ5r9lxuzoRLl1OAp28XljXsEJ/X/85ZsKmKw== + dependencies: + buffer "^5.5.0" + multibase "^0.7.0" + varint "^5.0.0" + +murmur-128@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/murmur-128/-/murmur-128-0.2.1.tgz#a9f6568781d2350ecb1bf80c14968cadbeaa4b4d" + integrity sha512-WseEgiRkI6aMFBbj8Cg9yBj/y+OdipwVC7zUo3W2W1JAJITwouUOtpqsmGSg67EQmwwSyod7hsVsWY5LsrfQVg== + dependencies: + encode-utf8 "^1.0.2" + fmix "^0.1.0" + imul "^1.0.0" + +nano-base32@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/nano-base32/-/nano-base32-1.0.1.tgz#ba548c879efcfb90da1c4d9e097db4a46c9255ef" + integrity sha512-sxEtoTqAPdjWVGv71Q17koMFGsOMSiHsIFEvzOM7cNp8BXB4AnEwmDabm5dorusJf/v1z7QxaZYxUorU9RKaAw== + +nano-json-stream-parser@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/nano-json-stream-parser/-/nano-json-stream-parser-0.1.2.tgz#0cc8f6d0e2b622b479c40d499c46d64b755c6f5f" + integrity sha512-9MqxMH/BSJC7dnLsEMPyfN5Dvoo49IsPFYMcHw3Bcfc2kN0lpHRBSzlMSVx4HGyJ7s9B31CyBTVehWJoQ8Ctew== + +nanoid@3.3.3: + version "3.3.3" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.3.tgz#fd8e8b7aa761fe807dba2d1b98fb7241bb724a25" + integrity sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w== + +napi-macros@^2.2.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/napi-macros/-/napi-macros-2.2.2.tgz#817fef20c3e0e40a963fbf7b37d1600bd0201044" + integrity sha512-hmEVtAGYzVQpCKdbQea4skABsdXW4RUh5t5mJ2zzqowJS2OyXZTU1KhDVFhx+NlWZ4ap9mqR9TcDO3LTTttd+g== + +negotiator@0.6.3: + version "0.6.3" + resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd" + integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg== + +neo-async@^2.6.0: + version "2.6.2" + resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" + integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== + +next-tick@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.1.0.tgz#1836ee30ad56d67ef281b22bd199f709449b35eb" + integrity sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ== + +no-case@^2.2.0, no-case@^2.3.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/no-case/-/no-case-2.3.2.tgz#60b813396be39b3f1288a4c1ed5d1e7d28b464ac" + integrity sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ== + dependencies: + lower-case "^1.1.1" + +node-addon-api@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-2.0.2.tgz#432cfa82962ce494b132e9d72a15b29f71ff5d32" + integrity sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA== + +node-emoji@^1.10.0: + version "1.11.0" + resolved "https://registry.yarnpkg.com/node-emoji/-/node-emoji-1.11.0.tgz#69a0150e6946e2f115e9d7ea4df7971e2628301c" + integrity sha512-wo2DpQkQp7Sjm2A0cq+sN7EHKO6Sl0ctXeBdFZrL9T9+UywORbufTcTZxom8YqpLQt/FqNMUkOpkZrJVYSKD3A== + dependencies: + lodash "^4.17.21" + +node-environment-flags@1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/node-environment-flags/-/node-environment-flags-1.0.6.tgz#a30ac13621f6f7d674260a54dede048c3982c088" + integrity sha512-5Evy2epuL+6TM0lCQGpFIj6KwiEsGh1SrHUhTbNX+sLbBtjidPZFAnVK9y5yU1+h//RitLbRHTIMyxQPtxMdHw== + dependencies: + object.getownpropertydescriptors "^2.0.3" + semver "^5.7.0" + +node-fetch@2.6.7: + version "2.6.7" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad" + integrity sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ== + dependencies: + whatwg-url "^5.0.0" + +node-gyp-build@^4.2.0, node-gyp-build@^4.3.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.6.0.tgz#0c52e4cbf54bbd28b709820ef7b6a3c2d6209055" + integrity sha512-NTZVKn9IylLwUzaKjkas1e4u2DLNcV4rdYagA4PWdPwW87Bi7z+BznyKSRwS/761tV/lzCGXplWsiaMjLqP2zQ== + +nofilter@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/nofilter/-/nofilter-1.0.4.tgz#78d6f4b6a613e7ced8b015cec534625f7667006e" + integrity sha512-N8lidFp+fCz+TD51+haYdbDGrcBWwuHX40F5+z0qkUjMJ5Tp+rdSuAkMJ9N9eoolDlEVTf6u5icM+cNKkKW2mA== + +nofilter@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/nofilter/-/nofilter-3.1.0.tgz#c757ba68801d41ff930ba2ec55bab52ca184aa66" + integrity sha512-l2NNj07e9afPnhAhvgVrCD/oy2Ai1yfLpuo3EpiO1jFTsB4sFz6oIfAfSZyQzVpkZQ9xS8ZS5g1jCBgq4Hwo0g== + +nopt@3.x: + version "3.0.6" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9" + integrity sha512-4GUt3kSEYmk4ITxzB/b9vaIDfUVWN/Ml1Fwl11IlnIG2iaJ9O6WXZ9SrYM9NLI8OCBieN2Y8SWC2oJV0RQ7qYg== + dependencies: + abbrev "1" + +normalize-package-data@^2.3.2: + version "2.5.0" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" + integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA== + dependencies: + hosted-git-info "^2.1.4" + resolve "^1.10.0" + semver "2 || 3 || 4 || 5" + validate-npm-package-license "^3.0.1" + +normalize-path@^3.0.0, normalize-path@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" + integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== + +normalize-url@^6.0.1: + version "6.1.0" + resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-6.1.0.tgz#40d0885b535deffe3f3147bec877d05fe4c5668a" + integrity sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A== + +nth-check@^2.0.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-2.1.1.tgz#c9eab428effce36cd6b92c924bdb000ef1f1ed1d" + integrity sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w== + dependencies: + boolbase "^1.0.0" + +number-is-nan@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" + integrity sha512-4jbtZXNAsfZbAHiiqjLPBiCl16dES1zI4Hpzzxw61Tk+loF+sBDBKx1ICKKKwIqQ7M0mFn1TmkN7euSncWgHiQ== + +number-to-bn@1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/number-to-bn/-/number-to-bn-1.7.0.tgz#bb3623592f7e5f9e0030b1977bd41a0c53fe1ea0" + integrity sha512-wsJ9gfSz1/s4ZsJN01lyonwuxA1tml6X1yBDnfpMglypcBRFZZkus26EdPSlqS5GJfYddVZa22p3VNb3z5m5Ig== + dependencies: + bn.js "4.11.6" + strip-hex-prefix "1.0.0" + +oauth-sign@~0.9.0: + version "0.9.0" + resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" + integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== + +object-assign@^4, object-assign@^4.1.0, object-assign@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== + +object-inspect@^1.12.3, object-inspect@^1.9.0: + version "1.12.3" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.3.tgz#ba62dffd67ee256c8c086dfae69e016cd1f198b9" + integrity sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g== + +object-keys@^1.0.11, object-keys@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" + integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== + +object.assign@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.0.tgz#968bf1100d7956bb3ca086f006f846b3bc4008da" + integrity sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w== + dependencies: + define-properties "^1.1.2" + function-bind "^1.1.1" + has-symbols "^1.0.0" + object-keys "^1.0.11" + +object.assign@^4.1.4: + version "4.1.4" + resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.4.tgz#9673c7c7c351ab8c4d0b516f4343ebf4dfb7799f" + integrity sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.4" + has-symbols "^1.0.3" + object-keys "^1.1.1" + +object.getownpropertydescriptors@^2.0.3: + version "2.1.6" + resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.6.tgz#5e5c384dd209fa4efffead39e3a0512770ccc312" + integrity sha512-lq+61g26E/BgHv0ZTFgRvi7NMEPuAxLkFU7rukXjc/AlwH4Am5xXVnIXy3un1bg/JPbXHrixRkK1itUzzPiIjQ== + dependencies: + array.prototype.reduce "^1.0.5" + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.21.2" + safe-array-concat "^1.0.0" + +obliterator@^2.0.0: + version "2.0.4" + resolved "https://registry.yarnpkg.com/obliterator/-/obliterator-2.0.4.tgz#fa650e019b2d075d745e44f1effeb13a2adbe816" + integrity sha512-lgHwxlxV1qIg1Eap7LgIeoBWIMFibOjbrYPIPJZcI1mmGAI2m3lNYpK12Y+GBdPQ0U1hRwSord7GIaawz962qQ== + +oboe@2.1.5: + version "2.1.5" + resolved "https://registry.yarnpkg.com/oboe/-/oboe-2.1.5.tgz#5554284c543a2266d7a38f17e073821fbde393cd" + integrity sha512-zRFWiF+FoicxEs3jNI/WYUrVEgA7DeET/InK0XQuudGHRg8iIob3cNPrJTKaz4004uaA9Pbe+Dwa8iluhjLZWA== + dependencies: + http-https "^1.0.0" + +on-finished@2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.4.1.tgz#58c8c44116e54845ad57f14ab10b03533184ac3f" + integrity sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg== + dependencies: + ee-first "1.1.1" + +once@1.x, once@^1.3.0, once@^1.3.1, once@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== + dependencies: + wrappy "1" + +optionator@^0.8.1: + version "0.8.3" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" + integrity sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA== + dependencies: + deep-is "~0.1.3" + fast-levenshtein "~2.0.6" + levn "~0.3.0" + prelude-ls "~1.1.2" + type-check "~0.3.2" + word-wrap "~1.2.3" + +ordinal@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/ordinal/-/ordinal-1.0.3.tgz#1a3c7726a61728112f50944ad7c35c06ae3a0d4d" + integrity sha512-cMddMgb2QElm8G7vdaa02jhUNbTSrhsgAGUz1OokD83uJTwSUn+nKoNoKVVaRa08yF6sgfO7Maou1+bgLd9rdQ== + +os-locale@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-1.4.0.tgz#20f9f17ae29ed345e8bde583b13d2009803c14d9" + integrity sha512-PRT7ZORmwu2MEFt4/fv3Q+mEfN4zetKxufQrkShY2oGvUms9r8otu5HfdyIFHkYXjO7laNsoVGmM2MANfuTA8g== + dependencies: + lcid "^1.0.0" + +os-tmpdir@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + integrity sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g== + +p-cancelable@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-2.1.1.tgz#aab7fbd416582fa32a3db49859c122487c5ed2cf" + integrity sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg== + +p-cancelable@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-3.0.0.tgz#63826694b54d61ca1c20ebcb6d3ecf5e14cd8050" + integrity sha512-mlVgR3PGuzlo0MmTdk4cXqXWlwQDLnONTAg6sm62XkMJEiRxN3GL3SffkYvqwonbkJBcrI7Uvv5Zh9yjvn2iUw== + +p-limit@^1.1.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" + integrity sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q== + dependencies: + p-try "^1.0.0" + +p-limit@^2.0.0, p-limit@^2.2.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" + integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== + dependencies: + p-try "^2.0.0" + +p-limit@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" + integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== + dependencies: + yocto-queue "^0.1.0" + +p-locate@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" + integrity sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg== + dependencies: + p-limit "^1.1.0" + +p-locate@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" + integrity sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ== + dependencies: + p-limit "^2.0.0" + +p-locate@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" + integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== + dependencies: + p-limit "^2.2.0" + +p-locate@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" + integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== + dependencies: + p-limit "^3.0.2" + +p-map@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/p-map/-/p-map-4.0.0.tgz#bb2f95a5eda2ec168ec9274e06a747c3e2904d2b" + integrity sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ== + dependencies: + aggregate-error "^3.0.0" + +p-try@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" + integrity sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww== + +p-try@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" + integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== + +param-case@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/param-case/-/param-case-2.1.1.tgz#df94fd8cf6531ecf75e6bef9a0858fbc72be2247" + integrity sha512-eQE845L6ot89sk2N8liD8HAuH4ca6Vvr7VWAWwt7+kvvG5aBcPmmphQ68JsEG2qa9n1TykS2DLeMt363AAH8/w== + dependencies: + no-case "^2.2.0" + +parse-cache-control@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/parse-cache-control/-/parse-cache-control-1.0.1.tgz#8eeab3e54fa56920fe16ba38f77fa21aacc2d74e" + integrity sha512-60zvsJReQPX5/QP0Kzfd/VrpjScIQ7SHBW6bFCYfEP+fp0Eppr1SHhIO5nd1PjZtvclzSzES9D/p5nFJurwfWg== + +parse-headers@^2.0.0: + version "2.0.5" + resolved "https://registry.yarnpkg.com/parse-headers/-/parse-headers-2.0.5.tgz#069793f9356a54008571eb7f9761153e6c770da9" + integrity sha512-ft3iAoLOB/MlwbNXgzy43SWGP6sQki2jQvAyBg/zDFAgr9bfNWZIUj42Kw2eJIl8kEi4PbgE6U1Zau/HwI75HA== + +parse-json@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" + integrity sha512-QR/GGaKCkhwk1ePQNYDRKYZ3mwU9ypsKhB0XyFnLQdomyEqk3e8wpW3V5Jp88zbxK4n5ST1nqo+g9juTpownhQ== + dependencies: + error-ex "^1.2.0" + +parse5-htmlparser2-tree-adapter@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-7.0.0.tgz#23c2cc233bcf09bb7beba8b8a69d46b08c62c2f1" + integrity sha512-B77tOZrqqfUfnVcOrUvfdLbz4pu4RopLD/4vmu3HUPswwTA8OH0EMW9BlWR2B0RCoiZRAHEUu7IxeP1Pd1UU+g== + dependencies: + domhandler "^5.0.2" + parse5 "^7.0.0" + +parse5@^7.0.0: + version "7.1.2" + resolved "https://registry.yarnpkg.com/parse5/-/parse5-7.1.2.tgz#0736bebbfd77793823240a23b7fc5e010b7f8e32" + integrity sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw== + dependencies: + entities "^4.4.0" + +parseurl@~1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" + integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== + +pascal-case@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/pascal-case/-/pascal-case-2.0.1.tgz#2d578d3455f660da65eca18ef95b4e0de912761e" + integrity sha512-qjS4s8rBOJa2Xm0jmxXiyh1+OFf6ekCWOvUaRgAQSktzlTbMotS0nmG9gyYAybCWBcuP4fsBeRCKNwGBnMe2OQ== + dependencies: + camel-case "^3.0.0" + upper-case-first "^1.1.0" + +path-case@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/path-case/-/path-case-2.1.1.tgz#94b8037c372d3fe2906e465bb45e25d226e8eea5" + integrity sha512-Ou0N05MioItesaLr9q8TtHVWmJ6fxWdqKB2RohFmNWVyJ+2zeKIeDNWAN6B/Pe7wpzWChhZX6nONYmOnMeJQ/Q== + dependencies: + no-case "^2.2.0" + +path-exists@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" + integrity sha512-yTltuKuhtNeFJKa1PiRzfLAU5182q1y4Eb4XCJ3PBqyzEDkAZRzBrKKBct682ls9reBVHf9udYLN5Nd+K1B9BQ== + dependencies: + pinkie-promise "^2.0.0" + +path-exists@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" + integrity sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ== + +path-exists@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" + integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== + +path-parse@^1.0.6, path-parse@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" + integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== + +path-to-regexp@0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" + integrity sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ== + +path-type@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" + integrity sha512-S4eENJz1pkiQn9Znv33Q+deTOKmbl+jj1Fl+qiP/vYezj+S8x+J3Uo0ISrx/QoEvIlOaDWJhPaRd1flJ9HXZqg== + dependencies: + graceful-fs "^4.1.2" + pify "^2.0.0" + pinkie-promise "^2.0.0" + +path-type@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" + integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== + +pathval@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.1.tgz#8534e77a77ce7ac5a2512ea21e0fdb8fcf6c3d8d" + integrity sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ== + +pbkdf2@^3.0.17: + version "3.1.2" + resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.1.2.tgz#dd822aa0887580e52f1a039dc3eda108efae3075" + integrity sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA== + dependencies: + create-hash "^1.1.2" + create-hmac "^1.1.4" + ripemd160 "^2.0.1" + safe-buffer "^5.0.1" + sha.js "^2.4.8" + +performance-now@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" + integrity sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow== + +picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" + integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== + +pify@^2.0.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" + integrity sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog== + +pify@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231" + integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g== + +pinkie-promise@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" + integrity sha512-0Gni6D4UcLTbv9c57DfxDGdr41XfgUjqWZu492f0cIGr16zDU06BWP/RAEvOuo7CQ0CNjHaLlM59YJJFm3NWlw== + dependencies: + pinkie "^2.0.0" + +pinkie@^2.0.0: + version "2.0.4" + resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" + integrity sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg== + +prelude-ls@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" + integrity sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w== + +prettier@^2.3.1: + version "2.8.8" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.8.tgz#e8c5d7e98a4305ffe3de2e1fc4aca1a71c28b1da" + integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q== + +process-nextick-args@~2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" + integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== + +process@^0.11.10: + version "0.11.10" + resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" + integrity sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A== + +promise@^8.0.0: + version "8.3.0" + resolved "https://registry.yarnpkg.com/promise/-/promise-8.3.0.tgz#8cb333d1edeb61ef23869fbb8a4ea0279ab60e0a" + integrity sha512-rZPNPKTOYVNEEKFaq1HqTgOwZD+4/YHS5ukLzQCypkj+OkYx7iv0mA91lJlpPPZ8vMau3IIGj5Qlwrx+8iiSmg== + dependencies: + asap "~2.0.6" + +proper-lockfile@^4.1.1: + version "4.1.2" + resolved "https://registry.yarnpkg.com/proper-lockfile/-/proper-lockfile-4.1.2.tgz#c8b9de2af6b2f1601067f98e01ac66baa223141f" + integrity sha512-TjNPblN4BwAWMXU8s9AEz4JmQxnD1NNL7bNOY/AKUzyamc379FWASUhc/K1pL2noVb+XmZKLL68cjzLsiOAMaA== + dependencies: + graceful-fs "^4.2.4" + retry "^0.12.0" + signal-exit "^3.0.2" + +proxy-addr@~2.0.7: + version "2.0.7" + resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.7.tgz#f19fe69ceab311eeb94b42e70e8c2070f9ba1025" + integrity sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg== + dependencies: + forwarded "0.2.0" + ipaddr.js "1.9.1" + +psl@^1.1.28: + version "1.9.0" + resolved "https://registry.yarnpkg.com/psl/-/psl-1.9.0.tgz#d0df2a137f00794565fcaf3b2c00cd09f8d5a5a7" + integrity sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag== + +pump@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" + integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww== + dependencies: + end-of-stream "^1.1.0" + once "^1.3.1" + +punycode@2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.0.tgz#5f863edc89b96db09074bad7947bf09056ca4e7d" + integrity sha512-Yxz2kRwT90aPiWEMHVYnEf4+rhwF1tBmmZ4KepCP+Wkium9JxtWnUm1nqGwpiAHr/tnTSeHqr3wb++jgSkXjhA== + +punycode@^2.1.0, punycode@^2.1.1: + version "2.3.0" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.0.tgz#f67fa67c94da8f4d0cfff981aee4118064199b8f" + integrity sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA== + +pure-rand@^5.0.1: + version "5.0.5" + resolved "https://registry.yarnpkg.com/pure-rand/-/pure-rand-5.0.5.tgz#bda2a7f6a1fc0f284d78d78ca5902f26f2ad35cf" + integrity sha512-BwQpbqxSCBJVpamI6ydzcKqyFmnd5msMWUGvzXLm1aXvusbbgkbOto/EUPM00hjveJEaJtdbhUjKSzWRhQVkaw== + +qs@6.11.0: + version "6.11.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.0.tgz#fd0d963446f7a65e1367e01abd85429453f0c37a" + integrity sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q== + dependencies: + side-channel "^1.0.4" + +qs@^6.4.0, qs@^6.7.0: + version "6.11.1" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.1.tgz#6c29dff97f0c0060765911ba65cbc9764186109f" + integrity sha512-0wsrzgTz/kAVIeuxSjnpGC56rzYtr6JT/2BwEvMaPhFIoYa1aGO8LbzuU1R0uUYQkLpWBTOj0l/CLAJB64J6nQ== + dependencies: + side-channel "^1.0.4" + +qs@^6.9.4: + version "6.11.2" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.2.tgz#64bea51f12c1f5da1bc01496f48ffcff7c69d7d9" + integrity sha512-tDNIz22aBzCDxLtVH++VnTfzxlfeK5CbqohpSqpJgj1Wg/cQbStNAz3NuqCs5vV+pjBsK4x4pN9HlVh7rcYRiA== + dependencies: + side-channel "^1.0.4" + +qs@~6.5.2: + version "6.5.3" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.3.tgz#3aeeffc91967ef6e35c0e488ef46fb296ab76aad" + integrity sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA== + +query-string@^5.0.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/query-string/-/query-string-5.1.1.tgz#a78c012b71c17e05f2e3fa2319dd330682efb3cb" + integrity sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw== + dependencies: + decode-uri-component "^0.2.0" + object-assign "^4.1.0" + strict-uri-encode "^1.0.0" + +queue-microtask@^1.2.2, queue-microtask@^1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" + integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== + +quick-lru@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-5.1.1.tgz#366493e6b3e42a3a6885e2e99d18f80fb7a8c932" + integrity sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA== + +randombytes@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" + integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== + dependencies: + safe-buffer "^5.1.0" + +range-parser@~1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" + integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== + +raw-body@2.5.1: + version "2.5.1" + resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.5.1.tgz#fe1b1628b181b700215e5fd42389f98b71392857" + integrity sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig== + dependencies: + bytes "3.1.2" + http-errors "2.0.0" + iconv-lite "0.4.24" + unpipe "1.0.0" + +raw-body@2.5.2, raw-body@^2.4.1: + version "2.5.2" + resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.5.2.tgz#99febd83b90e08975087e8f1f9419a149366b68a" + integrity sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA== + dependencies: + bytes "3.1.2" + http-errors "2.0.0" + iconv-lite "0.4.24" + unpipe "1.0.0" + +read-pkg-up@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" + integrity sha512-WD9MTlNtI55IwYUS27iHh9tK3YoIVhxis8yKhLpTqWtml739uXc9NWTpxoHkfZf3+DkCCsXox94/VWZniuZm6A== + dependencies: + find-up "^1.0.0" + read-pkg "^1.0.0" + +read-pkg@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" + integrity sha512-7BGwRHqt4s/uVbuyoeejRn4YmFnYZiFl4AuaeXHlgZf3sONF0SOGlxs2Pw8g6hCKupo08RafIO5YXFNOKTfwsQ== + dependencies: + load-json-file "^1.0.0" + normalize-package-data "^2.3.2" + path-type "^1.0.0" + +readable-stream@^2.2.2: + version "2.3.8" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.8.tgz#91125e8042bba1b9887f49345f6277027ce8be9b" + integrity sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA== + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.3" + isarray "~1.0.0" + process-nextick-args "~2.0.0" + safe-buffer "~5.1.1" + string_decoder "~1.1.1" + util-deprecate "~1.0.1" + +readable-stream@^3.6.0: + version "3.6.2" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.2.tgz#56a9b36ea965c00c5a93ef31eb111a0f11056967" + integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== + dependencies: + inherits "^2.0.3" + string_decoder "^1.1.1" + util-deprecate "^1.0.1" + +readdirp@~3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.2.0.tgz#c30c33352b12c96dfb4b895421a49fd5a9593839" + integrity sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ== + dependencies: + picomatch "^2.0.4" + +readdirp@~3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" + integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== + dependencies: + picomatch "^2.2.1" + +rechoir@^0.6.2: + version "0.6.2" + resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" + integrity sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw== + dependencies: + resolve "^1.1.6" + +recursive-readdir@^2.2.2: + version "2.2.3" + resolved "https://registry.yarnpkg.com/recursive-readdir/-/recursive-readdir-2.2.3.tgz#e726f328c0d69153bcabd5c322d3195252379372" + integrity sha512-8HrF5ZsXk5FAH9dgsx3BlUer73nIhuj+9OrQwEbLTPOBzGkL1lsFCR01am+v+0m2Cmbs1nP12hLDl5FA7EszKA== + dependencies: + minimatch "^3.0.5" + +reduce-flatten@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/reduce-flatten/-/reduce-flatten-2.0.0.tgz#734fd84e65f375d7ca4465c69798c25c9d10ae27" + integrity sha512-EJ4UNY/U1t2P/2k6oqotuX2Cc3T6nxJwsM0N0asT7dhrtH1ltUxDn4NalSYmPE2rCkVpcf/X6R0wDwcFpzhd4w== + +regenerator-runtime@^0.13.11: + version "0.13.11" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz#f6dca3e7ceec20590d07ada785636a90cdca17f9" + integrity sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg== + +regexp.prototype.flags@^1.4.3: + version "1.5.0" + resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.0.tgz#fe7ce25e7e4cca8db37b6634c8a2c7009199b9cb" + integrity sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + functions-have-names "^1.2.3" + +req-cwd@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/req-cwd/-/req-cwd-2.0.0.tgz#d4082b4d44598036640fb73ddea01ed53db49ebc" + integrity sha512-ueoIoLo1OfB6b05COxAA9UpeoscNpYyM+BqYlA7H6LVF4hKGPXQQSSaD2YmvDVJMkk4UDpAHIeU1zG53IqjvlQ== + dependencies: + req-from "^2.0.0" + +req-from@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/req-from/-/req-from-2.0.0.tgz#d74188e47f93796f4aa71df6ee35ae689f3e0e70" + integrity sha512-LzTfEVDVQHBRfjOUMgNBA+V6DWsSnoeKzf42J7l0xa/B4jyPOuuF5MlNSmomLNGemWTnV2TIdjSSLnEn95fOQA== + dependencies: + resolve-from "^3.0.0" + +request-promise-core@1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/request-promise-core/-/request-promise-core-1.1.4.tgz#3eedd4223208d419867b78ce815167d10593a22f" + integrity sha512-TTbAfBBRdWD7aNNOoVOBH4pN/KigV6LyapYNNlAPA8JwbovRti1E88m3sYAwsLi5ryhPKsE9APwnjFTgdUjTpw== + dependencies: + lodash "^4.17.19" + +request-promise-native@^1.0.5: + version "1.0.9" + resolved "https://registry.yarnpkg.com/request-promise-native/-/request-promise-native-1.0.9.tgz#e407120526a5efdc9a39b28a5679bf47b9d9dc28" + integrity sha512-wcW+sIUiWnKgNY0dqCpOZkUbF/I+YPi+f09JZIDa39Ec+q82CpSYniDp+ISgTTbKmnpJWASeJBPZmoxH84wt3g== + dependencies: + request-promise-core "1.1.4" + stealthy-require "^1.1.1" + tough-cookie "^2.3.3" + +request@^2.79.0, request@^2.88.0: + version "2.88.2" + resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3" + integrity sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw== + dependencies: + aws-sign2 "~0.7.0" + aws4 "^1.8.0" + caseless "~0.12.0" + combined-stream "~1.0.6" + extend "~3.0.2" + forever-agent "~0.6.1" + form-data "~2.3.2" + har-validator "~5.1.3" + http-signature "~1.2.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.19" + oauth-sign "~0.9.0" + performance-now "^2.1.0" + qs "~6.5.2" + safe-buffer "^5.1.2" + tough-cookie "~2.5.0" + tunnel-agent "^0.6.0" + uuid "^3.3.2" + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== + +require-from-string@^1.1.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-1.2.1.tgz#529c9ccef27380adfec9a2f965b649bbee636418" + integrity sha512-H7AkJWMobeskkttHyhTVtS0fxpFLjxhbfMa6Bk3wimP7sdPRGL3EyCg3sAQenFfAe+xQ+oAc85Nmtvq0ROM83Q== + +require-from-string@^2.0.0, require-from-string@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" + integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== + +require-main-filename@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" + integrity sha512-IqSUtOVP4ksd1C/ej5zeEh/BIP2ajqpn8c5x+q99gvcIG/Qf0cud5raVnE/Dwd0ua9TXYDoDc0RE5hBSdz22Ug== + +require-main-filename@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" + integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== + +resolve-alpn@^1.0.0, resolve-alpn@^1.2.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/resolve-alpn/-/resolve-alpn-1.2.1.tgz#b7adbdac3546aaaec20b45e7d8265927072726f9" + integrity sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g== + +resolve-from@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" + integrity sha512-GnlH6vxLymXJNMBo7XP1fJIzBFbdYt49CuTwmB/6N53t+kMPRMFKz783LlQ4tv28XoQfMWinAJX6WCGf2IlaIw== + +resolve@1.1.x: + version "1.1.7" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" + integrity sha512-9znBF0vBcaSN3W2j7wKvdERPwqTxSpCq+if5C0WoTCyV9n24rua28jeuQ2pL/HOf+yUe/Mef+H/5p60K0Id3bg== + +resolve@1.17.0: + version "1.17.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.17.0.tgz#b25941b54968231cc2d1bb76a79cb7f2c0bf8444" + integrity sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w== + dependencies: + path-parse "^1.0.6" + +resolve@^1.1.6, resolve@^1.10.0: + version "1.22.2" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.2.tgz#0ed0943d4e301867955766c9f3e1ae6d01c6845f" + integrity sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g== + dependencies: + is-core-module "^2.11.0" + path-parse "^1.0.7" + supports-preserve-symlinks-flag "^1.0.0" + +responselike@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/responselike/-/responselike-2.0.1.tgz#9a0bc8fdc252f3fb1cca68b016591059ba1422bc" + integrity sha512-4gl03wn3hj1HP3yzgdI7d3lCkF95F21Pz4BPGvKHinyQzALR5CapwC8yIi0Rh58DEMQ/SguC03wFj2k0M/mHhw== + dependencies: + lowercase-keys "^2.0.0" + +retry@^0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/retry/-/retry-0.12.0.tgz#1b42a6266a21f07421d1b0b54b7dc167b01c013b" + integrity sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow== + +reusify@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" + integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== + +rimraf@^2.2.8: + version "2.7.1" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" + integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== + dependencies: + glob "^7.1.3" + +ripemd160-min@0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/ripemd160-min/-/ripemd160-min-0.0.6.tgz#a904b77658114474d02503e819dcc55853b67e62" + integrity sha512-+GcJgQivhs6S9qvLogusiTcS9kQUfgR75whKuy5jIhuiOfQuJ8fjqxV6EGD5duH1Y/FawFUMtMhyeq3Fbnib8A== + +ripemd160@^2.0.0, ripemd160@^2.0.1, ripemd160@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c" + integrity sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA== + dependencies: + hash-base "^3.0.0" + inherits "^2.0.1" + +rlp@^2.2.3, rlp@^2.2.4: + version "2.2.7" + resolved "https://registry.yarnpkg.com/rlp/-/rlp-2.2.7.tgz#33f31c4afac81124ac4b283e2bd4d9720b30beaf" + integrity sha512-d5gdPmgQ0Z+AklL2NVXr/IoSjNZFfTVvQWzL/AM2AOcSzYP2xjlb0AC8YyCLc41MSNf6P6QVtjgPdmVtzb+4lQ== + dependencies: + bn.js "^5.2.0" + +run-parallel-limit@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/run-parallel-limit/-/run-parallel-limit-1.1.0.tgz#be80e936f5768623a38a963262d6bef8ff11e7ba" + integrity sha512-jJA7irRNM91jaKc3Hcl1npHsFLOXOoTkPCUL1JEa1R82O2miplXXRaGdjW/KM/98YQWDhJLiSs793CnXfblJUw== + dependencies: + queue-microtask "^1.2.2" + +run-parallel@^1.1.9: + version "1.2.0" + resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" + integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== + dependencies: + queue-microtask "^1.2.2" + +rustbn.js@~0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/rustbn.js/-/rustbn.js-0.2.0.tgz#8082cb886e707155fd1cb6f23bd591ab8d55d0ca" + integrity sha512-4VlvkRUuCJvr2J6Y0ImW7NvTCriMi7ErOAqWk1y69vAdoNIzCF3yPmgeNzx+RQTLEDFq5sHfscn1MwHxP9hNfA== + +safe-array-concat@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/safe-array-concat/-/safe-array-concat-1.0.0.tgz#2064223cba3c08d2ee05148eedbc563cd6d84060" + integrity sha512-9dVEFruWIsnie89yym+xWTAYASdpw3CJV7Li/6zBewGf9z2i1j31rP6jnY0pHEO4QZh6N0K11bFjWmdR8UGdPQ== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.2.0" + has-symbols "^1.0.3" + isarray "^2.0.5" + +safe-buffer@5.2.1, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@^5.2.1, safe-buffer@~5.2.0: + version "5.2.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== + +safe-buffer@~5.1.0, safe-buffer@~5.1.1: + version "5.1.2" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" + integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== + +safe-regex-test@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/safe-regex-test/-/safe-regex-test-1.0.0.tgz#793b874d524eb3640d1873aad03596db2d4f2295" + integrity sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.1.3" + is-regex "^1.1.4" + +"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: + version "2.1.2" + resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== + +sc-istanbul@^0.4.5: + version "0.4.6" + resolved "https://registry.yarnpkg.com/sc-istanbul/-/sc-istanbul-0.4.6.tgz#cf6784355ff2076f92d70d59047d71c13703e839" + integrity sha512-qJFF/8tW/zJsbyfh/iT/ZM5QNHE3CXxtLJbZsL+CzdJLBsPD7SedJZoUA4d8iAcN2IoMp/Dx80shOOd2x96X/g== + dependencies: + abbrev "1.0.x" + async "1.x" + escodegen "1.8.x" + esprima "2.7.x" + glob "^5.0.15" + handlebars "^4.0.1" + js-yaml "3.x" + mkdirp "0.5.x" + nopt "3.x" + once "1.x" + resolve "1.1.x" + supports-color "^3.1.0" + which "^1.1.1" + wordwrap "^1.0.0" + +scrypt-js@2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/scrypt-js/-/scrypt-js-2.0.4.tgz#32f8c5149f0797672e551c07e230f834b6af5f16" + integrity sha512-4KsaGcPnuhtCZQCxFxN3GVYIhKFPTdLd8PLC552XwbMndtD0cjRFAhDuuydXQ0h08ZfPgzqe6EKHozpuH74iDw== + +scrypt-js@3.0.1, scrypt-js@^3.0.0, scrypt-js@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/scrypt-js/-/scrypt-js-3.0.1.tgz#d314a57c2aef69d1ad98a138a21fe9eafa9ee312" + integrity sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA== + +secp256k1@^4.0.1: + version "4.0.3" + resolved "https://registry.yarnpkg.com/secp256k1/-/secp256k1-4.0.3.tgz#c4559ecd1b8d3c1827ed2d1b94190d69ce267303" + integrity sha512-NLZVf+ROMxwtEj3Xa562qgv2BK5e2WNmXPiOdVIPLgs6lyTzMvBq0aWTYMI5XCP9jZMVKOcqZLw/Wc4vDkuxhA== + dependencies: + elliptic "^6.5.4" + node-addon-api "^2.0.0" + node-gyp-build "^4.2.0" + +"semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.5.0, semver@^5.6.0, semver@^5.7.0: + version "5.7.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" + integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== + +semver@7.3.7: + version "7.3.7" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.7.tgz#12c5b649afdbf9049707796e22a4028814ce523f" + integrity sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g== + dependencies: + lru-cache "^6.0.0" + +semver@^6.3.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" + integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== + +semver@^7.3.4: + version "7.5.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.0.tgz#ed8c5dc8efb6c629c88b23d41dc9bf40c1d96cd0" + integrity sha512-+XC0AD/R7Q2mPSRuy2Id0+CGTZ98+8f+KvwirxOKIEyid+XSx6HbC63p+O4IndTHuX5Z+JxQ0TghCkO5Cg/2HA== + dependencies: + lru-cache "^6.0.0" + +send@0.18.0: + version "0.18.0" + resolved "https://registry.yarnpkg.com/send/-/send-0.18.0.tgz#670167cc654b05f5aa4a767f9113bb371bc706be" + integrity sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg== + dependencies: + debug "2.6.9" + depd "2.0.0" + destroy "1.2.0" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + fresh "0.5.2" + http-errors "2.0.0" + mime "1.6.0" + ms "2.1.3" + on-finished "2.4.1" + range-parser "~1.2.1" + statuses "2.0.1" + +sentence-case@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/sentence-case/-/sentence-case-2.1.1.tgz#1f6e2dda39c168bf92d13f86d4a918933f667ed4" + integrity sha512-ENl7cYHaK/Ktwk5OTD+aDbQ3uC8IByu/6Bkg+HDv8Mm+XnBnppVNalcfJTNsp1ibstKh030/JKQQWglDvtKwEQ== + dependencies: + no-case "^2.2.0" + upper-case-first "^1.1.2" + +serialize-javascript@6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.0.tgz#efae5d88f45d7924141da8b5c3a7a7e663fefeb8" + integrity sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag== + dependencies: + randombytes "^2.1.0" + +serve-static@1.15.0: + version "1.15.0" + resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.15.0.tgz#faaef08cffe0a1a62f60cad0c4e513cff0ac9540" + integrity sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g== + dependencies: + encodeurl "~1.0.2" + escape-html "~1.0.3" + parseurl "~1.3.3" + send "0.18.0" + +servify@^0.1.12: + version "0.1.12" + resolved "https://registry.yarnpkg.com/servify/-/servify-0.1.12.tgz#142ab7bee1f1d033b66d0707086085b17c06db95" + integrity sha512-/xE6GvsKKqyo1BAY+KxOWXcLpPsUUyji7Qg3bVD7hh1eRze5bR1uYiuDA/k3Gof1s9BTzQZEJK8sNcNGFIzeWw== + dependencies: + body-parser "^1.16.0" + cors "^2.8.1" + express "^4.14.0" + request "^2.79.0" + xhr "^2.3.3" + +set-blocking@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" + integrity sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw== + +setimmediate@1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.4.tgz#20e81de622d4a02588ce0c8da8973cbcf1d3138f" + integrity sha512-/TjEmXQVEzdod/FFskf3o7oOAsGhHf2j1dZqRFbDzq4F3mvvxflIIi4Hd3bLQE9y/CpwqfSQam5JakI/mi3Pog== + +setimmediate@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" + integrity sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA== + +setprototypeof@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424" + integrity sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw== + +sha.js@^2.4.0, sha.js@^2.4.8: + version "2.4.11" + resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7" + integrity sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ== + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + +sha1@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/sha1/-/sha1-1.1.1.tgz#addaa7a93168f393f19eb2b15091618e2700f848" + integrity sha512-dZBS6OrMjtgVkopB1Gmo4RQCDKiZsqcpAQpkV/aaj+FCrCg8r4I4qMkDPQjBgLIxlmu9k4nUbWq6ohXahOneYA== + dependencies: + charenc ">= 0.0.1" + crypt ">= 0.0.1" + +sha3@^2.1.1: + version "2.1.4" + resolved "https://registry.yarnpkg.com/sha3/-/sha3-2.1.4.tgz#000fac0fe7c2feac1f48a25e7a31b52a6492cc8f" + integrity sha512-S8cNxbyb0UGUM2VhRD4Poe5N58gJnJsLJ5vC7FYWGUmGhcsj4++WaIOBFVDxlG0W3To6xBuiRh+i0Qp2oNCOtg== + dependencies: + buffer "6.0.3" + +shelljs@^0.8.3: + version "0.8.5" + resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.5.tgz#de055408d8361bed66c669d2f000538ced8ee20c" + integrity sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow== + dependencies: + glob "^7.0.0" + interpret "^1.0.0" + rechoir "^0.6.2" + +side-channel@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" + integrity sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw== + dependencies: + call-bind "^1.0.0" + get-intrinsic "^1.0.2" + object-inspect "^1.9.0" + +signal-exit@^3.0.2: + version "3.0.7" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" + integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== + +simple-concat@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/simple-concat/-/simple-concat-1.0.1.tgz#f46976082ba35c2263f1c8ab5edfe26c41c9552f" + integrity sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q== + +simple-get@^2.7.0: + version "2.8.2" + resolved "https://registry.yarnpkg.com/simple-get/-/simple-get-2.8.2.tgz#5708fb0919d440657326cd5fe7d2599d07705019" + integrity sha512-Ijd/rV5o+mSBBs4F/x9oDPtTx9Zb6X9brmnXvMW4J7IR15ngi9q5xxqWBKU744jTZiaXtxaPL7uHG6vtN8kUkw== + dependencies: + decompress-response "^3.3.0" + once "^1.3.1" + simple-concat "^1.0.0" + +slash@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" + integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== + +slice-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-4.0.0.tgz#500e8dd0fd55b05815086255b3195adf2a45fe6b" + integrity sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ== + dependencies: + ansi-styles "^4.0.0" + astral-regex "^2.0.0" + is-fullwidth-code-point "^3.0.0" + +snake-case@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/snake-case/-/snake-case-2.1.0.tgz#41bdb1b73f30ec66a04d4e2cad1b76387d4d6d9f" + integrity sha512-FMR5YoPFwOLuh4rRz92dywJjyKYZNLpMn1R5ujVpIYkbA9p01fq8RMg0FkO4M+Yobt4MjHeLTJVm5xFFBHSV2Q== + dependencies: + no-case "^2.2.0" + +solc@0.7.3: + version "0.7.3" + resolved "https://registry.yarnpkg.com/solc/-/solc-0.7.3.tgz#04646961bd867a744f63d2b4e3c0701ffdc7d78a" + integrity sha512-GAsWNAjGzIDg7VxzP6mPjdurby3IkGCjQcM8GFYZT6RyaoUZKmMU6Y7YwG+tFGhv7dwZ8rmR4iwFDrrD99JwqA== + dependencies: + command-exists "^1.2.8" + commander "3.0.2" + follow-redirects "^1.12.1" + fs-extra "^0.30.0" + js-sha3 "0.8.0" + memorystream "^0.3.1" + require-from-string "^2.0.0" + semver "^5.5.0" + tmp "0.0.33" + +solc@^0.4.20: + version "0.4.26" + resolved "https://registry.yarnpkg.com/solc/-/solc-0.4.26.tgz#5390a62a99f40806b86258c737c1cf653cc35cb5" + integrity sha512-o+c6FpkiHd+HPjmjEVpQgH7fqZ14tJpXhho+/bQXlXbliLIS/xjXb42Vxh+qQY1WCSTMQ0+a5vR9vi0MfhU6mA== + dependencies: + fs-extra "^0.30.0" + memorystream "^0.3.1" + require-from-string "^1.1.0" + semver "^5.3.0" + yargs "^4.7.1" + +solidity-ast@^0.4.15: + version "0.4.49" + resolved "https://registry.yarnpkg.com/solidity-ast/-/solidity-ast-0.4.49.tgz#ecba89d10c0067845b7848c3a3e8cc61a4fc5b82" + integrity sha512-Pr5sCAj1SFqzwFZw1HPKSq0PehlQNdM8GwKyAVYh2DOn7/cCK8LUKD1HeHnKtTgBW7hi9h4nnnan7hpAg5RhWQ== + +solidity-coverage@^0.8.0: + version "0.8.2" + resolved "https://registry.yarnpkg.com/solidity-coverage/-/solidity-coverage-0.8.2.tgz#bc39604ab7ce0a3fa7767b126b44191830c07813" + integrity sha512-cv2bWb7lOXPE9/SSleDO6czkFiMHgP4NXPj+iW9W7iEKLBk7Cj0AGBiNmGX3V1totl9wjPrT0gHmABZKZt65rQ== + dependencies: + "@ethersproject/abi" "^5.0.9" + "@solidity-parser/parser" "^0.14.1" + chalk "^2.4.2" + death "^1.1.0" + detect-port "^1.3.0" + difflib "^0.2.4" + fs-extra "^8.1.0" + ghost-testrpc "^0.0.2" + global-modules "^2.0.0" + globby "^10.0.1" + jsonschema "^1.2.4" + lodash "^4.17.15" + mocha "7.1.2" + node-emoji "^1.10.0" + pify "^4.0.1" + recursive-readdir "^2.2.2" + sc-istanbul "^0.4.5" + semver "^7.3.4" + shelljs "^0.8.3" + web3-utils "^1.3.6" + +source-map-support@^0.5.13: + version "0.5.21" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" + integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + +source-map@^0.6.0, source-map@^0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== + +source-map@~0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.2.0.tgz#dab73fbcfc2ba819b4de03bd6f6eaa48164b3f9d" + integrity sha512-CBdZ2oa/BHhS4xj5DlhjWNHcan57/5YuvfdLf17iVmIpd9KRm+DFLmC6nBNj+6Ua7Kt3TmOjDpQT1aTYOQtoUA== + dependencies: + amdefine ">=0.0.4" + +spdx-correct@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.2.0.tgz#4f5ab0668f0059e34f9c00dce331784a12de4e9c" + integrity sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA== + dependencies: + spdx-expression-parse "^3.0.0" + spdx-license-ids "^3.0.0" + +spdx-exceptions@^2.1.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz#3f28ce1a77a00372683eade4a433183527a2163d" + integrity sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A== + +spdx-expression-parse@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz#cf70f50482eefdc98e3ce0a6833e4a53ceeba679" + integrity sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q== + dependencies: + spdx-exceptions "^2.1.0" + spdx-license-ids "^3.0.0" + +spdx-license-ids@^3.0.0: + version "3.0.13" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.13.tgz#7189a474c46f8d47c7b0da4b987bb45e908bd2d5" + integrity sha512-XkD+zwiqXHikFZm4AX/7JSCXA98U5Db4AFd5XUg/+9UNtnH75+Z9KxtpYiJZx36mUDVOwH83pl7yvCer6ewM3w== + +sprintf-js@~1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g== + +sshpk@^1.7.0: + version "1.17.0" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.17.0.tgz#578082d92d4fe612b13007496e543fa0fbcbe4c5" + integrity sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ== + dependencies: + asn1 "~0.2.3" + assert-plus "^1.0.0" + bcrypt-pbkdf "^1.0.0" + dashdash "^1.12.0" + ecc-jsbn "~0.1.1" + getpass "^0.1.1" + jsbn "~0.1.0" + safer-buffer "^2.0.2" + tweetnacl "~0.14.0" + +stacktrace-parser@^0.1.10: + version "0.1.10" + resolved "https://registry.yarnpkg.com/stacktrace-parser/-/stacktrace-parser-0.1.10.tgz#29fb0cae4e0d0b85155879402857a1639eb6051a" + integrity sha512-KJP1OCML99+8fhOHxwwzyWrlUuVX5GQ0ZpJTd1DFXhdkrvg1szxfHhawXUZ3g9TkXORQd4/WG68jMlQZ2p8wlg== + dependencies: + type-fest "^0.7.1" + +statuses@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-2.0.1.tgz#55cb000ccf1d48728bd23c685a063998cf1a1b63" + integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ== + +stealthy-require@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/stealthy-require/-/stealthy-require-1.1.1.tgz#35b09875b4ff49f26a777e509b3090a3226bf24b" + integrity sha512-ZnWpYnYugiOVEY5GkcuJK1io5V8QmNYChG62gSit9pQVGErXtrKuPC55ITaVSukmMta5qpMU7vqLt2Lnni4f/g== + +streamsearch@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/streamsearch/-/streamsearch-1.1.0.tgz#404dd1e2247ca94af554e841a8ef0eaa238da764" + integrity sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg== + +strict-uri-encode@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713" + integrity sha512-R3f198pcvnB+5IpnBlRkphuE9n46WyVl8I39W/ZUTZLz4nqSP/oLYUrcnJrw462Ds8he4YKMov2efsTIw1BDGQ== + +string-format@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/string-format/-/string-format-2.0.0.tgz#f2df2e7097440d3b65de31b6d40d54c96eaffb9b" + integrity sha512-bbEs3scLeYNXLecRRuk6uJxdXUSj6le/8rNPHChIJTn2V79aXVTR1EH2OH5zLKKoz0V02fOUKZZcw01pLUShZA== + +string-width@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" + integrity sha512-0XsVpQLnVCXHJfyEs8tC0zpTVIr5PKKsQtkT29IwupnPTjtPmQ3xT/4yCREF9hYkV/3M3kzcUTSAZT6a6h81tw== + dependencies: + code-point-at "^1.0.0" + is-fullwidth-code-point "^1.0.0" + strip-ansi "^3.0.0" + +"string-width@^1.0.2 || 2", string-width@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" + integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== + dependencies: + is-fullwidth-code-point "^2.0.0" + strip-ansi "^4.0.0" + +string-width@^3.0.0, string-width@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961" + integrity sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w== + dependencies: + emoji-regex "^7.0.1" + is-fullwidth-code-point "^2.0.0" + strip-ansi "^5.1.0" + +string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +string.prototype.trim@^1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.7.tgz#a68352740859f6893f14ce3ef1bb3037f7a90533" + integrity sha512-p6TmeT1T3411M8Cgg9wBTMRtY2q9+PNy9EV1i2lIXUN/btt763oIfxwN3RR8VU6wHX8j/1CFy0L+YuThm6bgOg== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.4" + es-abstract "^1.20.4" + +string.prototype.trimend@^1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz#c4a27fa026d979d79c04f17397f250a462944533" + integrity sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.4" + es-abstract "^1.20.4" + +string.prototype.trimstart@^1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz#e90ab66aa8e4007d92ef591bbf3cd422c56bdcf4" + integrity sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.4" + es-abstract "^1.20.4" + +string_decoder@^1.1.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" + integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== + dependencies: + safe-buffer "~5.2.0" + +string_decoder@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" + integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== + dependencies: + safe-buffer "~5.1.0" + +strip-ansi@^3.0.0, strip-ansi@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" + integrity sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg== + dependencies: + ansi-regex "^2.0.0" + +strip-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" + integrity sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow== + dependencies: + ansi-regex "^3.0.0" + +strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" + integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA== + dependencies: + ansi-regex "^4.1.0" + +strip-ansi@^6.0.0, strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + +strip-bom@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" + integrity sha512-kwrX1y7czp1E69n2ajbG65mIo9dqvJ+8aBQXOGVxqwvNbsXdFM6Lq37dLAY3mknUwru8CfcCbfOLL/gMo+fi3g== + dependencies: + is-utf8 "^0.2.0" + +strip-hex-prefix@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz#0c5f155fef1151373377de9dbb588da05500e36f" + integrity sha512-q8d4ue7JGEiVcypji1bALTos+0pWtyGlivAWyPuTkHzuTCJqrK9sWxYQZUq6Nq3cuyv3bm734IhHvHtGGURU6A== + dependencies: + is-hex-prefixed "1.0.0" + +strip-indent@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-2.0.0.tgz#5ef8db295d01e6ed6cbf7aab96998d7822527b68" + integrity sha512-RsSNPLpq6YUL7QYy44RnPVTn/lcVZtb48Uof3X5JLbF4zD/Gs7ZFDv2HWol+leoQN2mT86LAzSshGfkTlSOpsA== + +strip-json-comments@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" + integrity sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ== + +strip-json-comments@3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" + integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== + +supports-color@6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-6.0.0.tgz#76cfe742cf1f41bb9b1c29ad03068c05b4c0e40a" + integrity sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg== + dependencies: + has-flag "^3.0.0" + +supports-color@8.1.1: + version "8.1.1" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" + integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== + dependencies: + has-flag "^4.0.0" + +supports-color@^3.1.0: + version "3.2.3" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6" + integrity sha512-Jds2VIYDrlp5ui7t8abHN2bjAu4LV/q4N2KivFPpGH0lrka0BMq/33AmECUXlKPcHigkNaqfXRENFju+rlcy+A== + dependencies: + has-flag "^1.0.0" + +supports-color@^5.3.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" + integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== + dependencies: + has-flag "^3.0.0" + +supports-color@^7.1.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" + integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== + dependencies: + has-flag "^4.0.0" + +supports-preserve-symlinks-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" + integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== + +swap-case@^1.1.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/swap-case/-/swap-case-1.1.2.tgz#c39203a4587385fad3c850a0bd1bcafa081974e3" + integrity sha512-BAmWG6/bx8syfc6qXPprof3Mn5vQgf5dwdUNJhsNqU9WdPt5P+ES/wQ5bxfijy8zwZgZZHslC3iAsxsuQMCzJQ== + dependencies: + lower-case "^1.1.1" + upper-case "^1.1.1" + +swarm-js@^0.1.40: + version "0.1.42" + resolved "https://registry.yarnpkg.com/swarm-js/-/swarm-js-0.1.42.tgz#497995c62df6696f6e22372f457120e43e727979" + integrity sha512-BV7c/dVlA3R6ya1lMlSSNPLYrntt0LUq4YMgy3iwpCIc6rZnS5W2wUoctarZ5pXlpKtxDDf9hNziEkcfrxdhqQ== + dependencies: + bluebird "^3.5.0" + buffer "^5.0.5" + eth-lib "^0.1.26" + fs-extra "^4.0.2" + got "^11.8.5" + mime-types "^2.1.16" + mkdirp-promise "^5.0.1" + mock-fs "^4.1.0" + setimmediate "^1.0.5" + tar "^4.0.2" + xhr-request "^1.0.1" + +sync-request@^6.0.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/sync-request/-/sync-request-6.1.0.tgz#e96217565b5e50bbffe179868ba75532fb597e68" + integrity sha512-8fjNkrNlNCrVc/av+Jn+xxqfCjYaBoHqCsDz6mt030UMxJGr+GSfCV1dQt2gRtlL63+VPidwDVLr7V2OcTSdRw== + dependencies: + http-response-object "^3.0.1" + sync-rpc "^1.2.1" + then-request "^6.0.0" + +sync-rpc@^1.2.1: + version "1.3.6" + resolved "https://registry.yarnpkg.com/sync-rpc/-/sync-rpc-1.3.6.tgz#b2e8b2550a12ccbc71df8644810529deb68665a7" + integrity sha512-J8jTXuZzRlvU7HemDgHi3pGnh/rkoqR/OZSjhTyyZrEkkYQbk7Z33AXp37mkPfPpfdOuj7Ex3H/TJM1z48uPQw== + dependencies: + get-port "^3.1.0" + +table-layout@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/table-layout/-/table-layout-1.0.2.tgz#c4038a1853b0136d63365a734b6931cf4fad4a04" + integrity sha512-qd/R7n5rQTRFi+Zf2sk5XVVd9UQl6ZkduPFC3S7WEGJAmetDTjY3qPN50eSKzwuzEyQKy5TN2TiZdkIjos2L6A== + dependencies: + array-back "^4.0.1" + deep-extend "~0.6.0" + typical "^5.2.0" + wordwrapjs "^4.0.0" + +table@^6.8.0: + version "6.8.1" + resolved "https://registry.yarnpkg.com/table/-/table-6.8.1.tgz#ea2b71359fe03b017a5fbc296204471158080bdf" + integrity sha512-Y4X9zqrCftUhMeH2EptSSERdVKt/nEdijTOacGD/97EKjhQ/Qs8RTlEGABSJNNN8lac9kheH+af7yAkEWlgneA== + dependencies: + ajv "^8.0.1" + lodash.truncate "^4.4.2" + slice-ansi "^4.0.0" + string-width "^4.2.3" + strip-ansi "^6.0.1" + +tar@^4.0.2: + version "4.4.19" + resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.19.tgz#2e4d7263df26f2b914dee10c825ab132123742f3" + integrity sha512-a20gEsvHnWe0ygBY8JbxoM4w3SJdhc7ZAuxkLqh+nvNQN2IOt0B5lLgM490X5Hl8FF0dl0tOf2ewFYAlIFgzVA== + dependencies: + chownr "^1.1.4" + fs-minipass "^1.2.7" + minipass "^2.9.0" + minizlib "^1.3.3" + mkdirp "^0.5.5" + safe-buffer "^5.2.1" + yallist "^3.1.1" + +testrpc@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/testrpc/-/testrpc-0.0.1.tgz#83e2195b1f5873aec7be1af8cbe6dcf39edb7aed" + integrity sha512-afH1hO+SQ/VPlmaLUFj2636QMeDvPCeQMc/9RBMW0IfjNe9gFD9Ra3ShqYkB7py0do1ZcCna/9acHyzTJ+GcNA== + +then-request@^6.0.0: + version "6.0.2" + resolved "https://registry.yarnpkg.com/then-request/-/then-request-6.0.2.tgz#ec18dd8b5ca43aaee5cb92f7e4c1630e950d4f0c" + integrity sha512-3ZBiG7JvP3wbDzA9iNY5zJQcHL4jn/0BWtXIkagfz7QgOL/LqjCEOBQuJNZfu0XYnv5JhKh+cDxCPM4ILrqruA== + dependencies: + "@types/concat-stream" "^1.6.0" + "@types/form-data" "0.0.33" + "@types/node" "^8.0.0" + "@types/qs" "^6.2.31" + caseless "~0.12.0" + concat-stream "^1.6.0" + form-data "^2.2.0" + http-basic "^8.1.1" + http-response-object "^3.0.1" + promise "^8.0.0" + qs "^6.4.0" + +timed-out@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-4.0.1.tgz#f32eacac5a175bea25d7fab565ab3ed8741ef56f" + integrity sha512-G7r3AhovYtr5YKOWQkta8RKAPb+J9IsO4uVmzjl8AZwfhs8UcUwTiD6gcJYSgOtzyjvQKrKYn41syHbUWMkafA== + +title-case@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/title-case/-/title-case-2.1.1.tgz#3e127216da58d2bc5becf137ab91dae3a7cd8faa" + integrity sha512-EkJoZ2O3zdCz3zJsYCsxyq2OC5hrxR9mfdd5I+w8h/tmFfeOxJ+vvkxsKxdmN0WtS9zLdHEgfgVOiMVgv+Po4Q== + dependencies: + no-case "^2.2.0" + upper-case "^1.0.3" + +tmp@0.0.33: + version "0.0.33" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" + integrity sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw== + dependencies: + os-tmpdir "~1.0.2" + +to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== + dependencies: + is-number "^7.0.0" + +toidentifier@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35" + integrity sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA== + +tough-cookie@^2.3.3, tough-cookie@~2.5.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" + integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g== + dependencies: + psl "^1.1.28" + punycode "^2.1.1" + +tr46@~0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" + integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== + +ts-command-line-args@^2.2.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/ts-command-line-args/-/ts-command-line-args-2.5.0.tgz#7eeed3a6937b2612ea08a0794cf9d43fbbea89c4" + integrity sha512-Ff7Xt04WWCjj/cmPO9eWTJX3qpBZWuPWyQYG1vnxJao+alWWYjwJBc5aYz3h5p5dE08A6AnpkgiCtP/0KXXBYw== + dependencies: + "@morgan-stanley/ts-mocking-bird" "^0.6.2" + chalk "^4.1.0" + command-line-args "^5.1.1" + command-line-usage "^6.1.0" + string-format "^2.0.0" + +ts-essentials@^7.0.1: + version "7.0.3" + resolved "https://registry.yarnpkg.com/ts-essentials/-/ts-essentials-7.0.3.tgz#686fd155a02133eedcc5362dc8b5056cde3e5a38" + integrity sha512-8+gr5+lqO3G84KdiTSMRLtuyJ+nTBVRKuCrK4lidMPdVeEp0uqC875uE5NMcaA7YYMN7XsNiFQuMvasF8HT/xQ== + +ts-node@>=8.0.0: + version "10.9.1" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.1.tgz#e73de9102958af9e1f0b168a6ff320e25adcff4b" + integrity sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw== + dependencies: + "@cspotcode/source-map-support" "^0.8.0" + "@tsconfig/node10" "^1.0.7" + "@tsconfig/node12" "^1.0.7" + "@tsconfig/node14" "^1.0.0" + "@tsconfig/node16" "^1.0.2" + acorn "^8.4.1" + acorn-walk "^8.1.1" + arg "^4.1.0" + create-require "^1.1.0" + diff "^4.0.1" + make-error "^1.1.1" + v8-compile-cache-lib "^3.0.1" + yn "3.1.1" + +tslib@^1.9.3: + version "1.14.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" + integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== + +tsort@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/tsort/-/tsort-0.0.1.tgz#e2280f5e817f8bf4275657fd0f9aebd44f5a2786" + integrity sha512-Tyrf5mxF8Ofs1tNoxA13lFeZ2Zrbd6cKbuH3V+MQ5sb6DtBj5FjrXVsRWT8YvNAQTqNoz66dz1WsbigI22aEnw== + +tunnel-agent@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" + integrity sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w== + dependencies: + safe-buffer "^5.0.1" + +tweetnacl-util@^0.15.1: + version "0.15.1" + resolved "https://registry.yarnpkg.com/tweetnacl-util/-/tweetnacl-util-0.15.1.tgz#b80fcdb5c97bcc508be18c44a4be50f022eea00b" + integrity sha512-RKJBIj8lySrShN4w6i/BonWp2Z/uxwC3h4y7xsRrpP59ZboCd0GpEVsOnMDYLMmKBpYhb5TgHzZXy7wTfYFBRw== + +tweetnacl@^0.14.3, tweetnacl@~0.14.0: + version "0.14.5" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" + integrity sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA== + +tweetnacl@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-1.0.3.tgz#ac0af71680458d8a6378d0d0d050ab1407d35596" + integrity sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw== + +type-check@~0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" + integrity sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg== + dependencies: + prelude-ls "~1.1.2" + +type-detect@^4.0.0, type-detect@^4.0.5: + version "4.0.8" + resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" + integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== + +type-fest@^0.21.3: + version "0.21.3" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" + integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== + +type-fest@^0.7.1: + version "0.7.1" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.7.1.tgz#8dda65feaf03ed78f0a3f9678f1869147f7c5c48" + integrity sha512-Ne2YiiGN8bmrmJJEuTWTLJR32nh/JdL1+PSicowtNb0WFpn59GK8/lfD61bVtzguz7b3PBt74nxpv/Pw5po5Rg== + +type-is@~1.6.18: + version "1.6.18" + resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" + integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g== + dependencies: + media-typer "0.3.0" + mime-types "~2.1.24" + +type@^1.0.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/type/-/type-1.2.0.tgz#848dd7698dafa3e54a6c479e759c4bc3f18847a0" + integrity sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg== + +type@^2.7.2: + version "2.7.2" + resolved "https://registry.yarnpkg.com/type/-/type-2.7.2.tgz#2376a15a3a28b1efa0f5350dcf72d24df6ef98d0" + integrity sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw== + +typechain@^8.1.0: + version "8.1.1" + resolved "https://registry.yarnpkg.com/typechain/-/typechain-8.1.1.tgz#9c2e8012c2c4c586536fc18402dcd7034c4ff0bd" + integrity sha512-uF/sUvnXTOVF2FHKhQYnxHk4su4JjZR8vr4mA2mBaRwHTbwh0jIlqARz9XJr1tA0l7afJGvEa1dTSi4zt039LQ== + dependencies: + "@types/prettier" "^2.1.1" + debug "^4.3.1" + fs-extra "^7.0.0" + glob "7.1.7" + js-sha3 "^0.8.0" + lodash "^4.17.15" + mkdirp "^1.0.4" + prettier "^2.3.1" + ts-command-line-args "^2.2.0" + ts-essentials "^7.0.1" + +typed-array-length@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/typed-array-length/-/typed-array-length-1.0.4.tgz#89d83785e5c4098bec72e08b319651f0eac9c1bb" + integrity sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng== + dependencies: + call-bind "^1.0.2" + for-each "^0.3.3" + is-typed-array "^1.1.9" + +typedarray-to-buffer@^3.1.5: + version "3.1.5" + resolved "https://registry.yarnpkg.com/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz#a97ee7a9ff42691b9f783ff1bc5112fe3fca9080" + integrity sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q== + dependencies: + is-typedarray "^1.0.0" + +typedarray@^0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" + integrity sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA== + +typescript@>=4.5.0: + version "5.0.4" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.0.4.tgz#b217fd20119bd61a94d4011274e0ab369058da3b" + integrity sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw== + +typical@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/typical/-/typical-4.0.0.tgz#cbeaff3b9d7ae1e2bbfaf5a4e6f11eccfde94fc4" + integrity sha512-VAH4IvQ7BDFYglMd7BPRDfLgxZZX4O4TFcRDA6EN5X7erNJJq+McIEp8np9aVtxrCJ6qx4GTYVfOWNjcqwZgRw== + +typical@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/typical/-/typical-5.2.0.tgz#4daaac4f2b5315460804f0acf6cb69c52bb93066" + integrity sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg== + +uglify-js@^3.1.4: + version "3.17.4" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.17.4.tgz#61678cf5fa3f5b7eb789bb345df29afb8257c22c" + integrity sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g== + +ultron@~1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.1.1.tgz#9fe1536a10a664a65266a1e3ccf85fd36302bc9c" + integrity sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og== + +unbox-primitive@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.2.tgz#29032021057d5e6cdbd08c5129c226dff8ed6f9e" + integrity sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw== + dependencies: + call-bind "^1.0.2" + has-bigints "^1.0.2" + has-symbols "^1.0.3" + which-boxed-primitive "^1.0.2" + +undici@^5.14.0: + version "5.22.0" + resolved "https://registry.yarnpkg.com/undici/-/undici-5.22.0.tgz#5e205d82a5aecc003fc4388ccd3d2c6e8674a0ad" + integrity sha512-fR9RXCc+6Dxav4P9VV/sp5w3eFiSdOjJYsbtWfd4s5L5C4ogyuVpdKIVHeW0vV1MloM65/f7W45nR9ZxwVdyiA== + dependencies: + busboy "^1.6.0" + +universalify@^0.1.0: + version "0.1.2" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" + integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== + +universalify@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717" + integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ== + +unpipe@1.0.0, unpipe@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" + integrity sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ== + +untildify@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/untildify/-/untildify-4.0.0.tgz#2bc947b953652487e4600949fb091e3ae8cd919b" + integrity sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw== + +upper-case-first@^1.1.0, upper-case-first@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/upper-case-first/-/upper-case-first-1.1.2.tgz#5d79bedcff14419518fd2edb0a0507c9b6859115" + integrity sha512-wINKYvI3Db8dtjikdAqoBbZoP6Q+PZUyfMR7pmwHzjC2quzSkUq5DmPrTtPEqHaz8AGtmsB4TqwapMTM1QAQOQ== + dependencies: + upper-case "^1.1.1" + +upper-case@^1.0.3, upper-case@^1.1.0, upper-case@^1.1.1, upper-case@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/upper-case/-/upper-case-1.1.3.tgz#f6b4501c2ec4cdd26ba78be7222961de77621598" + integrity sha512-WRbjgmYzgXkCV7zNVpy5YgrHgbBv126rMALQQMrmzOVC4GM2waQ9x7xtm8VU+1yF2kWyPzI9zbZ48n4vSxwfSA== + +uri-js@^4.2.2: + version "4.4.1" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" + integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== + dependencies: + punycode "^2.1.0" + +url-set-query@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/url-set-query/-/url-set-query-1.0.0.tgz#016e8cfd7c20ee05cafe7795e892bd0702faa339" + integrity sha512-3AChu4NiXquPfeckE5R5cGdiHCMWJx1dwCWOmWIL4KHAziJNOFIYJlpGFeKDvwLPHovZRCxK3cYlwzqI9Vp+Gg== + +utf-8-validate@^5.0.2: + version "5.0.10" + resolved "https://registry.yarnpkg.com/utf-8-validate/-/utf-8-validate-5.0.10.tgz#d7d10ea39318171ca982718b6b96a8d2442571a2" + integrity sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ== + dependencies: + node-gyp-build "^4.3.0" + +utf8@3.0.0, utf8@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/utf8/-/utf8-3.0.0.tgz#f052eed1364d696e769ef058b183df88c87f69d1" + integrity sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ== + +util-deprecate@^1.0.1, util-deprecate@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== + +util@^0.12.5: + version "0.12.5" + resolved "https://registry.yarnpkg.com/util/-/util-0.12.5.tgz#5f17a6059b73db61a875668781a1c2b136bd6fbc" + integrity sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA== + dependencies: + inherits "^2.0.3" + is-arguments "^1.0.4" + is-generator-function "^1.0.7" + is-typed-array "^1.1.3" + which-typed-array "^1.1.2" + +utils-merge@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" + integrity sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA== + +uuid@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-2.0.1.tgz#c2a30dedb3e535d72ccf82e343941a50ba8533ac" + integrity sha512-nWg9+Oa3qD2CQzHIP4qKUqwNfzKn8P0LtFhotaCTFchsV7ZfDhAybeip/HZVeMIpZi9JgY1E3nUlwaCmZT1sEg== + +uuid@^3.3.2: + version "3.4.0" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" + integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== + +uuid@^7.0.3: + version "7.0.3" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-7.0.3.tgz#c5c9f2c8cf25dc0a372c4df1441c41f5bd0c680b" + integrity sha512-DPSke0pXhTZgoF/d+WSt2QaKMCFSfx7QegxEWT+JOuHF5aWrKEn0G+ztjuJg/gG8/ItK+rbPCD/yNv8yyih6Cg== + +uuid@^8.3.2: + version "8.3.2" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" + integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== + +uuid@^9.0.0: + version "9.0.0" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-9.0.0.tgz#592f550650024a38ceb0c562f2f6aa435761efb5" + integrity sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg== + +v8-compile-cache-lib@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf" + integrity sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg== + +validate-npm-package-license@^3.0.1: + version "3.0.4" + resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" + integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew== + dependencies: + spdx-correct "^3.0.0" + spdx-expression-parse "^3.0.0" + +varint@^5.0.0: + version "5.0.2" + resolved "https://registry.yarnpkg.com/varint/-/varint-5.0.2.tgz#5b47f8a947eb668b848e034dcfa87d0ff8a7f7a4" + integrity sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow== + +vary@^1, vary@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" + integrity sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg== + +verror@1.10.0: + version "1.10.0" + resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" + integrity sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw== + dependencies: + assert-plus "^1.0.0" + core-util-is "1.0.2" + extsprintf "^1.2.0" + +web3-bzz@1.8.2: + version "1.8.2" + resolved "https://registry.yarnpkg.com/web3-bzz/-/web3-bzz-1.8.2.tgz#67ea1c775874056250eece551ded22905ed08784" + integrity sha512-1EEnxjPnFnvNWw3XeeKuTR8PBxYd0+XWzvaLK7OJC/Go9O8llLGxrxICbKV+8cgIE0sDRBxiYx02X+6OhoAQ9w== + dependencies: + "@types/node" "^12.12.6" + got "12.1.0" + swarm-js "^0.1.40" + +web3-bzz@1.9.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/web3-bzz/-/web3-bzz-1.9.0.tgz#3334049f386e73e2b3dcfa96432e65391538d8ac" + integrity sha512-9Zli9dikX8GdHwBb5/WPzpSVuy3EWMKY3P4EokCQra31fD7DLizqAAaTUsFwnK7xYkw5ogpHgelw9uKHHzNajg== + dependencies: + "@types/node" "^12.12.6" + got "12.1.0" + swarm-js "^0.1.40" + +web3-core-helpers@1.8.2: + version "1.8.2" + resolved "https://registry.yarnpkg.com/web3-core-helpers/-/web3-core-helpers-1.8.2.tgz#82066560f8085e6c7b93bcc8e88b441289ea9f9f" + integrity sha512-6B1eLlq9JFrfealZBomd1fmlq1o4A09vrCVQSa51ANoib/jllT3atZrRDr0zt1rfI7TSZTZBXdN/aTdeN99DWw== + dependencies: + web3-eth-iban "1.8.2" + web3-utils "1.8.2" + +web3-core-helpers@1.9.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/web3-core-helpers/-/web3-core-helpers-1.9.0.tgz#a1ca4ac7b9cec822886643312d2e98b0e4d8f1bc" + integrity sha512-NeJzylAp9Yj9xAt2uTT+kyug3X0DLnfBdnAcGZuY6HhoNPDIfQRA9CkJjLngVRlGTLZGjNp9x9eR+RyZQgUlXg== + dependencies: + web3-eth-iban "1.9.0" + web3-utils "1.9.0" + +web3-core-method@1.8.2: + version "1.8.2" + resolved "https://registry.yarnpkg.com/web3-core-method/-/web3-core-method-1.8.2.tgz#ba5ec68084e903f0516415010477618be017eac2" + integrity sha512-1qnr5mw5wVyULzLOrk4B+ryO3gfGjGd/fx8NR+J2xCGLf1e6OSjxT9vbfuQ3fErk/NjSTWWreieYWLMhaogcRA== + dependencies: + "@ethersproject/transactions" "^5.6.2" + web3-core-helpers "1.8.2" + web3-core-promievent "1.8.2" + web3-core-subscriptions "1.8.2" + web3-utils "1.8.2" + +web3-core-method@1.9.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/web3-core-method/-/web3-core-method-1.9.0.tgz#81da8aa21503b470537c9f075f30adfad194a2d8" + integrity sha512-sswbNsY2xRBBhGeaLt9c/eDc+0yDDhi6keUBAkgIRa9ueSx/VKzUY9HMqiV6bXDcGT2fJyejq74FfEB4lc/+/w== + dependencies: + "@ethersproject/transactions" "^5.6.2" + web3-core-helpers "1.9.0" + web3-core-promievent "1.9.0" + web3-core-subscriptions "1.9.0" + web3-utils "1.9.0" + +web3-core-promievent@1.8.2: + version "1.8.2" + resolved "https://registry.yarnpkg.com/web3-core-promievent/-/web3-core-promievent-1.8.2.tgz#e670d6b4453632e6ecfd9ad82da44f77ac1585c9" + integrity sha512-nvkJWDVgoOSsolJldN33tKW6bKKRJX3MCPDYMwP5SUFOA/mCzDEoI88N0JFofDTXkh1k7gOqp1pvwi9heuaxGg== + dependencies: + eventemitter3 "4.0.4" + +web3-core-promievent@1.9.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/web3-core-promievent/-/web3-core-promievent-1.9.0.tgz#2598a4d91b4edd3607366529f52bc96dee9f6d83" + integrity sha512-PHG1Mn23IGwMZhnPDN8dETKypqsFbHfiyRqP+XsVMPmTHkVfzDQTCBU/c2r6hUktBDoGKut5xZQpGfhFk71KbQ== + dependencies: + eventemitter3 "4.0.4" + +web3-core-requestmanager@1.8.2: + version "1.8.2" + resolved "https://registry.yarnpkg.com/web3-core-requestmanager/-/web3-core-requestmanager-1.8.2.tgz#dda95e83ca4808949612a41e54ecea557f78ef26" + integrity sha512-p1d090RYs5Mu7DK1yyc3GCBVZB/03rBtFhYFoS2EruGzOWs/5Q0grgtpwS/DScdRAm8wB8mYEBhY/RKJWF6B2g== + dependencies: + util "^0.12.5" + web3-core-helpers "1.8.2" + web3-providers-http "1.8.2" + web3-providers-ipc "1.8.2" + web3-providers-ws "1.8.2" + +web3-core-requestmanager@1.9.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/web3-core-requestmanager/-/web3-core-requestmanager-1.9.0.tgz#9d7d0e7f890cf7a24e9c568b9772c64d57fc4fcd" + integrity sha512-hcJ5PCtTIJpj+8qWxoseqlCovDo94JJjTX7dZOLXgwp8ah7E3WRYozhGyZocerx+KebKyg1mCQIhkDpMwjfo9Q== + dependencies: + util "^0.12.5" + web3-core-helpers "1.9.0" + web3-providers-http "1.9.0" + web3-providers-ipc "1.9.0" + web3-providers-ws "1.9.0" + +web3-core-subscriptions@1.8.2: + version "1.8.2" + resolved "https://registry.yarnpkg.com/web3-core-subscriptions/-/web3-core-subscriptions-1.8.2.tgz#0c8bd49439d83c6f0a03c70f00b24a915a70a5ed" + integrity sha512-vXQogHDmAIQcKpXvGiMddBUeP9lnKgYF64+yQJhPNE5PnWr1sAibXuIPV7mIPihpFr/n/DORRj6Wh1pUv9zaTw== + dependencies: + eventemitter3 "4.0.4" + web3-core-helpers "1.8.2" + +web3-core-subscriptions@1.9.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/web3-core-subscriptions/-/web3-core-subscriptions-1.9.0.tgz#dc67b478875dab1875844df3307a986dd7d468dd" + integrity sha512-MaIo29yz7hTV8X8bioclPDbHFOVuHmnbMv+D3PDH12ceJFJAXGyW8GL5KU1DYyWIj4TD1HM4WknyVA/YWBiiLA== + dependencies: + eventemitter3 "4.0.4" + web3-core-helpers "1.9.0" + +web3-core@1.8.2: + version "1.8.2" + resolved "https://registry.yarnpkg.com/web3-core/-/web3-core-1.8.2.tgz#333e93d7872b1a36efe758ed8b89a7acbdd962c2" + integrity sha512-DJTVEAYcNqxkqruJE+Rxp3CIv0y5AZMwPHQmOkz/cz+MM75SIzMTc0AUdXzGyTS8xMF8h3YWMQGgGEy8SBf1PQ== + dependencies: + "@types/bn.js" "^5.1.0" + "@types/node" "^12.12.6" + bignumber.js "^9.0.0" + web3-core-helpers "1.8.2" + web3-core-method "1.8.2" + web3-core-requestmanager "1.8.2" + web3-utils "1.8.2" + +web3-core@1.9.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/web3-core/-/web3-core-1.9.0.tgz#9cfafb2f8c01931429108af75205610406a5a1ab" + integrity sha512-DZ+TPmq/ZLlx4LSVzFgrHCP/QFpKDbGWO4HoquZSdu24cjk5SZ+FEU1SZB2OaK3/bgBh+25mRbmv8y56ysUu1w== + dependencies: + "@types/bn.js" "^5.1.1" + "@types/node" "^12.12.6" + bignumber.js "^9.0.0" + web3-core-helpers "1.9.0" + web3-core-method "1.9.0" + web3-core-requestmanager "1.9.0" + web3-utils "1.9.0" + +web3-eth-abi@1.8.2: + version "1.8.2" + resolved "https://registry.yarnpkg.com/web3-eth-abi/-/web3-eth-abi-1.8.2.tgz#16e1e9be40e2527404f041a4745111211488f31a" + integrity sha512-Om9g3kaRNjqiNPAgKwGT16y+ZwtBzRe4ZJFGjLiSs6v5I7TPNF+rRMWuKnR6jq0azQZDj6rblvKFMA49/k48Og== + dependencies: + "@ethersproject/abi" "^5.6.3" + web3-utils "1.8.2" + +web3-eth-abi@1.9.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/web3-eth-abi/-/web3-eth-abi-1.9.0.tgz#18662ef68bd3d25eedd9a1a1484089c39529c652" + integrity sha512-0BLQ3FKMrzJkA930jOX3fMaybAyubk06HChclLpiR0NWmgWXm1tmBrJdkyRy2ZTZpmfuZc9xTFRfl0yZID1voA== + dependencies: + "@ethersproject/abi" "^5.6.3" + web3-utils "1.9.0" + +web3-eth-accounts@1.8.2: + version "1.8.2" + resolved "https://registry.yarnpkg.com/web3-eth-accounts/-/web3-eth-accounts-1.8.2.tgz#b894f5d5158fcae429da42de75d96520d0712971" + integrity sha512-c367Ij63VCz9YdyjiHHWLFtN85l6QghgwMQH2B1eM/p9Y5lTlTX7t/Eg/8+f1yoIStXbk2w/PYM2lk+IkbqdLA== + dependencies: + "@ethereumjs/common" "2.5.0" + "@ethereumjs/tx" "3.3.2" + eth-lib "0.2.8" + ethereumjs-util "^7.1.5" + scrypt-js "^3.0.1" + uuid "^9.0.0" + web3-core "1.8.2" + web3-core-helpers "1.8.2" + web3-core-method "1.8.2" + web3-utils "1.8.2" + +web3-eth-accounts@1.9.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/web3-eth-accounts/-/web3-eth-accounts-1.9.0.tgz#fab7d563c63bdff2aa5ad89a94faf128961d9504" + integrity sha512-VeIZVevmnSll0AC1k5F/y398ZE89d1SRuYk8IewLUhL/tVAsFEsjl2SGgm0+aDcHmgPrkW+qsCJ+C7rWg/N4ZA== + dependencies: + "@ethereumjs/common" "2.5.0" + "@ethereumjs/tx" "3.3.2" + eth-lib "0.2.8" + ethereumjs-util "^7.1.5" + scrypt-js "^3.0.1" + uuid "^9.0.0" + web3-core "1.9.0" + web3-core-helpers "1.9.0" + web3-core-method "1.9.0" + web3-utils "1.9.0" + +web3-eth-contract@1.8.2: + version "1.8.2" + resolved "https://registry.yarnpkg.com/web3-eth-contract/-/web3-eth-contract-1.8.2.tgz#5388b7130923d2b790c09a420391a81312a867fb" + integrity sha512-ID5A25tHTSBNwOPjiXSVzxruz006ULRIDbzWTYIFTp7NJ7vXu/kynKK2ag/ObuTqBpMbobP8nXcA9b5EDkIdQA== + dependencies: + "@types/bn.js" "^5.1.0" + web3-core "1.8.2" + web3-core-helpers "1.8.2" + web3-core-method "1.8.2" + web3-core-promievent "1.8.2" + web3-core-subscriptions "1.8.2" + web3-eth-abi "1.8.2" + web3-utils "1.8.2" + +web3-eth-contract@1.9.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/web3-eth-contract/-/web3-eth-contract-1.9.0.tgz#00b7ac8314d562d10d7dd0c7d0f52555c3862995" + integrity sha512-+j26hpSaEtAdUed0TN5rnc+YZOcjPxMjFX4ZBKatvFkImdbVv/tzTvcHlltubSpgb2ZLyZ89lSL6phKYwd2zNQ== + dependencies: + "@types/bn.js" "^5.1.1" + web3-core "1.9.0" + web3-core-helpers "1.9.0" + web3-core-method "1.9.0" + web3-core-promievent "1.9.0" + web3-core-subscriptions "1.9.0" + web3-eth-abi "1.9.0" + web3-utils "1.9.0" + +web3-eth-ens@1.8.2: + version "1.8.2" + resolved "https://registry.yarnpkg.com/web3-eth-ens/-/web3-eth-ens-1.8.2.tgz#0a086ad4d919102e28b9fd3036df246add9df22a" + integrity sha512-PWph7C/CnqdWuu1+SH4U4zdrK4t2HNt0I4XzPYFdv9ugE8EuojselioPQXsVGvjql+Nt3jDLvQvggPqlMbvwRw== + dependencies: + content-hash "^2.5.2" + eth-ens-namehash "2.0.8" + web3-core "1.8.2" + web3-core-helpers "1.8.2" + web3-core-promievent "1.8.2" + web3-eth-abi "1.8.2" + web3-eth-contract "1.8.2" + web3-utils "1.8.2" + +web3-eth-ens@1.9.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/web3-eth-ens/-/web3-eth-ens-1.9.0.tgz#2014b16e1116be5ab34404a8db29ad1d8632ced0" + integrity sha512-LOJZeN+AGe9arhuExnrPPFYQr4WSxXEkpvYIlst/joOEUNLDwfndHnJIK6PI5mXaYSROBtTx6erv+HupzGo7vA== + dependencies: + content-hash "^2.5.2" + eth-ens-namehash "2.0.8" + web3-core "1.9.0" + web3-core-helpers "1.9.0" + web3-core-promievent "1.9.0" + web3-eth-abi "1.9.0" + web3-eth-contract "1.9.0" + web3-utils "1.9.0" + +web3-eth-iban@1.8.2: + version "1.8.2" + resolved "https://registry.yarnpkg.com/web3-eth-iban/-/web3-eth-iban-1.8.2.tgz#5cb3022234b13986f086353b53f0379a881feeaf" + integrity sha512-h3vNblDWkWMuYx93Q27TAJz6lhzpP93EiC3+45D6xoz983p6si773vntoQ+H+5aZhwglBtoiBzdh7PSSOnP/xQ== + dependencies: + bn.js "^5.2.1" + web3-utils "1.8.2" + +web3-eth-iban@1.9.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/web3-eth-iban/-/web3-eth-iban-1.9.0.tgz#a8f838e42c20d49ff58aaa9f67ece47a968e40b1" + integrity sha512-jPAm77PuEs1kE/UrrBFJdPD2PN42pwfXA0gFuuw35bZezhskYML9W4QCxcqnUtceyEA4FUn7K2qTMuCk+23fog== + dependencies: + bn.js "^5.2.1" + web3-utils "1.9.0" + +web3-eth-personal@1.8.2: + version "1.8.2" + resolved "https://registry.yarnpkg.com/web3-eth-personal/-/web3-eth-personal-1.8.2.tgz#3526c1ebaa4e7bf3a0a8ec77e34f067cc9a750b2" + integrity sha512-Vg4HfwCr7doiUF/RC+Jz0wT4+cYaXcOWMAW2AHIjHX6Z7Xwa8nrURIeQgeEE62qcEHAzajyAdB1u6bJyTfuCXw== + dependencies: + "@types/node" "^12.12.6" + web3-core "1.8.2" + web3-core-helpers "1.8.2" + web3-core-method "1.8.2" + web3-net "1.8.2" + web3-utils "1.8.2" + +web3-eth-personal@1.9.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/web3-eth-personal/-/web3-eth-personal-1.9.0.tgz#f5092bcb2688979dd7778d5a56ae6922c341ce52" + integrity sha512-r9Ldo/luBqJlv1vCUEQnUS+C3a3ZdbYxVHyfDkj6RWMyCqqo8JE41HWE+pfa0RmB1xnGL2g8TbYcHcqItck/qg== + dependencies: + "@types/node" "^12.12.6" + web3-core "1.9.0" + web3-core-helpers "1.9.0" + web3-core-method "1.9.0" + web3-net "1.9.0" + web3-utils "1.9.0" + +web3-eth@1.8.2: + version "1.8.2" + resolved "https://registry.yarnpkg.com/web3-eth/-/web3-eth-1.8.2.tgz#8562287ae1803c30eb54dc7d832092e5739ce06a" + integrity sha512-JoTiWWc4F4TInpbvDUGb0WgDYJsFhuIjJlinc5ByjWD88Gvh+GKLsRjjFdbqe5YtwIGT4NymwoC5LQd1K6u/QQ== + dependencies: + web3-core "1.8.2" + web3-core-helpers "1.8.2" + web3-core-method "1.8.2" + web3-core-subscriptions "1.8.2" + web3-eth-abi "1.8.2" + web3-eth-accounts "1.8.2" + web3-eth-contract "1.8.2" + web3-eth-ens "1.8.2" + web3-eth-iban "1.8.2" + web3-eth-personal "1.8.2" + web3-net "1.8.2" + web3-utils "1.8.2" + +web3-eth@1.9.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/web3-eth/-/web3-eth-1.9.0.tgz#1fe82ba429a44b1aa0a3b95de3e79e6c5a9eb00c" + integrity sha512-c5gSWk9bLNr6VPATHmZ1n7LTIefIZQnJMzfnvkoBcIFGKJbGmsuRhv6lEXsKdAO/FlqYnSbaw3fOq1fVFiIOFQ== + dependencies: + web3-core "1.9.0" + web3-core-helpers "1.9.0" + web3-core-method "1.9.0" + web3-core-subscriptions "1.9.0" + web3-eth-abi "1.9.0" + web3-eth-accounts "1.9.0" + web3-eth-contract "1.9.0" + web3-eth-ens "1.9.0" + web3-eth-iban "1.9.0" + web3-eth-personal "1.9.0" + web3-net "1.9.0" + web3-utils "1.9.0" + +web3-net@1.8.2: + version "1.8.2" + resolved "https://registry.yarnpkg.com/web3-net/-/web3-net-1.8.2.tgz#97e1e0015fabc4cda31017813e98d0b5468dd04f" + integrity sha512-1itkDMGmbgb83Dg9nporFes9/fxsU7smJ3oRXlFkg4ZHn8YJyP1MSQFPJWWwSc+GrcCFt4O5IrUTvEkHqE3xag== + dependencies: + web3-core "1.8.2" + web3-core-method "1.8.2" + web3-utils "1.8.2" + +web3-net@1.9.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/web3-net/-/web3-net-1.9.0.tgz#ee8799bf766039aa5b157d6db0be5ffdecd39d64" + integrity sha512-L+fDZFgrLM5Y15aonl2q6L+RvfaImAngmC0Jv45hV2FJ5IfRT0/2ob9etxZmvEBWvOpbqSvghfOhJIT3XZ37Pg== + dependencies: + web3-core "1.9.0" + web3-core-method "1.9.0" + web3-utils "1.9.0" + +web3-providers-http@1.8.2: + version "1.8.2" + resolved "https://registry.yarnpkg.com/web3-providers-http/-/web3-providers-http-1.8.2.tgz#fbda3a3bbc8db004af36e91bec35f80273b37885" + integrity sha512-2xY94IIEQd16+b+vIBF4IC1p7GVaz9q4EUFscvMUjtEq4ru4Atdzjs9GP+jmcoo49p70II0UV3bqQcz0TQfVyQ== + dependencies: + abortcontroller-polyfill "^1.7.3" + cross-fetch "^3.1.4" + es6-promise "^4.2.8" + web3-core-helpers "1.8.2" + +web3-providers-http@1.9.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/web3-providers-http/-/web3-providers-http-1.9.0.tgz#93cd3eb42fff974c9f7634ede1a9795d6435c3fe" + integrity sha512-5+dMNDAE0rRFz6SJpfnBqlVi2J5bB/Ivr2SanMt2YUrkxW5t8betZbzVwRkTbwtUvkqgj3xeUQzqpOttiv+IqQ== + dependencies: + abortcontroller-polyfill "^1.7.3" + cross-fetch "^3.1.4" + es6-promise "^4.2.8" + web3-core-helpers "1.9.0" + +web3-providers-ipc@1.8.2: + version "1.8.2" + resolved "https://registry.yarnpkg.com/web3-providers-ipc/-/web3-providers-ipc-1.8.2.tgz#e52a7250f40c83b99a2482ec5b4cf2728377ae5c" + integrity sha512-p6fqKVGFg+WiXGHWnB1hu43PbvPkDHTz4RgoEzbXugv5rtv5zfYLqm8Ba6lrJOS5ks9kGKR21a0y3NzE3u7V4w== + dependencies: + oboe "2.1.5" + web3-core-helpers "1.8.2" + +web3-providers-ipc@1.9.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/web3-providers-ipc/-/web3-providers-ipc-1.9.0.tgz#db486cb0dde9062ac6055478861e3d37535924d2" + integrity sha512-cPXU93Du40HCylvjaa5x62DbnGqH+86HpK/+kMcFIzF6sDUBhKpag2tSbYhGbj7GMpfkmDTUiiMLdWnFV6+uBA== + dependencies: + oboe "2.1.5" + web3-core-helpers "1.9.0" + +web3-providers-ws@1.8.2: + version "1.8.2" + resolved "https://registry.yarnpkg.com/web3-providers-ws/-/web3-providers-ws-1.8.2.tgz#56a2b701387011aca9154ca4bc06ea4b5f27e4ef" + integrity sha512-3s/4K+wHgbiN+Zrp9YjMq2eqAF6QGABw7wFftPdx+m5hWImV27/MoIx57c6HffNRqZXmCHnfWWFCNHHsi7wXnA== + dependencies: + eventemitter3 "4.0.4" + web3-core-helpers "1.8.2" + websocket "^1.0.32" + +web3-providers-ws@1.9.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/web3-providers-ws/-/web3-providers-ws-1.9.0.tgz#568330766e8abbb6eb43e1153a72fb24398fcb7e" + integrity sha512-JRVsnQZ7j2k1a2yzBNHe39xqk1ijOv01dfIBFw52VeEkSRzvrOcsPIM/ttSyBuJqt70ntMxXY0ekCrqfleKH/w== + dependencies: + eventemitter3 "4.0.4" + web3-core-helpers "1.9.0" + websocket "^1.0.32" + +web3-shh@1.8.2: + version "1.8.2" + resolved "https://registry.yarnpkg.com/web3-shh/-/web3-shh-1.8.2.tgz#217a417f0d6e243dd4d441848ffc2bd164cea8a0" + integrity sha512-uZ+3MAoNcaJsXXNCDnizKJ5viBNeHOFYsCbFhV755Uu52FswzTOw6DtE7yK9nYXMtIhiSgi7nwl1RYzP8pystw== + dependencies: + web3-core "1.8.2" + web3-core-method "1.8.2" + web3-core-subscriptions "1.8.2" + web3-net "1.8.2" + +web3-shh@1.9.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/web3-shh/-/web3-shh-1.9.0.tgz#75a37cd9f78d485ee5f018e2e66853e1e1c6ce4f" + integrity sha512-bIBZlralgz4ICCrwkefB2nPPJWfx28NuHIpjB7d9ADKynElubQuqudYhKtSEkKXACuME/BJm0pIFJcJs/gDnMg== + dependencies: + web3-core "1.9.0" + web3-core-method "1.9.0" + web3-core-subscriptions "1.9.0" + web3-net "1.9.0" + +web3-utils@1.8.2: + version "1.8.2" + resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.8.2.tgz#c32dec5e9b955acbab220eefd7715bc540b75cc9" + integrity sha512-v7j6xhfLQfY7xQDrUP0BKbaNrmZ2/+egbqP9q3KYmOiPpnvAfol+32slgL0WX/5n8VPvKCK5EZ1HGrAVICSToA== + dependencies: + bn.js "^5.2.1" + ethereum-bloom-filters "^1.0.6" + ethereumjs-util "^7.1.0" + ethjs-unit "0.1.6" + number-to-bn "1.7.0" + randombytes "^2.1.0" + utf8 "3.0.0" + +web3-utils@1.9.0, web3-utils@^1.0.0-beta.31, web3-utils@^1.2.5, web3-utils@^1.3.6: + version "1.9.0" + resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.9.0.tgz#7c5775a47586cefb4ad488831be8f6627be9283d" + integrity sha512-p++69rCNNfu2jM9n5+VD/g26l+qkEOQ1m6cfRQCbH8ZRrtquTmrirJMgTmyOoax5a5XRYOuws14aypCOs51pdQ== + dependencies: + bn.js "^5.2.1" + ethereum-bloom-filters "^1.0.6" + ethereumjs-util "^7.1.0" + ethjs-unit "0.1.6" + number-to-bn "1.7.0" + randombytes "^2.1.0" + utf8 "3.0.0" + +web3@1.8.2: + version "1.8.2" + resolved "https://registry.yarnpkg.com/web3/-/web3-1.8.2.tgz#95a4e5398fd0f01325264bf8e5e8cdc69a7afe86" + integrity sha512-92h0GdEHW9wqDICQQKyG4foZBYi0OQkyg4CRml2F7XBl/NG+fu9o6J19kzfFXzSBoA4DnJXbyRgj/RHZv5LRiw== + dependencies: + web3-bzz "1.8.2" + web3-core "1.8.2" + web3-eth "1.8.2" + web3-eth-personal "1.8.2" + web3-net "1.8.2" + web3-shh "1.8.2" + web3-utils "1.8.2" + +web3@^1.2.5: + version "1.9.0" + resolved "https://registry.yarnpkg.com/web3/-/web3-1.9.0.tgz#4fde5d134f8ee11355ed5bfa1bb41f8bc58e23f3" + integrity sha512-E9IvVy/d2ozfQQsCiV+zh/LmlZGv9fQxI0UedDVjm87yOKf4AYbBNEn1iWtHveiGzAk2CEMZMUzAZzaQNSSYog== + dependencies: + web3-bzz "1.9.0" + web3-core "1.9.0" + web3-eth "1.9.0" + web3-eth-personal "1.9.0" + web3-net "1.9.0" + web3-shh "1.9.0" + web3-utils "1.9.0" + +webidl-conversions@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" + integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== + +websocket@^1.0.32: + version "1.0.34" + resolved "https://registry.yarnpkg.com/websocket/-/websocket-1.0.34.tgz#2bdc2602c08bf2c82253b730655c0ef7dcab3111" + integrity sha512-PRDso2sGwF6kM75QykIesBijKSVceR6jL2G8NGYyq2XrItNC2P5/qL5XeR056GhA+Ly7JMFvJb9I312mJfmqnQ== + dependencies: + bufferutil "^4.0.1" + debug "^2.2.0" + es5-ext "^0.10.50" + typedarray-to-buffer "^3.1.5" + utf-8-validate "^5.0.2" + yaeti "^0.0.6" + +whatwg-url@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d" + integrity sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw== + dependencies: + tr46 "~0.0.3" + webidl-conversions "^3.0.0" + +which-boxed-primitive@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz#13757bc89b209b049fe5d86430e21cf40a89a8e6" + integrity sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg== + dependencies: + is-bigint "^1.0.1" + is-boolean-object "^1.1.0" + is-number-object "^1.0.4" + is-string "^1.0.5" + is-symbol "^1.0.3" + +which-module@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f" + integrity sha512-F6+WgncZi/mJDrammbTuHe1q0R5hOXv/mBaiNA2TCNT/LTHusX0V+CJnj9XT8ki5ln2UZyyddDgHfCzyrOH7MQ== + +which-module@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.1.tgz#776b1fe35d90aebe99e8ac15eb24093389a4a409" + integrity sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ== + +which-typed-array@^1.1.2, which-typed-array@^1.1.9: + version "1.1.9" + resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.9.tgz#307cf898025848cf995e795e8423c7f337efbde6" + integrity sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA== + dependencies: + available-typed-arrays "^1.0.5" + call-bind "^1.0.2" + for-each "^0.3.3" + gopd "^1.0.1" + has-tostringtag "^1.0.0" + is-typed-array "^1.1.10" + +which@1.3.1, which@^1.1.1, which@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" + integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== + dependencies: + isexe "^2.0.0" + +wide-align@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" + integrity sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA== + dependencies: + string-width "^1.0.2 || 2" + +window-size@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.2.0.tgz#b4315bb4214a3d7058ebeee892e13fa24d98b075" + integrity sha512-UD7d8HFA2+PZsbKyaOCEy8gMh1oDtHgJh1LfgjQ4zVXmYjAT/kvz3PueITKuqDiIXQe7yzpPnxX3lNc+AhQMyw== + +word-wrap@~1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" + integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== + +wordwrap@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" + integrity sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q== + +wordwrapjs@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/wordwrapjs/-/wordwrapjs-4.0.1.tgz#d9790bccfb110a0fc7836b5ebce0937b37a8b98f" + integrity sha512-kKlNACbvHrkpIw6oPeYDSmdCTu2hdMHoyXLTcUKala++lx5Y+wjJ/e474Jqv5abnVmwxw08DiTuHmw69lJGksA== + dependencies: + reduce-flatten "^2.0.0" + typical "^5.2.0" + +workerpool@6.2.1: + version "6.2.1" + resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.2.1.tgz#46fc150c17d826b86a008e5a4508656777e9c343" + integrity sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw== + +wrap-ansi@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" + integrity sha512-vAaEaDM946gbNpH5pLVNR+vX2ht6n0Bt3GXwVB1AuAqZosOvHNF3P7wDnh8KLkSqgUh0uh77le7Owgoz+Z9XBw== + dependencies: + string-width "^1.0.1" + strip-ansi "^3.0.1" + +wrap-ansi@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-5.1.0.tgz#1fd1f67235d5b6d0fee781056001bfb694c03b09" + integrity sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q== + dependencies: + ansi-styles "^3.2.0" + string-width "^3.0.0" + strip-ansi "^5.0.0" + +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== + +ws@7.4.6: + version "7.4.6" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.6.tgz#5654ca8ecdeee47c33a9a4bf6d28e2be2980377c" + integrity sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A== + +ws@^3.0.0: + version "3.3.3" + resolved "https://registry.yarnpkg.com/ws/-/ws-3.3.3.tgz#f1cf84fe2d5e901ebce94efaece785f187a228f2" + integrity sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA== + dependencies: + async-limiter "~1.0.0" + safe-buffer "~5.1.0" + ultron "~1.1.0" + +ws@^7.4.6: + version "7.5.9" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.9.tgz#54fa7db29f4c7cec68b1ddd3a89de099942bb591" + integrity sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q== + +xhr-request-promise@^0.1.2: + version "0.1.3" + resolved "https://registry.yarnpkg.com/xhr-request-promise/-/xhr-request-promise-0.1.3.tgz#2d5f4b16d8c6c893be97f1a62b0ed4cf3ca5f96c" + integrity sha512-YUBytBsuwgitWtdRzXDDkWAXzhdGB8bYm0sSzMPZT7Z2MBjMSTHFsyCT1yCRATY+XC69DUrQraRAEgcoCRaIPg== + dependencies: + xhr-request "^1.1.0" + +xhr-request@^1.0.1, xhr-request@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/xhr-request/-/xhr-request-1.1.0.tgz#f4a7c1868b9f198723444d82dcae317643f2e2ed" + integrity sha512-Y7qzEaR3FDtL3fP30k9wO/e+FBnBByZeybKOhASsGP30NIkRAAkKD/sCnLvgEfAIEC1rcmK7YG8f4oEnIrrWzA== + dependencies: + buffer-to-arraybuffer "^0.0.5" + object-assign "^4.1.1" + query-string "^5.0.1" + simple-get "^2.7.0" + timed-out "^4.0.1" + url-set-query "^1.0.0" + xhr "^2.0.4" + +xhr@^2.0.4, xhr@^2.3.3: + version "2.6.0" + resolved "https://registry.yarnpkg.com/xhr/-/xhr-2.6.0.tgz#b69d4395e792b4173d6b7df077f0fc5e4e2b249d" + integrity sha512-/eCGLb5rxjx5e3mF1A7s+pLlR6CGyqWN91fv1JgER5mVWg1MZmlhBvy9kjcsOdRk8RrIujotWyJamfyrp+WIcA== + dependencies: + global "~4.4.0" + is-function "^1.0.1" + parse-headers "^2.0.0" + xtend "^4.0.0" + +xmlhttprequest@1.8.0: + version "1.8.0" + resolved "https://registry.yarnpkg.com/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz#67fe075c5c24fef39f9d65f5f7b7fe75171968fc" + integrity sha512-58Im/U0mlVBLM38NdZjHyhuMtCqa61469k2YP/AaPbvCoV9aQGUpbJBj1QRm2ytRiVQBD/fsw7L2bJGDVQswBA== + +xtend@^4.0.0: + version "4.0.2" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" + integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== + +y18n@^3.2.1: + version "3.2.2" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.2.tgz#85c901bd6470ce71fc4bb723ad209b70f7f28696" + integrity sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ== + +y18n@^4.0.0: + version "4.0.3" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.3.tgz#b5f259c82cd6e336921efd7bfd8bf560de9eeedf" + integrity sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ== + +y18n@^5.0.5: + version "5.0.8" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" + integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== + +yaeti@^0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/yaeti/-/yaeti-0.0.6.tgz#f26f484d72684cf42bedfb76970aa1608fbf9577" + integrity sha512-MvQa//+KcZCUkBTIC9blM+CU9J2GzuTytsOUwf2lidtvkx/6gnEp1QvJv34t9vdjhFmha/mUiNDbN0D0mJWdug== + +yallist@^3.0.0, yallist@^3.0.2, yallist@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" + integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== + +yallist@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" + integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== + +yargs-parser@13.1.2, yargs-parser@^13.1.2: + version "13.1.2" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.2.tgz#130f09702ebaeef2650d54ce6e3e5706f7a4fb38" + integrity sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg== + dependencies: + camelcase "^5.0.0" + decamelize "^1.2.0" + +yargs-parser@20.2.4: + version "20.2.4" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54" + integrity sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA== + +yargs-parser@^2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-2.4.1.tgz#85568de3cf150ff49fa51825f03a8c880ddcc5c4" + integrity sha512-9pIKIJhnI5tonzG6OnCFlz/yln8xHYcGl+pn3xR0Vzff0vzN1PbNRaelgfgRUwZ3s4i3jvxT9WhmUGL4whnasA== + dependencies: + camelcase "^3.0.0" + lodash.assign "^4.0.6" + +yargs-parser@^20.2.2: + version "20.2.9" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" + integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== + +yargs-unparser@1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-1.6.0.tgz#ef25c2c769ff6bd09e4b0f9d7c605fb27846ea9f" + integrity sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw== + dependencies: + flat "^4.1.0" + lodash "^4.17.15" + yargs "^13.3.0" + +yargs-unparser@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-2.0.0.tgz#f131f9226911ae5d9ad38c432fe809366c2325eb" + integrity sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA== + dependencies: + camelcase "^6.0.0" + decamelize "^4.0.0" + flat "^5.0.2" + is-plain-obj "^2.1.0" + +yargs@13.3.2, yargs@^13.3.0: + version "13.3.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.2.tgz#ad7ffefec1aa59565ac915f82dccb38a9c31a2dd" + integrity sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw== + dependencies: + cliui "^5.0.0" + find-up "^3.0.0" + get-caller-file "^2.0.1" + require-directory "^2.1.1" + require-main-filename "^2.0.0" + set-blocking "^2.0.0" + string-width "^3.0.0" + which-module "^2.0.0" + y18n "^4.0.0" + yargs-parser "^13.1.2" + +yargs@16.2.0: + version "16.2.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" + integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== + dependencies: + cliui "^7.0.2" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.0" + y18n "^5.0.5" + yargs-parser "^20.2.2" + +yargs@^4.7.1: + version "4.8.1" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-4.8.1.tgz#c0c42924ca4aaa6b0e6da1739dfb216439f9ddc0" + integrity sha512-LqodLrnIDM3IFT+Hf/5sxBnEGECrfdC1uIbgZeJmESCSo4HoCAaKEus8MylXHAkdacGc0ye+Qa+dpkuom8uVYA== + dependencies: + cliui "^3.2.0" + decamelize "^1.1.1" + get-caller-file "^1.0.1" + lodash.assign "^4.0.3" + os-locale "^1.4.0" + read-pkg-up "^1.0.1" + require-directory "^2.1.1" + require-main-filename "^1.0.1" + set-blocking "^2.0.0" + string-width "^1.0.1" + which-module "^1.0.0" + window-size "^0.2.0" + y18n "^3.2.1" + yargs-parser "^2.4.1" + +yn@3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" + integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q== + +yocto-queue@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" + integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== + +zksync-web3@^0.14.3: + version "0.14.3" + resolved "https://registry.yarnpkg.com/zksync-web3/-/zksync-web3-0.14.3.tgz#64ac2a16d597464c3fc4ae07447a8007631c57c9" + integrity sha512-hT72th4AnqyLW1d5Jlv8N2B/qhEnl2NePK2A3org7tAa24niem/UAaHMkEvmWI3SF9waYUPtqAtjpf+yvQ9zvQ== From f6a07a154106b25041b2c1baf25867158b54f565 Mon Sep 17 00:00:00 2001 From: alexstratos Date: Fri, 2 Jun 2023 11:30:59 -0400 Subject: [PATCH 87/95] update for conflicts --- x/register/keeper/store.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/register/keeper/store.go b/x/register/keeper/store.go index 8a257c9d..9e14e344 100644 --- a/x/register/keeper/store.go +++ b/x/register/keeper/store.go @@ -47,7 +47,7 @@ func (k Keeper) GetRemainingOzoneLimit(ctx sdk.Context) (value sdk.Int) { } func (k *Keeper) CalculatePurchaseAmount(ctx sdk.Context, amount sdk.Int) (sdk.Int, sdk.Int, error) { - St := k.GetEffectiveTotalStake(ctx) + St := k.GetEffectiveTotalDeposit(ctx) Pt := k.GetTotalUnissuedPrepay(ctx).Amount Lt := k.GetRemainingOzoneLimit(ctx) From a9ff13ae52e7491ad3eded43ff714e0d84c6f604 Mon Sep 17 00:00:00 2001 From: alexstratos Date: Fri, 2 Jun 2023 11:54:13 -0400 Subject: [PATCH 88/95] fix the conflicts of merge --- go.mod | 6 ++---- go.sum | 3 --- x/evm/keeper/store.go | 2 +- x/evm/types/interfaces.go | 2 +- x/register/keeper/store_new.go | 4 ++-- 5 files changed, 6 insertions(+), 11 deletions(-) diff --git a/go.mod b/go.mod index 93c528ac..0b52a756 100644 --- a/go.mod +++ b/go.mod @@ -16,6 +16,7 @@ require ( github.com/golang/protobuf v1.5.2 github.com/gorilla/mux v1.8.0 github.com/grpc-ecosystem/grpc-gateway v1.16.0 + github.com/holiman/uint256 v1.2.0 github.com/improbable-eng/grpc-web v0.15.0 github.com/ipfs/go-cid v0.1.0 github.com/kelindar/bitmap v1.4.1 @@ -30,6 +31,7 @@ require ( github.com/tendermint/tendermint v0.34.25-0.20221221220620-936221e0a8d9 github.com/tendermint/tm-db v0.6.7 github.com/tyler-smith/go-bip39 v1.1.0 + golang.org/x/crypto v0.4.0 google.golang.org/genproto v0.0.0-20221024183307-1bc688fe9f3e google.golang.org/grpc v1.50.1 google.golang.org/protobuf v1.28.2-0.20220831092852-f930b1dc76e8 @@ -75,7 +77,6 @@ require ( github.com/felixge/httpsnoop v1.0.1 // indirect github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect - github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff // indirect github.com/go-kit/kit v0.12.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.5.1 // indirect @@ -101,7 +102,6 @@ require ( github.com/hashicorp/hcl v1.0.0 // indirect github.com/hdevalence/ed25519consensus v0.0.0-20210204194344-59a8610d2b87 // indirect github.com/holiman/bloomfilter/v2 v2.0.3 // indirect - github.com/holiman/uint256 v1.2.0 // indirect github.com/huin/goupnp v1.0.3 // indirect github.com/inconshreveable/mousetrap v1.0.1 // indirect github.com/jackpal/go-nat-pmp v1.0.2 // indirect @@ -150,7 +150,6 @@ require ( github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible // indirect github.com/spf13/afero v1.9.2 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect - github.com/status-im/keycard-go v0.0.0-20200402102358-957c09536969 // indirect github.com/subosito/gotenv v1.4.1 // indirect github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect github.com/tendermint/go-amino v0.16.0 // indirect @@ -162,7 +161,6 @@ require ( github.com/zondax/hid v0.9.1 // indirect github.com/zondax/ledger-go v0.14.1 // indirect go.etcd.io/bbolt v1.3.6 // indirect - golang.org/x/crypto v0.4.0 // indirect golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e // indirect golang.org/x/net v0.4.0 // indirect golang.org/x/sync v0.1.0 // indirect diff --git a/go.sum b/go.sum index ceeeb008..ab46df16 100644 --- a/go.sum +++ b/go.sum @@ -272,7 +272,6 @@ github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMo github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= -github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff h1:tY80oXqGNY4FhTFhk+o9oFHGINQ/+vhlm8HFzi6znCI= github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= @@ -816,8 +815,6 @@ github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DM github.com/spf13/viper v1.14.0 h1:Rg7d3Lo706X9tHsJMUjdiwMpHB7W8WnSVOssIY+JElU= github.com/spf13/viper v1.14.0/go.mod h1:WT//axPky3FdvXHzGw33dNdXXXfFQqmEalje+egj8As= github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4/go.mod h1:RZLeN1LMWmRsyYjvAu+I6Dm9QmlDaIIt+Y+4Kd7Tp+Q= -github.com/status-im/keycard-go v0.0.0-20200402102358-957c09536969 h1:Oo2KZNP70KE0+IUJSidPj/BFS/RXNHmKIJOdckzml2E= -github.com/status-im/keycard-go v0.0.0-20200402102358-957c09536969/go.mod h1:RZLeN1LMWmRsyYjvAu+I6Dm9QmlDaIIt+Y+4Kd7Tp+Q= github.com/steakknife/bloomfilter v0.0.0-20180922174646-6819c0d2a570/go.mod h1:8OR4w3TdeIHIh1g6EMY5p0gVNOovcWC+1vpc7naMuAw= github.com/steakknife/hamming v0.0.0-20180906055917-c99c65617cd3/go.mod h1:hpGUWaI9xL8pRQCTXQgocU38Qw1g0Us7n5PxxTwTCYU= github.com/stratosnet/cosmos-sdk v0.45.12-0.20230124002546-fd8c3abd07d5 h1:WjTdRjQkoPKDtp2gaGu9s/Cv5QC4ahRI9VRuex+XvQE= diff --git a/x/evm/keeper/store.go b/x/evm/keeper/store.go index fcf4fec3..1f4109d6 100644 --- a/x/evm/keeper/store.go +++ b/x/evm/keeper/store.go @@ -22,7 +22,7 @@ func (k Keeper) KeeGetTotalUnissuedPrepay(statedb vm.StateDB) (value sdk.Int) { func (k *Keeper) KeeCalculatePrepayPurchaseAmount(statedb vm.StateDB, amount sdk.Int) (sdk.Int, sdk.Int, error) { kdb := statedb.GetKeestateDB() - St := k.registerKeeper.KeeGetEffectiveTotalStake(kdb) + St := k.registerKeeper.KeeGetEffectiveTotalDeposit(kdb) Pt := k.KeeGetTotalUnissuedPrepay(statedb) Lt := k.registerKeeper.KeeGetRemainingOzoneLimit(kdb) diff --git a/x/evm/types/interfaces.go b/x/evm/types/interfaces.go index 5bbbad55..0a6afb98 100644 --- a/x/evm/types/interfaces.go +++ b/x/evm/types/interfaces.go @@ -41,7 +41,7 @@ type StakingKeeper interface { // RegisterKeeper defines functionality related for meta and resource node type RegisterKeeper interface { - KeeGetEffectiveTotalStake(kdb *keestatedb.KeestateDB) sdk.Int + KeeGetEffectiveTotalDeposit(kdb *keestatedb.KeestateDB) sdk.Int KeeGetRemainingOzoneLimit(kdb *keestatedb.KeestateDB) sdk.Int KeeSetRemainingOzoneLimit(kdb *keestatedb.KeestateDB, value sdk.Int) } diff --git a/x/register/keeper/store_new.go b/x/register/keeper/store_new.go index 9396e550..36dd812b 100644 --- a/x/register/keeper/store_new.go +++ b/x/register/keeper/store_new.go @@ -7,8 +7,8 @@ import ( "github.com/stratosnet/stratos-chain/x/register/types" ) -func (k *Keeper) KeeGetEffectiveTotalStake(kstatedb *statedb.KeestateDB) (stake sdk.Int) { - bz := kstatedb.GetState(k.storeKey, types.EffectiveGenesisStakeTotalKey) +func (k *Keeper) KeeGetEffectiveTotalDeposit(kstatedb *statedb.KeestateDB) (stake sdk.Int) { + bz := kstatedb.GetState(k.storeKey, types.EffectiveGenesisDepositTotalKey) if bz == nil { return sdk.ZeroInt() } From 9a6d60a8d6931f22e119061f2209db5c7a5f0e42 Mon Sep 17 00:00:00 2001 From: bjlqsnetwork Date: Mon, 12 Jun 2023 09:59:25 -0400 Subject: [PATCH 89/95] fix/qb1866: fix token supply (#280) * - qb1866: fix token supply Co-authored-by: jialbai --- app/app.go | 4 +- x/evm/keeper/keeper.go | 4 +- x/evm/keeper/statedb.go | 2 +- x/evm/types/interfaces.go | 8 ++- x/pot/abci.go | 17 +++---- x/pot/genesis.go | 9 ++++ x/pot/keeper/keeper.go | 89 ++++++++++++++++++--------------- x/pot/types/expected_keepers.go | 1 + 8 files changed, 78 insertions(+), 56 deletions(-) diff --git a/app/app.go b/app/app.go index e7b0ea74..96c61dc9 100644 --- a/app/app.go +++ b/app/app.go @@ -158,7 +158,7 @@ var ( maccPerms = map[string][]string{ authtypes.FeeCollectorName: nil, - distrtypes.ModuleName: nil, + distrtypes.ModuleName: {authtypes.Burner}, minttypes.ModuleName: {authtypes.Minter}, stakingtypes.BondedPoolName: {authtypes.Burner, authtypes.Staking}, stakingtypes.NotBondedPoolName: {authtypes.Burner, authtypes.Staking}, @@ -360,7 +360,7 @@ func NewInitApp( tracer := cast.ToString(appOpts.Get(srvflags.EVMTracer)) app.evmKeeper = evmkeeper.NewKeeper( appCodec, keys[evmtypes.StoreKey], tKeys[evmtypes.TransientKey], app.GetSubspace(evmtypes.ModuleName), - app.accountKeeper, app.bankKeeper, app.stakingKeeper, nil, tracer, + app.accountKeeper, app.bankKeeper, app.stakingKeeper, app.potKeeper, nil, tracer, ) // Create IBC Keeper diff --git a/x/evm/keeper/keeper.go b/x/evm/keeper/keeper.go index c37acdf9..dceb7e45 100644 --- a/x/evm/keeper/keeper.go +++ b/x/evm/keeper/keeper.go @@ -47,6 +47,8 @@ type Keeper struct { bankKeeper types.BankKeeper // access historical headers for EVM state transition execution stakingKeeper types.StakingKeeper + // access for pot functionality with related keeper + potKeeper types.PotKeeper // access for registry functionality with related keeper registerKeeper types.RegisterKeeper // access for sds functionality with related keeper @@ -69,7 +71,7 @@ type Keeper struct { func NewKeeper( cdc codec.BinaryCodec, storeKey, transientKey sdk.StoreKey, paramSpace paramtypes.Subspace, - ak types.AccountKeeper, bankKeeper types.BankKeeper, sk types.StakingKeeper, + ak types.AccountKeeper, bankKeeper types.BankKeeper, sk types.StakingKeeper, potKeeper types.PotKeeper, sdsKeeper types.SdsKeeper, tracer string, ) *Keeper { diff --git a/x/evm/keeper/statedb.go b/x/evm/keeper/statedb.go index df423e6a..f118f0af 100644 --- a/x/evm/keeper/statedb.go +++ b/x/evm/keeper/statedb.go @@ -82,7 +82,7 @@ func (k *Keeper) SetBalance(ctx sdk.Context, addr common.Address, amount *big.In case 1: // mint coins := sdk.NewCoins(sdk.NewCoin(params.EvmDenom, sdk.NewIntFromBigInt(delta))) - if err := k.bankKeeper.MintCoins(ctx, types.ModuleName, coins); err != nil { + if err := k.potKeeper.SafeMintCoins(ctx, types.ModuleName, coins); err != nil { return err } if err := k.bankKeeper.SendCoinsFromModuleToAccount(ctx, types.ModuleName, cosmosAddr, coins); err != nil { diff --git a/x/evm/types/interfaces.go b/x/evm/types/interfaces.go index 0a6afb98..63c58100 100644 --- a/x/evm/types/interfaces.go +++ b/x/evm/types/interfaces.go @@ -29,8 +29,8 @@ type BankKeeper interface { SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error // SendCoinsFromModuleToModule(ctx sdk.Context, senderModule, recipientModule string, amt sdk.Coins) error SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error - MintCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error BurnCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error + GetSupply(ctx sdk.Context, denom string) sdk.Coin } // StakingKeeper returns the historical headers kept in store. @@ -51,6 +51,12 @@ type SdsKeeper interface { Prepay(ctx sdk.Context, sender sdk.AccAddress, coins sdk.Coins) (sdk.Int, error) } +type PotKeeper interface { + InitialTotalSupply(ctx sdk.Context) sdk.Coin + BondDenom(ctx sdk.Context) string + SafeMintCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error +} + // Event Hooks // These can be utilized to customize evm transaction processing. diff --git a/x/pot/abci.go b/x/pot/abci.go index c750833b..806c7a8d 100644 --- a/x/pot/abci.go +++ b/x/pot/abci.go @@ -7,6 +7,8 @@ import ( "github.com/stratosnet/stratos-chain/x/pot/keeper" ) +const CHECK_TOTAL_SUPPLY_INTERVAL = 10000 + // BeginBlocker check for infraction evidence or downtime of validators // on every begin block func BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock, k keeper.Keeper) { @@ -24,15 +26,10 @@ func EndBlocker(ctx sdk.Context, req abci.RequestEndBlock, k keeper.Keeper) []ab logger.Error("An error occurred while distributing the reward. ", "ErrMsg", err.Error()) } - // reset total supply to 100M stos - //minter, amount := k.RestoreTotalSupply(ctx) - //if minter.Empty() || amount.Empty() { - // return []abci.ValidatorUpdate{} - //} - // - //ctx.EventManager().EmitEvent( - // banktypes.NewCoinMintEvent(minter, amount), - //) - + // reset total supply to 100M stos every 10k blocks + if ctx.BlockHeight()%CHECK_TOTAL_SUPPLY_INTERVAL == 1 { + logger.Info("start RestoreTotalSupply") + k.RestoreTotalSupply(ctx) + } return []abci.ValidatorUpdate{} } diff --git a/x/pot/genesis.go b/x/pot/genesis.go index 9826de97..d5f1fdef 100644 --- a/x/pot/genesis.go +++ b/x/pot/genesis.go @@ -1,6 +1,8 @@ package pot import ( + "fmt" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stratosnet/stratos-chain/x/pot/keeper" @@ -39,6 +41,13 @@ func InitGenesis(ctx sdk.Context, keeper keeper.Keeper, data *types.GenesisState } keeper.SetMaturedEpoch(ctx, data.MaturedEpoch) + // ensure total supply of bank module is LT InitialTotalSupply + totalSupply := keeper.GetSupply(ctx) + if keeper.GetParams(ctx).InitialTotalSupply.IsLT(totalSupply) { + errMsg := fmt.Sprintf("current total supply[%v] is greater than total supply limit[%v]", + totalSupply.String(), keeper.GetParams(ctx).InitialTotalSupply.String()) + panic(errMsg) + } } // ExportGenesis writes the current store values diff --git a/x/pot/keeper/keeper.go b/x/pot/keeper/keeper.go index 896b1778..3e33733b 100644 --- a/x/pot/keeper/keeper.go +++ b/x/pot/keeper/keeper.go @@ -1,7 +1,7 @@ package keeper import ( - "bytes" + "errors" "fmt" "math" @@ -9,7 +9,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" + distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" @@ -87,61 +87,68 @@ func (k Keeper) FoundationDeposit(ctx sdk.Context, amount sdk.Coins, from sdk.Ac return nil } -// Restore total supply to 100M stos -func (k Keeper) RestoreTotalSupply(ctx sdk.Context) (minter sdk.AccAddress, mintCoins sdk.Coins) { - // reset total supply to 100M stos - events := ctx.EventManager().Events() - attrKeyAmtBytes := []byte(sdk.AttributeKeyAmount) - - totalBurnedCoins := sdk.Coins{} - for _, event := range events { - if event.Type == banktypes.EventTypeCoinBurn { - attributes := event.Attributes - for _, attr := range attributes { - if bytes.Equal(attr.Key, attrKeyAmtBytes) { - amount, err := sdk.ParseCoinsNormalized(string(attr.Value)) - if err != nil { - ctx.Logger().Error("An error occurred while parsing burned amount. ", "ErrMsg", err.Error()) - break - } - totalBurnedCoins = totalBurnedCoins.Add(amount...) - } - } - } +func (k Keeper) SafeMintCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error { + denom := k.BondDenom(ctx) + communityPollBalance := k.distrKeeper.GetFeePool(ctx).CommunityPool + availableCoinsCommunity := communityPollBalance.AmountOf(denom) + if amt.AmountOf(denom).ToDec().GT(availableCoinsCommunity) { + return errors.New("minting not completed because total supply cap is hit") } + return k.bankKeeper.MintCoins(ctx, moduleName, amt) +} - totalBurned := totalBurnedCoins.AmountOf(k.BondDenom(ctx)) - if totalBurned.IsZero() { - return sdk.AccAddress{}, sdk.Coins{} +func (k Keeper) safeBurnCoinsFromCommunityPool(ctx sdk.Context, coins sdk.Coins) error { + communityPollBalance := k.distrKeeper.GetFeePool(ctx).CommunityPool + //ctx.Logger().Info("------communityPollBalance is " + communityPollBalance.String()) + if communityPollBalance.AmountOf(k.BondDenom(ctx)).GTE(coins.AmountOf(k.BondDenom(ctx)).ToDec()) { + k.bankKeeper.BurnCoins(ctx, distrtypes.ModuleName, coins) + return nil } + return errors.New("burning not completed as a result of insufficient balance in community pool") +} +// Restore total supply to 100M stos +func (k Keeper) RestoreTotalSupply(ctx sdk.Context) (minted, burned sdk.Coins) { InitialTotalSupply := k.InitialTotalSupply(ctx).Amount currentTotalSupply := k.bankKeeper.GetSupply(ctx, k.BondDenom(ctx)).Amount - - if totalBurned.Add(currentTotalSupply).GT(InitialTotalSupply) { - mintCoins = sdk.NewCoins( - sdk.NewCoin(k.BondDenom(ctx), InitialTotalSupply.Sub(currentTotalSupply)), - ) - } else { - mintCoins = totalBurnedCoins + //ctx.Logger().Info("------currentTotalSupply is " + currentTotalSupply.String()) + if InitialTotalSupply.Equal(currentTotalSupply) { + //ctx.Logger().Info("------no need to restore") + return sdk.Coins{}, sdk.Coins{} } - - // mint coins - err := k.bankKeeper.MintCoins(ctx, types.ModuleName, mintCoins) + supplyDiff := currentTotalSupply.Sub(InitialTotalSupply) + if supplyDiff.GT(sdk.ZeroInt()) { + // burn surplus if currentTotalSupply > InitialTotalSupply + amtToBurn := supplyDiff + coinToBurn := sdk.NewCoin(k.BondDenom(ctx), amtToBurn) + coinsToBurn := sdk.NewCoins(coinToBurn) + err := k.safeBurnCoinsFromCommunityPool(ctx, coinsToBurn) + if err != nil { + return sdk.Coins{}, sdk.Coins{} + } + return sdk.Coins{}, coinsToBurn + } + // mint slack + amtToMint := supplyDiff.Abs() + coinToMint := sdk.NewCoin(k.BondDenom(ctx), amtToMint) + coinsToMint := sdk.NewCoins(coinToMint) + err := k.bankKeeper.MintCoins(ctx, types.ModuleName, coinsToMint) // do not use SafeMintCoins here if err != nil { ctx.Logger().Error("Restore total supply failed:", err.Error()) - return sdk.AccAddress{}, sdk.Coins{} + return sdk.Coins{}, sdk.Coins{} } - // send new mint coins to community pool senderAddr := k.accountKeeper.GetModuleAddress(types.ModuleName) - err = k.distrKeeper.FundCommunityPool(ctx, mintCoins, senderAddr) + err = k.distrKeeper.FundCommunityPool(ctx, coinsToMint, senderAddr) if err != nil { ctx.Logger().Error("Restore total supply failed:", err.Error()) - return sdk.AccAddress{}, sdk.Coins{} + return sdk.Coins{}, sdk.Coins{} } + return coinsToMint, sdk.Coins{} +} - return +func (k Keeper) GetSupply(ctx sdk.Context) (totalSupply sdk.Coin) { + return k.bankKeeper.GetSupply(ctx, k.BondDenom(ctx)) } func (k Keeper) GetCirculationSupply(ctx sdk.Context) (circulationSupply sdk.Coins) { diff --git a/x/pot/types/expected_keepers.go b/x/pot/types/expected_keepers.go index 658d811a..758ba701 100644 --- a/x/pot/types/expected_keepers.go +++ b/x/pot/types/expected_keepers.go @@ -23,6 +23,7 @@ type BankKeeper interface { GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin GetSupply(ctx sdk.Context, denom string) sdk.Coin MintCoins(ctx sdk.Context, moduleName string, amounts sdk.Coins) error + BurnCoins(ctx sdk.Context, moduleName string, amounts sdk.Coins) error } type RegisterKeeper interface { From b21d0670d46022811881f3813767bb48fea5a8ed Mon Sep 17 00:00:00 2001 From: Xixiong Chen <60588630+Xiong-stratos@users.noreply.github.com> Date: Mon, 12 Jun 2023 10:45:53 -0400 Subject: [PATCH 90/95] add address convert api (#281) --- proto/stratos/evm/v1/query.proto | 23 +- types/validation.go | 4 +- x/evm/keeper/grpc_query.go | 54 ++- x/evm/types/access_list_tx.go | 2 +- x/evm/types/dynamic_fee_tx.go | 2 +- x/evm/types/genesis.go | 2 +- x/evm/types/legacy_tx.go | 2 +- x/evm/types/logs.go | 2 +- x/evm/types/msg.go | 2 +- x/evm/types/query.pb.go | 610 ++++++++++++++++++++++++++----- x/evm/types/query.pb.gw.go | 80 ++++ 11 files changed, 674 insertions(+), 109 deletions(-) diff --git a/proto/stratos/evm/v1/query.proto b/proto/stratos/evm/v1/query.proto index 181a5dc0..8d0b1417 100644 --- a/proto/stratos/evm/v1/query.proto +++ b/proto/stratos/evm/v1/query.proto @@ -87,6 +87,10 @@ service Query { rpc BlockGas(QueryBlockGasRequest) returns (QueryBlockGasResponse) { option (google.api.http).get = "/stratos/evm/v1/block_gas"; } + + rpc AddressConvert(QueryAddressConvertRequest) returns (QueryAddressConvertResponse) { + option (google.api.http).get = "/stratos/evm/v1/address_convert"; + } } // QueryAccountRequest is the request type for the Query/Account RPC method. @@ -292,7 +296,7 @@ message QueryBaseFeeRequest {} // BaseFeeResponse returns the EIP1559 base fee. message QueryBaseFeeResponse { string base_fee = 1 - [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int" ]; + [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int"]; } // QueryBlockGasRequest defines the request type for querying the EIP1559 base @@ -300,4 +304,19 @@ message QueryBaseFeeResponse { message QueryBlockGasRequest {} // QueryBlockGasResponse returns block gas used for a given height. -message QueryBlockGasResponse { int64 gas = 1; } \ No newline at end of file +message QueryBlockGasResponse {int64 gas = 1;} + +// QueryAddressConvertRequest defines AddressConvert request +message QueryAddressConvertRequest { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // hex address or bech32 address + string address = 1; +} + +// QueryAddressConvertResponse returns address check result and hex/bech32 address +message QueryAddressConvertResponse { + string hex_address = 1; + string bech32_address = 2; +} \ No newline at end of file diff --git a/types/validation.go b/types/validation.go index 15e27ee3..a2a4ba16 100644 --- a/types/validation.go +++ b/types/validation.go @@ -18,8 +18,8 @@ func IsZeroAddress(address string) bool { return bytes.Equal(common.HexToAddress(address).Bytes(), common.Address{}.Bytes()) } -// ValidateAddress returns an error if the provided string is either not a hex formatted string address -func ValidateAddress(address string) error { +// ValidateHexAddress returns an error if the provided string is either not a hex formatted string address +func ValidateHexAddress(address string) error { if !common.IsHexAddress(address) { return sdkerrors.Wrapf( sdkerrors.ErrInvalidAddress, "address '%s' is not a valid ethereum hex address", diff --git a/x/evm/keeper/grpc_query.go b/x/evm/keeper/grpc_query.go index a8fe639d..6f209e74 100644 --- a/x/evm/keeper/grpc_query.go +++ b/x/evm/keeper/grpc_query.go @@ -6,6 +6,7 @@ import ( "errors" "fmt" "math/big" + "strings" "time" "google.golang.org/grpc/codes" @@ -17,13 +18,12 @@ import ( "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/core" ethtypes "github.com/ethereum/go-ethereum/core/types" - ethparams "github.com/ethereum/go-ethereum/params" - "github.com/stratosnet/stratos-chain/x/evm/tracers" - "github.com/stratosnet/stratos-chain/x/evm/tracers/logger" stratos "github.com/stratosnet/stratos-chain/types" "github.com/stratosnet/stratos-chain/x/evm/statedb" + "github.com/stratosnet/stratos-chain/x/evm/tracers" + "github.com/stratosnet/stratos-chain/x/evm/tracers/logger" "github.com/stratosnet/stratos-chain/x/evm/types" "github.com/stratosnet/stratos-chain/x/evm/vm" ) @@ -40,7 +40,7 @@ func (k Keeper) Account(c context.Context, req *types.QueryAccountRequest) (*typ return nil, status.Error(codes.InvalidArgument, "empty request") } - if err := stratos.ValidateAddress(req.Address); err != nil { + if err := stratos.ValidateHexAddress(req.Address); err != nil { return nil, status.Error( codes.InvalidArgument, err.Error(), ) @@ -63,7 +63,7 @@ func (k Keeper) CosmosAccount(c context.Context, req *types.QueryCosmosAccountRe return nil, status.Error(codes.InvalidArgument, "empty request") } - if err := stratos.ValidateAddress(req.Address); err != nil { + if err := stratos.ValidateHexAddress(req.Address); err != nil { return nil, status.Error( codes.InvalidArgument, err.Error(), ) @@ -127,7 +127,7 @@ func (k Keeper) Balance(c context.Context, req *types.QueryBalanceRequest) (*typ return nil, status.Error(codes.InvalidArgument, "empty request") } - if err := stratos.ValidateAddress(req.Address); err != nil { + if err := stratos.ValidateHexAddress(req.Address); err != nil { return nil, status.Error( codes.InvalidArgument, types.ErrZeroAddress.Error(), @@ -149,7 +149,7 @@ func (k Keeper) Storage(c context.Context, req *types.QueryStorageRequest) (*typ return nil, status.Error(codes.InvalidArgument, "empty request") } - if err := stratos.ValidateAddress(req.Address); err != nil { + if err := stratos.ValidateHexAddress(req.Address); err != nil { return nil, status.Error( codes.InvalidArgument, types.ErrZeroAddress.Error(), @@ -175,7 +175,7 @@ func (k Keeper) Code(c context.Context, req *types.QueryCodeRequest) (*types.Que return nil, status.Error(codes.InvalidArgument, "empty request") } - if err := stratos.ValidateAddress(req.Address); err != nil { + if err := stratos.ValidateHexAddress(req.Address); err != nil { return nil, status.Error( codes.InvalidArgument, types.ErrZeroAddress.Error(), @@ -625,3 +625,41 @@ func (k Keeper) BlockGas(c context.Context, _ *types.QueryBlockGasRequest) (*typ Gas: int64(gas), }, nil } + +func (k Keeper) AddressConvert(_ context.Context, req *types.QueryAddressConvertRequest) (*types.QueryAddressConvertResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "empty request") + } + + bech32AccAddrPrefix := stratos.GetConfig().GetBech32AccountAddrPrefix() + + var addrBytes []byte + var err error + + if strings.HasPrefix(req.Address, bech32AccAddrPrefix) { + addrBytes, err = sdk.GetFromBech32(req.Address, bech32AccAddrPrefix) + if err != nil { + return nil, status.Error(codes.InvalidArgument, err.Error()) + } + } else { + if err = stratos.ValidateHexAddress(req.Address); err != nil { + return nil, status.Error(codes.InvalidArgument, err.Error()) + } + addrBytes = common.HexToAddress(req.Address).Bytes() + } + + err = sdk.VerifyAddressFormat(addrBytes) + if err != nil { + return nil, status.Error(codes.InvalidArgument, err.Error()) + } + + hexAddr := common.BytesToAddress(addrBytes).String() + bech32Addr := sdk.AccAddress(addrBytes).String() + + res := &types.QueryAddressConvertResponse{ + HexAddress: hexAddr, + Bech32Address: bech32Addr, + } + + return res, nil +} diff --git a/x/evm/types/access_list_tx.go b/x/evm/types/access_list_tx.go index 103777e7..5ba523fd 100644 --- a/x/evm/types/access_list_tx.go +++ b/x/evm/types/access_list_tx.go @@ -207,7 +207,7 @@ func (tx AccessListTx) Validate() error { } if tx.To != "" { - if err := types.ValidateAddress(tx.To); err != nil { + if err := types.ValidateHexAddress(tx.To); err != nil { return sdkerrors.Wrap(err, "invalid to address") } } diff --git a/x/evm/types/dynamic_fee_tx.go b/x/evm/types/dynamic_fee_tx.go index 7f51a48d..8968fb02 100644 --- a/x/evm/types/dynamic_fee_tx.go +++ b/x/evm/types/dynamic_fee_tx.go @@ -240,7 +240,7 @@ func (tx DynamicFeeTx) Validate() error { } if tx.To != "" { - if err := types.ValidateAddress(tx.To); err != nil { + if err := types.ValidateHexAddress(tx.To); err != nil { return sdkerrors.Wrap(err, "invalid to address") } } diff --git a/x/evm/types/genesis.go b/x/evm/types/genesis.go index d015c173..9c048cfb 100644 --- a/x/evm/types/genesis.go +++ b/x/evm/types/genesis.go @@ -8,7 +8,7 @@ import ( // Validate performs a basic validation of a GenesisAccount fields. func (ga GenesisAccount) Validate() error { - if err := stratos.ValidateAddress(ga.Address); err != nil { + if err := stratos.ValidateHexAddress(ga.Address); err != nil { return err } return ga.Storage.Validate() diff --git a/x/evm/types/legacy_tx.go b/x/evm/types/legacy_tx.go index 4eeadea3..293812cf 100644 --- a/x/evm/types/legacy_tx.go +++ b/x/evm/types/legacy_tx.go @@ -184,7 +184,7 @@ func (tx LegacyTx) Validate() error { } if tx.To != "" { - if err := types.ValidateAddress(tx.To); err != nil { + if err := types.ValidateHexAddress(tx.To); err != nil { return sdkerrors.Wrap(err, "invalid to address") } } diff --git a/x/evm/types/logs.go b/x/evm/types/logs.go index 41086048..d7d44b89 100644 --- a/x/evm/types/logs.go +++ b/x/evm/types/logs.go @@ -53,7 +53,7 @@ func (tx TransactionLogs) EthLogs() []*ethtypes.Log { // Validate performs a basic validation of an ethereum Log fields. func (log *Log) Validate() error { - if err := stratos.ValidateAddress(log.Address); err != nil { + if err := stratos.ValidateHexAddress(log.Address); err != nil { return fmt.Errorf("invalid log address %w", err) } if stratos.IsEmptyHash(log.BlockHash) { diff --git a/x/evm/types/msg.go b/x/evm/types/msg.go index f3d2b077..d2db4506 100644 --- a/x/evm/types/msg.go +++ b/x/evm/types/msg.go @@ -161,7 +161,7 @@ func (msg MsgEthereumTx) Type() string { return TypeMsgEthereumTx } // checks of a Transaction. If returns an error if validation fails. func (msg MsgEthereumTx) ValidateBasic() error { if msg.From != "" { - if err := types.ValidateAddress(msg.From); err != nil { + if err := types.ValidateHexAddress(msg.From); err != nil { return sdkerrors.Wrap(err, "invalid from address") } } diff --git a/x/evm/types/query.pb.go b/x/evm/types/query.pb.go index ce439dbf..8998ce67 100644 --- a/x/evm/types/query.pb.go +++ b/x/evm/types/query.pb.go @@ -1311,6 +1311,98 @@ func (m *QueryBlockGasResponse) GetGas() int64 { return 0 } +// QueryAddressConvertRequest defines AddressConvert request +type QueryAddressConvertRequest struct { + // hex address or bech32 address + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` +} + +func (m *QueryAddressConvertRequest) Reset() { *m = QueryAddressConvertRequest{} } +func (m *QueryAddressConvertRequest) String() string { return proto.CompactTextString(m) } +func (*QueryAddressConvertRequest) ProtoMessage() {} +func (*QueryAddressConvertRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_f35039d5386d306b, []int{26} +} +func (m *QueryAddressConvertRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAddressConvertRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAddressConvertRequest.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 *QueryAddressConvertRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAddressConvertRequest.Merge(m, src) +} +func (m *QueryAddressConvertRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryAddressConvertRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAddressConvertRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAddressConvertRequest proto.InternalMessageInfo + +// QueryAddressConvertResponse returns address check result and hex/bech32 address +type QueryAddressConvertResponse struct { + HexAddress string `protobuf:"bytes,1,opt,name=hex_address,json=hexAddress,proto3" json:"hex_address,omitempty"` + Bech32Address string `protobuf:"bytes,2,opt,name=bech32_address,json=bech32Address,proto3" json:"bech32_address,omitempty"` +} + +func (m *QueryAddressConvertResponse) Reset() { *m = QueryAddressConvertResponse{} } +func (m *QueryAddressConvertResponse) String() string { return proto.CompactTextString(m) } +func (*QueryAddressConvertResponse) ProtoMessage() {} +func (*QueryAddressConvertResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_f35039d5386d306b, []int{27} +} +func (m *QueryAddressConvertResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAddressConvertResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAddressConvertResponse.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 *QueryAddressConvertResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAddressConvertResponse.Merge(m, src) +} +func (m *QueryAddressConvertResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryAddressConvertResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAddressConvertResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAddressConvertResponse proto.InternalMessageInfo + +func (m *QueryAddressConvertResponse) GetHexAddress() string { + if m != nil { + return m.HexAddress + } + return "" +} + +func (m *QueryAddressConvertResponse) GetBech32Address() string { + if m != nil { + return m.Bech32Address + } + return "" +} + func init() { proto.RegisterType((*QueryAccountRequest)(nil), "stratos.evm.v1.QueryAccountRequest") proto.RegisterType((*QueryAccountResponse)(nil), "stratos.evm.v1.QueryAccountResponse") @@ -1338,102 +1430,109 @@ func init() { proto.RegisterType((*QueryBaseFeeResponse)(nil), "stratos.evm.v1.QueryBaseFeeResponse") proto.RegisterType((*QueryBlockGasRequest)(nil), "stratos.evm.v1.QueryBlockGasRequest") proto.RegisterType((*QueryBlockGasResponse)(nil), "stratos.evm.v1.QueryBlockGasResponse") + proto.RegisterType((*QueryAddressConvertRequest)(nil), "stratos.evm.v1.QueryAddressConvertRequest") + proto.RegisterType((*QueryAddressConvertResponse)(nil), "stratos.evm.v1.QueryAddressConvertResponse") } func init() { proto.RegisterFile("stratos/evm/v1/query.proto", fileDescriptor_f35039d5386d306b) } var fileDescriptor_f35039d5386d306b = []byte{ - // 1434 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xdd, 0x6f, 0x13, 0xc7, - 0x16, 0xcf, 0xc6, 0x4e, 0x1c, 0x8e, 0x43, 0x6e, 0xee, 0x10, 0x82, 0xd9, 0x10, 0x3b, 0xd9, 0x40, - 0x9c, 0x44, 0x64, 0x97, 0xe4, 0x5e, 0x5d, 0xdd, 0x56, 0x6a, 0xab, 0x24, 0x0a, 0x14, 0x41, 0x2b, - 0xea, 0x46, 0x7d, 0xa8, 0x54, 0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 0xe5, 0xed, 0xfe, 0x3c, 0x07, 0x53, 0x42, 0x16, 0x7d, 0x09, - 0x19, 0xd5, 0x1c, 0xd1, 0x5a, 0x3c, 0x5a, 0x23, 0x66, 0x1f, 0xf3, 0xf2, 0xe9, 0x42, 0x12, 0xd1, - 0xda, 0x7c, 0xf4, 0xeb, 0x5f, 0x3f, 0x4e, 0xae, 0xa1, 0x55, 0x27, 0x36, 0x7b, 0xa9, 0xd6, 0xe8, - 0x3c, 0x50, 0x7d, 0xe0, 0x21, 0xfa, 0xc9, 0x80, 0xb3, 0x91, 0xe9, 0x03, 0x6d, 0x8e, 0x84, 0x18, - 0x35, 0xe3, 0x98, 0x5b, 0xaf, 0x22, 0xaa, 0x38, 0x5d, 0x13, 0x9c, 0xb6, 0xd0, 0x46, 0x9c, 0x93, - 0x1e, 0x71, 0x86, 0xa8, 0xfd, 0x62, 0xc0, 0x7c, 0x7c, 0x84, 0x40, 0x57, 0x47, 0x42, 0x26, 0xcc, - 0x2d, 0xe6, 0xf6, 0x2b, 0x4a, 0x2b, 0x8e, 0xff, 0x17, 0x1c, 0x77, 0xd1, 0xb5, 0x38, 0xc7, 0x8e, - 0xbe, 0xd1, 0xa7, 0x39, 0x38, 0x0f, 0x3d, 0x44, 0x5f, 0x19, 0x90, 0x51, 0x63, 0x42, 0x42, 0x20, - 0xa3, 0xf3, 0x47, 0x42, 0x20, 0x63, 0x93, 0x86, 0xb5, 0x25, 0x08, 0x5d, 0x46, 0x56, 0x9c, 0x90, - 0x1a, 0x38, 0xe8, 0x80, 0xbb, 0xbe, 0x31, 0x20, 0xa3, 0x46, 0x85, 0x04, 0x0a, 0xd1, 0xa9, 0x24, - 0x81, 0x42, 0x6c, 0xda, 0xb0, 0x1c, 0x41, 0x61, 0x13, 0x15, 0xe3, 0x14, 0xa8, 0x14, 0xec, 0x33, - 0x70, 0x1e, 0x1c, 0x93, 0x93, 0x87, 0x88, 0x41, 0x9a, 0xcf, 0x12, 0x68, 0x25, 0x21, 0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 0x09, 0xbd, 0x2c, 0xf2, 0x1c, 0xdd, 0x87, 0x19, 0xdd, 0xd2, - 0x50, 0x82, 0xe6, 0x68, 0x27, 0x1c, 0xce, 0xf6, 0x91, 0x7d, 0xd1, 0x5a, 0x15, 0x04, 0x96, 0xd0, - 0xc5, 0x21, 0x02, 0x62, 0x90, 0xf0, 0x30, 0xdd, 0xbf, 0xf9, 0xf4, 0x45, 0xde, 0x78, 0xf6, 0x22, - 0x6f, 0xfc, 0xf9, 0x22, 0x6f, 0x3c, 0x7e, 0x99, 0x9f, 0x78, 0xf6, 0x32, 0x3f, 0xf1, 0xdb, 0xcb, - 0xfc, 0xc4, 0xe7, 0xce, 0x40, 0xdb, 0x56, 0xd7, 0x7d, 0xc2, 0xf4, 0x72, 0xdb, 0xad, 0xe1, 0xba, - 0xef, 0x74, 0x85, 0x46, 0xd1, 0xc3, 0x2b, 0xd3, 0x62, 0x08, 0xf9, 0xcf, 0x3f, 0x01, 0x00, 0x00, - 0xff, 0xff, 0xa4, 0x2e, 0x29, 0x62, 0x35, 0x11, 0x00, 0x00, + // 1507 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xcd, 0x6f, 0x1b, 0x45, + 0x14, 0xcf, 0xc6, 0x4e, 0x9c, 0x3e, 0x27, 0x69, 0x98, 0xa6, 0xa9, 0xbb, 0x69, 0xec, 0x64, 0xd3, + 0xe6, 0x8b, 0xc6, 0xdb, 0xa4, 0x08, 0x01, 0x12, 0x1f, 0x49, 0x94, 0x96, 0xaa, 0x05, 0x15, 0x13, + 0x71, 0x40, 0x42, 0xd6, 0x78, 0x3d, 0x5d, 0x5b, 0xb1, 0x77, 0xdd, 0x9d, 0xb1, 0xe5, 0xb4, 0xaa, + 0x80, 0x4a, 0x7c, 0x48, 0x5c, 0x2a, 0xb8, 0x70, 0xec, 0x95, 0xbf, 0x81, 0x7f, 0xa0, 0xc7, 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0x07, 0xe9, 0x0a, + 0x69, 0x47, 0x9a, 0x2b, 0x54, 0x48, 0x5b, 0x37, 0xd6, 0x4b, 0x30, 0x5d, 0x22, 0x4e, 0xe5, 0xea, + 0x76, 0xc7, 0x46, 0xb6, 0xa0, 0x29, 0x39, 0xab, 0xcc, 0xb6, 0x7f, 0x3f, 0x0d, 0x63, 0x02, 0x07, + 0x7d, 0x0d, 0x29, 0xd5, 0xc5, 0xd1, 0x72, 0x34, 0xad, 0x06, 0x88, 0x34, 0xf3, 0xe2, 0xf1, 0x46, + 0x92, 0xa7, 0xb5, 0xfe, 0xf0, 0x8f, 0x7f, 0x7f, 0x19, 0x5d, 0x46, 0x4b, 0x76, 0x44, 0x24, 0xaa, + 0x1e, 0x6e, 0xdf, 0x57, 0xf4, 0x1e, 0xa0, 0x5f, 0x0d, 0x98, 0x0a, 0xc9, 0x24, 0xb4, 0x3e, 0x10, + 0x62, 0x90, 0x18, 0x33, 0x37, 0x5e, 0xc6, 0x54, 0x71, 0xba, 0x22, 0x38, 0x6d, 0xa0, 0xb5, 0x28, + 0x27, 0xad, 0xc5, 0xfa, 0xa8, 0xfd, 0x66, 0xc0, 0x4c, 0x54, 0xeb, 0xa0, 0xcb, 0x03, 0x21, 0x63, + 0x04, 0x96, 0xb9, 0xf9, 0x92, 0xd6, 0x8a, 0xe3, 0x3b, 0x82, 0xe3, 0x36, 0xba, 0x12, 0xe5, 0xd8, + 0xd2, 0x3b, 0xba, 0x34, 0x7b, 0x85, 0xdb, 0x03, 0xf4, 0x8d, 0x01, 0x29, 0xa5, 0x67, 0x62, 0x2e, + 0x32, 0x2c, 0x94, 0x62, 0x2e, 0x32, 0x22, 0x89, 0xac, 0x0d, 0x41, 0xe8, 0x22, 0xb2, 0xa2, 0x84, + 0x94, 0x32, 0xa2, 0x3d, 0xe1, 0xfa, 0xce, 0x80, 0x94, 0xd2, 0x34, 0x31, 0x14, 0xc2, 0xf2, 0x29, + 0x86, 0x42, 0x44, 0x16, 0x59, 0xb6, 0xa0, 0xb0, 0x8e, 0x56, 0xa3, 0x14, 0xa8, 0x34, 0xec, 0x32, + 0xb0, 0xef, 0x1f, 0x92, 0xa3, 0x07, 0x88, 0x41, 0x92, 0x8b, 0x1e, 0xb4, 0x18, 0x93, 0x1c, 0x1d, + 0x1d, 0x65, 0x2e, 0x1d, 0x63, 0xa1, 0xd0, 0x57, 0x05, 0xfa, 0x12, 0xca, 0xf5, 0x67, 0x4d, 0x39, + 0x74, 0xfa, 0xbb, 0x30, 0x2e, 0xbb, 0x3e, 0xb2, 0x06, 0x7a, 0x0d, 0x09, 0x0b, 0x73, 0xf9, 0x58, + 0x1b, 0x85, 0x9d, 0x15, 0xd8, 0x19, 0x34, 0x17, 0xc5, 0x96, 0x82, 0x02, 0x05, 0x90, 0x52, 0x82, + 0x02, 0x65, 0xa3, 0xfe, 0xc2, 0x4a, 0xc3, 0xbc, 0x74, 0x7c, 0xb3, 0xd1, 0x88, 0x8b, 0x02, 0xd1, + 0x44, 0x99, 0x28, 0x22, 0x61, 0x95, 0xa2, 0xc3, 0x81, 0xda, 0x90, 0xee, 0x51, 0x21, 0x43, 0x71, + 0xfb, 0xce, 0x39, 0x40, 0xc2, 0x58, 0x17, 0x05, 0x6a, 0x16, 0x5d, 0xe8, 0x43, 0x55, 0xc6, 0x45, + 0x17, 0x53, 0xd4, 0x82, 0x94, 0x6a, 0xbf, 0x31, 0xd9, 0x15, 0x96, 0x3b, 0x31, 0xd9, 0x15, 0xe9, + 0xe0, 0xf1, 0x27, 0x96, 0x7d, 0x97, 0xb5, 0xd1, 0x43, 0x03, 0xa0, 0xdb, 0xb8, 0xd0, 0x4a, 0xbc, + 0xdb, 0xde, 0x5e, 0x6f, 0xae, 0x0e, 0xb5, 0x53, 0x0c, 0x96, 0x05, 0x83, 0x05, 0x34, 0x3f, 0x98, + 0x81, 0xe8, 0xa2, 0xfc, 0xf0, 0xaa, 0xed, 0xc5, 0xbe, 0xee, 0xde, 0x5e, 0x19, 0xfb, 0xba, 0x43, + 0x9d, 0x33, 0xfe, 0xf0, 0xba, 0x9f, 0xa2, 0x6f, 0x0d, 0x98, 0x54, 0xbb, 0x44, 0x72, 0xbe, 0x4e, + 0xf4, 0x15, 0x81, 0xbe, 0x88, 0xb2, 0x71, 0xe8, 0x45, 0x91, 0xe7, 0xe8, 0x1e, 0x4c, 0xe8, 0xde, + 0x8b, 0x62, 0x3c, 0x87, 0x5b, 0x76, 0x7f, 0xb6, 0x0f, 0x6c, 0xe0, 0xd6, 0x92, 0x20, 0x30, 0x8f, + 0xce, 0xf7, 0x11, 0x10, 0x8a, 0x87, 0x27, 0xdd, 0xcf, 0x06, 0x4c, 0x87, 0x7b, 0x31, 0x1a, 0xdc, + 0x73, 0x06, 0xb6, 0x7c, 0xf3, 0xcd, 0x97, 0xb2, 0x1d, 0x56, 0x6a, 0x54, 0x8d, 0xe1, 0x22, 0x90, + 0x6f, 0xd8, 0xbd, 0xf1, 0xe4, 0x79, 0xd6, 0x78, 0xfa, 0x3c, 0x6b, 0xfc, 0xf3, 0x3c, 0x6b, 0x3c, + 0x7a, 0x91, 0x1d, 0x79, 0xfa, 0x22, 0x3b, 0xf2, 0xe7, 0x8b, 0xec, 0xc8, 0x97, 0x76, 0x8f, 0xe8, + 0x51, 0x4e, 0x3c, 0xc2, 0xf4, 0x70, 0xd3, 0xa9, 0xe0, 0xaa, 0x67, 0xb7, 0x85, 0x5f, 0xa1, 0x80, + 0x4a, 0xe3, 0x42, 0xc2, 0x5d, 0xfd, 0x3f, 0x00, 0x00, 0xff, 0xff, 0x56, 0x65, 0x2e, 0xdc, 0x73, + 0x12, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1479,6 +1578,7 @@ type QueryClient interface { BaseFeeParam(ctx context.Context, in *QueryBaseFeeRequest, opts ...grpc.CallOption) (*QueryBaseFeeResponse, error) // BlockGas queries the gas used at a given block height BlockGas(ctx context.Context, in *QueryBlockGasRequest, opts ...grpc.CallOption) (*QueryBlockGasResponse, error) + AddressConvert(ctx context.Context, in *QueryAddressConvertRequest, opts ...grpc.CallOption) (*QueryAddressConvertResponse, error) } type queryClient struct { @@ -1615,6 +1715,15 @@ func (c *queryClient) BlockGas(ctx context.Context, in *QueryBlockGasRequest, op return out, nil } +func (c *queryClient) AddressConvert(ctx context.Context, in *QueryAddressConvertRequest, opts ...grpc.CallOption) (*QueryAddressConvertResponse, error) { + out := new(QueryAddressConvertResponse) + err := c.cc.Invoke(ctx, "/stratos.evm.v1.Query/AddressConvert", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // QueryServer is the server API for Query service. type QueryServer interface { // Account queries an Ethereum account. @@ -1648,6 +1757,7 @@ type QueryServer interface { BaseFeeParam(context.Context, *QueryBaseFeeRequest) (*QueryBaseFeeResponse, error) // BlockGas queries the gas used at a given block height BlockGas(context.Context, *QueryBlockGasRequest) (*QueryBlockGasResponse, error) + AddressConvert(context.Context, *QueryAddressConvertRequest) (*QueryAddressConvertResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -1696,6 +1806,9 @@ func (*UnimplementedQueryServer) BaseFeeParam(ctx context.Context, req *QueryBas func (*UnimplementedQueryServer) BlockGas(ctx context.Context, req *QueryBlockGasRequest) (*QueryBlockGasResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method BlockGas not implemented") } +func (*UnimplementedQueryServer) AddressConvert(ctx context.Context, req *QueryAddressConvertRequest) (*QueryAddressConvertResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AddressConvert not implemented") +} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -1953,6 +2066,24 @@ func _Query_BlockGas_Handler(srv interface{}, ctx context.Context, dec func(inte return interceptor(ctx, in, info, handler) } +func _Query_AddressConvert_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAddressConvertRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).AddressConvert(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/stratos.evm.v1.Query/AddressConvert", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AddressConvert(ctx, req.(*QueryAddressConvertRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "stratos.evm.v1.Query", HandlerType: (*QueryServer)(nil), @@ -2013,6 +2144,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "BlockGas", Handler: _Query_BlockGas_Handler, }, + { + MethodName: "AddressConvert", + Handler: _Query_AddressConvert_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "stratos/evm/v1/query.proto", @@ -2946,6 +3081,73 @@ func (m *QueryBlockGasResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *QueryAddressConvertRequest) 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 *QueryAddressConvertRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAddressConvertRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryAddressConvertResponse) 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 *QueryAddressConvertResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAddressConvertResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Bech32Address) > 0 { + i -= len(m.Bech32Address) + copy(dAtA[i:], m.Bech32Address) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Bech32Address))) + i-- + dAtA[i] = 0x12 + } + if len(m.HexAddress) > 0 { + i -= len(m.HexAddress) + copy(dAtA[i:], m.HexAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.HexAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { offset -= sovQuery(v) base := offset @@ -3349,6 +3551,36 @@ func (m *QueryBlockGasResponse) Size() (n int) { return n } +func (m *QueryAddressConvertRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryAddressConvertResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.HexAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.Bech32Address) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + func sovQuery(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -5910,6 +6142,202 @@ func (m *QueryBlockGasResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *QueryAddressConvertRequest) 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 ErrIntOverflowQuery + } + 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: QueryAddressConvertRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAddressConvertRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryAddressConvertResponse) 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 ErrIntOverflowQuery + } + 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: QueryAddressConvertResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAddressConvertResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field HexAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.HexAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Bech32Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Bech32Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipQuery(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/evm/types/query.pb.gw.go b/x/evm/types/query.pb.gw.go index f94eed5b..563b32a7 100644 --- a/x/evm/types/query.pb.gw.go +++ b/x/evm/types/query.pb.gw.go @@ -593,6 +593,42 @@ func local_request_Query_BlockGas_0(ctx context.Context, marshaler runtime.Marsh } +var ( + filter_Query_AddressConvert_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_AddressConvert_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAddressConvertRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_AddressConvert_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.AddressConvert(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_AddressConvert_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAddressConvertRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_AddressConvert_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.AddressConvert(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -879,6 +915,26 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_AddressConvert_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_AddressConvert_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_AddressConvert_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -1200,6 +1256,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_AddressConvert_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_AddressConvert_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_AddressConvert_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -1231,6 +1307,8 @@ var ( pattern_Query_BaseFeeParam_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"stratos", "evm", "v1", "base_fee_param"}, "", runtime.AssumeColonVerbOpt(true))) pattern_Query_BlockGas_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"stratos", "evm", "v1", "block_gas"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Query_AddressConvert_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"stratos", "evm", "v1", "address_convert"}, "", runtime.AssumeColonVerbOpt(true))) ) var ( @@ -1261,4 +1339,6 @@ var ( forward_Query_BaseFeeParam_0 = runtime.ForwardResponseMessage forward_Query_BlockGas_0 = runtime.ForwardResponseMessage + + forward_Query_AddressConvert_0 = runtime.ForwardResponseMessage ) From 5894ea3c54bc7382ba15c4acf42f66701ac3bfd0 Mon Sep 17 00:00:00 2001 From: bjlqsnetwork Date: Fri, 16 Jun 2023 15:42:34 -0400 Subject: [PATCH 91/95] - qb1864: impl update sp deposit (#282) Co-authored-by: jialbai --- proto/stratos/register/v1/tx.proto | 6 +- x/register/client/cli/tx.go | 13 +- x/register/client/rest/tx.go | 8 +- x/register/keeper/keeper.go | 27 ++-- x/register/keeper/meta_node.go | 49 +++--- x/register/keeper/msg_server.go | 14 +- x/register/types/msg.go | 3 +- x/register/types/tx.pb.go | 235 ++++++++++++----------------- 8 files changed, 151 insertions(+), 204 deletions(-) diff --git a/proto/stratos/register/v1/tx.proto b/proto/stratos/register/v1/tx.proto index 417d4418..5fa6d706 100644 --- a/proto/stratos/register/v1/tx.proto +++ b/proto/stratos/register/v1/tx.proto @@ -252,11 +252,7 @@ message MsgUpdateMetaNodeDeposit { (gogoproto.jsontag) = "owner_address", (gogoproto.moretags) = "yaml:\"owner_address\"" ]; - bool incr_deposit = 3 [ - (gogoproto.jsontag) = "incr_deposit", - (gogoproto.moretags) = "yaml:\"incr_deposit\"" - ]; - cosmos.base.v1beta1.Coin deposit_delta = 4 [ + cosmos.base.v1beta1.Coin deposit_delta = 3 [ (gogoproto.nullable) = false, (gogoproto.jsontag) = "deposit_delta", (gogoproto.moretags) = "yaml:\"deposit_delta\"" diff --git a/x/register/client/cli/tx.go b/x/register/client/cli/tx.go index 011a42ba..abe54460 100644 --- a/x/register/client/cli/tx.go +++ b/x/register/client/cli/tx.go @@ -1,8 +1,6 @@ package cli import ( - "strconv" - "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/tx" @@ -565,15 +563,6 @@ func newBuildUpdateMetaNodeDepositMsg(clientCtx client.Context, txf tx.Factory, return txf, nil, err } - incrDepositStr, err := fs.GetString(FlagIncrDeposit) - if err != nil { - return txf, nil, err - } - incrDeposit, err := strconv.ParseBool(incrDepositStr) - if err != nil { - return txf, nil, err - } - networkAddrStr, _ := fs.GetString(FlagNetworkAddress) networkAddr, err := stratos.SdsAddressFromBech32(networkAddrStr) if err != nil { @@ -582,7 +571,7 @@ func newBuildUpdateMetaNodeDepositMsg(clientCtx client.Context, txf tx.Factory, ownerAddr := clientCtx.GetFromAddress() - msg := types.NewMsgUpdateMetaNodeDeposit(networkAddr, ownerAddr, depositDelta, incrDeposit) + msg := types.NewMsgUpdateMetaNodeDeposit(networkAddr, ownerAddr, depositDelta) return txf, msg, nil } diff --git a/x/register/client/rest/tx.go b/x/register/client/rest/tx.go index 7b545686..29d26e9c 100644 --- a/x/register/client/rest/tx.go +++ b/x/register/client/rest/tx.go @@ -2,7 +2,6 @@ package rest import ( "net/http" - "strconv" "github.com/gorilla/mux" stratos "github.com/stratosnet/stratos-chain/types" @@ -452,12 +451,7 @@ func postUpdateMetaNodeDepositHandlerFn(cliCtx client.Context) http.HandlerFunc return } - incrDeposit, err := strconv.ParseBool(req.IncrDeposit) - if err != nil { - rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) - return - } - msg := types.NewMsgUpdateMetaNodeDeposit(networkAddr, ownerAddr, req.DepositDelta, incrDeposit) + msg := types.NewMsgUpdateMetaNodeDeposit(networkAddr, ownerAddr, req.DepositDelta) if err := msg.ValidateBasic(); err != nil { rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error()) return diff --git a/x/register/keeper/keeper.go b/x/register/keeper/keeper.go index 137c2b4a..fea0203f 100644 --- a/x/register/keeper/keeper.go +++ b/x/register/keeper/keeper.go @@ -329,39 +329,39 @@ func (k Keeper) UnbondResourceNode(ctx sdk.Context, networkAddr stratos.SdsAddre } func (k Keeper) UnbondMetaNode(ctx sdk.Context, metaNode types.MetaNode, amt sdk.Int, -) (ozoneLimitChange sdk.Int, unbondingMatureTime time.Time, err error) { +) (ozoneLimitChange, availableTokenAmtBefore, availableTokenAmtAfter sdk.Int, unbondingMatureTime time.Time, err error) { if metaNode.GetStatus() == stakingtypes.Unbonding { - return sdk.ZeroInt(), time.Time{}, types.ErrUnbondingNode + return sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroInt(), time.Time{}, types.ErrUnbondingNode } networkAddr, err := stratos.SdsAddressFromBech32(metaNode.GetNetworkAddress()) if err != nil { - return sdk.ZeroInt(), time.Time{}, errors.New("invalid network address") + return sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroInt(), time.Time{}, errors.New("invalid network address") } ownerAddr, err := sdk.AccAddressFromBech32(metaNode.GetOwnerAddress()) if err != nil { - return sdk.ZeroInt(), time.Time{}, errors.New("invalid wallet address") + return sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroInt(), time.Time{}, errors.New("invalid wallet address") } ownerAcc := k.accountKeeper.GetAccount(ctx, ownerAddr) if ownerAcc == nil { - return sdk.ZeroInt(), time.Time{}, types.ErrNoOwnerAccountFound + return sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroInt(), time.Time{}, types.ErrNoOwnerAccountFound } // suspended node cannot be unbonded (avoid dup deposit decrease with node suspension) if metaNode.Suspend { - return sdk.ZeroInt(), time.Time{}, types.ErrInvalidSuspensionStatForUnbondNode + return sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroInt(), time.Time{}, types.ErrInvalidSuspensionStatForUnbondNode } // check if node_token - unbonding_token > amt_to_unbond unbondingDeposit := k.GetUnbondingNodeBalance(ctx, networkAddr) - availableDeposit := metaNode.Tokens.Sub(unbondingDeposit) - if availableDeposit.LT(amt) { - return sdk.ZeroInt(), time.Time{}, types.ErrInsufficientBalance + availableTokenAmtBefore = metaNode.Tokens.Sub(unbondingDeposit) + if availableTokenAmtBefore.LT(amt) { + return sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroInt(), time.Time{}, types.ErrInsufficientBalance } if k.HasMaxUnbondingNodeEntries(ctx, networkAddr) { - return sdk.ZeroInt(), time.Time{}, types.ErrMaxUnbondingNodeEntries + return sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroInt(), time.Time{}, types.ErrMaxUnbondingNodeEntries } unbondingMatureTime = calcUnbondingMatureTime(ctx, metaNode.Status, metaNode.CreationTime, k.UnbondingThreasholdTime(ctx), k.UnbondingCompletionTime(ctx)) @@ -371,15 +371,16 @@ func (k Keeper) UnbondMetaNode(ctx sdk.Context, metaNode types.MetaNode, amt sdk if metaNode.GetStatus() == stakingtypes.Bonded { // to prevent remainingOzoneLimit from being negative value if !k.IsUnbondable(ctx, amt) { - return sdk.ZeroInt(), time.Time{}, types.ErrInsufficientBalance + return sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroInt(), time.Time{}, types.ErrInsufficientBalance } // transfer the node tokens to the not bonded pool k.bondedToUnbonding(ctx, metaNode, true, coin) + availableTokenAmtAfter = availableTokenAmtBefore.Sub(amt) // adjust ozone limit ozoneLimitChange = k.DecreaseOzoneLimitBySubtractDeposit(ctx, amt) } // change node status to unbonding if unbonding all available tokens - if amt.Equal(availableDeposit) { + if amt.Equal(availableTokenAmtBefore) { metaNode.Status = stakingtypes.Unbonding // decrease meta node count v := k.GetBondedMetaNodeCnt(ctx) @@ -399,7 +400,7 @@ func (k Keeper) UnbondMetaNode(ctx sdk.Context, metaNode types.MetaNode, amt sdk // Add to unbonding node queue k.InsertUnbondingNodeQueue(ctx, unbondingNode, unbondingMatureTime) ctx.Logger().Info("Unbonding meta node " + unbondingNode.String() + "\n after mature time" + unbondingMatureTime.String()) - return ozoneLimitChange, unbondingMatureTime, nil + return ozoneLimitChange, availableTokenAmtBefore, availableTokenAmtAfter, unbondingMatureTime, nil } // GetAllUnbondingNodesTotalBalance Iteration for getting the total balance of all unbonding nodes diff --git a/x/register/keeper/meta_node.go b/x/register/keeper/meta_node.go index d2d7d9be..c9cf9067 100644 --- a/x/register/keeper/meta_node.go +++ b/x/register/keeper/meta_node.go @@ -83,7 +83,7 @@ func (k Keeper) RegisterMetaNode(ctx sdk.Context, networkAddr stratos.SdsAddress if err != nil { return ozoneLimitChange, err } - ozoneLimitChange, err = k.AddMetaNodeDeposit(ctx, metaNode, deposit) + ozoneLimitChange, _, _, err = k.AddMetaNodeDeposit(ctx, metaNode, deposit) if err != nil { return ozoneLimitChange, err } @@ -101,19 +101,26 @@ func (k Keeper) RegisterMetaNode(ctx sdk.Context, networkAddr stratos.SdsAddress // AddMetaNodeDeposit Update the tokens of an existing meta node func (k Keeper) AddMetaNodeDeposit(ctx sdk.Context, metaNode types.MetaNode, tokenToAdd sdk.Coin, -) (ozoneLimitChange sdk.Int, err error) { +) (ozoneLimitChange, availableTokenAmtBefore, availableTokenAmtAfter sdk.Int, err error) { coins := sdk.NewCoins(tokenToAdd) ownerAddr, err := sdk.AccAddressFromBech32(metaNode.GetOwnerAddress()) if err != nil { - return sdk.ZeroInt(), types.ErrInvalidOwnerAddr + return sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroInt(), types.ErrInvalidOwnerAddr + } + networkAddr, err := stratos.SdsAddressFromBech32(metaNode.GetNetworkAddress()) + if err != nil { + return sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroInt(), types.ErrInvalidNetworkAddr } // sub coins from owner's wallet hasCoin := k.bankKeeper.HasBalance(ctx, ownerAddr, tokenToAdd) if !hasCoin { - return sdk.ZeroInt(), types.ErrInsufficientBalance + return sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroInt(), types.ErrInsufficientBalance } + unbondingDeposit := k.GetUnbondingNodeBalance(ctx, networkAddr) + availableTokenAmtBefore = metaNode.Tokens.Sub(unbondingDeposit) + targetModuleAccName := "" switch metaNode.GetStatus() { @@ -122,13 +129,13 @@ func (k Keeper) AddMetaNodeDeposit(ctx sdk.Context, metaNode types.MetaNode, tok case stakingtypes.Bonded: targetModuleAccName = types.MetaNodeBondedPool case stakingtypes.Unbonding: - return sdk.ZeroInt(), types.ErrUnbondingNode + return sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroInt(), types.ErrUnbondingNode } if len(targetModuleAccName) > 0 { err = k.bankKeeper.SendCoinsFromAccountToModule(ctx, ownerAddr, targetModuleAccName, coins) if err != nil { - return sdk.ZeroInt(), err + return sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroInt(), err } } @@ -141,8 +148,8 @@ func (k Keeper) AddMetaNodeDeposit(ctx sdk.Context, metaNode types.MetaNode, tok // if node is currently suspended, ozone limit will be increased upon unsuspension instead of NOW ozoneLimitChange = sdk.ZeroInt() } - - return ozoneLimitChange, nil + availableTokenAmtAfter = availableTokenAmtBefore.Add(tokenToAdd.Amount) + return ozoneLimitChange, availableTokenAmtBefore, availableTokenAmtAfter, nil } // TODO: Unused parameter: metaNode @@ -439,37 +446,33 @@ func (k Keeper) UpdateMetaNode(ctx sdk.Context, description types.Description, return nil } -func (k Keeper) UpdateMetaNodeDeposit(ctx sdk.Context, networkAddr stratos.SdsAddress, ownerAddr sdk.AccAddress, depositDelta sdk.Coin, incrDeposit bool) ( - ozoneLimitChange sdk.Int, unbondingMatureTime time.Time, err error) { +func (k Keeper) UpdateMetaNodeDeposit(ctx sdk.Context, networkAddr stratos.SdsAddress, ownerAddr sdk.AccAddress, depositDelta sdk.Coin) ( + ozoneLimitChange, availableTokenAmtBefore, availableTokenAmtAfter sdk.Int, unbondingMatureTime time.Time, metaNode types.MetaNode, err error) { if depositDelta.GetDenom() != k.BondDenom(ctx) { - return sdk.ZeroInt(), time.Time{}, types.ErrBadDenom + return sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroInt(), time.Time{}, types.MetaNode{}, types.ErrBadDenom } node, found := k.GetMetaNode(ctx, networkAddr) if !found { - return sdk.ZeroInt(), time.Time{}, types.ErrNoMetaNodeFound + return sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroInt(), time.Time{}, types.MetaNode{}, types.ErrNoMetaNodeFound } ownerAddrNode, _ := sdk.AccAddressFromBech32(node.GetOwnerAddress()) if !ownerAddrNode.Equals(ownerAddr) { - return sdk.ZeroInt(), time.Time{}, types.ErrInvalidOwnerAddr + return sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroInt(), time.Time{}, types.MetaNode{}, types.ErrInvalidOwnerAddr } - if incrDeposit { + // not allow to decrease deposit + if depositDelta.Amount.IsPositive() { blockTime := ctx.BlockHeader().Time - ozoneLimitChange, err = k.AddMetaNodeDeposit(ctx, node, depositDelta) - if err != nil { - return sdk.ZeroInt(), time.Time{}, err - } - return ozoneLimitChange, blockTime, nil - } else { - ozoneLimitChange, completionTime, err := k.UnbondMetaNode(ctx, node, depositDelta.Amount) + ozoneLimitChange, availableTokenAmtBefore, availableTokenAmtAfter, err = k.AddMetaNodeDeposit(ctx, node, depositDelta) if err != nil { - return sdk.ZeroInt(), time.Time{}, err + return sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroInt(), time.Time{}, types.MetaNode{}, err } - return ozoneLimitChange, completionTime, nil + return ozoneLimitChange, availableTokenAmtBefore, availableTokenAmtAfter, blockTime, node, nil } + return sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroInt(), time.Time{}, types.MetaNode{}, err } func (k Keeper) GetMetaNodeBondedToken(ctx sdk.Context) (token sdk.Coin) { diff --git a/x/register/keeper/msg_server.go b/x/register/keeper/msg_server.go index 325c3327..f716b2d2 100644 --- a/x/register/keeper/msg_server.go +++ b/x/register/keeper/msg_server.go @@ -170,7 +170,7 @@ func (k msgServer) HandleMsgRemoveMetaNode(goCtx context.Context, msg *types.Msg return &types.MsgRemoveMetaNodeResponse{}, types.ErrInsufficientBalance } - ozoneLimitChange, completionTime, err := k.UnbondMetaNode(ctx, metaNode, availableDeposit) + ozoneLimitChange, _, _, completionTime, err := k.UnbondMetaNode(ctx, metaNode, availableDeposit) if err != nil { return &types.MsgRemoveMetaNodeResponse{}, sdkerrors.Wrap(types.ErrUnbondMetaNode, err.Error()) } @@ -181,6 +181,7 @@ func (k msgServer) HandleMsgRemoveMetaNode(goCtx context.Context, msg *types.Msg sdk.NewAttribute(sdk.AttributeKeySender, msg.OwnerAddress), sdk.NewAttribute(types.AttributeKeyMetaNode, msg.MetaNodeAddress), sdk.NewAttribute(types.AttributeKeyOZoneLimitChanges, ozoneLimitChange.Neg().String()), + sdk.NewAttribute(types.AttributeKeyDepositToRemove, sdk.NewCoin(k.BondDenom(ctx), availableDeposit).String()), sdk.NewAttribute(types.AttributeKeyUnbondingMatureTime, completionTime.Format(time.RFC3339)), ), sdk.NewEvent( @@ -442,7 +443,11 @@ func (k msgServer) HandleMsgUpdateMetaNodeDeposit(goCtx context.Context, msg *ty return &types.MsgUpdateMetaNodeDepositResponse{}, sdkerrors.Wrap(types.ErrInvalidOwnerAddr, err.Error()) } - ozoneLimitChange, completionTime, err := k.UpdateMetaNodeDeposit(ctx, networkAddr, ownerAddress, msg.GetDepositDelta(), msg.IncrDeposit) + if msg.DepositDelta.Amount.IsNegative() { + return &types.MsgUpdateMetaNodeDepositResponse{}, sdkerrors.Wrap(types.ErrInvalidDepositChange, err.Error()) + } + + ozoneLimitChange, availableTokenAmtBefore, availableTokenAmtAfter, completionTime, node, err := k.UpdateMetaNodeDeposit(ctx, networkAddr, ownerAddress, msg.GetDepositDelta()) if err != nil { return nil, sdkerrors.Wrap(types.ErrUpdateMetaNodeDeposit, err.Error()) } @@ -452,7 +457,10 @@ func (k msgServer) HandleMsgUpdateMetaNodeDeposit(goCtx context.Context, msg *ty types.EventTypeUpdateMetaNodeDeposit, sdk.NewAttribute(sdk.AttributeKeySender, msg.OwnerAddress), sdk.NewAttribute(types.AttributeKeyNetworkAddress, msg.NetworkAddress), - sdk.NewAttribute(types.AttributeKeyIncrDeposit, strconv.FormatBool(msg.IncrDeposit)), + sdk.NewAttribute(types.AttributeKeyDepositDelta, msg.DepositDelta.String()), + sdk.NewAttribute(types.AttributeKeyCurrentDeposit, sdk.NewCoin(k.BondDenom(ctx), node.Tokens).String()), + sdk.NewAttribute(types.AttributeKeyAvailableTokenBefore, sdk.NewCoin(k.BondDenom(ctx), availableTokenAmtBefore).String()), + sdk.NewAttribute(types.AttributeKeyAvailableTokenAfter, sdk.NewCoin(k.BondDenom(ctx), availableTokenAmtAfter).String()), sdk.NewAttribute(types.AttributeKeyOZoneLimitChanges, ozoneLimitChange.String()), sdk.NewAttribute(types.AttributeKeyUnbondingMatureTime, completionTime.Format(time.RFC3339)), ), diff --git a/x/register/types/msg.go b/x/register/types/msg.go index 1a7cfa38..74b75d68 100644 --- a/x/register/types/msg.go +++ b/x/register/types/msg.go @@ -482,12 +482,11 @@ func (msg MsgUpdateMetaNode) ValidateBasic() error { } func NewMsgUpdateMetaNodeDeposit(networkAddress stratos.SdsAddress, ownerAddress sdk.AccAddress, - depositDelta sdk.Coin, incrDeposit bool) *MsgUpdateMetaNodeDeposit { + depositDelta sdk.Coin) *MsgUpdateMetaNodeDeposit { return &MsgUpdateMetaNodeDeposit{ NetworkAddress: networkAddress.String(), OwnerAddress: ownerAddress.String(), DepositDelta: depositDelta, - IncrDeposit: incrDeposit, } } diff --git a/x/register/types/tx.pb.go b/x/register/types/tx.pb.go index f4a44726..5ef7aa9d 100644 --- a/x/register/types/tx.pb.go +++ b/x/register/types/tx.pb.go @@ -833,8 +833,7 @@ var xxx_messageInfo_MsgUpdateEffectiveDepositResponse proto.InternalMessageInfo type MsgUpdateMetaNodeDeposit struct { NetworkAddress string `protobuf:"bytes,1,opt,name=network_address,json=networkAddress,proto3" json:"network_address" yaml:"network_address"` OwnerAddress string `protobuf:"bytes,2,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address" yaml:"owner_address"` - IncrDeposit bool `protobuf:"varint,3,opt,name=incr_deposit,json=incrDeposit,proto3" json:"incr_deposit" yaml:"incr_deposit"` - DepositDelta types1.Coin `protobuf:"bytes,4,opt,name=deposit_delta,json=depositDelta,proto3" json:"deposit_delta" yaml:"deposit_delta"` + DepositDelta types1.Coin `protobuf:"bytes,3,opt,name=deposit_delta,json=depositDelta,proto3" json:"deposit_delta" yaml:"deposit_delta"` } func (m *MsgUpdateMetaNodeDeposit) Reset() { *m = MsgUpdateMetaNodeDeposit{} } @@ -884,13 +883,6 @@ func (m *MsgUpdateMetaNodeDeposit) GetOwnerAddress() string { return "" } -func (m *MsgUpdateMetaNodeDeposit) GetIncrDeposit() bool { - if m != nil { - return m.IncrDeposit - } - return false -} - func (m *MsgUpdateMetaNodeDeposit) GetDepositDelta() types1.Coin { if m != nil { return m.DepositDelta @@ -1173,102 +1165,100 @@ func init() { func init() { proto.RegisterFile("stratos/register/v1/tx.proto", fileDescriptor_75d4b90d7a185a31) } var fileDescriptor_75d4b90d7a185a31 = []byte{ - // 1510 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0x4d, 0x6c, 0x1b, 0x45, - 0x14, 0xce, 0x3a, 0x69, 0x69, 0xa6, 0x49, 0x7f, 0x9c, 0x84, 0x3a, 0x6e, 0xea, 0x49, 0xa7, 0x34, - 0x4d, 0x29, 0xde, 0xad, 0x53, 0x0a, 0x6d, 0x81, 0xa2, 0xba, 0x41, 0xe2, 0x47, 0x49, 0xd1, 0xaa, - 0x14, 0x09, 0xa9, 0xb2, 0xd6, 0xf6, 0xd4, 0x5d, 0x25, 0xde, 0xb1, 0x76, 0xd7, 0x4e, 0x7d, 0xe0, - 0xc2, 0xa9, 0x47, 0x24, 0x4e, 0x9c, 0x28, 0x1c, 0x39, 0x71, 0x80, 0x23, 0x12, 0xe2, 0x54, 0x90, - 0x90, 0x2a, 0x21, 0x21, 0x84, 0xc4, 0x08, 0xb5, 0x9c, 0xf6, 0xc0, 0x61, 0x0f, 0xdc, 0x90, 0xd0, - 0xce, 0xec, 0xce, 0x7a, 0xd7, 0xbb, 0x5b, 0x87, 0x36, 0x87, 0xa2, 0x9e, 0xec, 0x79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51, 0x87, 0xc2, 0x50, 0xe8, - 0x52, 0x78, 0xc0, 0xcf, 0x5e, 0x20, 0x42, 0xea, 0x1e, 0xef, 0xff, 0x55, 0xef, 0x2f, 0x04, 0x47, - 0x12, 0x4b, 0x44, 0xc5, 0x56, 0x87, 0x18, 0x16, 0x46, 0xbf, 0x8f, 0x83, 0x83, 0xc2, 0x62, 0x0d, - 0xdb, 0xda, 0xd3, 0x02, 0xfa, 0x3f, 0x15, 0x10, 0x3a, 0x0c, 0xe6, 0x87, 0xd2, 0x2b, 0x92, 0xff, - 0x8b, 0xc4, 0x76, 0x10, 0x15, 0xb7, 0x49, 0x2f, 0xba, 0x83, 0xb4, 0xc1, 0x9c, 0xe9, 0x8f, 0x6b, - 0xac, 0xb0, 0xa2, 0x65, 0x70, 0xde, 0xa1, 0x30, 0xd9, 0xc0, 0xa5, 0x70, 0x81, 0x63, 0x4a, 0x54, - 0x23, 0x75, 0xc6, 0x1c, 0x58, 0x27, 0x20, 0x65, 0x88, 0xe4, 0xdc, 0x23, 0x91, 0xec, 0x97, 0xfd, - 0x70, 0x5c, 0x22, 0xf2, 0xef, 0x25, 0x56, 0xf6, 0xdc, 0x42, 0x94, 0xfd, 0x75, 0x70, 0xb0, 0x8d, - 0x6d, 0x2d, 0x29, 0xe2, 0x8a, 0x43, 0xe1, 0xb0, 0xd2, 0xa5, 0xb0, 0xc0, 0xe1, 0x0c, 0xa9, 0x90, - 0xba, 0xbf, 0xed, 0xcf, 0xbb, 0x53, 0x51, 0xf2, 0xdc, 0x46, 0x63, 0x10, 0x11, 0xfe, 0x95, 0x63, - 0xb9, 0x7d, 0xaf, 0xd3, 0x8c, 0x7f, 0x1d, 0x62, 0x15, 0x28, 0xed, 0xf0, 0x16, 0x96, 0xb0, 0x97, - 0xe4, 0x1e, 0xc7, 0x5e, 0x32, 0xc4, 0xe6, 0xf8, 0xa3, 0x35, 0x66, 0x64, 0xab, 0x9d, 0xf8, 0xaf, - 0x5b, 0xed, 0x30, 0xd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x74, - 0x62, 0x20, 0x61, 0x04, 0xe6, 0xc0, 0x04, 0x35, 0xef, 0x84, 0x91, 0xff, 0x5b, 0x02, 0x2f, 0x88, - 0x58, 0x46, 0x39, 0x33, 0xbc, 0x92, 0x06, 0x72, 0x04, 0xe7, 0xe2, 0xe5, 0x47, 0x70, 0x16, 0xc1, - 0xae, 0xb2, 0x60, 0x2f, 0xa2, 0x57, 0x13, 0x83, 0xdd, 0xf2, 0x67, 0xaa, 0xa5, 0x44, 0xed, 0x27, - 0xb1, 0xba, 0x7e, 0xf7, 0x7e, 0x49, 0xba, 0x77, 0xbf, 0x24, 0xfd, 0x71, 0xbf, 0x24, 0x7d, 0xfc, - 0xa0, 0x34, 0x76, 0xef, 0x41, 0x69, 0xec, 0xd7, 0x07, 0xa5, 0xb1, 0x0f, 0x5e, 0x1c, 0xb8, 0xc3, - 0xf9, 0x2b, 0x18, 0xd8, 0x0e, 0xfe, 0x96, 0x1b, 0x37, 0x35, 0xdd, 0x50, 0x6e, 0x85, 0x8b, 0xb2, - 0x5b, 0x5d, 0x7d, 0x37, 0x7b, 0xb6, 0x3e, 0xf3, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x51, 0xa7, - 0x65, 0x3b, 0x6b, 0x1a, 0x00, 0x00, + // 1477 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0x4f, 0x8c, 0xdb, 0xc4, + 0x1a, 0x5f, 0x27, 0xdb, 0xbe, 0xee, 0xb4, 0xdb, 0x3f, 0xe9, 0xee, 0x6b, 0x36, 0xdd, 0x66, 0xb6, + 0xd3, 0xd7, 0x7d, 0xdb, 0xd7, 0x17, 0xbb, 0xd9, 0x52, 0x68, 0x0b, 0x14, 0x35, 0x5d, 0x24, 0x10, + 0xda, 0x2d, 0xb2, 0x4a, 0x91, 0x90, 0xaa, 0xc8, 0x49, 0xa6, 0x69, 0xb4, 0x1b,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9, 0xce, 0xa4, + 0x61, 0x4a, 0xf3, 0x28, 0x9d, 0xdf, 0xa9, 0x87, 0x0c, 0xe4, 0x3c, 0x0b, 0x64, 0x15, 0x9d, 0x49, + 0x0c, 0x24, 0x8c, 0xc0, 0x1a, 0x99, 0xa0, 0xee, 0xdf, 0x30, 0x0a, 0x7f, 0x28, 0xe0, 0xff, 0x32, + 0x96, 0x49, 0xee, 0x0c, 0x2f, 0xa6, 0x81, 0x9c, 0xc0, 0xb9, 0x74, 0xe5, 0x31, 0x9c, 0x65, 0xb0, + 0x6b, 0x2c, 0xd8, 0x4b, 0xe8, 0xa5, 0xc4, 0x60, 0xb7, 0xc5, 0x4c, 0xf5, 0x94, 0xa8, 0x45, 0x12, + 0x6b, 0x1b, 0xf7, 0x1e, 0x94, 0x95, 0xfb, 0x0f, 0xca, 0xca, 0xaf, 0x0f, 0xca, 0xca, 0xfb, 0x0f, + 0xcb, 0x53, 0xf7, 0x1f, 0x96, 0xa7, 0x7e, 0x7a, 0x58, 0x9e, 0x7a, 0xe7, 0xb9, 0x91, 0x77, 0x97, + 0x58, 0xc1, 0xc4, 0x4e, 0xf0, 0xb7, 0xd2, 0xbc, 0x65, 0x74, 0x4c, 0xed, 0x76, 0xb8, 0x28, 0x7b, + 0x89, 0x35, 0x76, 0xb3, 0x4f, 0xcd, 0x67, 0xff, 0x0c, 0x00, 0x00, 0xff, 0xff, 0x0d, 0x60, 0xb6, + 0x1c, 0x1f, 0x1a, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -2347,17 +2337,7 @@ func (m *MsgUpdateMetaNodeDeposit) MarshalToSizedBuffer(dAtA []byte) (int, error i = encodeVarintTx(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x22 - if m.IncrDeposit { - i-- - if m.IncrDeposit { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 - } + dAtA[i] = 0x1a if len(m.OwnerAddress) > 0 { i -= len(m.OwnerAddress) copy(dAtA[i:], m.OwnerAddress) @@ -2813,9 +2793,6 @@ func (m *MsgUpdateMetaNodeDeposit) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - if m.IncrDeposit { - n += 2 - } l = m.DepositDelta.Size() n += 1 + l + sovTx(uint64(l)) return n @@ -4712,26 +4689,6 @@ func (m *MsgUpdateMetaNodeDeposit) Unmarshal(dAtA []byte) error { m.OwnerAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IncrDeposit", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IncrDeposit = bool(v != 0) - case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DepositDelta", wireType) } From 109574b6e50a51be0b837be06a74853588090e56 Mon Sep 17 00:00:00 2001 From: Xixiong Chen <60588630+Xiong-stratos@users.noreply.github.com> Date: Fri, 16 Jun 2023 15:44:02 -0400 Subject: [PATCH 92/95] Feat/QB-1883: Mainnet preparation (#283) * default reward denom related param value update & typo fix * migrate error code remove & set the consensus version to 1 --- x/pot/keeper/keeper.go | 6 +++--- x/pot/keeper/migrations.go | 3 +-- x/pot/module.go | 6 +++--- x/pot/types/params.go | 36 ++++++++++++++++----------------- x/register/keeper/migrations.go | 3 +-- x/register/module.go | 6 +++--- x/sds/keeper/migrations.go | 3 +-- x/sds/module.go | 6 +++--- 8 files changed, 33 insertions(+), 36 deletions(-) diff --git a/x/pot/keeper/keeper.go b/x/pot/keeper/keeper.go index 3e33733b..d02e1235 100644 --- a/x/pot/keeper/keeper.go +++ b/x/pot/keeper/keeper.go @@ -98,9 +98,9 @@ func (k Keeper) SafeMintCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) } func (k Keeper) safeBurnCoinsFromCommunityPool(ctx sdk.Context, coins sdk.Coins) error { - communityPollBalance := k.distrKeeper.GetFeePool(ctx).CommunityPool - //ctx.Logger().Info("------communityPollBalance is " + communityPollBalance.String()) - if communityPollBalance.AmountOf(k.BondDenom(ctx)).GTE(coins.AmountOf(k.BondDenom(ctx)).ToDec()) { + communityPoolBalance := k.distrKeeper.GetFeePool(ctx).CommunityPool + //ctx.Logger().Info("------communityPoolBalance is " + communityPoolBalance.String()) + if communityPoolBalance.AmountOf(k.BondDenom(ctx)).GTE(coins.AmountOf(k.BondDenom(ctx)).ToDec()) { k.bankKeeper.BurnCoins(ctx, distrtypes.ModuleName, coins) return nil } diff --git a/x/pot/keeper/migrations.go b/x/pot/keeper/migrations.go index 84f19c01..c0558cb4 100644 --- a/x/pot/keeper/migrations.go +++ b/x/pot/keeper/migrations.go @@ -2,7 +2,6 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - v043 "github.com/cosmos/cosmos-sdk/x/slashing/legacy/v043" ) // Migrator is a struct for handling in-place store migrations. @@ -17,5 +16,5 @@ func NewMigrator(keeper Keeper) Migrator { // Migrate1to2 migrates from version 1 to 2. func (m Migrator) Migrate1to2(ctx sdk.Context) error { - return v043.MigrateStore(ctx, m.keeper.storeKey) + return nil } diff --git a/x/pot/module.go b/x/pot/module.go index eee54925..1307f892 100644 --- a/x/pot/module.go +++ b/x/pot/module.go @@ -178,12 +178,12 @@ func (am AppModule) RegisterServices(cfg module.Configurator) { querier := keeper.Querier{Keeper: am.keeper} types.RegisterQueryServer(cfg.QueryServer(), querier) - m := keeper.NewMigrator(am.keeper) - _ = cfg.RegisterMigration(types.ModuleName, 1, m.Migrate1to2) + //m := keeper.NewMigrator(am.keeper) + //_ = cfg.RegisterMigration(types.ModuleName, 1, m.Migrate1to2) } // ConsensusVersion implements AppModule/ConsensusVersion. -func (AppModule) ConsensusVersion() uint64 { return 2 } +func (AppModule) ConsensusVersion() uint64 { return 1 } // ProposalContents doesn't return any content functions for governance proposals. func (AppModule) ProposalContents(simState module.SimulationState) []simtypes.WeightedProposalContent { diff --git a/x/pot/types/params.go b/x/pot/types/params.go index a1e57766..e25dd095 100644 --- a/x/pot/types/params.go +++ b/x/pot/types/params.go @@ -15,7 +15,7 @@ import ( // DefaultParamSpace Default parameter namespace const ( DefaultBondDenom = stratos.Wei - DefaultRewardDenom = stratos.Utros + DefaultRewardDenom = stratos.Wei DefaultMatureEpoch = 2016 ) @@ -58,38 +58,38 @@ func DefaultParams() Params { var miningRewardParams []MiningRewardParam miningRewardParams = append(miningRewardParams, NewMiningRewardParam( sdk.NewCoin(DefaultRewardDenom, sdk.NewInt(0)), - sdk.NewCoin(DefaultRewardDenom, sdk.NewInt(16819200000000000)), - sdk.NewCoin(DefaultRewardDenom, sdk.NewInt(80000000000)), + sdk.NewCoin(DefaultRewardDenom, sdk.NewInt(16819200).MulRaw(stratos.StosToWei)), + sdk.NewCoin(DefaultRewardDenom, sdk.NewInt(80).MulRaw(stratos.StosToWei)), sdk.NewInt(6000), sdk.NewInt(2000), sdk.NewInt(2000))) miningRewardParams = append(miningRewardParams, NewMiningRewardParam( - sdk.NewCoin(DefaultRewardDenom, sdk.NewInt(16819200000000000)), - sdk.NewCoin(DefaultRewardDenom, sdk.NewInt(25228800000000000)), - sdk.NewCoin(DefaultRewardDenom, sdk.NewInt(40000000000)), + sdk.NewCoin(DefaultRewardDenom, sdk.NewInt(16819200).MulRaw(stratos.StosToWei)), + sdk.NewCoin(DefaultRewardDenom, sdk.NewInt(25228800).MulRaw(stratos.StosToWei)), + sdk.NewCoin(DefaultRewardDenom, sdk.NewInt(40).MulRaw(stratos.StosToWei)), sdk.NewInt(6200), sdk.NewInt(1800), sdk.NewInt(2000))) miningRewardParams = append(miningRewardParams, NewMiningRewardParam( - sdk.NewCoin(DefaultRewardDenom, sdk.NewInt(25228800000000000)), - sdk.NewCoin(DefaultRewardDenom, sdk.NewInt(29433600000000000)), - sdk.NewCoin(DefaultRewardDenom, sdk.NewInt(20000000000)), + sdk.NewCoin(DefaultRewardDenom, sdk.NewInt(25228800).MulRaw(stratos.StosToWei)), + sdk.NewCoin(DefaultRewardDenom, sdk.NewInt(29433600).MulRaw(stratos.StosToWei)), + sdk.NewCoin(DefaultRewardDenom, sdk.NewInt(20).MulRaw(stratos.StosToWei)), sdk.NewInt(6400), sdk.NewInt(1600), sdk.NewInt(2000))) miningRewardParams = append(miningRewardParams, NewMiningRewardParam( - sdk.NewCoin(DefaultRewardDenom, sdk.NewInt(29433600000000000)), - sdk.NewCoin(DefaultRewardDenom, sdk.NewInt(31536000000000000)), - sdk.NewCoin(DefaultRewardDenom, sdk.NewInt(10000000000)), + sdk.NewCoin(DefaultRewardDenom, sdk.NewInt(29433600).MulRaw(stratos.StosToWei)), + sdk.NewCoin(DefaultRewardDenom, sdk.NewInt(31536000).MulRaw(stratos.StosToWei)), + sdk.NewCoin(DefaultRewardDenom, sdk.NewInt(10).MulRaw(stratos.StosToWei)), sdk.NewInt(6600), sdk.NewInt(1400), sdk.NewInt(2000))) miningRewardParams = append(miningRewardParams, NewMiningRewardParam( - sdk.NewCoin(DefaultRewardDenom, sdk.NewInt(31536000000000000)), - sdk.NewCoin(DefaultRewardDenom, sdk.NewInt(32587200000000000)), - sdk.NewCoin(DefaultRewardDenom, sdk.NewInt(5000000000)), + sdk.NewCoin(DefaultRewardDenom, sdk.NewInt(31536000).MulRaw(stratos.StosToWei)), + sdk.NewCoin(DefaultRewardDenom, sdk.NewInt(32587200).MulRaw(stratos.StosToWei)), + sdk.NewCoin(DefaultRewardDenom, sdk.NewInt(5).MulRaw(stratos.StosToWei)), sdk.NewInt(6800), sdk.NewInt(1200), sdk.NewInt(2000))) miningRewardParams = append(miningRewardParams, NewMiningRewardParam( - sdk.NewCoin(DefaultRewardDenom, sdk.NewInt(32587200000000000)), - sdk.NewCoin(DefaultRewardDenom, sdk.NewInt(40000000000000000)), - sdk.NewCoin(DefaultRewardDenom, sdk.NewInt(2500000000)), + sdk.NewCoin(DefaultRewardDenom, sdk.NewInt(32587200).MulRaw(stratos.StosToWei)), + sdk.NewCoin(DefaultRewardDenom, sdk.NewInt(40000000).MulRaw(stratos.StosToWei)), + sdk.NewCoin(DefaultRewardDenom, sdk.NewInt(25).MulRaw(1e17)), sdk.NewInt(7000), sdk.NewInt(1000), sdk.NewInt(2000))) return NewParams( diff --git a/x/register/keeper/migrations.go b/x/register/keeper/migrations.go index 84f19c01..c0558cb4 100644 --- a/x/register/keeper/migrations.go +++ b/x/register/keeper/migrations.go @@ -2,7 +2,6 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - v043 "github.com/cosmos/cosmos-sdk/x/slashing/legacy/v043" ) // Migrator is a struct for handling in-place store migrations. @@ -17,5 +16,5 @@ func NewMigrator(keeper Keeper) Migrator { // Migrate1to2 migrates from version 1 to 2. func (m Migrator) Migrate1to2(ctx sdk.Context) error { - return v043.MigrateStore(ctx, m.keeper.storeKey) + return nil } diff --git a/x/register/module.go b/x/register/module.go index 4d2ac356..cfd10699 100644 --- a/x/register/module.go +++ b/x/register/module.go @@ -145,12 +145,12 @@ func (am AppModule) RegisterServices(cfg module.Configurator) { querier := keeper.Querier{Keeper: am.keeper} types.RegisterQueryServer(cfg.QueryServer(), querier) - m := keeper.NewMigrator(am.keeper) - _ = cfg.RegisterMigration(types.ModuleName, 1, m.Migrate1to2) + //m := keeper.NewMigrator(am.keeper) + //_ = cfg.RegisterMigration(types.ModuleName, 1, m.Migrate1to2) } // ConsensusVersion implements AppModule/ConsensusVersion. -func (AppModule) ConsensusVersion() uint64 { return 2 } +func (AppModule) ConsensusVersion() uint64 { return 1 } // ProposalContents doesn't return any content functions for governance proposals. func (AppModule) ProposalContents(simState module.SimulationState) []simtypes.WeightedProposalContent { diff --git a/x/sds/keeper/migrations.go b/x/sds/keeper/migrations.go index d4e4c6df..c0558cb4 100644 --- a/x/sds/keeper/migrations.go +++ b/x/sds/keeper/migrations.go @@ -2,7 +2,6 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - v043 "github.com/cosmos/cosmos-sdk/x/slashing/legacy/v043" ) // Migrator is a struct for handling in-place store migrations. @@ -17,5 +16,5 @@ func NewMigrator(keeper Keeper) Migrator { // Migrate1to2 migrates from version 1 to 2. func (m Migrator) Migrate1to2(ctx sdk.Context) error { - return v043.MigrateStore(ctx, m.keeper.key) + return nil } diff --git a/x/sds/module.go b/x/sds/module.go index 384bfffa..4f03465d 100644 --- a/x/sds/module.go +++ b/x/sds/module.go @@ -163,7 +163,7 @@ func (AppModule) EndBlock(_ sdk.Context, _ abci.RequestEndBlock) []abci.Validato } // ConsensusVersion implements AppModule/ConsensusVersion. -func (AppModule) ConsensusVersion() uint64 { return 2 } +func (AppModule) ConsensusVersion() uint64 { return 1 } // LegacyQuerierHandler returns the sds module sdk.Querier. func (am AppModule) LegacyQuerierHandler(legacyQuerierCdc *codec.LegacyAmino) sdk.Querier { @@ -176,8 +176,8 @@ func (am AppModule) RegisterServices(cfg module.Configurator) { querier := keeper.Querier{Keeper: am.keeper} types.RegisterQueryServer(cfg.QueryServer(), querier) - m := keeper.NewMigrator(am.keeper) - _ = cfg.RegisterMigration(types.ModuleName, 1, m.Migrate1to2) + //m := keeper.NewMigrator(am.keeper) + //_ = cfg.RegisterMigration(types.ModuleName, 1, m.Migrate1to2) } // ProposalContents doesn't return any content functions for governance proposals. From 59c4944d7e033bd6921072944dbdcc6e36d8fbe1 Mon Sep 17 00:00:00 2001 From: BoThe1K <121880388+BoThe1K@users.noreply.github.com> Date: Tue, 20 Jun 2023 23:40:56 +0200 Subject: [PATCH 93/95] Revert "Qb 1816 - implement proxy, add prepay (#265)" (#285) This reverts commit b05d09e8fc7e45e36fa7340d25561d57610e3fa5. --- .gitignore | 1 - app/ante/eth.go | 3 +- app/ante/interfaces.go | 2 +- app/app.go | 18 +- core/statedb/journal.go | 133 - core/statedb/state_object.go | 94 - core/statedb/statedb.go | 165 - core/statedb/types.go | 59 - go.mod | 5 +- go.sum | 7 +- package.json | 19 - packages/gov/.eslintignore | 4 - packages/gov/.eslintrc.js | 24 - packages/gov/.gitignore | 11 - packages/gov/.npmignore | 3 - packages/gov/.prettierignore | 5 - packages/gov/.solhint.json | 15 - packages/gov/README.md | 14 - packages/gov/contracts/Prepay.sol | 48 - .../gov/contracts/mock/PrepayMockOverride.sol | 46 - packages/gov/contracts/versions/Version0.sol | 11 - packages/gov/contracts/versions/Version1.sol | 11 - packages/gov/hardhat.config.ts | 41 - packages/gov/package.json | 42 - packages/gov/test/Prepay.test.ts | 38 - packages/gov/tsconfig.json | 11 - packages/tsconfig.package.json | 38 - proto/stratos/evm/v1/evm.proto | 26 - proto/stratos/evm/v1/proposal.proto | 21 - rpc/namespaces/ethereum/debug/api.go | 15 +- rpc/namespaces/ethereum/eth/api.go | 2 +- types/config.go | 3 +- x/evm/client/cli/tx.go | 99 - x/evm/client/proposal_handler.go | 25 - x/evm/keeper/abci.go | 11 - x/evm/keeper/grpc_query.go | 20 +- x/evm/keeper/keeper.go | 61 +- x/evm/keeper/proposal.go | 305 - x/evm/keeper/state_transition.go | 77 +- x/evm/keeper/store.go | 42 - x/evm/proposal_handler.go | 28 - x/evm/simulation/genesis.go | 4 +- x/evm/statedb/statedb.go | 36 +- x/evm/tracers/js/goja.go | 8 +- x/evm/tracers/logger/access_list_tracer.go | 184 - x/evm/tracers/logger/gen_structlog.go | 110 - x/evm/tracers/logger/logger.go | 464 - x/evm/tracers/logger/logger_json.go | 104 - x/evm/tracers/native/4byte.go | 21 +- x/evm/tracers/native/call.go | 4 +- x/evm/tracers/native/noop.go | 4 +- x/evm/tracers/native/prestate.go | 4 +- x/evm/tracers/native/revertreason.go | 4 +- x/evm/tracers/native/tracer.go | 10 +- x/evm/types/codec.go | 12 - x/evm/types/contracts.go | 23 - x/evm/types/evm.pb.go | 1011 +-- x/evm/types/interfaces.go | 14 +- x/evm/types/params.go | 107 +- x/evm/types/proposal.go | 79 - x/evm/types/proposal.pb.go | 487 -- x/evm/{tracers/tracers.go => types/tracer.go} | 82 +- x/evm/vm/analysis.go | 118 - x/evm/vm/common.go | 82 - x/evm/vm/contract.go | 194 - x/evm/vm/contracts.go | 1043 --- x/evm/vm/doc.go | 24 - x/evm/vm/eips.go | 194 - x/evm/vm/errors.go | 72 - x/evm/vm/evm.go | 630 -- x/evm/vm/gas.go | 59 - x/evm/vm/gas_table.go | 458 - x/evm/vm/instructions.go | 1017 --- x/evm/vm/interface.go | 106 - x/evm/vm/interpreter.go | 258 - x/evm/vm/jump_table.go | 1062 --- x/evm/vm/keeper_amplifier.go | 28 - x/evm/vm/logger.go | 44 - x/evm/vm/memory.go | 105 - x/evm/vm/memory_table.go | 128 - x/evm/vm/opcodes.go | 562 -- x/evm/vm/operations_acl.go | 244 - x/evm/vm/stack.go | 82 - x/evm/vm/stack_table.go | 42 - x/evm/vm/verifier.go | 39 - x/register/keeper/store.go | 20 - x/register/keeper/store_new.go | 35 - x/sds/keeper/keeper.go | 23 +- yarn.lock | 7594 ----------------- 89 files changed, 223 insertions(+), 18415 deletions(-) delete mode 100644 core/statedb/journal.go delete mode 100644 core/statedb/state_object.go delete mode 100644 core/statedb/statedb.go delete mode 100644 core/statedb/types.go delete mode 100644 package.json delete mode 100644 packages/gov/.eslintignore delete mode 100644 packages/gov/.eslintrc.js delete mode 100644 packages/gov/.gitignore delete mode 100644 packages/gov/.npmignore delete mode 100644 packages/gov/.prettierignore delete mode 100644 packages/gov/.solhint.json delete mode 100644 packages/gov/README.md delete mode 100644 packages/gov/contracts/Prepay.sol delete mode 100644 packages/gov/contracts/mock/PrepayMockOverride.sol delete mode 100644 packages/gov/contracts/versions/Version0.sol delete mode 100644 packages/gov/contracts/versions/Version1.sol delete mode 100644 packages/gov/hardhat.config.ts delete mode 100644 packages/gov/package.json delete mode 100644 packages/gov/test/Prepay.test.ts delete mode 100644 packages/gov/tsconfig.json delete mode 100644 packages/tsconfig.package.json delete mode 100644 proto/stratos/evm/v1/proposal.proto delete mode 100644 x/evm/client/proposal_handler.go delete mode 100644 x/evm/keeper/proposal.go delete mode 100644 x/evm/keeper/store.go delete mode 100644 x/evm/proposal_handler.go delete mode 100644 x/evm/tracers/logger/access_list_tracer.go delete mode 100644 x/evm/tracers/logger/gen_structlog.go delete mode 100644 x/evm/tracers/logger/logger.go delete mode 100644 x/evm/tracers/logger/logger_json.go delete mode 100644 x/evm/types/contracts.go delete mode 100644 x/evm/types/proposal.go delete mode 100644 x/evm/types/proposal.pb.go rename x/evm/{tracers/tracers.go => types/tracer.go} (64%) delete mode 100644 x/evm/vm/analysis.go delete mode 100644 x/evm/vm/common.go delete mode 100644 x/evm/vm/contract.go delete mode 100644 x/evm/vm/contracts.go delete mode 100644 x/evm/vm/doc.go delete mode 100644 x/evm/vm/eips.go delete mode 100644 x/evm/vm/errors.go delete mode 100644 x/evm/vm/evm.go delete mode 100644 x/evm/vm/gas.go delete mode 100644 x/evm/vm/gas_table.go delete mode 100644 x/evm/vm/instructions.go delete mode 100644 x/evm/vm/interface.go delete mode 100644 x/evm/vm/interpreter.go delete mode 100644 x/evm/vm/jump_table.go delete mode 100644 x/evm/vm/keeper_amplifier.go delete mode 100644 x/evm/vm/logger.go delete mode 100644 x/evm/vm/memory.go delete mode 100644 x/evm/vm/memory_table.go delete mode 100644 x/evm/vm/opcodes.go delete mode 100644 x/evm/vm/operations_acl.go delete mode 100644 x/evm/vm/stack.go delete mode 100644 x/evm/vm/stack_table.go delete mode 100644 x/evm/vm/verifier.go delete mode 100644 x/register/keeper/store_new.go delete mode 100644 yarn.lock diff --git a/.gitignore b/.gitignore index 2693ff77..62dfce57 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,3 @@ playground.go /tmp-swagger-gen/ /github.com/ .DS_Store -node_modules/ diff --git a/app/ante/eth.go b/app/ante/eth.go index 45ac713b..71add19b 100644 --- a/app/ante/eth.go +++ b/app/ante/eth.go @@ -14,7 +14,6 @@ import ( stratos "github.com/stratosnet/stratos-chain/types" evmkeeper "github.com/stratosnet/stratos-chain/x/evm/keeper" "github.com/stratosnet/stratos-chain/x/evm/statedb" - "github.com/stratosnet/stratos-chain/x/evm/tracers" evmtypes "github.com/stratosnet/stratos-chain/x/evm/types" ) @@ -313,7 +312,7 @@ func (ctd CanTransferDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate BaseFee: baseFee, } stateDB := statedb.New(ctx, ctd.evmKeeper, statedb.NewEmptyTxConfig(common.BytesToHash(ctx.HeaderHash().Bytes()))) - evm := ctd.evmKeeper.NewEVM(ctx, coreMsg, cfg, tracers.NewNoOpTracer(), stateDB) + evm := ctd.evmKeeper.NewEVM(ctx, coreMsg, cfg, evmtypes.NewNoOpTracer(), stateDB) // check that caller has enough balance to cover asset transfer for **topmost** call // NOTE: here the gas consumed is from the context with the infinite gas meter diff --git a/app/ante/interfaces.go b/app/ante/interfaces.go index b11dda54..89369928 100644 --- a/app/ante/interfaces.go +++ b/app/ante/interfaces.go @@ -9,11 +9,11 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core" + "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/params" "github.com/stratosnet/stratos-chain/x/evm/statedb" evmtypes "github.com/stratosnet/stratos-chain/x/evm/types" - "github.com/stratosnet/stratos-chain/x/evm/vm" ) // AccountKeeper defines the contract needed for AccountKeeper related APIs. diff --git a/app/app.go b/app/app.go index a107735a..29c301b2 100644 --- a/app/app.go +++ b/app/app.go @@ -96,7 +96,6 @@ import ( srvflags "github.com/stratosnet/stratos-chain/server/flags" stratos "github.com/stratosnet/stratos-chain/types" "github.com/stratosnet/stratos-chain/x/evm" - evmclient "github.com/stratosnet/stratos-chain/x/evm/client" evmrest "github.com/stratosnet/stratos-chain/x/evm/client/rest" evmkeeper "github.com/stratosnet/stratos-chain/x/evm/keeper" evmtypes "github.com/stratosnet/stratos-chain/x/evm/types" @@ -137,7 +136,6 @@ var ( upgradeclient.CancelProposalHandler, ibcclientclient.UpdateClientProposalHandler, ibcclientclient.UpgradeProposalHandler, - evmclient.EVMChangeProxyImplementationHandler, ), params.AppModuleBasic{}, crisis.AppModuleBasic{}, @@ -189,9 +187,8 @@ var ( // module accounts that are allowed to receive tokens allowedReceivingModAcc = map[string]bool{ - distrtypes.ModuleName: true, - authtypes.FeeCollectorName: true, - registertypes.TotalUnissuedPrepay: true, + distrtypes.ModuleName: true, + authtypes.FeeCollectorName: true, //pot.FoundationAccount: true, } ) @@ -360,7 +357,8 @@ func NewInitApp( tracer := cast.ToString(appOpts.Get(srvflags.EVMTracer)) app.evmKeeper = evmkeeper.NewKeeper( appCodec, keys[evmtypes.StoreKey], tKeys[evmtypes.TransientKey], app.GetSubspace(evmtypes.ModuleName), - app.accountKeeper, app.bankKeeper, app.stakingKeeper, nil, tracer, + app.accountKeeper, app.bankKeeper, app.stakingKeeper, + tracer, ) // Create IBC Keeper @@ -373,8 +371,7 @@ func NewInitApp( AddRoute(paramproposal.RouterKey, params.NewParamChangeProposalHandler(app.paramsKeeper)). AddRoute(distrtypes.RouterKey, distr.NewCommunityPoolSpendProposalHandler(app.distrKeeper)). AddRoute(upgradetypes.RouterKey, upgrade.NewSoftwareUpgradeProposalHandler(app.upgradeKeeper)). - AddRoute(ibchost.RouterKey, ibcclient.NewClientProposalHandler(app.ibcKeeper.ClientKeeper)). - AddRoute(evmtypes.RouterKey, evm.NewEVMChangeProposalHandler(app.evmKeeper)) + AddRoute(ibchost.RouterKey, ibcclient.NewClientProposalHandler(app.ibcKeeper.ClientKeeper)) govKeeper := govkeeper.NewKeeper( appCodec, keys[govtypes.StoreKey], app.GetSubspace(govtypes.ModuleName), app.accountKeeper, app.bankKeeper, @@ -440,11 +437,6 @@ func NewInitApp( app.potKeeper, ) - // required because of weird order( - // possible solution is to make all keepers as pointers, hovewer this could break something - app.evmKeeper.SetRegisterKeeper(&app.registerKeeper) - app.evmKeeper.SetSdsKeeper(&app.sdsKeeper) - /**** Module Options ****/ // NOTE: we may consider parsing `appOpts` inside module constructors. For the moment diff --git a/core/statedb/journal.go b/core/statedb/journal.go deleted file mode 100644 index d55b748e..00000000 --- a/core/statedb/journal.go +++ /dev/null @@ -1,133 +0,0 @@ -package statedb - -import ( - "bytes" - "sort" - - sdk "github.com/cosmos/cosmos-sdk/types" -) - -type dirtyObj struct { - storeKey sdk.StoreKey - key StorageKey -} - -func (do *dirtyObj) ObjKey() []byte { - return append([]byte(do.storeKey.Name()), do.key[:]...) -} - -// journalEntry is a modification entry in the state change journal that can be -// reverted on demand. -type journalEntry interface { - // revert undoes the changes introduced by this journal entry. - revert(*KeestateDB) - - // dirtied returns the key modified by this journal entry. - dirtied() *dirtyObj -} - -// journal contains the list of state modifications applied since the last state -// commit. These are tracked to be able to be reverted in the case of an execution -// exception or request for reversal. -type journal struct { - entries []journalEntry // Current changes tracked by the journal - dirties map[sdk.StoreKey]map[StorageKey]int // Dirty accounts and the number of changes -} - -// newJournal creates a new initialized journal. -func newJournal() *journal { - return &journal{ - dirties: make(map[sdk.StoreKey]map[StorageKey]int), - } -} - -// sortedDirties sort the dirty addresses for deterministic iteration -func (j *journal) sortedDirties() []*dirtyObj { - keys := make([]*dirtyObj, 0) - t := 0 - for i := range j.dirties { - for k := range j.dirties[i] { - keys = append(keys, &dirtyObj{ - storeKey: i, - key: k, - }) - t++ - } - } - sort.Slice(keys, func(i, j int) bool { - return bytes.Compare(keys[i].ObjKey(), keys[j].ObjKey()) < 0 - }) - return keys -} - -// append inserts a new modification entry to the end of the change journal. -func (j *journal) append(entry journalEntry) { - j.entries = append(j.entries, entry) - if dirty := entry.dirtied(); dirty != nil { - if _, ok := j.dirties[dirty.storeKey]; !ok { - j.dirties[dirty.storeKey] = make(map[StorageKey]int) - } - j.dirties[dirty.storeKey][dirty.key]++ - } -} - -// revert undoes a batch of journalled modifications along with any reverted -// dirty handling too. -func (j *journal) revert(statedb *KeestateDB, snapshot int) { - for i := len(j.entries) - 1; i >= snapshot; i-- { - // Undo the changes made by the operation - j.entries[i].revert(statedb) - - // Drop any dirty tracking induced by the change - if dirty := j.entries[i].dirtied(); dirty != nil { - if j.dirties[dirty.storeKey][dirty.key]--; j.dirties[dirty.storeKey][dirty.key] == 0 { - delete(j.dirties[dirty.storeKey], dirty.key) - } - } - } - j.entries = j.entries[:snapshot] -} - -// length returns the current number of entries in the journal. -func (j *journal) length() int { - return len(j.entries) -} - -type ( - storageChange struct { - storeKey sdk.StoreKey - key StorageKey - prevalue StorageValue - } - createObjectChange struct { - storeKey sdk.StoreKey - key StorageKey - } - resetObjectChange struct { - prev *stateObject - } -) - -func (ch storageChange) revert(s *KeestateDB) { - s.getStateObject(ch.storeKey, []byte(ch.key)).SetState(ch.prevalue.Result()) -} - -func (ch storageChange) dirtied() *dirtyObj { - return &dirtyObj{storeKey: ch.storeKey, key: ch.key} -} - -func (ch createObjectChange) revert(s *KeestateDB) { - delete(s.stateObjects[ch.storeKey], ch.key) -} - -func (ch createObjectChange) dirtied() *dirtyObj { - return &dirtyObj{storeKey: ch.storeKey, key: ch.key} -} - -func (ch resetObjectChange) revert(s *KeestateDB) { - s.setStateObject(ch.prev) -} - -func (ch resetObjectChange) dirtied() *dirtyObj { - return nil -} diff --git a/core/statedb/state_object.go b/core/statedb/state_object.go deleted file mode 100644 index 2075a779..00000000 --- a/core/statedb/state_object.go +++ /dev/null @@ -1,94 +0,0 @@ -package statedb - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" -) - -// stateObject is the state of an acount -type stateObject struct { - ctx sdk.Context - db *KeestateDB - - storeKey sdk.StoreKey - key StorageKey - value StorageValue - - // state storage - originStorage Storage - dirtyStorage Storage -} - -// newObject creates a state object. -func newObject(db *KeestateDB, storeKey sdk.StoreKey, key StorageKey) *stateObject { - so := &stateObject{ - ctx: db.ctx, - db: db, - storeKey: storeKey, - key: key, - originStorage: make(Storage), - dirtyStorage: make(Storage), - } - if value := so.read(); value.Result() != nil { - so.value = value - } - return so -} - -func (s stateObject) read() StorageValue { - value := s.ctx.KVStore(s.storeKey).Get([]byte(s.key)) - if value != nil { - return NewStorageValue(value) - } - return StorageValue{} -} - -func (s stateObject) store(value StorageValue) { - store := s.ctx.KVStore(s.storeKey) - if value.IsNil() { - store.Delete([]byte(s.key)) - } else { - store.Set([]byte(s.key), value.Result()) - } -} - -// GetCommittedState query the committed state -func (s *stateObject) GetCommittedState() StorageValue { - if value, cached := s.originStorage[s.key]; cached { - return value - } - // If no live objects are available, load it from indexdb - value := s.read() - if value.IsNil() { - return StorageValue{} - } - s.originStorage[s.key] = value - return value -} - -// GetState query the current state (including dirty state) -func (s *stateObject) GetState() StorageValue { - if value, dirty := s.dirtyStorage[s.key]; dirty { - return value - } - return s.GetCommittedState() -} - -// SetState sets the contract state -func (s *stateObject) SetState(value []byte) { - // If the new value is the same as old, don't set - prev := s.GetState() - if prev.Eq(value) { - return - } - // New value is different, update and journal the change - s.db.journal.append(storageChange{ - storeKey: s.storeKey, - key: s.key, - prevalue: prev, - }) - s.setState(value) -} - -func (s *stateObject) setState(value []byte) { - s.dirtyStorage[s.key] = NewStorageValue(value) -} diff --git a/core/statedb/statedb.go b/core/statedb/statedb.go deleted file mode 100644 index 1f4c6fe9..00000000 --- a/core/statedb/statedb.go +++ /dev/null @@ -1,165 +0,0 @@ -package statedb - -import ( - "fmt" - "sort" - - sdk "github.com/cosmos/cosmos-sdk/types" -) - -// revision is the identifier of a version of state. -// it consists of an auto-increment id and a journal index. -// it's safer to use than using journal index alone. -type revision struct { - id int - journalIndex int -} - -type KeestateDB struct { - ctx sdk.Context - - // Journal of state modifications. This is the backbone of - // Snapshot and RevertToSnapshot. - journal *journal - validRevisions []revision - nextRevisionID int - - stateObjects map[sdk.StoreKey]map[StorageKey]*stateObject -} - -// New creates a new state from a given trie. -func New(ctx sdk.Context) *KeestateDB { - return &KeestateDB{ - ctx: ctx, - journal: newJournal(), - stateObjects: make(map[sdk.StoreKey]map[StorageKey]*stateObject), - } -} - -func (ks *KeestateDB) getStateObject(storeKey sdk.StoreKey, key []byte) *stateObject { - skey := StorageKey(key) - // Prefer live objects if any is available - if obj := ks.stateObjects[storeKey][skey]; obj != nil { - return obj - } - - // Insert into the live set - obj := newObject(ks, storeKey, skey) - if obj.value.IsNil() { - // if not, means issue with db, return nil obj - return nil - } - ks.setStateObject(obj) - return obj -} - -func (ks *KeestateDB) getOrNewStateObject(storeKey sdk.StoreKey, key []byte) *stateObject { - stateObject := ks.getStateObject(storeKey, key) - if stateObject == nil { - stateObject, _ = ks.createObject(storeKey, key) - } - return stateObject -} - -func (ks *KeestateDB) setStateObject(object *stateObject) { - if _, ok := ks.stateObjects[object.storeKey]; !ok { - ks.stateObjects[object.storeKey] = make(map[StorageKey]*stateObject) - } - ks.stateObjects[object.storeKey][object.key] = object -} - -func (ks *KeestateDB) createObject(storeKey sdk.StoreKey, key []byte) (newobj, prev *stateObject) { - prev = ks.getStateObject(storeKey, key) - - skey := StorageKey(key) - newobj = newObject(ks, storeKey, skey) - if prev == nil { - ks.journal.append(createObjectChange{storeKey, skey}) - } else { - ks.journal.append(resetObjectChange{prev: prev}) - } - ks.setStateObject(newobj) - if prev != nil { - return newobj, prev - } - return newobj, nil -} - -// SetState sets the keeper state. -func (ks *KeestateDB) SetState(storeKey sdk.StoreKey, key, value []byte) { - stateObject := ks.getOrNewStateObject(storeKey, key) - if stateObject != nil { - stateObject.SetState(value) - } -} - -// GetState retrieves a value from the given key's storage trie. -func (ks *KeestateDB) GetState(storeKey sdk.StoreKey, key []byte) []byte { - stateObject := ks.getStateObject(storeKey, key) - if stateObject != nil { - stateValue := stateObject.GetState() - if !stateValue.IsNil() { - return stateValue.Result() - } - } - return nil -} - -// GetCommittedState retrieves a value from the given key's committed storage trie. -func (ks *KeestateDB) GetCommittedState(storeKey sdk.StoreKey, key []byte) []byte { - stateObject := ks.getStateObject(storeKey, key) - if stateObject != nil { - stateValue := stateObject.GetCommittedState() - if !stateValue.IsNil() { - return stateValue.Result() - } - } - return nil -} - -// Commit all changes to a storage trie -func (ks *KeestateDB) Commit() error { - for _, dirtyObj := range ks.journal.sortedDirties() { - obj := ks.stateObjects[dirtyObj.storeKey][dirtyObj.key] - for _, key := range obj.dirtyStorage.SortedKeys() { - value := obj.dirtyStorage[key] - origin := obj.originStorage[key] - // Skip noop changes, persist actual changes - if value.Eq(origin.Result()) { - continue - } - obj.store(value) - } - } - // no need to clean up as it will be always on fresh ctx - return nil -} - -// Snapshot returns an identifier for the current revision of the state. -func (ks *KeestateDB) Snapshot() int { - id := ks.nextRevisionID - ks.nextRevisionID++ - ks.validRevisions = append(ks.validRevisions, revision{id, ks.journal.length()}) - return id -} - -// RevertToSnapshot reverts all state changes made since the given revision. -func (ks *KeestateDB) RevertToSnapshot(revid int) { - // Find the snapshot in the stack of valid snapshots. - idx := sort.Search(len(ks.validRevisions), func(i int) bool { - return ks.validRevisions[i].id >= revid - }) - if idx == len(ks.validRevisions) || ks.validRevisions[idx].id != revid { - panic(fmt.Errorf("revision id %v cannot be reverted", revid)) - } - snapshot := ks.validRevisions[idx].journalIndex - - // Replay the journal to undo changes and remove invalidated snapshots - ks.journal.revert(ks, snapshot) - ks.validRevisions = ks.validRevisions[:idx] -} - -// GetSdkCtx returns current cosmos sdk context -func (ks *KeestateDB) GetSdkCtx() sdk.Context { - return ks.ctx -} diff --git a/core/statedb/types.go b/core/statedb/types.go deleted file mode 100644 index f1c60ee8..00000000 --- a/core/statedb/types.go +++ /dev/null @@ -1,59 +0,0 @@ -package statedb - -import ( - "bytes" - "sort" - "strings" -) - -type StorageKey string - -func (sk StorageKey) Len() int { - return len(sk) -} - -type StorageValue struct { - value []byte -} - -func (sv *StorageValue) Result() []byte { - return sv.value -} - -func (sv *StorageValue) Eq(v []byte) bool { - if sv.IsNil() && v == nil { - return true - } - if sv.IsNil() && v != nil { - return false - } - if !sv.IsNil() && v == nil { - return false - } - return bytes.Equal(sv.value, v) -} - -func (sv *StorageValue) IsNil() bool { - return sv.value == nil -} - -func NewStorageValue(v []byte) StorageValue { - return StorageValue{value: v} -} - -// Storage represents in-memory cache/buffer of contract storage. -type Storage map[StorageKey]StorageValue - -// SortedKeys sort the keys for deterministic iteration -func (s Storage) SortedKeys() []StorageKey { - keys := make([]StorageKey, len(s)) - i := 0 - for k := range s { - keys[i] = k - i++ - } - sort.Slice(keys, func(i, j int) bool { - return strings.Compare(string(keys[i]), string(keys[j])) < 0 - }) - return keys -} diff --git a/go.mod b/go.mod index 93c528ac..d3c11406 100644 --- a/go.mod +++ b/go.mod @@ -6,9 +6,9 @@ require ( github.com/Nik-U/pbc v0.0.0-20181205041846-3e516ca0c5d6 github.com/btcsuite/btcd v0.23.4 github.com/btcsuite/btcd/btcutil v1.1.2 - github.com/cosmos/cosmos-sdk v0.45.10 + github.com/cosmos/cosmos-sdk v0.45.9 github.com/cosmos/go-bip39 v1.0.0 - github.com/cosmos/ibc-go/v3 v3.4.0 + github.com/cosmos/ibc-go/v3 v3.0.0 github.com/davecgh/go-spew v1.1.1 github.com/dop251/goja v0.0.0-20220405120441-9037c2b61cbf github.com/ethereum/go-ethereum v1.10.26 @@ -80,6 +80,7 @@ require ( github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.5.1 // indirect github.com/go-ole/go-ole v1.2.1 // indirect + github.com/go-playground/validator/v10 v10.4.1 // indirect github.com/go-sourcemap/sourcemap v2.1.3+incompatible // indirect github.com/go-stack/stack v1.8.0 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect diff --git a/go.sum b/go.sum index ceeeb008..0b47294f 100644 --- a/go.sum +++ b/go.sum @@ -184,8 +184,8 @@ github.com/cosmos/gorocksdb v1.2.0 h1:d0l3jJG8M4hBouIZq0mDUHZ+zjOx044J3nGRskwTb4 github.com/cosmos/gorocksdb v1.2.0/go.mod h1:aaKvKItm514hKfNJpUJXnnOWeBnk2GL4+Qw9NHizILw= github.com/cosmos/iavl v0.19.4 h1:t82sN+Y0WeqxDLJRSpNd8YFX5URIrT+p8n6oJbJ2Dok= github.com/cosmos/iavl v0.19.4/go.mod h1:X9PKD3J0iFxdmgNLa7b2LYWdsGd90ToV5cAONApkEPw= -github.com/cosmos/ibc-go/v3 v3.4.0 h1:ha3cqEG36pqMWqA1D+kxDWBTZXpeFMd/aZIQF7I0xro= -github.com/cosmos/ibc-go/v3 v3.4.0/go.mod h1:VwB/vWu4ysT5DN2aF78d17LYmx3omSAdq6gpKvM7XRA= +github.com/cosmos/ibc-go/v3 v3.0.0 h1:XUNplHVS51Q2gMnTFsFsH9QJ7flsovMamnltKbEgPQ4= +github.com/cosmos/ibc-go/v3 v3.0.0/go.mod h1:Mb+1NXiPOLd+CPFlOC6BKeAUaxXlhuWenMmRiUiSmwY= github.com/cosmos/keyring v1.1.7-0.20210622111912-ef00f8ac3d76 h1:DdzS1m6o/pCqeZ8VOAit/gyATedRgjvkVI+UCrLpyuU= github.com/cosmos/keyring v1.1.7-0.20210622111912-ef00f8ac3d76/go.mod h1:0mkLWIoZuQ7uBoospo5Q9zIpqq6rYCPJDSUdeCJvPM8= github.com/cosmos/ledger-cosmos-go v0.12.2 h1:/XYaBlE2BJxtvpkHiBm97gFGSGmYGKunKyF3nNqAXZA= @@ -277,8 +277,8 @@ github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= -github.com/gin-gonic/gin v1.6.3 h1:ahKqKTFpO5KTPHxWZjEdPScmYaGtLo8Y4DMHoEsnp14= github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= +github.com/gin-gonic/gin v1.7.0 h1:jGB9xAJQ12AIGNB4HguylppmDK1Am9ppF7XnGXXJuoU= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -305,6 +305,7 @@ github.com/go-playground/universal-translator v0.17.0 h1:icxd5fm+REJzpZx7ZfpaD87 github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= github.com/go-playground/validator/v10 v10.4.1 h1:pH2c5ADXtd66mxoE0Zm9SUhxE20r7aM3F26W0hOn+GE= +github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4= github.com/go-sourcemap/sourcemap v2.1.2+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= github.com/go-sourcemap/sourcemap v2.1.3+incompatible h1:W1iEw64niKVGogNgBN3ePyLFfuisuzeidWPMPWmECqU= github.com/go-sourcemap/sourcemap v2.1.3+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= diff --git a/package.json b/package.json deleted file mode 100644 index abe60ead..00000000 --- a/package.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "@stratosnet/stratos-chain", - "private": true, - "workspaces": [ - "packages/gov" - ], - "scripts": { - "gov": "yarn workspace @stratosnet/stratos-chain-gov hh", - "compile": "yarn gov compile", - "test": "yarn gov test" - }, - "packageManager": "yarn@3.2.0", - "version": "1.0.0", - "description": "Stratoschain base launcher for workspace packages", - "main": "index.js", - "repository": "https://github.com/stratosnet/stratos-chain.git", - "author": "BoThe1K ", - "license": "MIT OR Apache-2.0" -} \ No newline at end of file diff --git a/packages/gov/.eslintignore b/packages/gov/.eslintignore deleted file mode 100644 index 85f5562a..00000000 --- a/packages/gov/.eslintignore +++ /dev/null @@ -1,4 +0,0 @@ -node_modules -artifacts -cache -coverage diff --git a/packages/gov/.eslintrc.js b/packages/gov/.eslintrc.js deleted file mode 100644 index 98ce1937..00000000 --- a/packages/gov/.eslintrc.js +++ /dev/null @@ -1,24 +0,0 @@ -module.exports = { - env: { - browser: false, - es2021: true, - mocha: true, - node: true, - }, - plugins: ["@typescript-eslint"], - extends: [ - "standard", - "plugin:prettier/recommended", - "plugin:node/recommended", - ], - parser: "@typescript-eslint/parser", - parserOptions: { - ecmaVersion: 12, - }, - rules: { - "node/no-unsupported-features/es-syntax": [ - "error", - { ignores: ["modules"] }, - ], - }, -}; diff --git a/packages/gov/.gitignore b/packages/gov/.gitignore deleted file mode 100644 index 00dad773..00000000 --- a/packages/gov/.gitignore +++ /dev/null @@ -1,11 +0,0 @@ -node_modules -.env -coverage -coverage.json -typechain -typechain-types - -# Hardhat files -cache -artifacts - diff --git a/packages/gov/.npmignore b/packages/gov/.npmignore deleted file mode 100644 index dc037817..00000000 --- a/packages/gov/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -hardhat.config.ts -scripts -test diff --git a/packages/gov/.prettierignore b/packages/gov/.prettierignore deleted file mode 100644 index f268596e..00000000 --- a/packages/gov/.prettierignore +++ /dev/null @@ -1,5 +0,0 @@ -node_modules -artifacts -cache -coverage* -gasReporterOutput.json diff --git a/packages/gov/.solhint.json b/packages/gov/.solhint.json deleted file mode 100644 index ec2551c5..00000000 --- a/packages/gov/.solhint.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "solhint:recommended", - "rules": { - "compiler-version": [ - "error", - "^0.8.18" - ], - "func-visibility": [ - "warn", - { - "ignoreConstructors": true - } - ] - } -} \ No newline at end of file diff --git a/packages/gov/README.md b/packages/gov/README.md deleted file mode 100644 index 5b7cba6f..00000000 --- a/packages/gov/README.md +++ /dev/null @@ -1,14 +0,0 @@ -# Stratos chain gov contracts - -This contracts relatd to gov mechanics via proxy calls like: - - Prepay - -Try running some of the following tasks: - -```shell -npx hardhat help -npx hardhat test -REPORT_GAS=true npx hardhat test -npx hardhat node -npx hardhat run scripts/deploy.ts -``` diff --git a/packages/gov/contracts/Prepay.sol b/packages/gov/contracts/Prepay.sol deleted file mode 100644 index 7987ca25..00000000 --- a/packages/gov/contracts/Prepay.sol +++ /dev/null @@ -1,48 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity ^0.8.18; - -import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; - -import "./versions/Version0.sol"; - -contract Prepay is Version0, OwnableUpgradeable { - event PrepayCreated( - address indexed sender, - address indexed beneficiery, - uint256 indexed amount, - uint256 purchased - ); - - // ----- proxy ------ - uint256[49] private __gap; - - // ===== fallbacks ===== - - receive() external payable {} - - // Initialize function for proxy constructor. Must be used atomically - function initialize() public initializer { - // proxy inits - __Context_init_unchained(); - __Ownable_init_unchained(); - } - - function prepay() external payable { - uint256 amount = msg.value; - require(amount != 0, "P: ZERO_AMOUNT"); - - uint256[1] memory input; - input[0] = uint256(uint160(msg.sender)); - - uint256[1] memory output; - - assembly { - if iszero(call(not(0), 0xf1, amount, input, 0x20, output, 0x20)) { - revert(0x0, 0x0) - } - } - - emit PrepayCreated(address(this), msg.sender, amount, output[0]); - } -} diff --git a/packages/gov/contracts/mock/PrepayMockOverride.sol b/packages/gov/contracts/mock/PrepayMockOverride.sol deleted file mode 100644 index 361a8289..00000000 --- a/packages/gov/contracts/mock/PrepayMockOverride.sol +++ /dev/null @@ -1,46 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity ^0.8.18; - -import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; - -import "../versions/Version1.sol"; - -contract PrepayMockOverride is Version1, OwnableUpgradeable { - event PrepayCreated( - address indexed sender, - address indexed beneficiery, - uint256 indexed amount, - uint256 purchased - ); - - address public EXECUTOR; - uint8 public IS_TEST; - - // ----- proxy ------ - uint256[47] private __gap; - - // ===== fallbacks ===== - - receive() external payable {} - - function upgrade() public { - require( - _msgSender() == 0x1000000000000000000000000000000000000000, - "PMO: WRONG_SENDER" - ); - IS_TEST = 1; - EXECUTOR = _msgSender(); - } - - // Initialize function for proxy constructor. Must be used atomically - function initialize() public initializer { - // proxy inits - __Context_init_unchained(); - __Ownable_init_unchained(); - } - - function prepay() external { - emit PrepayCreated(address(this), msg.sender, 0, 0); - } -} diff --git a/packages/gov/contracts/versions/Version0.sol b/packages/gov/contracts/versions/Version0.sol deleted file mode 100644 index cfa9f152..00000000 --- a/packages/gov/contracts/versions/Version0.sol +++ /dev/null @@ -1,11 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity ^0.8.0; - -/** - * @title Version0 - * @notice Version getter for contracts - **/ -contract Version0 { - uint8 public constant VERSION = 0; -} diff --git a/packages/gov/contracts/versions/Version1.sol b/packages/gov/contracts/versions/Version1.sol deleted file mode 100644 index 28b6a25e..00000000 --- a/packages/gov/contracts/versions/Version1.sol +++ /dev/null @@ -1,11 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity ^0.8.0; - -/** - * @title Version1 - * @notice Version getter for contracts - **/ -contract Version1 { - uint8 public constant VERSION = 1; -} diff --git a/packages/gov/hardhat.config.ts b/packages/gov/hardhat.config.ts deleted file mode 100644 index 52325a7b..00000000 --- a/packages/gov/hardhat.config.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { HardhatUserConfig, task } from "hardhat/config"; - -import "@nomicfoundation/hardhat-toolbox"; -import "hardhat-gas-reporter"; -import "hardhat-deploy"; -import "@nomiclabs/hardhat-ethers"; - -task("accounts", "Prints the list of accounts", async (taskArgs, hre) => { - const accounts = await hre.ethers.getSigners(); - - for (const account of accounts) { - console.log(account.address); - } -}); - -const config: HardhatUserConfig = { - solidity: "0.8.18", - contractSizer: { - alphaSort: true, - disambiguatePaths: false, - runOnCompile: true, - strict: true, - }, - networks: { - localnet: { - url: "http://localhost:8545", - accounts: { - mnemonic: "test test test test test test test test test test test junk", - }, - loggingEnabled: true, - }, - }, - namedAccounts: { - tester: 0, - }, - mocha: { - timeout: 100000000 - }, -}; - -export default config; diff --git a/packages/gov/package.json b/packages/gov/package.json deleted file mode 100644 index 9649ca8f..00000000 --- a/packages/gov/package.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "@stratosnet/stratos-chain-gov", - "description": "Gov contracts", - "version": "1.0.0", - "main": "index.js", - "directories": { - "hh": "hh" - }, - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "author": "", - "license": "MIT", - "devDependencies": { - "@ethersproject/abi": "^5.4.7", - "@ethersproject/providers": "^5.4.7", - "@nomicfoundation/hardhat-chai-matchers": "^1.0.0", - "@nomicfoundation/hardhat-network-helpers": "^1.0.0", - "@nomicfoundation/hardhat-toolbox": "^2.0.0", - "@nomiclabs/hardhat-ethers": "npm:hardhat-deploy-ethers", - "@nomiclabs/hardhat-etherscan": "^3.0.0", - "@openzeppelin/contracts": "^4.8.3", - "@openzeppelin/contracts-upgradeable": "^4.8.3", - "@openzeppelin/hardhat-upgrades": "^1.23.1", - "@openzeppelin/test-helpers": "^0.5.16", - "@typechain/ethers-v5": "^10.1.0", - "@typechain/hardhat": "^6.1.2", - "@types/chai": "^4.2.0", - "@types/mocha": ">=9.1.0", - "@types/node": ">=12.0.0", - "chai": "^4.2.0", - "ethers": "5.7.2", - "hardhat": "^2.11.1", - "hardhat-deploy": "^0.11.29", - "hardhat-gas-reporter": "^1.0.8", - "hardhat-shorthand": "^1.0.0", - "solidity-coverage": "^0.8.0", - "ts-node": ">=8.0.0", - "typechain": "^8.1.0", - "typescript": ">=4.5.0" - } -} diff --git a/packages/gov/test/Prepay.test.ts b/packages/gov/test/Prepay.test.ts deleted file mode 100644 index 8d81894b..00000000 --- a/packages/gov/test/Prepay.test.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { ethers } from "hardhat" -import { Prepay } from "../typechain-types"; -import { expect } from "chai"; - -describe("Prepay local test", () => { - - // could be changed - const prepayContractAddress = '0x1000000000000000000000000000000000010101'; - const totalUnissuedPrepayAddress = '0xa2776119cb0503aaa30f11b6d3fb1b6ba539c61d'; - - const prepayValue = ethers.utils.parseUnits('1', 'gwei'); - const purchased = ethers.utils.parseUnits('999', 'wei') - - it("should prepay be executed", async () => { - const signer = await ethers.getNamedSigner("tester"); - - console.group('1. Unissued address check') - const balanceBefore = await ethers.provider.getBalance(totalUnissuedPrepayAddress); - console.log("Checking balance before next step for unissued address:", balanceBefore.toString()); - console.groupEnd(); - - console.group('2. Preparations for prepay') - const contract: Prepay = await ethers.getContractAt("Prepay", prepayContractAddress, signer); - console.log(`Executing prepay with "${prepayValue.toString()}" ETH on proxy contract "${prepayContractAddress}"...`) - const tx = contract.prepay({ value: prepayValue }); - - await expect(tx).to - .emit(contract, "PrepayCreated") - .withArgs(contract.address, signer.address, prepayValue, purchased); - - console.log(`Completed, result: "${(await tx).hash}"`); - - const balanceAfter = await ethers.provider.getBalance(totalUnissuedPrepayAddress); - console.log("Checking balance after next step for unissued address:", balanceAfter.toString()); - expect(balanceAfter).to.be.eq(balanceBefore.add(purchased)); - console.groupEnd(); - }) -}) diff --git a/packages/gov/tsconfig.json b/packages/gov/tsconfig.json deleted file mode 100644 index 574e785c..00000000 --- a/packages/gov/tsconfig.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "compilerOptions": { - "target": "es2020", - "module": "commonjs", - "esModuleInterop": true, - "forceConsistentCasingInFileNames": true, - "strict": true, - "skipLibCheck": true, - "resolveJsonModule": true - } -} diff --git a/packages/tsconfig.package.json b/packages/tsconfig.package.json deleted file mode 100644 index 5f06d36d..00000000 --- a/packages/tsconfig.package.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "exclude": [ - "**/dist/**", - "**/node_modules/**", - "**/test/**" - ], - "compilerOptions": { - "composite": true, - "declaration": true, - "declarationMap": true, - "esModuleInterop": true, - "forceConsistentCasingInFileNames": true, - "lib": [ - "es2015", - "es5", - "dom" - ], - "module": "commonjs", - "moduleResolution": "node", - "noEmitOnError": true, - "noFallthroughCasesInSwitch": true, - "noImplicitAny": false, - "noImplicitReturns": false, - "noUnusedLocals": true, - "preserveSymlinks": true, - "preserveWatchOutput": true, - "pretty": false, - "resolveJsonModule": true, - "sourceMap": true, - "target": "es6", - "strict": true - }, - "references": [ - { - "path": "./gov" - }, - ] -} \ No newline at end of file diff --git a/proto/stratos/evm/v1/evm.proto b/proto/stratos/evm/v1/evm.proto index e308cb32..8d5dfe35 100644 --- a/proto/stratos/evm/v1/evm.proto +++ b/proto/stratos/evm/v1/evm.proto @@ -28,10 +28,6 @@ message Params { (gogoproto.moretags) = "yaml:\"fee_market_params\"", (gogoproto.nullable) = false ]; - ProxyProposalParams proxy_proposal_params = 7 [ - (gogoproto.moretags) = "yaml:\"proxy_proposal_params\"", - (gogoproto.nullable) = false - ]; } // ChainConfig defines the Ethereum ChainConfig parameters using *sdk.Int values @@ -265,26 +261,4 @@ message FeeMarketParams { (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false ]; -} - -message ProxyContractInitState { - // height where it should be applied - uint64 height = 1; - // address of proxy contract - string address = 2; - // solidity compiled code - string bin = 3; - // initializer method data - string init = 4; -} - -// Params defines default proxy addresses for futur gov contracts update -message ProxyProposalParams { - // consensus address as msg.sender, used to define admin authority, could be simply zero address or custom - // basically it is an owner of evrything. resposible to add proxies and update proxies implementations - string consensus_address = 1; - // proxy owner who basically the owner of proxy contract (for Ownable purpose, not admin) - string proxy_owner_address = 2; - // proxy contracts name per address reservations - map contracts = 3; } \ No newline at end of file diff --git a/proto/stratos/evm/v1/proposal.proto b/proto/stratos/evm/v1/proposal.proto deleted file mode 100644 index 6ec3ebbc..00000000 --- a/proto/stratos/evm/v1/proposal.proto +++ /dev/null @@ -1,21 +0,0 @@ -syntax = "proto3"; -package stratos.evm.v1; - -import "gogoproto/gogo.proto"; - -option go_package = "github.com/stratosnet/stratos-chain/x/evm/types"; - -// UpdateImplmentationProposal used to update implemntation for genesis proxies -message UpdateImplmentationProposal { - // proxy address where data will be executed - string proxy_address = 1; - // implmentation address as API for a storage - string implementation_address = 2; - // data for execution - bytes data = 3; - // value for proxy func call - string value = 4 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.customname) = "Amount" - ]; -} \ No newline at end of file diff --git a/rpc/namespaces/ethereum/debug/api.go b/rpc/namespaces/ethereum/debug/api.go index 89743869..6ec028d4 100644 --- a/rpc/namespaces/ethereum/debug/api.go +++ b/rpc/namespaces/ethereum/debug/api.go @@ -16,8 +16,11 @@ import ( "time" "github.com/davecgh/go-spew/spew" + "github.com/ethereum/go-ethereum/eth/tracers" stderrors "github.com/pkg/errors" + "github.com/ethereum/go-ethereum/eth/tracers/logger" + "github.com/tendermint/tendermint/libs/log" tmrpctypes "github.com/tendermint/tendermint/rpc/core/types" @@ -33,9 +36,7 @@ import ( "github.com/stratosnet/stratos-chain/rpc/backend" rpctypes "github.com/stratosnet/stratos-chain/rpc/types" - "github.com/stratosnet/stratos-chain/x/evm/tracers" jstracers "github.com/stratosnet/stratos-chain/x/evm/tracers/js" - "github.com/stratosnet/stratos-chain/x/evm/tracers/logger" nativetracers "github.com/stratosnet/stratos-chain/x/evm/tracers/native" evmtypes "github.com/stratosnet/stratos-chain/x/evm/types" tmrpccore "github.com/tendermint/tendermint/rpc/core" @@ -196,7 +197,7 @@ func (a *API) TraceTransaction(ctx context.Context, hash common.Hash, config *tr // TraceBlockByNumber returns the structured logs created during the execution of // EVM and returns them as a JSON object. -func (a *API) TraceBlockByNumber(height rpctypes.BlockNumber, config *evmtypes.TraceConfig) ([]*tracers.TxTraceResult, error) { +func (a *API) TraceBlockByNumber(height rpctypes.BlockNumber, config *evmtypes.TraceConfig) ([]*evmtypes.TxTraceResult, error) { a.logger.Debug("debug_traceBlockByNumber", "height", height) if height == 0 { return nil, errors.New("genesis is not traceable") @@ -213,7 +214,7 @@ func (a *API) TraceBlockByNumber(height rpctypes.BlockNumber, config *evmtypes.T // TraceBlockByHash returns the structured logs created during the execution of // EVM and returns them as a JSON object. -func (a *API) TraceBlockByHash(hash common.Hash, config *evmtypes.TraceConfig) ([]*tracers.TxTraceResult, error) { +func (a *API) TraceBlockByHash(hash common.Hash, config *evmtypes.TraceConfig) ([]*evmtypes.TxTraceResult, error) { a.logger.Debug("debug_traceBlockByHash", "hash", hash) // Get Tendermint Block resBlock, err := a.backend.GetTendermintBlockByHash(hash) @@ -233,13 +234,13 @@ func (a *API) TraceBlockByHash(hash common.Hash, config *evmtypes.TraceConfig) ( // traceBlock configures a new tracer according to the provided configuration, and // executes all the transactions contained within. The return value will be one item // per transaction, dependent on the requested tracer. -func (a *API) traceBlock(height rpctypes.BlockNumber, config *evmtypes.TraceConfig, block *tmrpctypes.ResultBlock) ([]*tracers.TxTraceResult, error) { +func (a *API) traceBlock(height rpctypes.BlockNumber, config *evmtypes.TraceConfig, block *tmrpctypes.ResultBlock) ([]*evmtypes.TxTraceResult, error) { txs := block.Block.Txs txsLength := len(txs) if txsLength == 0 { // If there are no transactions return empty array - return []*tracers.TxTraceResult{}, nil + return []*evmtypes.TxTraceResult{}, nil } txDecoder := a.clientCtx.TxConfig.TxDecoder() @@ -287,7 +288,7 @@ func (a *API) traceBlock(height rpctypes.BlockNumber, config *evmtypes.TraceConf return nil, err } - decodedResults := make([]*tracers.TxTraceResult, txsLength) + decodedResults := make([]*evmtypes.TxTraceResult, txsLength) if err := json.Unmarshal(res.Data, &decodedResults); err != nil { return nil, err } diff --git a/rpc/namespaces/ethereum/eth/api.go b/rpc/namespaces/ethereum/eth/api.go index 49ad7f2c..047e2fb8 100644 --- a/rpc/namespaces/ethereum/eth/api.go +++ b/rpc/namespaces/ethereum/eth/api.go @@ -628,7 +628,7 @@ func (e *PublicAPI) doCall( // return if requested block height is greater than the current one or chain not synced if resBlock == nil || resBlock.Block == nil { - return nil, fmt.Errorf("block not found '%d'", blockNr.Int64()) + return nil, nil } sdkCtx, err := e.backend.GetEVMContext().GetSdkContextWithHeader(&resBlock.Block.Header) diff --git a/types/config.go b/types/config.go index 8116e5fb..63251490 100644 --- a/types/config.go +++ b/types/config.go @@ -91,8 +91,7 @@ func (config *Config) SetBech32PrefixForAccount(addressPrefix, pubKeyPrefix stri } // SetBech32PrefixForValidator builds the Config with Bech32 addressPrefix and publKeyPrefix for validators -// -// and returns the config instance +// and returns the config instance func (config *Config) SetBech32PrefixForValidator(addressPrefix, pubKeyPrefix string) { sdkConfig := sdk.GetConfig() sdkConfig.SetBech32PrefixForValidator(addressPrefix, pubKeyPrefix) diff --git a/x/evm/client/cli/tx.go b/x/evm/client/cli/tx.go index b99366ea..466fd98e 100644 --- a/x/evm/client/cli/tx.go +++ b/x/evm/client/cli/tx.go @@ -11,12 +11,7 @@ import ( "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/input" - "github.com/cosmos/cosmos-sdk/client/tx" - sdk "github.com/cosmos/cosmos-sdk/types" - govcli "github.com/cosmos/cosmos-sdk/x/gov/client/cli" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" - "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" rpctypes "github.com/stratosnet/stratos-chain/rpc/types" @@ -116,97 +111,3 @@ func NewRawTxCmd() *cobra.Command { flags.AddTxFlagsToCmd(cmd) return cmd } - -const ( - FlagProxyAddress = "proxy-address" - FlagImplementationAddress = "implementation-address" - FlagData = "data" - FlagValue = "value" -) - -// NewEVMProxyImplmentationUpgrade implements a command handler for submitting a software upgrade with implementation upgrade for existing gensis proxies -func NewEVMProxyImplmentationUpgrade() *cobra.Command { - cmd := &cobra.Command{ - Use: "evm-proxy-upgrade (--proxy-address [address]) (--implmentation-address [address]) (--data [data]) (--value [value]) [flags]", - Args: cobra.ExactArgs(0), - Short: "Submit an implemntation upgrade for genesis proxy", - Long: "Initial proxy implementation upgrade for defined genesis proxy addresses", - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientTxContext(cmd) - if err != nil { - return err - } - from := clientCtx.GetFromAddress() - - proxyAddrStr, err := cmd.Flags().GetString(FlagProxyAddress) - if err != nil { - return err - } - if !common.IsHexAddress(proxyAddrStr) { - return fmt.Errorf("%s is not a valid Ethereum address", proxyAddrStr) - } - proxyAddr := common.HexToAddress(proxyAddrStr) - - implAddrStr, err := cmd.Flags().GetString(FlagImplementationAddress) - if err != nil { - return err - } - if !common.IsHexAddress(implAddrStr) { - return fmt.Errorf("%s is not a valid Ethereum address", implAddrStr) - } - implAddr := common.HexToAddress(implAddrStr) - - dataStr, err := cmd.Flags().GetString(FlagData) - if err != nil { - return err - } - data, err := hexutil.Decode(dataStr) - if err != nil { - return err - } - - fmt.Println("data", data) - - valueStr, err := cmd.Flags().GetString(FlagValue) - if err != nil { - return err - } - valueCoin, err := sdk.ParseCoinNormalized(valueStr) - if err != nil { - return err - } - value := valueCoin.Amount - - depositStr, err := cmd.Flags().GetString(govcli.FlagDeposit) - if err != nil { - return err - } - deposit, err := sdk.ParseCoinsNormalized(depositStr) - if err != nil { - return err - } - content := types.NewUpdateImplmentationProposal(proxyAddr, implAddr, data, &value) - - msg, err := govtypes.NewMsgSubmitProposal(content, deposit, from) - if err != nil { - return err - } - - if err = msg.ValidateBasic(); err != nil { - return err - } - - return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) - }, - } - - cmd.Flags().String(FlagProxyAddress, "", "proxy address of the contract") - cmd.Flags().String(FlagImplementationAddress, "", "implementation address which should be used for proxy upgrade") - cmd.Flags().String(FlagData, "0x", "addition smart contract data for proxy execution (optional)") - cmd.Flags().String(FlagValue, "0wei", "value of tokens should be used in data execution with payable modifier (optional)") - cmd.Flags().String(govcli.FlagDeposit, "", "deposit of proposal (optional)") - cmd.MarkFlagRequired(FlagProxyAddress) - cmd.MarkFlagRequired(FlagImplementationAddress) - - return cmd -} diff --git a/x/evm/client/proposal_handler.go b/x/evm/client/proposal_handler.go deleted file mode 100644 index d2ec18ee..00000000 --- a/x/evm/client/proposal_handler.go +++ /dev/null @@ -1,25 +0,0 @@ -package client - -import ( - "net/http" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/types/rest" - govclient "github.com/cosmos/cosmos-sdk/x/gov/client" - govrest "github.com/cosmos/cosmos-sdk/x/gov/client/rest" - - "github.com/stratosnet/stratos-chain/x/evm/client/cli" -) - -var ( - EVMChangeProxyImplementationHandler = govclient.NewProposalHandler(cli.NewEVMProxyImplmentationUpgrade, emptyRestHandler) -) - -func emptyRestHandler(client.Context) govrest.ProposalRESTHandler { - return govrest.ProposalRESTHandler{ - SubRoute: "unsupported-evm-client", - Handler: func(w http.ResponseWriter, r *http.Request) { - rest.WriteErrorResponse(w, http.StatusBadRequest, "REST Routes are not supported for EVM proposals") - }, - } -} diff --git a/x/evm/keeper/abci.go b/x/evm/keeper/abci.go index 8d412cbe..14396427 100644 --- a/x/evm/keeper/abci.go +++ b/x/evm/keeper/abci.go @@ -22,8 +22,6 @@ func (k *Keeper) BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock) { k.SetBaseFeeParam(ctx, baseFee) - k.AddGenesisVerifier(ctx) - // Store current base fee in event ctx.EventManager().EmitEvents(sdk.Events{ sdk.NewEvent( @@ -58,14 +56,5 @@ func (k *Keeper) EndBlock(ctx sdk.Context, req abci.RequestEndBlock) []abci.Vali bloom := ethtypes.BytesToBloom(k.GetBlockBloomTransient(infCtx).Bytes()) k.EmitBlockBloomEvent(infCtx, bloom) - pc, err := NewProposalCounsil(k, ctx) - if err != nil { - panic(err) - } - - if err := pc.ApplyGenesisState(uint64(req.Height)); err != nil { - panic(err) - } - return []abci.ValidatorUpdate{} } diff --git a/x/evm/keeper/grpc_query.go b/x/evm/keeper/grpc_query.go index a8fe639d..e18f5bdf 100644 --- a/x/evm/keeper/grpc_query.go +++ b/x/evm/keeper/grpc_query.go @@ -17,15 +17,14 @@ import ( "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/core" ethtypes "github.com/ethereum/go-ethereum/core/types" - + "github.com/ethereum/go-ethereum/core/vm" + "github.com/ethereum/go-ethereum/eth/tracers" + "github.com/ethereum/go-ethereum/eth/tracers/logger" ethparams "github.com/ethereum/go-ethereum/params" - "github.com/stratosnet/stratos-chain/x/evm/tracers" - "github.com/stratosnet/stratos-chain/x/evm/tracers/logger" stratos "github.com/stratosnet/stratos-chain/types" "github.com/stratosnet/stratos-chain/x/evm/statedb" "github.com/stratosnet/stratos-chain/x/evm/types" - "github.com/stratosnet/stratos-chain/x/evm/vm" ) var _ types.QueryServer = Keeper{} @@ -388,8 +387,7 @@ func (k Keeper) TraceTx(c context.Context, req *types.QueryTraceTxRequest) (*typ } txConfig.TxHash = ethTx.Hash() txConfig.TxIndex = uint(i) - tracer := tracers.NewNoOpTracer() - rsp, err := k.ApplyMessageWithConfig(ctx, msg, tracer, true, cfg, txConfig) + rsp, err := k.ApplyMessageWithConfig(ctx, msg, types.NewNoOpTracer(), true, cfg, txConfig) if err != nil { continue } @@ -445,11 +443,11 @@ func (k Keeper) TraceBlock(c context.Context, req *types.QueryTraceBlockRequest) } signer := ethtypes.MakeSigner(cfg.ChainConfig, big.NewInt(ctx.BlockHeight())) txsLength := len(req.Txs) - results := make([]*tracers.TxTraceResult, 0, txsLength) + results := make([]*types.TxTraceResult, 0, txsLength) txConfig := statedb.NewEmptyTxConfig(common.BytesToHash(ctx.HeaderHash().Bytes())) for i, tx := range req.Txs { - result := tracers.TxTraceResult{} + result := types.TxTraceResult{} ethTx := tx.AsTransaction() txConfig.TxHash = ethTx.Hash() txConfig.TxIndex = uint(i) @@ -545,7 +543,7 @@ func (k *Keeper) traceTx( } tracer = logger.NewStructLogger(&logConfig) default: - tracer = tracers.NewTracer(tracers.TracerStruct, msg, cfg.ChainConfig, ctx.BlockHeight()) + tracer = types.NewTracer(types.TracerStruct, msg, cfg.ChainConfig, ctx.BlockHeight()) } res, err := k.ApplyMessageWithConfig(ctx, msg, tracer, commitMessage, cfg, txConfig) @@ -565,11 +563,11 @@ func (k *Keeper) traceTx( } else { returnVal = fmt.Sprintf("%x", res.Return()) } - result = tracers.ExecutionResult{ + result = types.ExecutionResult{ Gas: res.GasUsed, Failed: res.Failed(), ReturnValue: returnVal, - StructLogs: tracers.FormatLogs(tracer.StructLogs()), + StructLogs: types.FormatLogs(tracer.StructLogs()), } case tracers.Tracer: result, err = tracer.GetResult() diff --git a/x/evm/keeper/keeper.go b/x/evm/keeper/keeper.go index c37acdf9..a1afccf3 100644 --- a/x/evm/keeper/keeper.go +++ b/x/evm/keeper/keeper.go @@ -2,7 +2,6 @@ package keeper import ( "math/big" - "sort" "github.com/tendermint/tendermint/libs/log" @@ -15,14 +14,12 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core" ethtypes "github.com/ethereum/go-ethereum/core/types" - + "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/params" stratos "github.com/stratosnet/stratos-chain/types" "github.com/stratosnet/stratos-chain/x/evm/statedb" - "github.com/stratosnet/stratos-chain/x/evm/tracers" "github.com/stratosnet/stratos-chain/x/evm/types" - "github.com/stratosnet/stratos-chain/x/evm/vm" ) // Keeper grants access to the EVM module state and implements the go-ethereum StateDB interface. @@ -47,22 +44,12 @@ type Keeper struct { bankKeeper types.BankKeeper // access historical headers for EVM state transition execution stakingKeeper types.StakingKeeper - // access for registry functionality with related keeper - registerKeeper types.RegisterKeeper - // access for sds functionality with related keeper - sdsKeeper types.SdsKeeper // Tracer used to collect execution traces from the EVM transaction execution tracer string - // genesisContractVerifier verifies is contract is trusted in order to allow curtain opcodes - verifier *vm.GenesisContractVerifier - // EVM Hooks for tx post-processing hooks types.EvmHooks - - // cosmos events to execute when all execution passed - events sdk.Events } // NewKeeper generates new evm module keeper @@ -70,7 +57,6 @@ func NewKeeper( cdc codec.BinaryCodec, storeKey, transientKey sdk.StoreKey, paramSpace paramtypes.Subspace, ak types.AccountKeeper, bankKeeper types.BankKeeper, sk types.StakingKeeper, - sdsKeeper types.SdsKeeper, tracer string, ) *Keeper { // ensure evm module account is set @@ -90,11 +76,9 @@ func NewKeeper( accountKeeper: ak, bankKeeper: bankKeeper, stakingKeeper: sk, - sdsKeeper: sdsKeeper, storeKey: storeKey, transientKey: transientKey, tracer: tracer, - events: make(sdk.Events, 0, 12), } } @@ -103,47 +87,6 @@ func (k Keeper) Logger(ctx sdk.Context) log.Logger { return ctx.Logger().With("module", types.ModuleName) } -func (k *Keeper) SetRegisterKeeper(rk types.RegisterKeeper) { - k.registerKeeper = rk -} - -func (k *Keeper) SetSdsKeeper(sdsk types.SdsKeeper) { - k.sdsKeeper = sdsk -} - -// cosmos events -func (k *Keeper) AddEvents(events sdk.Events) { - k.events = append(k.events, events...) -} - -func (k *Keeper) ApplyEvents(ctx sdk.Context, isVmError bool) { - if len(k.events) > 0 && !isVmError { - ctx.EventManager().EmitEvents(k.events) - } - k.events = k.events[:0] // clear prvious events to avoid conflicts -} - -// AddVerifier adding verifier with initial contracts -func (k *Keeper) AddGenesisVerifier(ctx sdk.Context) { - // could be as cached - if k.verifier != nil { - return - } - - k.verifier = vm.NewGenesisContractVerifier() - - params := k.GetParams(ctx) - keys := make([]string, 0) - for k := range params.ProxyProposalParams.Contracts { - keys = append(keys, k) - } - sort.Strings(keys) - for _, key := range keys { - contract := params.ProxyProposalParams.Contracts[key] - k.verifier.AddContract(contract, true) - } -} - // ---------------------------------------------------------------------------- // Block Bloom // Required by Web3 API. @@ -263,7 +206,7 @@ func (k *Keeper) PostTxProcessing(ctx sdk.Context, msg core.Message, receipt *et // Tracer return a default vm.Tracer based on current keeper state func (k Keeper) Tracer(ctx sdk.Context, msg core.Message, ethCfg *params.ChainConfig) vm.EVMLogger { - return tracers.NewTracer(k.tracer, msg, ethCfg, ctx.BlockHeight()) + return types.NewTracer(k.tracer, msg, ethCfg, ctx.BlockHeight()) } // GetAccountWithoutBalance load nonce and codehash without balance, diff --git a/x/evm/keeper/proposal.go b/x/evm/keeper/proposal.go deleted file mode 100644 index 797bedd3..00000000 --- a/x/evm/keeper/proposal.go +++ /dev/null @@ -1,305 +0,0 @@ -package keeper - -import ( - "bytes" - "fmt" - "math" - "math/big" - - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/params" - - stratos "github.com/stratosnet/stratos-chain/types" - "github.com/stratosnet/stratos-chain/x/evm/statedb" - "github.com/stratosnet/stratos-chain/x/evm/tracers" - "github.com/stratosnet/stratos-chain/x/evm/types" - "github.com/stratosnet/stratos-chain/x/evm/vm" -) - -var ( - emptyCodeHash = crypto.Keccak256Hash(nil) -) - -type ProposalCounsil struct { - keeper *Keeper - ctx sdk.Context - stateDB *statedb.StateDB - evm *vm.EVM - consensusOwner common.Address - proxyOwner common.Address - verifier *vm.GenesisContractVerifier -} - -func NewProposalCounsil(k *Keeper, ctx sdk.Context) (*ProposalCounsil, error) { - params := k.GetParams(ctx) - - pc := &ProposalCounsil{ - keeper: k, - ctx: ctx, - consensusOwner: common.HexToAddress(params.ProxyProposalParams.ConsensusAddress), - proxyOwner: common.HexToAddress(params.ProxyProposalParams.ProxyOwnerAddress), - verifier: k.verifier, - } - cfg, err := k.EVMConfig(ctx) - if err != nil { - return nil, sdkerrors.Wrap(err, "failed to load evm config") - } - - blockCtx := vm.BlockContext{ - CanTransfer: vm.CanTransfer, - Transfer: vm.Transfer, - GetHash: k.GetHashFn(ctx), - Coinbase: cfg.CoinBase, - GasLimit: stratos.BlockGasLimit(ctx), - BlockNumber: big.NewInt(ctx.BlockHeight()), - Time: big.NewInt(ctx.BlockHeader().Time.Unix()), - Difficulty: big.NewInt(0), // unused. Only required in PoW context - BaseFee: cfg.BaseFee, - } - - txCtx := vm.TxContext{ - Origin: pc.consensusOwner, - GasPrice: big.NewInt(0), - } - tracer := tracers.NewNoOpTracer() - vmConfig := k.VMConfig(ctx, cfg, tracer) - - txConfig := statedb.NewEmptyTxConfig(common.BytesToHash(ctx.HeaderHash())) - pc.stateDB = statedb.New(ctx, pc.keeper, txConfig) - pc.evm = vm.NewEVM(blockCtx, txCtx, pc.stateDB, cfg.ChainConfig, vmConfig, pc.verifier) - - return pc, nil -} - -func (pc *ProposalCounsil) finalize() error { - if err := pc.stateDB.Commit(); err != nil { - return err - } - return nil -} - -func (pc *ProposalCounsil) call(sender, contractAddress common.Address, data []byte, value *big.Int) error { - // required - txCtx := vm.TxContext{ - Origin: sender, - GasPrice: big.NewInt(0), - } - pc.evm.Reset(txCtx, pc.stateDB) - - nonce := pc.stateDB.GetNonce(sender) - // we do not care about gas during consil execution - gas := uint64(math.MaxUint64) - // for safety - if value == nil { - value = big.NewInt(0) - } - - { - pc.stateDB.SetNonce(sender, nonce+1) - } - - if _, _, vmErr := pc.evm.Call(vm.AccountRef(sender), contractAddress, data, gas, value); vmErr != nil { - return vmErr - } - return nil -} - -func (pc *ProposalCounsil) create(sender, contractAddress common.Address, data []byte, value *big.Int) (*common.Address, error) { - // required - txCtx := vm.TxContext{ - Origin: sender, - GasPrice: big.NewInt(0), - } - pc.evm.Reset(txCtx, pc.stateDB) - - nonce := pc.stateDB.GetNonce(sender) - // we do not care about gas during consil execution - gas := uint64(math.MaxUint64) - - // for safety - if value == nil { - value = big.NewInt(0) - } - - interpreter := vm.NewEVMInterpreter(pc.evm, pc.evm.Config) - - accRef := vm.AccountRef(sender) - - { - pc.stateDB.SetNonce(accRef.Address(), nonce+1) - } - - contractHash := pc.evm.StateDB.GetCodeHash(contractAddress) - if pc.evm.StateDB.GetNonce(contractAddress) != 0 || (contractHash != (common.Hash{}) && contractHash != emptyCodeHash) { - return nil, vm.ErrContractAddressCollision - } - - snapshot := pc.evm.StateDB.Snapshot() - - pc.evm.StateDB.CreateAccount(contractAddress) - pc.evm.StateDB.SetNonce(contractAddress, 1) - pc.evm.Context.Transfer(pc.evm.StateDB, sender, contractAddress, value) - - contract := vm.NewContract(accRef, vm.AccountRef(contractAddress), value, gas) - contract.SetCallCode(&contractAddress, common.Hash{}, data) - - ret, err := interpreter.Run(contract, nil, false) - if err != nil { - return nil, err - } - - // Check whether the max code size has been exceeded, assign err if the case. - if err == nil && len(ret) > params.MaxCodeSize { - err = vm.ErrMaxCodeSizeExceeded - } - - // Reject code starting with 0xEF if EIP-3541 is enabled. - if err == nil && len(ret) >= 1 && ret[0] == 0xEF { - err = vm.ErrInvalidCode - } - - // if the contract creation ran successfully and no errors were returned - // calculate the gas required to store the code. If the code could not - // be stored due to not enough gas set an error and let it be handled - // by the error checking condition below. - if err == nil { - createDataGas := uint64(len(ret)) * params.CreateDataGas - if contract.UseGas(createDataGas) { - pc.evm.StateDB.SetCode(contractAddress, ret) - } else { - err = vm.ErrCodeStoreOutOfGas - } - } - - // When an error was returned by the EVM or when setting the creation code - // above we revert to the snapshot and consume any gas remaining. Additionally - // when we're in homestead this also counts for code storage gas errors. - if err != nil { - pc.evm.StateDB.RevertToSnapshot(snapshot) - if err != vm.ErrExecutionReverted { - contract.UseGas(contract.Gas) - } - } - - return &contractAddress, nil -} - -func (pc *ProposalCounsil) ApplyGenesisState(height uint64) error { - contracts := pc.verifier.GetContracts(height) - - if len(contracts) == 0 { - return nil - } - - for _, contract := range contracts { - implAddr := crypto.CreateAddress(pc.consensusOwner, pc.stateDB.GetNonce(pc.consensusOwner)) - proxyAddr := common.HexToAddress(contract.GetAddress()) - - bin, err := hexutil.Decode(contract.GetBin()) - if err != nil { - return err - } - - data, err := hexutil.Decode(contract.GetInit()) - if err != nil { - return err - } - - implCode := pc.stateDB.GetCode(implAddr) - if implCode == nil { - if _, err := pc.create(pc.proxyOwner, implAddr, bin, nil); err != nil { - return sdkerrors.Wrapf(err, "failed to get or create address on '%s'", implAddr) - } - } - - value := sdk.NewInt(0) - c := types.NewUpdateImplmentationProposal( - proxyAddr, - implAddr, - data, - &value, - ) - - if err := c.ValidateBasic(); err != nil { - return err - } - - if err = pc.updateProxyImplementation(c.(*types.UpdateImplmentationProposal), false); err != nil { - return err - } - } - if err := pc.finalize(); err != nil { - return err - } - return nil -} - -func (pc *ProposalCounsil) UpdateProxyImplementation(p *types.UpdateImplmentationProposal) error { - return pc.updateProxyImplementation(p, true) -} - -// updateProxyImplementation execute provided function to a proxy contract for impl upgrade -func (pc *ProposalCounsil) updateProxyImplementation(p *types.UpdateImplmentationProposal, commit bool) error { - if !pc.verifier.IsTrustedAddress(p.ProxyAddress) { - return fmt.Errorf("proxy '%s' has not been verified", p.ProxyAddress) - } - - proxyAddress := common.HexToAddress(p.ProxyAddress) - implAddress := common.HexToAddress(p.ImplementationAddress) - - implCode := pc.stateDB.GetCode(implAddress) - if implCode == nil { - return fmt.Errorf("implementation '%s' not found", implAddress) - } - - if bytes.Equal(implCode, emptyCodeHash[:]) { - return fmt.Errorf("implementation '%s' is EOA", implAddress) - } - - proxyCode := pc.stateDB.GetCode(proxyAddress) - if proxyCode != nil { - upgradeData, err := types.EncodeContractFunc( - types.TransparentUpgradableProxyABI, - "upgradeToAndCall", - implAddress, - p.Data, - ) - if err != nil { - return err - } - - if err := pc.call(pc.consensusOwner, proxyAddress, upgradeData, p.Amount.BigInt()); err != nil { - return err - } - } else { - proxyConstructorData, err := types.EncodeContractFunc( - types.TransparentUpgradableProxyABI, - "", - implAddress, - pc.consensusOwner, - p.Data, - ) - if err != nil { - return err - } - - proxyConstructorData = append(common.FromHex(types.TransparentUpgradableProxyBin), proxyConstructorData...) - - if _, err := pc.create(pc.proxyOwner, proxyAddress, proxyConstructorData, p.Amount.BigInt()); err != nil { - return err - } - } - - if commit { - if err := pc.finalize(); err != nil { - return err - } - } - - return nil -} diff --git a/x/evm/keeper/state_transition.go b/x/evm/keeper/state_transition.go index bd434ca7..b9dd1588 100644 --- a/x/evm/keeper/state_transition.go +++ b/x/evm/keeper/state_transition.go @@ -15,16 +15,13 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core" ethtypes "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/params" stratos "github.com/stratosnet/stratos-chain/types" "github.com/stratosnet/stratos-chain/x/evm/statedb" - "github.com/stratosnet/stratos-chain/x/evm/tracers" "github.com/stratosnet/stratos-chain/x/evm/types" - "github.com/stratosnet/stratos-chain/x/evm/vm" - registertypes "github.com/stratosnet/stratos-chain/x/register/types" - sdstypes "github.com/stratosnet/stratos-chain/x/sds/types" ) // GasToRefund calculates the amount of gas the state machine should refund to the sender. It is @@ -44,6 +41,7 @@ func (k *Keeper) EVMConfig(ctx sdk.Context) (*types.EVMConfig, error) { params := k.GetParams(ctx) ethCfg := params.ChainConfig.EthereumConfig() + // get the coinbase address from the block proposer coinbase, err := k.GetCoinbaseAddress(ctx) if err != nil { return nil, sdkerrors.Wrap(err, "failed to obtain coinbase address") @@ -80,10 +78,9 @@ func (k *Keeper) NewEVM( stateDB vm.StateDB, ) *vm.EVM { blockCtx := vm.BlockContext{ - CanTransfer: vm.CanTransfer, - Transfer: vm.Transfer, + CanTransfer: core.CanTransfer, + Transfer: core.Transfer, GetHash: k.GetHashFn(ctx), - Prepay: k.PrepayFn(ctx), Coinbase: cfg.CoinBase, GasLimit: stratos.BlockGasLimit(ctx), BlockNumber: big.NewInt(ctx.BlockHeight()), @@ -92,25 +89,24 @@ func (k *Keeper) NewEVM( BaseFee: cfg.BaseFee, } - txCtx := vm.NewEVMTxContext(msg) + txCtx := core.NewEVMTxContext(msg) if tracer == nil { tracer = k.Tracer(ctx, msg, cfg.ChainConfig) } - vmConfig := k.VMConfig(ctx, cfg, tracer) - return vm.NewEVM(blockCtx, txCtx, stateDB, cfg.ChainConfig, vmConfig, k.verifier) + vmConfig := k.VMConfig(ctx, msg, cfg, tracer) + return vm.NewEVM(blockCtx, txCtx, stateDB, cfg.ChainConfig, vmConfig) } // VMConfig creates an EVM configuration from the debug setting and the extra EIPs enabled on the // module parameters. The config generated uses the default JumpTable from the EVM. -func (k Keeper) VMConfig(ctx sdk.Context, cfg *types.EVMConfig, tracer vm.EVMLogger) vm.Config { +func (k Keeper) VMConfig(ctx sdk.Context, msg core.Message, cfg *types.EVMConfig, tracer vm.EVMLogger) vm.Config { noBaseFee := true if types.IsLondon(cfg.ChainConfig, ctx.BlockHeight()) { noBaseFee = k.GetParams(ctx).FeeMarketParams.NoBaseFee } var debug bool - - if _, ok := tracer.(tracers.NoOpTracer); !ok { + if _, ok := tracer.(types.NoOpTracer); !ok { debug = true noBaseFee = true } @@ -123,59 +119,6 @@ func (k Keeper) VMConfig(ctx sdk.Context, cfg *types.EVMConfig, tracer vm.EVMLog } } -func (k *Keeper) PrepayFn(ctx sdk.Context) vm.PrepayFunc { - return func(evm *vm.EVM, from, beneficiary common.Address, amount *big.Int, gas uint64) (*big.Int, uint64, error) { - if amount.Sign() == 0 { - return nil, gas, vm.ErrExecutionReverted - } - if gas < vm.ReturnGasPrepay { - return nil, gas, vm.ErrGasUintOverflow - } - // NOTE: Required to return correct left gas amount to solidity - returnGas := gas - vm.ReturnGasPrepay - - kdb := evm.StateDB.GetKeestateDB() - kSnapshot := evm.StateDB.KeeSnapshot() - - accFrom := sdk.AccAddress(from.Bytes()) - accBeneficiary := sdk.AccAddress(beneficiary.Bytes()) - - purchased, remaining, err := k.KeeCalculatePrepayPurchaseAmount(evm.StateDB, sdk.NewIntFromBigInt(amount)) - if err != nil { - evm.StateDB.RevertToKeeSnapshot(kSnapshot) - - return nil, returnGas, vm.ErrExecutionReverted - } - - to := common.BytesToAddress(authtypes.NewModuleAddress(registertypes.TotalUnissuedPrepay)) - - if !evm.StateDB.Exist(to) { - evm.StateDB.CreateAccount(to) - } - - evm.Context.Transfer(evm.StateDB, from, to, purchased.BigInt()) - - k.registerKeeper.KeeSetRemainingOzoneLimit(kdb, remaining) - - k.AddEvents(sdk.Events{ - sdk.NewEvent( - sdstypes.EventTypePrepay, - sdk.NewAttribute(sdk.AttributeKeySender, accFrom.String()), - sdk.NewAttribute(sdstypes.AttributeKeyBeneficiary, accBeneficiary.String()), - sdk.NewAttribute(sdstypes.AttributeKeyAmount, sdk.NewIntFromBigInt(amount).String()), - sdk.NewAttribute(sdstypes.AttributeKeyPurchasedNoz, purchased.String()), - ), - sdk.NewEvent( - sdk.EventTypeMessage, - sdk.NewAttribute(sdk.AttributeKeyModule, sdstypes.AttributeValueCategory), - sdk.NewAttribute(sdk.AttributeKeySender, accFrom.String()), - ), - }) - - return purchased.BigInt(), returnGas, nil - } -} - // GetHashFn implements vm.GetHashFunc for stratos. It handles 3 cases: // 1. The requested height matches the current height from context (and thus same epoch number) // 2. The requested height is from an previous height from the same chain epoch @@ -483,8 +426,6 @@ func (k *Keeper) ApplyMessageWithConfig(ctx sdk.Context, msg core.Message, trace } } - k.ApplyEvents(ctx, vmErr != nil) - return &types.MsgEthereumTxResponse{ GasUsed: gasUsed, VmError: vmError, diff --git a/x/evm/keeper/store.go b/x/evm/keeper/store.go deleted file mode 100644 index fcf4fec3..00000000 --- a/x/evm/keeper/store.go +++ /dev/null @@ -1,42 +0,0 @@ -package keeper - -import ( - "fmt" - - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/ethereum/go-ethereum/common" - "github.com/stratosnet/stratos-chain/x/evm/vm" - regtypes "github.com/stratosnet/stratos-chain/x/register/types" -) - -func (k Keeper) KeeGetTotalUnissuedPrepay(statedb vm.StateDB) (value sdk.Int) { - totalUnissuedPrepayAccAddr := k.accountKeeper.GetModuleAddress(regtypes.TotalUnissuedPrepay) - if totalUnissuedPrepayAccAddr == nil { - value = sdk.ZeroInt() - } else { - value = sdk.NewIntFromBigInt(statedb.GetBalance(common.BytesToAddress(totalUnissuedPrepayAccAddr))) - } - - return -} - -func (k *Keeper) KeeCalculatePrepayPurchaseAmount(statedb vm.StateDB, amount sdk.Int) (sdk.Int, sdk.Int, error) { - kdb := statedb.GetKeestateDB() - St := k.registerKeeper.KeeGetEffectiveTotalStake(kdb) - Pt := k.KeeGetTotalUnissuedPrepay(statedb) - Lt := k.registerKeeper.KeeGetRemainingOzoneLimit(kdb) - - purchase := Lt.ToDec(). - Mul(amount.ToDec()). - Quo((St. - Add(Pt). - Add(amount)).ToDec()). - TruncateInt() - if purchase.GT(Lt) { - return sdk.NewInt(0), sdk.NewInt(0), fmt.Errorf("not enough remaining ozone limit to complete prepay") - } - - remaining := Lt.Sub(purchase) - - return purchase, remaining, nil -} diff --git a/x/evm/proposal_handler.go b/x/evm/proposal_handler.go deleted file mode 100644 index 8ac002d3..00000000 --- a/x/evm/proposal_handler.go +++ /dev/null @@ -1,28 +0,0 @@ -package evm - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" - - "github.com/stratosnet/stratos-chain/x/evm/keeper" - "github.com/stratosnet/stratos-chain/x/evm/types" -) - -// NewEVMChangeProposalHandler defines the evm changes proposals -func NewEVMChangeProposalHandler(k *keeper.Keeper) govtypes.Handler { - return func(ctx sdk.Context, content govtypes.Content) error { - pc, err := keeper.NewProposalCounsil(k, ctx) - if err != nil { - return err - } - - switch c := content.(type) { - case *types.UpdateImplmentationProposal: - return pc.UpdateProxyImplementation(c) - - default: - return sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "unrecognized proxy proposal content type: %T", c) - } - } -} diff --git a/x/evm/simulation/genesis.go b/x/evm/simulation/genesis.go index f6d60a98..7cd73a3c 100644 --- a/x/evm/simulation/genesis.go +++ b/x/evm/simulation/genesis.go @@ -41,7 +41,7 @@ func GenEnableCall(r *rand.Rand) bool { // RandomizedGenState generates a random GenesisState for the EVM module func RandomizedGenState(simState *module.SimulationState) { feeMarketParams := types.NewFeeMarketParams(simState.Rand.Uint32()%2 == 0, simState.Rand.Uint32(), simState.Rand.Uint32(), simState.Rand.Uint64(), simState.Rand.Int63()) - proxyParams := types.DefaultProxyProposalParams() + // evm params var extraEIPs []int64 @@ -50,7 +50,7 @@ func RandomizedGenState(simState *module.SimulationState) { func(r *rand.Rand) { extraEIPs = GenExtraEIPs(r) }, ) - params := types.NewParams(types.DefaultEVMDenom, true, true, types.DefaultChainConfig(), feeMarketParams, proxyParams, extraEIPs...) + params := types.NewParams(types.DefaultEVMDenom, true, true, types.DefaultChainConfig(), feeMarketParams, extraEIPs...) evmGenesis := types.NewGenesisState(params, []types.GenesisAccount{}) bz, err := json.MarshalIndent(evmGenesis, "", " ") diff --git a/x/evm/statedb/statedb.go b/x/evm/statedb/statedb.go index c13e1e5a..e075308d 100644 --- a/x/evm/statedb/statedb.go +++ b/x/evm/statedb/statedb.go @@ -9,9 +9,8 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/ethereum/go-ethereum/common" ethtypes "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/crypto" - keestatedb "github.com/stratosnet/stratos-chain/core/statedb" - "github.com/stratosnet/stratos-chain/x/evm/vm" ) // revision is the identifier of a version of state. @@ -51,9 +50,6 @@ type StateDB struct { // Per-transaction access list accessList *accessList - - // core keestatedb for basic keeper commit state changes - keestatedb *keestatedb.KeestateDB } // New creates a new state from a given trie. @@ -66,7 +62,6 @@ func New(ctx sdk.Context, keeper Keeper, txConfig TxConfig) *StateDB { accessList: newAccessList(), logs: make([]*ethtypes.Log, 0), txConfig: txConfig, - keestatedb: keestatedb.New(ctx), } } @@ -255,8 +250,8 @@ func (s *StateDB) createObject(addr common.Address) (newobj, prev *stateObject) // CreateAccount is called during the EVM CREATE operation. The situation might arise that // a contract does the following: // -// 1. sends funds to sha(account ++ (nonce + 1)) -// 2. tx_create(sha(account ++ nonce)) (note that this gets the address of 1) +// 1. sends funds to sha(account ++ (nonce + 1)) +// 2. tx_create(sha(account ++ nonce)) (note that this gets the address of 1) // // Carrying over the balance ensures that Ether doesn't disappear. func (s *StateDB) CreateAccount(addr common.Address) { @@ -464,30 +459,5 @@ func (s *StateDB) Commit() error { } } } - if err := s.keestatedb.Commit(); err != nil { - return err - } return nil } - -// proxy methods to keestatedb - -func (s *StateDB) GetKeestateDB() *keestatedb.KeestateDB { - return s.keestatedb -} - -func (s *StateDB) GetKeeState(storeKey sdk.StoreKey, key []byte) []byte { - return s.keestatedb.GetState(storeKey, key) -} - -func (s *StateDB) SetKeeState(storeKey sdk.StoreKey, key, value []byte) { - s.keestatedb.SetState(storeKey, key, value) -} - -func (s *StateDB) RevertToKeeSnapshot(revid int) { - s.keestatedb.RevertToSnapshot(revid) -} - -func (s *StateDB) KeeSnapshot() int { - return s.keestatedb.Snapshot() -} diff --git a/x/evm/tracers/js/goja.go b/x/evm/tracers/js/goja.go index 2129e89c..adbcfcaf 100644 --- a/x/evm/tracers/js/goja.go +++ b/x/evm/tracers/js/goja.go @@ -27,11 +27,9 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" - ethvm "github.com/ethereum/go-ethereum/core/vm" + "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/crypto" - "github.com/stratosnet/stratos-chain/x/evm/tracers" - "github.com/stratosnet/stratos-chain/x/evm/vm" - + "github.com/ethereum/go-ethereum/eth/tracers" jsassets "github.com/stratosnet/stratos-chain/x/evm/tracers/js/internal/tracers" ) @@ -643,7 +641,7 @@ func (s *stackObj) setupObject() *goja.Object { } type dbObj struct { - db ethvm.StateDB + db vm.StateDB vm *goja.Runtime toBig toBigFn toBuf toBufFn diff --git a/x/evm/tracers/logger/access_list_tracer.go b/x/evm/tracers/logger/access_list_tracer.go deleted file mode 100644 index 88cad6c1..00000000 --- a/x/evm/tracers/logger/access_list_tracer.go +++ /dev/null @@ -1,184 +0,0 @@ -// Copyright 2021 The go-ethereum Authors -// This file is part of the go-ethereum library. -// -// The go-ethereum library is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// The go-ethereum library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . - -package logger - -import ( - "math/big" - "time" - - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" - "github.com/stratosnet/stratos-chain/x/evm/vm" -) - -// accessList is an accumulator for the set of accounts and storage slots an EVM -// contract execution touches. -type accessList map[common.Address]accessListSlots - -// accessListSlots is an accumulator for the set of storage slots within a single -// contract that an EVM contract execution touches. -type accessListSlots map[common.Hash]struct{} - -// newAccessList creates a new accessList. -func newAccessList() accessList { - return make(map[common.Address]accessListSlots) -} - -// addAddress adds an address to the accesslist. -func (al accessList) addAddress(address common.Address) { - // Set address if not previously present - if _, present := al[address]; !present { - al[address] = make(map[common.Hash]struct{}) - } -} - -// addSlot adds a storage slot to the accesslist. -func (al accessList) addSlot(address common.Address, slot common.Hash) { - // Set address if not previously present - al.addAddress(address) - - // Set the slot on the surely existent storage set - al[address][slot] = struct{}{} -} - -// equal checks if the content of the current access list is the same as the -// content of the other one. -func (al accessList) equal(other accessList) bool { - // Cross reference the accounts first - if len(al) != len(other) { - return false - } - // Given that len(al) == len(other), we only need to check that - // all the items from al are in other. - for addr := range al { - if _, ok := other[addr]; !ok { - return false - } - } - - // Accounts match, cross reference the storage slots too - for addr, slots := range al { - otherslots := other[addr] - - if len(slots) != len(otherslots) { - return false - } - // Given that len(slots) == len(otherslots), we only need to check that - // all the items from slots are in otherslots. - for hash := range slots { - if _, ok := otherslots[hash]; !ok { - return false - } - } - } - return true -} - -// accesslist converts the accesslist to a types.AccessList. -func (al accessList) accessList() types.AccessList { - acl := make(types.AccessList, 0, len(al)) - for addr, slots := range al { - tuple := types.AccessTuple{Address: addr, StorageKeys: []common.Hash{}} - for slot := range slots { - tuple.StorageKeys = append(tuple.StorageKeys, slot) - } - acl = append(acl, tuple) - } - return acl -} - -// AccessListTracer is a tracer that accumulates touched accounts and storage -// slots into an internal set. -type AccessListTracer struct { - excl map[common.Address]struct{} // Set of account to exclude from the list - list accessList // Set of accounts and storage slots touched -} - -// NewAccessListTracer creates a new tracer that can generate AccessLists. -// An optional AccessList can be specified to occupy slots and addresses in -// the resulting accesslist. -func NewAccessListTracer(acl types.AccessList, from, to common.Address, precompiles []common.Address) *AccessListTracer { - excl := map[common.Address]struct{}{ - from: {}, to: {}, - } - for _, addr := range precompiles { - excl[addr] = struct{}{} - } - list := newAccessList() - for _, al := range acl { - if _, ok := excl[al.Address]; !ok { - list.addAddress(al.Address) - } - for _, slot := range al.StorageKeys { - list.addSlot(al.Address, slot) - } - } - return &AccessListTracer{ - excl: excl, - list: list, - } -} - -func (a *AccessListTracer) CaptureStart(env *vm.EVM, from common.Address, to common.Address, create bool, input []byte, gas uint64, value *big.Int) { -} - -// CaptureState captures all opcodes that touch storage or addresses and adds them to the accesslist. -func (a *AccessListTracer) CaptureState(pc uint64, op vm.OpCode, gas, cost uint64, scope *vm.ScopeContext, rData []byte, depth int, err error) { - stack := scope.Stack - stackData := stack.Data() - stackLen := len(stackData) - if (op == vm.SLOAD || op == vm.SSTORE) && stackLen >= 1 { - slot := common.Hash(stackData[stackLen-1].Bytes32()) - a.list.addSlot(scope.Contract.Address(), slot) - } - if (op == vm.EXTCODECOPY || op == vm.EXTCODEHASH || op == vm.EXTCODESIZE || op == vm.BALANCE || op == vm.SELFDESTRUCT) && stackLen >= 1 { - addr := common.Address(stackData[stackLen-1].Bytes20()) - if _, ok := a.excl[addr]; !ok { - a.list.addAddress(addr) - } - } - if (op == vm.DELEGATECALL || op == vm.CALL || op == vm.STATICCALL || op == vm.CALLCODE) && stackLen >= 5 { - addr := common.Address(stackData[stackLen-2].Bytes20()) - if _, ok := a.excl[addr]; !ok { - a.list.addAddress(addr) - } - } -} - -func (*AccessListTracer) CaptureFault(pc uint64, op vm.OpCode, gas, cost uint64, scope *vm.ScopeContext, depth int, err error) { -} - -func (*AccessListTracer) CaptureEnd(output []byte, gasUsed uint64, t time.Duration, err error) {} - -func (*AccessListTracer) CaptureEnter(typ vm.OpCode, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) { -} - -func (*AccessListTracer) CaptureExit(output []byte, gasUsed uint64, err error) {} - -func (*AccessListTracer) CaptureTxStart(gasLimit uint64) {} - -func (*AccessListTracer) CaptureTxEnd(restGas uint64) {} - -// AccessList returns the current accesslist maintained by the tracer. -func (a *AccessListTracer) AccessList() types.AccessList { - return a.list.accessList() -} - -// Equal returns if the content of two access list traces are equal. -func (a *AccessListTracer) Equal(other *AccessListTracer) bool { - return a.list.equal(other.list) -} diff --git a/x/evm/tracers/logger/gen_structlog.go b/x/evm/tracers/logger/gen_structlog.go deleted file mode 100644 index f6968a0f..00000000 --- a/x/evm/tracers/logger/gen_structlog.go +++ /dev/null @@ -1,110 +0,0 @@ -// Code generated by github.com/fjl/gencodec. DO NOT EDIT. - -package logger - -import ( - "encoding/json" - - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/ethereum/go-ethereum/common/math" - "github.com/stratosnet/stratos-chain/x/evm/vm" - "github.com/holiman/uint256" -) - -var _ = (*structLogMarshaling)(nil) - -// MarshalJSON marshals as JSON. -func (s StructLog) MarshalJSON() ([]byte, error) { - type StructLog struct { - Pc uint64 `json:"pc"` - Op vm.OpCode `json:"op"` - Gas math.HexOrDecimal64 `json:"gas"` - GasCost math.HexOrDecimal64 `json:"gasCost"` - Memory hexutil.Bytes `json:"memory,omitempty"` - MemorySize int `json:"memSize"` - Stack []uint256.Int `json:"stack"` - ReturnData hexutil.Bytes `json:"returnData,omitempty"` - Storage map[common.Hash]common.Hash `json:"-"` - Depth int `json:"depth"` - RefundCounter uint64 `json:"refund"` - Err error `json:"-"` - OpName string `json:"opName"` - ErrorString string `json:"error,omitempty"` - } - var enc StructLog - enc.Pc = s.Pc - enc.Op = s.Op - enc.Gas = math.HexOrDecimal64(s.Gas) - enc.GasCost = math.HexOrDecimal64(s.GasCost) - enc.Memory = s.Memory - enc.MemorySize = s.MemorySize - enc.Stack = s.Stack - enc.ReturnData = s.ReturnData - enc.Storage = s.Storage - enc.Depth = s.Depth - enc.RefundCounter = s.RefundCounter - enc.Err = s.Err - enc.OpName = s.OpName() - enc.ErrorString = s.ErrorString() - return json.Marshal(&enc) -} - -// UnmarshalJSON unmarshals from JSON. -func (s *StructLog) UnmarshalJSON(input []byte) error { - type StructLog struct { - Pc *uint64 `json:"pc"` - Op *vm.OpCode `json:"op"` - Gas *math.HexOrDecimal64 `json:"gas"` - GasCost *math.HexOrDecimal64 `json:"gasCost"` - Memory *hexutil.Bytes `json:"memory,omitempty"` - MemorySize *int `json:"memSize"` - Stack []uint256.Int `json:"stack"` - ReturnData *hexutil.Bytes `json:"returnData,omitempty"` - Storage map[common.Hash]common.Hash `json:"-"` - Depth *int `json:"depth"` - RefundCounter *uint64 `json:"refund"` - Err error `json:"-"` - } - var dec StructLog - if err := json.Unmarshal(input, &dec); err != nil { - return err - } - if dec.Pc != nil { - s.Pc = *dec.Pc - } - if dec.Op != nil { - s.Op = *dec.Op - } - if dec.Gas != nil { - s.Gas = uint64(*dec.Gas) - } - if dec.GasCost != nil { - s.GasCost = uint64(*dec.GasCost) - } - if dec.Memory != nil { - s.Memory = *dec.Memory - } - if dec.MemorySize != nil { - s.MemorySize = *dec.MemorySize - } - if dec.Stack != nil { - s.Stack = dec.Stack - } - if dec.ReturnData != nil { - s.ReturnData = *dec.ReturnData - } - if dec.Storage != nil { - s.Storage = dec.Storage - } - if dec.Depth != nil { - s.Depth = *dec.Depth - } - if dec.RefundCounter != nil { - s.RefundCounter = *dec.RefundCounter - } - if dec.Err != nil { - s.Err = dec.Err - } - return nil -} diff --git a/x/evm/tracers/logger/logger.go b/x/evm/tracers/logger/logger.go deleted file mode 100644 index bfedb004..00000000 --- a/x/evm/tracers/logger/logger.go +++ /dev/null @@ -1,464 +0,0 @@ -// Copyright 2021 The go-ethereum Authors -// This file is part of the go-ethereum library. -// -// The go-ethereum library is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// The go-ethereum library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . - -package logger - -import ( - "encoding/hex" - "encoding/json" - "fmt" - "io" - "math/big" - "strings" - "sync/atomic" - "time" - - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/ethereum/go-ethereum/common/math" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/params" - "github.com/holiman/uint256" - "github.com/stratosnet/stratos-chain/x/evm/vm" -) - -// Storage represents a contract's storage. -type Storage map[common.Hash]common.Hash - -// Copy duplicates the current storage. -func (s Storage) Copy() Storage { - cpy := make(Storage, len(s)) - for key, value := range s { - cpy[key] = value - } - return cpy -} - -// Config are the configuration options for structured logger the EVM -type Config struct { - EnableMemory bool // enable memory capture - DisableStack bool // disable stack capture - DisableStorage bool // disable storage capture - EnableReturnData bool // enable return data capture - Debug bool // print output during capture end - Limit int // maximum length of output, but zero means unlimited - // Chain overrides, can be used to execute a trace using future fork rules - Overrides *params.ChainConfig `json:"overrides,omitempty"` -} - -//go:generate go run github.com/fjl/gencodec -type StructLog -field-override structLogMarshaling -out gen_structlog.go - -// StructLog is emitted to the EVM each cycle and lists information about the current internal state -// prior to the execution of the statement. -type StructLog struct { - Pc uint64 `json:"pc"` - Op vm.OpCode `json:"op"` - Gas uint64 `json:"gas"` - GasCost uint64 `json:"gasCost"` - Memory []byte `json:"memory,omitempty"` - MemorySize int `json:"memSize"` - Stack []uint256.Int `json:"stack"` - ReturnData []byte `json:"returnData,omitempty"` - Storage map[common.Hash]common.Hash `json:"-"` - Depth int `json:"depth"` - RefundCounter uint64 `json:"refund"` - Err error `json:"-"` -} - -// overrides for gencodec -type structLogMarshaling struct { - Gas math.HexOrDecimal64 - GasCost math.HexOrDecimal64 - Memory hexutil.Bytes - ReturnData hexutil.Bytes - OpName string `json:"opName"` // adds call to OpName() in MarshalJSON - ErrorString string `json:"error,omitempty"` // adds call to ErrorString() in MarshalJSON -} - -// OpName formats the operand name in a human-readable format. -func (s *StructLog) OpName() string { - return s.Op.String() -} - -// ErrorString formats the log's error as a string. -func (s *StructLog) ErrorString() string { - if s.Err != nil { - return s.Err.Error() - } - return "" -} - -// StructLogger is an EVM state logger and implements EVMLogger. -// -// StructLogger can capture state based on the given Log configuration and also keeps -// a track record of modified storage which is used in reporting snapshots of the -// contract their storage. -type StructLogger struct { - cfg Config - env *vm.EVM - - storage map[common.Address]Storage - logs []StructLog - output []byte - err error - gasLimit uint64 - usedGas uint64 - - interrupt uint32 // Atomic flag to signal execution interruption - reason error // Textual reason for the interruption -} - -// NewStructLogger returns a new logger -func NewStructLogger(cfg *Config) *StructLogger { - logger := &StructLogger{ - storage: make(map[common.Address]Storage), - } - if cfg != nil { - logger.cfg = *cfg - } - return logger -} - -// Reset clears the data held by the logger. -func (l *StructLogger) Reset() { - l.storage = make(map[common.Address]Storage) - l.output = make([]byte, 0) - l.logs = l.logs[:0] - l.err = nil -} - -// CaptureStart implements the EVMLogger interface to initialize the tracing operation. -func (l *StructLogger) CaptureStart(env *vm.EVM, from common.Address, to common.Address, create bool, input []byte, gas uint64, value *big.Int) { - l.env = env -} - -// CaptureState logs a new structured log message and pushes it out to the environment -// -// CaptureState also tracks SLOAD/SSTORE ops to track storage change. -func (l *StructLogger) CaptureState(pc uint64, op vm.OpCode, gas, cost uint64, scope *vm.ScopeContext, rData []byte, depth int, err error) { - // If tracing was interrupted, set the error and stop - if atomic.LoadUint32(&l.interrupt) > 0 { - l.env.Cancel() - return - } - // check if already accumulated the specified number of logs - if l.cfg.Limit != 0 && l.cfg.Limit <= len(l.logs) { - return - } - - memory := scope.Memory - stack := scope.Stack - contract := scope.Contract - // Copy a snapshot of the current memory state to a new buffer - var mem []byte - if l.cfg.EnableMemory { - mem = make([]byte, len(memory.Data())) - copy(mem, memory.Data()) - } - // Copy a snapshot of the current stack state to a new buffer - var stck []uint256.Int - if !l.cfg.DisableStack { - stck = make([]uint256.Int, len(stack.Data())) - for i, item := range stack.Data() { - stck[i] = item - } - } - stackData := stack.Data() - stackLen := len(stackData) - // Copy a snapshot of the current storage to a new container - var storage Storage - if !l.cfg.DisableStorage && (op == vm.SLOAD || op == vm.SSTORE) { - // initialise new changed values storage container for this contract - // if not present. - if l.storage[contract.Address()] == nil { - l.storage[contract.Address()] = make(Storage) - } - // capture SLOAD opcodes and record the read entry in the local storage - if op == vm.SLOAD && stackLen >= 1 { - var ( - address = common.Hash(stackData[stackLen-1].Bytes32()) - value = l.env.StateDB.GetState(contract.Address(), address) - ) - l.storage[contract.Address()][address] = value - storage = l.storage[contract.Address()].Copy() - } else if op == vm.SSTORE && stackLen >= 2 { - // capture SSTORE opcodes and record the written entry in the local storage. - var ( - value = common.Hash(stackData[stackLen-2].Bytes32()) - address = common.Hash(stackData[stackLen-1].Bytes32()) - ) - l.storage[contract.Address()][address] = value - storage = l.storage[contract.Address()].Copy() - } - } - var rdata []byte - if l.cfg.EnableReturnData { - rdata = make([]byte, len(rData)) - copy(rdata, rData) - } - // create a new snapshot of the EVM. - log := StructLog{pc, op, gas, cost, mem, memory.Len(), stck, rdata, storage, depth, l.env.StateDB.GetRefund(), err} - l.logs = append(l.logs, log) -} - -// CaptureFault implements the EVMLogger interface to trace an execution fault -// while running an opcode. -func (l *StructLogger) CaptureFault(pc uint64, op vm.OpCode, gas, cost uint64, scope *vm.ScopeContext, depth int, err error) { -} - -// CaptureEnd is called after the call finishes to finalize the tracing. -func (l *StructLogger) CaptureEnd(output []byte, gasUsed uint64, t time.Duration, err error) { - l.output = output - l.err = err - if l.cfg.Debug { - fmt.Printf("%#x\n", output) - if err != nil { - fmt.Printf(" error: %v\n", err) - } - } -} - -func (l *StructLogger) CaptureEnter(typ vm.OpCode, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) { -} - -func (l *StructLogger) CaptureExit(output []byte, gasUsed uint64, err error) { -} - -func (l *StructLogger) GetResult() (json.RawMessage, error) { - // Tracing aborted - if l.reason != nil { - return nil, l.reason - } - failed := l.err != nil - returnData := common.CopyBytes(l.output) - // Return data when successful and revert reason when reverted, otherwise empty. - returnVal := fmt.Sprintf("%x", returnData) - if failed && l.err != vm.ErrExecutionReverted { - returnVal = "" - } - return json.Marshal(&ExecutionResult{ - Gas: l.usedGas, - Failed: failed, - ReturnValue: returnVal, - StructLogs: formatLogs(l.StructLogs()), - }) -} - -// Stop terminates execution of the tracer at the first opportune moment. -func (l *StructLogger) Stop(err error) { - l.reason = err - atomic.StoreUint32(&l.interrupt, 1) -} - -func (l *StructLogger) CaptureTxStart(gasLimit uint64) { - l.gasLimit = gasLimit -} - -func (l *StructLogger) CaptureTxEnd(restGas uint64) { - l.usedGas = l.gasLimit - restGas -} - -// StructLogs returns the captured log entries. -func (l *StructLogger) StructLogs() []StructLog { return l.logs } - -// Error returns the VM error captured by the trace. -func (l *StructLogger) Error() error { return l.err } - -// Output returns the VM return value captured by the trace. -func (l *StructLogger) Output() []byte { return l.output } - -// WriteTrace writes a formatted trace to the given writer -func WriteTrace(writer io.Writer, logs []StructLog) { - for _, log := range logs { - fmt.Fprintf(writer, "%-16spc=%08d gas=%v cost=%v", log.Op, log.Pc, log.Gas, log.GasCost) - if log.Err != nil { - fmt.Fprintf(writer, " ERROR: %v", log.Err) - } - fmt.Fprintln(writer) - - if len(log.Stack) > 0 { - fmt.Fprintln(writer, "Stack:") - for i := len(log.Stack) - 1; i >= 0; i-- { - fmt.Fprintf(writer, "%08d %s\n", len(log.Stack)-i-1, log.Stack[i].Hex()) - } - } - if len(log.Memory) > 0 { - fmt.Fprintln(writer, "Memory:") - fmt.Fprint(writer, hex.Dump(log.Memory)) - } - if len(log.Storage) > 0 { - fmt.Fprintln(writer, "Storage:") - for h, item := range log.Storage { - fmt.Fprintf(writer, "%x: %x\n", h, item) - } - } - if len(log.ReturnData) > 0 { - fmt.Fprintln(writer, "ReturnData:") - fmt.Fprint(writer, hex.Dump(log.ReturnData)) - } - fmt.Fprintln(writer) - } -} - -// WriteLogs writes vm logs in a readable format to the given writer -func WriteLogs(writer io.Writer, logs []*types.Log) { - for _, log := range logs { - fmt.Fprintf(writer, "LOG%d: %x bn=%d txi=%x\n", len(log.Topics), log.Address, log.BlockNumber, log.TxIndex) - - for i, topic := range log.Topics { - fmt.Fprintf(writer, "%08d %x\n", i, topic) - } - - fmt.Fprint(writer, hex.Dump(log.Data)) - fmt.Fprintln(writer) - } -} - -type mdLogger struct { - out io.Writer - cfg *Config - env *vm.EVM -} - -// NewMarkdownLogger creates a logger which outputs information in a format adapted -// for human readability, and is also a valid markdown table -func NewMarkdownLogger(cfg *Config, writer io.Writer) *mdLogger { - l := &mdLogger{out: writer, cfg: cfg} - if l.cfg == nil { - l.cfg = &Config{} - } - return l -} - -func (t *mdLogger) CaptureStart(env *vm.EVM, from common.Address, to common.Address, create bool, input []byte, gas uint64, value *big.Int) { - t.env = env - if !create { - fmt.Fprintf(t.out, "From: `%v`\nTo: `%v`\nData: `%#x`\nGas: `%d`\nValue `%v` wei\n", - from.String(), to.String(), - input, gas, value) - } else { - fmt.Fprintf(t.out, "From: `%v`\nCreate at: `%v`\nData: `%#x`\nGas: `%d`\nValue `%v` wei\n", - from.String(), to.String(), - input, gas, value) - } - - fmt.Fprintf(t.out, ` -| Pc | Op | Cost | Stack | RStack | Refund | -|-------|-------------|------|-----------|-----------|---------| -`) -} - -// CaptureState also tracks SLOAD/SSTORE ops to track storage change. -func (t *mdLogger) CaptureState(pc uint64, op vm.OpCode, gas, cost uint64, scope *vm.ScopeContext, rData []byte, depth int, err error) { - stack := scope.Stack - fmt.Fprintf(t.out, "| %4d | %10v | %3d |", pc, op, cost) - - if !t.cfg.DisableStack { - // format stack - var a []string - for _, elem := range stack.Data() { - a = append(a, elem.Hex()) - } - b := fmt.Sprintf("[%v]", strings.Join(a, ",")) - fmt.Fprintf(t.out, "%10v |", b) - } - fmt.Fprintf(t.out, "%10v |", t.env.StateDB.GetRefund()) - fmt.Fprintln(t.out, "") - if err != nil { - fmt.Fprintf(t.out, "Error: %v\n", err) - } -} - -func (t *mdLogger) CaptureFault(pc uint64, op vm.OpCode, gas, cost uint64, scope *vm.ScopeContext, depth int, err error) { - fmt.Fprintf(t.out, "\nError: at pc=%d, op=%v: %v\n", pc, op, err) -} - -func (t *mdLogger) CaptureEnd(output []byte, gasUsed uint64, tm time.Duration, err error) { - fmt.Fprintf(t.out, "\nOutput: `%#x`\nConsumed gas: `%d`\nError: `%v`\n", - output, gasUsed, err) -} - -func (t *mdLogger) CaptureEnter(typ vm.OpCode, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) { -} - -func (t *mdLogger) CaptureExit(output []byte, gasUsed uint64, err error) {} - -func (*mdLogger) CaptureTxStart(gasLimit uint64) {} - -func (*mdLogger) CaptureTxEnd(restGas uint64) {} - -// ExecutionResult groups all structured logs emitted by the EVM -// while replaying a transaction in debug mode as well as transaction -// execution status, the amount of gas used and the return value -type ExecutionResult struct { - Gas uint64 `json:"gas"` - Failed bool `json:"failed"` - ReturnValue string `json:"returnValue"` - StructLogs []StructLogRes `json:"structLogs"` -} - -// StructLogRes stores a structured log emitted by the EVM while replaying a -// transaction in debug mode -type StructLogRes struct { - Pc uint64 `json:"pc"` - Op string `json:"op"` - Gas uint64 `json:"gas"` - GasCost uint64 `json:"gasCost"` - Depth int `json:"depth"` - Error string `json:"error,omitempty"` - Stack *[]string `json:"stack,omitempty"` - Memory *[]string `json:"memory,omitempty"` - Storage *map[string]string `json:"storage,omitempty"` - RefundCounter uint64 `json:"refund,omitempty"` -} - -// formatLogs formats EVM returned structured logs for json output -func formatLogs(logs []StructLog) []StructLogRes { - formatted := make([]StructLogRes, len(logs)) - for index, trace := range logs { - formatted[index] = StructLogRes{ - Pc: trace.Pc, - Op: trace.Op.String(), - Gas: trace.Gas, - GasCost: trace.GasCost, - Depth: trace.Depth, - Error: trace.ErrorString(), - RefundCounter: trace.RefundCounter, - } - if trace.Stack != nil { - stack := make([]string, len(trace.Stack)) - for i, stackValue := range trace.Stack { - stack[i] = stackValue.Hex() - } - formatted[index].Stack = &stack - } - if trace.Memory != nil { - memory := make([]string, 0, (len(trace.Memory)+31)/32) - for i := 0; i+32 <= len(trace.Memory); i += 32 { - memory = append(memory, fmt.Sprintf("%x", trace.Memory[i:i+32])) - } - formatted[index].Memory = &memory - } - if trace.Storage != nil { - storage := make(map[string]string) - for i, storageValue := range trace.Storage { - storage[fmt.Sprintf("%x", i)] = fmt.Sprintf("%x", storageValue) - } - formatted[index].Storage = &storage - } - } - return formatted -} diff --git a/x/evm/tracers/logger/logger_json.go b/x/evm/tracers/logger/logger_json.go deleted file mode 100644 index fb5a4e10..00000000 --- a/x/evm/tracers/logger/logger_json.go +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright 2021 The go-ethereum Authors -// This file is part of the go-ethereum library. -// -// The go-ethereum library is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// The go-ethereum library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . - -package logger - -import ( - "encoding/json" - "io" - "math/big" - "time" - - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/math" - "github.com/stratosnet/stratos-chain/x/evm/vm" -) - -type JSONLogger struct { - encoder *json.Encoder - cfg *Config - env *vm.EVM -} - -// NewJSONLogger creates a new EVM tracer that prints execution steps as JSON objects -// into the provided stream. -func NewJSONLogger(cfg *Config, writer io.Writer) *JSONLogger { - l := &JSONLogger{encoder: json.NewEncoder(writer), cfg: cfg} - if l.cfg == nil { - l.cfg = &Config{} - } - return l -} - -func (l *JSONLogger) CaptureStart(env *vm.EVM, from, to common.Address, create bool, input []byte, gas uint64, value *big.Int) { - l.env = env -} - -func (l *JSONLogger) CaptureFault(pc uint64, op vm.OpCode, gas uint64, cost uint64, scope *vm.ScopeContext, depth int, err error) { - // TODO: Add rData to this interface as well - l.CaptureState(pc, op, gas, cost, scope, nil, depth, err) -} - -// CaptureState outputs state information on the logger. -func (l *JSONLogger) CaptureState(pc uint64, op vm.OpCode, gas, cost uint64, scope *vm.ScopeContext, rData []byte, depth int, err error) { - memory := scope.Memory - stack := scope.Stack - - log := StructLog{ - Pc: pc, - Op: op, - Gas: gas, - GasCost: cost, - MemorySize: memory.Len(), - Depth: depth, - RefundCounter: l.env.StateDB.GetRefund(), - Err: err, - } - if l.cfg.EnableMemory { - log.Memory = memory.Data() - } - if !l.cfg.DisableStack { - log.Stack = stack.Data() - } - if l.cfg.EnableReturnData { - log.ReturnData = rData - } - l.encoder.Encode(log) -} - -// CaptureEnd is triggered at end of execution. -func (l *JSONLogger) CaptureEnd(output []byte, gasUsed uint64, t time.Duration, err error) { - type endLog struct { - Output string `json:"output"` - GasUsed math.HexOrDecimal64 `json:"gasUsed"` - Time time.Duration `json:"time"` - Err string `json:"error,omitempty"` - } - var errMsg string - if err != nil { - errMsg = err.Error() - } - l.encoder.Encode(endLog{common.Bytes2Hex(output), math.HexOrDecimal64(gasUsed), t, errMsg}) -} - -func (l *JSONLogger) CaptureEnter(typ vm.OpCode, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) { -} - -func (l *JSONLogger) CaptureExit(output []byte, gasUsed uint64, err error) {} - -func (l *JSONLogger) CaptureTxStart(gasLimit uint64) {} - -func (l *JSONLogger) CaptureTxEnd(restGas uint64) {} diff --git a/x/evm/tracers/native/4byte.go b/x/evm/tracers/native/4byte.go index 6f5081db..34e608bf 100644 --- a/x/evm/tracers/native/4byte.go +++ b/x/evm/tracers/native/4byte.go @@ -24,8 +24,8 @@ import ( "time" "github.com/ethereum/go-ethereum/common" - "github.com/stratosnet/stratos-chain/x/evm/tracers" - "github.com/stratosnet/stratos-chain/x/evm/vm" + "github.com/ethereum/go-ethereum/core/vm" + "github.com/ethereum/go-ethereum/eth/tracers" ) func init() { @@ -37,15 +37,14 @@ func init() { // a reversed signature can be matched against the size of the data. // // Example: -// -// > debug.traceTransaction( "0x214e597e35da083692f5386141e69f47e973b2c56e7a8073b1ea08fd7571e9de", {tracer: "4byteTracer"}) -// { -// 0x27dc297e-128: 1, -// 0x38cc4831-0: 2, -// 0x524f3889-96: 1, -// 0xadf59f99-288: 1, -// 0xc281d19e-0: 1 -// } +// > debug.traceTransaction( "0x214e597e35da083692f5386141e69f47e973b2c56e7a8073b1ea08fd7571e9de", {tracer: "4byteTracer"}) +// { +// 0x27dc297e-128: 1, +// 0x38cc4831-0: 2, +// 0x524f3889-96: 1, +// 0xadf59f99-288: 1, +// 0xc281d19e-0: 1 +// } type fourByteTracer struct { env *vm.EVM ids map[string]int // ids aggregates the 4byte ids found diff --git a/x/evm/tracers/native/call.go b/x/evm/tracers/native/call.go index a224e244..7af0e658 100644 --- a/x/evm/tracers/native/call.go +++ b/x/evm/tracers/native/call.go @@ -26,8 +26,8 @@ import ( "time" "github.com/ethereum/go-ethereum/common" - "github.com/stratosnet/stratos-chain/x/evm/tracers" - "github.com/stratosnet/stratos-chain/x/evm/vm" + "github.com/ethereum/go-ethereum/core/vm" + "github.com/ethereum/go-ethereum/eth/tracers" ) func init() { diff --git a/x/evm/tracers/native/noop.go b/x/evm/tracers/native/noop.go index fa7f73be..c252b240 100644 --- a/x/evm/tracers/native/noop.go +++ b/x/evm/tracers/native/noop.go @@ -22,8 +22,8 @@ import ( "time" "github.com/ethereum/go-ethereum/common" - "github.com/stratosnet/stratos-chain/x/evm/tracers" - "github.com/stratosnet/stratos-chain/x/evm/vm" + "github.com/ethereum/go-ethereum/core/vm" + "github.com/ethereum/go-ethereum/eth/tracers" ) func init() { diff --git a/x/evm/tracers/native/prestate.go b/x/evm/tracers/native/prestate.go index 83279e1f..b513f383 100644 --- a/x/evm/tracers/native/prestate.go +++ b/x/evm/tracers/native/prestate.go @@ -24,9 +24,9 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/crypto" - "github.com/stratosnet/stratos-chain/x/evm/tracers" - "github.com/stratosnet/stratos-chain/x/evm/vm" + "github.com/ethereum/go-ethereum/eth/tracers" ) func init() { diff --git a/x/evm/tracers/native/revertreason.go b/x/evm/tracers/native/revertreason.go index db9fbcf4..d09b8610 100644 --- a/x/evm/tracers/native/revertreason.go +++ b/x/evm/tracers/native/revertreason.go @@ -25,9 +25,9 @@ import ( "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/crypto" - "github.com/stratosnet/stratos-chain/x/evm/tracers" - "github.com/stratosnet/stratos-chain/x/evm/vm" + "github.com/ethereum/go-ethereum/eth/tracers" ) func init() { diff --git a/x/evm/tracers/native/tracer.go b/x/evm/tracers/native/tracer.go index 468e44b3..fda3e659 100644 --- a/x/evm/tracers/native/tracer.go +++ b/x/evm/tracers/native/tracer.go @@ -27,11 +27,9 @@ Aside from implementing the tracer, it also needs to register itself, using the Example: ```golang - - func init() { - register("noopTracerNative", newNoopTracer) - } - +func init() { + register("noopTracerNative", newNoopTracer) +} ``` */ package native @@ -40,7 +38,7 @@ import ( "encoding/json" "errors" - "github.com/stratosnet/stratos-chain/x/evm/tracers" + "github.com/ethereum/go-ethereum/eth/tracers" ) // InitTracer retrieves the Go transaction tracers included in go-ethereum. diff --git a/x/evm/types/codec.go b/x/evm/types/codec.go index a6e7889c..0e0af3cd 100644 --- a/x/evm/types/codec.go +++ b/x/evm/types/codec.go @@ -6,7 +6,6 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/types/msgservice" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" "github.com/gogo/protobuf/proto" ) @@ -16,11 +15,6 @@ type ( ExtensionOptionsEthereumTxI interface{} ) -// RegisterLegacyAminoCodec RegisterCodec registers concrete types on codec -func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { - cdc.RegisterConcrete(&UpdateImplmentationProposal{}, "cosmos-sdk/UpdateImplmentationProposal", nil) -} - // RegisterInterfaces registers the client interfaces to protobuf Any. func RegisterInterfaces(registry codectypes.InterfaceRegistry) { registry.RegisterImplementations( @@ -39,12 +33,6 @@ func RegisterInterfaces(registry codectypes.InterfaceRegistry) { &AccessListTx{}, &LegacyTx{}, ) - // for gov - registry.RegisterInterface( - "cosmos.gov.v1beta1.Content", - (*govtypes.Content)(nil), - &UpdateImplmentationProposal{}, - ) msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) } diff --git a/x/evm/types/contracts.go b/x/evm/types/contracts.go deleted file mode 100644 index 6fa1f154..00000000 --- a/x/evm/types/contracts.go +++ /dev/null @@ -1,23 +0,0 @@ -package types - -import ( - "strings" - - "github.com/ethereum/go-ethereum/accounts/abi" -) - -const ( - TransparentUpgradableProxyABI = "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"changeAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}]" -) - -var ( - TransparentUpgradableProxyBin = "0x608060405260405162000ed038038062000ed08339810160408190526200002691620004a0565b828162000036828260006200004d565b50620000449050826200008a565b505050620005d3565b6200005883620000e5565b600082511180620000665750805b1562000085576200008383836200012760201b620001691760201c565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f620000b562000156565b604080516001600160a01b03928316815291841660208301520160405180910390a1620000e2816200018f565b50565b620000f08162000244565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606200014f838360405180606001604052806027815260200162000ea960279139620002f8565b9392505050565b60006200018060008051602062000e8983398151915260001b6200037760201b620001951760201c565b546001600160a01b0316919050565b6001600160a01b038116620001fa5760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b806200022360008051602062000e8983398151915260001b6200037760201b620001951760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b6200025a816200037a60201b620001981760201c565b620002be5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401620001f1565b80620002237f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b6200037760201b620001951760201c565b6060600080856001600160a01b03168560405162000317919062000580565b600060405180830381855af49150503d806000811462000354576040519150601f19603f3d011682016040523d82523d6000602084013e62000359565b606091505b5090925090506200036d8683838762000389565b9695505050505050565b90565b6001600160a01b03163b151590565b60608315620003fd578251600003620003f5576001600160a01b0385163b620003f55760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401620001f1565b508162000409565b62000409838362000411565b949350505050565b815115620004225781518083602001fd5b8060405162461bcd60e51b8152600401620001f191906200059e565b80516001600160a01b03811681146200045657600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b838110156200048e57818101518382015260200162000474565b83811115620000835750506000910152565b600080600060608486031215620004b657600080fd5b620004c1846200043e565b9250620004d1602085016200043e565b60408501519092506001600160401b0380821115620004ef57600080fd5b818601915086601f8301126200050457600080fd5b8151818111156200051957620005196200045b565b604051601f8201601f19908116603f011681019083821181831017156200054457620005446200045b565b816040528281528960208487010111156200055e57600080fd5b6200057183602083016020880162000471565b80955050505050509250925092565b600082516200059481846020870162000471565b9190910192915050565b6020815260008251806020840152620005bf81604085016020870162000471565b601f01601f19169190910160400192915050565b6108a680620005e36000396000f3fe60806040523661001357610011610017565b005b6100115b61001f6101a7565b6001600160a01b0316330361015f5760606001600160e01b0319600035166364d3180d60e11b810161005a576100536101da565b9150610157565b63587086bd60e11b6001600160e01b031982160161007a57610053610231565b63070d7c6960e41b6001600160e01b031982160161009a57610053610277565b621eb96f60e61b6001600160e01b03198216016100b9576100536102a8565b63a39f25e560e01b6001600160e01b03198216016100d9576100536102e8565b60405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b815160208301f35b6101676102fc565b565b606061018e838360405180606001604052806027815260200161084a6027913961030c565b9392505050565b90565b6001600160a01b03163b151590565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b60606101e4610384565b60006101f33660048184610695565b81019061020091906106db565b905061021d8160405180602001604052806000815250600061038f565b505060408051602081019091526000815290565b60606000806102433660048184610695565b810190610250919061070c565b915091506102608282600161038f565b604051806020016040528060008152509250505090565b6060610281610384565b60006102903660048184610695565b81019061029d91906106db565b905061021d816103bb565b60606102b2610384565b60006102bc6101a7565b604080516001600160a01b03831660208201529192500160405160208183030381529060405291505090565b60606102f2610384565b60006102bc610412565b610167610307610412565b610421565b6060600080856001600160a01b03168560405161032991906107fa565b600060405180830381855af49150503d8060008114610364576040519150601f19603f3d011682016040523d82523d6000602084013e610369565b606091505b509150915061037a86838387610445565b9695505050505050565b341561016757600080fd5b610398836104c6565b6000825111806103a55750805b156103b6576103b48383610169565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6103e46101a7565b604080516001600160a01b03928316815291841660208301520160405180910390a161040f81610506565b50565b600061041c6105af565b905090565b3660008037600080366000845af43d6000803e808015610440573d6000f35b3d6000fd5b606083156104b45782516000036104ad576001600160a01b0385163b6104ad5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161014e565b50816104be565b6104be83836105d7565b949350505050565b6104cf81610601565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6001600160a01b03811661056b5760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b606482015260840161014e565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc6101cb565b8151156105e75781518083602001fd5b8060405162461bcd60e51b815260040161014e9190610816565b6001600160a01b0381163b61066e5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b606482015260840161014e565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61058e565b600080858511156106a557600080fd5b838611156106b257600080fd5b5050820193919092039150565b80356001600160a01b03811681146106d657600080fd5b919050565b6000602082840312156106ed57600080fd5b61018e826106bf565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561071f57600080fd5b610728836106bf565b9150602083013567ffffffffffffffff8082111561074557600080fd5b818501915085601f83011261075957600080fd5b81358181111561076b5761076b6106f6565b604051601f8201601f19908116603f01168101908382118183101715610793576107936106f6565b816040528281528860208487010111156107ac57600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b60005b838110156107e95781810151838201526020016107d1565b838111156103b45750506000910152565b6000825161080c8184602087016107ce565b9190910192915050565b60208152600082518060208401526108358160408501602087016107ce565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122081bdb2c4d7ec00ca91134719260d0c14c35df5f50dba8a8c2c59a0ef40e1066064736f6c634300080f0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564" -) - -func EncodeContractFunc(contractsABI string, name string, params ...interface{}) ([]byte, error) { - parsedABI, err := abi.JSON(strings.NewReader(contractsABI)) - if err != nil { - return nil, err - } - return parsedABI.Pack(name, params...) -} diff --git a/x/evm/types/evm.pb.go b/x/evm/types/evm.pb.go index b6d46461..dc6e18f2 100644 --- a/x/evm/types/evm.pb.go +++ b/x/evm/types/evm.pb.go @@ -36,9 +36,8 @@ type Params struct { // extra eips defines the additional EIPs for the vm.Config ExtraEIPs []int64 `protobuf:"varint,4,rep,packed,name=extra_eips,json=extraEips,proto3" json:"extra_eips,omitempty" yaml:"extra_eips"` // chain config defines the EVM chain configuration parameters - ChainConfig ChainConfig `protobuf:"bytes,5,opt,name=chain_config,json=chainConfig,proto3" json:"chain_config" yaml:"chain_config"` - FeeMarketParams FeeMarketParams `protobuf:"bytes,6,opt,name=fee_market_params,json=feeMarketParams,proto3" json:"fee_market_params" yaml:"fee_market_params"` - ProxyProposalParams ProxyProposalParams `protobuf:"bytes,7,opt,name=proxy_proposal_params,json=proxyProposalParams,proto3" json:"proxy_proposal_params" yaml:"proxy_proposal_params"` + ChainConfig ChainConfig `protobuf:"bytes,5,opt,name=chain_config,json=chainConfig,proto3" json:"chain_config" yaml:"chain_config"` + FeeMarketParams FeeMarketParams `protobuf:"bytes,6,opt,name=fee_market_params,json=feeMarketParams,proto3" json:"fee_market_params" yaml:"fee_market_params"` } func (m *Params) Reset() { *m = Params{} } @@ -116,13 +115,6 @@ func (m *Params) GetFeeMarketParams() FeeMarketParams { return FeeMarketParams{} } -func (m *Params) GetProxyProposalParams() ProxyProposalParams { - if m != nil { - return m.ProxyProposalParams - } - return ProxyProposalParams{} -} - // ChainConfig defines the Ethereum ChainConfig parameters using *sdk.Int values // instead of *big.Int. type ChainConfig struct { @@ -738,143 +730,6 @@ func (m *FeeMarketParams) GetEnableHeight() int64 { return 0 } -type ProxyContractInitState struct { - // height where it should be applied - Height uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` - // address of proxy contract - Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` - // solidity compiled code - Bin string `protobuf:"bytes,3,opt,name=bin,proto3" json:"bin,omitempty"` - // initializer method data - Init string `protobuf:"bytes,4,opt,name=init,proto3" json:"init,omitempty"` -} - -func (m *ProxyContractInitState) Reset() { *m = ProxyContractInitState{} } -func (m *ProxyContractInitState) String() string { return proto.CompactTextString(m) } -func (*ProxyContractInitState) ProtoMessage() {} -func (*ProxyContractInitState) Descriptor() ([]byte, []int) { - return fileDescriptor_6ee18d4714e9d670, []int{9} -} -func (m *ProxyContractInitState) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ProxyContractInitState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ProxyContractInitState.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 *ProxyContractInitState) XXX_Merge(src proto.Message) { - xxx_messageInfo_ProxyContractInitState.Merge(m, src) -} -func (m *ProxyContractInitState) XXX_Size() int { - return m.Size() -} -func (m *ProxyContractInitState) XXX_DiscardUnknown() { - xxx_messageInfo_ProxyContractInitState.DiscardUnknown(m) -} - -var xxx_messageInfo_ProxyContractInitState proto.InternalMessageInfo - -func (m *ProxyContractInitState) GetHeight() uint64 { - if m != nil { - return m.Height - } - return 0 -} - -func (m *ProxyContractInitState) GetAddress() string { - if m != nil { - return m.Address - } - return "" -} - -func (m *ProxyContractInitState) GetBin() string { - if m != nil { - return m.Bin - } - return "" -} - -func (m *ProxyContractInitState) GetInit() string { - if m != nil { - return m.Init - } - return "" -} - -// Params defines default proxy addresses for futur gov contracts update -type ProxyProposalParams struct { - // consensus address as msg.sender, used to define admin authority, could be simply zero address or custom - // basically it is an owner of evrything. resposible to add proxies and update proxies implementations - ConsensusAddress string `protobuf:"bytes,1,opt,name=consensus_address,json=consensusAddress,proto3" json:"consensus_address,omitempty"` - // proxy owner who basically the owner of proxy contract (for Ownable purpose, not admin) - ProxyOwnerAddress string `protobuf:"bytes,2,opt,name=proxy_owner_address,json=proxyOwnerAddress,proto3" json:"proxy_owner_address,omitempty"` - // proxy contracts name per address reservations - Contracts map[string]*ProxyContractInitState `protobuf:"bytes,3,rep,name=contracts,proto3" json:"contracts,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (m *ProxyProposalParams) Reset() { *m = ProxyProposalParams{} } -func (m *ProxyProposalParams) String() string { return proto.CompactTextString(m) } -func (*ProxyProposalParams) ProtoMessage() {} -func (*ProxyProposalParams) Descriptor() ([]byte, []int) { - return fileDescriptor_6ee18d4714e9d670, []int{10} -} -func (m *ProxyProposalParams) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ProxyProposalParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ProxyProposalParams.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 *ProxyProposalParams) XXX_Merge(src proto.Message) { - xxx_messageInfo_ProxyProposalParams.Merge(m, src) -} -func (m *ProxyProposalParams) XXX_Size() int { - return m.Size() -} -func (m *ProxyProposalParams) XXX_DiscardUnknown() { - xxx_messageInfo_ProxyProposalParams.DiscardUnknown(m) -} - -var xxx_messageInfo_ProxyProposalParams proto.InternalMessageInfo - -func (m *ProxyProposalParams) GetConsensusAddress() string { - if m != nil { - return m.ConsensusAddress - } - return "" -} - -func (m *ProxyProposalParams) GetProxyOwnerAddress() string { - if m != nil { - return m.ProxyOwnerAddress - } - return "" -} - -func (m *ProxyProposalParams) GetContracts() map[string]*ProxyContractInitState { - if m != nil { - return m.Contracts - } - return nil -} - func init() { proto.RegisterType((*Params)(nil), "stratos.evm.v1.Params") proto.RegisterType((*ChainConfig)(nil), "stratos.evm.v1.ChainConfig") @@ -885,132 +740,117 @@ func init() { proto.RegisterType((*AccessTuple)(nil), "stratos.evm.v1.AccessTuple") proto.RegisterType((*TraceConfig)(nil), "stratos.evm.v1.TraceConfig") proto.RegisterType((*FeeMarketParams)(nil), "stratos.evm.v1.FeeMarketParams") - proto.RegisterType((*ProxyContractInitState)(nil), "stratos.evm.v1.ProxyContractInitState") - proto.RegisterType((*ProxyProposalParams)(nil), "stratos.evm.v1.ProxyProposalParams") - proto.RegisterMapType((map[string]*ProxyContractInitState)(nil), "stratos.evm.v1.ProxyProposalParams.ContractsEntry") } func init() { proto.RegisterFile("stratos/evm/v1/evm.proto", fileDescriptor_6ee18d4714e9d670) } var fileDescriptor_6ee18d4714e9d670 = []byte{ - // 1867 bytes of a gzipped FileDescriptorProto + // 1677 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x58, 0x4f, 0x6f, 0x1b, 0xb9, - 0x15, 0x8f, 0x2d, 0xd9, 0x1a, 0x51, 0xb2, 0x34, 0xa6, 0x1d, 0x57, 0x1b, 0x17, 0x1e, 0x63, 0xb6, - 0xd8, 0x1a, 0xe8, 0xc6, 0x5e, 0x3b, 0x30, 0x9a, 0xa6, 0xdd, 0x83, 0x65, 0x3b, 0x1b, 0xb9, 0xc9, - 0xae, 0xc1, 0xa4, 0x28, 0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 0x81, 0xa9, 0x32, 0x5d, 0x33, - 0x46, 0xff, 0x6b, 0x36, 0x90, 0x64, 0x5a, 0x30, 0x14, 0x59, 0x01, 0x55, 0xde, 0x09, 0xea, 0x33, - 0x73, 0xab, 0xcd, 0x2b, 0x35, 0x17, 0x85, 0xa1, 0x30, 0x52, 0xce, 0xad, 0xc2, 0x98, 0xf1, 0xae, - 0x32, 0x7b, 0x69, 0x24, 0xe6, 0x11, 0x82, 0xb1, 0x3e, 0xf3, 0x21, 0x89, 0x45, 0x62, 0x24, 0x7c, - 0x88, 0x56, 0x82, 0x50, 0xc2, 0xd3, 0x46, 0x2a, 0x6a, 0x2e, 0x5e, 0x56, 0xd3, 0xbe, 0xc9, 0x9c, - 0xaa, 0x31, 0xbc, 0xcd, 0xf5, 0x64, 0x46, 0xc2, 0xbf, 0x44, 0xf5, 0x49, 0x18, 0xcc, 0x16, 0x72, - 0x63, 0x35, 0xf1, 0x4d, 0xe6, 0xd4, 0xc6, 0xae, 0x60, 0x21, 0x73, 0x72, 0xfe, 0x9d, 0x03, 0xd6, - 0xee, 0x76, 0xa0, 0xf4, 0x2c, 0xa2, 0x85, 0x5c, 0x1b, 0x85, 0x71, 0xa8, 0xa0, 0xd4, 0x96, 0x88, - 0x16, 0xf0, 0x2f, 0x50, 0x99, 0xf7, 0x98, 0x10, 0x61, 0xc0, 0x24, 0xf4, 0xfc, 0x1f, 0x7e, 0x17, - 0x91, 0x89, 0x77, 0xbe, 0x34, 0xf3, 0x68, 0x8b, 0x59, 0xcc, 0xc5, 0x00, 0x1a, 0xb7, 0x59, 0x9a, - 0x36, 0xbc, 0x01, 0x3d, 0x99, 0x91, 0x70, 0x13, 0x61, 0x13, 0x26, 0x98, 0xea, 0x8a, 0xc4, 0x83, - 0xbd, 0x5f, 0x85, 0x58, 0xd8, 0x81, 0xda, 0x4a, 0xc0, 0x78, 0x42, 0x15, 0x25, 0xb7, 0x34, 0x67, - 0x45, 0xab, 0x68, 0x2f, 0x9d, 0x15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x79, 0x2f, 0xa8, 0xcf, 0xcc, 0xab, 0x36, 0xef, 0xd4, 0x5c, 0x14, 0x86, 0xc2, 0x48, 0x39, 0xb7, + 0x8a, 0x12, 0xc6, 0x07, 0xca, 0xdc, 0xa5, 0xa9, 0x98, 0x47, 0x08, 0xc6, 0x46, 0xcc, 0x87, 0x22, + 0x16, 0x89, 0x91, 0xf0, 0x09, 0xda, 0x0e, 0x22, 0x09, 0xdf, 0x16, 0x52, 0x51, 0xf3, 0xf0, 0xb2, + 0xda, 0xf6, 0x5d, 0xe6, 0x54, 0x8d, 0xe1, 0x5d, 0xae, 0x27, 0x4b, 0x12, 0xfe, 0x15, 0xaa, 0xcf, + 0xc3, 0x20, 0x5b, 0xa8, 0x8d, 0xd5, 0xc6, 0x77, 0x99, 0x53, 0x9b, 0xb9, 0x82, 0x85, 0xac, 0xc8, + 0xf9, 0x39, 0x07, 0xac, 0x3b, 0x08, 0xa1, 0xf5, 0x2c, 0xa2, 0x85, 0x5c, 0x1b, 0x47, 0x49, 0xa4, + 0xa0, 0xd5, 0x36, 0x89, 0x16, 0xf0, 0x2f, 0x51, 0x99, 0x0f, 0x99, 0x10, 0x51, 0xc0, 0x24, 0xcc, + 0xfc, 0x1f, 0xff, 0x30, 0x21, 0x73, 0xef, 0x7c, 0x6b, 0xe6, 0xab, 0x29, 0x61, 0x09, 0x17, 0x63, + 0x18, 0xdc, 0x66, 0x6b, 0xda, 0xf0, 0x16, 0xf4, 0x64, 0x49, 0xc2, 0x6d, 0x84, 0x4d, 0x98, 0x60, + 0x6a, 0x20, 0x52, 0x0f, 0xee, 0x7e, 0x15, 0x62, 0xe1, 0x06, 0x6a, 0x2b, 0x01, 0xe3, 0x39, 0x55, + 0x94, 0x7c, 0xa4, 0xb9, 0x2c, 0x5a, 0x45, 0x7b, 0xf3, 0xb2, 0x68, 0x95, 0x6c, 0x6b, 0xb6, 0x7b, + 0x93, 0x05, 0xd9, 0x9d, 0xca, 0x0b, 0xf0, 0xee, 0x3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, 0xfe, 0x5f, 0xfc, + 0x3f, 0x00, 0x00, 0xff, 0xff, 0xb4, 0xc3, 0x75, 0x8b, 0x3f, 0x10, 0x00, 0x00, } func (m *Params) Marshal() (dAtA []byte, err error) { @@ -1033,16 +873,6 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - { - size, err := m.ProxyProposalParams.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEvm(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a { size, err := m.FeeMarketParams.MarshalToSizedBuffer(dAtA[:i]) if err != nil { @@ -1064,21 +894,21 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x2a if len(m.ExtraEIPs) > 0 { - dAtA5 := make([]byte, len(m.ExtraEIPs)*10) - var j4 int + dAtA4 := make([]byte, len(m.ExtraEIPs)*10) + var j3 int for _, num1 := range m.ExtraEIPs { num := uint64(num1) for num >= 1<<7 { - dAtA5[j4] = uint8(uint64(num)&0x7f | 0x80) + dAtA4[j3] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 - j4++ + j3++ } - dAtA5[j4] = uint8(num) - j4++ + dAtA4[j3] = uint8(num) + j3++ } - i -= j4 - copy(dAtA[i:], dAtA5[:j4]) - i = encodeVarintEvm(dAtA, i, uint64(j4)) + i -= j3 + copy(dAtA[i:], dAtA4[:j3]) + i = encodeVarintEvm(dAtA, i, uint64(j3)) i-- dAtA[i] = 0x22 } @@ -1779,118 +1609,6 @@ func (m *FeeMarketParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *ProxyContractInitState) 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 *ProxyContractInitState) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ProxyContractInitState) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Init) > 0 { - i -= len(m.Init) - copy(dAtA[i:], m.Init) - i = encodeVarintEvm(dAtA, i, uint64(len(m.Init))) - i-- - dAtA[i] = 0x22 - } - if len(m.Bin) > 0 { - i -= len(m.Bin) - copy(dAtA[i:], m.Bin) - i = encodeVarintEvm(dAtA, i, uint64(len(m.Bin))) - i-- - dAtA[i] = 0x1a - } - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintEvm(dAtA, i, uint64(len(m.Address))) - i-- - dAtA[i] = 0x12 - } - if m.Height != 0 { - i = encodeVarintEvm(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *ProxyProposalParams) 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 *ProxyProposalParams) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ProxyProposalParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Contracts) > 0 { - for k := range m.Contracts { - v := m.Contracts[k] - baseI := i - if v != nil { - { - size, err := v.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEvm(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintEvm(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintEvm(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x1a - } - } - if len(m.ProxyOwnerAddress) > 0 { - i -= len(m.ProxyOwnerAddress) - copy(dAtA[i:], m.ProxyOwnerAddress) - i = encodeVarintEvm(dAtA, i, uint64(len(m.ProxyOwnerAddress))) - i-- - dAtA[i] = 0x12 - } - if len(m.ConsensusAddress) > 0 { - i -= len(m.ConsensusAddress) - copy(dAtA[i:], m.ConsensusAddress) - i = encodeVarintEvm(dAtA, i, uint64(len(m.ConsensusAddress))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - func encodeVarintEvm(dAtA []byte, offset int, v uint64) int { offset -= sovEvm(v) base := offset @@ -1929,8 +1647,6 @@ func (m *Params) Size() (n int) { n += 1 + l + sovEvm(uint64(l)) l = m.FeeMarketParams.Size() n += 1 + l + sovEvm(uint64(l)) - l = m.ProxyProposalParams.Size() - n += 1 + l + sovEvm(uint64(l)) return n } @@ -2202,60 +1918,6 @@ func (m *FeeMarketParams) Size() (n int) { return n } -func (m *ProxyContractInitState) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Height != 0 { - n += 1 + sovEvm(uint64(m.Height)) - } - l = len(m.Address) - if l > 0 { - n += 1 + l + sovEvm(uint64(l)) - } - l = len(m.Bin) - if l > 0 { - n += 1 + l + sovEvm(uint64(l)) - } - l = len(m.Init) - if l > 0 { - n += 1 + l + sovEvm(uint64(l)) - } - return n -} - -func (m *ProxyProposalParams) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ConsensusAddress) - if l > 0 { - n += 1 + l + sovEvm(uint64(l)) - } - l = len(m.ProxyOwnerAddress) - if l > 0 { - n += 1 + l + sovEvm(uint64(l)) - } - if len(m.Contracts) > 0 { - for k, v := range m.Contracts { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - l += 1 + sovEvm(uint64(l)) - } - mapEntrySize := 1 + len(k) + sovEvm(uint64(len(k))) + l - n += mapEntrySize + 1 + sovEvm(uint64(mapEntrySize)) - } - } - return n -} - func sovEvm(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -2505,39 +2167,6 @@ func (m *Params) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProxyProposalParams", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEvm - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEvm - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ProxyProposalParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipEvm(dAtA[iNdEx:]) @@ -4505,414 +4134,6 @@ func (m *FeeMarketParams) Unmarshal(dAtA []byte) error { } return nil } -func (m *ProxyContractInitState) 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 ErrIntOverflowEvm - } - 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: ProxyContractInitState: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ProxyContractInitState: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - m.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Height |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - 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 ErrInvalidLengthEvm - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvm - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Bin", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - 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 ErrInvalidLengthEvm - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvm - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Bin = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Init", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - 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 ErrInvalidLengthEvm - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvm - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Init = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEvm(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthEvm - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ProxyProposalParams) 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 ErrIntOverflowEvm - } - 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: ProxyProposalParams: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ProxyProposalParams: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConsensusAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - 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 ErrInvalidLengthEvm - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvm - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ConsensusAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProxyOwnerAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - 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 ErrInvalidLengthEvm - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvm - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProxyOwnerAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Contracts", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEvm - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEvm - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Contracts == nil { - m.Contracts = make(map[string]*ProxyContractInitState) - } - var mapkey string - var mapvalue *ProxyContractInitState - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthEvm - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthEvm - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthEvm - } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { - return ErrInvalidLengthEvm - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &ProxyContractInitState{} - if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipEvm(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthEvm - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Contracts[mapkey] = mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEvm(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthEvm - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func skipEvm(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/evm/types/interfaces.go b/x/evm/types/interfaces.go index 5bbbad55..c32f7811 100644 --- a/x/evm/types/interfaces.go +++ b/x/evm/types/interfaces.go @@ -7,7 +7,7 @@ import ( "github.com/ethereum/go-ethereum/core" ethtypes "github.com/ethereum/go-ethereum/core/types" - keestatedb "github.com/stratosnet/stratos-chain/core/statedb" + //feemarkettypes "github.com/stratosnet/stratos-chain/x/feemarket/types" ) // AccountKeeper defines the expected account keeper interface @@ -39,18 +39,6 @@ type StakingKeeper interface { GetValidatorByConsAddr(ctx sdk.Context, consAddr sdk.ConsAddress) (validator stakingtypes.Validator, found bool) } -// RegisterKeeper defines functionality related for meta and resource node -type RegisterKeeper interface { - KeeGetEffectiveTotalStake(kdb *keestatedb.KeestateDB) sdk.Int - KeeGetRemainingOzoneLimit(kdb *keestatedb.KeestateDB) sdk.Int - KeeSetRemainingOzoneLimit(kdb *keestatedb.KeestateDB, value sdk.Int) -} - -// SdsKeper defines functionality related for ozone purchase -type SdsKeeper interface { - Prepay(ctx sdk.Context, sender sdk.AccAddress, coins sdk.Coins) (sdk.Int, error) -} - // Event Hooks // These can be utilized to customize evm transaction processing. diff --git a/x/evm/types/params.go b/x/evm/types/params.go index b4ebb2f0..f77fbf33 100644 --- a/x/evm/types/params.go +++ b/x/evm/types/params.go @@ -3,13 +3,10 @@ package types import ( "fmt" "math/big" - "sort" sdk "github.com/cosmos/cosmos-sdk/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/params" @@ -43,11 +40,6 @@ var ( ParamStoreKeyElasticityMultiplier = []byte("ElasticityMultiplier") ParamStoreKeyBaseFee = []byte("BaseFee") ParamStoreKeyEnableHeight = []byte("EnableHeight") - - // proposal proxy - ParamStoreKeyConsensusAddress = []byte("ProposalConsensusAddress") - ParamStoreKeyProxyOwnerAddress = []byte("ProxyOwnerAddress") - ParamStoreKeyContracts = []byte("ProposalContracts") ) // ParamKeyTable returns the parameter key table. @@ -56,15 +48,14 @@ func ParamKeyTable() paramtypes.KeyTable { } // NewParams creates a new Params instance -func NewParams(evmDenom string, enableCreate, enableCall bool, config ChainConfig, feeMarketParams FeeMarketParams, proxyProposalParams ProxyProposalParams, extraEIPs ...int64) Params { +func NewParams(evmDenom string, enableCreate, enableCall bool, config ChainConfig, feeMarketParams FeeMarketParams, extraEIPs ...int64) Params { return Params{ - EvmDenom: evmDenom, - EnableCreate: enableCreate, - EnableCall: enableCall, - ExtraEIPs: extraEIPs, - ChainConfig: config, - FeeMarketParams: feeMarketParams, - ProxyProposalParams: proxyProposalParams, + EvmDenom: evmDenom, + EnableCreate: enableCreate, + EnableCall: enableCall, + ExtraEIPs: extraEIPs, + ChainConfig: config, + FeeMarketParams: feeMarketParams, } } @@ -72,13 +63,12 @@ func NewParams(evmDenom string, enableCreate, enableCall bool, config ChainConfi // ExtraEIPs is empty to prevent overriding the latest hard fork instruction set func DefaultParams() Params { return Params{ - EvmDenom: DefaultEVMDenom, - EnableCreate: true, - EnableCall: true, - ChainConfig: DefaultChainConfig(), - ExtraEIPs: nil, - FeeMarketParams: DefaultFeeMarketParams(), - ProxyProposalParams: DefaultProxyProposalParams(), + EvmDenom: DefaultEVMDenom, + EnableCreate: true, + EnableCall: true, + ChainConfig: DefaultChainConfig(), + ExtraEIPs: nil, + FeeMarketParams: DefaultFeeMarketParams(), } } @@ -96,10 +86,6 @@ func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { paramtypes.NewParamSetPair(ParamStoreKeyElasticityMultiplier, &p.FeeMarketParams.ElasticityMultiplier, validateElasticityMultiplier), paramtypes.NewParamSetPair(ParamStoreKeyBaseFee, &p.FeeMarketParams.BaseFee, validateBaseFee), paramtypes.NewParamSetPair(ParamStoreKeyEnableHeight, &p.FeeMarketParams.EnableHeight, validateEnableHeight), - //proposal proxy - paramtypes.NewParamSetPair(ParamStoreKeyConsensusAddress, &p.ProxyProposalParams.ConsensusAddress, validateAddress), - paramtypes.NewParamSetPair(ParamStoreKeyProxyOwnerAddress, &p.ProxyProposalParams.ProxyOwnerAddress, validateAddress), - paramtypes.NewParamSetPair(ParamStoreKeyContracts, &p.ProxyProposalParams.Contracts, validateContracts), } } @@ -264,70 +250,3 @@ func validateEnableHeight(i interface{}) error { return nil } - -// creates a new ProxyProposalParams instance -func NewProxyProposalParams(consensusAddress, proxyOwnerAddress common.Address) ProxyProposalParams { - return ProxyProposalParams{ - ConsensusAddress: consensusAddress.Hex(), - ProxyOwnerAddress: proxyOwnerAddress.Hex(), - Contracts: make(map[string]*ProxyContractInitState), - } -} - -// ProxyProposalParams returns default proxy parameters -func DefaultProxyProposalParams() ProxyProposalParams { - ppp := NewProxyProposalParams( - common.HexToAddress("0x1000000000000000000000000000000000000000"), - common.HexToAddress("0x1000000000000000000000000000000000000001"), - ) - // TODO: Maybe create some pretty method? - ppp.Contracts["prepay"] = &ProxyContractInitState{ - Height: 1, - Address: "0x1000000000000000000000000000000000010101", - Bin: "0x608060405234801561001057600080fd5b50610b19806100206000396000f3fe6080604052600436106100595760003560e01c806334fe1d1e14610065578063715018a61461006f5780638129fc1c146100865780638da5cb5b1461009d578063f2fde38b146100c8578063ffa1ad74146100f157610060565b3661006057005b600080fd5b61006d61011c565b005b34801561007b57600080fd5b50610084610241565b005b34801561009257600080fd5b5061009b610255565b005b3480156100a957600080fd5b506100b261039b565b6040516100bf91906106d1565b60405180910390f35b3480156100d457600080fd5b506100ef60048036038101906100ea919061071d565b6103c5565b005b3480156100fd57600080fd5b50610106610448565b6040516101139190610766565b60405180910390f35b600034905060008103610164576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161015b906107de565b60405180910390fd5b61016c61066e565b3373ffffffffffffffffffffffffffffffffffffffff1681600060018110610197576101966107fe565b5b6020020181815250506101a861066e565b6020816020848660f1600019f16101be57600080fd5b823373ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff167fa9fdf2e446d7225a2b445bc7c21ca59dcea69b5b23f5c4e6f54f87a5db6cdaee84600060018110610222576102216107fe565b5b60200201516040516102349190610846565b60405180910390a4505050565b61024961044d565b61025360006104cb565b565b60008060019054906101000a900460ff161590508080156102865750600160008054906101000a900460ff1660ff16105b806102b3575061029530610591565b1580156102b25750600160008054906101000a900460ff1660ff16145b5b6102f2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102e9906108d3565b60405180910390fd5b60016000806101000a81548160ff021916908360ff160217905550801561032f576001600060016101000a81548160ff0219169083151502179055505b6103376105b4565b61033f610605565b80156103985760008060016101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498600160405161038f9190610938565b60405180910390a15b50565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6103cd61044d565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361043c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610433906109c5565b60405180910390fd5b610445816104cb565b50565b600081565b610455610666565b73ffffffffffffffffffffffffffffffffffffffff1661047361039b565b73ffffffffffffffffffffffffffffffffffffffff16146104c9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104c090610a31565b60405180910390fd5b565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081603360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b600060019054906101000a900460ff16610603576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105fa90610ac3565b60405180910390fd5b565b600060019054906101000a900460ff16610654576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161064b90610ac3565b60405180910390fd5b61066461065f610666565b6104cb565b565b600033905090565b6040518060200160405280600190602082028036833780820191505090505090565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006106bb82610690565b9050919050565b6106cb816106b0565b82525050565b60006020820190506106e660008301846106c2565b92915050565b600080fd5b6106fa816106b0565b811461070557600080fd5b50565b600081359050610717816106f1565b92915050565b600060208284031215610733576107326106ec565b5b600061074184828501610708565b91505092915050565b600060ff82169050919050565b6107608161074a565b82525050565b600060208201905061077b6000830184610757565b92915050565b600082825260208201905092915050565b7f503a205a45524f5f414d4f554e54000000000000000000000000000000000000600082015250565b60006107c8600e83610781565b91506107d382610792565b602082019050919050565b600060208201905081810360008301526107f7816107bb565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000819050919050565b6108408161082d565b82525050565b600060208201905061085b6000830184610837565b92915050565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160008201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b60006108bd602e83610781565b91506108c882610861565b604082019050919050565b600060208201905081810360008301526108ec816108b0565b9050919050565b6000819050919050565b6000819050919050565b600061092261091d610918846108f3565b6108fd565b61074a565b9050919050565b61093281610907565b82525050565b600060208201905061094d6000830184610929565b92915050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b60006109af602683610781565b91506109ba82610953565b604082019050919050565b600060208201905081810360008301526109de816109a2565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000610a1b602083610781565b9150610a26826109e5565b602082019050919050565b60006020820190508181036000830152610a4a81610a0e565b9050919050565b7f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960008201527f6e697469616c697a696e67000000000000000000000000000000000000000000602082015250565b6000610aad602b83610781565b9150610ab882610a51565b604082019050919050565b60006020820190508181036000830152610adc81610aa0565b905091905056fea2646970667358221220af723f0b659da0cdaa0d447e54bb8c0c3af22886c04139bf5fc7ee74f487451c64736f6c63430008120033", - Init: "0x8129fc1c", - } - return ppp -} - -func validateAddress(i interface{}) error { - value, ok := i.(string) - if !ok { - return fmt.Errorf("invalid parameter type: %T", i) - } - if !common.IsHexAddress(value) { - return fmt.Errorf("address '%s' is not a hex", value) - } - return nil -} - -func validateContracts(i interface{}) error { - contracts, ok := i.(map[string]*ProxyContractInitState) - if !ok { - return fmt.Errorf("invalid parameter type: %T", i) - } - - keys := make([]string, 0) - for k := range contracts { - keys = append(keys, k) - } - sort.Strings(keys) - - for _, k := range keys { - state := contracts[k] - if err := validateAddress(state.Address); err != nil { - return err - } - if state.Height < 1 { - return fmt.Errorf("invalid height '%d'", state.Height) - } - if _, err := hexutil.Decode(state.Bin); err != nil { - return err - } - if _, err := hexutil.Decode(state.Init); len(state.Init) != 0 && err != nil { - return err - } - } - - return nil -} diff --git a/x/evm/types/proposal.go b/x/evm/types/proposal.go deleted file mode 100644 index 83aad802..00000000 --- a/x/evm/types/proposal.go +++ /dev/null @@ -1,79 +0,0 @@ -package types - -import ( - "bytes" - "fmt" - - sdk "github.com/cosmos/cosmos-sdk/types" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" - "github.com/ethereum/go-ethereum/common" -) - -const ( - ProposalTypeUpdateImplementation = "UpdateImplementation" -) - -var ( - _ govtypes.Content = &UpdateImplmentationProposal{} -) - -func init() { - govtypes.RegisterProposalType(ProposalTypeUpdateImplementation) -} - -// NewUpdateImplmentationProposal creates a new proxy update proposal. -func NewUpdateImplmentationProposal(proxy, impl common.Address, data []byte, amt *sdk.Int) govtypes.Content { - return &UpdateImplmentationProposal{ - ProxyAddress: proxy.Hex(), - ImplementationAddress: impl.Hex(), - Data: data, - Amount: amt, - } -} - -// GetTitle returns the title of a new proxy update proposal. -func (epd *UpdateImplmentationProposal) GetTitle() string { - return "New proxy upgrade function call" -} - -// GetDescription returns the description of a new proxy update proposal. -func (epd *UpdateImplmentationProposal) GetDescription() string { - return fmt.Sprintf( - "This is upgrade for proxy '%s' address with a new implementation '%s'", - epd.ProxyAddress, epd.ImplementationAddress, - ) -} - -// ProposalRoute returns the routing key of a new proxy update proposal. -func (epd *UpdateImplmentationProposal) ProposalRoute() string { return RouterKey } - -// ProposalType returns the type of a new proxy update proposal. -func (epd *UpdateImplmentationProposal) ProposalType() string { - return ProposalTypeUpdateImplementation -} - -// ValidateBasic runs basic stateless validity checks -func (epd *UpdateImplmentationProposal) ValidateBasic() error { - err := govtypes.ValidateAbstract(epd) - if err != nil { - return err - } - - if !common.IsHexAddress(epd.ProxyAddress) { - return fmt.Errorf("address '%s' is not valid", epd.ProxyAddress) - } - - if !common.IsHexAddress(epd.ImplementationAddress) { - return fmt.Errorf("address '%s' is not valid", epd.ImplementationAddress) - } - - if bytes.Equal(common.HexToAddress(epd.ImplementationAddress).Bytes(), common.Address{}.Bytes()) { - return fmt.Errorf("implementation address could not be zero address") - } - - if epd.Amount == nil { - return fmt.Errorf("amount should be zero or greater") - } - - return nil -} diff --git a/x/evm/types/proposal.pb.go b/x/evm/types/proposal.pb.go deleted file mode 100644 index f538179f..00000000 --- a/x/evm/types/proposal.pb.go +++ /dev/null @@ -1,487 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: stratos/evm/v1/proposal.proto - -package types - -import ( - fmt "fmt" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// UpdateImplmentationProposal used to update implemntation for genesis proxies -type UpdateImplmentationProposal struct { - // proxy address where data will be executed - ProxyAddress string `protobuf:"bytes,1,opt,name=proxy_address,json=proxyAddress,proto3" json:"proxy_address,omitempty"` - // implmentation address as API for a storage - ImplementationAddress string `protobuf:"bytes,2,opt,name=implementation_address,json=implementationAddress,proto3" json:"implementation_address,omitempty"` - // data for execution - Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` - // value for proxy func call - Amount *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,4,opt,name=value,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"value,omitempty"` -} - -func (m *UpdateImplmentationProposal) Reset() { *m = UpdateImplmentationProposal{} } -func (m *UpdateImplmentationProposal) String() string { return proto.CompactTextString(m) } -func (*UpdateImplmentationProposal) ProtoMessage() {} -func (*UpdateImplmentationProposal) Descriptor() ([]byte, []int) { - return fileDescriptor_3c6013e0da139f02, []int{0} -} -func (m *UpdateImplmentationProposal) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *UpdateImplmentationProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_UpdateImplmentationProposal.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 *UpdateImplmentationProposal) XXX_Merge(src proto.Message) { - xxx_messageInfo_UpdateImplmentationProposal.Merge(m, src) -} -func (m *UpdateImplmentationProposal) XXX_Size() int { - return m.Size() -} -func (m *UpdateImplmentationProposal) XXX_DiscardUnknown() { - xxx_messageInfo_UpdateImplmentationProposal.DiscardUnknown(m) -} - -var xxx_messageInfo_UpdateImplmentationProposal proto.InternalMessageInfo - -func (m *UpdateImplmentationProposal) GetProxyAddress() string { - if m != nil { - return m.ProxyAddress - } - return "" -} - -func (m *UpdateImplmentationProposal) GetImplementationAddress() string { - if m != nil { - return m.ImplementationAddress - } - return "" -} - -func (m *UpdateImplmentationProposal) GetData() []byte { - if m != nil { - return m.Data - } - return nil -} - -func init() { - proto.RegisterType((*UpdateImplmentationProposal)(nil), "stratos.evm.v1.UpdateImplmentationProposal") -} - -func init() { proto.RegisterFile("stratos/evm/v1/proposal.proto", fileDescriptor_3c6013e0da139f02) } - -var fileDescriptor_3c6013e0da139f02 = []byte{ - // 290 bytes of a gzipped FileDescriptorProto - 0x1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7, 0xbd, 0x07, 0x7a, 0x50, 0x88, 0x34, 0x97, - 0xbd, 0xf6, 0xb6, 0x39, 0xbd, 0xfb, 0xda, 0xf4, 0x6f, 0xe2, 0x04, 0x17, 0xf9, 0xdc, 0x0f, 0x41, - 0xf1, 0x10, 0xac, 0x02, 0xdb, 0x9c, 0x91, 0x8d, 0x5e, 0x39, 0xae, 0x8c, 0xb4, 0xfe, 0x4c, 0x63, - 0xb9, 0xe9, 0x77, 0x26, 0x0a, 0x72, 0x8d, 0x41, 0x8d, 0x98, 0xce, 0xde, 0x4b, 0x46, 0xd6, 0x25, - 0x23, 0xdf, 0x25, 0x23, 0x6f, 0x15, 0x6b, 0xad, 0x2b, 0xd6, 0xfa, 0xa8, 0x58, 0xeb, 0x99, 0xff, - 0x42, 0x36, 0x33, 0x69, 0x89, 0x3b, 0x39, 0x0a, 0x17, 0x22, 0xd1, 0x7c, 0xe9, 0x86, 0x75, 0xfc, - 0x79, 0xc7, 0xad, 0x75, 0xfb, 0x13, 0x00, 0x00, 0xff, 0xff, 0xfb, 0x01, 0xc9, 0x85, 0x74, 0x01, - 0x00, 0x00, -} - -func (m *UpdateImplmentationProposal) 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 *UpdateImplmentationProposal) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *UpdateImplmentationProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Amount != nil { - { - size := m.Amount.Size() - i -= size - if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintProposal(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if len(m.Data) > 0 { - i -= len(m.Data) - copy(dAtA[i:], m.Data) - i = encodeVarintProposal(dAtA, i, uint64(len(m.Data))) - i-- - dAtA[i] = 0x1a - } - if len(m.ImplementationAddress) > 0 { - i -= len(m.ImplementationAddress) - copy(dAtA[i:], m.ImplementationAddress) - i = encodeVarintProposal(dAtA, i, uint64(len(m.ImplementationAddress))) - i-- - dAtA[i] = 0x12 - } - if len(m.ProxyAddress) > 0 { - i -= len(m.ProxyAddress) - copy(dAtA[i:], m.ProxyAddress) - i = encodeVarintProposal(dAtA, i, uint64(len(m.ProxyAddress))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintProposal(dAtA []byte, offset int, v uint64) int { - offset -= sovProposal(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *UpdateImplmentationProposal) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ProxyAddress) - if l > 0 { - n += 1 + l + sovProposal(uint64(l)) - } - l = len(m.ImplementationAddress) - if l > 0 { - n += 1 + l + sovProposal(uint64(l)) - } - l = len(m.Data) - if l > 0 { - n += 1 + l + sovProposal(uint64(l)) - } - if m.Amount != nil { - l = m.Amount.Size() - n += 1 + l + sovProposal(uint64(l)) - } - return n -} - -func sovProposal(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozProposal(x uint64) (n int) { - return sovProposal(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *UpdateImplmentationProposal) 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 ErrIntOverflowProposal - } - 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: UpdateImplmentationProposal: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UpdateImplmentationProposal: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProxyAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProposal - } - 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 ErrInvalidLengthProposal - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthProposal - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProxyAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ImplementationAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProposal - } - 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 ErrInvalidLengthProposal - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthProposal - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ImplementationAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProposal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthProposal - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthProposal - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) - if m.Data == nil { - m.Data = []byte{} - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProposal - } - 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 ErrInvalidLengthProposal - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthProposal - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v github_com_cosmos_cosmos_sdk_types.Int - m.Amount = &v - if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipProposal(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthProposal - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipProposal(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowProposal - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowProposal - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowProposal - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthProposal - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupProposal - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthProposal - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthProposal = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowProposal = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupProposal = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/evm/tracers/tracers.go b/x/evm/types/tracer.go similarity index 64% rename from x/evm/tracers/tracers.go rename to x/evm/types/tracer.go index 4f2f9d9a..ea22fd55 100644 --- a/x/evm/tracers/tracers.go +++ b/x/evm/types/tracer.go @@ -1,25 +1,6 @@ -// Copyright 2017 The go-ethereum Authors -// This file is part of the go-ethereum library. -// -// The go-ethereum library is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// The go-ethereum library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . - -// Package tracers is a manager for transaction tracing engines. -package tracers +package types import ( - "encoding/json" - "errors" "fmt" "math/big" "os" @@ -27,68 +8,11 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core" + "github.com/ethereum/go-ethereum/core/vm" + "github.com/ethereum/go-ethereum/eth/tracers/logger" "github.com/ethereum/go-ethereum/params" - - "github.com/stratosnet/stratos-chain/x/evm/tracers/logger" - "github.com/stratosnet/stratos-chain/x/evm/vm" ) -type TraceConfig struct { - *logger.Config - Tracer *string - Timeout *string - Reexec *uint64 - // Config specific to given tracer. Note struct logger - // config are historically embedded in main object. - TracerConfig json.RawMessage -} - -// Context contains some contextual infos for a transaction execution that is not -// available from within the EVM object. -type Context struct { - BlockHash common.Hash // Hash of the block the tx is contained within (zero if dangling tx or call) - TxIndex int // Index of the transaction within a block (zero if dangling tx or call) - TxHash common.Hash // Hash of the transaction being traced (zero if dangling call) -} - -// Tracer interface extends vm.EVMLogger and additionally -// allows collecting the tracing result. -type Tracer interface { - vm.EVMLogger - GetResult() (json.RawMessage, error) - // Stop terminates execution of the tracer at the first opportune moment. - Stop(err error) -} - -type lookupFunc func(string, *Context, json.RawMessage) (Tracer, error) - -var ( - lookups []lookupFunc -) - -// RegisterLookup registers a method as a lookup for tracers, meaning that -// users can invoke a named tracer through that lookup. If 'wildcard' is true, -// then the lookup will be placed last. This is typically meant for interpreted -// engines (js) which can evaluate dynamic user-supplied code. -func RegisterLookup(wildcard bool, lookup lookupFunc) { - if wildcard { - lookups = append(lookups, lookup) - } else { - lookups = append([]lookupFunc{lookup}, lookups...) - } -} - -// New returns a new instance of a tracer, by iterating through the -// registered lookups. -func New(code string, ctx *Context, cfg json.RawMessage) (Tracer, error) { - for _, lookup := range lookups { - if tracer, err := lookup(code, ctx, cfg); err == nil { - return tracer, nil - } - } - return nil, errors.New("tracer not found") -} - const ( TracerAccessList = "access_list" TracerJSON = "json" diff --git a/x/evm/vm/analysis.go b/x/evm/vm/analysis.go deleted file mode 100644 index 4aa8cfe7..00000000 --- a/x/evm/vm/analysis.go +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. -// -// The go-ethereum library is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// The go-ethereum library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . - -package vm - -const ( - set2BitsMask = uint16(0b11) - set3BitsMask = uint16(0b111) - set4BitsMask = uint16(0b1111) - set5BitsMask = uint16(0b1_1111) - set6BitsMask = uint16(0b11_1111) - set7BitsMask = uint16(0b111_1111) -) - -// bitvec is a bit vector which maps bytes in a program. -// An unset bit means the byte is an opcode, a set bit means -// it's data (i.e. argument of PUSHxx). -type bitvec []byte - -func (bits bitvec) set1(pos uint64) { - bits[pos/8] |= 1 << (pos % 8) -} - -func (bits bitvec) setN(flag uint16, pos uint64) { - a := flag << (pos % 8) - bits[pos/8] |= byte(a) - if b := byte(a >> 8); b != 0 { - bits[pos/8+1] = b - } -} - -func (bits bitvec) set8(pos uint64) { - a := byte(0xFF << (pos % 8)) - bits[pos/8] |= a - bits[pos/8+1] = ^a -} - -func (bits bitvec) set16(pos uint64) { - a := byte(0xFF << (pos % 8)) - bits[pos/8] |= a - bits[pos/8+1] = 0xFF - bits[pos/8+2] = ^a -} - -// codeSegment checks if the position is in a code segment. -func (bits *bitvec) codeSegment(pos uint64) bool { - return (((*bits)[pos/8] >> (pos % 8)) & 1) == 0 -} - -// codeBitmap collects data locations in code. -func codeBitmap(code []byte) bitvec { - // The bitmap is 4 bytes longer than necessary, in case the code - // ends with a PUSH32, the algorithm will push zeroes onto the - // bitvector outside the bounds of the actual code. - bits := make(bitvec, len(code)/8+1+4) - return codeBitmapInternal(code, bits) -} - -// codeBitmapInternal is the internal implementation of codeBitmap. -// It exists for the purpose of being able to run benchmark tests -// without dynamic allocations affecting the results. -func codeBitmapInternal(code, bits bitvec) bitvec { - for pc := uint64(0); pc < uint64(len(code)); { - op := OpCode(code[pc]) - pc++ - if int8(op) < int8(PUSH1) { // If not PUSH (the int8(op) > int(PUSH32) is always false). - continue - } - numbits := op - PUSH1 + 1 - if numbits >= 8 { - for ; numbits >= 16; numbits -= 16 { - bits.set16(pc) - pc += 16 - } - for ; numbits >= 8; numbits -= 8 { - bits.set8(pc) - pc += 8 - } - } - switch numbits { - case 1: - bits.set1(pc) - pc += 1 - case 2: - bits.setN(set2BitsMask, pc) - pc += 2 - case 3: - bits.setN(set3BitsMask, pc) - pc += 3 - case 4: - bits.setN(set4BitsMask, pc) - pc += 4 - case 5: - bits.setN(set5BitsMask, pc) - pc += 5 - case 6: - bits.setN(set6BitsMask, pc) - pc += 6 - case 7: - bits.setN(set7BitsMask, pc) - pc += 7 - } - } - return bits -} diff --git a/x/evm/vm/common.go b/x/evm/vm/common.go deleted file mode 100644 index 90ba4a4a..00000000 --- a/x/evm/vm/common.go +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. -// -// The go-ethereum library is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// The go-ethereum library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . - -package vm - -import ( - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/math" - "github.com/holiman/uint256" -) - -// calcMemSize64 calculates the required memory size, and returns -// the size and whether the result overflowed uint64 -func calcMemSize64(off, l *uint256.Int) (uint64, bool) { - if !l.IsUint64() { - return 0, true - } - return calcMemSize64WithUint(off, l.Uint64()) -} - -// calcMemSize64WithUint calculates the required memory size, and returns -// the size and whether the result overflowed uint64 -// Identical to calcMemSize64, but length is a uint64 -func calcMemSize64WithUint(off *uint256.Int, length64 uint64) (uint64, bool) { - // if length is zero, memsize is always zero, regardless of offset - if length64 == 0 { - return 0, false - } - // Check that offset doesn't overflow - offset64, overflow := off.Uint64WithOverflow() - if overflow { - return 0, true - } - val := offset64 + length64 - // if value < either of it's parts, then it overflowed - return val, val < offset64 -} - -// getData returns a slice from the data based on the start and size and pads -// up to size with zero's. This function is overflow safe. -func getData(data []byte, start uint64, size uint64) []byte { - length := uint64(len(data)) - if start > length { - start = length - } - end := start + size - if end > length { - end = length - } - return common.RightPadBytes(data[start:end], int(size)) -} - -// toWordSize returns the ceiled word size required for memory expansion. -func toWordSize(size uint64) uint64 { - if size > math.MaxUint64-31 { - return math.MaxUint64/32 + 1 - } - - return (size + 31) / 32 -} - -func allZero(b []byte) bool { - for _, byte := range b { - if byte != 0 { - return false - } - } - return true -} diff --git a/x/evm/vm/contract.go b/x/evm/vm/contract.go deleted file mode 100644 index bb090296..00000000 --- a/x/evm/vm/contract.go +++ /dev/null @@ -1,194 +0,0 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. -// -// The go-ethereum library is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// The go-ethereum library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . - -package vm - -import ( - "math/big" - - "github.com/ethereum/go-ethereum/common" - "github.com/holiman/uint256" -) - -// ContractRef is a reference to the contract's backing object -type ContractRef interface { - Address() common.Address -} - -// AccountRef implements ContractRef. -// -// Account references are used during EVM initialisation and -// it's primary use is to fetch addresses. Removing this object -// proves difficult because of the cached jump destinations which -// are fetched from the parent contract (i.e. the caller), which -// is a ContractRef. -type AccountRef common.Address - -// Address casts AccountRef to a Address -func (ar AccountRef) Address() common.Address { return (common.Address)(ar) } - -// Contract represents an ethereum contract in the state database. It contains -// the contract code, calling arguments. Contract implements ContractRef -type Contract struct { - // CallerAddress is the result of the caller which initialised this - // contract. However when the "call method" is delegated this value - // needs to be initialised to that of the caller's caller. - CallerAddress common.Address - caller ContractRef - self ContractRef - - jumpdests map[common.Hash]bitvec // Aggregated result of JUMPDEST analysis. - analysis bitvec // Locally cached result of JUMPDEST analysis - - Code []byte - CodeHash common.Hash - CodeAddr *common.Address - Input []byte - - Gas uint64 - value *big.Int -} - -// NewContract returns a new contract environment for the execution of EVM. -func NewContract(caller ContractRef, object ContractRef, value *big.Int, gas uint64) *Contract { - c := &Contract{CallerAddress: caller.Address(), caller: caller, self: object} - - if parent, ok := caller.(*Contract); ok { - // Reuse JUMPDEST analysis from parent context if available. - c.jumpdests = parent.jumpdests - } else { - c.jumpdests = make(map[common.Hash]bitvec) - } - - // Gas should be a pointer so it can safely be reduced through the run - // This pointer will be off the state transition - c.Gas = gas - // ensures a value is set - c.value = value - - return c -} - -func (c *Contract) validJumpdest(dest *uint256.Int) bool { - udest, overflow := dest.Uint64WithOverflow() - // PC cannot go beyond len(code) and certainly can't be bigger than 63bits. - // Don't bother checking for JUMPDEST in that case. - if overflow || udest >= uint64(len(c.Code)) { - return false - } - // Only JUMPDESTs allowed for destinations - if OpCode(c.Code[udest]) != JUMPDEST { - return false - } - return c.isCode(udest) -} - -// isCode returns true if the provided PC location is an actual opcode, as -// opposed to a data-segment following a PUSHN operation. -func (c *Contract) isCode(udest uint64) bool { - // Do we already have an analysis laying around? - if c.analysis != nil { - return c.analysis.codeSegment(udest) - } - // Do we have a contract hash already? - // If we do have a hash, that means it's a 'regular' contract. For regular - // contracts ( not temporary initcode), we store the analysis in a map - if c.CodeHash != (common.Hash{}) { - // Does parent context have the analysis? - analysis, exist := c.jumpdests[c.CodeHash] - if !exist { - // Do the analysis and save in parent context - // We do not need to store it in c.analysis - analysis = codeBitmap(c.Code) - c.jumpdests[c.CodeHash] = analysis - } - // Also stash it in current contract for faster access - c.analysis = analysis - return analysis.codeSegment(udest) - } - // We don't have the code hash, most likely a piece of initcode not already - // in state trie. In that case, we do an analysis, and save it locally, so - // we don't have to recalculate it for every JUMP instruction in the execution - // However, we don't save it within the parent context - if c.analysis == nil { - c.analysis = codeBitmap(c.Code) - } - return c.analysis.codeSegment(udest) -} - -// AsDelegate sets the contract to be a delegate call and returns the current -// contract (for chaining calls) -func (c *Contract) AsDelegate() *Contract { - // NOTE: caller must, at all times be a contract. It should never happen - // that caller is something other than a Contract. - parent := c.caller.(*Contract) - c.CallerAddress = parent.CallerAddress - c.value = parent.value - - return c -} - -// GetOp returns the n'th element in the contract's byte array -func (c *Contract) GetOp(n uint64) OpCode { - if n < uint64(len(c.Code)) { - return OpCode(c.Code[n]) - } - - return STOP -} - -// Caller returns the caller of the contract. -// -// Caller will recursively call caller when the contract is a delegate -// call, including that of caller's caller. -func (c *Contract) Caller() common.Address { - return c.CallerAddress -} - -// UseGas attempts the use gas and subtracts it and returns true on success -func (c *Contract) UseGas(gas uint64) (ok bool) { - if c.Gas < gas { - return false - } - c.Gas -= gas - return true -} - -// Address returns the contracts address -func (c *Contract) Address() common.Address { - return c.self.Address() -} - -// Value returns the contract's value (sent to it from it's caller) -func (c *Contract) Value() *big.Int { - return c.value -} - -// SetCallCode sets the code of the contract and address of the backing data -// object -func (c *Contract) SetCallCode(addr *common.Address, hash common.Hash, code []byte) { - c.Code = code - c.CodeHash = hash - c.CodeAddr = addr -} - -// SetCodeOptionalHash can be used to provide code, but it's optional to provide hash. -// In case hash is not provided, the jumpdest analysis will not be saved to the parent context -func (c *Contract) SetCodeOptionalHash(addr *common.Address, codeAndHash *codeAndHash) { - c.Code = codeAndHash.code - c.CodeHash = codeAndHash.hash - c.CodeAddr = addr -} diff --git a/x/evm/vm/contracts.go b/x/evm/vm/contracts.go deleted file mode 100644 index 1b832b63..00000000 --- a/x/evm/vm/contracts.go +++ /dev/null @@ -1,1043 +0,0 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. -// -// The go-ethereum library is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// The go-ethereum library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . - -package vm - -import ( - "crypto/sha256" - "encoding/binary" - "errors" - "math/big" - - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/math" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/crypto/blake2b" - "github.com/ethereum/go-ethereum/crypto/bls12381" - "github.com/ethereum/go-ethereum/crypto/bn256" - "github.com/ethereum/go-ethereum/params" - "golang.org/x/crypto/ripemd160" -) - -// PrecompiledContract is the basic interface for native Go contracts. The implementation -// requires a deterministic gas count based on the input size of the Run method of the -// contract. -type PrecompiledContract interface { - RequiredGas(input []byte) uint64 // RequiredPrice calculates the contract gas use - Run(input []byte) ([]byte, error) // Run runs the precompiled contract -} - -// PrecompiledContractsHomestead contains the default set of pre-compiled Ethereum -// contracts used in the Frontier and Homestead releases. -var PrecompiledContractsHomestead = map[common.Address]PrecompiledContract{ - common.BytesToAddress([]byte{1}): &ecrecover{}, - common.BytesToAddress([]byte{2}): &sha256hash{}, - common.BytesToAddress([]byte{3}): &ripemd160hash{}, - common.BytesToAddress([]byte{4}): &dataCopy{}, -} - -// PrecompiledContractsByzantium contains the default set of pre-compiled Ethereum -// contracts used in the Byzantium release. -var PrecompiledContractsByzantium = map[common.Address]PrecompiledContract{ - common.BytesToAddress([]byte{1}): &ecrecover{}, - common.BytesToAddress([]byte{2}): &sha256hash{}, - common.BytesToAddress([]byte{3}): &ripemd160hash{}, - common.BytesToAddress([]byte{4}): &dataCopy{}, - common.BytesToAddress([]byte{5}): &bigModExp{eip2565: false}, - common.BytesToAddress([]byte{6}): &bn256AddByzantium{}, - common.BytesToAddress([]byte{7}): &bn256ScalarMulByzantium{}, - common.BytesToAddress([]byte{8}): &bn256PairingByzantium{}, -} - -// PrecompiledContractsIstanbul contains the default set of pre-compiled Ethereum -// contracts used in the Istanbul release. -var PrecompiledContractsIstanbul = map[common.Address]PrecompiledContract{ - common.BytesToAddress([]byte{1}): &ecrecover{}, - common.BytesToAddress([]byte{2}): &sha256hash{}, - common.BytesToAddress([]byte{3}): &ripemd160hash{}, - common.BytesToAddress([]byte{4}): &dataCopy{}, - common.BytesToAddress([]byte{5}): &bigModExp{eip2565: false}, - common.BytesToAddress([]byte{6}): &bn256AddIstanbul{}, - common.BytesToAddress([]byte{7}): &bn256ScalarMulIstanbul{}, - common.BytesToAddress([]byte{8}): &bn256PairingIstanbul{}, - common.BytesToAddress([]byte{9}): &blake2F{}, -} - -// PrecompiledContractsBerlin contains the default set of pre-compiled Ethereum -// contracts used in the Berlin release. -var PrecompiledContractsBerlin = map[common.Address]PrecompiledContract{ - common.BytesToAddress([]byte{1}): &ecrecover{}, - common.BytesToAddress([]byte{2}): &sha256hash{}, - common.BytesToAddress([]byte{3}): &ripemd160hash{}, - common.BytesToAddress([]byte{4}): &dataCopy{}, - common.BytesToAddress([]byte{5}): &bigModExp{eip2565: true}, - common.BytesToAddress([]byte{6}): &bn256AddIstanbul{}, - common.BytesToAddress([]byte{7}): &bn256ScalarMulIstanbul{}, - common.BytesToAddress([]byte{8}): &bn256PairingIstanbul{}, - common.BytesToAddress([]byte{9}): &blake2F{}, -} - -// PrecompiledContractsBLS contains the set of pre-compiled Ethereum -// contracts specified in EIP-2537. These are exported for testing purposes. -var PrecompiledContractsBLS = map[common.Address]PrecompiledContract{ - common.BytesToAddress([]byte{10}): &bls12381G1Add{}, - common.BytesToAddress([]byte{11}): &bls12381G1Mul{}, - common.BytesToAddress([]byte{12}): &bls12381G1MultiExp{}, - common.BytesToAddress([]byte{13}): &bls12381G2Add{}, - common.BytesToAddress([]byte{14}): &bls12381G2Mul{}, - common.BytesToAddress([]byte{15}): &bls12381G2MultiExp{}, - common.BytesToAddress([]byte{16}): &bls12381Pairing{}, - common.BytesToAddress([]byte{17}): &bls12381MapG1{}, - common.BytesToAddress([]byte{18}): &bls12381MapG2{}, -} - -var ( - PrecompiledAddressesBerlin []common.Address - PrecompiledAddressesIstanbul []common.Address - PrecompiledAddressesByzantium []common.Address - PrecompiledAddressesHomestead []common.Address -) - -func init() { - for k := range PrecompiledContractsHomestead { - PrecompiledAddressesHomestead = append(PrecompiledAddressesHomestead, k) - } - for k := range PrecompiledContractsByzantium { - PrecompiledAddressesByzantium = append(PrecompiledAddressesByzantium, k) - } - for k := range PrecompiledContractsIstanbul { - PrecompiledAddressesIstanbul = append(PrecompiledAddressesIstanbul, k) - } - for k := range PrecompiledContractsBerlin { - PrecompiledAddressesBerlin = append(PrecompiledAddressesBerlin, k) - } -} - -// ActivePrecompiles returns the precompiles enabled with the current configuration. -func ActivePrecompiles(rules params.Rules) []common.Address { - switch { - case rules.IsBerlin: - return PrecompiledAddressesBerlin - case rules.IsIstanbul: - return PrecompiledAddressesIstanbul - case rules.IsByzantium: - return PrecompiledAddressesByzantium - default: - return PrecompiledAddressesHomestead - } -} - -// RunPrecompiledContract runs and evaluates the output of a precompiled contract. -// It returns -// - the returned bytes, -// - the _remaining_ gas, -// - any error that occurred -func RunPrecompiledContract(p PrecompiledContract, input []byte, suppliedGas uint64) (ret []byte, remainingGas uint64, err error) { - gasCost := p.RequiredGas(input) - if suppliedGas < gasCost { - return nil, 0, ErrOutOfGas - } - suppliedGas -= gasCost - output, err := p.Run(input) - return output, suppliedGas, err -} - -// ECRECOVER implemented as a native contract. -type ecrecover struct{} - -func (c *ecrecover) RequiredGas(input []byte) uint64 { - return params.EcrecoverGas -} - -func (c *ecrecover) Run(input []byte) ([]byte, error) { - const ecRecoverInputLength = 128 - - input = common.RightPadBytes(input, ecRecoverInputLength) - // "input" is (hash, v, r, s), each 32 bytes - // but for ecrecover we want (r, s, v) - - r := new(big.Int).SetBytes(input[64:96]) - s := new(big.Int).SetBytes(input[96:128]) - v := input[63] - 27 - - // tighter sig s values input homestead only apply to tx sigs - if !allZero(input[32:63]) || !crypto.ValidateSignatureValues(v, r, s, false) { - return nil, nil - } - // We must make sure not to modify the 'input', so placing the 'v' along with - // the signature needs to be done on a new allocation - sig := make([]byte, 65) - copy(sig, input[64:128]) - sig[64] = v - // v needs to be at the end for libsecp256k1 - pubKey, err := crypto.Ecrecover(input[:32], sig) - // make sure the public key is a valid one - if err != nil { - return nil, nil - } - - // the first byte of pubkey is bitcoin heritage - return common.LeftPadBytes(crypto.Keccak256(pubKey[1:])[12:], 32), nil -} - -// SHA256 implemented as a native contract. -type sha256hash struct{} - -// RequiredGas returns the gas required to execute the pre-compiled contract. -// -// This method does not require any overflow checking as the input size gas costs -// required for anything significant is so high it's impossible to pay for. -func (c *sha256hash) RequiredGas(input []byte) uint64 { - return uint64(len(input)+31)/32*params.Sha256PerWordGas + params.Sha256BaseGas -} -func (c *sha256hash) Run(input []byte) ([]byte, error) { - h := sha256.Sum256(input) - return h[:], nil -} - -// RIPEMD160 implemented as a native contract. -type ripemd160hash struct{} - -// RequiredGas returns the gas required to execute the pre-compiled contract. -// -// This method does not require any overflow checking as the input size gas costs -// required for anything significant is so high it's impossible to pay for. -func (c *ripemd160hash) RequiredGas(input []byte) uint64 { - return uint64(len(input)+31)/32*params.Ripemd160PerWordGas + params.Ripemd160BaseGas -} -func (c *ripemd160hash) Run(input []byte) ([]byte, error) { - ripemd := ripemd160.New() - ripemd.Write(input) - return common.LeftPadBytes(ripemd.Sum(nil), 32), nil -} - -// data copy implemented as a native contract. -type dataCopy struct{} - -// RequiredGas returns the gas required to execute the pre-compiled contract. -// -// This method does not require any overflow checking as the input size gas costs -// required for anything significant is so high it's impossible to pay for. -func (c *dataCopy) RequiredGas(input []byte) uint64 { - return uint64(len(input)+31)/32*params.IdentityPerWordGas + params.IdentityBaseGas -} -func (c *dataCopy) Run(in []byte) ([]byte, error) { - return in, nil -} - -// bigModExp implements a native big integer exponential modular operation. -type bigModExp struct { - eip2565 bool -} - -var ( - big0 = big.NewInt(0) - big1 = big.NewInt(1) - big3 = big.NewInt(3) - big4 = big.NewInt(4) - big7 = big.NewInt(7) - big8 = big.NewInt(8) - big16 = big.NewInt(16) - big20 = big.NewInt(20) - big32 = big.NewInt(32) - big64 = big.NewInt(64) - big96 = big.NewInt(96) - big480 = big.NewInt(480) - big1024 = big.NewInt(1024) - big3072 = big.NewInt(3072) - big199680 = big.NewInt(199680) -) - -// modexpMultComplexity implements bigModexp multComplexity formula, as defined in EIP-198 -// -// def mult_complexity(x): -// if x <= 64: return x ** 2 -// elif x <= 1024: return x ** 2 // 4 + 96 * x - 3072 -// else: return x ** 2 // 16 + 480 * x - 199680 -// -// where is x is max(length_of_MODULUS, length_of_BASE) -func modexpMultComplexity(x *big.Int) *big.Int { - switch { - case x.Cmp(big64) <= 0: - x.Mul(x, x) // x ** 2 - case x.Cmp(big1024) <= 0: - // (x ** 2 // 4 ) + ( 96 * x - 3072) - x = new(big.Int).Add( - new(big.Int).Div(new(big.Int).Mul(x, x), big4), - new(big.Int).Sub(new(big.Int).Mul(big96, x), big3072), - ) - default: - // (x ** 2 // 16) + (480 * x - 199680) - x = new(big.Int).Add( - new(big.Int).Div(new(big.Int).Mul(x, x), big16), - new(big.Int).Sub(new(big.Int).Mul(big480, x), big199680), - ) - } - return x -} - -// RequiredGas returns the gas required to execute the pre-compiled contract. -func (c *bigModExp) RequiredGas(input []byte) uint64 { - var ( - baseLen = new(big.Int).SetBytes(getData(input, 0, 32)) - expLen = new(big.Int).SetBytes(getData(input, 32, 32)) - modLen = new(big.Int).SetBytes(getData(input, 64, 32)) - ) - if len(input) > 96 { - input = input[96:] - } else { - input = input[:0] - } - // Retrieve the head 32 bytes of exp for the adjusted exponent length - var expHead *big.Int - if big.NewInt(int64(len(input))).Cmp(baseLen) <= 0 { - expHead = new(big.Int) - } else { - if expLen.Cmp(big32) > 0 { - expHead = new(big.Int).SetBytes(getData(input, baseLen.Uint64(), 32)) - } else { - expHead = new(big.Int).SetBytes(getData(input, baseLen.Uint64(), expLen.Uint64())) - } - } - // Calculate the adjusted exponent length - var msb int - if bitlen := expHead.BitLen(); bitlen > 0 { - msb = bitlen - 1 - } - adjExpLen := new(big.Int) - if expLen.Cmp(big32) > 0 { - adjExpLen.Sub(expLen, big32) - adjExpLen.Mul(big8, adjExpLen) - } - adjExpLen.Add(adjExpLen, big.NewInt(int64(msb))) - // Calculate the gas cost of the operation - gas := new(big.Int).Set(math.BigMax(modLen, baseLen)) - if c.eip2565 { - // EIP-2565 has three changes - // 1. Different multComplexity (inlined here) - // in EIP-2565 (https://eips.ethereum.org/EIPS/eip-2565): - // - // def mult_complexity(x): - // ceiling(x/8)^2 - // - //where is x is max(length_of_MODULUS, length_of_BASE) - gas = gas.Add(gas, big7) - gas = gas.Div(gas, big8) - gas.Mul(gas, gas) - - gas.Mul(gas, math.BigMax(adjExpLen, big1)) - // 2. Different divisor (`GQUADDIVISOR`) (3) - gas.Div(gas, big3) - if gas.BitLen() > 64 { - return math.MaxUint64 - } - // 3. Minimum price of 200 gas - if gas.Uint64() < 200 { - return 200 - } - return gas.Uint64() - } - gas = modexpMultComplexity(gas) - gas.Mul(gas, math.BigMax(adjExpLen, big1)) - gas.Div(gas, big20) - - if gas.BitLen() > 64 { - return math.MaxUint64 - } - return gas.Uint64() -} - -func (c *bigModExp) Run(input []byte) ([]byte, error) { - var ( - baseLen = new(big.Int).SetBytes(getData(input, 0, 32)).Uint64() - expLen = new(big.Int).SetBytes(getData(input, 32, 32)).Uint64() - modLen = new(big.Int).SetBytes(getData(input, 64, 32)).Uint64() - ) - if len(input) > 96 { - input = input[96:] - } else { - input = input[:0] - } - // Handle a special case when both the base and mod length is zero - if baseLen == 0 && modLen == 0 { - return []byte{}, nil - } - // Retrieve the operands and execute the exponentiation - var ( - base = new(big.Int).SetBytes(getData(input, 0, baseLen)) - exp = new(big.Int).SetBytes(getData(input, baseLen, expLen)) - mod = new(big.Int).SetBytes(getData(input, baseLen+expLen, modLen)) - ) - if mod.BitLen() == 0 { - // Modulo 0 is undefined, return zero - return common.LeftPadBytes([]byte{}, int(modLen)), nil - } - return common.LeftPadBytes(base.Exp(base, exp, mod).Bytes(), int(modLen)), nil -} - -// newCurvePoint unmarshals a binary blob into a bn256 elliptic curve point, -// returning it, or an error if the point is invalid. -func newCurvePoint(blob []byte) (*bn256.G1, error) { - p := new(bn256.G1) - if _, err := p.Unmarshal(blob); err != nil { - return nil, err - } - return p, nil -} - -// newTwistPoint unmarshals a binary blob into a bn256 elliptic curve point, -// returning it, or an error if the point is invalid. -func newTwistPoint(blob []byte) (*bn256.G2, error) { - p := new(bn256.G2) - if _, err := p.Unmarshal(blob); err != nil { - return nil, err - } - return p, nil -} - -// runBn256Add implements the Bn256Add precompile, referenced by both -// Byzantium and Istanbul operations. -func runBn256Add(input []byte) ([]byte, error) { - x, err := newCurvePoint(getData(input, 0, 64)) - if err != nil { - return nil, err - } - y, err := newCurvePoint(getData(input, 64, 64)) - if err != nil { - return nil, err - } - res := new(bn256.G1) - res.Add(x, y) - return res.Marshal(), nil -} - -// bn256Add implements a native elliptic curve point addition conforming to -// Istanbul consensus rules. -type bn256AddIstanbul struct{} - -// RequiredGas returns the gas required to execute the pre-compiled contract. -func (c *bn256AddIstanbul) RequiredGas(input []byte) uint64 { - return params.Bn256AddGasIstanbul -} - -func (c *bn256AddIstanbul) Run(input []byte) ([]byte, error) { - return runBn256Add(input) -} - -// bn256AddByzantium implements a native elliptic curve point addition -// conforming to Byzantium consensus rules. -type bn256AddByzantium struct{} - -// RequiredGas returns the gas required to execute the pre-compiled contract. -func (c *bn256AddByzantium) RequiredGas(input []byte) uint64 { - return params.Bn256AddGasByzantium -} - -func (c *bn256AddByzantium) Run(input []byte) ([]byte, error) { - return runBn256Add(input) -} - -// runBn256ScalarMul implements the Bn256ScalarMul precompile, referenced by -// both Byzantium and Istanbul operations. -func runBn256ScalarMul(input []byte) ([]byte, error) { - p, err := newCurvePoint(getData(input, 0, 64)) - if err != nil { - return nil, err - } - res := new(bn256.G1) - res.ScalarMult(p, new(big.Int).SetBytes(getData(input, 64, 32))) - return res.Marshal(), nil -} - -// bn256ScalarMulIstanbul implements a native elliptic curve scalar -// multiplication conforming to Istanbul consensus rules. -type bn256ScalarMulIstanbul struct{} - -// RequiredGas returns the gas required to execute the pre-compiled contract. -func (c *bn256ScalarMulIstanbul) RequiredGas(input []byte) uint64 { - return params.Bn256ScalarMulGasIstanbul -} - -func (c *bn256ScalarMulIstanbul) Run(input []byte) ([]byte, error) { - return runBn256ScalarMul(input) -} - -// bn256ScalarMulByzantium implements a native elliptic curve scalar -// multiplication conforming to Byzantium consensus rules. -type bn256ScalarMulByzantium struct{} - -// RequiredGas returns the gas required to execute the pre-compiled contract. -func (c *bn256ScalarMulByzantium) RequiredGas(input []byte) uint64 { - return params.Bn256ScalarMulGasByzantium -} - -func (c *bn256ScalarMulByzantium) Run(input []byte) ([]byte, error) { - return runBn256ScalarMul(input) -} - -var ( - // true32Byte is returned if the bn256 pairing check succeeds. - true32Byte = []byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1} - - // false32Byte is returned if the bn256 pairing check fails. - false32Byte = make([]byte, 32) - - // errBadPairingInput is returned if the bn256 pairing input is invalid. - errBadPairingInput = errors.New("bad elliptic curve pairing size") -) - -// runBn256Pairing implements the Bn256Pairing precompile, referenced by both -// Byzantium and Istanbul operations. -func runBn256Pairing(input []byte) ([]byte, error) { - // Handle some corner cases cheaply - if len(input)%192 > 0 { - return nil, errBadPairingInput - } - // Convert the input into a set of coordinates - var ( - cs []*bn256.G1 - ts []*bn256.G2 - ) - for i := 0; i < len(input); i += 192 { - c, err := newCurvePoint(input[i : i+64]) - if err != nil { - return nil, err - } - t, err := newTwistPoint(input[i+64 : i+192]) - if err != nil { - return nil, err - } - cs = append(cs, c) - ts = append(ts, t) - } - // Execute the pairing checks and return the results - if bn256.PairingCheck(cs, ts) { - return true32Byte, nil - } - return false32Byte, nil -} - -// bn256PairingIstanbul implements a pairing pre-compile for the bn256 curve -// conforming to Istanbul consensus rules. -type bn256PairingIstanbul struct{} - -// RequiredGas returns the gas required to execute the pre-compiled contract. -func (c *bn256PairingIstanbul) RequiredGas(input []byte) uint64 { - return params.Bn256PairingBaseGasIstanbul + uint64(len(input)/192)*params.Bn256PairingPerPointGasIstanbul -} - -func (c *bn256PairingIstanbul) Run(input []byte) ([]byte, error) { - return runBn256Pairing(input) -} - -// bn256PairingByzantium implements a pairing pre-compile for the bn256 curve -// conforming to Byzantium consensus rules. -type bn256PairingByzantium struct{} - -// RequiredGas returns the gas required to execute the pre-compiled contract. -func (c *bn256PairingByzantium) RequiredGas(input []byte) uint64 { - return params.Bn256PairingBaseGasByzantium + uint64(len(input)/192)*params.Bn256PairingPerPointGasByzantium -} - -func (c *bn256PairingByzantium) Run(input []byte) ([]byte, error) { - return runBn256Pairing(input) -} - -type blake2F struct{} - -func (c *blake2F) RequiredGas(input []byte) uint64 { - // If the input is malformed, we can't calculate the gas, return 0 and let the - // actual call choke and fault. - if len(input) != blake2FInputLength { - return 0 - } - return uint64(binary.BigEndian.Uint32(input[0:4])) -} - -const ( - blake2FInputLength = 213 - blake2FFinalBlockBytes = byte(1) - blake2FNonFinalBlockBytes = byte(0) -) - -var ( - errBlake2FInvalidInputLength = errors.New("invalid input length") - errBlake2FInvalidFinalFlag = errors.New("invalid final flag") -) - -func (c *blake2F) Run(input []byte) ([]byte, error) { - // Make sure the input is valid (correct length and final flag) - if len(input) != blake2FInputLength { - return nil, errBlake2FInvalidInputLength - } - if input[212] != blake2FNonFinalBlockBytes && input[212] != blake2FFinalBlockBytes { - return nil, errBlake2FInvalidFinalFlag - } - // Parse the input into the Blake2b call parameters - var ( - rounds = binary.BigEndian.Uint32(input[0:4]) - final = input[212] == blake2FFinalBlockBytes - - h [8]uint64 - m [16]uint64 - t [2]uint64 - ) - for i := 0; i < 8; i++ { - offset := 4 + i*8 - h[i] = binary.LittleEndian.Uint64(input[offset : offset+8]) - } - for i := 0; i < 16; i++ { - offset := 68 + i*8 - m[i] = binary.LittleEndian.Uint64(input[offset : offset+8]) - } - t[0] = binary.LittleEndian.Uint64(input[196:204]) - t[1] = binary.LittleEndian.Uint64(input[204:212]) - - // Execute the compression function, extract and return the result - blake2b.F(&h, m, t, final, rounds) - - output := make([]byte, 64) - for i := 0; i < 8; i++ { - offset := i * 8 - binary.LittleEndian.PutUint64(output[offset:offset+8], h[i]) - } - return output, nil -} - -var ( - errBLS12381InvalidInputLength = errors.New("invalid input length") - errBLS12381InvalidFieldElementTopBytes = errors.New("invalid field element top bytes") - errBLS12381G1PointSubgroup = errors.New("g1 point is not on correct subgroup") - errBLS12381G2PointSubgroup = errors.New("g2 point is not on correct subgroup") -) - -// bls12381G1Add implements EIP-2537 G1Add precompile. -type bls12381G1Add struct{} - -// RequiredGas returns the gas required to execute the pre-compiled contract. -func (c *bls12381G1Add) RequiredGas(input []byte) uint64 { - return params.Bls12381G1AddGas -} - -func (c *bls12381G1Add) Run(input []byte) ([]byte, error) { - // Implements EIP-2537 G1Add precompile. - // > G1 addition call expects `256` bytes as an input that is interpreted as byte concatenation of two G1 points (`128` bytes each). - // > Output is an encoding of addition operation result - single G1 point (`128` bytes). - if len(input) != 256 { - return nil, errBLS12381InvalidInputLength - } - var err error - var p0, p1 *bls12381.PointG1 - - // Initialize G1 - g := bls12381.NewG1() - - // Decode G1 point p_0 - if p0, err = g.DecodePoint(input[:128]); err != nil { - return nil, err - } - // Decode G1 point p_1 - if p1, err = g.DecodePoint(input[128:]); err != nil { - return nil, err - } - - // Compute r = p_0 + p_1 - r := g.New() - g.Add(r, p0, p1) - - // Encode the G1 point result into 128 bytes - return g.EncodePoint(r), nil -} - -// bls12381G1Mul implements EIP-2537 G1Mul precompile. -type bls12381G1Mul struct{} - -// RequiredGas returns the gas required to execute the pre-compiled contract. -func (c *bls12381G1Mul) RequiredGas(input []byte) uint64 { - return params.Bls12381G1MulGas -} - -func (c *bls12381G1Mul) Run(input []byte) ([]byte, error) { - // Implements EIP-2537 G1Mul precompile. - // > G1 multiplication call expects `160` bytes as an input that is interpreted as byte concatenation of encoding of G1 point (`128` bytes) and encoding of a scalar value (`32` bytes). - // > Output is an encoding of multiplication operation result - single G1 point (`128` bytes). - if len(input) != 160 { - return nil, errBLS12381InvalidInputLength - } - var err error - var p0 *bls12381.PointG1 - - // Initialize G1 - g := bls12381.NewG1() - - // Decode G1 point - if p0, err = g.DecodePoint(input[:128]); err != nil { - return nil, err - } - // Decode scalar value - e := new(big.Int).SetBytes(input[128:]) - - // Compute r = e * p_0 - r := g.New() - g.MulScalar(r, p0, e) - - // Encode the G1 point into 128 bytes - return g.EncodePoint(r), nil -} - -// bls12381G1MultiExp implements EIP-2537 G1MultiExp precompile. -type bls12381G1MultiExp struct{} - -// RequiredGas returns the gas required to execute the pre-compiled contract. -func (c *bls12381G1MultiExp) RequiredGas(input []byte) uint64 { - // Calculate G1 point, scalar value pair length - k := len(input) / 160 - if k == 0 { - // Return 0 gas for small input length - return 0 - } - // Lookup discount value for G1 point, scalar value pair length - var discount uint64 - if dLen := len(params.Bls12381MultiExpDiscountTable); k < dLen { - discount = params.Bls12381MultiExpDiscountTable[k-1] - } else { - discount = params.Bls12381MultiExpDiscountTable[dLen-1] - } - // Calculate gas and return the result - return (uint64(k) * params.Bls12381G1MulGas * discount) / 1000 -} - -func (c *bls12381G1MultiExp) Run(input []byte) ([]byte, error) { - // Implements EIP-2537 G1MultiExp precompile. - // G1 multiplication call expects `160*k` bytes as an input that is interpreted as byte concatenation of `k` slices each of them being a byte concatenation of encoding of G1 point (`128` bytes) and encoding of a scalar value (`32` bytes). - // Output is an encoding of multiexponentiation operation result - single G1 point (`128` bytes). - k := len(input) / 160 - if len(input) == 0 || len(input)%160 != 0 { - return nil, errBLS12381InvalidInputLength - } - var err error - points := make([]*bls12381.PointG1, k) - scalars := make([]*big.Int, k) - - // Initialize G1 - g := bls12381.NewG1() - - // Decode point scalar pairs - for i := 0; i < k; i++ { - off := 160 * i - t0, t1, t2 := off, off+128, off+160 - // Decode G1 point - if points[i], err = g.DecodePoint(input[t0:t1]); err != nil { - return nil, err - } - // Decode scalar value - scalars[i] = new(big.Int).SetBytes(input[t1:t2]) - } - - // Compute r = e_0 * p_0 + e_1 * p_1 + ... + e_(k-1) * p_(k-1) - r := g.New() - g.MultiExp(r, points, scalars) - - // Encode the G1 point to 128 bytes - return g.EncodePoint(r), nil -} - -// bls12381G2Add implements EIP-2537 G2Add precompile. -type bls12381G2Add struct{} - -// RequiredGas returns the gas required to execute the pre-compiled contract. -func (c *bls12381G2Add) RequiredGas(input []byte) uint64 { - return params.Bls12381G2AddGas -} - -func (c *bls12381G2Add) Run(input []byte) ([]byte, error) { - // Implements EIP-2537 G2Add precompile. - // > G2 addition call expects `512` bytes as an input that is interpreted as byte concatenation of two G2 points (`256` bytes each). - // > Output is an encoding of addition operation result - single G2 point (`256` bytes). - if len(input) != 512 { - return nil, errBLS12381InvalidInputLength - } - var err error - var p0, p1 *bls12381.PointG2 - - // Initialize G2 - g := bls12381.NewG2() - r := g.New() - - // Decode G2 point p_0 - if p0, err = g.DecodePoint(input[:256]); err != nil { - return nil, err - } - // Decode G2 point p_1 - if p1, err = g.DecodePoint(input[256:]); err != nil { - return nil, err - } - - // Compute r = p_0 + p_1 - g.Add(r, p0, p1) - - // Encode the G2 point into 256 bytes - return g.EncodePoint(r), nil -} - -// bls12381G2Mul implements EIP-2537 G2Mul precompile. -type bls12381G2Mul struct{} - -// RequiredGas returns the gas required to execute the pre-compiled contract. -func (c *bls12381G2Mul) RequiredGas(input []byte) uint64 { - return params.Bls12381G2MulGas -} - -func (c *bls12381G2Mul) Run(input []byte) ([]byte, error) { - // Implements EIP-2537 G2MUL precompile logic. - // > G2 multiplication call expects `288` bytes as an input that is interpreted as byte concatenation of encoding of G2 point (`256` bytes) and encoding of a scalar value (`32` bytes). - // > Output is an encoding of multiplication operation result - single G2 point (`256` bytes). - if len(input) != 288 { - return nil, errBLS12381InvalidInputLength - } - var err error - var p0 *bls12381.PointG2 - - // Initialize G2 - g := bls12381.NewG2() - - // Decode G2 point - if p0, err = g.DecodePoint(input[:256]); err != nil { - return nil, err - } - // Decode scalar value - e := new(big.Int).SetBytes(input[256:]) - - // Compute r = e * p_0 - r := g.New() - g.MulScalar(r, p0, e) - - // Encode the G2 point into 256 bytes - return g.EncodePoint(r), nil -} - -// bls12381G2MultiExp implements EIP-2537 G2MultiExp precompile. -type bls12381G2MultiExp struct{} - -// RequiredGas returns the gas required to execute the pre-compiled contract. -func (c *bls12381G2MultiExp) RequiredGas(input []byte) uint64 { - // Calculate G2 point, scalar value pair length - k := len(input) / 288 - if k == 0 { - // Return 0 gas for small input length - return 0 - } - // Lookup discount value for G2 point, scalar value pair length - var discount uint64 - if dLen := len(params.Bls12381MultiExpDiscountTable); k < dLen { - discount = params.Bls12381MultiExpDiscountTable[k-1] - } else { - discount = params.Bls12381MultiExpDiscountTable[dLen-1] - } - // Calculate gas and return the result - return (uint64(k) * params.Bls12381G2MulGas * discount) / 1000 -} - -func (c *bls12381G2MultiExp) Run(input []byte) ([]byte, error) { - // Implements EIP-2537 G2MultiExp precompile logic - // > G2 multiplication call expects `288*k` bytes as an input that is interpreted as byte concatenation of `k` slices each of them being a byte concatenation of encoding of G2 point (`256` bytes) and encoding of a scalar value (`32` bytes). - // > Output is an encoding of multiexponentiation operation result - single G2 point (`256` bytes). - k := len(input) / 288 - if len(input) == 0 || len(input)%288 != 0 { - return nil, errBLS12381InvalidInputLength - } - var err error - points := make([]*bls12381.PointG2, k) - scalars := make([]*big.Int, k) - - // Initialize G2 - g := bls12381.NewG2() - - // Decode point scalar pairs - for i := 0; i < k; i++ { - off := 288 * i - t0, t1, t2 := off, off+256, off+288 - // Decode G1 point - if points[i], err = g.DecodePoint(input[t0:t1]); err != nil { - return nil, err - } - // Decode scalar value - scalars[i] = new(big.Int).SetBytes(input[t1:t2]) - } - - // Compute r = e_0 * p_0 + e_1 * p_1 + ... + e_(k-1) * p_(k-1) - r := g.New() - g.MultiExp(r, points, scalars) - - // Encode the G2 point to 256 bytes. - return g.EncodePoint(r), nil -} - -// bls12381Pairing implements EIP-2537 Pairing precompile. -type bls12381Pairing struct{} - -// RequiredGas returns the gas required to execute the pre-compiled contract. -func (c *bls12381Pairing) RequiredGas(input []byte) uint64 { - return params.Bls12381PairingBaseGas + uint64(len(input)/384)*params.Bls12381PairingPerPairGas -} - -func (c *bls12381Pairing) Run(input []byte) ([]byte, error) { - // Implements EIP-2537 Pairing precompile logic. - // > Pairing call expects `384*k` bytes as an inputs that is interpreted as byte concatenation of `k` slices. Each slice has the following structure: - // > - `128` bytes of G1 point encoding - // > - `256` bytes of G2 point encoding - // > Output is a `32` bytes where last single byte is `0x01` if pairing result is equal to multiplicative identity in a pairing target field and `0x00` otherwise - // > (which is equivalent of Big Endian encoding of Solidity values `uint256(1)` and `uin256(0)` respectively). - k := len(input) / 384 - if len(input) == 0 || len(input)%384 != 0 { - return nil, errBLS12381InvalidInputLength - } - - // Initialize BLS12-381 pairing engine - e := bls12381.NewPairingEngine() - g1, g2 := e.G1, e.G2 - - // Decode pairs - for i := 0; i < k; i++ { - off := 384 * i - t0, t1, t2 := off, off+128, off+384 - - // Decode G1 point - p1, err := g1.DecodePoint(input[t0:t1]) - if err != nil { - return nil, err - } - // Decode G2 point - p2, err := g2.DecodePoint(input[t1:t2]) - if err != nil { - return nil, err - } - - // 'point is on curve' check already done, - // Here we need to apply subgroup checks. - if !g1.InCorrectSubgroup(p1) { - return nil, errBLS12381G1PointSubgroup - } - if !g2.InCorrectSubgroup(p2) { - return nil, errBLS12381G2PointSubgroup - } - - // Update pairing engine with G1 and G2 ponits - e.AddPair(p1, p2) - } - // Prepare 32 byte output - out := make([]byte, 32) - - // Compute pairing and set the result - if e.Check() { - out[31] = 1 - } - return out, nil -} - -// decodeBLS12381FieldElement decodes BLS12-381 elliptic curve field element. -// Removes top 16 bytes of 64 byte input. -func decodeBLS12381FieldElement(in []byte) ([]byte, error) { - if len(in) != 64 { - return nil, errors.New("invalid field element length") - } - // check top bytes - for i := 0; i < 16; i++ { - if in[i] != byte(0x00) { - return nil, errBLS12381InvalidFieldElementTopBytes - } - } - out := make([]byte, 48) - copy(out[:], in[16:]) - return out, nil -} - -// bls12381MapG1 implements EIP-2537 MapG1 precompile. -type bls12381MapG1 struct{} - -// RequiredGas returns the gas required to execute the pre-compiled contract. -func (c *bls12381MapG1) RequiredGas(input []byte) uint64 { - return params.Bls12381MapG1Gas -} - -func (c *bls12381MapG1) Run(input []byte) ([]byte, error) { - // Implements EIP-2537 Map_To_G1 precompile. - // > Field-to-curve call expects `64` bytes an an input that is interpreted as a an element of the base field. - // > Output of this call is `128` bytes and is G1 point following respective encoding rules. - if len(input) != 64 { - return nil, errBLS12381InvalidInputLength - } - - // Decode input field element - fe, err := decodeBLS12381FieldElement(input) - if err != nil { - return nil, err - } - - // Initialize G1 - g := bls12381.NewG1() - - // Compute mapping - r, err := g.MapToCurve(fe) - if err != nil { - return nil, err - } - - // Encode the G1 point to 128 bytes - return g.EncodePoint(r), nil -} - -// bls12381MapG2 implements EIP-2537 MapG2 precompile. -type bls12381MapG2 struct{} - -// RequiredGas returns the gas required to execute the pre-compiled contract. -func (c *bls12381MapG2) RequiredGas(input []byte) uint64 { - return params.Bls12381MapG2Gas -} - -func (c *bls12381MapG2) Run(input []byte) ([]byte, error) { - // Implements EIP-2537 Map_FP2_TO_G2 precompile logic. - // > Field-to-curve call expects `128` bytes an an input that is interpreted as a an element of the quadratic extension field. - // > Output of this call is `256` bytes and is G2 point following respective encoding rules. - if len(input) != 128 { - return nil, errBLS12381InvalidInputLength - } - - // Decode input field element - fe := make([]byte, 96) - c0, err := decodeBLS12381FieldElement(input[:64]) - if err != nil { - return nil, err - } - copy(fe[48:], c0) - c1, err := decodeBLS12381FieldElement(input[64:]) - if err != nil { - return nil, err - } - copy(fe[:48], c1) - - // Initialize G2 - g := bls12381.NewG2() - - // Compute mapping - r, err := g.MapToCurve(fe) - if err != nil { - return nil, err - } - - // Encode the G2 point to 256 bytes - return g.EncodePoint(r), nil -} diff --git a/x/evm/vm/doc.go b/x/evm/vm/doc.go deleted file mode 100644 index 5864d0cf..00000000 --- a/x/evm/vm/doc.go +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. -// -// The go-ethereum library is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// The go-ethereum library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . - -/* -Package vm implements the Ethereum Virtual Machine. - -The vm package implements one EVM, a byte code VM. The BC (Byte Code) VM loops -over a set of bytes and executes them according to the set of rules defined -in the Ethereum yellow paper. -*/ -package vm diff --git a/x/evm/vm/eips.go b/x/evm/vm/eips.go deleted file mode 100644 index 93f5c399..00000000 --- a/x/evm/vm/eips.go +++ /dev/null @@ -1,194 +0,0 @@ -// Copyright 2019 The go-ethereum Authors -// This file is part of the go-ethereum library. -// -// The go-ethereum library is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// The go-ethereum library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . - -package vm - -import ( - "fmt" - "sort" - - "github.com/ethereum/go-ethereum/params" - "github.com/holiman/uint256" -) - -var activators = map[int]func(*JumpTable){ - 3855: enable3855, - 3529: enable3529, - 3198: enable3198, - 2929: enable2929, - 2200: enable2200, - 1884: enable1884, - 1344: enable1344, -} - -// EnableEIP enables the given EIP on the config. -// This operation writes in-place, and callers need to ensure that the globally -// defined jump tables are not polluted. -func EnableEIP(eipNum int, jt *JumpTable) error { - enablerFn, ok := activators[eipNum] - if !ok { - return fmt.Errorf("undefined eip %d", eipNum) - } - enablerFn(jt) - return nil -} - -func ValidEip(eipNum int) bool { - _, ok := activators[eipNum] - return ok -} -func ActivateableEips() []string { - var nums []string - for k := range activators { - nums = append(nums, fmt.Sprintf("%d", k)) - } - sort.Strings(nums) - return nums -} - -// enable1884 applies EIP-1884 to the given jump table: -// - Increase cost of BALANCE to 700 -// - Increase cost of EXTCODEHASH to 700 -// - Increase cost of SLOAD to 800 -// - Define SELFBALANCE, with cost GasFastStep (5) -func enable1884(jt *JumpTable) { - // Gas cost changes - jt[SLOAD].constantGas = params.SloadGasEIP1884 - jt[BALANCE].constantGas = params.BalanceGasEIP1884 - jt[EXTCODEHASH].constantGas = params.ExtcodeHashGasEIP1884 - - // New opcode - jt[SELFBALANCE] = &operation{ - execute: opSelfBalance, - constantGas: GasFastStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - } -} - -func opSelfBalance(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - balance, _ := uint256.FromBig(interpreter.evm.StateDB.GetBalance(scope.Contract.Address())) - scope.Stack.push(balance) - return nil, nil -} - -// enable1344 applies EIP-1344 (ChainID Opcode) -// - Adds an opcode that returns the current chain’s EIP-155 unique identifier -func enable1344(jt *JumpTable) { - // New opcode - jt[CHAINID] = &operation{ - execute: opChainID, - constantGas: GasQuickStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - } -} - -// opChainID implements CHAINID opcode -func opChainID(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - chainId, _ := uint256.FromBig(interpreter.evm.chainConfig.ChainID) - scope.Stack.push(chainId) - return nil, nil -} - -// enable2200 applies EIP-2200 (Rebalance net-metered SSTORE) -func enable2200(jt *JumpTable) { - jt[SLOAD].constantGas = params.SloadGasEIP2200 - jt[SSTORE].dynamicGas = gasSStoreEIP2200 -} - -// enable2929 enables "EIP-2929: Gas cost increases for state access opcodes" -// https://eips.ethereum.org/EIPS/eip-2929 -func enable2929(jt *JumpTable) { - jt[SSTORE].dynamicGas = gasSStoreEIP2929 - - jt[SLOAD].constantGas = 0 - jt[SLOAD].dynamicGas = gasSLoadEIP2929 - - jt[EXTCODECOPY].constantGas = params.WarmStorageReadCostEIP2929 - jt[EXTCODECOPY].dynamicGas = gasExtCodeCopyEIP2929 - - jt[EXTCODESIZE].constantGas = params.WarmStorageReadCostEIP2929 - jt[EXTCODESIZE].dynamicGas = gasEip2929AccountCheck - - jt[EXTCODEHASH].constantGas = params.WarmStorageReadCostEIP2929 - jt[EXTCODEHASH].dynamicGas = gasEip2929AccountCheck - - jt[BALANCE].constantGas = params.WarmStorageReadCostEIP2929 - jt[BALANCE].dynamicGas = gasEip2929AccountCheck - - jt[CALL].constantGas = params.WarmStorageReadCostEIP2929 - jt[CALL].dynamicGas = gasCallEIP2929 - - jt[CALLCODE].constantGas = params.WarmStorageReadCostEIP2929 - jt[CALLCODE].dynamicGas = gasCallCodeEIP2929 - - jt[STATICCALL].constantGas = params.WarmStorageReadCostEIP2929 - jt[STATICCALL].dynamicGas = gasStaticCallEIP2929 - - jt[DELEGATECALL].constantGas = params.WarmStorageReadCostEIP2929 - jt[DELEGATECALL].dynamicGas = gasDelegateCallEIP2929 - - // This was previously part of the dynamic cost, but we're using it as a constantGas - // factor here - jt[SELFDESTRUCT].constantGas = params.SelfdestructGasEIP150 - jt[SELFDESTRUCT].dynamicGas = gasSelfdestructEIP2929 -} - -// enable3529 enabled "EIP-3529: Reduction in refunds": -// - Removes refunds for selfdestructs -// - Reduces refunds for SSTORE -// - Reduces max refunds to 20% gas -func enable3529(jt *JumpTable) { - jt[SSTORE].dynamicGas = gasSStoreEIP3529 - jt[SELFDESTRUCT].dynamicGas = gasSelfdestructEIP3529 -} - -// enable3198 applies EIP-3198 (BASEFEE Opcode) -// - Adds an opcode that returns the current block's base fee. -func enable3198(jt *JumpTable) { - // New opcode - jt[BASEFEE] = &operation{ - execute: opBaseFee, - constantGas: GasQuickStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - } -} - -// opBaseFee implements BASEFEE opcode -func opBaseFee(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - baseFee, _ := uint256.FromBig(interpreter.evm.Context.BaseFee) - scope.Stack.push(baseFee) - return nil, nil -} - -// enable3855 applies EIP-3855 (PUSH0 opcode) -func enable3855(jt *JumpTable) { - // New opcode - jt[PUSH0] = &operation{ - execute: opPush0, - constantGas: GasQuickStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - } -} - -// opPush0 implements the PUSH0 opcode -func opPush0(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - scope.Stack.push(new(uint256.Int)) - return nil, nil -} diff --git a/x/evm/vm/errors.go b/x/evm/vm/errors.go deleted file mode 100644 index 004f8ef1..00000000 --- a/x/evm/vm/errors.go +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. -// -// The go-ethereum library is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// The go-ethereum library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . - -package vm - -import ( - "errors" - "fmt" -) - -// List evm execution errors -var ( - ErrOutOfGas = errors.New("out of gas") - ErrCodeStoreOutOfGas = errors.New("contract creation code storage out of gas") - ErrDepth = errors.New("max call depth exceeded") - ErrInsufficientBalance = errors.New("insufficient balance for transfer") - ErrContractAddressCollision = errors.New("contract address collision") - ErrExecutionReverted = errors.New("execution reverted") - ErrMaxCodeSizeExceeded = errors.New("max code size exceeded") - ErrInvalidJump = errors.New("invalid jump destination") - ErrWriteProtection = errors.New("write protection") - ErrReturnDataOutOfBounds = errors.New("return data out of bounds") - ErrGasUintOverflow = errors.New("gas uint64 overflow") - ErrInvalidCode = errors.New("invalid code: must not begin with 0xef") - ErrNonceUintOverflow = errors.New("nonce uint64 overflow") - - // errStopToken is an internal token indicating interpreter loop termination, - // never returned to outside callers. - errStopToken = errors.New("stop token") -) - -// ErrStackUnderflow wraps an evm error when the items on the stack less -// than the minimal requirement. -type ErrStackUnderflow struct { - stackLen int - required int -} - -func (e *ErrStackUnderflow) Error() string { - return fmt.Sprintf("stack underflow (%d <=> %d)", e.stackLen, e.required) -} - -// ErrStackOverflow wraps an evm error when the items on the stack exceeds -// the maximum allowance. -type ErrStackOverflow struct { - stackLen int - limit int -} - -func (e *ErrStackOverflow) Error() string { - return fmt.Sprintf("stack limit reached %d (%d)", e.stackLen, e.limit) -} - -// ErrInvalidOpCode wraps an evm error when an invalid opcode is encountered. -type ErrInvalidOpCode struct { - opcode OpCode -} - -func (e *ErrInvalidOpCode) Error() string { return fmt.Sprintf("invalid opcode: %s", e.opcode) } diff --git a/x/evm/vm/evm.go b/x/evm/vm/evm.go deleted file mode 100644 index 84df83cb..00000000 --- a/x/evm/vm/evm.go +++ /dev/null @@ -1,630 +0,0 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. -// -// The go-ethereum library is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// The go-ethereum library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . - -package vm - -import ( - "math/big" - "sync/atomic" - "time" - - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/consensus" - "github.com/ethereum/go-ethereum/core" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/params" - "github.com/holiman/uint256" -) - -// emptyCodeHash is used by create to ensure deployment is disallowed to already -// deployed contract addresses (relevant after the account abstraction). -var emptyCodeHash = crypto.Keccak256Hash(nil) - -type ( - // CanTransferFunc is the signature of a transfer guard function - CanTransferFunc func(StateDB, common.Address, *big.Int) bool - // TransferFunc is the signature of a transfer function - TransferFunc func(StateDB, common.Address, common.Address, *big.Int) - // GetHashFunc returns the n'th block hash in the blockchain - // and is used by the BLOCKHASH EVM op code. - GetHashFunc func(uint64) common.Hash - - // custom - // PrepayFunc execute prepay with provided data in PREPAY OpCode - PrepayFunc func(evm *EVM, from, beneficiary common.Address, amount *big.Int, gas uint64) (*big.Int, uint64, error) -) - -func (evm *EVM) precompile(addr common.Address) (PrecompiledContract, bool) { - var precompiles map[common.Address]PrecompiledContract - switch { - case evm.chainRules.IsBerlin: - precompiles = PrecompiledContractsBerlin - case evm.chainRules.IsIstanbul: - precompiles = PrecompiledContractsIstanbul - case evm.chainRules.IsByzantium: - precompiles = PrecompiledContractsByzantium - default: - precompiles = PrecompiledContractsHomestead - } - p, ok := precompiles[addr] - return p, ok -} - -// BlockContext provides the EVM with auxiliary information. Once provided -// it shouldn't be modified. -type BlockContext struct { - // CanTransfer returns whether the account contains - // sufficient ether to transfer the value - CanTransfer CanTransferFunc - // Transfer transfers ether from one account to the other - Transfer TransferFunc - // GetHash returns the hash corresponding to n - GetHash GetHashFunc - // Prepay execute prepay with given context - Prepay PrepayFunc - - // Block information - Coinbase common.Address // Provides information for COINBASE - GasLimit uint64 // Provides information for GASLIMIT - BlockNumber *big.Int // Provides information for NUMBER - Time *big.Int // Provides information for TIME - Difficulty *big.Int // Provides information for DIFFICULTY - BaseFee *big.Int // Provides information for BASEFEE - Random *common.Hash // Provides information for RANDOM -} - -// TxContext provides the EVM with information about a transaction. -// All fields can change between transactions. -type TxContext struct { - // Message information - Origin common.Address // Provides information for ORIGIN - GasPrice *big.Int // Provides information for GASPRICE -} - -// EVM is the Ethereum Virtual Machine base object and provides -// the necessary tools to run a contract on the given state with -// the provided context. It should be noted that any error -// generated through any of the calls should be considered a -// revert-state-and-consume-all-gas operation, no checks on -// specific errors should ever be performed. The interpreter makes -// sure that any errors generated are to be considered faulty code. -// -// The EVM should never be reused and is not thread safe. -type EVM struct { - // Context provides auxiliary blockchain related information - Context BlockContext - TxContext - // StateDB gives access to the underlying state - StateDB StateDB - // Depth is the current call stack - depth int - - // chainConfig contains information about the current chain - chainConfig *params.ChainConfig - // chain rules contains the chain rules for the current epoch - chainRules params.Rules - // virtual machine configuration options used to initialise the - // evm. - Config Config - // global (to this context) ethereum virtual machine - // used throughout the execution of the tx. - interpreter *EVMInterpreter - // abort is used to abort the EVM calling operations - // NOTE: must be set atomically - abort int32 - // callGasTemp holds the gas available for the current call. This is needed because the - // available gas is calculated in gasCall* according to the 63/64 rule and later - // applied in opCall*. - callGasTemp uint64 - // genesisContractVerifier verifies is contract is trusted in order to allow curtain opcodes - genesisContractVerifier *GenesisContractVerifier -} - -// NewEVM returns a new EVM. The returned EVM is not thread safe and should -// only ever be used *once*. -func NewEVM(blockCtx BlockContext, txCtx TxContext, statedb StateDB, chainConfig *params.ChainConfig, config Config, genesisContractVerifier *GenesisContractVerifier) *EVM { - evm := &EVM{ - Context: blockCtx, - TxContext: txCtx, - StateDB: statedb, - Config: config, - chainConfig: chainConfig, - chainRules: chainConfig.Rules(blockCtx.BlockNumber, blockCtx.Random != nil), - genesisContractVerifier: genesisContractVerifier, - } - evm.interpreter = NewEVMInterpreter(evm, config) - return evm -} - -// Reset resets the EVM with a new transaction context.Reset -// This is not threadsafe and should only be done very cautiously. -func (evm *EVM) Reset(txCtx TxContext, statedb StateDB) { - evm.TxContext = txCtx - evm.StateDB = statedb -} - -// Cancel cancels any running EVM operation. This may be called concurrently and -// it's safe to be called multiple times. -func (evm *EVM) Cancel() { - atomic.StoreInt32(&evm.abort, 1) -} - -// Cancelled returns true if Cancel has been called -func (evm *EVM) Cancelled() bool { - return atomic.LoadInt32(&evm.abort) == 1 -} - -// Interpreter returns the current interpreter -func (evm *EVM) Interpreter() *EVMInterpreter { - return evm.interpreter -} - -// Call executes the contract associated with the addr with the given input as -// parameters. It also handles any necessary value transfer required and takes -// the necessary steps to create accounts and reverses the state in case of an -// execution error or failed value transfer. -func (evm *EVM) Call(caller ContractRef, addr common.Address, input []byte, gas uint64, value *big.Int) (ret []byte, leftOverGas uint64, err error) { - // Fail if we're trying to execute above the call depth limit - if evm.depth > int(params.CallCreateDepth) { - return nil, gas, ErrDepth - } - // Fail if we're trying to transfer more than the available balance - if value.Sign() != 0 && !evm.Context.CanTransfer(evm.StateDB, caller.Address(), value) { - return nil, gas, ErrInsufficientBalance - } - snapshot := evm.StateDB.Snapshot() - p, isPrecompile := evm.precompile(addr) - - if !evm.StateDB.Exist(addr) { - if !isPrecompile && evm.chainRules.IsEIP158 && value.Sign() == 0 { - // Calling a non existing account, don't do anything, but ping the tracer - if evm.Config.Debug { - if evm.depth == 0 { - evm.Config.Tracer.CaptureStart(evm, caller.Address(), addr, false, input, gas, value) - evm.Config.Tracer.CaptureEnd(ret, 0, 0, nil) - } else { - evm.Config.Tracer.CaptureEnter(CALL, caller.Address(), addr, input, gas, value) - evm.Config.Tracer.CaptureExit(ret, 0, nil) - } - } - return nil, gas, nil - } - evm.StateDB.CreateAccount(addr) - } - evm.Context.Transfer(evm.StateDB, caller.Address(), addr, value) - - // Capture the tracer start/end events in debug mode - if evm.Config.Debug { - if evm.depth == 0 { - evm.Config.Tracer.CaptureStart(evm, caller.Address(), addr, false, input, gas, value) - defer func(startGas uint64, startTime time.Time) { // Lazy evaluation of the parameters - evm.Config.Tracer.CaptureEnd(ret, startGas-gas, time.Since(startTime), err) - }(gas, time.Now()) - } else { - // Handle tracer events for entering and exiting a call frame - evm.Config.Tracer.CaptureEnter(CALL, caller.Address(), addr, input, gas, value) - defer func(startGas uint64) { - evm.Config.Tracer.CaptureExit(ret, startGas-gas, err) - }(gas) - } - } - - if isPrecompile { - ret, gas, err = RunPrecompiledContract(p, input, gas) - } else { - // Initialise a new contract and set the code that is to be used by the EVM. - // The contract is a scoped environment for this execution context only. - code := evm.StateDB.GetCode(addr) - if len(code) == 0 { - ret, err = nil, nil // gas is unchanged - } else { - addrCopy := addr - // If the account has no code, we can abort here - // The depth-check is already done, and precompiles handled above - contract := NewContract(caller, AccountRef(addrCopy), value, gas) - contract.SetCallCode(&addrCopy, evm.StateDB.GetCodeHash(addrCopy), code) - ret, err = evm.interpreter.Run(contract, input, false) - gas = contract.Gas - } - } - // When an error was returned by the EVM or when setting the creation code - // above we revert to the snapshot and consume any gas remaining. Additionally - // when we're in homestead this also counts for code storage gas errors. - if err != nil { - evm.StateDB.RevertToSnapshot(snapshot) - if err != ErrExecutionReverted { - gas = 0 - } - // TODO: consider clearing up unused snapshots: - //} else { - // evm.StateDB.DiscardSnapshot(snapshot) - } - return ret, gas, err -} - -// CallCode executes the contract associated with the addr with the given input -// as parameters. It also handles any necessary value transfer required and takes -// the necessary steps to create accounts and reverses the state in case of an -// execution error or failed value transfer. -// -// CallCode differs from Call in the sense that it executes the given address' -// code with the caller as context. -func (evm *EVM) CallCode(caller ContractRef, addr common.Address, input []byte, gas uint64, value *big.Int) (ret []byte, leftOverGas uint64, err error) { - // Fail if we're trying to execute above the call depth limit - if evm.depth > int(params.CallCreateDepth) { - return nil, gas, ErrDepth - } - // Fail if we're trying to transfer more than the available balance - // Note although it's noop to transfer X ether to caller itself. But - // if caller doesn't have enough balance, it would be an error to allow - // over-charging itself. So the check here is necessary. - if !evm.Context.CanTransfer(evm.StateDB, caller.Address(), value) { - return nil, gas, ErrInsufficientBalance - } - var snapshot = evm.StateDB.Snapshot() - - // Invoke tracer hooks that signal entering/exiting a call frame - if evm.Config.Debug { - evm.Config.Tracer.CaptureEnter(CALLCODE, caller.Address(), addr, input, gas, value) - defer func(startGas uint64) { - evm.Config.Tracer.CaptureExit(ret, startGas-gas, err) - }(gas) - } - - // It is allowed to call precompiles, even via delegatecall - if p, isPrecompile := evm.precompile(addr); isPrecompile { - ret, gas, err = RunPrecompiledContract(p, input, gas) - } else { - addrCopy := addr - // Initialise a new contract and set the code that is to be used by the EVM. - // The contract is a scoped environment for this execution context only. - contract := NewContract(caller, AccountRef(caller.Address()), value, gas) - contract.SetCallCode(&addrCopy, evm.StateDB.GetCodeHash(addrCopy), evm.StateDB.GetCode(addrCopy)) - ret, err = evm.interpreter.Run(contract, input, false) - gas = contract.Gas - } - if err != nil { - evm.StateDB.RevertToSnapshot(snapshot) - if err != ErrExecutionReverted { - gas = 0 - } - } - return ret, gas, err -} - -// DelegateCall executes the contract associated with the addr with the given input -// as parameters. It reverses the state in case of an execution error. -// -// DelegateCall differs from CallCode in the sense that it executes the given address' -// code with the caller as context and the caller is set to the caller of the caller. -func (evm *EVM) DelegateCall(caller ContractRef, addr common.Address, input []byte, gas uint64) (ret []byte, leftOverGas uint64, err error) { - // Fail if we're trying to execute above the call depth limit - if evm.depth > int(params.CallCreateDepth) { - return nil, gas, ErrDepth - } - var snapshot = evm.StateDB.Snapshot() - - // Invoke tracer hooks that signal entering/exiting a call frame - if evm.Config.Debug { - evm.Config.Tracer.CaptureEnter(DELEGATECALL, caller.Address(), addr, input, gas, nil) - defer func(startGas uint64) { - evm.Config.Tracer.CaptureExit(ret, startGas-gas, err) - }(gas) - } - - // It is allowed to call precompiles, even via delegatecall - if p, isPrecompile := evm.precompile(addr); isPrecompile { - ret, gas, err = RunPrecompiledContract(p, input, gas) - } else { - addrCopy := addr - // Initialise a new contract and make initialise the delegate values - contract := NewContract(caller, AccountRef(caller.Address()), nil, gas).AsDelegate() - contract.SetCallCode(&addrCopy, evm.StateDB.GetCodeHash(addrCopy), evm.StateDB.GetCode(addrCopy)) - ret, err = evm.interpreter.Run(contract, input, false) - gas = contract.Gas - } - if err != nil { - evm.StateDB.RevertToSnapshot(snapshot) - if err != ErrExecutionReverted { - gas = 0 - } - } - return ret, gas, err -} - -// StaticCall executes the contract associated with the addr with the given input -// as parameters while disallowing any modifications to the state during the call. -// Opcodes that attempt to perform such modifications will result in exceptions -// instead of performing the modifications. -func (evm *EVM) StaticCall(caller ContractRef, addr common.Address, input []byte, gas uint64) (ret []byte, leftOverGas uint64, err error) { - // Fail if we're trying to execute above the call depth limit - if evm.depth > int(params.CallCreateDepth) { - return nil, gas, ErrDepth - } - // We take a snapshot here. This is a bit counter-intuitive, and could probably be skipped. - // However, even a staticcall is considered a 'touch'. On mainnet, static calls were introduced - // after all empty accounts were deleted, so this is not required. However, if we omit this, - // then certain tests start failing; stRevertTest/RevertPrecompiledTouchExactOOG.json. - // We could change this, but for now it's left for legacy reasons - var snapshot = evm.StateDB.Snapshot() - - // We do an AddBalance of zero here, just in order to trigger a touch. - // This doesn't matter on Mainnet, where all empties are gone at the time of Byzantium, - // but is the correct thing to do and matters on other networks, in tests, and potential - // future scenarios - evm.StateDB.AddBalance(addr, big0) - - // Invoke tracer hooks that signal entering/exiting a call frame - if evm.Config.Debug { - evm.Config.Tracer.CaptureEnter(STATICCALL, caller.Address(), addr, input, gas, nil) - defer func(startGas uint64) { - evm.Config.Tracer.CaptureExit(ret, startGas-gas, err) - }(gas) - } - - if p, isPrecompile := evm.precompile(addr); isPrecompile { - ret, gas, err = RunPrecompiledContract(p, input, gas) - } else { - // At this point, we use a copy of address. If we don't, the go compiler will - // leak the 'contract' to the outer scope, and make allocation for 'contract' - // even if the actual execution ends on RunPrecompiled above. - addrCopy := addr - // Initialise a new contract and set the code that is to be used by the EVM. - // The contract is a scoped environment for this execution context only. - contract := NewContract(caller, AccountRef(addrCopy), new(big.Int), gas) - contract.SetCallCode(&addrCopy, evm.StateDB.GetCodeHash(addrCopy), evm.StateDB.GetCode(addrCopy)) - // When an error was returned by the EVM or when setting the creation code - // above we revert to the snapshot and consume any gas remaining. Additionally - // when we're in Homestead this also counts for code storage gas errors. - ret, err = evm.interpreter.Run(contract, input, true) - gas = contract.Gas - } - if err != nil { - evm.StateDB.RevertToSnapshot(snapshot) - if err != ErrExecutionReverted { - gas = 0 - } - } - return ret, gas, err -} - -type codeAndHash struct { - code []byte - hash common.Hash -} - -func (c *codeAndHash) Hash() common.Hash { - if c.hash == (common.Hash{}) { - c.hash = crypto.Keccak256Hash(c.code) - } - return c.hash -} - -// create creates a new contract using code as deployment code. -func (evm *EVM) create(caller ContractRef, codeAndHash *codeAndHash, gas uint64, value *big.Int, address common.Address, typ OpCode) ([]byte, common.Address, uint64, error) { - // Depth check execution. Fail if we're trying to execute above the - // limit. - if evm.depth > int(params.CallCreateDepth) { - return nil, common.Address{}, gas, ErrDepth - } - if !evm.Context.CanTransfer(evm.StateDB, caller.Address(), value) { - return nil, common.Address{}, gas, ErrInsufficientBalance - } - nonce := evm.StateDB.GetNonce(caller.Address()) - if nonce+1 < nonce { - return nil, common.Address{}, gas, ErrNonceUintOverflow - } - evm.StateDB.SetNonce(caller.Address(), nonce+1) - // We add this to the access list _before_ taking a snapshot. Even if the creation fails, - // the access-list change should not be rolled back - if evm.chainRules.IsBerlin { - evm.StateDB.AddAddressToAccessList(address) - } - // Ensure there's no existing contract already at the designated address - contractHash := evm.StateDB.GetCodeHash(address) - if evm.StateDB.GetNonce(address) != 0 || (contractHash != (common.Hash{}) && contractHash != emptyCodeHash) { - return nil, common.Address{}, 0, ErrContractAddressCollision - } - // Create a new account on the state - snapshot := evm.StateDB.Snapshot() - evm.StateDB.CreateAccount(address) - if evm.chainRules.IsEIP158 { - evm.StateDB.SetNonce(address, 1) - } - evm.Context.Transfer(evm.StateDB, caller.Address(), address, value) - - // Initialise a new contract and set the code that is to be used by the EVM. - // The contract is a scoped environment for this execution context only. - contract := NewContract(caller, AccountRef(address), value, gas) - contract.SetCodeOptionalHash(&address, codeAndHash) - - if evm.Config.Debug { - if evm.depth == 0 { - evm.Config.Tracer.CaptureStart(evm, caller.Address(), address, true, codeAndHash.code, gas, value) - } else { - evm.Config.Tracer.CaptureEnter(typ, caller.Address(), address, codeAndHash.code, gas, value) - } - } - - start := time.Now() - - ret, err := evm.interpreter.Run(contract, nil, false) - - // Check whether the max code size has been exceeded, assign err if the case. - if err == nil && evm.chainRules.IsEIP158 && len(ret) > params.MaxCodeSize { - err = ErrMaxCodeSizeExceeded - } - - // Reject code starting with 0xEF if EIP-3541 is enabled. - if err == nil && len(ret) >= 1 && ret[0] == 0xEF && evm.chainRules.IsLondon { - err = ErrInvalidCode - } - - // if the contract creation ran successfully and no errors were returned - // calculate the gas required to store the code. If the code could not - // be stored due to not enough gas set an error and let it be handled - // by the error checking condition below. - if err == nil { - createDataGas := uint64(len(ret)) * params.CreateDataGas - if contract.UseGas(createDataGas) { - evm.StateDB.SetCode(address, ret) - } else { - err = ErrCodeStoreOutOfGas - } - } - - // When an error was returned by the EVM or when setting the creation code - // above we revert to the snapshot and consume any gas remaining. Additionally - // when we're in homestead this also counts for code storage gas errors. - if err != nil && (evm.chainRules.IsHomestead || err != ErrCodeStoreOutOfGas) { - evm.StateDB.RevertToSnapshot(snapshot) - if err != ErrExecutionReverted { - contract.UseGas(contract.Gas) - } - } - - if evm.Config.Debug { - if evm.depth == 0 { - evm.Config.Tracer.CaptureEnd(ret, gas-contract.Gas, time.Since(start), err) - } else { - evm.Config.Tracer.CaptureExit(ret, gas-contract.Gas, err) - } - } - return ret, address, contract.Gas, err -} - -// Create creates a new contract using code as deployment code. -func (evm *EVM) Create(caller ContractRef, code []byte, gas uint64, value *big.Int) (ret []byte, contractAddr common.Address, leftOverGas uint64, err error) { - contractAddr = crypto.CreateAddress(caller.Address(), evm.StateDB.GetNonce(caller.Address())) - return evm.create(caller, &codeAndHash{code: code}, gas, value, contractAddr, CREATE) -} - -// Create2 creates a new contract using code as deployment code. -// -// The different between Create2 with Create is Create2 uses keccak256(0xff ++ msg.sender ++ salt ++ keccak256(init_code))[12:] -// instead of the usual sender-and-nonce-hash as the address where the contract is initialized at. -func (evm *EVM) Create2(caller ContractRef, code []byte, gas uint64, endowment *big.Int, salt *uint256.Int) (ret []byte, contractAddr common.Address, leftOverGas uint64, err error) { - codeAndHash := &codeAndHash{code: code} - contractAddr = crypto.CreateAddress2(caller.Address(), salt.Bytes32(), codeAndHash.Hash().Bytes()) - return evm.create(caller, codeAndHash, gas, endowment, contractAddr, CREATE2) -} - -// ChainConfig returns the environment's chain configuration -func (evm *EVM) ChainConfig() *params.ChainConfig { return evm.chainConfig } - -// ChainContext supports retrieving headers and consensus parameters from the -// current blockchain to be used during transaction processing. -type ChainContext interface { - // Engine retrieves the chain's consensus engine. - Engine() consensus.Engine - - // GetHeader returns the header corresponding to the hash/number argument pair. - GetHeader(common.Hash, uint64) *types.Header -} - -// NewEVMBlockContext creates a new context for use in the EVM. -func NewEVMBlockContext(header *types.Header, chain ChainContext, author *common.Address) BlockContext { - var ( - beneficiary common.Address - baseFee *big.Int - random *common.Hash - ) - - // If we don't have an explicit author (i.e. not mining), extract from the header - if author == nil { - beneficiary, _ = chain.Engine().Author(header) // Ignore error, we're past header validation - } else { - beneficiary = *author - } - if header.BaseFee != nil { - baseFee = new(big.Int).Set(header.BaseFee) - } - if header.Difficulty.Cmp(common.Big0) == 0 { - random = &header.MixDigest - } - return BlockContext{ - CanTransfer: CanTransfer, - Transfer: Transfer, - GetHash: GetHashFn(header, chain), - Coinbase: beneficiary, - BlockNumber: new(big.Int).Set(header.Number), - Time: new(big.Int).SetUint64(header.Time), - Difficulty: new(big.Int).Set(header.Difficulty), - BaseFee: baseFee, - GasLimit: header.GasLimit, - Random: random, - } -} - -// NewEVMTxContext creates a new transaction context for a single transaction. -func NewEVMTxContext(msg core.Message) TxContext { - return TxContext{ - Origin: msg.From(), - GasPrice: new(big.Int).Set(msg.GasPrice()), - } -} - -// GetHashFn returns a GetHashFunc which retrieves header hashes by number -func GetHashFn(ref *types.Header, chain ChainContext) func(n uint64) common.Hash { - // Cache will initially contain [refHash.parent], - // Then fill up with [refHash.p, refHash.pp, refHash.ppp, ...] - var cache []common.Hash - - return func(n uint64) common.Hash { - if ref.Number.Uint64() <= n { - // This situation can happen if we're doing tracing and using - // block overrides. - return common.Hash{} - } - // If there's no hash cache yet, make one - if len(cache) == 0 { - cache = append(cache, ref.ParentHash) - } - if idx := ref.Number.Uint64() - n - 1; idx < uint64(len(cache)) { - return cache[idx] - } - // No luck in the cache, but we can start iterating from the last element we already know - lastKnownHash := cache[len(cache)-1] - lastKnownNumber := ref.Number.Uint64() - uint64(len(cache)) - - for { - header := chain.GetHeader(lastKnownHash, lastKnownNumber) - if header == nil { - break - } - cache = append(cache, header.ParentHash) - lastKnownHash = header.ParentHash - lastKnownNumber = header.Number.Uint64() - 1 - if n == lastKnownNumber { - return lastKnownHash - } - } - return common.Hash{} - } -} - -// CanTransfer checks whether there are enough funds in the address' account to make a transfer. -// This does not take the necessary gas in to account to make the transfer valid. -func CanTransfer(db StateDB, addr common.Address, amount *big.Int) bool { - return db.GetBalance(addr).Cmp(amount) >= 0 -} - -// Transfer subtracts amount from sender and adds amount to recipient using the given Db -func Transfer(db StateDB, sender, recipient common.Address, amount *big.Int) { - db.SubBalance(sender, amount) - db.AddBalance(recipient, amount) -} diff --git a/x/evm/vm/gas.go b/x/evm/vm/gas.go deleted file mode 100644 index 10465d1f..00000000 --- a/x/evm/vm/gas.go +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. -// -// The go-ethereum library is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// The go-ethereum library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . - -package vm - -import ( - "github.com/holiman/uint256" -) - -// Gas costs -const ( - GasQuickStep uint64 = 2 - GasFastestStep uint64 = 3 - GasFastStep uint64 = 5 - GasMidStep uint64 = 8 - GasSlowStep uint64 = 10 - GasExtStep uint64 = 20 -) - -// Stos keeper gas costs -const ( - CallGasPrepay uint64 = 30 - ReturnGasPrepay uint64 = 50_000 -) - -// callGas returns the actual gas cost of the call. -// -// The cost of gas was changed during the homestead price change HF. -// As part of EIP 150 (TangerineWhistle), the returned gas is gas - base * 63 / 64. -func callGas(isEip150 bool, availableGas, base uint64, callCost *uint256.Int) (uint64, error) { - if isEip150 { - availableGas = availableGas - base - gas := availableGas - availableGas/64 - // If the bit length exceeds 64 bit we know that the newly calculated "gas" for EIP150 - // is smaller than the requested amount. Therefore we return the new gas instead - // of returning an error. - if !callCost.IsUint64() || gas < callCost.Uint64() { - return gas, nil - } - } - if !callCost.IsUint64() { - return 0, ErrGasUintOverflow - } - - return callCost.Uint64(), nil -} diff --git a/x/evm/vm/gas_table.go b/x/evm/vm/gas_table.go deleted file mode 100644 index 1f0c0d9b..00000000 --- a/x/evm/vm/gas_table.go +++ /dev/null @@ -1,458 +0,0 @@ -// Copyright 2017 The go-ethereum Authors -// This file is part of the go-ethereum library. -// -// The go-ethereum library is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// The go-ethereum library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . - -package vm - -import ( - "errors" - - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/math" - "github.com/ethereum/go-ethereum/params" -) - -// memoryGasCost calculates the quadratic gas for memory expansion. It does so -// only for the memory region that is expanded, not the total memory. -func memoryGasCost(mem *Memory, newMemSize uint64) (uint64, error) { - if newMemSize == 0 { - return 0, nil - } - // The maximum that will fit in a uint64 is max_word_count - 1. Anything above - // that will result in an overflow. Additionally, a newMemSize which results in - // a newMemSizeWords larger than 0xFFFFFFFF will cause the square operation to - // overflow. The constant 0x1FFFFFFFE0 is the highest number that can be used - // without overflowing the gas calculation. - if newMemSize > 0x1FFFFFFFE0 { - return 0, ErrGasUintOverflow - } - newMemSizeWords := toWordSize(newMemSize) - newMemSize = newMemSizeWords * 32 - - if newMemSize > uint64(mem.Len()) { - square := newMemSizeWords * newMemSizeWords - linCoef := newMemSizeWords * params.MemoryGas - quadCoef := square / params.QuadCoeffDiv - newTotalFee := linCoef + quadCoef - - fee := newTotalFee - mem.lastGasCost - mem.lastGasCost = newTotalFee - - return fee, nil - } - return 0, nil -} - -// memoryCopierGas creates the gas functions for the following opcodes, and takes -// the stack position of the operand which determines the size of the data to copy -// as argument: -// CALLDATACOPY (stack position 2) -// CODECOPY (stack position 2) -// EXTCODECOPY (stack position 3) -// RETURNDATACOPY (stack position 2) -func memoryCopierGas(stackpos int) gasFunc { - return func(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { - // Gas for expanding the memory - gas, err := memoryGasCost(mem, memorySize) - if err != nil { - return 0, err - } - // And gas for copying data, charged per word at param.CopyGas - words, overflow := stack.Back(stackpos).Uint64WithOverflow() - if overflow { - return 0, ErrGasUintOverflow - } - - if words, overflow = math.SafeMul(toWordSize(words), params.CopyGas); overflow { - return 0, ErrGasUintOverflow - } - - if gas, overflow = math.SafeAdd(gas, words); overflow { - return 0, ErrGasUintOverflow - } - return gas, nil - } -} - -var ( - gasCallDataCopy = memoryCopierGas(2) - gasCodeCopy = memoryCopierGas(2) - gasExtCodeCopy = memoryCopierGas(3) - gasReturnDataCopy = memoryCopierGas(2) -) - -func gasSStore(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { - var ( - y, x = stack.Back(1), stack.Back(0) - current = evm.StateDB.GetState(contract.Address(), x.Bytes32()) - ) - // The legacy gas metering only takes into consideration the current state - // Legacy rules should be applied if we are in Petersburg (removal of EIP-1283) - // OR Constantinople is not active - if evm.chainRules.IsPetersburg || !evm.chainRules.IsConstantinople { - // This checks for 3 scenario's and calculates gas accordingly: - // - // 1. From a zero-value address to a non-zero value (NEW VALUE) - // 2. From a non-zero value address to a zero-value address (DELETE) - // 3. From a non-zero to a non-zero (CHANGE) - switch { - case current == (common.Hash{}) && y.Sign() != 0: // 0 => non 0 - return params.SstoreSetGas, nil - case current != (common.Hash{}) && y.Sign() == 0: // non 0 => 0 - evm.StateDB.AddRefund(params.SstoreRefundGas) - return params.SstoreClearGas, nil - default: // non 0 => non 0 (or 0 => 0) - return params.SstoreResetGas, nil - } - } - // The new gas metering is based on net gas costs (EIP-1283): - // - // 1. If current value equals new value (this is a no-op), 200 gas is deducted. - // 2. If current value does not equal new value - // 2.1. If original value equals current value (this storage slot has not been changed by the current execution context) - // 2.1.1. If original value is 0, 20000 gas is deducted. - // 2.1.2. Otherwise, 5000 gas is deducted. If new value is 0, add 15000 gas to refund counter. - // 2.2. If original value does not equal current value (this storage slot is dirty), 200 gas is deducted. Apply both of the following clauses. - // 2.2.1. If original value is not 0 - // 2.2.1.1. If current value is 0 (also means that new value is not 0), remove 15000 gas from refund counter. We can prove that refund counter will never go below 0. - // 2.2.1.2. If new value is 0 (also means that current value is not 0), add 15000 gas to refund counter. - // 2.2.2. If original value equals new value (this storage slot is reset) - // 2.2.2.1. If original value is 0, add 19800 gas to refund counter. - // 2.2.2.2. Otherwise, add 4800 gas to refund counter. - value := common.Hash(y.Bytes32()) - if current == value { // noop (1) - return params.NetSstoreNoopGas, nil - } - original := evm.StateDB.GetCommittedState(contract.Address(), x.Bytes32()) - if original == current { - if original == (common.Hash{}) { // create slot (2.1.1) - return params.NetSstoreInitGas, nil - } - if value == (common.Hash{}) { // delete slot (2.1.2b) - evm.StateDB.AddRefund(params.NetSstoreClearRefund) - } - return params.NetSstoreCleanGas, nil // write existing slot (2.1.2) - } - if original != (common.Hash{}) { - if current == (common.Hash{}) { // recreate slot (2.2.1.1) - evm.StateDB.SubRefund(params.NetSstoreClearRefund) - } else if value == (common.Hash{}) { // delete slot (2.2.1.2) - evm.StateDB.AddRefund(params.NetSstoreClearRefund) - } - } - if original == value { - if original == (common.Hash{}) { // reset to original inexistent slot (2.2.2.1) - evm.StateDB.AddRefund(params.NetSstoreResetClearRefund) - } else { // reset to original existing slot (2.2.2.2) - evm.StateDB.AddRefund(params.NetSstoreResetRefund) - } - } - return params.NetSstoreDirtyGas, nil -} - -// 0. If *gasleft* is less than or equal to 2300, fail the current call. -// 1. If current value equals new value (this is a no-op), SLOAD_GAS is deducted. -// 2. If current value does not equal new value: -// 2.1. If original value equals current value (this storage slot has not been changed by the current execution context): -// 2.1.1. If original value is 0, SSTORE_SET_GAS (20K) gas is deducted. -// 2.1.2. Otherwise, SSTORE_RESET_GAS gas is deducted. If new value is 0, add SSTORE_CLEARS_SCHEDULE to refund counter. -// 2.2. If original value does not equal current value (this storage slot is dirty), SLOAD_GAS gas is deducted. Apply both of the following clauses: -// 2.2.1. If original value is not 0: -// 2.2.1.1. If current value is 0 (also means that new value is not 0), subtract SSTORE_CLEARS_SCHEDULE gas from refund counter. -// 2.2.1.2. If new value is 0 (also means that current value is not 0), add SSTORE_CLEARS_SCHEDULE gas to refund counter. -// 2.2.2. If original value equals new value (this storage slot is reset): -// 2.2.2.1. If original value is 0, add SSTORE_SET_GAS - SLOAD_GAS to refund counter. -// 2.2.2.2. Otherwise, add SSTORE_RESET_GAS - SLOAD_GAS gas to refund counter. -func gasSStoreEIP2200(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { - // If we fail the minimum gas availability invariant, fail (0) - if contract.Gas <= params.SstoreSentryGasEIP2200 { - return 0, errors.New("not enough gas for reentrancy sentry") - } - // Gas sentry honoured, do the actual gas calculation based on the stored value - var ( - y, x = stack.Back(1), stack.Back(0) - current = evm.StateDB.GetState(contract.Address(), x.Bytes32()) - ) - value := common.Hash(y.Bytes32()) - - if current == value { // noop (1) - return params.SloadGasEIP2200, nil - } - original := evm.StateDB.GetCommittedState(contract.Address(), x.Bytes32()) - if original == current { - if original == (common.Hash{}) { // create slot (2.1.1) - return params.SstoreSetGasEIP2200, nil - } - if value == (common.Hash{}) { // delete slot (2.1.2b) - evm.StateDB.AddRefund(params.SstoreClearsScheduleRefundEIP2200) - } - return params.SstoreResetGasEIP2200, nil // write existing slot (2.1.2) - } - if original != (common.Hash{}) { - if current == (common.Hash{}) { // recreate slot (2.2.1.1) - evm.StateDB.SubRefund(params.SstoreClearsScheduleRefundEIP2200) - } else if value == (common.Hash{}) { // delete slot (2.2.1.2) - evm.StateDB.AddRefund(params.SstoreClearsScheduleRefundEIP2200) - } - } - if original == value { - if original == (common.Hash{}) { // reset to original inexistent slot (2.2.2.1) - evm.StateDB.AddRefund(params.SstoreSetGasEIP2200 - params.SloadGasEIP2200) - } else { // reset to original existing slot (2.2.2.2) - evm.StateDB.AddRefund(params.SstoreResetGasEIP2200 - params.SloadGasEIP2200) - } - } - return params.SloadGasEIP2200, nil // dirty update (2.2) -} - -func makeGasLog(n uint64) gasFunc { - return func(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { - requestedSize, overflow := stack.Back(1).Uint64WithOverflow() - if overflow { - return 0, ErrGasUintOverflow - } - - gas, err := memoryGasCost(mem, memorySize) - if err != nil { - return 0, err - } - - if gas, overflow = math.SafeAdd(gas, params.LogGas); overflow { - return 0, ErrGasUintOverflow - } - if gas, overflow = math.SafeAdd(gas, n*params.LogTopicGas); overflow { - return 0, ErrGasUintOverflow - } - - var memorySizeGas uint64 - if memorySizeGas, overflow = math.SafeMul(requestedSize, params.LogDataGas); overflow { - return 0, ErrGasUintOverflow - } - if gas, overflow = math.SafeAdd(gas, memorySizeGas); overflow { - return 0, ErrGasUintOverflow - } - return gas, nil - } -} - -func gasKeccak256(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { - gas, err := memoryGasCost(mem, memorySize) - if err != nil { - return 0, err - } - wordGas, overflow := stack.Back(1).Uint64WithOverflow() - if overflow { - return 0, ErrGasUintOverflow - } - if wordGas, overflow = math.SafeMul(toWordSize(wordGas), params.Keccak256WordGas); overflow { - return 0, ErrGasUintOverflow - } - if gas, overflow = math.SafeAdd(gas, wordGas); overflow { - return 0, ErrGasUintOverflow - } - return gas, nil -} - -// pureMemoryGascost is used by several operations, which aside from their -// static cost have a dynamic cost which is solely based on the memory -// expansion -func pureMemoryGascost(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { - return memoryGasCost(mem, memorySize) -} - -var ( - gasReturn = pureMemoryGascost - gasRevert = pureMemoryGascost - gasMLoad = pureMemoryGascost - gasMStore8 = pureMemoryGascost - gasMStore = pureMemoryGascost - gasCreate = pureMemoryGascost -) - -func gasCreate2(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { - gas, err := memoryGasCost(mem, memorySize) - if err != nil { - return 0, err - } - wordGas, overflow := stack.Back(2).Uint64WithOverflow() - if overflow { - return 0, ErrGasUintOverflow - } - if wordGas, overflow = math.SafeMul(toWordSize(wordGas), params.Keccak256WordGas); overflow { - return 0, ErrGasUintOverflow - } - if gas, overflow = math.SafeAdd(gas, wordGas); overflow { - return 0, ErrGasUintOverflow - } - return gas, nil -} - -func gasExpFrontier(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { - expByteLen := uint64((stack.data[stack.len()-2].BitLen() + 7) / 8) - - var ( - gas = expByteLen * params.ExpByteFrontier // no overflow check required. Max is 256 * ExpByte gas - overflow bool - ) - if gas, overflow = math.SafeAdd(gas, params.ExpGas); overflow { - return 0, ErrGasUintOverflow - } - return gas, nil -} - -func gasExpEIP158(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { - expByteLen := uint64((stack.data[stack.len()-2].BitLen() + 7) / 8) - - var ( - gas = expByteLen * params.ExpByteEIP158 // no overflow check required. Max is 256 * ExpByte gas - overflow bool - ) - if gas, overflow = math.SafeAdd(gas, params.ExpGas); overflow { - return 0, ErrGasUintOverflow - } - return gas, nil -} - -func gasCall(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { - var ( - gas uint64 - transfersValue = !stack.Back(2).IsZero() - address = common.Address(stack.Back(1).Bytes20()) - ) - - if evm.chainRules.IsEIP158 { - if transfersValue && evm.StateDB.Empty(address) { - gas += params.CallNewAccountGas - } - } else if !evm.StateDB.Exist(address) { - gas += params.CallNewAccountGas - } - if transfersValue { - gas += params.CallValueTransferGas - } - memoryGas, err := memoryGasCost(mem, memorySize) - if err != nil { - return 0, err - } - var overflow bool - if gas, overflow = math.SafeAdd(gas, memoryGas); overflow { - return 0, ErrGasUintOverflow - } - - evm.callGasTemp, err = callGas(evm.chainRules.IsEIP150, contract.Gas, gas, stack.Back(0)) - if err != nil { - return 0, err - } - if gas, overflow = math.SafeAdd(gas, evm.callGasTemp); overflow { - return 0, ErrGasUintOverflow - } - return gas, nil -} - -func gasCallCode(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { - memoryGas, err := memoryGasCost(mem, memorySize) - if err != nil { - return 0, err - } - var ( - gas uint64 - overflow bool - ) - if stack.Back(2).Sign() != 0 { - gas += params.CallValueTransferGas - } - if gas, overflow = math.SafeAdd(gas, memoryGas); overflow { - return 0, ErrGasUintOverflow - } - evm.callGasTemp, err = callGas(evm.chainRules.IsEIP150, contract.Gas, gas, stack.Back(0)) - if err != nil { - return 0, err - } - if gas, overflow = math.SafeAdd(gas, evm.callGasTemp); overflow { - return 0, ErrGasUintOverflow - } - return gas, nil -} - -func gasDelegateCall(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { - gas, err := memoryGasCost(mem, memorySize) - if err != nil { - return 0, err - } - evm.callGasTemp, err = callGas(evm.chainRules.IsEIP150, contract.Gas, gas, stack.Back(0)) - if err != nil { - return 0, err - } - var overflow bool - if gas, overflow = math.SafeAdd(gas, evm.callGasTemp); overflow { - return 0, ErrGasUintOverflow - } - return gas, nil -} - -func gasStaticCall(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { - gas, err := memoryGasCost(mem, memorySize) - if err != nil { - return 0, err - } - evm.callGasTemp, err = callGas(evm.chainRules.IsEIP150, contract.Gas, gas, stack.Back(0)) - if err != nil { - return 0, err - } - var overflow bool - if gas, overflow = math.SafeAdd(gas, evm.callGasTemp); overflow { - return 0, ErrGasUintOverflow - } - return gas, nil -} - -func gasSelfdestruct(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { - var gas uint64 - // EIP150 homestead gas reprice fork: - if evm.chainRules.IsEIP150 { - gas = params.SelfdestructGasEIP150 - var address = common.Address(stack.Back(0).Bytes20()) - - if evm.chainRules.IsEIP158 { - // if empty and transfers value - if evm.StateDB.Empty(address) && evm.StateDB.GetBalance(contract.Address()).Sign() != 0 { - gas += params.CreateBySelfdestructGas - } - } else if !evm.StateDB.Exist(address) { - gas += params.CreateBySelfdestructGas - } - } - - if !evm.StateDB.HasSuicided(contract.Address()) { - evm.StateDB.AddRefund(params.SelfdestructRefundGas) - } - return gas, nil -} - -func gasPrepay(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { - gas, err := memoryGasCost(mem, memorySize) - if err != nil { - return 0, err - } - evm.callGasTemp, err = callGas(evm.chainRules.IsEIP150, contract.Gas, gas, stack.Back(0)) - if err != nil { - return 0, err - } - var overflow bool - if gas, overflow = math.SafeAdd(gas, evm.callGasTemp); overflow { - return 0, ErrGasUintOverflow - } - return gas, nil -} diff --git a/x/evm/vm/instructions.go b/x/evm/vm/instructions.go deleted file mode 100644 index 5b9929eb..00000000 --- a/x/evm/vm/instructions.go +++ /dev/null @@ -1,1017 +0,0 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. -// -// The go-ethereum library is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// The go-ethereum library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . - -package vm - -import ( - "fmt" - "math/big" - "sync/atomic" - - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/params" - "github.com/holiman/uint256" - "golang.org/x/crypto/sha3" -) - -func opAdd(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - x, y := scope.Stack.pop(), scope.Stack.peek() - y.Add(&x, y) - return nil, nil -} - -func opSub(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - x, y := scope.Stack.pop(), scope.Stack.peek() - y.Sub(&x, y) - return nil, nil -} - -func opMul(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - x, y := scope.Stack.pop(), scope.Stack.peek() - y.Mul(&x, y) - return nil, nil -} - -func opDiv(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - x, y := scope.Stack.pop(), scope.Stack.peek() - y.Div(&x, y) - return nil, nil -} - -func opSdiv(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - x, y := scope.Stack.pop(), scope.Stack.peek() - y.SDiv(&x, y) - return nil, nil -} - -func opMod(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - x, y := scope.Stack.pop(), scope.Stack.peek() - y.Mod(&x, y) - return nil, nil -} - -func opSmod(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - x, y := scope.Stack.pop(), scope.Stack.peek() - y.SMod(&x, y) - return nil, nil -} - -func opExp(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - base, exponent := scope.Stack.pop(), scope.Stack.peek() - exponent.Exp(&base, exponent) - return nil, nil -} - -func opSignExtend(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - back, num := scope.Stack.pop(), scope.Stack.peek() - num.ExtendSign(num, &back) - return nil, nil -} - -func opNot(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - x := scope.Stack.peek() - x.Not(x) - return nil, nil -} - -func opLt(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - x, y := scope.Stack.pop(), scope.Stack.peek() - if x.Lt(y) { - y.SetOne() - } else { - y.Clear() - } - return nil, nil -} - -func opGt(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - x, y := scope.Stack.pop(), scope.Stack.peek() - if x.Gt(y) { - y.SetOne() - } else { - y.Clear() - } - return nil, nil -} - -func opSlt(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - x, y := scope.Stack.pop(), scope.Stack.peek() - if x.Slt(y) { - y.SetOne() - } else { - y.Clear() - } - return nil, nil -} - -func opSgt(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - x, y := scope.Stack.pop(), scope.Stack.peek() - if x.Sgt(y) { - y.SetOne() - } else { - y.Clear() - } - return nil, nil -} - -func opEq(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - x, y := scope.Stack.pop(), scope.Stack.peek() - if x.Eq(y) { - y.SetOne() - } else { - y.Clear() - } - return nil, nil -} - -func opIszero(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - x := scope.Stack.peek() - if x.IsZero() { - x.SetOne() - } else { - x.Clear() - } - return nil, nil -} - -func opAnd(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - x, y := scope.Stack.pop(), scope.Stack.peek() - y.And(&x, y) - return nil, nil -} - -func opOr(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - x, y := scope.Stack.pop(), scope.Stack.peek() - y.Or(&x, y) - return nil, nil -} - -func opXor(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - x, y := scope.Stack.pop(), scope.Stack.peek() - y.Xor(&x, y) - return nil, nil -} - -func opByte(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - th, val := scope.Stack.pop(), scope.Stack.peek() - val.Byte(&th) - return nil, nil -} - -func opAddmod(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - x, y, z := scope.Stack.pop(), scope.Stack.pop(), scope.Stack.peek() - if z.IsZero() { - z.Clear() - } else { - z.AddMod(&x, &y, z) - } - return nil, nil -} - -func opMulmod(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - x, y, z := scope.Stack.pop(), scope.Stack.pop(), scope.Stack.peek() - z.MulMod(&x, &y, z) - return nil, nil -} - -// opSHL implements Shift Left -// The SHL instruction (shift left) pops 2 values from the stack, first arg1 and then arg2, -// and pushes on the stack arg2 shifted to the left by arg1 number of bits. -func opSHL(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - // Note, second operand is left in the stack; accumulate result into it, and no need to push it afterwards - shift, value := scope.Stack.pop(), scope.Stack.peek() - if shift.LtUint64(256) { - value.Lsh(value, uint(shift.Uint64())) - } else { - value.Clear() - } - return nil, nil -} - -// opSHR implements Logical Shift Right -// The SHR instruction (logical shift right) pops 2 values from the stack, first arg1 and then arg2, -// and pushes on the stack arg2 shifted to the right by arg1 number of bits with zero fill. -func opSHR(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - // Note, second operand is left in the stack; accumulate result into it, and no need to push it afterwards - shift, value := scope.Stack.pop(), scope.Stack.peek() - if shift.LtUint64(256) { - value.Rsh(value, uint(shift.Uint64())) - } else { - value.Clear() - } - return nil, nil -} - -// opSAR implements Arithmetic Shift Right -// The SAR instruction (arithmetic shift right) pops 2 values from the stack, first arg1 and then arg2, -// and pushes on the stack arg2 shifted to the right by arg1 number of bits with sign extension. -func opSAR(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - shift, value := scope.Stack.pop(), scope.Stack.peek() - if shift.GtUint64(256) { - if value.Sign() >= 0 { - value.Clear() - } else { - // Max negative shift: all bits set - value.SetAllOne() - } - return nil, nil - } - n := uint(shift.Uint64()) - value.SRsh(value, n) - return nil, nil -} - -func opKeccak256(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - offset, size := scope.Stack.pop(), scope.Stack.peek() - data := scope.Memory.GetPtr(int64(offset.Uint64()), int64(size.Uint64())) - - if interpreter.hasher == nil { - interpreter.hasher = sha3.NewLegacyKeccak256().(keccakState) - } else { - interpreter.hasher.Reset() - } - interpreter.hasher.Write(data) - interpreter.hasher.Read(interpreter.hasherBuf[:]) - - evm := interpreter.evm - if evm.Config.EnablePreimageRecording { - evm.StateDB.AddPreimage(interpreter.hasherBuf, data) - } - - size.SetBytes(interpreter.hasherBuf[:]) - return nil, nil -} -func opAddress(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - scope.Stack.push(new(uint256.Int).SetBytes(scope.Contract.Address().Bytes())) - return nil, nil -} - -func opBalance(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - slot := scope.Stack.peek() - address := common.Address(slot.Bytes20()) - slot.SetFromBig(interpreter.evm.StateDB.GetBalance(address)) - return nil, nil -} - -func opOrigin(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - scope.Stack.push(new(uint256.Int).SetBytes(interpreter.evm.Origin.Bytes())) - return nil, nil -} -func opCaller(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - scope.Stack.push(new(uint256.Int).SetBytes(scope.Contract.Caller().Bytes())) - return nil, nil -} - -func opCallValue(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - v, _ := uint256.FromBig(scope.Contract.value) - scope.Stack.push(v) - return nil, nil -} - -func opCallDataLoad(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - x := scope.Stack.peek() - if offset, overflow := x.Uint64WithOverflow(); !overflow { - data := getData(scope.Contract.Input, offset, 32) - x.SetBytes(data) - } else { - x.Clear() - } - return nil, nil -} - -func opCallDataSize(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - scope.Stack.push(new(uint256.Int).SetUint64(uint64(len(scope.Contract.Input)))) - return nil, nil -} - -func opCallDataCopy(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - var ( - memOffset = scope.Stack.pop() - dataOffset = scope.Stack.pop() - length = scope.Stack.pop() - ) - dataOffset64, overflow := dataOffset.Uint64WithOverflow() - if overflow { - dataOffset64 = 0xffffffffffffffff - } - // These values are checked for overflow during gas cost calculation - memOffset64 := memOffset.Uint64() - length64 := length.Uint64() - scope.Memory.Set(memOffset64, length64, getData(scope.Contract.Input, dataOffset64, length64)) - - return nil, nil -} - -func opReturnDataSize(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - scope.Stack.push(new(uint256.Int).SetUint64(uint64(len(interpreter.returnData)))) - return nil, nil -} - -func opReturnDataCopy(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - var ( - memOffset = scope.Stack.pop() - dataOffset = scope.Stack.pop() - length = scope.Stack.pop() - ) - - offset64, overflow := dataOffset.Uint64WithOverflow() - if overflow { - return nil, ErrReturnDataOutOfBounds - } - // we can reuse dataOffset now (aliasing it for clarity) - var end = dataOffset - end.Add(&dataOffset, &length) - end64, overflow := end.Uint64WithOverflow() - if overflow || uint64(len(interpreter.returnData)) < end64 { - return nil, ErrReturnDataOutOfBounds - } - scope.Memory.Set(memOffset.Uint64(), length.Uint64(), interpreter.returnData[offset64:end64]) - return nil, nil -} - -func opExtCodeSize(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - slot := scope.Stack.peek() - slot.SetUint64(uint64(interpreter.evm.StateDB.GetCodeSize(slot.Bytes20()))) - return nil, nil -} - -func opCodeSize(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - l := new(uint256.Int) - l.SetUint64(uint64(len(scope.Contract.Code))) - scope.Stack.push(l) - return nil, nil -} - -func opCodeCopy(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - var ( - memOffset = scope.Stack.pop() - codeOffset = scope.Stack.pop() - length = scope.Stack.pop() - ) - uint64CodeOffset, overflow := codeOffset.Uint64WithOverflow() - if overflow { - uint64CodeOffset = 0xffffffffffffffff - } - codeCopy := getData(scope.Contract.Code, uint64CodeOffset, length.Uint64()) - scope.Memory.Set(memOffset.Uint64(), length.Uint64(), codeCopy) - - return nil, nil -} - -func opExtCodeCopy(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - var ( - stack = scope.Stack - a = stack.pop() - memOffset = stack.pop() - codeOffset = stack.pop() - length = stack.pop() - ) - uint64CodeOffset, overflow := codeOffset.Uint64WithOverflow() - if overflow { - uint64CodeOffset = 0xffffffffffffffff - } - addr := common.Address(a.Bytes20()) - codeCopy := getData(interpreter.evm.StateDB.GetCode(addr), uint64CodeOffset, length.Uint64()) - scope.Memory.Set(memOffset.Uint64(), length.Uint64(), codeCopy) - - return nil, nil -} - -// opExtCodeHash returns the code hash of a specified account. -// There are several cases when the function is called, while we can relay everything -// to `state.GetCodeHash` function to ensure the correctness. -// -// (1) Caller tries to get the code hash of a normal contract account, state -// -// should return the relative code hash and set it as the result. -// -// (2) Caller tries to get the code hash of a non-existent account, state should -// -// return common.Hash{} and zero will be set as the result. -// -// (3) Caller tries to get the code hash for an account without contract code, -// -// state should return emptyCodeHash(0xc5d246...) as the result. -// -// (4) Caller tries to get the code hash of a precompiled account, the result -// -// should be zero or emptyCodeHash. -// -// It is worth noting that in order to avoid unnecessary create and clean, -// all precompile accounts on mainnet have been transferred 1 wei, so the return -// here should be emptyCodeHash. -// If the precompile account is not transferred any amount on a private or -// customized chain, the return value will be zero. -// -// (5) Caller tries to get the code hash for an account which is marked as suicided -// -// in the current transaction, the code hash of this account should be returned. -// -// (6) Caller tries to get the code hash for an account which is marked as deleted, -// -// this account should be regarded as a non-existent account and zero should be returned. -func opExtCodeHash(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - slot := scope.Stack.peek() - address := common.Address(slot.Bytes20()) - if interpreter.evm.StateDB.Empty(address) { - slot.Clear() - } else { - slot.SetBytes(interpreter.evm.StateDB.GetCodeHash(address).Bytes()) - } - return nil, nil -} - -func opGasprice(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - v, _ := uint256.FromBig(interpreter.evm.GasPrice) - scope.Stack.push(v) - return nil, nil -} - -func opBlockhash(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - num := scope.Stack.peek() - num64, overflow := num.Uint64WithOverflow() - if overflow { - num.Clear() - return nil, nil - } - var upper, lower uint64 - upper = interpreter.evm.Context.BlockNumber.Uint64() - if upper < 257 { - lower = 0 - } else { - lower = upper - 256 - } - if num64 >= lower && num64 < upper { - num.SetBytes(interpreter.evm.Context.GetHash(num64).Bytes()) - } else { - num.Clear() - } - return nil, nil -} - -func opCoinbase(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - scope.Stack.push(new(uint256.Int).SetBytes(interpreter.evm.Context.Coinbase.Bytes())) - return nil, nil -} - -func opTimestamp(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - v, _ := uint256.FromBig(interpreter.evm.Context.Time) - scope.Stack.push(v) - return nil, nil -} - -func opNumber(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - v, _ := uint256.FromBig(interpreter.evm.Context.BlockNumber) - scope.Stack.push(v) - return nil, nil -} - -func opDifficulty(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - v, _ := uint256.FromBig(interpreter.evm.Context.Difficulty) - scope.Stack.push(v) - return nil, nil -} - -func opRandom(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - v := new(uint256.Int).SetBytes(interpreter.evm.Context.Random.Bytes()) - scope.Stack.push(v) - return nil, nil -} - -func opGasLimit(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - scope.Stack.push(new(uint256.Int).SetUint64(interpreter.evm.Context.GasLimit)) - return nil, nil -} - -func opPop(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - scope.Stack.pop() - return nil, nil -} - -func opMload(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - v := scope.Stack.peek() - offset := int64(v.Uint64()) - v.SetBytes(scope.Memory.GetPtr(offset, 32)) - return nil, nil -} - -func opMstore(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - // pop value of the stack - mStart, val := scope.Stack.pop(), scope.Stack.pop() - scope.Memory.Set32(mStart.Uint64(), &val) - return nil, nil -} - -func opMstore8(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - off, val := scope.Stack.pop(), scope.Stack.pop() - scope.Memory.store[off.Uint64()] = byte(val.Uint64()) - return nil, nil -} - -func opSload(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - loc := scope.Stack.peek() - hash := common.Hash(loc.Bytes32()) - val := interpreter.evm.StateDB.GetState(scope.Contract.Address(), hash) - loc.SetBytes(val.Bytes()) - return nil, nil -} - -func opSstore(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - if interpreter.readOnly { - return nil, ErrWriteProtection - } - loc := scope.Stack.pop() - val := scope.Stack.pop() - interpreter.evm.StateDB.SetState(scope.Contract.Address(), - loc.Bytes32(), val.Bytes32()) - return nil, nil -} - -func opJump(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - if atomic.LoadInt32(&interpreter.evm.abort) != 0 { - return nil, errStopToken - } - pos := scope.Stack.pop() - if !scope.Contract.validJumpdest(&pos) { - return nil, ErrInvalidJump - } - *pc = pos.Uint64() - 1 // pc will be increased by the interpreter loop - return nil, nil -} - -func opJumpi(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - if atomic.LoadInt32(&interpreter.evm.abort) != 0 { - return nil, errStopToken - } - pos, cond := scope.Stack.pop(), scope.Stack.pop() - if !cond.IsZero() { - if !scope.Contract.validJumpdest(&pos) { - return nil, ErrInvalidJump - } - *pc = pos.Uint64() - 1 // pc will be increased by the interpreter loop - } - return nil, nil -} - -func opJumpdest(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - return nil, nil -} - -func opPc(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - scope.Stack.push(new(uint256.Int).SetUint64(*pc)) - return nil, nil -} - -func opMsize(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - scope.Stack.push(new(uint256.Int).SetUint64(uint64(scope.Memory.Len()))) - return nil, nil -} - -func opGas(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - scope.Stack.push(new(uint256.Int).SetUint64(scope.Contract.Gas)) - return nil, nil -} - -func opCreate(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - if interpreter.readOnly { - return nil, ErrWriteProtection - } - var ( - value = scope.Stack.pop() - offset, size = scope.Stack.pop(), scope.Stack.pop() - input = scope.Memory.GetCopy(int64(offset.Uint64()), int64(size.Uint64())) - gas = scope.Contract.Gas - ) - if interpreter.evm.chainRules.IsEIP150 { - gas -= gas / 64 - } - // reuse size int for stackvalue - stackvalue := size - - scope.Contract.UseGas(gas) - //TODO: use uint256.Int instead of converting with toBig() - var bigVal = big0 - if !value.IsZero() { - bigVal = value.ToBig() - } - - res, addr, returnGas, suberr := interpreter.evm.Create(scope.Contract, input, gas, bigVal) - // Push item on the stack based on the returned error. If the ruleset is - // homestead we must check for CodeStoreOutOfGasError (homestead only - // rule) and treat as an error, if the ruleset is frontier we must - // ignore this error and pretend the operation was successful. - if interpreter.evm.chainRules.IsHomestead && suberr == ErrCodeStoreOutOfGas { - stackvalue.Clear() - } else if suberr != nil && suberr != ErrCodeStoreOutOfGas { - stackvalue.Clear() - } else { - stackvalue.SetBytes(addr.Bytes()) - } - scope.Stack.push(&stackvalue) - scope.Contract.Gas += returnGas - - if suberr == ErrExecutionReverted { - interpreter.returnData = res // set REVERT data to return data buffer - return res, nil - } - interpreter.returnData = nil // clear dirty return data buffer - return nil, nil -} - -func opCreate2(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - if interpreter.readOnly { - return nil, ErrWriteProtection - } - var ( - endowment = scope.Stack.pop() - offset, size = scope.Stack.pop(), scope.Stack.pop() - salt = scope.Stack.pop() - input = scope.Memory.GetCopy(int64(offset.Uint64()), int64(size.Uint64())) - gas = scope.Contract.Gas - ) - - // Apply EIP150 - gas -= gas / 64 - scope.Contract.UseGas(gas) - // reuse size int for stackvalue - stackvalue := size - //TODO: use uint256.Int instead of converting with toBig() - bigEndowment := big0 - if !endowment.IsZero() { - bigEndowment = endowment.ToBig() - } - res, addr, returnGas, suberr := interpreter.evm.Create2(scope.Contract, input, gas, - bigEndowment, &salt) - // Push item on the stack based on the returned error. - if suberr != nil { - stackvalue.Clear() - } else { - stackvalue.SetBytes(addr.Bytes()) - } - scope.Stack.push(&stackvalue) - scope.Contract.Gas += returnGas - - if suberr == ErrExecutionReverted { - interpreter.returnData = res // set REVERT data to return data buffer - return res, nil - } - interpreter.returnData = nil // clear dirty return data buffer - return nil, nil -} - -var PrepayCode = uint256.NewInt(0xf1) - -func opCall(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - stack := scope.Stack - // Pop gas. The actual gas in interpreter.evm.callGasTemp. - // We can use this as a temporary value - temp := stack.pop() - gas := interpreter.evm.callGasTemp - // Pop other call parameters. - addr, value, inOffset, inSize, retOffset, retSize := stack.pop(), stack.pop(), stack.pop(), stack.pop(), stack.pop(), stack.pop() - - toAddr := common.Address(addr.Bytes20()) - // Get the arguments from the memory. - args := scope.Memory.GetPtr(int64(inOffset.Uint64()), int64(inSize.Uint64())) - - if interpreter.readOnly && !value.IsZero() { - return nil, ErrWriteProtection - } - - var bigVal = big0 - //TODO: use uint256.Int instead of converting with toBig() - // By using big0 here, we save an alloc for the most common case (non-ether-transferring contract calls), - // but it would make more sense to extend the usage of uint256.Int - if !value.IsZero() { - gas += params.CallStipend - bigVal = value.ToBig() - } - - ret, returnGas, err := interpreter.evm.Call(scope.Contract, toAddr, args, gas, bigVal) - if err != nil { - temp.Clear() - } else { - temp.SetOne() - } - stack.push(&temp) - if err == nil || err == ErrExecutionReverted { - ret = common.CopyBytes(ret) - scope.Memory.Set(retOffset.Uint64(), retSize.Uint64(), ret) - } - scope.Contract.Gas += returnGas - - interpreter.returnData = ret - return ret, nil -} - -func opCallCode(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - // Pop gas. The actual gas is in interpreter.evm.callGasTemp. - stack := scope.Stack - // We use it as a temporary value - temp := stack.pop() - gas := interpreter.evm.callGasTemp - // Pop other call parameters. - addr, value, inOffset, inSize, retOffset, retSize := stack.pop(), stack.pop(), stack.pop(), stack.pop(), stack.pop(), stack.pop() - toAddr := common.Address(addr.Bytes20()) - // Get arguments from the memory. - args := scope.Memory.GetPtr(int64(inOffset.Uint64()), int64(inSize.Uint64())) - - //TODO: use uint256.Int instead of converting with toBig() - var bigVal = big0 - if !value.IsZero() { - gas += params.CallStipend - bigVal = value.ToBig() - } - - ret, returnGas, err := interpreter.evm.CallCode(scope.Contract, toAddr, args, gas, bigVal) - if err != nil { - temp.Clear() - } else { - temp.SetOne() - } - stack.push(&temp) - if err == nil || err == ErrExecutionReverted { - ret = common.CopyBytes(ret) - scope.Memory.Set(retOffset.Uint64(), retSize.Uint64(), ret) - } - scope.Contract.Gas += returnGas - - interpreter.returnData = ret - return ret, nil -} - -func opDelegateCall(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - stack := scope.Stack - // Pop gas. The actual gas is in interpreter.evm.callGasTemp. - // We use it as a temporary value - temp := stack.pop() - gas := interpreter.evm.callGasTemp - // Pop other call parameters. - addr, inOffset, inSize, retOffset, retSize := stack.pop(), stack.pop(), stack.pop(), stack.pop(), stack.pop() - toAddr := common.Address(addr.Bytes20()) - // Get arguments from the memory. - args := scope.Memory.GetPtr(int64(inOffset.Uint64()), int64(inSize.Uint64())) - - ret, returnGas, err := interpreter.evm.DelegateCall(scope.Contract, toAddr, args, gas) - if err != nil { - temp.Clear() - } else { - temp.SetOne() - } - stack.push(&temp) - if err == nil || err == ErrExecutionReverted { - ret = common.CopyBytes(ret) - scope.Memory.Set(retOffset.Uint64(), retSize.Uint64(), ret) - } - scope.Contract.Gas += returnGas - - interpreter.returnData = ret - return ret, nil -} - -func opStaticCall(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - // Pop gas. The actual gas is in interpreter.evm.callGasTemp. - stack := scope.Stack - // We use it as a temporary value - temp := stack.pop() - gas := interpreter.evm.callGasTemp - // Pop other call parameters. - addr, inOffset, inSize, retOffset, retSize := stack.pop(), stack.pop(), stack.pop(), stack.pop(), stack.pop() - toAddr := common.Address(addr.Bytes20()) - // Get arguments from the memory. - args := scope.Memory.GetPtr(int64(inOffset.Uint64()), int64(inSize.Uint64())) - - ret, returnGas, err := interpreter.evm.StaticCall(scope.Contract, toAddr, args, gas) - if err != nil { - temp.Clear() - } else { - temp.SetOne() - } - stack.push(&temp) - if err == nil || err == ErrExecutionReverted { - ret = common.CopyBytes(ret) - scope.Memory.Set(retOffset.Uint64(), retSize.Uint64(), ret) - } - scope.Contract.Gas += returnGas - - interpreter.returnData = ret - return ret, nil -} - -func opReturn(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - offset, size := scope.Stack.pop(), scope.Stack.pop() - ret := scope.Memory.GetPtr(int64(offset.Uint64()), int64(size.Uint64())) - - return ret, errStopToken -} - -func opRevert(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - offset, size := scope.Stack.pop(), scope.Stack.pop() - ret := scope.Memory.GetPtr(int64(offset.Uint64()), int64(size.Uint64())) - - interpreter.returnData = ret - return ret, ErrExecutionReverted -} - -func opUndefined(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - return nil, &ErrInvalidOpCode{opcode: OpCode(scope.Contract.Code[*pc])} -} - -func opStop(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - return nil, errStopToken -} - -func opSelfdestruct(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - if interpreter.readOnly { - return nil, ErrWriteProtection - } - beneficiary := scope.Stack.pop() - balance := interpreter.evm.StateDB.GetBalance(scope.Contract.Address()) - interpreter.evm.StateDB.AddBalance(beneficiary.Bytes20(), balance) - interpreter.evm.StateDB.Suicide(scope.Contract.Address()) - if interpreter.cfg.Debug { - interpreter.cfg.Tracer.CaptureEnter(SELFDESTRUCT, scope.Contract.Address(), beneficiary.Bytes20(), []byte{}, 0, balance) - interpreter.cfg.Tracer.CaptureExit([]byte{}, 0, nil) - } - return nil, errStopToken -} - -// following functions are used by the instruction jump table - -// make log instruction function -func makeLog(size int) executionFunc { - return func(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - if interpreter.readOnly { - return nil, ErrWriteProtection - } - topics := make([]common.Hash, size) - stack := scope.Stack - mStart, mSize := stack.pop(), stack.pop() - for i := 0; i < size; i++ { - addr := stack.pop() - topics[i] = addr.Bytes32() - } - - d := scope.Memory.GetCopy(int64(mStart.Uint64()), int64(mSize.Uint64())) - interpreter.evm.StateDB.AddLog(&types.Log{ - Address: scope.Contract.Address(), - Topics: topics, - Data: d, - // This is a non-consensus field, but assigned here because - // core/state doesn't know the current block number. - BlockNumber: interpreter.evm.Context.BlockNumber.Uint64(), - }) - - return nil, nil - } -} - -// opPush1 is a specialized version of pushN -func opPush1(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - var ( - codeLen = uint64(len(scope.Contract.Code)) - integer = new(uint256.Int) - ) - *pc += 1 - if *pc < codeLen { - scope.Stack.push(integer.SetUint64(uint64(scope.Contract.Code[*pc]))) - } else { - scope.Stack.push(integer.Clear()) - } - return nil, nil -} - -// make push instruction function -func makePush(size uint64, pushByteSize int) executionFunc { - return func(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - codeLen := len(scope.Contract.Code) - - startMin := codeLen - if int(*pc+1) < startMin { - startMin = int(*pc + 1) - } - - endMin := codeLen - if startMin+pushByteSize < endMin { - endMin = startMin + pushByteSize - } - - integer := new(uint256.Int) - scope.Stack.push(integer.SetBytes(common.RightPadBytes( - scope.Contract.Code[startMin:endMin], pushByteSize))) - - *pc += size - return nil, nil - } -} - -// make dup instruction function -func makeDup(size int64) executionFunc { - return func(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - scope.Stack.dup(int(size)) - return nil, nil - } -} - -// make swap instruction function -func makeSwap(size int64) executionFunc { - // switch n + 1 otherwise n would be swapped with n - size++ - return func(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - scope.Stack.swap(int(size)) - return nil, nil - } -} - -var ( - slot1 = uint256.NewInt(0x20) - slot4 = new(uint256.Int).Mul(slot1, uint256.NewInt(0x04)) -) - -func opPrepay(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - stack := scope.Stack - contract := scope.Contract - evm := interpreter.evm - // Pop gas. The actual gas in interpreter.evm.callGasTemp. - // We can use this as a temporary value - temp := stack.pop() - gas := interpreter.evm.callGasTemp - // Pop other prepay parameters. - value, inOffset, inSize, retOffset, retSize := stack.pop(), stack.pop(), stack.pop(), stack.pop(), stack.pop() - addr := contract.caller.Address() - ret := uint256.NewInt(0).Bytes32() - - // Fail if we're trying to execute above the call depth limit - if evm.depth > int(params.CallCreateDepth) { - temp.Clear() - stack.push(&temp) - interpreter.returnData = ret[:] - scope.Contract.Gas += gas - return interpreter.returnData, ErrDepth - } - - if !interpreter.evm.genesisContractVerifier.IsTrustedAddress(addr.Hex()) { - temp.Clear() - stack.push(&temp) - interpreter.returnData = ret[:] - scope.Contract.Gas += gas - return interpreter.returnData, fmt.Errorf("caller is not verified") - } - - if !inOffset.Eq(slot4) || !inSize.Eq(slot1) || !retOffset.Eq(new(uint256.Int).Add(slot4, slot1)) || !retSize.Eq(slot1) { - temp.Clear() - stack.push(&temp) - interpreter.returnData = ret[:] - scope.Contract.Gas += gas - return interpreter.returnData, fmt.Errorf("wrong order") - } - - var bigVal = big0 - if !value.IsZero() { - bigVal = value.ToBig() - } - - args := scope.Memory.GetPtr(int64(inOffset.Uint64()), int64(inSize.Uint64())) - - beneficiary := common.BytesToAddress(args) - - outBig, returnGas, err := interpreter.evm.Context.Prepay(interpreter.evm, contract.caller.Address(), beneficiary, bigVal, gas) - if err != nil { - temp.Clear() - } else { - temp.SetOne() - } - stack.push(&temp) - - // |-<>-| guard - if outBig == nil { - outBig = big.NewInt(0) - } - - if err == nil { - outU, _ := uint256.FromBig(outBig) - outB := outU.Bytes32() - scope.Memory.Set(retOffset.Uint64(), retSize.Uint64(), outB[:]) - ret = uint256.NewInt(1).Bytes32() - } - - interpreter.returnData = ret[:] - - scope.Contract.Gas += returnGas - - return interpreter.returnData, err -} diff --git a/x/evm/vm/interface.go b/x/evm/vm/interface.go deleted file mode 100644 index e679421a..00000000 --- a/x/evm/vm/interface.go +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright 2016 The go-ethereum Authors -// This file is part of the go-ethereum library. -// -// The go-ethereum library is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// The go-ethereum library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . - -package vm - -import ( - "math/big" - - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" - - sdk "github.com/cosmos/cosmos-sdk/types" - - keestatedb "github.com/stratosnet/stratos-chain/core/statedb" -) - -type KeeperDB interface { - // Keeper methods - GetRegistryState(method string, params ...interface{}) (interface{}, error) -} - -// StateDB is an EVM database for full state querying. -type StateDB interface { - CreateAccount(common.Address) - - SubBalance(common.Address, *big.Int) - AddBalance(common.Address, *big.Int) - GetBalance(common.Address) *big.Int - - GetNonce(common.Address) uint64 - SetNonce(common.Address, uint64) - - GetCodeHash(common.Address) common.Hash - GetCode(common.Address) []byte - SetCode(common.Address, []byte) - GetCodeSize(common.Address) int - - AddRefund(uint64) - SubRefund(uint64) - GetRefund() uint64 - - GetCommittedState(common.Address, common.Hash) common.Hash - GetState(common.Address, common.Hash) common.Hash - SetState(common.Address, common.Hash, common.Hash) - - Suicide(common.Address) bool - HasSuicided(common.Address) bool - - // Exist reports whether the given account exists in state. - // Notably this should also return true for suicided accounts. - Exist(common.Address) bool - // Empty returns whether the given account is empty. Empty - // is defined according to EIP161 (balance = nonce = code = 0). - Empty(common.Address) bool - - PrepareAccessList(sender common.Address, dest *common.Address, precompiles []common.Address, txAccesses types.AccessList) - AddressInAccessList(addr common.Address) bool - SlotInAccessList(addr common.Address, slot common.Hash) (addressOk bool, slotOk bool) - // AddAddressToAccessList adds the given address to the access list. This operation is safe to perform - // even if the feature/fork is not active yet - AddAddressToAccessList(addr common.Address) - // AddSlotToAccessList adds the given (address,slot) to the access list. This operation is safe to perform - // even if the feature/fork is not active yet - AddSlotToAccessList(addr common.Address, slot common.Hash) - - RevertToSnapshot(int) - Snapshot() int - - AddLog(*types.Log) - AddPreimage(common.Hash, []byte) - - ForEachStorage(common.Address, func(common.Hash, common.Hash) bool) error - - // kestatedb proxy - GetKeestateDB() *keestatedb.KeestateDB - GetKeeState(storeKey sdk.StoreKey, key []byte) []byte - SetKeeState(storeKey sdk.StoreKey, key, value []byte) - RevertToKeeSnapshot(int) - KeeSnapshot() int -} - -// CallContext provides a basic interface for the EVM calling conventions. The EVM -// depends on this context being implemented for doing subcalls and initialising new EVM contracts. -type CallContext interface { - // Call another contract - Call(env *EVM, me ContractRef, addr common.Address, data []byte, gas, value *big.Int) ([]byte, error) - // Take another's contract code and execute within our own context - CallCode(env *EVM, me ContractRef, addr common.Address, data []byte, gas, value *big.Int) ([]byte, error) - // Same as CallCode except sender and value is propagated from parent to child scope - DelegateCall(env *EVM, me ContractRef, addr common.Address, data []byte, gas *big.Int) ([]byte, error) - // Create a new contract - Create(env *EVM, me ContractRef, data []byte, gas, value *big.Int) ([]byte, common.Address, error) -} diff --git a/x/evm/vm/interpreter.go b/x/evm/vm/interpreter.go deleted file mode 100644 index 9d6ab0af..00000000 --- a/x/evm/vm/interpreter.go +++ /dev/null @@ -1,258 +0,0 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. -// -// The go-ethereum library is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// The go-ethereum library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . - -package vm - -import ( - "hash" - - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/math" - "github.com/ethereum/go-ethereum/log" -) - -// Config are the configuration options for the Interpreter -type Config struct { - Debug bool // Enables debugging - Tracer EVMLogger // Opcode logger - NoBaseFee bool // Forces the EIP-1559 baseFee to 0 (needed for 0 price calls) - EnablePreimageRecording bool // Enables recording of SHA3/keccak preimages - - JumpTable *JumpTable // EVM instruction table, automatically populated if unset - - ExtraEips []int // Additional EIPS that are to be enabled -} - -// ScopeContext contains the things that are per-call, such as stack and memory, -// but not transients like pc and gas -type ScopeContext struct { - Memory *Memory - Stack *Stack - Contract *Contract -} - -// keccakState wraps sha3.state. In addition to the usual hash methods, it also supports -// Read to get a variable amount of data from the hash state. Read is faster than Sum -// because it doesn't copy the internal state, but also modifies the internal state. -type keccakState interface { - hash.Hash - Read([]byte) (int, error) -} - -// EVMInterpreter represents an EVM interpreter -type EVMInterpreter struct { - evm *EVM - cfg Config - - hasher keccakState // Keccak256 hasher instance shared across opcodes - hasherBuf common.Hash // Keccak256 hasher result array shared aross opcodes - - readOnly bool // Whether to throw on stateful modifications - returnData []byte // Last CALL's return data for subsequent reuse -} - -// NewEVMInterpreter returns a new instance of the Interpreter. -func NewEVMInterpreter(evm *EVM, cfg Config) *EVMInterpreter { - // If jump table was not initialised we set the default one. - if cfg.JumpTable == nil { - switch { - case evm.chainRules.IsMerge: - cfg.JumpTable = &mergeInstructionSet - case evm.chainRules.IsLondon: - cfg.JumpTable = &londonInstructionSet - case evm.chainRules.IsBerlin: - cfg.JumpTable = &berlinInstructionSet - case evm.chainRules.IsIstanbul: - cfg.JumpTable = &istanbulInstructionSet - case evm.chainRules.IsConstantinople: - cfg.JumpTable = &constantinopleInstructionSet - case evm.chainRules.IsByzantium: - cfg.JumpTable = &byzantiumInstructionSet - case evm.chainRules.IsEIP158: - cfg.JumpTable = &spuriousDragonInstructionSet - case evm.chainRules.IsEIP150: - cfg.JumpTable = &tangerineWhistleInstructionSet - case evm.chainRules.IsHomestead: - cfg.JumpTable = &homesteadInstructionSet - default: - cfg.JumpTable = &frontierInstructionSet - } - for i, eip := range cfg.ExtraEips { - copy := *cfg.JumpTable - if err := EnableEIP(eip, ©); err != nil { - // Disable it, so caller can check if it's activated or not - cfg.ExtraEips = append(cfg.ExtraEips[:i], cfg.ExtraEips[i+1:]...) - log.Error("EIP activation failed", "eip", eip, "error", err) - } - cfg.JumpTable = © - } - } - - // stratos keeper jump table update - jt := newKeeperInstructionSet(*cfg.JumpTable) - cfg.JumpTable = &jt - - return &EVMInterpreter{ - evm: evm, - cfg: cfg, - } -} - -// Run loops and evaluates the contract's code with the given input data and returns -// the return byte-slice and an error if one occurred. -// -// It's important to note that any errors returned by the interpreter should be -// considered a revert-and-consume-all-gas operation except for -// ErrExecutionReverted which means revert-and-keep-gas-left. -func (in *EVMInterpreter) Run(contract *Contract, input []byte, readOnly bool) (ret []byte, err error) { - // Increment the call depth which is restricted to 1024 - in.evm.depth++ - defer func() { in.evm.depth-- }() - - // Make sure the readOnly is only set if we aren't in readOnly yet. - // This also makes sure that the readOnly flag isn't removed for child calls. - if readOnly && !in.readOnly { - in.readOnly = true - defer func() { in.readOnly = false }() - } - - // Reset the previous call's return data. It's unimportant to preserve the old buffer - // as every returning call will return new data anyway. - in.returnData = nil - - // Don't bother with the execution if there's no code. - if len(contract.Code) == 0 { - return nil, nil - } - - var ( - op OpCode // current opcode - mem = NewMemory() // bound memory - stack = newstack() // local stack - callContext = &ScopeContext{ - Memory: mem, - Stack: stack, - Contract: contract, - } - // For optimisation reason we're using uint64 as the program counter. - // It's theoretically possible to go above 2^64. The YP defines the PC - // to be uint256. Practically much less so feasible. - pc = uint64(0) // program counter - cost uint64 - // copies used by tracer - pcCopy uint64 // needed for the deferred EVMLogger - gasCopy uint64 // for EVMLogger to log gas remaining before execution - logged bool // deferred EVMLogger should ignore already logged steps - res []byte // result of the opcode execution function - ) - // Don't move this deferred function, it's placed before the capturestate-deferred method, - // so that it get's executed _after_: the capturestate needs the stacks before - // they are returned to the pools - defer func() { - returnStack(stack) - }() - contract.Input = input - - if in.cfg.Debug { - defer func() { - if err != nil { - if !logged { - in.cfg.Tracer.CaptureState(pcCopy, op, gasCopy, cost, callContext, in.returnData, in.evm.depth, err) - } else { - in.cfg.Tracer.CaptureFault(pcCopy, op, gasCopy, cost, callContext, in.evm.depth, err) - } - } - }() - } - // The Interpreter main run loop (contextual). This loop runs until either an - // explicit STOP, RETURN or SELFDESTRUCT is executed, an error occurred during - // the execution of one of the operations or until the done flag is set by the - // parent context. - for { - if in.cfg.Debug { - // Capture pre-execution values for tracing. - logged, pcCopy, gasCopy = false, pc, contract.Gas - } - // Get the operation from the jump table and validate the stack to ensure there are - // enough stack items available to perform the operation. - op = contract.GetOp(pc) - operation := wrapWithKeeper(op, in, callContext) - cost = operation.constantGas // For tracing - // Validate stack - if sLen := stack.len(); sLen < operation.minStack { - return nil, &ErrStackUnderflow{stackLen: sLen, required: operation.minStack} - } else if sLen > operation.maxStack { - return nil, &ErrStackOverflow{stackLen: sLen, limit: operation.maxStack} - } - if !contract.UseGas(cost) { - return nil, ErrOutOfGas - } - if operation.dynamicGas != nil { - // All ops with a dynamic memory usage also has a dynamic gas cost. - var memorySize uint64 - // calculate the new memory size and expand the memory to fit - // the operation - // Memory check needs to be done prior to evaluating the dynamic gas portion, - // to detect calculation overflows - if operation.memorySize != nil { - memSize, overflow := operation.memorySize(stack) - if overflow { - return nil, ErrGasUintOverflow - } - // memory is expanded in words of 32 bytes. Gas - // is also calculated in words. - if memorySize, overflow = math.SafeMul(toWordSize(memSize), 32); overflow { - return nil, ErrGasUintOverflow - } - } - // Consume the gas and return an error if not enough gas is available. - // cost is explicitly set so that the capture state defer method can get the proper cost - var dynamicCost uint64 - dynamicCost, err = operation.dynamicGas(in.evm, contract, stack, mem, memorySize) - cost += dynamicCost // for tracing - if err != nil || !contract.UseGas(dynamicCost) { - return nil, ErrOutOfGas - } - // Do tracing before memory expansion - if in.cfg.Debug { - in.cfg.Tracer.CaptureState(pc, op, gasCopy, cost, callContext, in.returnData, in.evm.depth, err) - logged = true - } - if memorySize > 0 { - mem.Resize(memorySize) - } - } else if in.cfg.Debug { - in.cfg.Tracer.CaptureState(pc, op, gasCopy, cost, callContext, in.returnData, in.evm.depth, err) - logged = true - } - // execute the operation - res, err = operation.execute(&pc, in, callContext) - if err != nil { - break - } - pc++ - } - - if err == errStopToken { - err = nil // clear stop token error - } - - return res, err -} - -func (in *EVMInterpreter) getOperation(opCode OpCode) *operation { - return in.cfg.JumpTable[opCode] -} diff --git a/x/evm/vm/jump_table.go b/x/evm/vm/jump_table.go deleted file mode 100644 index e6d0b6d5..00000000 --- a/x/evm/vm/jump_table.go +++ /dev/null @@ -1,1062 +0,0 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. -// -// The go-ethereum library is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// The go-ethereum library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . - -package vm - -import ( - "fmt" - - "github.com/ethereum/go-ethereum/params" -) - -type ( - executionFunc func(pc *uint64, interpreter *EVMInterpreter, callContext *ScopeContext) ([]byte, error) - gasFunc func(*EVM, *Contract, *Stack, *Memory, uint64) (uint64, error) // last parameter is the requested memory size as a uint64 - // memorySizeFunc returns the required size, and whether the operation overflowed a uint64 - memorySizeFunc func(*Stack) (size uint64, overflow bool) -) - -type operation struct { - // execute is the operation function - execute executionFunc - constantGas uint64 - dynamicGas gasFunc - // minStack tells how many stack items are required - minStack int - // maxStack specifies the max length the stack can have for this operation - // to not overflow the stack. - maxStack int - - // memorySize returns the memory size required for the operation - memorySize memorySizeFunc -} - -var ( - frontierInstructionSet = newFrontierInstructionSet() - homesteadInstructionSet = newHomesteadInstructionSet() - tangerineWhistleInstructionSet = newTangerineWhistleInstructionSet() - spuriousDragonInstructionSet = newSpuriousDragonInstructionSet() - byzantiumInstructionSet = newByzantiumInstructionSet() - constantinopleInstructionSet = newConstantinopleInstructionSet() - istanbulInstructionSet = newIstanbulInstructionSet() - berlinInstructionSet = newBerlinInstructionSet() - londonInstructionSet = newLondonInstructionSet() - mergeInstructionSet = newMergeInstructionSet() -) - -// JumpTable contains the EVM opcodes supported at a given fork. -type JumpTable [256]*operation - -func validate(jt JumpTable) JumpTable { - for i, op := range jt { - if op == nil { - panic(fmt.Sprintf("op %#x is not set", i)) - } - // The interpreter has an assumption that if the memorySize function is - // set, then the dynamicGas function is also set. This is a somewhat - // arbitrary assumption, and can be removed if we need to -- but it - // allows us to avoid a condition check. As long as we have that assumption - // in there, this little sanity check prevents us from merging in a - // change which violates it. - if op.memorySize != nil && op.dynamicGas == nil { - panic(fmt.Sprintf("op %v has dynamic memory but not dynamic gas", OpCode(i).String())) - } - } - return jt -} - -func newMergeInstructionSet() JumpTable { - instructionSet := newLondonInstructionSet() - instructionSet[RANDOM] = &operation{ - execute: opRandom, - constantGas: GasQuickStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - } - return validate(instructionSet) -} - -// newLondonInstructionSet returns the frontier, homestead, byzantium, -// contantinople, istanbul, petersburg, berlin and london instructions. -func newLondonInstructionSet() JumpTable { - instructionSet := newBerlinInstructionSet() - enable3529(&instructionSet) // EIP-3529: Reduction in refunds https://eips.ethereum.org/EIPS/eip-3529 - enable3198(&instructionSet) // Base fee opcode https://eips.ethereum.org/EIPS/eip-3198 - return validate(instructionSet) -} - -// newBerlinInstructionSet returns the frontier, homestead, byzantium, -// contantinople, istanbul, petersburg and berlin instructions. -func newBerlinInstructionSet() JumpTable { - instructionSet := newIstanbulInstructionSet() - enable2929(&instructionSet) // Access lists for trie accesses https://eips.ethereum.org/EIPS/eip-2929 - return validate(instructionSet) -} - -// newIstanbulInstructionSet returns the frontier, homestead, byzantium, -// contantinople, istanbul and petersburg instructions. -func newIstanbulInstructionSet() JumpTable { - instructionSet := newConstantinopleInstructionSet() - - enable1344(&instructionSet) // ChainID opcode - https://eips.ethereum.org/EIPS/eip-1344 - enable1884(&instructionSet) // Reprice reader opcodes - https://eips.ethereum.org/EIPS/eip-1884 - enable2200(&instructionSet) // Net metered SSTORE - https://eips.ethereum.org/EIPS/eip-2200 - - return validate(instructionSet) -} - -// newConstantinopleInstructionSet returns the frontier, homestead, -// byzantium and contantinople instructions. -func newConstantinopleInstructionSet() JumpTable { - instructionSet := newByzantiumInstructionSet() - instructionSet[SHL] = &operation{ - execute: opSHL, - constantGas: GasFastestStep, - minStack: minStack(2, 1), - maxStack: maxStack(2, 1), - } - instructionSet[SHR] = &operation{ - execute: opSHR, - constantGas: GasFastestStep, - minStack: minStack(2, 1), - maxStack: maxStack(2, 1), - } - instructionSet[SAR] = &operation{ - execute: opSAR, - constantGas: GasFastestStep, - minStack: minStack(2, 1), - maxStack: maxStack(2, 1), - } - instructionSet[EXTCODEHASH] = &operation{ - execute: opExtCodeHash, - constantGas: params.ExtcodeHashGasConstantinople, - minStack: minStack(1, 1), - maxStack: maxStack(1, 1), - } - instructionSet[CREATE2] = &operation{ - execute: opCreate2, - constantGas: params.Create2Gas, - dynamicGas: gasCreate2, - minStack: minStack(4, 1), - maxStack: maxStack(4, 1), - memorySize: memoryCreate2, - } - return validate(instructionSet) -} - -// newByzantiumInstructionSet returns the frontier, homestead and -// byzantium instructions. -func newByzantiumInstructionSet() JumpTable { - instructionSet := newSpuriousDragonInstructionSet() - instructionSet[STATICCALL] = &operation{ - execute: opStaticCall, - constantGas: params.CallGasEIP150, - dynamicGas: gasStaticCall, - minStack: minStack(6, 1), - maxStack: maxStack(6, 1), - memorySize: memoryStaticCall, - } - instructionSet[RETURNDATASIZE] = &operation{ - execute: opReturnDataSize, - constantGas: GasQuickStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - } - instructionSet[RETURNDATACOPY] = &operation{ - execute: opReturnDataCopy, - constantGas: GasFastestStep, - dynamicGas: gasReturnDataCopy, - minStack: minStack(3, 0), - maxStack: maxStack(3, 0), - memorySize: memoryReturnDataCopy, - } - instructionSet[REVERT] = &operation{ - execute: opRevert, - dynamicGas: gasRevert, - minStack: minStack(2, 0), - maxStack: maxStack(2, 0), - memorySize: memoryRevert, - } - return validate(instructionSet) -} - -// EIP 158 a.k.a Spurious Dragon -func newSpuriousDragonInstructionSet() JumpTable { - instructionSet := newTangerineWhistleInstructionSet() - instructionSet[EXP].dynamicGas = gasExpEIP158 - return validate(instructionSet) -} - -// EIP 150 a.k.a Tangerine Whistle -func newTangerineWhistleInstructionSet() JumpTable { - instructionSet := newHomesteadInstructionSet() - instructionSet[BALANCE].constantGas = params.BalanceGasEIP150 - instructionSet[EXTCODESIZE].constantGas = params.ExtcodeSizeGasEIP150 - instructionSet[SLOAD].constantGas = params.SloadGasEIP150 - instructionSet[EXTCODECOPY].constantGas = params.ExtcodeCopyBaseEIP150 - instructionSet[CALL].constantGas = params.CallGasEIP150 - instructionSet[CALLCODE].constantGas = params.CallGasEIP150 - instructionSet[DELEGATECALL].constantGas = params.CallGasEIP150 - return validate(instructionSet) -} - -// newHomesteadInstructionSet returns the frontier and homestead -// instructions that can be executed during the homestead phase. -func newHomesteadInstructionSet() JumpTable { - instructionSet := newFrontierInstructionSet() - instructionSet[DELEGATECALL] = &operation{ - execute: opDelegateCall, - dynamicGas: gasDelegateCall, - constantGas: params.CallGasFrontier, - minStack: minStack(6, 1), - maxStack: maxStack(6, 1), - memorySize: memoryDelegateCall, - } - return validate(instructionSet) -} - -// newFrontierInstructionSet returns the frontier instructions -// that can be executed during the frontier phase. -func newFrontierInstructionSet() JumpTable { - tbl := JumpTable{ - STOP: { - execute: opStop, - constantGas: 0, - minStack: minStack(0, 0), - maxStack: maxStack(0, 0), - }, - ADD: { - execute: opAdd, - constantGas: GasFastestStep, - minStack: minStack(2, 1), - maxStack: maxStack(2, 1), - }, - MUL: { - execute: opMul, - constantGas: GasFastStep, - minStack: minStack(2, 1), - maxStack: maxStack(2, 1), - }, - SUB: { - execute: opSub, - constantGas: GasFastestStep, - minStack: minStack(2, 1), - maxStack: maxStack(2, 1), - }, - DIV: { - execute: opDiv, - constantGas: GasFastStep, - minStack: minStack(2, 1), - maxStack: maxStack(2, 1), - }, - SDIV: { - execute: opSdiv, - constantGas: GasFastStep, - minStack: minStack(2, 1), - maxStack: maxStack(2, 1), - }, - MOD: { - execute: opMod, - constantGas: GasFastStep, - minStack: minStack(2, 1), - maxStack: maxStack(2, 1), - }, - SMOD: { - execute: opSmod, - constantGas: GasFastStep, - minStack: minStack(2, 1), - maxStack: maxStack(2, 1), - }, - ADDMOD: { - execute: opAddmod, - constantGas: GasMidStep, - minStack: minStack(3, 1), - maxStack: maxStack(3, 1), - }, - MULMOD: { - execute: opMulmod, - constantGas: GasMidStep, - minStack: minStack(3, 1), - maxStack: maxStack(3, 1), - }, - EXP: { - execute: opExp, - dynamicGas: gasExpFrontier, - minStack: minStack(2, 1), - maxStack: maxStack(2, 1), - }, - SIGNEXTEND: { - execute: opSignExtend, - constantGas: GasFastStep, - minStack: minStack(2, 1), - maxStack: maxStack(2, 1), - }, - LT: { - execute: opLt, - constantGas: GasFastestStep, - minStack: minStack(2, 1), - maxStack: maxStack(2, 1), - }, - GT: { - execute: opGt, - constantGas: GasFastestStep, - minStack: minStack(2, 1), - maxStack: maxStack(2, 1), - }, - SLT: { - execute: opSlt, - constantGas: GasFastestStep, - minStack: minStack(2, 1), - maxStack: maxStack(2, 1), - }, - SGT: { - execute: opSgt, - constantGas: GasFastestStep, - minStack: minStack(2, 1), - maxStack: maxStack(2, 1), - }, - EQ: { - execute: opEq, - constantGas: GasFastestStep, - minStack: minStack(2, 1), - maxStack: maxStack(2, 1), - }, - ISZERO: { - execute: opIszero, - constantGas: GasFastestStep, - minStack: minStack(1, 1), - maxStack: maxStack(1, 1), - }, - AND: { - execute: opAnd, - constantGas: GasFastestStep, - minStack: minStack(2, 1), - maxStack: maxStack(2, 1), - }, - XOR: { - execute: opXor, - constantGas: GasFastestStep, - minStack: minStack(2, 1), - maxStack: maxStack(2, 1), - }, - OR: { - execute: opOr, - constantGas: GasFastestStep, - minStack: minStack(2, 1), - maxStack: maxStack(2, 1), - }, - NOT: { - execute: opNot, - constantGas: GasFastestStep, - minStack: minStack(1, 1), - maxStack: maxStack(1, 1), - }, - BYTE: { - execute: opByte, - constantGas: GasFastestStep, - minStack: minStack(2, 1), - maxStack: maxStack(2, 1), - }, - KECCAK256: { - execute: opKeccak256, - constantGas: params.Keccak256Gas, - dynamicGas: gasKeccak256, - minStack: minStack(2, 1), - maxStack: maxStack(2, 1), - memorySize: memoryKeccak256, - }, - ADDRESS: { - execute: opAddress, - constantGas: GasQuickStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - BALANCE: { - execute: opBalance, - constantGas: params.BalanceGasFrontier, - minStack: minStack(1, 1), - maxStack: maxStack(1, 1), - }, - ORIGIN: { - execute: opOrigin, - constantGas: GasQuickStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - CALLER: { - execute: opCaller, - constantGas: GasQuickStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - CALLVALUE: { - execute: opCallValue, - constantGas: GasQuickStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - CALLDATALOAD: { - execute: opCallDataLoad, - constantGas: GasFastestStep, - minStack: minStack(1, 1), - maxStack: maxStack(1, 1), - }, - CALLDATASIZE: { - execute: opCallDataSize, - constantGas: GasQuickStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - CALLDATACOPY: { - execute: opCallDataCopy, - constantGas: GasFastestStep, - dynamicGas: gasCallDataCopy, - minStack: minStack(3, 0), - maxStack: maxStack(3, 0), - memorySize: memoryCallDataCopy, - }, - CODESIZE: { - execute: opCodeSize, - constantGas: GasQuickStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - CODECOPY: { - execute: opCodeCopy, - constantGas: GasFastestStep, - dynamicGas: gasCodeCopy, - minStack: minStack(3, 0), - maxStack: maxStack(3, 0), - memorySize: memoryCodeCopy, - }, - GASPRICE: { - execute: opGasprice, - constantGas: GasQuickStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - EXTCODESIZE: { - execute: opExtCodeSize, - constantGas: params.ExtcodeSizeGasFrontier, - minStack: minStack(1, 1), - maxStack: maxStack(1, 1), - }, - EXTCODECOPY: { - execute: opExtCodeCopy, - constantGas: params.ExtcodeCopyBaseFrontier, - dynamicGas: gasExtCodeCopy, - minStack: minStack(4, 0), - maxStack: maxStack(4, 0), - memorySize: memoryExtCodeCopy, - }, - BLOCKHASH: { - execute: opBlockhash, - constantGas: GasExtStep, - minStack: minStack(1, 1), - maxStack: maxStack(1, 1), - }, - COINBASE: { - execute: opCoinbase, - constantGas: GasQuickStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - TIMESTAMP: { - execute: opTimestamp, - constantGas: GasQuickStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - NUMBER: { - execute: opNumber, - constantGas: GasQuickStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - DIFFICULTY: { - execute: opDifficulty, - constantGas: GasQuickStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - GASLIMIT: { - execute: opGasLimit, - constantGas: GasQuickStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - POP: { - execute: opPop, - constantGas: GasQuickStep, - minStack: minStack(1, 0), - maxStack: maxStack(1, 0), - }, - MLOAD: { - execute: opMload, - constantGas: GasFastestStep, - dynamicGas: gasMLoad, - minStack: minStack(1, 1), - maxStack: maxStack(1, 1), - memorySize: memoryMLoad, - }, - MSTORE: { - execute: opMstore, - constantGas: GasFastestStep, - dynamicGas: gasMStore, - minStack: minStack(2, 0), - maxStack: maxStack(2, 0), - memorySize: memoryMStore, - }, - MSTORE8: { - execute: opMstore8, - constantGas: GasFastestStep, - dynamicGas: gasMStore8, - memorySize: memoryMStore8, - minStack: minStack(2, 0), - maxStack: maxStack(2, 0), - }, - SLOAD: { - execute: opSload, - constantGas: params.SloadGasFrontier, - minStack: minStack(1, 1), - maxStack: maxStack(1, 1), - }, - SSTORE: { - execute: opSstore, - dynamicGas: gasSStore, - minStack: minStack(2, 0), - maxStack: maxStack(2, 0), - }, - JUMP: { - execute: opJump, - constantGas: GasMidStep, - minStack: minStack(1, 0), - maxStack: maxStack(1, 0), - }, - JUMPI: { - execute: opJumpi, - constantGas: GasSlowStep, - minStack: minStack(2, 0), - maxStack: maxStack(2, 0), - }, - PC: { - execute: opPc, - constantGas: GasQuickStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - MSIZE: { - execute: opMsize, - constantGas: GasQuickStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - GAS: { - execute: opGas, - constantGas: GasQuickStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - JUMPDEST: { - execute: opJumpdest, - constantGas: params.JumpdestGas, - minStack: minStack(0, 0), - maxStack: maxStack(0, 0), - }, - PUSH1: { - execute: opPush1, - constantGas: GasFastestStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - PUSH2: { - execute: makePush(2, 2), - constantGas: GasFastestStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - PUSH3: { - execute: makePush(3, 3), - constantGas: GasFastestStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - PUSH4: { - execute: makePush(4, 4), - constantGas: GasFastestStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - PUSH5: { - execute: makePush(5, 5), - constantGas: GasFastestStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - PUSH6: { - execute: makePush(6, 6), - constantGas: GasFastestStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - PUSH7: { - execute: makePush(7, 7), - constantGas: GasFastestStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - PUSH8: { - execute: makePush(8, 8), - constantGas: GasFastestStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - PUSH9: { - execute: makePush(9, 9), - constantGas: GasFastestStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - PUSH10: { - execute: makePush(10, 10), - constantGas: GasFastestStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - PUSH11: { - execute: makePush(11, 11), - constantGas: GasFastestStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - PUSH12: { - execute: makePush(12, 12), - constantGas: GasFastestStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - PUSH13: { - execute: makePush(13, 13), - constantGas: GasFastestStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - PUSH14: { - execute: makePush(14, 14), - constantGas: GasFastestStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - PUSH15: { - execute: makePush(15, 15), - constantGas: GasFastestStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - PUSH16: { - execute: makePush(16, 16), - constantGas: GasFastestStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - PUSH17: { - execute: makePush(17, 17), - constantGas: GasFastestStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - PUSH18: { - execute: makePush(18, 18), - constantGas: GasFastestStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - PUSH19: { - execute: makePush(19, 19), - constantGas: GasFastestStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - PUSH20: { - execute: makePush(20, 20), - constantGas: GasFastestStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - PUSH21: { - execute: makePush(21, 21), - constantGas: GasFastestStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - PUSH22: { - execute: makePush(22, 22), - constantGas: GasFastestStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - PUSH23: { - execute: makePush(23, 23), - constantGas: GasFastestStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - PUSH24: { - execute: makePush(24, 24), - constantGas: GasFastestStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - PUSH25: { - execute: makePush(25, 25), - constantGas: GasFastestStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - PUSH26: { - execute: makePush(26, 26), - constantGas: GasFastestStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - PUSH27: { - execute: makePush(27, 27), - constantGas: GasFastestStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - PUSH28: { - execute: makePush(28, 28), - constantGas: GasFastestStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - PUSH29: { - execute: makePush(29, 29), - constantGas: GasFastestStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - PUSH30: { - execute: makePush(30, 30), - constantGas: GasFastestStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - PUSH31: { - execute: makePush(31, 31), - constantGas: GasFastestStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - PUSH32: { - execute: makePush(32, 32), - constantGas: GasFastestStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - DUP1: { - execute: makeDup(1), - constantGas: GasFastestStep, - minStack: minDupStack(1), - maxStack: maxDupStack(1), - }, - DUP2: { - execute: makeDup(2), - constantGas: GasFastestStep, - minStack: minDupStack(2), - maxStack: maxDupStack(2), - }, - DUP3: { - execute: makeDup(3), - constantGas: GasFastestStep, - minStack: minDupStack(3), - maxStack: maxDupStack(3), - }, - DUP4: { - execute: makeDup(4), - constantGas: GasFastestStep, - minStack: minDupStack(4), - maxStack: maxDupStack(4), - }, - DUP5: { - execute: makeDup(5), - constantGas: GasFastestStep, - minStack: minDupStack(5), - maxStack: maxDupStack(5), - }, - DUP6: { - execute: makeDup(6), - constantGas: GasFastestStep, - minStack: minDupStack(6), - maxStack: maxDupStack(6), - }, - DUP7: { - execute: makeDup(7), - constantGas: GasFastestStep, - minStack: minDupStack(7), - maxStack: maxDupStack(7), - }, - DUP8: { - execute: makeDup(8), - constantGas: GasFastestStep, - minStack: minDupStack(8), - maxStack: maxDupStack(8), - }, - DUP9: { - execute: makeDup(9), - constantGas: GasFastestStep, - minStack: minDupStack(9), - maxStack: maxDupStack(9), - }, - DUP10: { - execute: makeDup(10), - constantGas: GasFastestStep, - minStack: minDupStack(10), - maxStack: maxDupStack(10), - }, - DUP11: { - execute: makeDup(11), - constantGas: GasFastestStep, - minStack: minDupStack(11), - maxStack: maxDupStack(11), - }, - DUP12: { - execute: makeDup(12), - constantGas: GasFastestStep, - minStack: minDupStack(12), - maxStack: maxDupStack(12), - }, - DUP13: { - execute: makeDup(13), - constantGas: GasFastestStep, - minStack: minDupStack(13), - maxStack: maxDupStack(13), - }, - DUP14: { - execute: makeDup(14), - constantGas: GasFastestStep, - minStack: minDupStack(14), - maxStack: maxDupStack(14), - }, - DUP15: { - execute: makeDup(15), - constantGas: GasFastestStep, - minStack: minDupStack(15), - maxStack: maxDupStack(15), - }, - DUP16: { - execute: makeDup(16), - constantGas: GasFastestStep, - minStack: minDupStack(16), - maxStack: maxDupStack(16), - }, - SWAP1: { - execute: makeSwap(1), - constantGas: GasFastestStep, - minStack: minSwapStack(2), - maxStack: maxSwapStack(2), - }, - SWAP2: { - execute: makeSwap(2), - constantGas: GasFastestStep, - minStack: minSwapStack(3), - maxStack: maxSwapStack(3), - }, - SWAP3: { - execute: makeSwap(3), - constantGas: GasFastestStep, - minStack: minSwapStack(4), - maxStack: maxSwapStack(4), - }, - SWAP4: { - execute: makeSwap(4), - constantGas: GasFastestStep, - minStack: minSwapStack(5), - maxStack: maxSwapStack(5), - }, - SWAP5: { - execute: makeSwap(5), - constantGas: GasFastestStep, - minStack: minSwapStack(6), - maxStack: maxSwapStack(6), - }, - SWAP6: { - execute: makeSwap(6), - constantGas: GasFastestStep, - minStack: minSwapStack(7), - maxStack: maxSwapStack(7), - }, - SWAP7: { - execute: makeSwap(7), - constantGas: GasFastestStep, - minStack: minSwapStack(8), - maxStack: maxSwapStack(8), - }, - SWAP8: { - execute: makeSwap(8), - constantGas: GasFastestStep, - minStack: minSwapStack(9), - maxStack: maxSwapStack(9), - }, - SWAP9: { - execute: makeSwap(9), - constantGas: GasFastestStep, - minStack: minSwapStack(10), - maxStack: maxSwapStack(10), - }, - SWAP10: { - execute: makeSwap(10), - constantGas: GasFastestStep, - minStack: minSwapStack(11), - maxStack: maxSwapStack(11), - }, - SWAP11: { - execute: makeSwap(11), - constantGas: GasFastestStep, - minStack: minSwapStack(12), - maxStack: maxSwapStack(12), - }, - SWAP12: { - execute: makeSwap(12), - constantGas: GasFastestStep, - minStack: minSwapStack(13), - maxStack: maxSwapStack(13), - }, - SWAP13: { - execute: makeSwap(13), - constantGas: GasFastestStep, - minStack: minSwapStack(14), - maxStack: maxSwapStack(14), - }, - SWAP14: { - execute: makeSwap(14), - constantGas: GasFastestStep, - minStack: minSwapStack(15), - maxStack: maxSwapStack(15), - }, - SWAP15: { - execute: makeSwap(15), - constantGas: GasFastestStep, - minStack: minSwapStack(16), - maxStack: maxSwapStack(16), - }, - SWAP16: { - execute: makeSwap(16), - constantGas: GasFastestStep, - minStack: minSwapStack(17), - maxStack: maxSwapStack(17), - }, - LOG0: { - execute: makeLog(0), - dynamicGas: makeGasLog(0), - minStack: minStack(2, 0), - maxStack: maxStack(2, 0), - memorySize: memoryLog, - }, - LOG1: { - execute: makeLog(1), - dynamicGas: makeGasLog(1), - minStack: minStack(3, 0), - maxStack: maxStack(3, 0), - memorySize: memoryLog, - }, - LOG2: { - execute: makeLog(2), - dynamicGas: makeGasLog(2), - minStack: minStack(4, 0), - maxStack: maxStack(4, 0), - memorySize: memoryLog, - }, - LOG3: { - execute: makeLog(3), - dynamicGas: makeGasLog(3), - minStack: minStack(5, 0), - maxStack: maxStack(5, 0), - memorySize: memoryLog, - }, - LOG4: { - execute: makeLog(4), - dynamicGas: makeGasLog(4), - minStack: minStack(6, 0), - maxStack: maxStack(6, 0), - memorySize: memoryLog, - }, - CREATE: { - execute: opCreate, - constantGas: params.CreateGas, - dynamicGas: gasCreate, - minStack: minStack(3, 1), - maxStack: maxStack(3, 1), - memorySize: memoryCreate, - }, - CALL: { - execute: opCall, - constantGas: params.CallGasFrontier, - dynamicGas: gasCall, - minStack: minStack(7, 1), - maxStack: maxStack(7, 1), - memorySize: memoryCall, - }, - CALLCODE: { - execute: opCallCode, - constantGas: params.CallGasFrontier, - dynamicGas: gasCallCode, - minStack: minStack(7, 1), - maxStack: maxStack(7, 1), - memorySize: memoryCall, - }, - RETURN: { - execute: opReturn, - dynamicGas: gasReturn, - minStack: minStack(2, 0), - maxStack: maxStack(2, 0), - memorySize: memoryReturn, - }, - SELFDESTRUCT: { - execute: opSelfdestruct, - dynamicGas: gasSelfdestruct, - minStack: minStack(1, 0), - maxStack: maxStack(1, 0), - }, - } - - // Fill all unassigned slots with opUndefined. - for i, entry := range tbl { - if entry == nil { - tbl[i] = &operation{execute: opUndefined, maxStack: maxStack(0, 0)} - } - } - - return validate(tbl) -} - -// newKeeperInstructionSet returns an updated instructions with modified "call" call for -// custom stratos execution -// NOTE: Maybe we should make on our specific update, instead of apply on go-ethereum update -// see a top lines with instructions sets -func newKeeperInstructionSet(instructionSet JumpTable) JumpTable { - instructionSet[PREPAY] = &operation{ - execute: opPrepay, - constantGas: CallGasPrepay, - dynamicGas: gasPrepay, - minStack: minStack(6, 1), - maxStack: maxStack(6, 1), - memorySize: memoryPrepay, - } - - return validate(instructionSet) -} diff --git a/x/evm/vm/keeper_amplifier.go b/x/evm/vm/keeper_amplifier.go deleted file mode 100644 index 28f0ac9d..00000000 --- a/x/evm/vm/keeper_amplifier.go +++ /dev/null @@ -1,28 +0,0 @@ -package vm - -var handlerNumToOpcode = map[int64]OpCode{ - 0xf1: PREPAY, -} - -func wrapWithKeeper(op OpCode, interpreter *EVMInterpreter, scope *ScopeContext) *operation { - // only CALL for solpatching - if op != CALL { - return interpreter.getOperation(op) - } - - stack := scope.Stack - addr := stack.Back(1) - opKey := addr.ToBig().Int64() - - // determine opcode with reserved address for amplification - opToOverride, ok := handlerNumToOpcode[opKey] - if !ok { - return interpreter.getOperation(op) - } - - // swaping callGasTemp with addr and replace with gas to decrase params - stack.swap(2) - stack.pop() - - return interpreter.getOperation(opToOverride) -} diff --git a/x/evm/vm/logger.go b/x/evm/vm/logger.go deleted file mode 100644 index 50fccafc..00000000 --- a/x/evm/vm/logger.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. -// -// The go-ethereum library is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// The go-ethereum library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . - -package vm - -import ( - "math/big" - "time" - - "github.com/ethereum/go-ethereum/common" -) - -// EVMLogger is used to collect execution traces from an EVM transaction -// execution. CaptureState is called for each step of the VM with the -// current VM state. -// Note that reference types are actual VM data structures; make copies -// if you need to retain them beyond the current call. -type EVMLogger interface { - // Transaction level - CaptureTxStart(gasLimit uint64) - CaptureTxEnd(restGas uint64) - // Top call frame - CaptureStart(env *EVM, from common.Address, to common.Address, create bool, input []byte, gas uint64, value *big.Int) - CaptureEnd(output []byte, gasUsed uint64, t time.Duration, err error) - // Rest of call frames - CaptureEnter(typ OpCode, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) - CaptureExit(output []byte, gasUsed uint64, err error) - // Opcode level - CaptureState(pc uint64, op OpCode, gas, cost uint64, scope *ScopeContext, rData []byte, depth int, err error) - CaptureFault(pc uint64, op OpCode, gas, cost uint64, scope *ScopeContext, depth int, err error) -} diff --git a/x/evm/vm/memory.go b/x/evm/vm/memory.go deleted file mode 100644 index 35b72999..00000000 --- a/x/evm/vm/memory.go +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. -// -// The go-ethereum library is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// The go-ethereum library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . - -package vm - -import ( - "github.com/holiman/uint256" -) - -// Memory implements a simple memory model for the ethereum virtual machine. -type Memory struct { - store []byte - lastGasCost uint64 -} - -// NewMemory returns a new memory model. -func NewMemory() *Memory { - return &Memory{} -} - -// Set sets offset + size to value -func (m *Memory) Set(offset, size uint64, value []byte) { - // It's possible the offset is greater than 0 and size equals 0. This is because - // the calcMemSize (common.go) could potentially return 0 when size is zero (NO-OP) - if size > 0 { - // length of store may never be less than offset + size. - // The store should be resized PRIOR to setting the memory - if offset+size > uint64(len(m.store)) { - panic("invalid memory: store empty") - } - copy(m.store[offset:offset+size], value) - } -} - -// Set32 sets the 32 bytes starting at offset to the value of val, left-padded with zeroes to -// 32 bytes. -func (m *Memory) Set32(offset uint64, val *uint256.Int) { - // length of store may never be less than offset + size. - // The store should be resized PRIOR to setting the memory - if offset+32 > uint64(len(m.store)) { - panic("invalid memory: store empty") - } - // Fill in relevant bits - b32 := val.Bytes32() - copy(m.store[offset:], b32[:]) -} - -// Resize resizes the memory to size -func (m *Memory) Resize(size uint64) { - if uint64(m.Len()) < size { - m.store = append(m.store, make([]byte, size-uint64(m.Len()))...) - } -} - -// GetCopy returns offset + size as a new slice -func (m *Memory) GetCopy(offset, size int64) (cpy []byte) { - if size == 0 { - return nil - } - - if len(m.store) > int(offset) { - cpy = make([]byte, size) - copy(cpy, m.store[offset:offset+size]) - - return - } - - return -} - -// GetPtr returns the offset + size -func (m *Memory) GetPtr(offset, size int64) []byte { - if size == 0 { - return nil - } - - if len(m.store) > int(offset) { - return m.store[offset : offset+size] - } - - return nil -} - -// Len returns the length of the backing slice -func (m *Memory) Len() int { - return len(m.store) -} - -// Data returns the backing slice -func (m *Memory) Data() []byte { - return m.store -} diff --git a/x/evm/vm/memory_table.go b/x/evm/vm/memory_table.go deleted file mode 100644 index 0769e88e..00000000 --- a/x/evm/vm/memory_table.go +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright 2017 The go-ethereum Authors -// This file is part of the go-ethereum library. -// -// The go-ethereum library is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// The go-ethereum library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . - -package vm - -func memoryKeccak256(stack *Stack) (uint64, bool) { - return calcMemSize64(stack.Back(0), stack.Back(1)) -} - -func memoryCallDataCopy(stack *Stack) (uint64, bool) { - return calcMemSize64(stack.Back(0), stack.Back(2)) -} - -func memoryReturnDataCopy(stack *Stack) (uint64, bool) { - return calcMemSize64(stack.Back(0), stack.Back(2)) -} - -func memoryCodeCopy(stack *Stack) (uint64, bool) { - return calcMemSize64(stack.Back(0), stack.Back(2)) -} - -func memoryExtCodeCopy(stack *Stack) (uint64, bool) { - return calcMemSize64(stack.Back(1), stack.Back(3)) -} - -func memoryMLoad(stack *Stack) (uint64, bool) { - return calcMemSize64WithUint(stack.Back(0), 32) -} - -func memoryMStore8(stack *Stack) (uint64, bool) { - return calcMemSize64WithUint(stack.Back(0), 1) -} - -func memoryMStore(stack *Stack) (uint64, bool) { - return calcMemSize64WithUint(stack.Back(0), 32) -} - -func memoryCreate(stack *Stack) (uint64, bool) { - return calcMemSize64(stack.Back(1), stack.Back(2)) -} - -func memoryCreate2(stack *Stack) (uint64, bool) { - return calcMemSize64(stack.Back(1), stack.Back(2)) -} - -func memoryCall(stack *Stack) (uint64, bool) { - x, overflow := calcMemSize64(stack.Back(5), stack.Back(6)) - if overflow { - return 0, true - } - y, overflow := calcMemSize64(stack.Back(3), stack.Back(4)) - if overflow { - return 0, true - } - if x > y { - return x, false - } - return y, false -} -func memoryDelegateCall(stack *Stack) (uint64, bool) { - x, overflow := calcMemSize64(stack.Back(4), stack.Back(5)) - if overflow { - return 0, true - } - y, overflow := calcMemSize64(stack.Back(2), stack.Back(3)) - if overflow { - return 0, true - } - if x > y { - return x, false - } - return y, false -} - -func memoryStaticCall(stack *Stack) (uint64, bool) { - x, overflow := calcMemSize64(stack.Back(4), stack.Back(5)) - if overflow { - return 0, true - } - y, overflow := calcMemSize64(stack.Back(2), stack.Back(3)) - if overflow { - return 0, true - } - if x > y { - return x, false - } - return y, false -} - -func memoryReturn(stack *Stack) (uint64, bool) { - return calcMemSize64(stack.Back(0), stack.Back(1)) -} - -func memoryRevert(stack *Stack) (uint64, bool) { - return calcMemSize64(stack.Back(0), stack.Back(1)) -} - -func memoryLog(stack *Stack) (uint64, bool) { - return calcMemSize64(stack.Back(0), stack.Back(1)) -} - -func memoryPrepay(stack *Stack) (uint64, bool) { - x, overflow := calcMemSize64(stack.Back(4), stack.Back(5)) - if overflow { - return 0, true - } - y, overflow := calcMemSize64(stack.Back(2), stack.Back(3)) - if overflow { - return 0, true - } - if x > y { - return x, false - } - return y, false -} diff --git a/x/evm/vm/opcodes.go b/x/evm/vm/opcodes.go deleted file mode 100644 index 9caae9d2..00000000 --- a/x/evm/vm/opcodes.go +++ /dev/null @@ -1,562 +0,0 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. -// -// The go-ethereum library is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// The go-ethereum library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . - -package vm - -import ( - "fmt" -) - -// OpCode is an EVM opcode -type OpCode byte - -// IsPush specifies if an opcode is a PUSH opcode. -func (op OpCode) IsPush() bool { - switch op { - case PUSH1, PUSH2, PUSH3, PUSH4, PUSH5, PUSH6, PUSH7, PUSH8, PUSH9, PUSH10, PUSH11, PUSH12, PUSH13, PUSH14, PUSH15, PUSH16, PUSH17, PUSH18, PUSH19, PUSH20, PUSH21, PUSH22, PUSH23, PUSH24, PUSH25, PUSH26, PUSH27, PUSH28, PUSH29, PUSH30, PUSH31, PUSH32: - return true - } - return false -} - -// 0x0 range - arithmetic ops. -const ( - STOP OpCode = 0x0 - ADD OpCode = 0x1 - MUL OpCode = 0x2 - SUB OpCode = 0x3 - DIV OpCode = 0x4 - SDIV OpCode = 0x5 - MOD OpCode = 0x6 - SMOD OpCode = 0x7 - ADDMOD OpCode = 0x8 - MULMOD OpCode = 0x9 - EXP OpCode = 0xa - SIGNEXTEND OpCode = 0xb -) - -// 0x10 range - comparison ops. -const ( - LT OpCode = 0x10 - GT OpCode = 0x11 - SLT OpCode = 0x12 - SGT OpCode = 0x13 - EQ OpCode = 0x14 - ISZERO OpCode = 0x15 - AND OpCode = 0x16 - OR OpCode = 0x17 - XOR OpCode = 0x18 - NOT OpCode = 0x19 - BYTE OpCode = 0x1a - SHL OpCode = 0x1b - SHR OpCode = 0x1c - SAR OpCode = 0x1d -) - -// 0x20 range - crypto. -const ( - KECCAK256 OpCode = 0x20 -) - -// 0x30 range - closure state. -const ( - ADDRESS OpCode = 0x30 - BALANCE OpCode = 0x31 - ORIGIN OpCode = 0x32 - CALLER OpCode = 0x33 - CALLVALUE OpCode = 0x34 - CALLDATALOAD OpCode = 0x35 - CALLDATASIZE OpCode = 0x36 - CALLDATACOPY OpCode = 0x37 - CODESIZE OpCode = 0x38 - CODECOPY OpCode = 0x39 - GASPRICE OpCode = 0x3a - EXTCODESIZE OpCode = 0x3b - EXTCODECOPY OpCode = 0x3c - RETURNDATASIZE OpCode = 0x3d - RETURNDATACOPY OpCode = 0x3e - EXTCODEHASH OpCode = 0x3f -) - -// 0x40 range - block operations. -const ( - BLOCKHASH OpCode = 0x40 - COINBASE OpCode = 0x41 - TIMESTAMP OpCode = 0x42 - NUMBER OpCode = 0x43 - DIFFICULTY OpCode = 0x44 - RANDOM OpCode = 0x44 // Same as DIFFICULTY - GASLIMIT OpCode = 0x45 - CHAINID OpCode = 0x46 - SELFBALANCE OpCode = 0x47 - BASEFEE OpCode = 0x48 -) - -// 0x50 range - 'storage' and execution. -const ( - POP OpCode = 0x50 - MLOAD OpCode = 0x51 - MSTORE OpCode = 0x52 - MSTORE8 OpCode = 0x53 - SLOAD OpCode = 0x54 - SSTORE OpCode = 0x55 - JUMP OpCode = 0x56 - JUMPI OpCode = 0x57 - PC OpCode = 0x58 - MSIZE OpCode = 0x59 - GAS OpCode = 0x5a - JUMPDEST OpCode = 0x5b - PUSH0 OpCode = 0x5f -) - -// 0x60 range - pushes. -const ( - PUSH1 OpCode = 0x60 + iota - PUSH2 - PUSH3 - PUSH4 - PUSH5 - PUSH6 - PUSH7 - PUSH8 - PUSH9 - PUSH10 - PUSH11 - PUSH12 - PUSH13 - PUSH14 - PUSH15 - PUSH16 - PUSH17 - PUSH18 - PUSH19 - PUSH20 - PUSH21 - PUSH22 - PUSH23 - PUSH24 - PUSH25 - PUSH26 - PUSH27 - PUSH28 - PUSH29 - PUSH30 - PUSH31 - PUSH32 -) - -// 0x80 range - dups. -const ( - DUP1 = 0x80 + iota - DUP2 - DUP3 - DUP4 - DUP5 - DUP6 - DUP7 - DUP8 - DUP9 - DUP10 - DUP11 - DUP12 - DUP13 - DUP14 - DUP15 - DUP16 -) - -// 0x90 range - swaps. -const ( - SWAP1 = 0x90 + iota - SWAP2 - SWAP3 - SWAP4 - SWAP5 - SWAP6 - SWAP7 - SWAP8 - SWAP9 - SWAP10 - SWAP11 - SWAP12 - SWAP13 - SWAP14 - SWAP15 - SWAP16 -) - -// 0xa0 range - logging ops. -const ( - LOG0 OpCode = 0xa0 + iota - LOG1 - LOG2 - LOG3 - LOG4 -) - -// 0xdc range - closures. Stratos chain only -const ( - PREPAY OpCode = 0xdc -) - -// 0xf0 range - closures. -const ( - CREATE OpCode = 0xf0 - CALL OpCode = 0xf1 - CALLCODE OpCode = 0xf2 - RETURN OpCode = 0xf3 - DELEGATECALL OpCode = 0xf4 - CREATE2 OpCode = 0xf5 - - STATICCALL OpCode = 0xfa - REVERT OpCode = 0xfd - INVALID OpCode = 0xfe - SELFDESTRUCT OpCode = 0xff -) - -// Since the opcodes aren't all in order we can't use a regular slice. -var opCodeToString = map[OpCode]string{ - // 0x0 range - arithmetic ops. - STOP: "STOP", - ADD: "ADD", - MUL: "MUL", - SUB: "SUB", - DIV: "DIV", - SDIV: "SDIV", - MOD: "MOD", - SMOD: "SMOD", - EXP: "EXP", - NOT: "NOT", - LT: "LT", - GT: "GT", - SLT: "SLT", - SGT: "SGT", - EQ: "EQ", - ISZERO: "ISZERO", - SIGNEXTEND: "SIGNEXTEND", - - // 0x10 range - bit ops. - AND: "AND", - OR: "OR", - XOR: "XOR", - BYTE: "BYTE", - SHL: "SHL", - SHR: "SHR", - SAR: "SAR", - ADDMOD: "ADDMOD", - MULMOD: "MULMOD", - - // 0x20 range - crypto. - KECCAK256: "KECCAK256", - - // 0x30 range - closure state. - ADDRESS: "ADDRESS", - BALANCE: "BALANCE", - ORIGIN: "ORIGIN", - CALLER: "CALLER", - CALLVALUE: "CALLVALUE", - CALLDATALOAD: "CALLDATALOAD", - CALLDATASIZE: "CALLDATASIZE", - CALLDATACOPY: "CALLDATACOPY", - CODESIZE: "CODESIZE", - CODECOPY: "CODECOPY", - GASPRICE: "GASPRICE", - EXTCODESIZE: "EXTCODESIZE", - EXTCODECOPY: "EXTCODECOPY", - RETURNDATASIZE: "RETURNDATASIZE", - RETURNDATACOPY: "RETURNDATACOPY", - EXTCODEHASH: "EXTCODEHASH", - - // 0x40 range - block operations. - BLOCKHASH: "BLOCKHASH", - COINBASE: "COINBASE", - TIMESTAMP: "TIMESTAMP", - NUMBER: "NUMBER", - DIFFICULTY: "DIFFICULTY", // TODO (MariusVanDerWijden) rename to RANDOM post merge - GASLIMIT: "GASLIMIT", - CHAINID: "CHAINID", - SELFBALANCE: "SELFBALANCE", - BASEFEE: "BASEFEE", - - // 0x50 range - 'storage' and execution. - POP: "POP", - //DUP: "DUP", - //SWAP: "SWAP", - MLOAD: "MLOAD", - MSTORE: "MSTORE", - MSTORE8: "MSTORE8", - SLOAD: "SLOAD", - SSTORE: "SSTORE", - JUMP: "JUMP", - JUMPI: "JUMPI", - PC: "PC", - MSIZE: "MSIZE", - GAS: "GAS", - JUMPDEST: "JUMPDEST", - PUSH0: "PUSH0", - - // 0x60 range - push. - PUSH1: "PUSH1", - PUSH2: "PUSH2", - PUSH3: "PUSH3", - PUSH4: "PUSH4", - PUSH5: "PUSH5", - PUSH6: "PUSH6", - PUSH7: "PUSH7", - PUSH8: "PUSH8", - PUSH9: "PUSH9", - PUSH10: "PUSH10", - PUSH11: "PUSH11", - PUSH12: "PUSH12", - PUSH13: "PUSH13", - PUSH14: "PUSH14", - PUSH15: "PUSH15", - PUSH16: "PUSH16", - PUSH17: "PUSH17", - PUSH18: "PUSH18", - PUSH19: "PUSH19", - PUSH20: "PUSH20", - PUSH21: "PUSH21", - PUSH22: "PUSH22", - PUSH23: "PUSH23", - PUSH24: "PUSH24", - PUSH25: "PUSH25", - PUSH26: "PUSH26", - PUSH27: "PUSH27", - PUSH28: "PUSH28", - PUSH29: "PUSH29", - PUSH30: "PUSH30", - PUSH31: "PUSH31", - PUSH32: "PUSH32", - - DUP1: "DUP1", - DUP2: "DUP2", - DUP3: "DUP3", - DUP4: "DUP4", - DUP5: "DUP5", - DUP6: "DUP6", - DUP7: "DUP7", - DUP8: "DUP8", - DUP9: "DUP9", - DUP10: "DUP10", - DUP11: "DUP11", - DUP12: "DUP12", - DUP13: "DUP13", - DUP14: "DUP14", - DUP15: "DUP15", - DUP16: "DUP16", - - SWAP1: "SWAP1", - SWAP2: "SWAP2", - SWAP3: "SWAP3", - SWAP4: "SWAP4", - SWAP5: "SWAP5", - SWAP6: "SWAP6", - SWAP7: "SWAP7", - SWAP8: "SWAP8", - SWAP9: "SWAP9", - SWAP10: "SWAP10", - SWAP11: "SWAP11", - SWAP12: "SWAP12", - SWAP13: "SWAP13", - SWAP14: "SWAP14", - SWAP15: "SWAP15", - SWAP16: "SWAP16", - LOG0: "LOG0", - LOG1: "LOG1", - LOG2: "LOG2", - LOG3: "LOG3", - LOG4: "LOG4", - - // 0xdc range. - PREPAY: "PREPAY", - - // 0xf0 range. - CREATE: "CREATE", - CALL: "CALL", - RETURN: "RETURN", - CALLCODE: "CALLCODE", - DELEGATECALL: "DELEGATECALL", - CREATE2: "CREATE2", - STATICCALL: "STATICCALL", - REVERT: "REVERT", - INVALID: "INVALID", - SELFDESTRUCT: "SELFDESTRUCT", -} - -func (op OpCode) String() string { - str := opCodeToString[op] - if len(str) == 0 { - return fmt.Sprintf("opcode %#x not defined", int(op)) - } - - return str -} - -var stringToOp = map[string]OpCode{ - "STOP": STOP, - "ADD": ADD, - "MUL": MUL, - "SUB": SUB, - "DIV": DIV, - "SDIV": SDIV, - "MOD": MOD, - "SMOD": SMOD, - "EXP": EXP, - "NOT": NOT, - "LT": LT, - "GT": GT, - "SLT": SLT, - "SGT": SGT, - "EQ": EQ, - "ISZERO": ISZERO, - "SIGNEXTEND": SIGNEXTEND, - "AND": AND, - "OR": OR, - "XOR": XOR, - "BYTE": BYTE, - "SHL": SHL, - "SHR": SHR, - "SAR": SAR, - "ADDMOD": ADDMOD, - "MULMOD": MULMOD, - "KECCAK256": KECCAK256, - "ADDRESS": ADDRESS, - "BALANCE": BALANCE, - "ORIGIN": ORIGIN, - "CALLER": CALLER, - "CALLVALUE": CALLVALUE, - "CALLDATALOAD": CALLDATALOAD, - "CALLDATASIZE": CALLDATASIZE, - "CALLDATACOPY": CALLDATACOPY, - "CHAINID": CHAINID, - "BASEFEE": BASEFEE, - "DELEGATECALL": DELEGATECALL, - "STATICCALL": STATICCALL, - "CODESIZE": CODESIZE, - "CODECOPY": CODECOPY, - "GASPRICE": GASPRICE, - "EXTCODESIZE": EXTCODESIZE, - "EXTCODECOPY": EXTCODECOPY, - "RETURNDATASIZE": RETURNDATASIZE, - "RETURNDATACOPY": RETURNDATACOPY, - "EXTCODEHASH": EXTCODEHASH, - "BLOCKHASH": BLOCKHASH, - "COINBASE": COINBASE, - "TIMESTAMP": TIMESTAMP, - "NUMBER": NUMBER, - "DIFFICULTY": DIFFICULTY, - "GASLIMIT": GASLIMIT, - "SELFBALANCE": SELFBALANCE, - "POP": POP, - "MLOAD": MLOAD, - "MSTORE": MSTORE, - "MSTORE8": MSTORE8, - "SLOAD": SLOAD, - "SSTORE": SSTORE, - "JUMP": JUMP, - "JUMPI": JUMPI, - "PC": PC, - "MSIZE": MSIZE, - "GAS": GAS, - "JUMPDEST": JUMPDEST, - "PUSH0": PUSH0, - "PUSH1": PUSH1, - "PUSH2": PUSH2, - "PUSH3": PUSH3, - "PUSH4": PUSH4, - "PUSH5": PUSH5, - "PUSH6": PUSH6, - "PUSH7": PUSH7, - "PUSH8": PUSH8, - "PUSH9": PUSH9, - "PUSH10": PUSH10, - "PUSH11": PUSH11, - "PUSH12": PUSH12, - "PUSH13": PUSH13, - "PUSH14": PUSH14, - "PUSH15": PUSH15, - "PUSH16": PUSH16, - "PUSH17": PUSH17, - "PUSH18": PUSH18, - "PUSH19": PUSH19, - "PUSH20": PUSH20, - "PUSH21": PUSH21, - "PUSH22": PUSH22, - "PUSH23": PUSH23, - "PUSH24": PUSH24, - "PUSH25": PUSH25, - "PUSH26": PUSH26, - "PUSH27": PUSH27, - "PUSH28": PUSH28, - "PUSH29": PUSH29, - "PUSH30": PUSH30, - "PUSH31": PUSH31, - "PUSH32": PUSH32, - "DUP1": DUP1, - "DUP2": DUP2, - "DUP3": DUP3, - "DUP4": DUP4, - "DUP5": DUP5, - "DUP6": DUP6, - "DUP7": DUP7, - "DUP8": DUP8, - "DUP9": DUP9, - "DUP10": DUP10, - "DUP11": DUP11, - "DUP12": DUP12, - "DUP13": DUP13, - "DUP14": DUP14, - "DUP15": DUP15, - "DUP16": DUP16, - "SWAP1": SWAP1, - "SWAP2": SWAP2, - "SWAP3": SWAP3, - "SWAP4": SWAP4, - "SWAP5": SWAP5, - "SWAP6": SWAP6, - "SWAP7": SWAP7, - "SWAP8": SWAP8, - "SWAP9": SWAP9, - "SWAP10": SWAP10, - "SWAP11": SWAP11, - "SWAP12": SWAP12, - "SWAP13": SWAP13, - "SWAP14": SWAP14, - "SWAP15": SWAP15, - "SWAP16": SWAP16, - "LOG0": LOG0, - "LOG1": LOG1, - "LOG2": LOG2, - "LOG3": LOG3, - "LOG4": LOG4, - "CREATE": CREATE, - "CREATE2": CREATE2, - "CALL": CALL, - "RETURN": RETURN, - "CALLCODE": CALLCODE, - "REVERT": REVERT, - "INVALID": INVALID, - "SELFDESTRUCT": SELFDESTRUCT, - - // new - "PREPAY": PREPAY, -} - -// StringToOp finds the opcode whose name is stored in `str`. -func StringToOp(str string) OpCode { - return stringToOp[str] -} diff --git a/x/evm/vm/operations_acl.go b/x/evm/vm/operations_acl.go deleted file mode 100644 index 551e1f5f..00000000 --- a/x/evm/vm/operations_acl.go +++ /dev/null @@ -1,244 +0,0 @@ -// Copyright 2020 The go-ethereum Authors -// This file is part of the go-ethereum library. -// -// The go-ethereum library is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// The go-ethereum library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . - -package vm - -import ( - "errors" - - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/math" - "github.com/ethereum/go-ethereum/params" -) - -func makeGasSStoreFunc(clearingRefund uint64) gasFunc { - return func(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { - // If we fail the minimum gas availability invariant, fail (0) - if contract.Gas <= params.SstoreSentryGasEIP2200 { - return 0, errors.New("not enough gas for reentrancy sentry") - } - // Gas sentry honoured, do the actual gas calculation based on the stored value - var ( - y, x = stack.Back(1), stack.peek() - slot = common.Hash(x.Bytes32()) - current = evm.StateDB.GetState(contract.Address(), slot) - cost = uint64(0) - ) - // Check slot presence in the access list - if addrPresent, slotPresent := evm.StateDB.SlotInAccessList(contract.Address(), slot); !slotPresent { - cost = params.ColdSloadCostEIP2929 - // If the caller cannot afford the cost, this change will be rolled back - evm.StateDB.AddSlotToAccessList(contract.Address(), slot) - if !addrPresent { - // Once we're done with YOLOv2 and schedule this for mainnet, might - // be good to remove this panic here, which is just really a - // canary to have during testing - panic("impossible case: address was not present in access list during sstore op") - } - } - value := common.Hash(y.Bytes32()) - - if current == value { // noop (1) - // EIP 2200 original clause: - // return params.SloadGasEIP2200, nil - return cost + params.WarmStorageReadCostEIP2929, nil // SLOAD_GAS - } - original := evm.StateDB.GetCommittedState(contract.Address(), x.Bytes32()) - if original == current { - if original == (common.Hash{}) { // create slot (2.1.1) - return cost + params.SstoreSetGasEIP2200, nil - } - if value == (common.Hash{}) { // delete slot (2.1.2b) - evm.StateDB.AddRefund(clearingRefund) - } - // EIP-2200 original clause: - // return params.SstoreResetGasEIP2200, nil // write existing slot (2.1.2) - return cost + (params.SstoreResetGasEIP2200 - params.ColdSloadCostEIP2929), nil // write existing slot (2.1.2) - } - if original != (common.Hash{}) { - if current == (common.Hash{}) { // recreate slot (2.2.1.1) - evm.StateDB.SubRefund(clearingRefund) - } else if value == (common.Hash{}) { // delete slot (2.2.1.2) - evm.StateDB.AddRefund(clearingRefund) - } - } - if original == value { - if original == (common.Hash{}) { // reset to original inexistent slot (2.2.2.1) - // EIP 2200 Original clause: - //evm.StateDB.AddRefund(params.SstoreSetGasEIP2200 - params.SloadGasEIP2200) - evm.StateDB.AddRefund(params.SstoreSetGasEIP2200 - params.WarmStorageReadCostEIP2929) - } else { // reset to original existing slot (2.2.2.2) - // EIP 2200 Original clause: - // evm.StateDB.AddRefund(params.SstoreResetGasEIP2200 - params.SloadGasEIP2200) - // - SSTORE_RESET_GAS redefined as (5000 - COLD_SLOAD_COST) - // - SLOAD_GAS redefined as WARM_STORAGE_READ_COST - // Final: (5000 - COLD_SLOAD_COST) - WARM_STORAGE_READ_COST - evm.StateDB.AddRefund((params.SstoreResetGasEIP2200 - params.ColdSloadCostEIP2929) - params.WarmStorageReadCostEIP2929) - } - } - // EIP-2200 original clause: - //return params.SloadGasEIP2200, nil // dirty update (2.2) - return cost + params.WarmStorageReadCostEIP2929, nil // dirty update (2.2) - } -} - -// gasSLoadEIP2929 calculates dynamic gas for SLOAD according to EIP-2929 -// For SLOAD, if the (address, storage_key) pair (where address is the address of the contract -// whose storage is being read) is not yet in accessed_storage_keys, -// charge 2100 gas and add the pair to accessed_storage_keys. -// If the pair is already in accessed_storage_keys, charge 100 gas. -func gasSLoadEIP2929(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { - loc := stack.peek() - slot := common.Hash(loc.Bytes32()) - // Check slot presence in the access list - if _, slotPresent := evm.StateDB.SlotInAccessList(contract.Address(), slot); !slotPresent { - // If the caller cannot afford the cost, this change will be rolled back - // If he does afford it, we can skip checking the same thing later on, during execution - evm.StateDB.AddSlotToAccessList(contract.Address(), slot) - return params.ColdSloadCostEIP2929, nil - } - return params.WarmStorageReadCostEIP2929, nil -} - -// gasExtCodeCopyEIP2929 implements extcodecopy according to EIP-2929 -// EIP spec: -// > If the target is not in accessed_addresses, -// > charge COLD_ACCOUNT_ACCESS_COST gas, and add the address to accessed_addresses. -// > Otherwise, charge WARM_STORAGE_READ_COST gas. -func gasExtCodeCopyEIP2929(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { - // memory expansion first (dynamic part of pre-2929 implementation) - gas, err := gasExtCodeCopy(evm, contract, stack, mem, memorySize) - if err != nil { - return 0, err - } - addr := common.Address(stack.peek().Bytes20()) - // Check slot presence in the access list - if !evm.StateDB.AddressInAccessList(addr) { - evm.StateDB.AddAddressToAccessList(addr) - var overflow bool - // We charge (cold-warm), since 'warm' is already charged as constantGas - if gas, overflow = math.SafeAdd(gas, params.ColdAccountAccessCostEIP2929-params.WarmStorageReadCostEIP2929); overflow { - return 0, ErrGasUintOverflow - } - return gas, nil - } - return gas, nil -} - -// gasEip2929AccountCheck checks whether the first stack item (as address) is present in the access list. -// If it is, this method returns '0', otherwise 'cold-warm' gas, presuming that the opcode using it -// is also using 'warm' as constant factor. -// This method is used by: -// - extcodehash, -// - extcodesize, -// - (ext) balance -func gasEip2929AccountCheck(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { - addr := common.Address(stack.peek().Bytes20()) - // Check slot presence in the access list - if !evm.StateDB.AddressInAccessList(addr) { - // If the caller cannot afford the cost, this change will be rolled back - evm.StateDB.AddAddressToAccessList(addr) - // The warm storage read cost is already charged as constantGas - return params.ColdAccountAccessCostEIP2929 - params.WarmStorageReadCostEIP2929, nil - } - return 0, nil -} - -func makeCallVariantGasCallEIP2929(oldCalculator gasFunc) gasFunc { - return func(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { - addr := common.Address(stack.Back(1).Bytes20()) - // Check slot presence in the access list - warmAccess := evm.StateDB.AddressInAccessList(addr) - // The WarmStorageReadCostEIP2929 (100) is already deducted in the form of a constant cost, so - // the cost to charge for cold access, if any, is Cold - Warm - coldCost := params.ColdAccountAccessCostEIP2929 - params.WarmStorageReadCostEIP2929 - if !warmAccess { - evm.StateDB.AddAddressToAccessList(addr) - // Charge the remaining difference here already, to correctly calculate available - // gas for call - if !contract.UseGas(coldCost) { - return 0, ErrOutOfGas - } - } - // Now call the old calculator, which takes into account - // - create new account - // - transfer value - // - memory expansion - // - 63/64ths rule - gas, err := oldCalculator(evm, contract, stack, mem, memorySize) - if warmAccess || err != nil { - return gas, err - } - // In case of a cold access, we temporarily add the cold charge back, and also - // add it to the returned gas. By adding it to the return, it will be charged - // outside of this function, as part of the dynamic gas, and that will make it - // also become correctly reported to tracers. - contract.Gas += coldCost - return gas + coldCost, nil - } -} - -var ( - gasCallEIP2929 = makeCallVariantGasCallEIP2929(gasCall) - gasDelegateCallEIP2929 = makeCallVariantGasCallEIP2929(gasDelegateCall) - gasStaticCallEIP2929 = makeCallVariantGasCallEIP2929(gasStaticCall) - gasCallCodeEIP2929 = makeCallVariantGasCallEIP2929(gasCallCode) - gasSelfdestructEIP2929 = makeSelfdestructGasFn(true) - // gasSelfdestructEIP3529 implements the changes in EIP-2539 (no refunds) - gasSelfdestructEIP3529 = makeSelfdestructGasFn(false) - - // gasSStoreEIP2929 implements gas cost for SSTORE according to EIP-2929 - // - // When calling SSTORE, check if the (address, storage_key) pair is in accessed_storage_keys. - // If it is not, charge an additional COLD_SLOAD_COST gas, and add the pair to accessed_storage_keys. - // Additionally, modify the parameters defined in EIP 2200 as follows: - // - // Parameter Old value New value - // SLOAD_GAS 800 = WARM_STORAGE_READ_COST - // SSTORE_RESET_GAS 5000 5000 - COLD_SLOAD_COST - // - //The other parameters defined in EIP 2200 are unchanged. - // see gasSStoreEIP2200(...) in core/vm/gas_table.go for more info about how EIP 2200 is specified - gasSStoreEIP2929 = makeGasSStoreFunc(params.SstoreClearsScheduleRefundEIP2200) - - // gasSStoreEIP2539 implements gas cost for SSTORE according to EIP-2539 - // Replace `SSTORE_CLEARS_SCHEDULE` with `SSTORE_RESET_GAS + ACCESS_LIST_STORAGE_KEY_COST` (4,800) - gasSStoreEIP3529 = makeGasSStoreFunc(params.SstoreClearsScheduleRefundEIP3529) -) - -// makeSelfdestructGasFn can create the selfdestruct dynamic gas function for EIP-2929 and EIP-2539 -func makeSelfdestructGasFn(refundsEnabled bool) gasFunc { - gasFunc := func(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { - var ( - gas uint64 - address = common.Address(stack.peek().Bytes20()) - ) - if !evm.StateDB.AddressInAccessList(address) { - // If the caller cannot afford the cost, this change will be rolled back - evm.StateDB.AddAddressToAccessList(address) - gas = params.ColdAccountAccessCostEIP2929 - } - // if empty and transfers value - if evm.StateDB.Empty(address) && evm.StateDB.GetBalance(contract.Address()).Sign() != 0 { - gas += params.CreateBySelfdestructGas - } - if refundsEnabled && !evm.StateDB.HasSuicided(contract.Address()) { - evm.StateDB.AddRefund(params.SelfdestructRefundGas) - } - return gas, nil - } - return gasFunc -} diff --git a/x/evm/vm/stack.go b/x/evm/vm/stack.go deleted file mode 100644 index e1a957e2..00000000 --- a/x/evm/vm/stack.go +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. -// -// The go-ethereum library is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// The go-ethereum library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . - -package vm - -import ( - "sync" - - "github.com/holiman/uint256" -) - -var stackPool = sync.Pool{ - New: func() interface{} { - return &Stack{data: make([]uint256.Int, 0, 16)} - }, -} - -// Stack is an object for basic stack operations. Items popped to the stack are -// expected to be changed and modified. stack does not take care of adding newly -// initialised objects. -type Stack struct { - data []uint256.Int -} - -func newstack() *Stack { - return stackPool.Get().(*Stack) -} - -func returnStack(s *Stack) { - s.data = s.data[:0] - stackPool.Put(s) -} - -// Data returns the underlying uint256.Int array. -func (st *Stack) Data() []uint256.Int { - return st.data -} - -func (st *Stack) push(d *uint256.Int) { - // NOTE push limit (1024) is checked in baseCheck - st.data = append(st.data, *d) -} - -func (st *Stack) pop() (ret uint256.Int) { - ret = st.data[len(st.data)-1] - st.data = st.data[:len(st.data)-1] - return -} - -func (st *Stack) len() int { - return len(st.data) -} - -func (st *Stack) swap(n int) { - st.data[st.len()-n], st.data[st.len()-1] = st.data[st.len()-1], st.data[st.len()-n] -} - -func (st *Stack) dup(n int) { - st.push(&st.data[st.len()-n]) -} - -func (st *Stack) peek() *uint256.Int { - return &st.data[st.len()-1] -} - -// Back returns the n'th item in stack -func (st *Stack) Back(n int) *uint256.Int { - return &st.data[st.len()-n-1] -} diff --git a/x/evm/vm/stack_table.go b/x/evm/vm/stack_table.go deleted file mode 100644 index 10c12901..00000000 --- a/x/evm/vm/stack_table.go +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2017 The go-ethereum Authors -// This file is part of the go-ethereum library. -// -// The go-ethereum library is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// The go-ethereum library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . - -package vm - -import ( - "github.com/ethereum/go-ethereum/params" -) - -func minSwapStack(n int) int { - return minStack(n, n) -} -func maxSwapStack(n int) int { - return maxStack(n, n) -} - -func minDupStack(n int) int { - return minStack(n, n+1) -} -func maxDupStack(n int) int { - return maxStack(n, n+1) -} - -func maxStack(pop, push int) int { - return int(params.StackLimit) + pop - push -} -func minStack(pops, push int) int { - return pops -} diff --git a/x/evm/vm/verifier.go b/x/evm/vm/verifier.go deleted file mode 100644 index 5d92ce32..00000000 --- a/x/evm/vm/verifier.go +++ /dev/null @@ -1,39 +0,0 @@ -package vm - -type VerifiedContract interface { - GetHeight() uint64 - GetAddress() string - GetBin() string - GetInit() string -} - -type GenesisContractVerifier struct { - applyState map[uint64][]VerifiedContract - verifiedAddresses map[string]bool -} - -func NewGenesisContractVerifier() *GenesisContractVerifier { - return &GenesisContractVerifier{ - applyState: make(map[uint64][]VerifiedContract), - verifiedAddresses: map[string]bool{}, - } -} - -func (gcv *GenesisContractVerifier) GetContracts(height uint64) []VerifiedContract { - return gcv.applyState[height] -} - -func (gcv *GenesisContractVerifier) AddContract(contract VerifiedContract, trusted bool) { - gcv.applyState[contract.GetHeight()] = append(gcv.applyState[contract.GetHeight()], contract) - if trusted { - gcv.AddTrustedAddress(contract.GetAddress()) - } -} - -func (gcv *GenesisContractVerifier) AddTrustedAddress(addr string) { - gcv.verifiedAddresses[addr] = true -} - -func (gcv *GenesisContractVerifier) IsTrustedAddress(addr string) bool { - return gcv.verifiedAddresses[addr] -} diff --git a/x/register/keeper/store.go b/x/register/keeper/store.go index 238dcb47..5578b5b0 100644 --- a/x/register/keeper/store.go +++ b/x/register/keeper/store.go @@ -1,7 +1,6 @@ package keeper import ( - "fmt" "time" sdk "github.com/cosmos/cosmos-sdk/types" @@ -46,25 +45,6 @@ func (k Keeper) GetRemainingOzoneLimit(ctx sdk.Context) (value sdk.Int) { return } -func (k *Keeper) CalculatePurchaseAmount(ctx sdk.Context, amount sdk.Int) (sdk.Int, sdk.Int, error) { - St := k.GetEffectiveTotalStake(ctx) - Pt := k.GetTotalUnissuedPrepay(ctx).Amount - Lt := k.GetRemainingOzoneLimit(ctx) - - purchase := Lt.ToDec(). - Mul(amount.ToDec()). - Quo((St. - Add(Pt). - Add(amount)).ToDec()). - TruncateInt() - if purchase.GT(Lt) { - return sdk.NewInt(0), sdk.NewInt(0), fmt.Errorf("not enough remaining ozone limit to complete prepay") - } - remaining := Lt.Sub(purchase) - - return purchase, remaining, nil -} - func (k Keeper) IsUnbondable(ctx sdk.Context, unbondAmt sdk.Int) bool { remaining := k.GetRemainingOzoneLimit(ctx) stakeNozRate := k.GetStakeNozRate(ctx) diff --git a/x/register/keeper/store_new.go b/x/register/keeper/store_new.go deleted file mode 100644 index 9396e550..00000000 --- a/x/register/keeper/store_new.go +++ /dev/null @@ -1,35 +0,0 @@ -package keeper - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/stratosnet/stratos-chain/core/statedb" - stratos "github.com/stratosnet/stratos-chain/types" - "github.com/stratosnet/stratos-chain/x/register/types" -) - -func (k *Keeper) KeeGetEffectiveTotalStake(kstatedb *statedb.KeestateDB) (stake sdk.Int) { - bz := kstatedb.GetState(k.storeKey, types.EffectiveGenesisStakeTotalKey) - if bz == nil { - return sdk.ZeroInt() - } - intValue := stratos.Int{} - k.cdc.MustUnmarshalLengthPrefixed(bz, &intValue) - stake = *intValue.Value - return -} - -func (k *Keeper) KeeGetRemainingOzoneLimit(kstatedb *statedb.KeestateDB) (value sdk.Int) { - bz := kstatedb.GetState(k.storeKey, types.UpperBoundOfTotalOzoneKey) - if bz == nil { - return sdk.ZeroInt() - } - intVal := stratos.Int{} - k.cdc.MustUnmarshalLengthPrefixed(bz, &intVal) - value = *intVal.Value - return -} - -func (k *Keeper) KeeSetRemainingOzoneLimit(kstatedb *statedb.KeestateDB, value sdk.Int) { - bz := k.cdc.MustMarshalLengthPrefixed(&stratos.Int{Value: &value}) - kstatedb.SetState(k.storeKey, types.UpperBoundOfTotalOzoneKey, bz) -} diff --git a/x/sds/keeper/keeper.go b/x/sds/keeper/keeper.go index fe9ae24f..0e70f093 100644 --- a/x/sds/keeper/keeper.go +++ b/x/sds/keeper/keeper.go @@ -1,6 +1,7 @@ package keeper import ( + "errors" "fmt" "github.com/kelindar/bitmap" @@ -14,15 +15,12 @@ import ( paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" stratos "github.com/stratosnet/stratos-chain/types" - evmtypes "github.com/stratosnet/stratos-chain/x/evm/types" potKeeper "github.com/stratosnet/stratos-chain/x/pot/keeper" registerKeeper "github.com/stratosnet/stratos-chain/x/register/keeper" registertypes "github.com/stratosnet/stratos-chain/x/register/types" "github.com/stratosnet/stratos-chain/x/sds/types" ) -var _ evmtypes.SdsKeeper = &Keeper{} - // Keeper encodes/decodes files using the go-amino (binary) // encoding/decoding library. type Keeper struct { @@ -90,18 +88,29 @@ func (k Keeper) FileUpload(ctx sdk.Context, fileHash string, reporter stratos.Sd // [X] is the total amount of STOS token prepaid by user at time t // the total amount of Ozone the user gets = Lt * X / (S + Pt + X) func (k Keeper) purchaseNozAndSubCoins(ctx sdk.Context, from sdk.AccAddress, amount sdk.Int) (sdk.Int, error) { - purchased, newRemainingOzoneLimit, err := k.registerKeeper.CalculatePurchaseAmount(ctx, amount) - if err != nil { - return sdk.ZeroInt(), err + St := k.registerKeeper.GetEffectiveTotalStake(ctx) + Pt := k.registerKeeper.GetTotalUnissuedPrepay(ctx).Amount + Lt := k.registerKeeper.GetRemainingOzoneLimit(ctx) + + purchased := Lt.ToDec(). + Mul(amount.ToDec()). + Quo((St. + Add(Pt). + Add(amount)).ToDec()). + TruncateInt() + + if purchased.GT(Lt) { + return sdk.ZeroInt(), errors.New("not enough remaining ozone limit to complete prepay") } // send coins to total unissued prepay pool prepayAmt := sdk.NewCoin(k.BondDenom(ctx), amount) - err = k.bankKeeper.SendCoinsFromAccountToModule(ctx, from, registertypes.TotalUnissuedPrepay, sdk.NewCoins(prepayAmt)) + err := k.bankKeeper.SendCoinsFromAccountToModule(ctx, from, registertypes.TotalUnissuedPrepay, sdk.NewCoins(prepayAmt)) if err != nil { return sdk.ZeroInt(), err } // update remaining noz limit + newRemainingOzoneLimit := Lt.Sub(purchased) k.registerKeeper.SetRemainingOzoneLimit(ctx, newRemainingOzoneLimit) return purchased, nil diff --git a/yarn.lock b/yarn.lock deleted file mode 100644 index 698a002d..00000000 --- a/yarn.lock +++ /dev/null @@ -1,7594 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@babel/runtime@^7.4.4": - version "7.21.5" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.21.5.tgz#8492dddda9644ae3bda3b45eabe87382caee7200" - integrity sha512-8jI69toZqqcsnqGGqwGS4Qb1VwLOEp4hz+CXPywcvjs60u3B4Pom/U/7rm4W8tMOYEB+E9wgD0mW1l3r8qlI9Q== - dependencies: - regenerator-runtime "^0.13.11" - -"@chainsafe/as-sha256@^0.3.1": - version "0.3.1" - resolved "https://registry.yarnpkg.com/@chainsafe/as-sha256/-/as-sha256-0.3.1.tgz#3639df0e1435cab03f4d9870cc3ac079e57a6fc9" - integrity sha512-hldFFYuf49ed7DAakWVXSJODuq3pzJEguD8tQ7h+sGkM18vja+OFoJI9krnGmgzyuZC2ETX0NOIcCTy31v2Mtg== - -"@chainsafe/persistent-merkle-tree@^0.4.2": - version "0.4.2" - resolved "https://registry.yarnpkg.com/@chainsafe/persistent-merkle-tree/-/persistent-merkle-tree-0.4.2.tgz#4c9ee80cc57cd3be7208d98c40014ad38f36f7ff" - integrity sha512-lLO3ihKPngXLTus/L7WHKaw9PnNJWizlOF1H9NNzHP6Xvh82vzg9F2bzkXhYIFshMZ2gTCEz8tq6STe7r5NDfQ== - dependencies: - "@chainsafe/as-sha256" "^0.3.1" - -"@chainsafe/persistent-merkle-tree@^0.5.0": - version "0.5.0" - resolved "https://registry.yarnpkg.com/@chainsafe/persistent-merkle-tree/-/persistent-merkle-tree-0.5.0.tgz#2b4a62c9489a5739dedd197250d8d2f5427e9f63" - integrity sha512-l0V1b5clxA3iwQLXP40zYjyZYospQLZXzBVIhhr9kDg/1qHZfzzHw0jj4VPBijfYCArZDlPkRi1wZaV2POKeuw== - dependencies: - "@chainsafe/as-sha256" "^0.3.1" - -"@chainsafe/ssz@^0.10.0": - version "0.10.2" - resolved "https://registry.yarnpkg.com/@chainsafe/ssz/-/ssz-0.10.2.tgz#c782929e1bb25fec66ba72e75934b31fd087579e" - integrity sha512-/NL3Lh8K+0q7A3LsiFq09YXS9fPE+ead2rr7vM2QK8PLzrNsw3uqrif9bpRX5UxgeRjM+vYi+boCM3+GM4ovXg== - dependencies: - "@chainsafe/as-sha256" "^0.3.1" - "@chainsafe/persistent-merkle-tree" "^0.5.0" - -"@chainsafe/ssz@^0.9.2": - version "0.9.4" - resolved "https://registry.yarnpkg.com/@chainsafe/ssz/-/ssz-0.9.4.tgz#696a8db46d6975b600f8309ad3a12f7c0e310497" - integrity sha512-77Qtg2N1ayqs4Bg/wvnWfg5Bta7iy7IRh8XqXh7oNMeP2HBbBwx8m6yTpA8p0EHItWPEBkgZd5S5/LSlp3GXuQ== - dependencies: - "@chainsafe/as-sha256" "^0.3.1" - "@chainsafe/persistent-merkle-tree" "^0.4.2" - case "^1.6.3" - -"@cspotcode/source-map-support@^0.8.0": - version "0.8.1" - resolved "https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz#00629c35a688e05a88b1cda684fb9d5e73f000a1" - integrity sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw== - dependencies: - "@jridgewell/trace-mapping" "0.3.9" - -"@ensdomains/address-encoder@^0.1.7": - version "0.1.9" - resolved "https://registry.yarnpkg.com/@ensdomains/address-encoder/-/address-encoder-0.1.9.tgz#f948c485443d9ef7ed2c0c4790e931c33334d02d" - integrity sha512-E2d2gP4uxJQnDu2Kfg1tHNspefzbLT8Tyjrm5sEuim32UkU2sm5xL4VXtgc2X33fmPEw9+jUMpGs4veMbf+PYg== - dependencies: - bech32 "^1.1.3" - blakejs "^1.1.0" - bn.js "^4.11.8" - bs58 "^4.0.1" - crypto-addr-codec "^0.1.7" - nano-base32 "^1.0.1" - ripemd160 "^2.0.2" - -"@ensdomains/ens@0.4.5": - version "0.4.5" - resolved "https://registry.yarnpkg.com/@ensdomains/ens/-/ens-0.4.5.tgz#e0aebc005afdc066447c6e22feb4eda89a5edbfc" - integrity sha512-JSvpj1iNMFjK6K+uVl4unqMoa9rf5jopb8cya5UGBWz23Nw8hSNT7efgUx4BTlAPAgpNlEioUfeTyQ6J9ZvTVw== - dependencies: - bluebird "^3.5.2" - eth-ens-namehash "^2.0.8" - solc "^0.4.20" - testrpc "0.0.1" - web3-utils "^1.0.0-beta.31" - -"@ensdomains/ensjs@^2.1.0": - version "2.1.0" - resolved "https://registry.yarnpkg.com/@ensdomains/ensjs/-/ensjs-2.1.0.tgz#0a7296c1f3d735ef019320d863a7846a0760c460" - integrity sha512-GRbGPT8Z/OJMDuxs75U/jUNEC0tbL0aj7/L/QQznGYKm/tiasp+ndLOaoULy9kKJFC0TBByqfFliEHDgoLhyog== - dependencies: - "@babel/runtime" "^7.4.4" - "@ensdomains/address-encoder" "^0.1.7" - "@ensdomains/ens" "0.4.5" - "@ensdomains/resolver" "0.2.4" - content-hash "^2.5.2" - eth-ens-namehash "^2.0.8" - ethers "^5.0.13" - js-sha3 "^0.8.0" - -"@ensdomains/resolver@0.2.4": - version "0.2.4" - resolved "https://registry.yarnpkg.com/@ensdomains/resolver/-/resolver-0.2.4.tgz#c10fe28bf5efbf49bff4666d909aed0265efbc89" - integrity sha512-bvaTH34PMCbv6anRa9I/0zjLJgY4EuznbEMgbV77JBCQ9KNC46rzi0avuxpOfu+xDjPEtSFGqVEOr5GlUSGudA== - -"@ethereumjs/common@2.5.0": - version "2.5.0" - resolved "https://registry.yarnpkg.com/@ethereumjs/common/-/common-2.5.0.tgz#ec61551b31bef7a69d1dc634d8932468866a4268" - integrity sha512-DEHjW6e38o+JmB/NO3GZBpW4lpaiBpkFgXF6jLcJ6gETBYpEyaA5nTimsWBUJR3Vmtm/didUEbNjajskugZORg== - dependencies: - crc-32 "^1.2.0" - ethereumjs-util "^7.1.1" - -"@ethereumjs/common@^2.5.0": - version "2.6.5" - resolved "https://registry.yarnpkg.com/@ethereumjs/common/-/common-2.6.5.tgz#0a75a22a046272579d91919cb12d84f2756e8d30" - integrity sha512-lRyVQOeCDaIVtgfbowla32pzeDv2Obr8oR8Put5RdUBNRGr1VGPGQNGP6elWIpgK3YdpzqTOh4GyUGOureVeeA== - dependencies: - crc-32 "^1.2.0" - ethereumjs-util "^7.1.5" - -"@ethereumjs/tx@3.3.2": - version "3.3.2" - resolved "https://registry.yarnpkg.com/@ethereumjs/tx/-/tx-3.3.2.tgz#348d4624bf248aaab6c44fec2ae67265efe3db00" - integrity sha512-6AaJhwg4ucmwTvw/1qLaZUX5miWrwZ4nLOUsKyb/HtzS3BMw/CasKhdi1ims9mBKeK9sOJCH4qGKOBGyJCeeog== - dependencies: - "@ethereumjs/common" "^2.5.0" - ethereumjs-util "^7.1.2" - -"@ethersproject/abi@5.7.0", "@ethersproject/abi@^5.0.0-beta.146", "@ethersproject/abi@^5.0.9", "@ethersproject/abi@^5.1.2", "@ethersproject/abi@^5.4.7", "@ethersproject/abi@^5.6.3", "@ethersproject/abi@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/abi/-/abi-5.7.0.tgz#b3f3e045bbbeed1af3947335c247ad625a44e449" - integrity sha512-351ktp42TiRcYB3H1OP8yajPeAQstMW/yCFokj/AthP9bLHzQFPlOrxOcwYEDkUAICmOHljvN4K39OMTMUa9RA== - dependencies: - "@ethersproject/address" "^5.7.0" - "@ethersproject/bignumber" "^5.7.0" - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/constants" "^5.7.0" - "@ethersproject/hash" "^5.7.0" - "@ethersproject/keccak256" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - "@ethersproject/properties" "^5.7.0" - "@ethersproject/strings" "^5.7.0" - -"@ethersproject/abstract-provider@5.7.0", "@ethersproject/abstract-provider@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/abstract-provider/-/abstract-provider-5.7.0.tgz#b0a8550f88b6bf9d51f90e4795d48294630cb9ef" - integrity sha512-R41c9UkchKCpAqStMYUpdunjo3pkEvZC3FAwZn5S5MGbXoMQOHIdHItezTETxAO5bevtMApSyEhn9+CHcDsWBw== - dependencies: - "@ethersproject/bignumber" "^5.7.0" - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - "@ethersproject/networks" "^5.7.0" - "@ethersproject/properties" "^5.7.0" - "@ethersproject/transactions" "^5.7.0" - "@ethersproject/web" "^5.7.0" - -"@ethersproject/abstract-signer@5.7.0", "@ethersproject/abstract-signer@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/abstract-signer/-/abstract-signer-5.7.0.tgz#13f4f32117868452191a4649723cb086d2b596b2" - integrity sha512-a16V8bq1/Cz+TGCkE2OPMTOUDLS3grCpdjoJCYNnVBbdYEMSgKrU0+B90s8b6H+ByYTBZN7a3g76jdIJi7UfKQ== - dependencies: - "@ethersproject/abstract-provider" "^5.7.0" - "@ethersproject/bignumber" "^5.7.0" - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - "@ethersproject/properties" "^5.7.0" - -"@ethersproject/address@5.7.0", "@ethersproject/address@^5.0.2", "@ethersproject/address@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/address/-/address-5.7.0.tgz#19b56c4d74a3b0a46bfdbb6cfcc0a153fc697f37" - integrity sha512-9wYhYt7aghVGo758POM5nqcOMaE168Q6aRLJZwUmiqSrAungkG74gSSeKEIR7ukixesdRZGPgVqme6vmxs1fkA== - dependencies: - "@ethersproject/bignumber" "^5.7.0" - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/keccak256" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - "@ethersproject/rlp" "^5.7.0" - -"@ethersproject/base64@5.7.0", "@ethersproject/base64@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/base64/-/base64-5.7.0.tgz#ac4ee92aa36c1628173e221d0d01f53692059e1c" - integrity sha512-Dr8tcHt2mEbsZr/mwTPIQAf3Ai0Bks/7gTw9dSqk1mQvhW3XvRlmDJr/4n+wg1JmCl16NZue17CDh8xb/vZ0sQ== - dependencies: - "@ethersproject/bytes" "^5.7.0" - -"@ethersproject/basex@5.7.0", "@ethersproject/basex@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/basex/-/basex-5.7.0.tgz#97034dc7e8938a8ca943ab20f8a5e492ece4020b" - integrity sha512-ywlh43GwZLv2Voc2gQVTKBoVQ1mti3d8HK5aMxsfu/nRDnMmNqaSJ3r3n85HBByT8OpoY96SXM1FogC533T4zw== - dependencies: - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/properties" "^5.7.0" - -"@ethersproject/bignumber@5.7.0", "@ethersproject/bignumber@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/bignumber/-/bignumber-5.7.0.tgz#e2f03837f268ba655ffba03a57853e18a18dc9c2" - integrity sha512-n1CAdIHRWjSucQO3MC1zPSVgV/6dy/fjL9pMrPP9peL+QxEg9wOsVqwD4+818B6LUEtaXzVHQiuivzRoxPxUGw== - dependencies: - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - bn.js "^5.2.1" - -"@ethersproject/bytes@5.7.0", "@ethersproject/bytes@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/bytes/-/bytes-5.7.0.tgz#a00f6ea8d7e7534d6d87f47188af1148d71f155d" - integrity sha512-nsbxwgFXWh9NyYWo+U8atvmMsSdKJprTcICAkvbBffT75qDocbuggBU0SJiVK2MuTrp0q+xvLkTnGMPK1+uA9A== - dependencies: - "@ethersproject/logger" "^5.7.0" - -"@ethersproject/constants@5.7.0", "@ethersproject/constants@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/constants/-/constants-5.7.0.tgz#df80a9705a7e08984161f09014ea012d1c75295e" - integrity sha512-DHI+y5dBNvkpYUMiRQyxRBYBefZkJfo70VUkUAsRjcPs47muV9evftfZ0PJVCXYbAiCgght0DtcF9srFQmIgWA== - dependencies: - "@ethersproject/bignumber" "^5.7.0" - -"@ethersproject/contracts@5.7.0", "@ethersproject/contracts@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/contracts/-/contracts-5.7.0.tgz#c305e775abd07e48aa590e1a877ed5c316f8bd1e" - integrity sha512-5GJbzEU3X+d33CdfPhcyS+z8MzsTrBGk/sc+G+59+tPa9yFkl6HQ9D6L0QMgNTA9q8dT0XKxxkyp883XsQvbbg== - dependencies: - "@ethersproject/abi" "^5.7.0" - "@ethersproject/abstract-provider" "^5.7.0" - "@ethersproject/abstract-signer" "^5.7.0" - "@ethersproject/address" "^5.7.0" - "@ethersproject/bignumber" "^5.7.0" - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/constants" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - "@ethersproject/properties" "^5.7.0" - "@ethersproject/transactions" "^5.7.0" - -"@ethersproject/hash@5.7.0", "@ethersproject/hash@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/hash/-/hash-5.7.0.tgz#eb7aca84a588508369562e16e514b539ba5240a7" - integrity sha512-qX5WrQfnah1EFnO5zJv1v46a8HW0+E5xuBBDTwMFZLuVTx0tbU2kkx15NqdjxecrLGatQN9FGQKpb1FKdHCt+g== - dependencies: - "@ethersproject/abstract-signer" "^5.7.0" - "@ethersproject/address" "^5.7.0" - "@ethersproject/base64" "^5.7.0" - "@ethersproject/bignumber" "^5.7.0" - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/keccak256" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - "@ethersproject/properties" "^5.7.0" - "@ethersproject/strings" "^5.7.0" - -"@ethersproject/hdnode@5.7.0", "@ethersproject/hdnode@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/hdnode/-/hdnode-5.7.0.tgz#e627ddc6b466bc77aebf1a6b9e47405ca5aef9cf" - integrity sha512-OmyYo9EENBPPf4ERhR7oj6uAtUAhYGqOnIS+jE5pTXvdKBS99ikzq1E7Iv0ZQZ5V36Lqx1qZLeak0Ra16qpeOg== - dependencies: - "@ethersproject/abstract-signer" "^5.7.0" - "@ethersproject/basex" "^5.7.0" - "@ethersproject/bignumber" "^5.7.0" - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - "@ethersproject/pbkdf2" "^5.7.0" - "@ethersproject/properties" "^5.7.0" - "@ethersproject/sha2" "^5.7.0" - "@ethersproject/signing-key" "^5.7.0" - "@ethersproject/strings" "^5.7.0" - "@ethersproject/transactions" "^5.7.0" - "@ethersproject/wordlists" "^5.7.0" - -"@ethersproject/json-wallets@5.7.0", "@ethersproject/json-wallets@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/json-wallets/-/json-wallets-5.7.0.tgz#5e3355287b548c32b368d91014919ebebddd5360" - integrity sha512-8oee5Xgu6+RKgJTkvEMl2wDgSPSAQ9MB/3JYjFV9jlKvcYHUXZC+cQp0njgmxdHkYWn8s6/IqIZYm0YWCjO/0g== - dependencies: - "@ethersproject/abstract-signer" "^5.7.0" - "@ethersproject/address" "^5.7.0" - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/hdnode" "^5.7.0" - "@ethersproject/keccak256" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - "@ethersproject/pbkdf2" "^5.7.0" - "@ethersproject/properties" "^5.7.0" - "@ethersproject/random" "^5.7.0" - "@ethersproject/strings" "^5.7.0" - "@ethersproject/transactions" "^5.7.0" - aes-js "3.0.0" - scrypt-js "3.0.1" - -"@ethersproject/keccak256@5.7.0", "@ethersproject/keccak256@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/keccak256/-/keccak256-5.7.0.tgz#3186350c6e1cd6aba7940384ec7d6d9db01f335a" - integrity sha512-2UcPboeL/iW+pSg6vZ6ydF8tCnv3Iu/8tUmLLzWWGzxWKFFqOBQFLo6uLUv6BDrLgCDfN28RJ/wtByx+jZ4KBg== - dependencies: - "@ethersproject/bytes" "^5.7.0" - js-sha3 "0.8.0" - -"@ethersproject/logger@5.7.0", "@ethersproject/logger@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.7.0.tgz#6ce9ae168e74fecf287be17062b590852c311892" - integrity sha512-0odtFdXu/XHtjQXJYA3u9G0G8btm0ND5Cu8M7i5vhEcE8/HmF4Lbdqanwyv4uQTr2tx6b7fQRmgLrsnpQlmnig== - -"@ethersproject/networks@5.7.1", "@ethersproject/networks@^5.7.0": - version "5.7.1" - resolved "https://registry.yarnpkg.com/@ethersproject/networks/-/networks-5.7.1.tgz#118e1a981d757d45ccea6bb58d9fd3d9db14ead6" - integrity sha512-n/MufjFYv3yFcUyfhnXotyDlNdFb7onmkSy8aQERi2PjNcnWQ66xXxa3XlS8nCcA8aJKJjIIMNJTC7tu80GwpQ== - dependencies: - "@ethersproject/logger" "^5.7.0" - -"@ethersproject/pbkdf2@5.7.0", "@ethersproject/pbkdf2@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/pbkdf2/-/pbkdf2-5.7.0.tgz#d2267d0a1f6e123f3771007338c47cccd83d3102" - integrity sha512-oR/dBRZR6GTyaofd86DehG72hY6NpAjhabkhxgr3X2FpJtJuodEl2auADWBZfhDHgVCbu3/H/Ocq2uC6dpNjjw== - dependencies: - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/sha2" "^5.7.0" - -"@ethersproject/properties@5.7.0", "@ethersproject/properties@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/properties/-/properties-5.7.0.tgz#a6e12cb0439b878aaf470f1902a176033067ed30" - integrity sha512-J87jy8suntrAkIZtecpxEPxY//szqr1mlBaYlQ0r4RCaiD2hjheqF9s1LVE8vVuJCXisjIP+JgtK/Do54ej4Sw== - dependencies: - "@ethersproject/logger" "^5.7.0" - -"@ethersproject/providers@5.7.2", "@ethersproject/providers@^5.4.7", "@ethersproject/providers@^5.7.1", "@ethersproject/providers@^5.7.2": - version "5.7.2" - resolved "https://registry.yarnpkg.com/@ethersproject/providers/-/providers-5.7.2.tgz#f8b1a4f275d7ce58cf0a2eec222269a08beb18cb" - integrity sha512-g34EWZ1WWAVgr4aptGlVBF8mhl3VWjv+8hoAnzStu8Ah22VHBsuGzP17eb6xDVRzw895G4W7vvx60lFFur/1Rg== - dependencies: - "@ethersproject/abstract-provider" "^5.7.0" - "@ethersproject/abstract-signer" "^5.7.0" - "@ethersproject/address" "^5.7.0" - "@ethersproject/base64" "^5.7.0" - "@ethersproject/basex" "^5.7.0" - "@ethersproject/bignumber" "^5.7.0" - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/constants" "^5.7.0" - "@ethersproject/hash" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - "@ethersproject/networks" "^5.7.0" - "@ethersproject/properties" "^5.7.0" - "@ethersproject/random" "^5.7.0" - "@ethersproject/rlp" "^5.7.0" - "@ethersproject/sha2" "^5.7.0" - "@ethersproject/strings" "^5.7.0" - "@ethersproject/transactions" "^5.7.0" - "@ethersproject/web" "^5.7.0" - bech32 "1.1.4" - ws "7.4.6" - -"@ethersproject/random@5.7.0", "@ethersproject/random@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/random/-/random-5.7.0.tgz#af19dcbc2484aae078bb03656ec05df66253280c" - integrity sha512-19WjScqRA8IIeWclFme75VMXSBvi4e6InrUNuaR4s5pTF2qNhcGdCUwdxUVGtDDqC00sDLCO93jPQoDUH4HVmQ== - dependencies: - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - -"@ethersproject/rlp@5.7.0", "@ethersproject/rlp@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/rlp/-/rlp-5.7.0.tgz#de39e4d5918b9d74d46de93af80b7685a9c21304" - integrity sha512-rBxzX2vK8mVF7b0Tol44t5Tb8gomOHkj5guL+HhzQ1yBh/ydjGnpw6at+X6Iw0Kp3OzzzkcKp8N9r0W4kYSs9w== - dependencies: - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - -"@ethersproject/sha2@5.7.0", "@ethersproject/sha2@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/sha2/-/sha2-5.7.0.tgz#9a5f7a7824ef784f7f7680984e593a800480c9fb" - integrity sha512-gKlH42riwb3KYp0reLsFTokByAKoJdgFCwI+CCiX/k+Jm2mbNs6oOaCjYQSlI1+XBVejwH2KrmCbMAT/GnRDQw== - dependencies: - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - hash.js "1.1.7" - -"@ethersproject/signing-key@5.7.0", "@ethersproject/signing-key@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/signing-key/-/signing-key-5.7.0.tgz#06b2df39411b00bc57c7c09b01d1e41cf1b16ab3" - integrity sha512-MZdy2nL3wO0u7gkB4nA/pEf8lu1TlFswPNmy8AiYkfKTdO6eXBJyUdmHO/ehm/htHw9K/qF8ujnTyUAD+Ry54Q== - dependencies: - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - "@ethersproject/properties" "^5.7.0" - bn.js "^5.2.1" - elliptic "6.5.4" - hash.js "1.1.7" - -"@ethersproject/solidity@5.7.0", "@ethersproject/solidity@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/solidity/-/solidity-5.7.0.tgz#5e9c911d8a2acce2a5ebb48a5e2e0af20b631cb8" - integrity sha512-HmabMd2Dt/raavyaGukF4XxizWKhKQ24DoLtdNbBmNKUOPqwjsKQSdV9GQtj9CBEea9DlzETlVER1gYeXXBGaA== - dependencies: - "@ethersproject/bignumber" "^5.7.0" - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/keccak256" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - "@ethersproject/sha2" "^5.7.0" - "@ethersproject/strings" "^5.7.0" - -"@ethersproject/strings@5.7.0", "@ethersproject/strings@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/strings/-/strings-5.7.0.tgz#54c9d2a7c57ae8f1205c88a9d3a56471e14d5ed2" - integrity sha512-/9nu+lj0YswRNSH0NXYqrh8775XNyEdUQAuf3f+SmOrnVewcJ5SBNAjF7lpgehKi4abvNNXyf+HX86czCdJ8Mg== - dependencies: - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/constants" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - -"@ethersproject/transactions@5.7.0", "@ethersproject/transactions@^5.6.2", "@ethersproject/transactions@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/transactions/-/transactions-5.7.0.tgz#91318fc24063e057885a6af13fdb703e1f993d3b" - integrity sha512-kmcNicCp1lp8qanMTC3RIikGgoJ80ztTyvtsFvCYpSCfkjhD0jZ2LOrnbcuxuToLIUYYf+4XwD1rP+B/erDIhQ== - dependencies: - "@ethersproject/address" "^5.7.0" - "@ethersproject/bignumber" "^5.7.0" - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/constants" "^5.7.0" - "@ethersproject/keccak256" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - "@ethersproject/properties" "^5.7.0" - "@ethersproject/rlp" "^5.7.0" - "@ethersproject/signing-key" "^5.7.0" - -"@ethersproject/units@5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/units/-/units-5.7.0.tgz#637b563d7e14f42deeee39245275d477aae1d8b1" - integrity sha512-pD3xLMy3SJu9kG5xDGI7+xhTEmGXlEqXU4OfNapmfnxLVY4EMSSRp7j1k7eezutBPH7RBN/7QPnwR7hzNlEFeg== - dependencies: - "@ethersproject/bignumber" "^5.7.0" - "@ethersproject/constants" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - -"@ethersproject/wallet@5.7.0", "@ethersproject/wallet@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/wallet/-/wallet-5.7.0.tgz#4e5d0790d96fe21d61d38fb40324e6c7ef350b2d" - integrity sha512-MhmXlJXEJFBFVKrDLB4ZdDzxcBxQ3rLyCkhNqVu3CDYvR97E+8r01UgrI+TI99Le+aYm/in/0vp86guJuM7FCA== - dependencies: - "@ethersproject/abstract-provider" "^5.7.0" - "@ethersproject/abstract-signer" "^5.7.0" - "@ethersproject/address" "^5.7.0" - "@ethersproject/bignumber" "^5.7.0" - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/hash" "^5.7.0" - "@ethersproject/hdnode" "^5.7.0" - "@ethersproject/json-wallets" "^5.7.0" - "@ethersproject/keccak256" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - "@ethersproject/properties" "^5.7.0" - "@ethersproject/random" "^5.7.0" - "@ethersproject/signing-key" "^5.7.0" - "@ethersproject/transactions" "^5.7.0" - "@ethersproject/wordlists" "^5.7.0" - -"@ethersproject/web@5.7.1", "@ethersproject/web@^5.7.0": - version "5.7.1" - resolved "https://registry.yarnpkg.com/@ethersproject/web/-/web-5.7.1.tgz#de1f285b373149bee5928f4eb7bcb87ee5fbb4ae" - integrity sha512-Gueu8lSvyjBWL4cYsWsjh6MtMwM0+H4HvqFPZfB6dV8ctbP9zFAO73VG1cMWae0FLPCtz0peKPpZY8/ugJJX2w== - dependencies: - "@ethersproject/base64" "^5.7.0" - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - "@ethersproject/properties" "^5.7.0" - "@ethersproject/strings" "^5.7.0" - -"@ethersproject/wordlists@5.7.0", "@ethersproject/wordlists@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/wordlists/-/wordlists-5.7.0.tgz#8fb2c07185d68c3e09eb3bfd6e779ba2774627f5" - integrity sha512-S2TFNJNfHWVHNE6cNDjbVlZ6MgE17MIxMbMg2zv3wn+3XSJGosL1m9ZVv3GXCf/2ymSsQ+hRI5IzoMJTG6aoVA== - dependencies: - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/hash" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - "@ethersproject/properties" "^5.7.0" - "@ethersproject/strings" "^5.7.0" - -"@fvictorio/tabtab@^0.0.3": - version "0.0.3" - resolved "https://registry.yarnpkg.com/@fvictorio/tabtab/-/tabtab-0.0.3.tgz#1b97981424386490fa2a5818706d2afd1f6e4659" - integrity sha512-bT/BSy8MJThrTebqTCjXRnGSgZWthHLigZ4k2AvfNtC79vPyBS1myaxw8gRU6RxIcdDD3HBtm7pOsOoyC086Zg== - dependencies: - debug "^4.1.1" - enquirer "^2.3.4" - minimist "^1.2.0" - mkdirp "^1.0.3" - untildify "^4.0.0" - -"@jridgewell/resolve-uri@^3.0.3": - version "3.1.1" - resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz#c08679063f279615a3326583ba3a90d1d82cc721" - integrity sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA== - -"@jridgewell/sourcemap-codec@^1.4.10": - version "1.4.15" - resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32" - integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== - -"@jridgewell/trace-mapping@0.3.9": - version "0.3.9" - resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz#6534fd5933a53ba7cbf3a17615e273a0d1273ff9" - integrity sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ== - dependencies: - "@jridgewell/resolve-uri" "^3.0.3" - "@jridgewell/sourcemap-codec" "^1.4.10" - -"@metamask/eth-sig-util@^4.0.0": - version "4.0.1" - resolved "https://registry.yarnpkg.com/@metamask/eth-sig-util/-/eth-sig-util-4.0.1.tgz#3ad61f6ea9ad73ba5b19db780d40d9aae5157088" - integrity sha512-tghyZKLHZjcdlDqCA3gNZmLeR0XvOE9U1qoQO9ohyAZT6Pya+H9vkBPcsyXytmYLNgVoin7CKCmweo/R43V+tQ== - dependencies: - ethereumjs-abi "^0.6.8" - ethereumjs-util "^6.2.1" - ethjs-util "^0.1.6" - tweetnacl "^1.0.3" - tweetnacl-util "^0.15.1" - -"@morgan-stanley/ts-mocking-bird@^0.6.2": - version "0.6.4" - resolved "https://registry.yarnpkg.com/@morgan-stanley/ts-mocking-bird/-/ts-mocking-bird-0.6.4.tgz#2e4b60d42957bab3b50b67dbf14c3da2f62a39f7" - integrity sha512-57VJIflP8eR2xXa9cD1LUawh+Gh+BVQfVu0n6GALyg/AqV/Nz25kDRvws3i9kIe1PTrbsZZOYpsYp6bXPd6nVA== - dependencies: - lodash "^4.17.16" - uuid "^7.0.3" - -"@noble/hashes@1.2.0", "@noble/hashes@~1.2.0": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.2.0.tgz#a3150eeb09cc7ab207ebf6d7b9ad311a9bdbed12" - integrity sha512-FZfhjEDbT5GRswV3C6uvLPHMiVD6lQBmpoX5+eSiPaMTXte/IKqI5dykDxzZB/WBeK/CDuQRBWarPdi3FNY2zQ== - -"@noble/secp256k1@1.7.1", "@noble/secp256k1@~1.7.0": - version "1.7.1" - resolved "https://registry.yarnpkg.com/@noble/secp256k1/-/secp256k1-1.7.1.tgz#b251c70f824ce3ca7f8dc3df08d58f005cc0507c" - integrity sha512-hOUk6AyBFmqVrv7k5WAw/LpszxVbj9gGN4JRkIX52fdFAj1UA61KXmZDvqVEm+pOyec3+fIeZB02LYa/pWOArw== - -"@nodelib/fs.scandir@2.1.5": - version "2.1.5" - resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" - integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== - dependencies: - "@nodelib/fs.stat" "2.0.5" - run-parallel "^1.1.9" - -"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": - version "2.0.5" - resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" - integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== - -"@nodelib/fs.walk@^1.2.3": - version "1.2.8" - resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" - integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== - dependencies: - "@nodelib/fs.scandir" "2.1.5" - fastq "^1.6.0" - -"@nomicfoundation/ethereumjs-block@5.0.1": - version "5.0.1" - resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-block/-/ethereumjs-block-5.0.1.tgz#6f89664f55febbd723195b6d0974773d29ee133d" - integrity sha512-u1Yioemi6Ckj3xspygu/SfFvm8vZEO8/Yx5a1QLzi6nVU0jz3Pg2OmHKJ5w+D9Ogk1vhwRiqEBAqcb0GVhCyHw== - dependencies: - "@nomicfoundation/ethereumjs-common" "4.0.1" - "@nomicfoundation/ethereumjs-rlp" "5.0.1" - "@nomicfoundation/ethereumjs-trie" "6.0.1" - "@nomicfoundation/ethereumjs-tx" "5.0.1" - "@nomicfoundation/ethereumjs-util" "9.0.1" - ethereum-cryptography "0.1.3" - ethers "^5.7.1" - -"@nomicfoundation/ethereumjs-blockchain@7.0.1": - version "7.0.1" - resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-blockchain/-/ethereumjs-blockchain-7.0.1.tgz#80e0bd3535bfeb9baa29836b6f25123dab06a726" - integrity sha512-NhzndlGg829XXbqJEYrF1VeZhAwSPgsK/OB7TVrdzft3y918hW5KNd7gIZ85sn6peDZOdjBsAXIpXZ38oBYE5A== - dependencies: - "@nomicfoundation/ethereumjs-block" "5.0.1" - "@nomicfoundation/ethereumjs-common" "4.0.1" - "@nomicfoundation/ethereumjs-ethash" "3.0.1" - "@nomicfoundation/ethereumjs-rlp" "5.0.1" - "@nomicfoundation/ethereumjs-trie" "6.0.1" - "@nomicfoundation/ethereumjs-tx" "5.0.1" - "@nomicfoundation/ethereumjs-util" "9.0.1" - abstract-level "^1.0.3" - debug "^4.3.3" - ethereum-cryptography "0.1.3" - level "^8.0.0" - lru-cache "^5.1.1" - memory-level "^1.0.0" - -"@nomicfoundation/ethereumjs-common@4.0.1": - version "4.0.1" - resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-common/-/ethereumjs-common-4.0.1.tgz#4702d82df35b07b5407583b54a45bf728e46a2f0" - integrity sha512-OBErlkfp54GpeiE06brBW/TTbtbuBJV5YI5Nz/aB2evTDo+KawyEzPjBlSr84z/8MFfj8wS2wxzQX1o32cev5g== - dependencies: - "@nomicfoundation/ethereumjs-util" "9.0.1" - crc-32 "^1.2.0" - -"@nomicfoundation/ethereumjs-ethash@3.0.1": - version "3.0.1" - resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-ethash/-/ethereumjs-ethash-3.0.1.tgz#65ca494d53e71e8415c9a49ef48bc921c538fc41" - integrity sha512-KDjGIB5igzWOp8Ik5I6QiRH5DH+XgILlplsHR7TEuWANZA759G6krQ6o8bvj+tRUz08YygMQu/sGd9mJ1DYT8w== - dependencies: - "@nomicfoundation/ethereumjs-block" "5.0.1" - "@nomicfoundation/ethereumjs-rlp" "5.0.1" - "@nomicfoundation/ethereumjs-util" "9.0.1" - abstract-level "^1.0.3" - bigint-crypto-utils "^3.0.23" - ethereum-cryptography "0.1.3" - -"@nomicfoundation/ethereumjs-evm@2.0.1": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-evm/-/ethereumjs-evm-2.0.1.tgz#f35681e203363f69ce2b3d3bf9f44d4e883ca1f1" - integrity sha512-oL8vJcnk0Bx/onl+TgQOQ1t/534GKFaEG17fZmwtPFeH8S5soiBYPCLUrvANOl4sCp9elYxIMzIiTtMtNNN8EQ== - dependencies: - "@ethersproject/providers" "^5.7.1" - "@nomicfoundation/ethereumjs-common" "4.0.1" - "@nomicfoundation/ethereumjs-tx" "5.0.1" - "@nomicfoundation/ethereumjs-util" "9.0.1" - debug "^4.3.3" - ethereum-cryptography "0.1.3" - mcl-wasm "^0.7.1" - rustbn.js "~0.2.0" - -"@nomicfoundation/ethereumjs-rlp@5.0.1": - version "5.0.1" - resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-rlp/-/ethereumjs-rlp-5.0.1.tgz#0b30c1cf77d125d390408e391c4bb5291ef43c28" - integrity sha512-xtxrMGa8kP4zF5ApBQBtjlSbN5E2HI8m8FYgVSYAnO6ssUoY5pVPGy2H8+xdf/bmMa22Ce8nWMH3aEW8CcqMeQ== - -"@nomicfoundation/ethereumjs-statemanager@2.0.1": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-statemanager/-/ethereumjs-statemanager-2.0.1.tgz#8824a97938db4471911e2d2f140f79195def5935" - integrity sha512-B5ApMOnlruVOR7gisBaYwFX+L/AP7i/2oAahatssjPIBVDF6wTX1K7Qpa39E/nzsH8iYuL3krkYeUFIdO3EMUQ== - dependencies: - "@nomicfoundation/ethereumjs-common" "4.0.1" - "@nomicfoundation/ethereumjs-rlp" "5.0.1" - debug "^4.3.3" - ethereum-cryptography "0.1.3" - ethers "^5.7.1" - js-sdsl "^4.1.4" - -"@nomicfoundation/ethereumjs-trie@6.0.1": - version "6.0.1" - resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-trie/-/ethereumjs-trie-6.0.1.tgz#662c55f6b50659fd4b22ea9f806a7401cafb7717" - integrity sha512-A64It/IMpDVODzCgxDgAAla8jNjNtsoQZIzZUfIV5AY6Coi4nvn7+VReBn5itlxMiL2yaTlQr9TRWp3CSI6VoA== - dependencies: - "@nomicfoundation/ethereumjs-rlp" "5.0.1" - "@nomicfoundation/ethereumjs-util" "9.0.1" - "@types/readable-stream" "^2.3.13" - ethereum-cryptography "0.1.3" - readable-stream "^3.6.0" - -"@nomicfoundation/ethereumjs-tx@5.0.1": - version "5.0.1" - resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-tx/-/ethereumjs-tx-5.0.1.tgz#7629dc2036b4a33c34e9f0a592b43227ef4f0c7d" - integrity sha512-0HwxUF2u2hrsIM1fsasjXvlbDOq1ZHFV2dd1yGq8CA+MEYhaxZr8OTScpVkkxqMwBcc5y83FyPl0J9MZn3kY0w== - dependencies: - "@chainsafe/ssz" "^0.9.2" - "@ethersproject/providers" "^5.7.2" - "@nomicfoundation/ethereumjs-common" "4.0.1" - "@nomicfoundation/ethereumjs-rlp" "5.0.1" - "@nomicfoundation/ethereumjs-util" "9.0.1" - ethereum-cryptography "0.1.3" - -"@nomicfoundation/ethereumjs-util@9.0.1": - version "9.0.1" - resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-util/-/ethereumjs-util-9.0.1.tgz#530cda8bae33f8b5020a8f199ed1d0a2ce48ec89" - integrity sha512-TwbhOWQ8QoSCFhV/DDfSmyfFIHjPjFBj957219+V3jTZYZ2rf9PmDtNOeZWAE3p3vlp8xb02XGpd0v6nTUPbsA== - dependencies: - "@chainsafe/ssz" "^0.10.0" - "@nomicfoundation/ethereumjs-rlp" "5.0.1" - ethereum-cryptography "0.1.3" - -"@nomicfoundation/ethereumjs-vm@7.0.1": - version "7.0.1" - resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-vm/-/ethereumjs-vm-7.0.1.tgz#7d035e0993bcad10716c8b36e61dfb87fa3ca05f" - integrity sha512-rArhyn0jPsS/D+ApFsz3yVJMQ29+pVzNZ0VJgkzAZ+7FqXSRtThl1C1prhmlVr3YNUlfpZ69Ak+RUT4g7VoOuQ== - dependencies: - "@nomicfoundation/ethereumjs-block" "5.0.1" - "@nomicfoundation/ethereumjs-blockchain" "7.0.1" - "@nomicfoundation/ethereumjs-common" "4.0.1" - "@nomicfoundation/ethereumjs-evm" "2.0.1" - "@nomicfoundation/ethereumjs-rlp" "5.0.1" - "@nomicfoundation/ethereumjs-statemanager" "2.0.1" - "@nomicfoundation/ethereumjs-trie" "6.0.1" - "@nomicfoundation/ethereumjs-tx" "5.0.1" - "@nomicfoundation/ethereumjs-util" "9.0.1" - debug "^4.3.3" - ethereum-cryptography "0.1.3" - mcl-wasm "^0.7.1" - rustbn.js "~0.2.0" - -"@nomicfoundation/hardhat-chai-matchers@^1.0.0": - version "1.0.6" - resolved "https://registry.yarnpkg.com/@nomicfoundation/hardhat-chai-matchers/-/hardhat-chai-matchers-1.0.6.tgz#72a2e312e1504ee5dd73fe302932736432ba96bc" - integrity sha512-f5ZMNmabZeZegEfuxn/0kW+mm7+yV7VNDxLpMOMGXWFJ2l/Ct3QShujzDRF9cOkK9Ui/hbDeOWGZqyQALDXVCQ== - dependencies: - "@ethersproject/abi" "^5.1.2" - "@types/chai-as-promised" "^7.1.3" - chai-as-promised "^7.1.1" - deep-eql "^4.0.1" - ordinal "^1.0.3" - -"@nomicfoundation/hardhat-network-helpers@^1.0.0": - version "1.0.8" - resolved "https://registry.yarnpkg.com/@nomicfoundation/hardhat-network-helpers/-/hardhat-network-helpers-1.0.8.tgz#e4fe1be93e8a65508c46d73c41fa26c7e9f84931" - integrity sha512-MNqQbzUJZnCMIYvlniC3U+kcavz/PhhQSsY90tbEtUyMj/IQqsLwIRZa4ctjABh3Bz0KCh9OXUZ7Yk/d9hr45Q== - dependencies: - ethereumjs-util "^7.1.4" - -"@nomicfoundation/hardhat-toolbox@^2.0.0": - version "2.0.2" - resolved "https://registry.yarnpkg.com/@nomicfoundation/hardhat-toolbox/-/hardhat-toolbox-2.0.2.tgz#ec95f23b53cb4e71a1a7091380fa223aad18f156" - integrity sha512-vnN1AzxbvpSx9pfdRHbUzTRIXpMLPXnUlkW855VaDk6N1pwRaQ2gNzEmFAABk4lWf11E00PKwFd/q27HuwYrYg== - -"@nomicfoundation/solidity-analyzer-darwin-arm64@0.1.1": - version "0.1.1" - resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-darwin-arm64/-/solidity-analyzer-darwin-arm64-0.1.1.tgz#4c858096b1c17fe58a474fe81b46815f93645c15" - integrity sha512-KcTodaQw8ivDZyF+D76FokN/HdpgGpfjc/gFCImdLUyqB6eSWVaZPazMbeAjmfhx3R0zm/NYVzxwAokFKgrc0w== - -"@nomicfoundation/solidity-analyzer-darwin-x64@0.1.1": - version "0.1.1" - resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-darwin-x64/-/solidity-analyzer-darwin-x64-0.1.1.tgz#6e25ccdf6e2d22389c35553b64fe6f3fdaec432c" - integrity sha512-XhQG4BaJE6cIbjAVtzGOGbK3sn1BO9W29uhk9J8y8fZF1DYz0Doj8QDMfpMu+A6TjPDs61lbsmeYodIDnfveSA== - -"@nomicfoundation/solidity-analyzer-freebsd-x64@0.1.1": - version "0.1.1" - resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-freebsd-x64/-/solidity-analyzer-freebsd-x64-0.1.1.tgz#0a224ea50317139caeebcdedd435c28a039d169c" - integrity sha512-GHF1VKRdHW3G8CndkwdaeLkVBi5A9u2jwtlS7SLhBc8b5U/GcoL39Q+1CSO3hYqePNP+eV5YI7Zgm0ea6kMHoA== - -"@nomicfoundation/solidity-analyzer-linux-arm64-gnu@0.1.1": - version "0.1.1" - resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-linux-arm64-gnu/-/solidity-analyzer-linux-arm64-gnu-0.1.1.tgz#dfa085d9ffab9efb2e7b383aed3f557f7687ac2b" - integrity sha512-g4Cv2fO37ZsUENQ2vwPnZc2zRenHyAxHcyBjKcjaSmmkKrFr64yvzeNO8S3GBFCo90rfochLs99wFVGT/0owpg== - -"@nomicfoundation/solidity-analyzer-linux-arm64-musl@0.1.1": - version "0.1.1" - resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-linux-arm64-musl/-/solidity-analyzer-linux-arm64-musl-0.1.1.tgz#c9e06b5d513dd3ab02a7ac069c160051675889a4" - integrity sha512-WJ3CE5Oek25OGE3WwzK7oaopY8xMw9Lhb0mlYuJl/maZVo+WtP36XoQTb7bW/i8aAdHW5Z+BqrHMux23pvxG3w== - -"@nomicfoundation/solidity-analyzer-linux-x64-gnu@0.1.1": - version "0.1.1" - resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-linux-x64-gnu/-/solidity-analyzer-linux-x64-gnu-0.1.1.tgz#8d328d16839e52571f72f2998c81e46bf320f893" - integrity sha512-5WN7leSr5fkUBBjE4f3wKENUy9HQStu7HmWqbtknfXkkil+eNWiBV275IOlpXku7v3uLsXTOKpnnGHJYI2qsdA== - -"@nomicfoundation/solidity-analyzer-linux-x64-musl@0.1.1": - version "0.1.1" - resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-linux-x64-musl/-/solidity-analyzer-linux-x64-musl-0.1.1.tgz#9b49d0634b5976bb5ed1604a1e1b736f390959bb" - integrity sha512-KdYMkJOq0SYPQMmErv/63CwGwMm5XHenEna9X9aB8mQmhDBrYrlAOSsIPgFCUSL0hjxE3xHP65/EPXR/InD2+w== - -"@nomicfoundation/solidity-analyzer-win32-arm64-msvc@0.1.1": - version "0.1.1" - resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-win32-arm64-msvc/-/solidity-analyzer-win32-arm64-msvc-0.1.1.tgz#e2867af7264ebbcc3131ef837878955dd6a3676f" - integrity sha512-VFZASBfl4qiBYwW5xeY20exWhmv6ww9sWu/krWSesv3q5hA0o1JuzmPHR4LPN6SUZj5vcqci0O6JOL8BPw+APg== - -"@nomicfoundation/solidity-analyzer-win32-ia32-msvc@0.1.1": - version "0.1.1" - resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-win32-ia32-msvc/-/solidity-analyzer-win32-ia32-msvc-0.1.1.tgz#0685f78608dd516c8cdfb4896ed451317e559585" - integrity sha512-JnFkYuyCSA70j6Si6cS1A9Gh1aHTEb8kOTBApp/c7NRTFGNMH8eaInKlyuuiIbvYFhlXW4LicqyYuWNNq9hkpQ== - -"@nomicfoundation/solidity-analyzer-win32-x64-msvc@0.1.1": - version "0.1.1" - resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-win32-x64-msvc/-/solidity-analyzer-win32-x64-msvc-0.1.1.tgz#c9a44f7108646f083b82e851486e0f6aeb785836" - integrity sha512-HrVJr6+WjIXGnw3Q9u6KQcbZCtk0caVWhCdFADySvRyUxJ8PnzlaP+MhwNE8oyT8OZ6ejHBRrrgjSqDCFXGirw== - -"@nomicfoundation/solidity-analyzer@^0.1.0": - version "0.1.1" - resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer/-/solidity-analyzer-0.1.1.tgz#f5f4d36d3f66752f59a57e7208cd856f3ddf6f2d" - integrity sha512-1LMtXj1puAxyFusBgUIy5pZk3073cNXYnXUpuNKFghHbIit/xZgbk0AokpUADbNm3gyD6bFWl3LRFh3dhVdREg== - optionalDependencies: - "@nomicfoundation/solidity-analyzer-darwin-arm64" "0.1.1" - "@nomicfoundation/solidity-analyzer-darwin-x64" "0.1.1" - "@nomicfoundation/solidity-analyzer-freebsd-x64" "0.1.1" - "@nomicfoundation/solidity-analyzer-linux-arm64-gnu" "0.1.1" - "@nomicfoundation/solidity-analyzer-linux-arm64-musl" "0.1.1" - "@nomicfoundation/solidity-analyzer-linux-x64-gnu" "0.1.1" - "@nomicfoundation/solidity-analyzer-linux-x64-musl" "0.1.1" - "@nomicfoundation/solidity-analyzer-win32-arm64-msvc" "0.1.1" - "@nomicfoundation/solidity-analyzer-win32-ia32-msvc" "0.1.1" - "@nomicfoundation/solidity-analyzer-win32-x64-msvc" "0.1.1" - -"@nomiclabs/hardhat-ethers@npm:hardhat-deploy-ethers": - version "0.3.0-beta.13" - resolved "https://registry.yarnpkg.com/hardhat-deploy-ethers/-/hardhat-deploy-ethers-0.3.0-beta.13.tgz#b96086ff768ddf69928984d5eb0a8d78cfca9366" - integrity sha512-PdWVcKB9coqWV1L7JTpfXRCI91Cgwsm7KLmBcwZ8f0COSm1xtABHZTyz3fvF6p42cTnz1VM0QnfDvMFlIRkSNw== - -"@nomiclabs/hardhat-etherscan@^3.0.0": - version "3.1.7" - resolved "https://registry.yarnpkg.com/@nomiclabs/hardhat-etherscan/-/hardhat-etherscan-3.1.7.tgz#72e3d5bd5d0ceb695e097a7f6f5ff6fcbf062b9a" - integrity sha512-tZ3TvSgpvsQ6B6OGmo1/Au6u8BrAkvs1mIC/eURA3xgIfznUZBhmpne8hv7BXUzw9xNL3fXdpOYgOQlVMTcoHQ== - dependencies: - "@ethersproject/abi" "^5.1.2" - "@ethersproject/address" "^5.0.2" - cbor "^8.1.0" - chalk "^2.4.2" - debug "^4.1.1" - fs-extra "^7.0.1" - lodash "^4.17.11" - semver "^6.3.0" - table "^6.8.0" - undici "^5.14.0" - -"@openzeppelin/contract-loader@^0.6.2": - version "0.6.3" - resolved "https://registry.yarnpkg.com/@openzeppelin/contract-loader/-/contract-loader-0.6.3.tgz#61a7b44de327e40b7d53f39e0fb59bbf847335c3" - integrity sha512-cOFIjBjwbGgZhDZsitNgJl0Ye1rd5yu/Yx5LMgeq3u0ZYzldm4uObzHDFq4gjDdoypvyORjjJa3BlFA7eAnVIg== - dependencies: - find-up "^4.1.0" - fs-extra "^8.1.0" - -"@openzeppelin/contracts-upgradeable@^4.8.3": - version "4.8.3" - resolved "https://registry.yarnpkg.com/@openzeppelin/contracts-upgradeable/-/contracts-upgradeable-4.8.3.tgz#6b076a7b751811b90fe3a172a7faeaa603e13a3f" - integrity sha512-SXDRl7HKpl2WDoJpn7CK/M9U4Z8gNXDHHChAKh0Iz+Wew3wu6CmFYBeie3je8V0GSXZAIYYwUktSrnW/kwVPtg== - -"@openzeppelin/contracts@^4.8.3": - version "4.8.3" - resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-4.8.3.tgz#cbef3146bfc570849405f59cba18235da95a252a" - integrity sha512-bQHV8R9Me8IaJoJ2vPG4rXcL7seB7YVuskr4f+f5RyOStSZetwzkWtoqDMl5erkBJy0lDRUnIR2WIkPiC0GJlg== - -"@openzeppelin/hardhat-upgrades@^1.23.1": - version "1.24.0" - resolved "https://registry.yarnpkg.com/@openzeppelin/hardhat-upgrades/-/hardhat-upgrades-1.24.0.tgz#b56f9858fcbb852d5db7caa9cc0367fa1239a64d" - integrity sha512-PmNf6y1eXSZ4k4f6Y42mcHeMfwY81MBiuh6vne+fOnWNZANCpjMV9b2Dy7SoS6IgFjq0umAtQYBsHWVWiaMSaw== - dependencies: - "@openzeppelin/upgrades-core" "^1.25.0" - chalk "^4.1.0" - debug "^4.1.1" - proper-lockfile "^4.1.1" - -"@openzeppelin/test-helpers@^0.5.16": - version "0.5.16" - resolved "https://registry.yarnpkg.com/@openzeppelin/test-helpers/-/test-helpers-0.5.16.tgz#2c9054f85069dfbfb5e8cef3ed781e8caf241fb3" - integrity sha512-T1EvspSfH1qQO/sgGlskLfYVBbqzJR23SZzYl/6B2JnT4EhThcI85UpvDk0BkLWKaDScQTabGHt4GzHW+3SfZg== - dependencies: - "@openzeppelin/contract-loader" "^0.6.2" - "@truffle/contract" "^4.0.35" - ansi-colors "^3.2.3" - chai "^4.2.0" - chai-bn "^0.2.1" - ethjs-abi "^0.2.1" - lodash.flatten "^4.4.0" - semver "^5.6.0" - web3 "^1.2.5" - web3-utils "^1.2.5" - -"@openzeppelin/upgrades-core@^1.25.0": - version "1.25.0" - resolved "https://registry.yarnpkg.com/@openzeppelin/upgrades-core/-/upgrades-core-1.25.0.tgz#4f540e2043b98f8b59a4e8a988b9aeb5b5f23a35" - integrity sha512-vSxOSm1k+P156nNm15ydhOmSPGC37mnl092FMVOH+eGaoqLjr2Za6ULVjDMFzvMnG+sGE1UoDOqBNPfTm0ch8w== - dependencies: - cbor "^8.0.0" - chalk "^4.1.0" - compare-versions "^5.0.0" - debug "^4.1.1" - ethereumjs-util "^7.0.3" - proper-lockfile "^4.1.1" - solidity-ast "^0.4.15" - -"@scure/base@~1.1.0": - version "1.1.1" - resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.1.1.tgz#ebb651ee52ff84f420097055f4bf46cfba403938" - integrity sha512-ZxOhsSyxYwLJj3pLZCefNitxsj093tb2vq90mp2txoYeBqbcjDjqFhyM8eUjq/uFm6zJ+mUuqxlS2FkuSY1MTA== - -"@scure/bip32@1.1.5": - version "1.1.5" - resolved "https://registry.yarnpkg.com/@scure/bip32/-/bip32-1.1.5.tgz#d2ccae16dcc2e75bc1d75f5ef3c66a338d1ba300" - integrity sha512-XyNh1rB0SkEqd3tXcXMi+Xe1fvg+kUIcoRIEujP1Jgv7DqW2r9lg3Ah0NkFaCs9sTkQAQA8kw7xiRXzENi9Rtw== - dependencies: - "@noble/hashes" "~1.2.0" - "@noble/secp256k1" "~1.7.0" - "@scure/base" "~1.1.0" - -"@scure/bip39@1.1.1": - version "1.1.1" - resolved "https://registry.yarnpkg.com/@scure/bip39/-/bip39-1.1.1.tgz#b54557b2e86214319405db819c4b6a370cf340c5" - integrity sha512-t+wDck2rVkh65Hmv280fYdVdY25J9YeEUIgn2LG1WM6gxFkGzcksoDiUkWVpVp3Oex9xGC68JU2dSbUfwZ2jPg== - dependencies: - "@noble/hashes" "~1.2.0" - "@scure/base" "~1.1.0" - -"@sentry/core@5.30.0": - version "5.30.0" - resolved "https://registry.yarnpkg.com/@sentry/core/-/core-5.30.0.tgz#6b203664f69e75106ee8b5a2fe1d717379b331f3" - integrity sha512-TmfrII8w1PQZSZgPpUESqjB+jC6MvZJZdLtE/0hZ+SrnKhW3x5WlYLvTXZpcWePYBku7rl2wn1RZu6uT0qCTeg== - dependencies: - "@sentry/hub" "5.30.0" - "@sentry/minimal" "5.30.0" - "@sentry/types" "5.30.0" - "@sentry/utils" "5.30.0" - tslib "^1.9.3" - -"@sentry/hub@5.30.0": - version "5.30.0" - resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-5.30.0.tgz#2453be9b9cb903404366e198bd30c7ca74cdc100" - integrity sha512-2tYrGnzb1gKz2EkMDQcfLrDTvmGcQPuWxLnJKXJvYTQDGLlEvi2tWz1VIHjunmOvJrB5aIQLhm+dcMRwFZDCqQ== - dependencies: - "@sentry/types" "5.30.0" - "@sentry/utils" "5.30.0" - tslib "^1.9.3" - -"@sentry/minimal@5.30.0": - version "5.30.0" - resolved "https://registry.yarnpkg.com/@sentry/minimal/-/minimal-5.30.0.tgz#ce3d3a6a273428e0084adcb800bc12e72d34637b" - integrity sha512-BwWb/owZKtkDX+Sc4zCSTNcvZUq7YcH3uAVlmh/gtR9rmUvbzAA3ewLuB3myi4wWRAMEtny6+J/FN/x+2wn9Xw== - dependencies: - "@sentry/hub" "5.30.0" - "@sentry/types" "5.30.0" - tslib "^1.9.3" - -"@sentry/node@^5.18.1": - version "5.30.0" - resolved "https://registry.yarnpkg.com/@sentry/node/-/node-5.30.0.tgz#4ca479e799b1021285d7fe12ac0858951c11cd48" - integrity sha512-Br5oyVBF0fZo6ZS9bxbJZG4ApAjRqAnqFFurMVJJdunNb80brh7a5Qva2kjhm+U6r9NJAB5OmDyPkA1Qnt+QVg== - dependencies: - "@sentry/core" "5.30.0" - "@sentry/hub" "5.30.0" - "@sentry/tracing" "5.30.0" - "@sentry/types" "5.30.0" - "@sentry/utils" "5.30.0" - cookie "^0.4.1" - https-proxy-agent "^5.0.0" - lru_map "^0.3.3" - tslib "^1.9.3" - -"@sentry/tracing@5.30.0": - version "5.30.0" - resolved "https://registry.yarnpkg.com/@sentry/tracing/-/tracing-5.30.0.tgz#501d21f00c3f3be7f7635d8710da70d9419d4e1f" - integrity sha512-dUFowCr0AIMwiLD7Fs314Mdzcug+gBVo/+NCMyDw8tFxJkwWAKl7Qa2OZxLQ0ZHjakcj1hNKfCQJ9rhyfOl4Aw== - dependencies: - "@sentry/hub" "5.30.0" - "@sentry/minimal" "5.30.0" - "@sentry/types" "5.30.0" - "@sentry/utils" "5.30.0" - tslib "^1.9.3" - -"@sentry/types@5.30.0": - version "5.30.0" - resolved "https://registry.yarnpkg.com/@sentry/types/-/types-5.30.0.tgz#19709bbe12a1a0115bc790b8942917da5636f402" - integrity sha512-R8xOqlSTZ+htqrfteCWU5Nk0CDN5ApUTvrlvBuiH1DyP6czDZ4ktbZB0hAgBlVcK0U+qpD3ag3Tqqpa5Q67rPw== - -"@sentry/utils@5.30.0": - version "5.30.0" - resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-5.30.0.tgz#9a5bd7ccff85ccfe7856d493bffa64cabc41e980" - integrity sha512-zaYmoH0NWWtvnJjC9/CBseXMtKHm/tm40sz3YfJRxeQjyzRqNQPgivpd9R/oDJCYj999mzdW382p/qi2ypjLww== - dependencies: - "@sentry/types" "5.30.0" - tslib "^1.9.3" - -"@sindresorhus/is@^4.0.0", "@sindresorhus/is@^4.6.0": - version "4.6.0" - resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-4.6.0.tgz#3c7c9c46e678feefe7a2e5bb609d3dbd665ffb3f" - integrity sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw== - -"@solidity-parser/parser@^0.14.0", "@solidity-parser/parser@^0.14.1": - version "0.14.5" - resolved "https://registry.yarnpkg.com/@solidity-parser/parser/-/parser-0.14.5.tgz#87bc3cc7b068e08195c219c91cd8ddff5ef1a804" - integrity sha512-6dKnHZn7fg/iQATVEzqyUOyEidbn05q7YA2mQ9hC0MMXhhV3/JrsxmFSYZAcr7j1yUP700LLhTruvJ3MiQmjJg== - dependencies: - antlr4ts "^0.5.0-alpha.4" - -"@szmarczak/http-timer@^4.0.5": - version "4.0.6" - resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-4.0.6.tgz#b4a914bb62e7c272d4e5989fe4440f812ab1d807" - integrity sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w== - dependencies: - defer-to-connect "^2.0.0" - -"@szmarczak/http-timer@^5.0.1": - version "5.0.1" - resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-5.0.1.tgz#c7c1bf1141cdd4751b0399c8fc7b8b664cd5be3a" - integrity sha512-+PmQX0PiAYPMeVYe237LJAYvOMYW1j2rH5YROyS3b4CTVJum34HfRvKvAzozHAQG0TnHNdUfY9nCeUyRAs//cw== - dependencies: - defer-to-connect "^2.0.1" - -"@truffle/abi-utils@^0.3.9": - version "0.3.9" - resolved "https://registry.yarnpkg.com/@truffle/abi-utils/-/abi-utils-0.3.9.tgz#c476f5cfe01072b513b3e93fd7bea05cf7bd9d96" - integrity sha512-G5dqgwRHx5zwlXjz3QT8OJVfB2cOqWwD6DwKso0KttUt/zejhCjnkKq72rSgyeLMkz7wBB9ERLOsupLBILM8MA== - dependencies: - change-case "3.0.2" - fast-check "3.1.1" - web3-utils "1.8.2" - -"@truffle/blockchain-utils@^0.1.7": - version "0.1.7" - resolved "https://registry.yarnpkg.com/@truffle/blockchain-utils/-/blockchain-utils-0.1.7.tgz#cf7923a3ae5b591ae4c2a5ee45994a310ccaf1ee" - integrity sha512-1nibqGjEHC7KAyDThEFvbm2+EO8zAHee/VjCtxkYBE3ySwP50joh0QCEBjy7K/9z+icpMoDucfxmgaKToBFUgQ== - -"@truffle/codec@^0.14.17": - version "0.14.17" - resolved "https://registry.yarnpkg.com/@truffle/codec/-/codec-0.14.17.tgz#4ab11fab335854dad0d4aef75db2960ebd76fcd8" - integrity sha512-kD4dD86huLeaBEq5R8D1zleJEu6NsXbyYLdXl1V1TKdiO8odw5CBC6Y/+wdu5d3t1dyEYrTbhn1dqknZa52pmw== - dependencies: - "@truffle/abi-utils" "^0.3.9" - "@truffle/compile-common" "^0.9.4" - big.js "^6.0.3" - bn.js "^5.1.3" - cbor "^5.2.0" - debug "^4.3.1" - lodash "^4.17.21" - semver "7.3.7" - utf8 "^3.0.0" - web3-utils "1.8.2" - -"@truffle/compile-common@^0.9.4": - version "0.9.4" - resolved "https://registry.yarnpkg.com/@truffle/compile-common/-/compile-common-0.9.4.tgz#064208cda70491692b538f717809bb904a122c20" - integrity sha512-mnqJB/hLiPHNf+WKwt/2MH6lv34xSG/SFCib7+ckAklutUqVLeFo8EwQxinuHNkU7LY0C+YgZXhK1WTCO5YRJQ== - dependencies: - "@truffle/error" "^0.2.0" - colors "1.4.0" - -"@truffle/contract-schema@^3.4.13": - version "3.4.13" - resolved "https://registry.yarnpkg.com/@truffle/contract-schema/-/contract-schema-3.4.13.tgz#48447673f29380830f5821e8139ceefbbd545aac" - integrity sha512-emG7upuryYFrsPDbHqeASPWXL824M1tinhQwSPG0phSoa3g+RX9fUNNN/VPmF3tSkXLWUMhRnb7ehxnaCuRbZg== - dependencies: - ajv "^6.10.0" - debug "^4.3.1" - -"@truffle/contract@^4.0.35": - version "4.6.20" - resolved "https://registry.yarnpkg.com/@truffle/contract/-/contract-4.6.20.tgz#48237b9d3fe3e5019eac2c8ce9794201ae84fdf8" - integrity sha512-s7Mbc37L/CF5Apy/cjPnalkgACmG9tTAmcIW28cIZLRLOUAze18pqhtdHryxAQhEOtKGaDAho6TriqL7/74uHw== - dependencies: - "@ensdomains/ensjs" "^2.1.0" - "@truffle/blockchain-utils" "^0.1.7" - "@truffle/contract-schema" "^3.4.13" - "@truffle/debug-utils" "^6.0.48" - "@truffle/error" "^0.2.0" - "@truffle/interface-adapter" "^0.5.32" - bignumber.js "^7.2.1" - debug "^4.3.1" - ethers "^4.0.32" - web3 "1.8.2" - web3-core-helpers "1.8.2" - web3-core-promievent "1.8.2" - web3-eth-abi "1.8.2" - web3-utils "1.8.2" - -"@truffle/debug-utils@^6.0.48": - version "6.0.48" - resolved "https://registry.yarnpkg.com/@truffle/debug-utils/-/debug-utils-6.0.48.tgz#218caa0e00d95a03abadb05dfe63d621530e113a" - integrity sha512-HdK/7eH5EFrcTPeZVEgKaKkkzuZ4xsrH8yw+EoLEsScLsOEuQeKynY61NctjuU93voATWrYmV99Sfb/MRq2i2g== - dependencies: - "@truffle/codec" "^0.14.17" - "@trufflesuite/chromafi" "^3.0.0" - bn.js "^5.1.3" - chalk "^2.4.2" - debug "^4.3.1" - highlightjs-solidity "^2.0.6" - -"@truffle/error@^0.2.0": - version "0.2.0" - resolved "https://registry.yarnpkg.com/@truffle/error/-/error-0.2.0.tgz#65de6f03f5c041f883cc87677eecf8231428f1ab" - integrity sha512-Fe0/z4WWb7IP2gBnv3l6zqP87Y0kSMs7oiSLakKJq17q3GUunrHSdioKuNspdggxkXIBhEQLhi8C+LJdwmHKWQ== - -"@truffle/interface-adapter@^0.5.32": - version "0.5.32" - resolved "https://registry.yarnpkg.com/@truffle/interface-adapter/-/interface-adapter-0.5.32.tgz#2ae896ea85a9d267abcd5d0139afc0f06ebc5745" - integrity sha512-7Hgmdb4nJUcWtq4vvgWY7Mr2RLOTOp5FZaWyMiFmjkcEEhDlezm2QstALWAXgT0W6q7tDmDBpw3vTIFenRhHBA== - dependencies: - bn.js "^5.1.3" - ethers "^4.0.32" - web3 "1.8.2" - -"@trufflesuite/chromafi@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@trufflesuite/chromafi/-/chromafi-3.0.0.tgz#f6956408c1af6a38a6ed1657783ce59504a1eb8b" - integrity sha512-oqWcOqn8nT1bwlPPfidfzS55vqcIDdpfzo3HbU9EnUmcSTX+I8z0UyUFI3tZQjByVJulbzxHxUGS3ZJPwK/GPQ== - dependencies: - camelcase "^4.1.0" - chalk "^2.3.2" - cheerio "^1.0.0-rc.2" - detect-indent "^5.0.0" - highlight.js "^10.4.1" - lodash.merge "^4.6.2" - strip-ansi "^4.0.0" - strip-indent "^2.0.0" - -"@tsconfig/node10@^1.0.7": - version "1.0.9" - resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.9.tgz#df4907fc07a886922637b15e02d4cebc4c0021b2" - integrity sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA== - -"@tsconfig/node12@^1.0.7": - version "1.0.11" - resolved "https://registry.yarnpkg.com/@tsconfig/node12/-/node12-1.0.11.tgz#ee3def1f27d9ed66dac6e46a295cffb0152e058d" - integrity sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag== - -"@tsconfig/node14@^1.0.0": - version "1.0.3" - resolved "https://registry.yarnpkg.com/@tsconfig/node14/-/node14-1.0.3.tgz#e4386316284f00b98435bf40f72f75a09dabf6c1" - integrity sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow== - -"@tsconfig/node16@^1.0.2": - version "1.0.3" - resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.3.tgz#472eaab5f15c1ffdd7f8628bd4c4f753995ec79e" - integrity sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ== - -"@typechain/ethers-v5@^10.1.0": - version "10.2.0" - resolved "https://registry.yarnpkg.com/@typechain/ethers-v5/-/ethers-v5-10.2.0.tgz#68f5963efb5214cb2d881477228e4b5b315473e1" - integrity sha512-ikaq0N/w9fABM+G01OFmU3U3dNnyRwEahkdvi9mqy1a3XwKiPZaF/lu54OcNaEWnpvEYyhhS0N7buCtLQqC92w== - dependencies: - lodash "^4.17.15" - ts-essentials "^7.0.1" - -"@typechain/hardhat@^6.1.2": - version "6.1.5" - resolved "https://registry.yarnpkg.com/@typechain/hardhat/-/hardhat-6.1.5.tgz#caad58a1d3e9cd88061a584eb4f4fa763d5dcad1" - integrity sha512-lg7LW4qDZpxFMknp3Xool61Fg6Lays8F8TXdFGBG+MxyYcYU5795P1U2XdStuzGq9S2Dzdgh+1jGww9wvZ6r4Q== - dependencies: - fs-extra "^9.1.0" - -"@types/bn.js@^4.11.3": - version "4.11.6" - resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-4.11.6.tgz#c306c70d9358aaea33cd4eda092a742b9505967c" - integrity sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg== - dependencies: - "@types/node" "*" - -"@types/bn.js@^5.1.0", "@types/bn.js@^5.1.1": - version "5.1.1" - resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-5.1.1.tgz#b51e1b55920a4ca26e9285ff79936bbdec910682" - integrity sha512-qNrYbZqMx0uJAfKnKclPh+dTwK33KfLHYqtyODwd5HnXOjnkhc4qgn3BrK6RWyGZm5+sIFE7Q7Vz6QQtJB7w7g== - dependencies: - "@types/node" "*" - -"@types/cacheable-request@^6.0.1", "@types/cacheable-request@^6.0.2": - version "6.0.3" - resolved "https://registry.yarnpkg.com/@types/cacheable-request/-/cacheable-request-6.0.3.tgz#a430b3260466ca7b5ca5bfd735693b36e7a9d183" - integrity sha512-IQ3EbTzGxIigb1I3qPZc1rWJnH0BmSKv5QYTalEwweFvyBDLSAe24zP0le/hyi7ecGfZVlIVAg4BZqb8WBwKqw== - dependencies: - "@types/http-cache-semantics" "*" - "@types/keyv" "^3.1.4" - "@types/node" "*" - "@types/responselike" "^1.0.0" - -"@types/chai-as-promised@^7.1.3": - version "7.1.5" - resolved "https://registry.yarnpkg.com/@types/chai-as-promised/-/chai-as-promised-7.1.5.tgz#6e016811f6c7a64f2eed823191c3a6955094e255" - integrity sha512-jStwss93SITGBwt/niYrkf2C+/1KTeZCZl1LaeezTlqppAKeoQC7jxyqYuP72sxBGKCIbw7oHgbYssIRzT5FCQ== - dependencies: - "@types/chai" "*" - -"@types/chai@*", "@types/chai@^4.2.0": - version "4.3.5" - resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.3.5.tgz#ae69bcbb1bebb68c4ac0b11e9d8ed04526b3562b" - integrity sha512-mEo1sAde+UCE6b2hxn332f1g1E8WfYRu6p5SvTKr2ZKC1f7gFJXk4h5PyGP9Dt6gCaG8y8XhwnXWC6Iy2cmBng== - -"@types/concat-stream@^1.6.0": - version "1.6.1" - resolved "https://registry.yarnpkg.com/@types/concat-stream/-/concat-stream-1.6.1.tgz#24bcfc101ecf68e886aaedce60dfd74b632a1b74" - integrity sha512-eHE4cQPoj6ngxBZMvVf6Hw7Mh4jMW4U9lpGmS5GBPB9RYxlFg+CHaVN7ErNY4W9XfLIEn20b4VDYaIrbq0q4uA== - dependencies: - "@types/node" "*" - -"@types/form-data@0.0.33": - version "0.0.33" - resolved "https://registry.yarnpkg.com/@types/form-data/-/form-data-0.0.33.tgz#c9ac85b2a5fd18435b8c85d9ecb50e6d6c893ff8" - integrity sha512-8BSvG1kGm83cyJITQMZSulnl6QV8jqAGreJsc5tPu1Jq0vTSOiY/k24Wx82JRpWwZSqrala6sd5rWi6aNXvqcw== - dependencies: - "@types/node" "*" - -"@types/glob@^7.1.1": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.2.0.tgz#bc1b5bf3aa92f25bd5dd39f35c57361bdce5b2eb" - integrity sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA== - dependencies: - "@types/minimatch" "*" - "@types/node" "*" - -"@types/http-cache-semantics@*": - version "4.0.1" - resolved "https://registry.yarnpkg.com/@types/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz#0ea7b61496902b95890dc4c3a116b60cb8dae812" - integrity sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ== - -"@types/keyv@^3.1.4": - version "3.1.4" - resolved "https://registry.yarnpkg.com/@types/keyv/-/keyv-3.1.4.tgz#3ccdb1c6751b0c7e52300bcdacd5bcbf8faa75b6" - integrity sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg== - dependencies: - "@types/node" "*" - -"@types/lru-cache@^5.1.0": - version "5.1.1" - resolved "https://registry.yarnpkg.com/@types/lru-cache/-/lru-cache-5.1.1.tgz#c48c2e27b65d2a153b19bfc1a317e30872e01eef" - integrity sha512-ssE3Vlrys7sdIzs5LOxCzTVMsU7i9oa/IaW92wF32JFb3CVczqOkru2xspuKczHEbG3nvmPY7IFqVmGGHdNbYw== - -"@types/minimatch@*": - version "5.1.2" - resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-5.1.2.tgz#07508b45797cb81ec3f273011b054cd0755eddca" - integrity sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA== - -"@types/mocha@>=9.1.0": - version "10.0.1" - resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-10.0.1.tgz#2f4f65bb08bc368ac39c96da7b2f09140b26851b" - integrity sha512-/fvYntiO1GeICvqbQ3doGDIP97vWmvFt83GKguJ6prmQM2iXZfFcq6YE8KteFyRtX2/h5Hf91BYvPodJKFYv5Q== - -"@types/node@*", "@types/node@>=12.0.0": - version "20.0.0" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.0.0.tgz#081d9afd28421be956c1a47ced1c9a0034b467e2" - integrity sha512-cD2uPTDnQQCVpmRefonO98/PPijuOnnEy5oytWJFPY1N9aJCz2wJ5kSGWO+zJoed2cY2JxQh6yBuUq4vIn61hw== - -"@types/node@^10.0.3": - version "10.17.60" - resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.60.tgz#35f3d6213daed95da7f0f73e75bcc6980e90597b" - integrity sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw== - -"@types/node@^12.12.6": - version "12.20.55" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.55.tgz#c329cbd434c42164f846b909bd6f85b5537f6240" - integrity sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ== - -"@types/node@^8.0.0": - version "8.10.66" - resolved "https://registry.yarnpkg.com/@types/node/-/node-8.10.66.tgz#dd035d409df322acc83dff62a602f12a5783bbb3" - integrity sha512-tktOkFUA4kXx2hhhrB8bIFb5TbwzS4uOhKEmwiD+NoiL0qtP2OQ9mFldbgD4dV1djrlBYP6eBuQZiWjuHUpqFw== - -"@types/pbkdf2@^3.0.0": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@types/pbkdf2/-/pbkdf2-3.1.0.tgz#039a0e9b67da0cdc4ee5dab865caa6b267bb66b1" - integrity sha512-Cf63Rv7jCQ0LaL8tNXmEyqTHuIJxRdlS5vMh1mj5voN4+QFhVZnlZruezqpWYDiJ8UTzhP0VmeLXCmBk66YrMQ== - dependencies: - "@types/node" "*" - -"@types/prettier@^2.1.1": - version "2.7.2" - resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.7.2.tgz#6c2324641cc4ba050a8c710b2b251b377581fbf0" - integrity sha512-KufADq8uQqo1pYKVIYzfKbJfBAc0sOeXqGbFaSpv8MRmC/zXgowNZmFcbngndGk922QDmOASEXUZCaY48gs4cg== - -"@types/qs@^6.2.31", "@types/qs@^6.9.7": - version "6.9.7" - resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.7.tgz#63bb7d067db107cc1e457c303bc25d511febf6cb" - integrity sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw== - -"@types/readable-stream@^2.3.13": - version "2.3.15" - resolved "https://registry.yarnpkg.com/@types/readable-stream/-/readable-stream-2.3.15.tgz#3d79c9ceb1b6a57d5f6e6976f489b9b5384321ae" - integrity sha512-oM5JSKQCcICF1wvGgmecmHldZ48OZamtMxcGGVICOJA8o8cahXC1zEVAif8iwoc5j8etxFaRFnf095+CDsuoFQ== - dependencies: - "@types/node" "*" - safe-buffer "~5.1.1" - -"@types/responselike@^1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@types/responselike/-/responselike-1.0.0.tgz#251f4fe7d154d2bad125abe1b429b23afd262e29" - integrity sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA== - dependencies: - "@types/node" "*" - -"@types/secp256k1@^4.0.1": - version "4.0.3" - resolved "https://registry.yarnpkg.com/@types/secp256k1/-/secp256k1-4.0.3.tgz#1b8e55d8e00f08ee7220b4d59a6abe89c37a901c" - integrity sha512-Da66lEIFeIz9ltsdMZcpQvmrmmoqrfju8pm1BH8WbYjZSwUgCwXLb9C+9XYogwBITnbsSaMdVPb2ekf7TV+03w== - dependencies: - "@types/node" "*" - -abbrev@1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" - integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== - -abbrev@1.0.x: - version "1.0.9" - resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.0.9.tgz#91b4792588a7738c25f35dd6f63752a2f8776135" - integrity sha512-LEyx4aLEC3x6T0UguF6YILf+ntvmOaWsVfENmIW0E9H09vKlLDGelMjjSm0jkDHALj8A8quZ/HapKNigzwge+Q== - -abort-controller@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/abort-controller/-/abort-controller-3.0.0.tgz#eaf54d53b62bae4138e809ca225c8439a6efb392" - integrity sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg== - dependencies: - event-target-shim "^5.0.0" - -abortcontroller-polyfill@^1.7.3: - version "1.7.5" - resolved "https://registry.yarnpkg.com/abortcontroller-polyfill/-/abortcontroller-polyfill-1.7.5.tgz#6738495f4e901fbb57b6c0611d0c75f76c485bed" - integrity sha512-JMJ5soJWP18htbbxJjG7bG6yuI6pRhgJ0scHHTfkUjf6wjP912xZWvM+A4sJK3gqd9E8fcPbDnOefbA9Th/FIQ== - -abstract-level@^1.0.0, abstract-level@^1.0.2, abstract-level@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/abstract-level/-/abstract-level-1.0.3.tgz#78a67d3d84da55ee15201486ab44c09560070741" - integrity sha512-t6jv+xHy+VYwc4xqZMn2Pa9DjcdzvzZmQGRjTFc8spIbRGHgBrEKbPq+rYXc7CCo0lxgYvSgKVg9qZAhpVQSjA== - dependencies: - buffer "^6.0.3" - catering "^2.1.0" - is-buffer "^2.0.5" - level-supports "^4.0.0" - level-transcoder "^1.0.1" - module-error "^1.0.1" - queue-microtask "^1.2.3" - -accepts@~1.3.8: - version "1.3.8" - resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.8.tgz#0bf0be125b67014adcb0b0921e62db7bffe16b2e" - integrity sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw== - dependencies: - mime-types "~2.1.34" - negotiator "0.6.3" - -acorn-walk@^8.1.1: - version "8.2.0" - resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1" - integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA== - -acorn@^8.4.1: - version "8.8.2" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.2.tgz#1b2f25db02af965399b9776b0c2c391276d37c4a" - integrity sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw== - -address@^1.0.1: - version "1.2.2" - resolved "https://registry.yarnpkg.com/address/-/address-1.2.2.tgz#2b5248dac5485a6390532c6a517fda2e3faac89e" - integrity sha512-4B/qKCfeE/ODUaAUpSwfzazo5x29WD4r3vXiWsB7I2mSDAihwEqKO+g8GELZUQSSAo5e1XTYh3ZVfLyxBc12nA== - -adm-zip@^0.4.16: - version "0.4.16" - resolved "https://registry.yarnpkg.com/adm-zip/-/adm-zip-0.4.16.tgz#cf4c508fdffab02c269cbc7f471a875f05570365" - integrity sha512-TFi4HBKSGfIKsK5YCkKaaFG2m4PEDyViZmEwof3MTIgzimHLto6muaHVpbrljdIvIrFZzEq/p4nafOeLcYegrg== - -aes-js@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-3.0.0.tgz#e21df10ad6c2053295bcbb8dab40b09dbea87e4d" - integrity sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw== - -agent-base@6: - version "6.0.2" - resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" - integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ== - dependencies: - debug "4" - -aggregate-error@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/aggregate-error/-/aggregate-error-3.1.0.tgz#92670ff50f5359bdb7a3e0d40d0ec30c5737687a" - integrity sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA== - dependencies: - clean-stack "^2.0.0" - indent-string "^4.0.0" - -ajv@^6.10.0, ajv@^6.12.3: - version "6.12.6" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" - integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== - dependencies: - fast-deep-equal "^3.1.1" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.4.1" - uri-js "^4.2.2" - -ajv@^8.0.1: - version "8.12.0" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.12.0.tgz#d1a0527323e22f53562c567c00991577dfbe19d1" - integrity sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA== - dependencies: - fast-deep-equal "^3.1.1" - json-schema-traverse "^1.0.0" - require-from-string "^2.0.2" - uri-js "^4.2.2" - -amdefine@>=0.0.4: - version "1.0.1" - resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" - integrity sha512-S2Hw0TtNkMJhIabBwIojKL9YHO5T0n5eNqWJ7Lrlel/zDbftQpxpapi8tZs3X1HWa+u+QeydGmzzNU0m09+Rcg== - -ansi-colors@3.2.3: - version "3.2.3" - resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-3.2.3.tgz#57d35b8686e851e2cc04c403f1c00203976a1813" - integrity sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw== - -ansi-colors@4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" - integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== - -ansi-colors@^3.2.3: - version "3.2.4" - resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-3.2.4.tgz#e3a3da4bfbae6c86a9c285625de124a234026fbf" - integrity sha512-hHUXGagefjN2iRrID63xckIvotOXOojhQKWIPUZ4mNUZ9nLZW+7FMNoE1lOkEhNWYsx/7ysGIuJYCiMAA9FnrA== - -ansi-colors@^4.1.1: - version "4.1.3" - resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.3.tgz#37611340eb2243e70cc604cad35d63270d48781b" - integrity sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw== - -ansi-escapes@^4.3.0: - version "4.3.2" - resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" - integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== - dependencies: - type-fest "^0.21.3" - -ansi-regex@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" - integrity sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA== - -ansi-regex@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.1.tgz#123d6479e92ad45ad897d4054e3c7ca7db4944e1" - integrity sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw== - -ansi-regex@^4.1.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.1.tgz#164daac87ab2d6f6db3a29875e2d1766582dabed" - integrity sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g== - -ansi-regex@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" - integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== - -ansi-styles@^3.2.0, ansi-styles@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" - integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== - dependencies: - color-convert "^1.9.0" - -ansi-styles@^4.0.0, ansi-styles@^4.1.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" - integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== - dependencies: - color-convert "^2.0.1" - -antlr4ts@^0.5.0-alpha.4: - version "0.5.0-alpha.4" - resolved "https://registry.yarnpkg.com/antlr4ts/-/antlr4ts-0.5.0-alpha.4.tgz#71702865a87478ed0b40c0709f422cf14d51652a" - integrity sha512-WPQDt1B74OfPv/IMS2ekXAKkTZIHl88uMetg6q3OTqgFxZ/dxDXI0EWLyZid/1Pe6hTftyg5N7gel5wNAGxXyQ== - -anymatch@~3.1.1, anymatch@~3.1.2: - version "3.1.3" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e" - integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== - dependencies: - normalize-path "^3.0.0" - picomatch "^2.0.4" - -arg@^4.1.0: - version "4.1.3" - resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" - integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== - -argparse@^1.0.7: - version "1.0.10" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" - integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== - dependencies: - sprintf-js "~1.0.2" - -argparse@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" - integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== - -array-back@^3.0.1, array-back@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/array-back/-/array-back-3.1.0.tgz#b8859d7a508871c9a7b2cf42f99428f65e96bfb0" - integrity sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q== - -array-back@^4.0.1, array-back@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/array-back/-/array-back-4.0.2.tgz#8004e999a6274586beeb27342168652fdb89fa1e" - integrity sha512-NbdMezxqf94cnNfWLL7V/im0Ub+Anbb0IoZhvzie8+4HJ4nMQuzHuy49FkGYCJK2yAloZ3meiB6AVMClbrI1vg== - -array-buffer-byte-length@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz#fabe8bc193fea865f317fe7807085ee0dee5aead" - integrity sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A== - dependencies: - call-bind "^1.0.2" - is-array-buffer "^3.0.1" - -array-flatten@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" - integrity sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg== - -array-union@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" - integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== - -array-uniq@1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" - integrity sha512-MNha4BWQ6JbwhFhj03YK552f7cb3AzoE8SzeljgChvL1dl3IcvggXVz1DilzySZkCja+CXuZbdW7yATchWn8/Q== - -array.prototype.reduce@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/array.prototype.reduce/-/array.prototype.reduce-1.0.5.tgz#6b20b0daa9d9734dd6bc7ea66b5bbce395471eac" - integrity sha512-kDdugMl7id9COE8R7MHF5jWk7Dqt/fs4Pv+JXoICnYwqpjjjbUurz6w5fT5IG6brLdJhv6/VoHB0H7oyIBXd+Q== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - es-array-method-boxes-properly "^1.0.0" - is-string "^1.0.7" - -asap@~2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" - integrity sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA== - -asn1@~0.2.3: - version "0.2.6" - resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.6.tgz#0d3a7bb6e64e02a90c0303b31f292868ea09a08d" - integrity sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ== - dependencies: - safer-buffer "~2.1.0" - -assert-plus@1.0.0, assert-plus@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" - integrity sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw== - -assertion-error@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b" - integrity sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw== - -astral-regex@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31" - integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ== - -async-limiter@~1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.1.tgz#dd379e94f0db8310b08291f9d64c3209766617fd" - integrity sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ== - -async@1.x: - version "1.5.2" - resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" - integrity sha512-nSVgobk4rv61R9PUSDtYt7mPVB2olxNR5RWJcAsH676/ef11bUZwvu7+RGYrYauVdDPcO519v68wRhXQtxsV9w== - -asynckit@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" - integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== - -at-least-node@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2" - integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg== - -available-typed-arrays@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7" - integrity sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw== - -aws-sign2@~0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" - integrity sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA== - -aws4@^1.8.0: - version "1.12.0" - resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.12.0.tgz#ce1c9d143389679e253b314241ea9aa5cec980d3" - integrity sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg== - -axios@^0.21.1: - version "0.21.4" - resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.4.tgz#c67b90dc0568e5c1cf2b0b858c43ba28e2eda575" - integrity sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg== - dependencies: - follow-redirects "^1.14.0" - -balanced-match@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" - integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== - -base-x@^3.0.2, base-x@^3.0.8: - version "3.0.9" - resolved "https://registry.yarnpkg.com/base-x/-/base-x-3.0.9.tgz#6349aaabb58526332de9f60995e548a53fe21320" - integrity sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ== - dependencies: - safe-buffer "^5.0.1" - -base64-js@^1.3.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" - integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== - -bcrypt-pbkdf@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e" - integrity sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w== - dependencies: - tweetnacl "^0.14.3" - -bech32@1.1.4, bech32@^1.1.3: - version "1.1.4" - resolved "https://registry.yarnpkg.com/bech32/-/bech32-1.1.4.tgz#e38c9f37bf179b8eb16ae3a772b40c356d4832e9" - integrity sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ== - -big-integer@1.6.36: - version "1.6.36" - resolved "https://registry.yarnpkg.com/big-integer/-/big-integer-1.6.36.tgz#78631076265d4ae3555c04f85e7d9d2f3a071a36" - integrity sha512-t70bfa7HYEA1D9idDbmuv7YbsbVkQ+Hp+8KFSul4aE5e/i1bjCNIRYJZlA8Q8p0r9T8cF/RVvwUgRA//FydEyg== - -big.js@^6.0.3: - version "6.2.1" - resolved "https://registry.yarnpkg.com/big.js/-/big.js-6.2.1.tgz#7205ce763efb17c2e41f26f121c420c6a7c2744f" - integrity sha512-bCtHMwL9LeDIozFn+oNhhFoq+yQ3BNdnsLSASUxLciOb1vgvpHsIO1dsENiGMgbb4SkP5TrzWzRiLddn8ahVOQ== - -bigint-crypto-utils@^3.0.23: - version "3.2.2" - resolved "https://registry.yarnpkg.com/bigint-crypto-utils/-/bigint-crypto-utils-3.2.2.tgz#e30a49ec38357c6981cd3da5aaa6480b1f752ee4" - integrity sha512-U1RbE3aX9ayCUVcIPHuPDPKcK3SFOXf93J1UK/iHlJuQB7bhagPIX06/CLpLEsDThJ7KA4Dhrnzynl+d2weTiw== - -bignumber.js@^7.2.1: - version "7.2.1" - resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-7.2.1.tgz#80c048759d826800807c4bfd521e50edbba57a5f" - integrity sha512-S4XzBk5sMB+Rcb/LNcpzXr57VRTxgAvaAEDAl1AwRx27j00hT84O6OkteE7u8UB3NuaaygCRrEpqox4uDOrbdQ== - -bignumber.js@^9.0.0, bignumber.js@^9.0.1: - version "9.1.1" - resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.1.1.tgz#c4df7dc496bd849d4c9464344c1aa74228b4dac6" - integrity sha512-pHm4LsMJ6lzgNGVfZHjMoO8sdoRhOzOH4MLmY65Jg70bpxCKu5iOHNJyfF6OyvYw7t8Fpf35RuzUyqnQsj8Vig== - -binary-extensions@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" - integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== - -blakejs@^1.1.0: - version "1.2.1" - resolved "https://registry.yarnpkg.com/blakejs/-/blakejs-1.2.1.tgz#5057e4206eadb4a97f7c0b6e197a505042fc3814" - integrity sha512-QXUSXI3QVc/gJME0dBpXrag1kbzOqCjCX8/b54ntNyW6sjtoqxqRk3LTmXzaJoh71zMsDCjM+47jS7XiwN/+fQ== - -bluebird@^3.5.0, bluebird@^3.5.2: - version "3.7.2" - resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" - integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== - -bn.js@4.11.6: - version "4.11.6" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.6.tgz#53344adb14617a13f6e8dd2ce28905d1c0ba3215" - integrity sha512-XWwnNNFCuuSQ0m3r3C4LE3EiORltHd9M05pq6FOlVeiophzRbMo50Sbz1ehl8K3Z+jw9+vmgnXefY1hz8X+2wA== - -bn.js@^4.11.0, bn.js@^4.11.6, bn.js@^4.11.8, bn.js@^4.11.9: - version "4.12.0" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88" - integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA== - -bn.js@^5.1.2, bn.js@^5.1.3, bn.js@^5.2.0, bn.js@^5.2.1: - version "5.2.1" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.1.tgz#0bc527a6a0d18d0aa8d5b0538ce4a77dccfa7b70" - integrity sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ== - -body-parser@1.20.1: - version "1.20.1" - resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.1.tgz#b1812a8912c195cd371a3ee5e66faa2338a5c668" - integrity sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw== - dependencies: - bytes "3.1.2" - content-type "~1.0.4" - debug "2.6.9" - depd "2.0.0" - destroy "1.2.0" - http-errors "2.0.0" - iconv-lite "0.4.24" - on-finished "2.4.1" - qs "6.11.0" - raw-body "2.5.1" - type-is "~1.6.18" - unpipe "1.0.0" - -body-parser@^1.16.0: - version "1.20.2" - resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.2.tgz#6feb0e21c4724d06de7ff38da36dad4f57a747fd" - integrity sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA== - dependencies: - bytes "3.1.2" - content-type "~1.0.5" - debug "2.6.9" - depd "2.0.0" - destroy "1.2.0" - http-errors "2.0.0" - iconv-lite "0.4.24" - on-finished "2.4.1" - qs "6.11.0" - raw-body "2.5.2" - type-is "~1.6.18" - unpipe "1.0.0" - -boolbase@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" - integrity sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww== - -brace-expansion@^1.1.7: - version "1.1.11" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" - integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== - dependencies: - balanced-match "^1.0.0" - concat-map "0.0.1" - -brace-expansion@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae" - integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== - dependencies: - balanced-match "^1.0.0" - -braces@^3.0.2, braces@~3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" - integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== - dependencies: - fill-range "^7.0.1" - -brorand@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" - integrity sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w== - -browser-level@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/browser-level/-/browser-level-1.0.1.tgz#36e8c3183d0fe1c405239792faaab5f315871011" - integrity sha512-XECYKJ+Dbzw0lbydyQuJzwNXtOpbMSq737qxJN11sIRTErOMShvDpbzTlgju7orJKvx4epULolZAuJGLzCmWRQ== - dependencies: - abstract-level "^1.0.2" - catering "^2.1.1" - module-error "^1.0.2" - run-parallel-limit "^1.1.0" - -browser-stdout@1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" - integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== - -browserify-aes@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48" - integrity sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA== - dependencies: - buffer-xor "^1.0.3" - cipher-base "^1.0.0" - create-hash "^1.1.0" - evp_bytestokey "^1.0.3" - inherits "^2.0.1" - safe-buffer "^5.0.1" - -bs58@^4.0.0, bs58@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/bs58/-/bs58-4.0.1.tgz#be161e76c354f6f788ae4071f63f34e8c4f0a42a" - integrity sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw== - dependencies: - base-x "^3.0.2" - -bs58check@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/bs58check/-/bs58check-2.1.2.tgz#53b018291228d82a5aa08e7d796fdafda54aebfc" - integrity sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA== - dependencies: - bs58 "^4.0.0" - create-hash "^1.1.0" - safe-buffer "^5.1.2" - -buffer-from@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" - integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== - -buffer-to-arraybuffer@^0.0.5: - version "0.0.5" - resolved "https://registry.yarnpkg.com/buffer-to-arraybuffer/-/buffer-to-arraybuffer-0.0.5.tgz#6064a40fa76eb43c723aba9ef8f6e1216d10511a" - integrity sha512-3dthu5CYiVB1DEJp61FtApNnNndTckcqe4pFcLdvHtrpG+kcyekCJKg4MRiDcFW7A6AODnXB9U4dwQiCW5kzJQ== - -buffer-xor@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" - integrity sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ== - -buffer@6.0.3, buffer@^6.0.3: - version "6.0.3" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6" - integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA== - dependencies: - base64-js "^1.3.1" - ieee754 "^1.2.1" - -buffer@^5.0.5, buffer@^5.5.0, buffer@^5.6.0: - version "5.7.1" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" - integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== - dependencies: - base64-js "^1.3.1" - ieee754 "^1.1.13" - -bufferutil@^4.0.1: - version "4.0.7" - resolved "https://registry.yarnpkg.com/bufferutil/-/bufferutil-4.0.7.tgz#60c0d19ba2c992dd8273d3f73772ffc894c153ad" - integrity sha512-kukuqc39WOHtdxtw4UScxF/WVnMFVSQVKhtx3AjZJzhd0RGZZldcrfSEbVsWWe6KNH253574cq5F+wpv0G9pJw== - dependencies: - node-gyp-build "^4.3.0" - -busboy@^1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/busboy/-/busboy-1.6.0.tgz#966ea36a9502e43cdb9146962523b92f531f6893" - integrity sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA== - dependencies: - streamsearch "^1.1.0" - -bytes@3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5" - integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg== - -cacheable-lookup@^5.0.3: - version "5.0.4" - resolved "https://registry.yarnpkg.com/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz#5a6b865b2c44357be3d5ebc2a467b032719a7005" - integrity sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA== - -cacheable-lookup@^6.0.4: - version "6.1.0" - resolved "https://registry.yarnpkg.com/cacheable-lookup/-/cacheable-lookup-6.1.0.tgz#0330a543471c61faa4e9035db583aad753b36385" - integrity sha512-KJ/Dmo1lDDhmW2XDPMo+9oiy/CeqosPguPCrgcVzKyZrL6pM1gU2GmPY/xo6OQPTUaA/c0kwHuywB4E6nmT9ww== - -cacheable-request@^7.0.2: - version "7.0.2" - resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-7.0.2.tgz#ea0d0b889364a25854757301ca12b2da77f91d27" - integrity sha512-pouW8/FmiPQbuGpkXQ9BAPv/Mo5xDGANgSNXzTzJ8DrKGuXOssM4wIQRjfanNRh3Yu5cfYPvcorqbhg2KIJtew== - dependencies: - clone-response "^1.0.2" - get-stream "^5.1.0" - http-cache-semantics "^4.0.0" - keyv "^4.0.0" - lowercase-keys "^2.0.0" - normalize-url "^6.0.1" - responselike "^2.0.0" - -call-bind@^1.0.0, call-bind@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" - integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA== - dependencies: - function-bind "^1.1.1" - get-intrinsic "^1.0.2" - -camel-case@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/camel-case/-/camel-case-3.0.0.tgz#ca3c3688a4e9cf3a4cda777dc4dcbc713249cf73" - integrity sha512-+MbKztAYHXPr1jNTSKQF52VpcFjwY5RkR7fxksV8Doo4KAYc5Fl4UJRgthBbTmEx8C54DqahhbLJkDwjI3PI/w== - dependencies: - no-case "^2.2.0" - upper-case "^1.1.1" - -camelcase@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a" - integrity sha512-4nhGqUkc4BqbBBB4Q6zLuD7lzzrHYrjKGeYaEji/3tFR5VdJu9v+LilhGIVe8wxEJPPOeWo7eg8dwY13TZ1BNg== - -camelcase@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" - integrity sha512-FxAv7HpHrXbh3aPo4o2qxHay2lkLY3x5Mw3KeE4KQE8ysVfziWeRZDwcjauvwBSGEC/nXUPzZy8zeh4HokqOnw== - -camelcase@^5.0.0: - version "5.3.1" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" - integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== - -camelcase@^6.0.0: - version "6.3.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" - integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== - -case@^1.6.3: - version "1.6.3" - resolved "https://registry.yarnpkg.com/case/-/case-1.6.3.tgz#0a4386e3e9825351ca2e6216c60467ff5f1ea1c9" - integrity sha512-mzDSXIPaFwVDvZAHqZ9VlbyF4yyXRuX6IvB06WvPYkqJVO24kX1PPhv9bfpKNFZyxYFmmgo03HUiD8iklmJYRQ== - -caseless@^0.12.0, caseless@~0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" - integrity sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw== - -catering@^2.1.0, catering@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/catering/-/catering-2.1.1.tgz#66acba06ed5ee28d5286133982a927de9a04b510" - integrity sha512-K7Qy8O9p76sL3/3m7/zLKbRkyOlSZAgzEaLhyj2mXS8PsCud2Eo4hAb8aLtZqHh0QGqLcb9dlJSu6lHRVENm1w== - -cbor@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/cbor/-/cbor-5.2.0.tgz#4cca67783ccd6de7b50ab4ed62636712f287a67c" - integrity sha512-5IMhi9e1QU76ppa5/ajP1BmMWZ2FHkhAhjeVKQ/EFCgYSEaeVaoGtL7cxJskf9oCCk+XjzaIdc3IuU/dbA/o2A== - dependencies: - bignumber.js "^9.0.1" - nofilter "^1.0.4" - -cbor@^8.0.0, cbor@^8.1.0: - version "8.1.0" - resolved "https://registry.yarnpkg.com/cbor/-/cbor-8.1.0.tgz#cfc56437e770b73417a2ecbfc9caf6b771af60d5" - integrity sha512-DwGjNW9omn6EwP70aXsn7FQJx5kO12tX0bZkaTjzdVFM6/7nhA4t0EENocKGx6D2Bch9PE2KzCUf5SceBdeijg== - dependencies: - nofilter "^3.1.0" - -chai-as-promised@^7.1.1: - version "7.1.1" - resolved "https://registry.yarnpkg.com/chai-as-promised/-/chai-as-promised-7.1.1.tgz#08645d825deb8696ee61725dbf590c012eb00ca0" - integrity sha512-azL6xMoi+uxu6z4rhWQ1jbdUhOMhis2PvscD/xjLqNMkv3BPPp2JyyuTHOrf9BOosGpNQ11v6BKv/g57RXbiaA== - dependencies: - check-error "^1.0.2" - -chai-bn@^0.2.1: - version "0.2.2" - resolved "https://registry.yarnpkg.com/chai-bn/-/chai-bn-0.2.2.tgz#4dcf30dbc79db2378a00781693bc749c972bf34f" - integrity sha512-MzjelH0p8vWn65QKmEq/DLBG1Hle4WeyqT79ANhXZhn/UxRWO0OogkAxi5oGGtfzwU9bZR8mvbvYdoqNVWQwFg== - -chai@^4.2.0: - version "4.3.7" - resolved "https://registry.yarnpkg.com/chai/-/chai-4.3.7.tgz#ec63f6df01829088e8bf55fca839bcd464a8ec51" - integrity sha512-HLnAzZ2iupm25PlN0xFreAlBA5zaBSv3og0DdeGA4Ar6h6rJ3A0rolRUKJhSF2V10GZKDgWF/VmAEsNWjCRB+A== - dependencies: - assertion-error "^1.1.0" - check-error "^1.0.2" - deep-eql "^4.1.2" - get-func-name "^2.0.0" - loupe "^2.3.1" - pathval "^1.1.1" - type-detect "^4.0.5" - -chalk@^2.3.2, chalk@^2.4.2: - version "2.4.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" - integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== - dependencies: - ansi-styles "^3.2.1" - escape-string-regexp "^1.0.5" - supports-color "^5.3.0" - -chalk@^4.1.0, chalk@^4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" - integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== - dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" - -change-case@3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/change-case/-/change-case-3.0.2.tgz#fd48746cce02f03f0a672577d1d3a8dc2eceb037" - integrity sha512-Mww+SLF6MZ0U6kdg11algyKd5BARbyM4TbFBepwowYSR5ClfQGCGtxNXgykpN0uF/bstWeaGDT4JWaDh8zWAHA== - dependencies: - camel-case "^3.0.0" - constant-case "^2.0.0" - dot-case "^2.1.0" - header-case "^1.0.0" - is-lower-case "^1.1.0" - is-upper-case "^1.1.0" - lower-case "^1.1.1" - lower-case-first "^1.0.0" - no-case "^2.3.2" - param-case "^2.1.0" - pascal-case "^2.0.0" - path-case "^2.1.0" - sentence-case "^2.1.0" - snake-case "^2.1.0" - swap-case "^1.1.0" - title-case "^2.1.0" - upper-case "^1.1.1" - upper-case-first "^1.1.0" - -"charenc@>= 0.0.1": - version "0.0.2" - resolved "https://registry.yarnpkg.com/charenc/-/charenc-0.0.2.tgz#c0a1d2f3a7092e03774bfa83f14c0fc5790a8667" - integrity sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA== - -check-error@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82" - integrity sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA== - -cheerio-select@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/cheerio-select/-/cheerio-select-2.1.0.tgz#4d8673286b8126ca2a8e42740d5e3c4884ae21b4" - integrity sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g== - dependencies: - boolbase "^1.0.0" - css-select "^5.1.0" - css-what "^6.1.0" - domelementtype "^2.3.0" - domhandler "^5.0.3" - domutils "^3.0.1" - -cheerio@^1.0.0-rc.2: - version "1.0.0-rc.12" - resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-1.0.0-rc.12.tgz#788bf7466506b1c6bf5fae51d24a2c4d62e47683" - integrity sha512-VqR8m68vM46BNnuZ5NtnGBKIE/DfN0cRIzg9n40EIq9NOv90ayxLBXA8fXC5gquFRGJSTRqBq25Jt2ECLR431Q== - dependencies: - cheerio-select "^2.1.0" - dom-serializer "^2.0.0" - domhandler "^5.0.3" - domutils "^3.0.1" - htmlparser2 "^8.0.1" - parse5 "^7.0.0" - parse5-htmlparser2-tree-adapter "^7.0.0" - -chokidar@3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.3.0.tgz#12c0714668c55800f659e262d4962a97faf554a6" - integrity sha512-dGmKLDdT3Gdl7fBUe8XK+gAtGmzy5Fn0XkkWQuYxGIgWVPPse2CxFA5mtrlD0TOHaHjEUqkWNyP1XdHoJES/4A== - dependencies: - anymatch "~3.1.1" - braces "~3.0.2" - glob-parent "~5.1.0" - is-binary-path "~2.1.0" - is-glob "~4.0.1" - normalize-path "~3.0.0" - readdirp "~3.2.0" - optionalDependencies: - fsevents "~2.1.1" - -chokidar@3.5.3, chokidar@^3.4.0, chokidar@^3.5.2: - version "3.5.3" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" - integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== - dependencies: - anymatch "~3.1.2" - braces "~3.0.2" - glob-parent "~5.1.2" - is-binary-path "~2.1.0" - is-glob "~4.0.1" - normalize-path "~3.0.0" - readdirp "~3.6.0" - optionalDependencies: - fsevents "~2.3.2" - -chownr@^1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" - integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg== - -ci-info@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" - integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ== - -cids@^0.7.1: - version "0.7.5" - resolved "https://registry.yarnpkg.com/cids/-/cids-0.7.5.tgz#60a08138a99bfb69b6be4ceb63bfef7a396b28b2" - integrity sha512-zT7mPeghoWAu+ppn8+BS1tQ5qGmbMfB4AregnQjA/qHY3GC1m1ptI9GkWNlgeu38r7CuRdXB47uY2XgAYt6QVA== - dependencies: - buffer "^5.5.0" - class-is "^1.1.0" - multibase "~0.6.0" - multicodec "^1.0.0" - multihashes "~0.4.15" - -cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" - integrity sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q== - dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" - -class-is@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/class-is/-/class-is-1.1.0.tgz#9d3c0fba0440d211d843cec3dedfa48055005825" - integrity sha512-rhjH9AG1fvabIDoGRVH587413LPjTZgmDF9fOFCbFJQV4yuocX1mHxxvXI4g3cGwbVY9wAYIoKlg1N79frJKQw== - -classic-level@^1.2.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/classic-level/-/classic-level-1.3.0.tgz#5e36680e01dc6b271775c093f2150844c5edd5c8" - integrity sha512-iwFAJQYtqRTRM0F6L8h4JCt00ZSGdOyqh7yVrhhjrOpFhmBjNlRUey64MCiyo6UmQHMJ+No3c81nujPv+n9yrg== - dependencies: - abstract-level "^1.0.2" - catering "^2.1.0" - module-error "^1.0.1" - napi-macros "^2.2.2" - node-gyp-build "^4.3.0" - -clean-stack@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" - integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A== - -cli-table3@^0.5.0: - version "0.5.1" - resolved "https://registry.yarnpkg.com/cli-table3/-/cli-table3-0.5.1.tgz#0252372d94dfc40dbd8df06005f48f31f656f202" - integrity sha512-7Qg2Jrep1S/+Q3EceiZtQcDPWxhAvBw+ERf1162v4sikJrvojMHFqXt8QIVha8UlH9rgU0BeWPytZ9/TzYqlUw== - dependencies: - object-assign "^4.1.0" - string-width "^2.1.1" - optionalDependencies: - colors "^1.1.2" - -cliui@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" - integrity sha512-0yayqDxWQbqk3ojkYqUKqaAQ6AfNKeKWRNA8kR0WXzAsdHpP4BIaOmMAG87JGuO6qcobyW4GjxHd9PmhEd+T9w== - dependencies: - string-width "^1.0.1" - strip-ansi "^3.0.1" - wrap-ansi "^2.0.0" - -cliui@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-5.0.0.tgz#deefcfdb2e800784aa34f46fa08e06851c7bbbc5" - integrity sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA== - dependencies: - string-width "^3.1.0" - strip-ansi "^5.2.0" - wrap-ansi "^5.1.0" - -cliui@^7.0.2: - version "7.0.4" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" - integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== - dependencies: - string-width "^4.2.0" - strip-ansi "^6.0.0" - wrap-ansi "^7.0.0" - -clone-response@^1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/clone-response/-/clone-response-1.0.3.tgz#af2032aa47816399cf5f0a1d0db902f517abb8c3" - integrity sha512-ROoL94jJH2dUVML2Y/5PEDNaSHgeOdSDicUyS7izcF63G6sTc/FTjLub4b8Il9S8S0beOfYt0TaA5qvFK+w0wA== - dependencies: - mimic-response "^1.0.0" - -code-point-at@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" - integrity sha512-RpAVKQA5T63xEj6/giIbUEtZwJ4UFIc3ZtvEkiaUERylqe8xb5IvqcgOurZLahv93CLKfxcw5YI+DZcUBRyLXA== - -color-convert@^1.9.0: - version "1.9.3" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" - integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== - dependencies: - color-name "1.1.3" - -color-convert@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" - integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== - dependencies: - color-name "~1.1.4" - -color-name@1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" - integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== - -color-name@~1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" - integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== - -colors@1.4.0, colors@^1.1.2: - version "1.4.0" - resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" - integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA== - -combined-stream@^1.0.6, combined-stream@^1.0.8, combined-stream@~1.0.6: - version "1.0.8" - resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" - integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== - dependencies: - delayed-stream "~1.0.0" - -command-exists@^1.2.8: - version "1.2.9" - resolved "https://registry.yarnpkg.com/command-exists/-/command-exists-1.2.9.tgz#c50725af3808c8ab0260fd60b01fbfa25b954f69" - integrity sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w== - -command-line-args@^5.1.1: - version "5.2.1" - resolved "https://registry.yarnpkg.com/command-line-args/-/command-line-args-5.2.1.tgz#c44c32e437a57d7c51157696893c5909e9cec42e" - integrity sha512-H4UfQhZyakIjC74I9d34fGYDwk3XpSr17QhEd0Q3I9Xq1CETHo4Hcuo87WyWHpAF1aSLjLRf5lD9ZGX2qStUvg== - dependencies: - array-back "^3.1.0" - find-replace "^3.0.0" - lodash.camelcase "^4.3.0" - typical "^4.0.0" - -command-line-usage@^6.1.0: - version "6.1.3" - resolved "https://registry.yarnpkg.com/command-line-usage/-/command-line-usage-6.1.3.tgz#428fa5acde6a838779dfa30e44686f4b6761d957" - integrity sha512-sH5ZSPr+7UStsloltmDh7Ce5fb8XPlHyoPzTpyyMuYCtervL65+ubVZ6Q61cFtFl62UyJlc8/JwERRbAFPUqgw== - dependencies: - array-back "^4.0.2" - chalk "^2.4.2" - table-layout "^1.0.2" - typical "^5.2.0" - -commander@3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/commander/-/commander-3.0.2.tgz#6837c3fb677ad9933d1cfba42dd14d5117d6b39e" - integrity sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow== - -compare-versions@^5.0.0: - version "5.0.3" - resolved "https://registry.yarnpkg.com/compare-versions/-/compare-versions-5.0.3.tgz#a9b34fea217472650ef4a2651d905f42c28ebfd7" - integrity sha512-4UZlZP8Z99MGEY+Ovg/uJxJuvoXuN4M6B3hKaiackiHrgzQFEe3diJi1mf1PNHbFujM7FvLrK2bpgIaImbtZ1A== - -concat-map@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" - integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== - -concat-stream@^1.6.0, concat-stream@^1.6.2: - version "1.6.2" - resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" - integrity sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw== - dependencies: - buffer-from "^1.0.0" - inherits "^2.0.3" - readable-stream "^2.2.2" - typedarray "^0.0.6" - -constant-case@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/constant-case/-/constant-case-2.0.0.tgz#4175764d389d3fa9c8ecd29186ed6005243b6a46" - integrity sha512-eS0N9WwmjTqrOmR3o83F5vW8Z+9R1HnVz3xmzT2PMFug9ly+Au/fxRWlEBSb6LcZwspSsEn9Xs1uw9YgzAg1EQ== - dependencies: - snake-case "^2.1.0" - upper-case "^1.1.1" - -content-disposition@0.5.4: - version "0.5.4" - resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.4.tgz#8b82b4efac82512a02bb0b1dcec9d2c5e8eb5bfe" - integrity sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ== - dependencies: - safe-buffer "5.2.1" - -content-hash@^2.5.2: - version "2.5.2" - resolved "https://registry.yarnpkg.com/content-hash/-/content-hash-2.5.2.tgz#bbc2655e7c21f14fd3bfc7b7d4bfe6e454c9e211" - integrity sha512-FvIQKy0S1JaWV10sMsA7TRx8bpU+pqPkhbsfvOJAdjRXvYxEckAwQWGwtRjiaJfh+E0DvcWUGqcdjwMGFjsSdw== - dependencies: - cids "^0.7.1" - multicodec "^0.5.5" - multihashes "^0.4.15" - -content-type@~1.0.4, content-type@~1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.5.tgz#8b773162656d1d1086784c8f23a54ce6d73d7918" - integrity sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA== - -cookie-signature@1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" - integrity sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ== - -cookie@0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.5.0.tgz#d1f5d71adec6558c58f389987c366aa47e994f8b" - integrity sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw== - -cookie@^0.4.1: - version "0.4.2" - resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.2.tgz#0e41f24de5ecf317947c82fc789e06a884824432" - integrity sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA== - -core-util-is@1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" - integrity sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ== - -core-util-is@~1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" - integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== - -cors@^2.8.1: - version "2.8.5" - resolved "https://registry.yarnpkg.com/cors/-/cors-2.8.5.tgz#eac11da51592dd86b9f06f6e7ac293b3df875d29" - integrity sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g== - dependencies: - object-assign "^4" - vary "^1" - -crc-32@^1.2.0: - version "1.2.2" - resolved "https://registry.yarnpkg.com/crc-32/-/crc-32-1.2.2.tgz#3cad35a934b8bf71f25ca524b6da51fb7eace2ff" - integrity sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ== - -create-hash@^1.1.0, create-hash@^1.1.2, create-hash@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" - integrity sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg== - dependencies: - cipher-base "^1.0.1" - inherits "^2.0.1" - md5.js "^1.3.4" - ripemd160 "^2.0.1" - sha.js "^2.4.0" - -create-hmac@^1.1.4, create-hmac@^1.1.7: - version "1.1.7" - resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.7.tgz#69170c78b3ab957147b2b8b04572e47ead2243ff" - integrity sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg== - dependencies: - cipher-base "^1.0.3" - create-hash "^1.1.0" - inherits "^2.0.1" - ripemd160 "^2.0.0" - safe-buffer "^5.0.1" - sha.js "^2.4.8" - -create-require@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" - integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== - -cross-fetch@^3.1.4: - version "3.1.5" - resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.1.5.tgz#e1389f44d9e7ba767907f7af8454787952ab534f" - integrity sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw== - dependencies: - node-fetch "2.6.7" - -"crypt@>= 0.0.1": - version "0.0.2" - resolved "https://registry.yarnpkg.com/crypt/-/crypt-0.0.2.tgz#88d7ff7ec0dfb86f713dc87bbb42d044d3e6c41b" - integrity sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow== - -crypto-addr-codec@^0.1.7: - version "0.1.7" - resolved "https://registry.yarnpkg.com/crypto-addr-codec/-/crypto-addr-codec-0.1.7.tgz#e16cea892730178fe25a38f6d15b680cab3124ae" - integrity sha512-X4hzfBzNhy4mAc3UpiXEC/L0jo5E8wAa9unsnA8nNXYzXjCcGk83hfC5avJWCSGT8V91xMnAS9AKMHmjw5+XCg== - dependencies: - base-x "^3.0.8" - big-integer "1.6.36" - blakejs "^1.1.0" - bs58 "^4.0.1" - ripemd160-min "0.0.6" - safe-buffer "^5.2.0" - sha3 "^2.1.1" - -css-select@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/css-select/-/css-select-5.1.0.tgz#b8ebd6554c3637ccc76688804ad3f6a6fdaea8a6" - integrity sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg== - dependencies: - boolbase "^1.0.0" - css-what "^6.1.0" - domhandler "^5.0.2" - domutils "^3.0.1" - nth-check "^2.0.1" - -css-what@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/css-what/-/css-what-6.1.0.tgz#fb5effcf76f1ddea2c81bdfaa4de44e79bac70f4" - integrity sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw== - -d@1, d@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/d/-/d-1.0.1.tgz#8698095372d58dbee346ffd0c7093f99f8f9eb5a" - integrity sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA== - dependencies: - es5-ext "^0.10.50" - type "^1.0.1" - -dashdash@^1.12.0: - version "1.14.1" - resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" - integrity sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g== - dependencies: - assert-plus "^1.0.0" - -death@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/death/-/death-1.1.0.tgz#01aa9c401edd92750514470b8266390c66c67318" - integrity sha512-vsV6S4KVHvTGxbEcij7hkWRv0It+sGGWVOM67dQde/o5Xjnr+KmLjxWJii2uEObIrt1CcM9w0Yaovx+iOlIL+w== - -debug@2.6.9, debug@^2.2.0: - version "2.6.9" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" - integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== - dependencies: - ms "2.0.0" - -debug@3.2.6: - version "3.2.6" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" - integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== - dependencies: - ms "^2.1.1" - -debug@4, debug@4.3.4, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.3: - version "4.3.4" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" - integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== - dependencies: - ms "2.1.2" - -decamelize@^1.1.1, decamelize@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" - integrity sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA== - -decamelize@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-4.0.0.tgz#aa472d7bf660eb15f3494efd531cab7f2a709837" - integrity sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ== - -decode-uri-component@^0.2.0: - version "0.2.2" - resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.2.tgz#e69dbe25d37941171dd540e024c444cd5188e1e9" - integrity sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ== - -decompress-response@^3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-3.3.0.tgz#80a4dd323748384bfa248083622aedec982adff3" - integrity sha512-BzRPQuY1ip+qDonAOz42gRm/pg9F768C+npV/4JOsxRC2sq+Rlk+Q4ZCAsOhnIaMrgarILY+RMUIvMmmX1qAEA== - dependencies: - mimic-response "^1.0.0" - -decompress-response@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-6.0.0.tgz#ca387612ddb7e104bd16d85aab00d5ecf09c66fc" - integrity sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ== - dependencies: - mimic-response "^3.1.0" - -deep-eql@^4.0.1, deep-eql@^4.1.2: - version "4.1.3" - resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-4.1.3.tgz#7c7775513092f7df98d8df9996dd085eb668cc6d" - integrity sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw== - dependencies: - type-detect "^4.0.0" - -deep-extend@~0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" - integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== - -deep-is@~0.1.3: - version "0.1.4" - resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" - integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== - -defer-to-connect@^2.0.0, defer-to-connect@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-2.0.1.tgz#8016bdb4143e4632b77a3449c6236277de520587" - integrity sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg== - -define-properties@^1.1.2, define-properties@^1.1.3, define-properties@^1.1.4, define-properties@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.2.0.tgz#52988570670c9eacedd8064f4a990f2405849bd5" - integrity sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA== - dependencies: - has-property-descriptors "^1.0.0" - object-keys "^1.1.1" - -delayed-stream@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" - integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== - -depd@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df" - integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== - -destroy@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.2.0.tgz#4803735509ad8be552934c67df614f94e66fa015" - integrity sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg== - -detect-indent@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-5.0.0.tgz#3871cc0a6a002e8c3e5b3cf7f336264675f06b9d" - integrity sha512-rlpvsxUtM0PQvy9iZe640/IWwWYyBsTApREbA1pHOpmOUIl9MkP/U4z7vTtg4Oaojvqhxt7sdufnT0EzGaR31g== - -detect-port@^1.3.0: - version "1.5.1" - resolved "https://registry.yarnpkg.com/detect-port/-/detect-port-1.5.1.tgz#451ca9b6eaf20451acb0799b8ab40dff7718727b" - integrity sha512-aBzdj76lueB6uUst5iAs7+0H/oOjqI5D16XUWxlWMIMROhcM0rfsNVk93zTngq1dDNpoXRr++Sus7ETAExppAQ== - dependencies: - address "^1.0.1" - debug "4" - -diff@3.5.0: - version "3.5.0" - resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" - integrity sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA== - -diff@5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/diff/-/diff-5.0.0.tgz#7ed6ad76d859d030787ec35855f5b1daf31d852b" - integrity sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w== - -diff@^4.0.1: - version "4.0.2" - resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" - integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== - -difflib@^0.2.4: - version "0.2.4" - resolved "https://registry.yarnpkg.com/difflib/-/difflib-0.2.4.tgz#b5e30361a6db023176d562892db85940a718f47e" - integrity sha512-9YVwmMb0wQHQNr5J9m6BSj6fk4pfGITGQOOs+D9Fl+INODWFOfvhIU1hNv6GgR1RBoC/9NJcwu77zShxV0kT7w== - dependencies: - heap ">= 0.2.0" - -dir-glob@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" - integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== - dependencies: - path-type "^4.0.0" - -dom-serializer@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-2.0.0.tgz#e41b802e1eedf9f6cae183ce5e622d789d7d8e53" - integrity sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg== - dependencies: - domelementtype "^2.3.0" - domhandler "^5.0.2" - entities "^4.2.0" - -dom-walk@^0.1.0: - version "0.1.2" - resolved "https://registry.yarnpkg.com/dom-walk/-/dom-walk-0.1.2.tgz#0c548bef048f4d1f2a97249002236060daa3fd84" - integrity sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w== - -domelementtype@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.3.0.tgz#5c45e8e869952626331d7aab326d01daf65d589d" - integrity sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw== - -domhandler@^5.0.2, domhandler@^5.0.3: - version "5.0.3" - resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-5.0.3.tgz#cc385f7f751f1d1fc650c21374804254538c7d31" - integrity sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w== - dependencies: - domelementtype "^2.3.0" - -domutils@^3.0.1: - version "3.1.0" - resolved "https://registry.yarnpkg.com/domutils/-/domutils-3.1.0.tgz#c47f551278d3dc4b0b1ab8cbb42d751a6f0d824e" - integrity sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA== - dependencies: - dom-serializer "^2.0.0" - domelementtype "^2.3.0" - domhandler "^5.0.3" - -dot-case@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/dot-case/-/dot-case-2.1.1.tgz#34dcf37f50a8e93c2b3bca8bb7fb9155c7da3bee" - integrity sha512-HnM6ZlFqcajLsyudHq7LeeLDr2rFAVYtDv/hV5qchQEidSck8j9OPUsXY9KwJv/lHMtYlX4DjRQqwFYa+0r8Ug== - dependencies: - no-case "^2.2.0" - -ecc-jsbn@~0.1.1: - version "0.1.2" - resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" - integrity sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw== - dependencies: - jsbn "~0.1.0" - safer-buffer "^2.1.0" - -ee-first@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" - integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow== - -elliptic@6.5.4, elliptic@^6.4.0, elliptic@^6.5.2, elliptic@^6.5.4: - version "6.5.4" - resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb" - integrity sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ== - dependencies: - bn.js "^4.11.9" - brorand "^1.1.0" - hash.js "^1.0.0" - hmac-drbg "^1.0.1" - inherits "^2.0.4" - minimalistic-assert "^1.0.1" - minimalistic-crypto-utils "^1.0.1" - -emoji-regex@^7.0.1: - version "7.0.3" - resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" - integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA== - -emoji-regex@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" - integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== - -encode-utf8@^1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/encode-utf8/-/encode-utf8-1.0.3.tgz#f30fdd31da07fb596f281beb2f6b027851994cda" - integrity sha512-ucAnuBEhUK4boH2HjVYG5Q2mQyPorvv0u/ocS+zhdw0S8AlHYY+GOFhP1Gio5z4icpP2ivFSvhtFjQi8+T9ppw== - -encodeurl@~1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" - integrity sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w== - -end-of-stream@^1.1.0: - version "1.4.4" - resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" - integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== - dependencies: - once "^1.4.0" - -enquirer@^2.3.0, enquirer@^2.3.4, enquirer@^2.3.6: - version "2.3.6" - resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.3.6.tgz#2a7fe5dd634a1e4125a975ec994ff5456dc3734d" - integrity sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg== - dependencies: - ansi-colors "^4.1.1" - -entities@^4.2.0, entities@^4.4.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/entities/-/entities-4.5.0.tgz#5d268ea5e7113ec74c4d033b79ea5a35a488fb48" - integrity sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw== - -env-paths@^2.2.0: - version "2.2.1" - resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.1.tgz#420399d416ce1fbe9bc0a07c62fa68d67fd0f8f2" - integrity sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A== - -error-ex@^1.2.0: - version "1.3.2" - resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" - integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== - dependencies: - is-arrayish "^0.2.1" - -es-abstract@^1.19.0, es-abstract@^1.20.4, es-abstract@^1.21.2: - version "1.21.2" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.21.2.tgz#a56b9695322c8a185dc25975aa3b8ec31d0e7eff" - integrity sha512-y/B5POM2iBnIxCiernH1G7rC9qQoM77lLIMQLuob0zhp8C56Po81+2Nj0WFKnd0pNReDTnkYryc+zhOzpEIROg== - dependencies: - array-buffer-byte-length "^1.0.0" - available-typed-arrays "^1.0.5" - call-bind "^1.0.2" - es-set-tostringtag "^2.0.1" - es-to-primitive "^1.2.1" - function.prototype.name "^1.1.5" - get-intrinsic "^1.2.0" - get-symbol-description "^1.0.0" - globalthis "^1.0.3" - gopd "^1.0.1" - has "^1.0.3" - has-property-descriptors "^1.0.0" - has-proto "^1.0.1" - has-symbols "^1.0.3" - internal-slot "^1.0.5" - is-array-buffer "^3.0.2" - is-callable "^1.2.7" - is-negative-zero "^2.0.2" - is-regex "^1.1.4" - is-shared-array-buffer "^1.0.2" - is-string "^1.0.7" - is-typed-array "^1.1.10" - is-weakref "^1.0.2" - object-inspect "^1.12.3" - object-keys "^1.1.1" - object.assign "^4.1.4" - regexp.prototype.flags "^1.4.3" - safe-regex-test "^1.0.0" - string.prototype.trim "^1.2.7" - string.prototype.trimend "^1.0.6" - string.prototype.trimstart "^1.0.6" - typed-array-length "^1.0.4" - unbox-primitive "^1.0.2" - which-typed-array "^1.1.9" - -es-array-method-boxes-properly@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz#873f3e84418de4ee19c5be752990b2e44718d09e" - integrity sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA== - -es-set-tostringtag@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz#338d502f6f674301d710b80c8592de8a15f09cd8" - integrity sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg== - dependencies: - get-intrinsic "^1.1.3" - has "^1.0.3" - has-tostringtag "^1.0.0" - -es-to-primitive@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" - integrity sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA== - dependencies: - is-callable "^1.1.4" - is-date-object "^1.0.1" - is-symbol "^1.0.2" - -es5-ext@^0.10.35, es5-ext@^0.10.50: - version "0.10.62" - resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.62.tgz#5e6adc19a6da524bf3d1e02bbc8960e5eb49a9a5" - integrity sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA== - dependencies: - es6-iterator "^2.0.3" - es6-symbol "^3.1.3" - next-tick "^1.1.0" - -es6-iterator@^2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.3.tgz#a7de889141a05a94b0854403b2d0a0fbfa98f3b7" - integrity sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g== - dependencies: - d "1" - es5-ext "^0.10.35" - es6-symbol "^3.1.1" - -es6-promise@^4.2.8: - version "4.2.8" - resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.8.tgz#4eb21594c972bc40553d276e510539143db53e0a" - integrity sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w== - -es6-symbol@^3.1.1, es6-symbol@^3.1.3: - version "3.1.3" - resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.3.tgz#bad5d3c1bcdac28269f4cb331e431c78ac705d18" - integrity sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA== - dependencies: - d "^1.0.1" - ext "^1.1.2" - -escalade@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" - integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== - -escape-html@~1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" - integrity sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow== - -escape-string-regexp@1.0.5, escape-string-regexp@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" - integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== - -escape-string-regexp@4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" - integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== - -escodegen@1.8.x: - version "1.8.1" - resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.8.1.tgz#5a5b53af4693110bebb0867aa3430dd3b70a1018" - integrity sha512-yhi5S+mNTOuRvyW4gWlg5W1byMaQGWWSYHXsuFZ7GBo7tpyOwi2EdzMP/QWxh9hwkD2m+wDVHJsxhRIj+v/b/A== - dependencies: - esprima "^2.7.1" - estraverse "^1.9.1" - esutils "^2.0.2" - optionator "^0.8.1" - optionalDependencies: - source-map "~0.2.0" - -esprima@2.7.x, esprima@^2.7.1: - version "2.7.3" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" - integrity sha512-OarPfz0lFCiW4/AV2Oy1Rp9qu0iusTKqykwTspGCZtPxmF81JR4MmIebvF1F9+UOKth2ZubLQ4XGGaU+hSn99A== - -esprima@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" - integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== - -estraverse@^1.9.1: - version "1.9.3" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-1.9.3.tgz#af67f2dc922582415950926091a4005d29c9bb44" - integrity sha512-25w1fMXQrGdoquWnScXZGckOv+Wes+JDnuN/+7ex3SauFRS72r2lFDec0EKPt2YD1wUJ/IrfEex+9yp4hfSOJA== - -esutils@^2.0.2: - version "2.0.3" - resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" - integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== - -etag@~1.8.1: - version "1.8.1" - resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" - integrity sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg== - -eth-ens-namehash@2.0.8, eth-ens-namehash@^2.0.8: - version "2.0.8" - resolved "https://registry.yarnpkg.com/eth-ens-namehash/-/eth-ens-namehash-2.0.8.tgz#229ac46eca86d52e0c991e7cb2aef83ff0f68bcf" - integrity sha512-VWEI1+KJfz4Km//dadyvBBoBeSQ0MHTXPvr8UIXiLW6IanxvAV+DmlZAijZwAyggqGUfwQBeHf7tc9wzc1piSw== - dependencies: - idna-uts46-hx "^2.3.1" - js-sha3 "^0.5.7" - -eth-gas-reporter@^0.2.25: - version "0.2.25" - resolved "https://registry.yarnpkg.com/eth-gas-reporter/-/eth-gas-reporter-0.2.25.tgz#546dfa946c1acee93cb1a94c2a1162292d6ff566" - integrity sha512-1fRgyE4xUB8SoqLgN3eDfpDfwEfRxh2Sz1b7wzFbyQA+9TekMmvSjjoRu9SKcSVyK+vLkLIsVbJDsTWjw195OQ== - dependencies: - "@ethersproject/abi" "^5.0.0-beta.146" - "@solidity-parser/parser" "^0.14.0" - cli-table3 "^0.5.0" - colors "1.4.0" - ethereum-cryptography "^1.0.3" - ethers "^4.0.40" - fs-readdir-recursive "^1.1.0" - lodash "^4.17.14" - markdown-table "^1.1.3" - mocha "^7.1.1" - req-cwd "^2.0.0" - request "^2.88.0" - request-promise-native "^1.0.5" - sha1 "^1.1.1" - sync-request "^6.0.0" - -eth-lib@0.2.8: - version "0.2.8" - resolved "https://registry.yarnpkg.com/eth-lib/-/eth-lib-0.2.8.tgz#b194058bef4b220ad12ea497431d6cb6aa0623c8" - integrity sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw== - dependencies: - bn.js "^4.11.6" - elliptic "^6.4.0" - xhr-request-promise "^0.1.2" - -eth-lib@^0.1.26: - version "0.1.29" - resolved "https://registry.yarnpkg.com/eth-lib/-/eth-lib-0.1.29.tgz#0c11f5060d42da9f931eab6199084734f4dbd1d9" - integrity sha512-bfttrr3/7gG4E02HoWTDUcDDslN003OlOoBxk9virpAZQ1ja/jDgwkWB8QfJF7ojuEowrqy+lzp9VcJG7/k5bQ== - dependencies: - bn.js "^4.11.6" - elliptic "^6.4.0" - nano-json-stream-parser "^0.1.2" - servify "^0.1.12" - ws "^3.0.0" - xhr-request-promise "^0.1.2" - -ethereum-bloom-filters@^1.0.6: - version "1.0.10" - resolved "https://registry.yarnpkg.com/ethereum-bloom-filters/-/ethereum-bloom-filters-1.0.10.tgz#3ca07f4aed698e75bd134584850260246a5fed8a" - integrity sha512-rxJ5OFN3RwjQxDcFP2Z5+Q9ho4eIdEmSc2ht0fCu8Se9nbXjZ7/031uXoUYJ87KHCOdVeiUuwSnoS7hmYAGVHA== - dependencies: - js-sha3 "^0.8.0" - -ethereum-cryptography@0.1.3, ethereum-cryptography@^0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz#8d6143cfc3d74bf79bbd8edecdf29e4ae20dd191" - integrity sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ== - dependencies: - "@types/pbkdf2" "^3.0.0" - "@types/secp256k1" "^4.0.1" - blakejs "^1.1.0" - browserify-aes "^1.2.0" - bs58check "^2.1.2" - create-hash "^1.2.0" - create-hmac "^1.1.7" - hash.js "^1.1.7" - keccak "^3.0.0" - pbkdf2 "^3.0.17" - randombytes "^2.1.0" - safe-buffer "^5.1.2" - scrypt-js "^3.0.0" - secp256k1 "^4.0.1" - setimmediate "^1.0.5" - -ethereum-cryptography@^1.0.3: - version "1.2.0" - resolved "https://registry.yarnpkg.com/ethereum-cryptography/-/ethereum-cryptography-1.2.0.tgz#5ccfa183e85fdaf9f9b299a79430c044268c9b3a" - integrity sha512-6yFQC9b5ug6/17CQpCyE3k9eKBMdhyVjzUy1WkiuY/E4vj/SXDBbCw8QEIaXqf0Mf2SnY6RmpDcwlUmBSS0EJw== - dependencies: - "@noble/hashes" "1.2.0" - "@noble/secp256k1" "1.7.1" - "@scure/bip32" "1.1.5" - "@scure/bip39" "1.1.1" - -ethereumjs-abi@^0.6.8: - version "0.6.8" - resolved "https://registry.yarnpkg.com/ethereumjs-abi/-/ethereumjs-abi-0.6.8.tgz#71bc152db099f70e62f108b7cdfca1b362c6fcae" - integrity sha512-Tx0r/iXI6r+lRsdvkFDlut0N08jWMnKRZ6Gkq+Nmw75lZe4e6o3EkSnkaBP5NF6+m5PTGAr9JP43N3LyeoglsA== - dependencies: - bn.js "^4.11.8" - ethereumjs-util "^6.0.0" - -ethereumjs-util@^6.0.0, ethereumjs-util@^6.2.1: - version "6.2.1" - resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz#fcb4e4dd5ceacb9d2305426ab1a5cd93e3163b69" - integrity sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw== - dependencies: - "@types/bn.js" "^4.11.3" - bn.js "^4.11.0" - create-hash "^1.1.2" - elliptic "^6.5.2" - ethereum-cryptography "^0.1.3" - ethjs-util "0.1.6" - rlp "^2.2.3" - -ethereumjs-util@^7.0.3, ethereumjs-util@^7.1.0, ethereumjs-util@^7.1.1, ethereumjs-util@^7.1.2, ethereumjs-util@^7.1.4, ethereumjs-util@^7.1.5: - version "7.1.5" - resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-7.1.5.tgz#9ecf04861e4fbbeed7465ece5f23317ad1129181" - integrity sha512-SDl5kKrQAudFBUe5OJM9Ac6WmMyYmXX/6sTmLZ3ffG2eY6ZIGBes3pEDxNN6V72WyOw4CPD5RomKdsa8DAAwLg== - dependencies: - "@types/bn.js" "^5.1.0" - bn.js "^5.1.2" - create-hash "^1.1.2" - ethereum-cryptography "^0.1.3" - rlp "^2.2.4" - -ethers@5.7.2, ethers@^5.0.13, ethers@^5.5.3, ethers@^5.7.1: - version "5.7.2" - resolved "https://registry.yarnpkg.com/ethers/-/ethers-5.7.2.tgz#3a7deeabbb8c030d4126b24f84e525466145872e" - integrity sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg== - dependencies: - "@ethersproject/abi" "5.7.0" - "@ethersproject/abstract-provider" "5.7.0" - "@ethersproject/abstract-signer" "5.7.0" - "@ethersproject/address" "5.7.0" - "@ethersproject/base64" "5.7.0" - "@ethersproject/basex" "5.7.0" - "@ethersproject/bignumber" "5.7.0" - "@ethersproject/bytes" "5.7.0" - "@ethersproject/constants" "5.7.0" - "@ethersproject/contracts" "5.7.0" - "@ethersproject/hash" "5.7.0" - "@ethersproject/hdnode" "5.7.0" - "@ethersproject/json-wallets" "5.7.0" - "@ethersproject/keccak256" "5.7.0" - "@ethersproject/logger" "5.7.0" - "@ethersproject/networks" "5.7.1" - "@ethersproject/pbkdf2" "5.7.0" - "@ethersproject/properties" "5.7.0" - "@ethersproject/providers" "5.7.2" - "@ethersproject/random" "5.7.0" - "@ethersproject/rlp" "5.7.0" - "@ethersproject/sha2" "5.7.0" - "@ethersproject/signing-key" "5.7.0" - "@ethersproject/solidity" "5.7.0" - "@ethersproject/strings" "5.7.0" - "@ethersproject/transactions" "5.7.0" - "@ethersproject/units" "5.7.0" - "@ethersproject/wallet" "5.7.0" - "@ethersproject/web" "5.7.1" - "@ethersproject/wordlists" "5.7.0" - -ethers@^4.0.32, ethers@^4.0.40: - version "4.0.49" - resolved "https://registry.yarnpkg.com/ethers/-/ethers-4.0.49.tgz#0eb0e9161a0c8b4761be547396bbe2fb121a8894" - integrity sha512-kPltTvWiyu+OktYy1IStSO16i2e7cS9D9OxZ81q2UUaiNPVrm/RTcbxamCXF9VUSKzJIdJV68EAIhTEVBalRWg== - dependencies: - aes-js "3.0.0" - bn.js "^4.11.9" - elliptic "6.5.4" - hash.js "1.1.3" - js-sha3 "0.5.7" - scrypt-js "2.0.4" - setimmediate "1.0.4" - uuid "2.0.1" - xmlhttprequest "1.8.0" - -ethjs-abi@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/ethjs-abi/-/ethjs-abi-0.2.1.tgz#e0a7a93a7e81163a94477bad56ede524ab6de533" - integrity sha512-g2AULSDYI6nEJyJaEVEXtTimRY2aPC2fi7ddSy0W+LXvEVL8Fe1y76o43ecbgdUKwZD+xsmEgX1yJr1Ia3r1IA== - dependencies: - bn.js "4.11.6" - js-sha3 "0.5.5" - number-to-bn "1.7.0" - -ethjs-unit@0.1.6: - version "0.1.6" - resolved "https://registry.yarnpkg.com/ethjs-unit/-/ethjs-unit-0.1.6.tgz#c665921e476e87bce2a9d588a6fe0405b2c41699" - integrity sha512-/Sn9Y0oKl0uqQuvgFk/zQgR7aw1g36qX/jzSQ5lSwlO0GigPymk4eGQfeNTD03w1dPOqfz8V77Cy43jH56pagw== - dependencies: - bn.js "4.11.6" - number-to-bn "1.7.0" - -ethjs-util@0.1.6, ethjs-util@^0.1.6: - version "0.1.6" - resolved "https://registry.yarnpkg.com/ethjs-util/-/ethjs-util-0.1.6.tgz#f308b62f185f9fe6237132fb2a9818866a5cd536" - integrity sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w== - dependencies: - is-hex-prefixed "1.0.0" - strip-hex-prefix "1.0.0" - -event-target-shim@^5.0.0: - version "5.0.1" - resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789" - integrity sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ== - -eventemitter3@4.0.4: - version "4.0.4" - resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.4.tgz#b5463ace635a083d018bdc7c917b4c5f10a85384" - integrity sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ== - -evp_bytestokey@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02" - integrity sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA== - dependencies: - md5.js "^1.3.4" - safe-buffer "^5.1.1" - -express@^4.14.0: - version "4.18.2" - resolved "https://registry.yarnpkg.com/express/-/express-4.18.2.tgz#3fabe08296e930c796c19e3c516979386ba9fd59" - integrity sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ== - dependencies: - accepts "~1.3.8" - array-flatten "1.1.1" - body-parser "1.20.1" - content-disposition "0.5.4" - content-type "~1.0.4" - cookie "0.5.0" - cookie-signature "1.0.6" - debug "2.6.9" - depd "2.0.0" - encodeurl "~1.0.2" - escape-html "~1.0.3" - etag "~1.8.1" - finalhandler "1.2.0" - fresh "0.5.2" - http-errors "2.0.0" - merge-descriptors "1.0.1" - methods "~1.1.2" - on-finished "2.4.1" - parseurl "~1.3.3" - path-to-regexp "0.1.7" - proxy-addr "~2.0.7" - qs "6.11.0" - range-parser "~1.2.1" - safe-buffer "5.2.1" - send "0.18.0" - serve-static "1.15.0" - setprototypeof "1.2.0" - statuses "2.0.1" - type-is "~1.6.18" - utils-merge "1.0.1" - vary "~1.1.2" - -ext@^1.1.2: - version "1.7.0" - resolved "https://registry.yarnpkg.com/ext/-/ext-1.7.0.tgz#0ea4383c0103d60e70be99e9a7f11027a33c4f5f" - integrity sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw== - dependencies: - type "^2.7.2" - -extend@~3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" - integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== - -extsprintf@1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" - integrity sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g== - -extsprintf@^1.2.0: - version "1.4.1" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.1.tgz#8d172c064867f235c0c84a596806d279bf4bcc07" - integrity sha512-Wrk35e8ydCKDj/ArClo1VrPVmN8zph5V4AtHwIuHhvMXsKf73UT3BOD+azBIW+3wOJ4FhEH7zyaJCFvChjYvMA== - -fast-check@3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/fast-check/-/fast-check-3.1.1.tgz#72c5ae7022a4e86504762e773adfb8a5b0b01252" - integrity sha512-3vtXinVyuUKCKFKYcwXhGE6NtGWkqF8Yh3rvMZNzmwz8EPrgoc/v4pDdLHyLnCyCI5MZpZZkDEwFyXyEONOxpA== - dependencies: - pure-rand "^5.0.1" - -fast-deep-equal@^3.1.1: - version "3.1.3" - resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" - integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== - -fast-glob@^3.0.3: - version "3.2.12" - resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.12.tgz#7f39ec99c2e6ab030337142da9e0c18f37afae80" - integrity sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w== - dependencies: - "@nodelib/fs.stat" "^2.0.2" - "@nodelib/fs.walk" "^1.2.3" - glob-parent "^5.1.2" - merge2 "^1.3.0" - micromatch "^4.0.4" - -fast-json-stable-stringify@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" - integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== - -fast-levenshtein@~2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" - integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== - -fastq@^1.6.0: - version "1.15.0" - resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.15.0.tgz#d04d07c6a2a68fe4599fea8d2e103a937fae6b3a" - integrity sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw== - dependencies: - reusify "^1.0.4" - -fill-range@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" - integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== - dependencies: - to-regex-range "^5.0.1" - -finalhandler@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.2.0.tgz#7d23fe5731b207b4640e4fcd00aec1f9207a7b32" - integrity sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg== - dependencies: - debug "2.6.9" - encodeurl "~1.0.2" - escape-html "~1.0.3" - on-finished "2.4.1" - parseurl "~1.3.3" - statuses "2.0.1" - unpipe "~1.0.0" - -find-replace@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/find-replace/-/find-replace-3.0.0.tgz#3e7e23d3b05167a76f770c9fbd5258b0def68c38" - integrity sha512-6Tb2myMioCAgv5kfvP5/PkZZ/ntTpVK39fHY7WkWBgvbeE+VHd/tZuZ4mrC+bxh4cfOZeYKVPaJIZtZXV7GNCQ== - dependencies: - array-back "^3.0.1" - -find-up@3.0.0, find-up@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" - integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg== - dependencies: - locate-path "^3.0.0" - -find-up@5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" - integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== - dependencies: - locate-path "^6.0.0" - path-exists "^4.0.0" - -find-up@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" - integrity sha512-jvElSjyuo4EMQGoTwo1uJU5pQMwTW5lS1x05zzfJuTIyLR3zwO27LYrxNg+dlvKpGOuGy/MzBdXh80g0ve5+HA== - dependencies: - path-exists "^2.0.0" - pinkie-promise "^2.0.0" - -find-up@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" - integrity sha512-NWzkk0jSJtTt08+FBFMvXoeZnOJD+jTtsRmBYbAIzJdX6l7dLgR7CTubCM5/eDdPUBvLCeVasP1brfVR/9/EZQ== - dependencies: - locate-path "^2.0.0" - -find-up@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" - integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== - dependencies: - locate-path "^5.0.0" - path-exists "^4.0.0" - -flat@^4.1.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/flat/-/flat-4.1.1.tgz#a392059cc382881ff98642f5da4dde0a959f309b" - integrity sha512-FmTtBsHskrU6FJ2VxCnsDb84wu9zhmO3cUX2kGFb5tuwhfXxGciiT0oRY+cck35QmG+NmGh5eLz6lLCpWTqwpA== - dependencies: - is-buffer "~2.0.3" - -flat@^5.0.2: - version "5.0.2" - resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241" - integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== - -fmix@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/fmix/-/fmix-0.1.0.tgz#c7bbf124dec42c9d191cfb947d0a9778dd986c0c" - integrity sha512-Y6hyofImk9JdzU8k5INtTXX1cu8LDlePWDFU5sftm9H+zKCr5SGrVjdhkvsim646cw5zD0nADj8oHyXMZmCZ9w== - dependencies: - imul "^1.0.0" - -follow-redirects@^1.12.1, follow-redirects@^1.14.0: - version "1.15.2" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.2.tgz#b460864144ba63f2681096f274c4e57026da2c13" - integrity sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA== - -for-each@^0.3.3: - version "0.3.3" - resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e" - integrity sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw== - dependencies: - is-callable "^1.1.3" - -forever-agent@~0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" - integrity sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw== - -form-data-encoder@1.7.1: - version "1.7.1" - resolved "https://registry.yarnpkg.com/form-data-encoder/-/form-data-encoder-1.7.1.tgz#ac80660e4f87ee0d3d3c3638b7da8278ddb8ec96" - integrity sha512-EFRDrsMm/kyqbTQocNvRXMLjc7Es2Vk+IQFx/YW7hkUH1eBl4J1fqiP34l74Yt0pFLCNpc06fkbVk00008mzjg== - -form-data@^2.2.0: - version "2.5.1" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.5.1.tgz#f2cbec57b5e59e23716e128fe44d4e5dd23895f4" - integrity sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.6" - mime-types "^2.1.12" - -form-data@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452" - integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.8" - mime-types "^2.1.12" - -form-data@~2.3.2: - version "2.3.3" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" - integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.6" - mime-types "^2.1.12" - -forwarded@0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.2.0.tgz#2269936428aad4c15c7ebe9779a84bf0b2a81811" - integrity sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow== - -fp-ts@1.19.3: - version "1.19.3" - resolved "https://registry.yarnpkg.com/fp-ts/-/fp-ts-1.19.3.tgz#261a60d1088fbff01f91256f91d21d0caaaaa96f" - integrity sha512-H5KQDspykdHuztLTg+ajGN0Z2qUjcEf3Ybxc6hLt0k7/zPkn29XnKnxlBPyW2XIddWrGaJBzBl4VLYOtk39yZg== - -fp-ts@^1.0.0: - version "1.19.5" - resolved "https://registry.yarnpkg.com/fp-ts/-/fp-ts-1.19.5.tgz#3da865e585dfa1fdfd51785417357ac50afc520a" - integrity sha512-wDNqTimnzs8QqpldiId9OavWK2NptormjXnRJTQecNjzwfyp6P/8s/zG8e4h3ja3oqkKaY72UlTjQYt/1yXf9A== - -fresh@0.5.2: - version "0.5.2" - resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" - integrity sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q== - -fs-extra@^0.30.0: - version "0.30.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-0.30.0.tgz#f233ffcc08d4da7d432daa449776989db1df93f0" - integrity sha512-UvSPKyhMn6LEd/WpUaV9C9t3zATuqoqfWc3QdPhPLb58prN9tqYPlPWi8Krxi44loBoUzlobqZ3+8tGpxxSzwA== - dependencies: - graceful-fs "^4.1.2" - jsonfile "^2.1.0" - klaw "^1.0.0" - path-is-absolute "^1.0.0" - rimraf "^2.2.8" - -fs-extra@^10.0.0: - version "10.1.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-10.1.0.tgz#02873cfbc4084dde127eaa5f9905eef2325d1abf" - integrity sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ== - dependencies: - graceful-fs "^4.2.0" - jsonfile "^6.0.1" - universalify "^2.0.0" - -fs-extra@^4.0.2: - version "4.0.3" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.3.tgz#0d852122e5bc5beb453fb028e9c0c9bf36340c94" - integrity sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg== - dependencies: - graceful-fs "^4.1.2" - jsonfile "^4.0.0" - universalify "^0.1.0" - -fs-extra@^7.0.0, fs-extra@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9" - integrity sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw== - dependencies: - graceful-fs "^4.1.2" - jsonfile "^4.0.0" - universalify "^0.1.0" - -fs-extra@^8.1.0: - version "8.1.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0" - integrity sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g== - dependencies: - graceful-fs "^4.2.0" - jsonfile "^4.0.0" - universalify "^0.1.0" - -fs-extra@^9.1.0: - version "9.1.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.1.0.tgz#5954460c764a8da2094ba3554bf839e6b9a7c86d" - integrity sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ== - dependencies: - at-least-node "^1.0.0" - graceful-fs "^4.2.0" - jsonfile "^6.0.1" - universalify "^2.0.0" - -fs-minipass@^1.2.7: - version "1.2.7" - resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.7.tgz#ccff8570841e7fe4265693da88936c55aed7f7c7" - integrity sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA== - dependencies: - minipass "^2.6.0" - -fs-readdir-recursive@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz#e32fc030a2ccee44a6b5371308da54be0b397d27" - integrity sha512-GNanXlVr2pf02+sPN40XN8HG+ePaNcvM0q5mZBd668Obwb0yD5GiUbZOFgwn8kGMY6I3mdyDJzieUy3PTYyTRA== - -fs.realpath@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" - integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== - -fsevents@~2.1.1: - version "2.1.3" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.3.tgz#fb738703ae8d2f9fe900c33836ddebee8b97f23e" - integrity sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ== - -fsevents@~2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" - integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== - -function-bind@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" - integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== - -function.prototype.name@^1.1.5: - version "1.1.5" - resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.1.5.tgz#cce0505fe1ffb80503e6f9e46cc64e46a12a9621" - integrity sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - es-abstract "^1.19.0" - functions-have-names "^1.2.2" - -functional-red-black-tree@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" - integrity sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g== - -functions-have-names@^1.2.2, functions-have-names@^1.2.3: - version "1.2.3" - resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" - integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ== - -get-caller-file@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a" - integrity sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w== - -get-caller-file@^2.0.1, get-caller-file@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" - integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== - -get-func-name@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.0.tgz#ead774abee72e20409433a066366023dd6887a41" - integrity sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig== - -get-intrinsic@^1.0.2, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3, get-intrinsic@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.0.tgz#7ad1dc0535f3a2904bba075772763e5051f6d05f" - integrity sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q== - dependencies: - function-bind "^1.1.1" - has "^1.0.3" - has-symbols "^1.0.3" - -get-port@^3.1.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/get-port/-/get-port-3.2.0.tgz#dd7ce7de187c06c8bf353796ac71e099f0980ebc" - integrity sha512-x5UJKlgeUiNT8nyo/AcnwLnZuZNcSjSw0kogRB+Whd1fjjFq4B1hySFxSFWWSn4mIBzg3sRNUDFYc4g5gjPoLg== - -get-stream@^5.1.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.2.0.tgz#4966a1795ee5ace65e706c4b7beb71257d6e22d3" - integrity sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA== - dependencies: - pump "^3.0.0" - -get-stream@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" - integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== - -get-symbol-description@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/get-symbol-description/-/get-symbol-description-1.0.0.tgz#7fdb81c900101fbd564dd5f1a30af5aadc1e58d6" - integrity sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw== - dependencies: - call-bind "^1.0.2" - get-intrinsic "^1.1.1" - -getpass@^0.1.1: - version "0.1.7" - resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" - integrity sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng== - dependencies: - assert-plus "^1.0.0" - -ghost-testrpc@^0.0.2: - version "0.0.2" - resolved "https://registry.yarnpkg.com/ghost-testrpc/-/ghost-testrpc-0.0.2.tgz#c4de9557b1d1ae7b2d20bbe474a91378ca90ce92" - integrity sha512-i08dAEgJ2g8z5buJIrCTduwPIhih3DP+hOCTyyryikfV8T0bNvHnGXO67i0DD1H4GBDETTclPy9njZbfluQYrQ== - dependencies: - chalk "^2.4.2" - node-emoji "^1.10.0" - -glob-parent@^5.1.2, glob-parent@~5.1.0, glob-parent@~5.1.2: - version "5.1.2" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" - integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== - dependencies: - is-glob "^4.0.1" - -glob@7.1.3: - version "7.1.3" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1" - integrity sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.4" - once "^1.3.0" - path-is-absolute "^1.0.0" - -glob@7.1.7: - version "7.1.7" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.7.tgz#3b193e9233f01d42d0b3f78294bbeeb418f94a90" - integrity sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.4" - once "^1.3.0" - path-is-absolute "^1.0.0" - -glob@7.2.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023" - integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.4" - once "^1.3.0" - path-is-absolute "^1.0.0" - -glob@^5.0.15: - version "5.0.15" - resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1" - integrity sha512-c9IPMazfRITpmAAKi22dK1VKxGDX9ehhqfABDriL/lzO92xcUKEJPQHrVA/2YHSNFB4iFlykVmWvwo48nr3OxA== - dependencies: - inflight "^1.0.4" - inherits "2" - minimatch "2 || 3" - once "^1.3.0" - path-is-absolute "^1.0.0" - -glob@^7.0.0, glob@^7.1.3: - version "7.2.3" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" - integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.1.1" - once "^1.3.0" - path-is-absolute "^1.0.0" - -global-modules@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-2.0.0.tgz#997605ad2345f27f51539bea26574421215c7780" - integrity sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A== - dependencies: - global-prefix "^3.0.0" - -global-prefix@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/global-prefix/-/global-prefix-3.0.0.tgz#fc85f73064df69f50421f47f883fe5b913ba9b97" - integrity sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg== - dependencies: - ini "^1.3.5" - kind-of "^6.0.2" - which "^1.3.1" - -global@~4.4.0: - version "4.4.0" - resolved "https://registry.yarnpkg.com/global/-/global-4.4.0.tgz#3e7b105179006a323ed71aafca3e9c57a5cc6406" - integrity sha512-wv/LAoHdRE3BeTGz53FAamhGlPLhlssK45usmGFThIi4XqnBmjKQ16u+RNbP7WvigRZDxUsM0J3gcQ5yicaL0w== - dependencies: - min-document "^2.19.0" - process "^0.11.10" - -globalthis@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/globalthis/-/globalthis-1.0.3.tgz#5852882a52b80dc301b0660273e1ed082f0b6ccf" - integrity sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA== - dependencies: - define-properties "^1.1.3" - -globby@^10.0.1: - version "10.0.2" - resolved "https://registry.yarnpkg.com/globby/-/globby-10.0.2.tgz#277593e745acaa4646c3ab411289ec47a0392543" - integrity sha512-7dUi7RvCoT/xast/o/dLN53oqND4yk0nsHkhRgn9w65C4PofCLOoJ39iSOg+qVDdWQPIEj+eszMHQ+aLVwwQSg== - dependencies: - "@types/glob" "^7.1.1" - array-union "^2.1.0" - dir-glob "^3.0.1" - fast-glob "^3.0.3" - glob "^7.1.3" - ignore "^5.1.1" - merge2 "^1.2.3" - slash "^3.0.0" - -gopd@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.0.1.tgz#29ff76de69dac7489b7c0918a5788e56477c332c" - integrity sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA== - dependencies: - get-intrinsic "^1.1.3" - -got@12.1.0: - version "12.1.0" - resolved "https://registry.yarnpkg.com/got/-/got-12.1.0.tgz#099f3815305c682be4fd6b0ee0726d8e4c6b0af4" - integrity sha512-hBv2ty9QN2RdbJJMK3hesmSkFTjVIHyIDDbssCKnSmq62edGgImJWD10Eb1k77TiV1bxloxqcFAVK8+9pkhOig== - dependencies: - "@sindresorhus/is" "^4.6.0" - "@szmarczak/http-timer" "^5.0.1" - "@types/cacheable-request" "^6.0.2" - "@types/responselike" "^1.0.0" - cacheable-lookup "^6.0.4" - cacheable-request "^7.0.2" - decompress-response "^6.0.0" - form-data-encoder "1.7.1" - get-stream "^6.0.1" - http2-wrapper "^2.1.10" - lowercase-keys "^3.0.0" - p-cancelable "^3.0.0" - responselike "^2.0.0" - -got@^11.8.5: - version "11.8.6" - resolved "https://registry.yarnpkg.com/got/-/got-11.8.6.tgz#276e827ead8772eddbcfc97170590b841823233a" - integrity sha512-6tfZ91bOr7bOXnK7PRDCGBLa1H4U080YHNaAQ2KsMGlLEzRbk44nsZF2E1IeRc3vtJHPVbKCYgdFbaGO2ljd8g== - dependencies: - "@sindresorhus/is" "^4.0.0" - "@szmarczak/http-timer" "^4.0.5" - "@types/cacheable-request" "^6.0.1" - "@types/responselike" "^1.0.0" - cacheable-lookup "^5.0.3" - cacheable-request "^7.0.2" - decompress-response "^6.0.0" - http2-wrapper "^1.0.0-beta.5.2" - lowercase-keys "^2.0.0" - p-cancelable "^2.0.0" - responselike "^2.0.0" - -graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9, graceful-fs@^4.2.0, graceful-fs@^4.2.4: - version "4.2.11" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" - integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== - -growl@1.10.5: - version "1.10.5" - resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e" - integrity sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA== - -handlebars@^4.0.1: - version "4.7.7" - resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.7.tgz#9ce33416aad02dbd6c8fafa8240d5d98004945a1" - integrity sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA== - dependencies: - minimist "^1.2.5" - neo-async "^2.6.0" - source-map "^0.6.1" - wordwrap "^1.0.0" - optionalDependencies: - uglify-js "^3.1.4" - -har-schema@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" - integrity sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q== - -har-validator@~5.1.3: - version "5.1.5" - resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.5.tgz#1f0803b9f8cb20c0fa13822df1ecddb36bde1efd" - integrity sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w== - dependencies: - ajv "^6.12.3" - har-schema "^2.0.0" - -hardhat-deploy@^0.11.29: - version "0.11.29" - resolved "https://registry.yarnpkg.com/hardhat-deploy/-/hardhat-deploy-0.11.29.tgz#e6d76e37fa2ed74d76d15b01f3849da3bda49a81" - integrity sha512-9F+MRFkEocelzB8d+SDDCcTL7edBYAj2S63ldknvfIIBSajeB6q1/jm+dlK1GjcWzAzw7EVoxtjJXzxAxZfZcg== - dependencies: - "@ethersproject/abi" "^5.7.0" - "@ethersproject/abstract-signer" "^5.7.0" - "@ethersproject/address" "^5.7.0" - "@ethersproject/bignumber" "^5.7.0" - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/constants" "^5.7.0" - "@ethersproject/contracts" "^5.7.0" - "@ethersproject/providers" "^5.7.2" - "@ethersproject/solidity" "^5.7.0" - "@ethersproject/transactions" "^5.7.0" - "@ethersproject/wallet" "^5.7.0" - "@types/qs" "^6.9.7" - axios "^0.21.1" - chalk "^4.1.2" - chokidar "^3.5.2" - debug "^4.3.2" - enquirer "^2.3.6" - ethers "^5.5.3" - form-data "^4.0.0" - fs-extra "^10.0.0" - match-all "^1.2.6" - murmur-128 "^0.2.1" - qs "^6.9.4" - zksync-web3 "^0.14.3" - -hardhat-gas-reporter@^1.0.8: - version "1.0.9" - resolved "https://registry.yarnpkg.com/hardhat-gas-reporter/-/hardhat-gas-reporter-1.0.9.tgz#9a2afb354bc3b6346aab55b1c02ca556d0e16450" - integrity sha512-INN26G3EW43adGKBNzYWOlI3+rlLnasXTwW79YNnUhXPDa+yHESgt639dJEs37gCjhkbNKcRRJnomXEuMFBXJg== - dependencies: - array-uniq "1.0.3" - eth-gas-reporter "^0.2.25" - sha1 "^1.1.1" - -hardhat-shorthand@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/hardhat-shorthand/-/hardhat-shorthand-1.0.0.tgz#ccc059c7e03115222b879c0347a18d20d0b31e3a" - integrity sha512-ixvUHrZBfGRXXrerBziNwGFmQZtz8iX43z2mJZTPnQasoaDbZ7oDZ4FqqI80EmZvP0hIml4wgpiQhrE3P/eqXQ== - dependencies: - "@fvictorio/tabtab" "^0.0.3" - debug "^4.1.1" - semver "^6.3.0" - -hardhat@^2.11.1: - version "2.14.0" - resolved "https://registry.yarnpkg.com/hardhat/-/hardhat-2.14.0.tgz#b60c74861494aeb1b50803cf04cc47865a42b87a" - integrity sha512-73jsInY4zZahMSVFurSK+5TNCJTXMv+vemvGia0Ac34Mm19fYp6vEPVGF3sucbumszsYxiTT2TbS8Ii2dsDSoQ== - dependencies: - "@ethersproject/abi" "^5.1.2" - "@metamask/eth-sig-util" "^4.0.0" - "@nomicfoundation/ethereumjs-block" "5.0.1" - "@nomicfoundation/ethereumjs-blockchain" "7.0.1" - "@nomicfoundation/ethereumjs-common" "4.0.1" - "@nomicfoundation/ethereumjs-evm" "2.0.1" - "@nomicfoundation/ethereumjs-rlp" "5.0.1" - "@nomicfoundation/ethereumjs-statemanager" "2.0.1" - "@nomicfoundation/ethereumjs-trie" "6.0.1" - "@nomicfoundation/ethereumjs-tx" "5.0.1" - "@nomicfoundation/ethereumjs-util" "9.0.1" - "@nomicfoundation/ethereumjs-vm" "7.0.1" - "@nomicfoundation/solidity-analyzer" "^0.1.0" - "@sentry/node" "^5.18.1" - "@types/bn.js" "^5.1.0" - "@types/lru-cache" "^5.1.0" - abort-controller "^3.0.0" - adm-zip "^0.4.16" - aggregate-error "^3.0.0" - ansi-escapes "^4.3.0" - chalk "^2.4.2" - chokidar "^3.4.0" - ci-info "^2.0.0" - debug "^4.1.1" - enquirer "^2.3.0" - env-paths "^2.2.0" - ethereum-cryptography "^1.0.3" - ethereumjs-abi "^0.6.8" - find-up "^2.1.0" - fp-ts "1.19.3" - fs-extra "^7.0.1" - glob "7.2.0" - immutable "^4.0.0-rc.12" - io-ts "1.10.4" - keccak "^3.0.2" - lodash "^4.17.11" - mnemonist "^0.38.0" - mocha "^10.0.0" - p-map "^4.0.0" - qs "^6.7.0" - raw-body "^2.4.1" - resolve "1.17.0" - semver "^6.3.0" - solc "0.7.3" - source-map-support "^0.5.13" - stacktrace-parser "^0.1.10" - tsort "0.0.1" - undici "^5.14.0" - uuid "^8.3.2" - ws "^7.4.6" - -has-bigints@^1.0.1, has-bigints@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.2.tgz#0871bd3e3d51626f6ca0966668ba35d5602d6eaa" - integrity sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ== - -has-flag@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" - integrity sha512-DyYHfIYwAJmjAjSSPKANxI8bFY9YtFrgkAfinBojQ8YJTOuOuav64tMUJv584SES4xl74PmuaevIyaLESHdTAA== - -has-flag@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" - integrity sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw== - -has-flag@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" - integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== - -has-property-descriptors@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz#610708600606d36961ed04c196193b6a607fa861" - integrity sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ== - dependencies: - get-intrinsic "^1.1.1" - -has-proto@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.1.tgz#1885c1305538958aff469fef37937c22795408e0" - integrity sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg== - -has-symbols@^1.0.0, has-symbols@^1.0.2, has-symbols@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" - integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== - -has-tostringtag@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.0.tgz#7e133818a7d394734f941e73c3d3f9291e658b25" - integrity sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ== - dependencies: - has-symbols "^1.0.2" - -has@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" - integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== - dependencies: - function-bind "^1.1.1" - -hash-base@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.1.0.tgz#55c381d9e06e1d2997a883b4a3fddfe7f0d3af33" - integrity sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA== - dependencies: - inherits "^2.0.4" - readable-stream "^3.6.0" - safe-buffer "^5.2.0" - -hash.js@1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.3.tgz#340dedbe6290187151c1ea1d777a3448935df846" - integrity sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA== - dependencies: - inherits "^2.0.3" - minimalistic-assert "^1.0.0" - -hash.js@1.1.7, hash.js@^1.0.0, hash.js@^1.0.3, hash.js@^1.1.7: - version "1.1.7" - resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" - integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== - dependencies: - inherits "^2.0.3" - minimalistic-assert "^1.0.1" - -he@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" - integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== - -header-case@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/header-case/-/header-case-1.0.1.tgz#9535973197c144b09613cd65d317ef19963bd02d" - integrity sha512-i0q9mkOeSuhXw6bGgiQCCBgY/jlZuV/7dZXyZ9c6LcBrqwvT8eT719E9uxE5LiZftdl+z81Ugbg/VvXV4OJOeQ== - dependencies: - no-case "^2.2.0" - upper-case "^1.1.3" - -"heap@>= 0.2.0": - version "0.2.7" - resolved "https://registry.yarnpkg.com/heap/-/heap-0.2.7.tgz#1e6adf711d3f27ce35a81fe3b7bd576c2260a8fc" - integrity sha512-2bsegYkkHO+h/9MGbn6KWcE45cHZgPANo5LXF7EvWdT0yT2EguSVO1nDgU5c8+ZOPwp2vMNa7YFsJhVcDR9Sdg== - -highlight.js@^10.4.1: - version "10.7.3" - resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-10.7.3.tgz#697272e3991356e40c3cac566a74eef681756531" - integrity sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A== - -highlightjs-solidity@^2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/highlightjs-solidity/-/highlightjs-solidity-2.0.6.tgz#e7a702a2b05e0a97f185e6ba39fd4846ad23a990" - integrity sha512-DySXWfQghjm2l6a/flF+cteroJqD4gI8GSdL4PtvxZSsAHie8m3yVe2JFoRg03ROKT6hp2Lc/BxXkqerNmtQYg== - -hmac-drbg@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" - integrity sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg== - dependencies: - hash.js "^1.0.3" - minimalistic-assert "^1.0.0" - minimalistic-crypto-utils "^1.0.1" - -hosted-git-info@^2.1.4: - version "2.8.9" - resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.9.tgz#dffc0bf9a21c02209090f2aa69429e1414daf3f9" - integrity sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw== - -htmlparser2@^8.0.1: - version "8.0.2" - resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-8.0.2.tgz#f002151705b383e62433b5cf466f5b716edaec21" - integrity sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA== - dependencies: - domelementtype "^2.3.0" - domhandler "^5.0.3" - domutils "^3.0.1" - entities "^4.4.0" - -http-basic@^8.1.1: - version "8.1.3" - resolved "https://registry.yarnpkg.com/http-basic/-/http-basic-8.1.3.tgz#a7cabee7526869b9b710136970805b1004261bbf" - integrity sha512-/EcDMwJZh3mABI2NhGfHOGOeOZITqfkEO4p/xK+l3NpyncIHUQBoMvCSF/b5GqvKtySC2srL/GGG3+EtlqlmCw== - dependencies: - caseless "^0.12.0" - concat-stream "^1.6.2" - http-response-object "^3.0.1" - parse-cache-control "^1.0.1" - -http-cache-semantics@^4.0.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz#abe02fcb2985460bf0323be664436ec3476a6d5a" - integrity sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ== - -http-errors@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-2.0.0.tgz#b7774a1486ef73cf7667ac9ae0858c012c57b9d3" - integrity sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ== - dependencies: - depd "2.0.0" - inherits "2.0.4" - setprototypeof "1.2.0" - statuses "2.0.1" - toidentifier "1.0.1" - -http-https@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/http-https/-/http-https-1.0.0.tgz#2f908dd5f1db4068c058cd6e6d4ce392c913389b" - integrity sha512-o0PWwVCSp3O0wS6FvNr6xfBCHgt0m1tvPLFOCc2iFDKTRAXhB7m8klDf7ErowFH8POa6dVdGatKU5I1YYwzUyg== - -http-response-object@^3.0.1: - version "3.0.2" - resolved "https://registry.yarnpkg.com/http-response-object/-/http-response-object-3.0.2.tgz#7f435bb210454e4360d074ef1f989d5ea8aa9810" - integrity sha512-bqX0XTF6fnXSQcEJ2Iuyr75yVakyjIDCqroJQ/aHfSdlM743Cwqoi2nDYMzLGWUcuTWGWy8AAvOKXTfiv6q9RA== - dependencies: - "@types/node" "^10.0.3" - -http-signature@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" - integrity sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ== - dependencies: - assert-plus "^1.0.0" - jsprim "^1.2.2" - sshpk "^1.7.0" - -http2-wrapper@^1.0.0-beta.5.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/http2-wrapper/-/http2-wrapper-1.0.3.tgz#b8f55e0c1f25d4ebd08b3b0c2c079f9590800b3d" - integrity sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg== - dependencies: - quick-lru "^5.1.1" - resolve-alpn "^1.0.0" - -http2-wrapper@^2.1.10: - version "2.2.0" - resolved "https://registry.yarnpkg.com/http2-wrapper/-/http2-wrapper-2.2.0.tgz#b80ad199d216b7d3680195077bd7b9060fa9d7f3" - integrity sha512-kZB0wxMo0sh1PehyjJUWRFEd99KC5TLjZ2cULC4f9iqJBAmKQQXEICjxl5iPJRwP40dpeHFqqhm7tYCvODpqpQ== - dependencies: - quick-lru "^5.1.1" - resolve-alpn "^1.2.0" - -https-proxy-agent@^5.0.0: - version "5.0.1" - resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz#c59ef224a04fe8b754f3db0063a25ea30d0005d6" - integrity sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA== - dependencies: - agent-base "6" - debug "4" - -iconv-lite@0.4.24: - version "0.4.24" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" - integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== - dependencies: - safer-buffer ">= 2.1.2 < 3" - -idna-uts46-hx@^2.3.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/idna-uts46-hx/-/idna-uts46-hx-2.3.1.tgz#a1dc5c4df37eee522bf66d969cc980e00e8711f9" - integrity sha512-PWoF9Keq6laYdIRwwCdhTPl60xRqAloYNMQLiyUnG42VjT53oW07BXIRM+NK7eQjzXjAk2gUvX9caRxlnF9TAA== - dependencies: - punycode "2.1.0" - -ieee754@^1.1.13, ieee754@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" - integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== - -ignore@^5.1.1: - version "5.2.4" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.4.tgz#a291c0c6178ff1b960befe47fcdec301674a6324" - integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ== - -immutable@^4.0.0-rc.12: - version "4.3.0" - resolved "https://registry.yarnpkg.com/immutable/-/immutable-4.3.0.tgz#eb1738f14ffb39fd068b1dbe1296117484dd34be" - integrity sha512-0AOCmOip+xgJwEVTQj1EfiDDOkPmuyllDuTuEX+DDXUgapLAsBIfkg3sxCYyCEA8mQqZrrxPUGjcOQ2JS3WLkg== - -imul@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/imul/-/imul-1.0.1.tgz#9d5867161e8b3de96c2c38d5dc7cb102f35e2ac9" - integrity sha512-WFAgfwPLAjU66EKt6vRdTlKj4nAgIDQzh29JonLa4Bqtl6D8JrIMvWjCnx7xEjVNmP3U0fM5o8ZObk7d0f62bA== - -indent-string@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251" - integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg== - -inflight@^1.0.4: - version "1.0.6" - resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" - integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== - dependencies: - once "^1.3.0" - wrappy "1" - -inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.3: - version "2.0.4" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" - integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== - -ini@^1.3.5: - version "1.3.8" - resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" - integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== - -internal-slot@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.5.tgz#f2a2ee21f668f8627a4667f309dc0f4fb6674986" - integrity sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ== - dependencies: - get-intrinsic "^1.2.0" - has "^1.0.3" - side-channel "^1.0.4" - -interpret@^1.0.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.4.0.tgz#665ab8bc4da27a774a40584e812e3e0fa45b1a1e" - integrity sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA== - -invert-kv@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" - integrity sha512-xgs2NH9AE66ucSq4cNG1nhSFghr5l6tdL15Pk+jl46bmmBapgoaY/AacXyaDznAqmGL99TiLSQgO/XazFSKYeQ== - -io-ts@1.10.4: - version "1.10.4" - resolved "https://registry.yarnpkg.com/io-ts/-/io-ts-1.10.4.tgz#cd5401b138de88e4f920adbcb7026e2d1967e6e2" - integrity sha512-b23PteSnYXSONJ6JQXRAlvJhuw8KOtkqa87W4wDtvMrud/DTJd5X+NpOOI+O/zZwVq6v0VLAaJ+1EDViKEuN9g== - dependencies: - fp-ts "^1.0.0" - -ipaddr.js@1.9.1: - version "1.9.1" - resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" - integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== - -is-arguments@^1.0.4: - version "1.1.1" - resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.1.1.tgz#15b3f88fda01f2a97fec84ca761a560f123efa9b" - integrity sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA== - dependencies: - call-bind "^1.0.2" - has-tostringtag "^1.0.0" - -is-array-buffer@^3.0.1, is-array-buffer@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/is-array-buffer/-/is-array-buffer-3.0.2.tgz#f2653ced8412081638ecb0ebbd0c41c6e0aecbbe" - integrity sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w== - dependencies: - call-bind "^1.0.2" - get-intrinsic "^1.2.0" - is-typed-array "^1.1.10" - -is-arrayish@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" - integrity sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg== - -is-bigint@^1.0.1: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.4.tgz#08147a1875bc2b32005d41ccd8291dffc6691df3" - integrity sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg== - dependencies: - has-bigints "^1.0.1" - -is-binary-path@~2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" - integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== - dependencies: - binary-extensions "^2.0.0" - -is-boolean-object@^1.1.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.1.2.tgz#5c6dc200246dd9321ae4b885a114bb1f75f63719" - integrity sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA== - dependencies: - call-bind "^1.0.2" - has-tostringtag "^1.0.0" - -is-buffer@^2.0.5, is-buffer@~2.0.3: - version "2.0.5" - resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.5.tgz#ebc252e400d22ff8d77fa09888821a24a658c191" - integrity sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ== - -is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.7: - version "1.2.7" - resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055" - integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== - -is-core-module@^2.11.0: - version "2.12.0" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.12.0.tgz#36ad62f6f73c8253fd6472517a12483cf03e7ec4" - integrity sha512-RECHCBCd/viahWmwj6enj19sKbHfJrddi/6cBDsNTKbNq0f7VeaUkBo60BqzvPqo/W54ChS62Z5qyun7cfOMqQ== - dependencies: - has "^1.0.3" - -is-date-object@^1.0.1: - version "1.0.5" - resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.5.tgz#0841d5536e724c25597bf6ea62e1bd38298df31f" - integrity sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ== - dependencies: - has-tostringtag "^1.0.0" - -is-extglob@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" - integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== - -is-fullwidth-code-point@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" - integrity sha512-1pqUqRjkhPJ9miNq9SwMfdvi6lBJcd6eFxvfaivQhaH3SgisfiuudvFntdKOmxuee/77l+FPjKrQjWvmPjWrRw== - dependencies: - number-is-nan "^1.0.0" - -is-fullwidth-code-point@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" - integrity sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w== - -is-fullwidth-code-point@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" - integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== - -is-function@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-function/-/is-function-1.0.2.tgz#4f097f30abf6efadac9833b17ca5dc03f8144e08" - integrity sha512-lw7DUp0aWXYg+CBCN+JKkcE0Q2RayZnSvnZBlwgxHBQhqt5pZNVy4Ri7H9GmmXkdu7LUthszM+Tor1u/2iBcpQ== - -is-generator-function@^1.0.7: - version "1.0.10" - resolved "https://registry.yarnpkg.com/is-generator-function/-/is-generator-function-1.0.10.tgz#f1558baf1ac17e0deea7c0415c438351ff2b3c72" - integrity sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A== - dependencies: - has-tostringtag "^1.0.0" - -is-glob@^4.0.1, is-glob@~4.0.1: - version "4.0.3" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" - integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== - dependencies: - is-extglob "^2.1.1" - -is-hex-prefixed@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz#7d8d37e6ad77e5d127148913c573e082d777f554" - integrity sha512-WvtOiug1VFrE9v1Cydwm+FnXd3+w9GaeVUss5W4v/SLy3UW00vP+6iNF2SdnfiBoLy4bTqVdkftNGTUeOFVsbA== - -is-lower-case@^1.1.0: - version "1.1.3" - resolved "https://registry.yarnpkg.com/is-lower-case/-/is-lower-case-1.1.3.tgz#7e147be4768dc466db3bfb21cc60b31e6ad69393" - integrity sha512-+5A1e/WJpLLXZEDlgz4G//WYSHyQBD32qa4Jd3Lw06qQlv3fJHnp3YIHjTQSGzHMgzmVKz2ZP3rBxTHkPw/lxA== - dependencies: - lower-case "^1.1.0" - -is-negative-zero@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.2.tgz#7bf6f03a28003b8b3965de3ac26f664d765f3150" - integrity sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA== - -is-number-object@^1.0.4: - version "1.0.7" - resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.7.tgz#59d50ada4c45251784e9904f5246c742f07a42fc" - integrity sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ== - dependencies: - has-tostringtag "^1.0.0" - -is-number@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" - integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== - -is-plain-obj@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287" - integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA== - -is-regex@^1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958" - integrity sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg== - dependencies: - call-bind "^1.0.2" - has-tostringtag "^1.0.0" - -is-shared-array-buffer@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz#8f259c573b60b6a32d4058a1a07430c0a7344c79" - integrity sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA== - dependencies: - call-bind "^1.0.2" - -is-string@^1.0.5, is-string@^1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.7.tgz#0dd12bf2006f255bb58f695110eff7491eebc0fd" - integrity sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg== - dependencies: - has-tostringtag "^1.0.0" - -is-symbol@^1.0.2, is-symbol@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.4.tgz#a6dac93b635b063ca6872236de88910a57af139c" - integrity sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg== - dependencies: - has-symbols "^1.0.2" - -is-typed-array@^1.1.10, is-typed-array@^1.1.3, is-typed-array@^1.1.9: - version "1.1.10" - resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.10.tgz#36a5b5cb4189b575d1a3e4b08536bfb485801e3f" - integrity sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A== - dependencies: - available-typed-arrays "^1.0.5" - call-bind "^1.0.2" - for-each "^0.3.3" - gopd "^1.0.1" - has-tostringtag "^1.0.0" - -is-typedarray@^1.0.0, is-typedarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" - integrity sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA== - -is-unicode-supported@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7" - integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw== - -is-upper-case@^1.1.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/is-upper-case/-/is-upper-case-1.1.2.tgz#8d0b1fa7e7933a1e58483600ec7d9661cbaf756f" - integrity sha512-GQYSJMgfeAmVwh9ixyk888l7OIhNAGKtY6QA+IrWlu9MDTCaXmeozOZ2S9Knj7bQwBO/H6J2kb+pbyTUiMNbsw== - dependencies: - upper-case "^1.1.0" - -is-utf8@^0.2.0: - version "0.2.1" - resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" - integrity sha512-rMYPYvCzsXywIsldgLaSoPlw5PfoB/ssr7hY4pLfcodrA5M/eArza1a9VmTiNIBNMjOGr1Ow9mTyU2o69U6U9Q== - -is-weakref@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-weakref/-/is-weakref-1.0.2.tgz#9529f383a9338205e89765e0392efc2f100f06f2" - integrity sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ== - dependencies: - call-bind "^1.0.2" - -isarray@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.5.tgz#8af1e4c1221244cc62459faf38940d4e644a5723" - integrity sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw== - -isarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" - integrity sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ== - -isexe@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" - integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== - -isstream@~0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" - integrity sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g== - -js-sdsl@^4.1.4: - version "4.4.0" - resolved "https://registry.yarnpkg.com/js-sdsl/-/js-sdsl-4.4.0.tgz#8b437dbe642daa95760400b602378ed8ffea8430" - integrity sha512-FfVSdx6pJ41Oa+CF7RDaFmTnCaFhua+SNYQX74riGOpl96x+2jQCqEfQ2bnXu/5DPCqlRuiqyvTJM0Qjz26IVg== - -js-sha3@0.5.5: - version "0.5.5" - resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.5.5.tgz#baf0c0e8c54ad5903447df96ade7a4a1bca79a4a" - integrity sha512-yLLwn44IVeunwjpDVTDZmQeVbB0h+dZpY2eO68B/Zik8hu6dH+rKeLxwua79GGIvW6xr8NBAcrtiUbYrTjEFTA== - -js-sha3@0.5.7, js-sha3@^0.5.7: - version "0.5.7" - resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.5.7.tgz#0d4ffd8002d5333aabaf4a23eed2f6374c9f28e7" - integrity sha512-GII20kjaPX0zJ8wzkTbNDYMY7msuZcTWk8S5UOh6806Jq/wz1J8/bnr8uGU0DAUmYDjj2Mr4X1cW8v/GLYnR+g== - -js-sha3@0.8.0, js-sha3@^0.8.0: - version "0.8.0" - resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.8.0.tgz#b9b7a5da73afad7dedd0f8c463954cbde6818840" - integrity sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q== - -js-yaml@3.13.1: - version "3.13.1" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847" - integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw== - dependencies: - argparse "^1.0.7" - esprima "^4.0.0" - -js-yaml@3.x: - version "3.14.1" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" - integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== - dependencies: - argparse "^1.0.7" - esprima "^4.0.0" - -js-yaml@4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" - integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== - dependencies: - argparse "^2.0.1" - -jsbn@~0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" - integrity sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg== - -json-buffer@3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13" - integrity sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ== - -json-schema-traverse@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" - integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== - -json-schema-traverse@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2" - integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug== - -json-schema@0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.4.0.tgz#f7de4cf6efab838ebaeb3236474cbba5a1930ab5" - integrity sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA== - -json-stringify-safe@~5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" - integrity sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA== - -jsonfile@^2.1.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-2.4.0.tgz#3736a2b428b87bbda0cc83b53fa3d633a35c2ae8" - integrity sha512-PKllAqbgLgxHaj8TElYymKCAgrASebJrWpTnEkOaTowt23VKXXN0sUeriJ+eh7y6ufb/CC5ap11pz71/cM0hUw== - optionalDependencies: - graceful-fs "^4.1.6" - -jsonfile@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" - integrity sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg== - optionalDependencies: - graceful-fs "^4.1.6" - -jsonfile@^6.0.1: - version "6.1.0" - resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae" - integrity sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ== - dependencies: - universalify "^2.0.0" - optionalDependencies: - graceful-fs "^4.1.6" - -jsonschema@^1.2.4: - version "1.4.1" - resolved "https://registry.yarnpkg.com/jsonschema/-/jsonschema-1.4.1.tgz#cc4c3f0077fb4542982973d8a083b6b34f482dab" - integrity sha512-S6cATIPVv1z0IlxdN+zUk5EPjkGCdnhN4wVSBlvoUO1tOLJootbo9CquNJmbIh4yikWHiUedhRYrNPn1arpEmQ== - -jsprim@^1.2.2: - version "1.4.2" - resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.2.tgz#712c65533a15c878ba59e9ed5f0e26d5b77c5feb" - integrity sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw== - dependencies: - assert-plus "1.0.0" - extsprintf "1.3.0" - json-schema "0.4.0" - verror "1.10.0" - -keccak@^3.0.0, keccak@^3.0.2: - version "3.0.3" - resolved "https://registry.yarnpkg.com/keccak/-/keccak-3.0.3.tgz#4bc35ad917be1ef54ff246f904c2bbbf9ac61276" - integrity sha512-JZrLIAJWuZxKbCilMpNz5Vj7Vtb4scDG3dMXLOsbzBmQGyjwE61BbW7bJkfKKCShXiQZt3T6sBgALRtmd+nZaQ== - dependencies: - node-addon-api "^2.0.0" - node-gyp-build "^4.2.0" - readable-stream "^3.6.0" - -keyv@^4.0.0: - version "4.5.2" - resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.2.tgz#0e310ce73bf7851ec702f2eaf46ec4e3805cce56" - integrity sha512-5MHbFaKn8cNSmVW7BYnijeAVlE4cYA/SVkifVgrh7yotnfhKmjuXpDKjrABLnT0SfHWV21P8ow07OGfRrNDg8g== - dependencies: - json-buffer "3.0.1" - -kind-of@^6.0.2: - version "6.0.3" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" - integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== - -klaw@^1.0.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/klaw/-/klaw-1.3.1.tgz#4088433b46b3b1ba259d78785d8e96f73ba02439" - integrity sha512-TED5xi9gGQjGpNnvRWknrwAB1eL5GciPfVFOt3Vk1OJCVDQbzuSfrF3hkUQKlsgKrG1F+0t5W0m+Fje1jIt8rw== - optionalDependencies: - graceful-fs "^4.1.9" - -lcid@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" - integrity sha512-YiGkH6EnGrDGqLMITnGjXtGmNtjoXw9SVUzcaos8RBi7Ps0VBylkq+vOcY9QE5poLasPCR849ucFUkl0UzUyOw== - dependencies: - invert-kv "^1.0.0" - -level-supports@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/level-supports/-/level-supports-4.0.1.tgz#431546f9d81f10ff0fea0e74533a0e875c08c66a" - integrity sha512-PbXpve8rKeNcZ9C1mUicC9auIYFyGpkV9/i6g76tLgANwWhtG2v7I4xNBUlkn3lE2/dZF3Pi0ygYGtLc4RXXdA== - -level-transcoder@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/level-transcoder/-/level-transcoder-1.0.1.tgz#f8cef5990c4f1283d4c86d949e73631b0bc8ba9c" - integrity sha512-t7bFwFtsQeD8cl8NIoQ2iwxA0CL/9IFw7/9gAjOonH0PWTTiRfY7Hq+Ejbsxh86tXobDQ6IOiddjNYIfOBs06w== - dependencies: - buffer "^6.0.3" - module-error "^1.0.1" - -level@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/level/-/level-8.0.0.tgz#41b4c515dabe28212a3e881b61c161ffead14394" - integrity sha512-ypf0jjAk2BWI33yzEaaotpq7fkOPALKAgDBxggO6Q9HGX2MRXn0wbP1Jn/tJv1gtL867+YOjOB49WaUF3UoJNQ== - dependencies: - browser-level "^1.0.1" - classic-level "^1.2.0" - -levn@~0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" - integrity sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA== - dependencies: - prelude-ls "~1.1.2" - type-check "~0.3.2" - -load-json-file@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" - integrity sha512-cy7ZdNRXdablkXYNI049pthVeXFurRyb9+hA/dZzerZ0pGTx42z+y+ssxBaVV2l70t1muq5IdKhn4UtcoGUY9A== - dependencies: - graceful-fs "^4.1.2" - parse-json "^2.2.0" - pify "^2.0.0" - pinkie-promise "^2.0.0" - strip-bom "^2.0.0" - -locate-path@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" - integrity sha512-NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA== - dependencies: - p-locate "^2.0.0" - path-exists "^3.0.0" - -locate-path@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" - integrity sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A== - dependencies: - p-locate "^3.0.0" - path-exists "^3.0.0" - -locate-path@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" - integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== - dependencies: - p-locate "^4.1.0" - -locate-path@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" - integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== - dependencies: - p-locate "^5.0.0" - -lodash.assign@^4.0.3, lodash.assign@^4.0.6: - version "4.2.0" - resolved "https://registry.yarnpkg.com/lodash.assign/-/lodash.assign-4.2.0.tgz#0d99f3ccd7a6d261d19bdaeb9245005d285808e7" - integrity sha512-hFuH8TY+Yji7Eja3mGiuAxBqLagejScbG8GbG0j6o9vzn0YL14My+ktnqtZgFTosKymC9/44wP6s7xyuLfnClw== - -lodash.camelcase@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" - integrity sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA== - -lodash.flatten@^4.4.0: - version "4.4.0" - resolved "https://registry.yarnpkg.com/lodash.flatten/-/lodash.flatten-4.4.0.tgz#f31c22225a9632d2bbf8e4addbef240aa765a61f" - integrity sha512-C5N2Z3DgnnKr0LOpv/hKCgKdb7ZZwafIrsesve6lmzvZIRZRGaZ/l6Q8+2W7NaT+ZwO3fFlSCzCzrDCFdJfZ4g== - -lodash.merge@^4.6.2: - version "4.6.2" - resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" - integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== - -lodash.truncate@^4.4.2: - version "4.4.2" - resolved "https://registry.yarnpkg.com/lodash.truncate/-/lodash.truncate-4.4.2.tgz#5a350da0b1113b837ecfffd5812cbe58d6eae193" - integrity sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw== - -lodash@^4.17.11, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.16, lodash@^4.17.19, lodash@^4.17.21: - version "4.17.21" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" - integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== - -log-symbols@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-3.0.0.tgz#f3a08516a5dea893336a7dee14d18a1cfdab77c4" - integrity sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ== - dependencies: - chalk "^2.4.2" - -log-symbols@4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.1.0.tgz#3fbdbb95b4683ac9fc785111e792e558d4abd503" - integrity sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg== - dependencies: - chalk "^4.1.0" - is-unicode-supported "^0.1.0" - -loupe@^2.3.1: - version "2.3.6" - resolved "https://registry.yarnpkg.com/loupe/-/loupe-2.3.6.tgz#76e4af498103c532d1ecc9be102036a21f787b53" - integrity sha512-RaPMZKiMy8/JruncMU5Bt6na1eftNoo++R4Y+N2FrxkDVTrGvcyzFTsaGif4QTeKESheMGegbhw6iUAq+5A8zA== - dependencies: - get-func-name "^2.0.0" - -lower-case-first@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/lower-case-first/-/lower-case-first-1.0.2.tgz#e5da7c26f29a7073be02d52bac9980e5922adfa1" - integrity sha512-UuxaYakO7XeONbKrZf5FEgkantPf5DUqDayzP5VXZrtRPdH86s4kN47I8B3TW10S4QKiE3ziHNf3kRN//okHjA== - dependencies: - lower-case "^1.1.2" - -lower-case@^1.1.0, lower-case@^1.1.1, lower-case@^1.1.2: - version "1.1.4" - resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-1.1.4.tgz#9a2cabd1b9e8e0ae993a4bf7d5875c39c42e8eac" - integrity sha512-2Fgx1Ycm599x+WGpIYwJOvsjmXFzTSc34IwDWALRA/8AopUKAVPwfJ+h5+f85BCp0PWmmJcWzEpxOpoXycMpdA== - -lowercase-keys@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-2.0.0.tgz#2603e78b7b4b0006cbca2fbcc8a3202558ac9479" - integrity sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA== - -lowercase-keys@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-3.0.0.tgz#c5e7d442e37ead247ae9db117a9d0a467c89d4f2" - integrity sha512-ozCC6gdQ+glXOQsveKD0YsDy8DSQFjDTz4zyzEHNV5+JP5D62LmfDZ6o1cycFx9ouG940M5dE8C8CTewdj2YWQ== - -lru-cache@^5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" - integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== - dependencies: - yallist "^3.0.2" - -lru-cache@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" - integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== - dependencies: - yallist "^4.0.0" - -lru_map@^0.3.3: - version "0.3.3" - resolved "https://registry.yarnpkg.com/lru_map/-/lru_map-0.3.3.tgz#b5c8351b9464cbd750335a79650a0ec0e56118dd" - integrity sha512-Pn9cox5CsMYngeDbmChANltQl+5pi6XmTrraMSzhPmMBbmgcxmqWry0U3PGapCU1yB4/LqCcom7qhHZiF/jGfQ== - -make-error@^1.1.1: - version "1.3.6" - resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" - integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== - -markdown-table@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/markdown-table/-/markdown-table-1.1.3.tgz#9fcb69bcfdb8717bfd0398c6ec2d93036ef8de60" - integrity sha512-1RUZVgQlpJSPWYbFSpmudq5nHY1doEIv89gBtF0s4gW1GF2XorxcA/70M5vq7rLv0a6mhOUccRsqkwhwLCIQ2Q== - -match-all@^1.2.6: - version "1.2.6" - resolved "https://registry.yarnpkg.com/match-all/-/match-all-1.2.6.tgz#66d276ad6b49655551e63d3a6ee53e8be0566f8d" - integrity sha512-0EESkXiTkWzrQQntBu2uzKvLu6vVkUGz40nGPbSZuegcfE5UuSzNjLaIu76zJWuaT/2I3Z/8M06OlUOZLGwLlQ== - -mcl-wasm@^0.7.1: - version "0.7.9" - resolved "https://registry.yarnpkg.com/mcl-wasm/-/mcl-wasm-0.7.9.tgz#c1588ce90042a8700c3b60e40efb339fc07ab87f" - integrity sha512-iJIUcQWA88IJB/5L15GnJVnSQJmf/YaxxV6zRavv83HILHaJQb6y0iFyDMdDO0gN8X37tdxmAOrH/P8B6RB8sQ== - -md5.js@^1.3.4: - version "1.3.5" - resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.5.tgz#b5d07b8e3216e3e27cd728d72f70d1e6a342005f" - integrity sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg== - dependencies: - hash-base "^3.0.0" - inherits "^2.0.1" - safe-buffer "^5.1.2" - -media-typer@0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" - integrity sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ== - -memory-level@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/memory-level/-/memory-level-1.0.0.tgz#7323c3fd368f9af2f71c3cd76ba403a17ac41692" - integrity sha512-UXzwewuWeHBz5krr7EvehKcmLFNoXxGcvuYhC41tRnkrTbJohtS7kVn9akmgirtRygg+f7Yjsfi8Uu5SGSQ4Og== - dependencies: - abstract-level "^1.0.0" - functional-red-black-tree "^1.0.1" - module-error "^1.0.1" - -memorystream@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/memorystream/-/memorystream-0.3.1.tgz#86d7090b30ce455d63fbae12dda51a47ddcaf9b2" - integrity sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw== - -merge-descriptors@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" - integrity sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w== - -merge2@^1.2.3, merge2@^1.3.0: - version "1.4.1" - resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" - integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== - -methods@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" - integrity sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w== - -micromatch@^4.0.4: - version "4.0.5" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" - integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== - dependencies: - braces "^3.0.2" - picomatch "^2.3.1" - -mime-db@1.52.0: - version "1.52.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" - integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== - -mime-types@^2.1.12, mime-types@^2.1.16, mime-types@~2.1.19, mime-types@~2.1.24, mime-types@~2.1.34: - version "2.1.35" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" - integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== - dependencies: - mime-db "1.52.0" - -mime@1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" - integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== - -mimic-response@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.1.tgz#4923538878eef42063cb8a3e3b0798781487ab1b" - integrity sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ== - -mimic-response@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-3.1.0.tgz#2d1d59af9c1b129815accc2c46a022a5ce1fa3c9" - integrity sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ== - -min-document@^2.19.0: - version "2.19.0" - resolved "https://registry.yarnpkg.com/min-document/-/min-document-2.19.0.tgz#7bd282e3f5842ed295bb748cdd9f1ffa2c824685" - integrity sha512-9Wy1B3m3f66bPPmU5hdA4DR4PB2OfDU/+GS3yAB7IQozE3tqXaVv2zOjgla7MEGSRv95+ILmOuvhLkOK6wJtCQ== - dependencies: - dom-walk "^0.1.0" - -minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" - integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== - -minimalistic-crypto-utils@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" - integrity sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg== - -"minimatch@2 || 3", minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1: - version "3.1.2" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" - integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== - dependencies: - brace-expansion "^1.1.7" - -minimatch@3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" - integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== - dependencies: - brace-expansion "^1.1.7" - -minimatch@5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.0.1.tgz#fb9022f7528125187c92bd9e9b6366be1cf3415b" - integrity sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g== - dependencies: - brace-expansion "^2.0.1" - -minimist@^1.2.0, minimist@^1.2.5, minimist@^1.2.6: - version "1.2.8" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" - integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== - -minipass@^2.6.0, minipass@^2.9.0: - version "2.9.0" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.9.0.tgz#e713762e7d3e32fed803115cf93e04bca9fcc9a6" - integrity sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg== - dependencies: - safe-buffer "^5.1.2" - yallist "^3.0.0" - -minizlib@^1.3.3: - version "1.3.3" - resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.3.3.tgz#2290de96818a34c29551c8a8d301216bd65a861d" - integrity sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q== - dependencies: - minipass "^2.9.0" - -mkdirp-promise@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/mkdirp-promise/-/mkdirp-promise-5.0.1.tgz#e9b8f68e552c68a9c1713b84883f7a1dd039b8a1" - integrity sha512-Hepn5kb1lJPtVW84RFT40YG1OddBNTOVUZR2bzQUHc+Z03en8/3uX0+060JDhcEzyO08HmipsN9DcnFMxhIL9w== - dependencies: - mkdirp "*" - -mkdirp@*: - version "3.0.1" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-3.0.1.tgz#e44e4c5607fb279c168241713cc6e0fea9adcb50" - integrity sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg== - -mkdirp@0.5.5: - version "0.5.5" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" - integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== - dependencies: - minimist "^1.2.5" - -mkdirp@0.5.x, mkdirp@^0.5.5: - version "0.5.6" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.6.tgz#7def03d2432dcae4ba1d611445c48396062255f6" - integrity sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw== - dependencies: - minimist "^1.2.6" - -mkdirp@^1.0.3, mkdirp@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" - integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== - -mnemonist@^0.38.0: - version "0.38.5" - resolved "https://registry.yarnpkg.com/mnemonist/-/mnemonist-0.38.5.tgz#4adc7f4200491237fe0fa689ac0b86539685cade" - integrity sha512-bZTFT5rrPKtPJxj8KSV0WkPyNxl72vQepqqVUAW2ARUpUSF2qXMB6jZj7hW5/k7C1rtpzqbD/IIbJwLXUjCHeg== - dependencies: - obliterator "^2.0.0" - -mocha@7.1.2: - version "7.1.2" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-7.1.2.tgz#8e40d198acf91a52ace122cd7599c9ab857b29e6" - integrity sha512-o96kdRKMKI3E8U0bjnfqW4QMk12MwZ4mhdBTf+B5a1q9+aq2HRnj+3ZdJu0B/ZhJeK78MgYuv6L8d/rA5AeBJA== - dependencies: - ansi-colors "3.2.3" - browser-stdout "1.3.1" - chokidar "3.3.0" - debug "3.2.6" - diff "3.5.0" - escape-string-regexp "1.0.5" - find-up "3.0.0" - glob "7.1.3" - growl "1.10.5" - he "1.2.0" - js-yaml "3.13.1" - log-symbols "3.0.0" - minimatch "3.0.4" - mkdirp "0.5.5" - ms "2.1.1" - node-environment-flags "1.0.6" - object.assign "4.1.0" - strip-json-comments "2.0.1" - supports-color "6.0.0" - which "1.3.1" - wide-align "1.1.3" - yargs "13.3.2" - yargs-parser "13.1.2" - yargs-unparser "1.6.0" - -mocha@^10.0.0: - version "10.2.0" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-10.2.0.tgz#1fd4a7c32ba5ac372e03a17eef435bd00e5c68b8" - integrity sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg== - dependencies: - ansi-colors "4.1.1" - browser-stdout "1.3.1" - chokidar "3.5.3" - debug "4.3.4" - diff "5.0.0" - escape-string-regexp "4.0.0" - find-up "5.0.0" - glob "7.2.0" - he "1.2.0" - js-yaml "4.1.0" - log-symbols "4.1.0" - minimatch "5.0.1" - ms "2.1.3" - nanoid "3.3.3" - serialize-javascript "6.0.0" - strip-json-comments "3.1.1" - supports-color "8.1.1" - workerpool "6.2.1" - yargs "16.2.0" - yargs-parser "20.2.4" - yargs-unparser "2.0.0" - -mocha@^7.1.1: - version "7.2.0" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-7.2.0.tgz#01cc227b00d875ab1eed03a75106689cfed5a604" - integrity sha512-O9CIypScywTVpNaRrCAgoUnJgozpIofjKUYmJhiCIJMiuYnLI6otcb1/kpW9/n/tJODHGZ7i8aLQoDVsMtOKQQ== - dependencies: - ansi-colors "3.2.3" - browser-stdout "1.3.1" - chokidar "3.3.0" - debug "3.2.6" - diff "3.5.0" - escape-string-regexp "1.0.5" - find-up "3.0.0" - glob "7.1.3" - growl "1.10.5" - he "1.2.0" - js-yaml "3.13.1" - log-symbols "3.0.0" - minimatch "3.0.4" - mkdirp "0.5.5" - ms "2.1.1" - node-environment-flags "1.0.6" - object.assign "4.1.0" - strip-json-comments "2.0.1" - supports-color "6.0.0" - which "1.3.1" - wide-align "1.1.3" - yargs "13.3.2" - yargs-parser "13.1.2" - yargs-unparser "1.6.0" - -mock-fs@^4.1.0: - version "4.14.0" - resolved "https://registry.yarnpkg.com/mock-fs/-/mock-fs-4.14.0.tgz#ce5124d2c601421255985e6e94da80a7357b1b18" - integrity sha512-qYvlv/exQ4+svI3UOvPUpLDF0OMX5euvUH0Ny4N5QyRyhNdgAgUrVH3iUINSzEPLvx0kbo/Bp28GJKIqvE7URw== - -module-error@^1.0.1, module-error@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/module-error/-/module-error-1.0.2.tgz#8d1a48897ca883f47a45816d4fb3e3c6ba404d86" - integrity sha512-0yuvsqSCv8LbaOKhnsQ/T5JhyFlCYLPXK3U2sgV10zoKQwzs/MyfuQUOZQ1V/6OCOJsK/TRgNVrPuPDqtdMFtA== - -ms@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" - integrity sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A== - -ms@2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" - integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg== - -ms@2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" - integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== - -ms@2.1.3, ms@^2.1.1: - version "2.1.3" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" - integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== - -multibase@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/multibase/-/multibase-0.7.0.tgz#1adfc1c50abe05eefeb5091ac0c2728d6b84581b" - integrity sha512-TW8q03O0f6PNFTQDvh3xxH03c8CjGaaYrjkl9UQPG6rz53TQzzxJVCIWVjzcbN/Q5Y53Zd0IBQBMVktVgNx4Fg== - dependencies: - base-x "^3.0.8" - buffer "^5.5.0" - -multibase@~0.6.0: - version "0.6.1" - resolved "https://registry.yarnpkg.com/multibase/-/multibase-0.6.1.tgz#b76df6298536cc17b9f6a6db53ec88f85f8cc12b" - integrity sha512-pFfAwyTjbbQgNc3G7D48JkJxWtoJoBMaR4xQUOuB8RnCgRqaYmWNFeJTTvrJ2w51bjLq2zTby6Rqj9TQ9elSUw== - dependencies: - base-x "^3.0.8" - buffer "^5.5.0" - -multicodec@^0.5.5: - version "0.5.7" - resolved "https://registry.yarnpkg.com/multicodec/-/multicodec-0.5.7.tgz#1fb3f9dd866a10a55d226e194abba2dcc1ee9ffd" - integrity sha512-PscoRxm3f+88fAtELwUnZxGDkduE2HD9Q6GHUOywQLjOGT/HAdhjLDYNZ1e7VR0s0TP0EwZ16LNUTFpoBGivOA== - dependencies: - varint "^5.0.0" - -multicodec@^1.0.0: - version "1.0.4" - resolved "https://registry.yarnpkg.com/multicodec/-/multicodec-1.0.4.tgz#46ac064657c40380c28367c90304d8ed175a714f" - integrity sha512-NDd7FeS3QamVtbgfvu5h7fd1IlbaC4EQ0/pgU4zqE2vdHCmBGsUa0TiM8/TdSeG6BMPC92OOCf8F1ocE/Wkrrg== - dependencies: - buffer "^5.6.0" - varint "^5.0.0" - -multihashes@^0.4.15, multihashes@~0.4.15: - version "0.4.21" - resolved "https://registry.yarnpkg.com/multihashes/-/multihashes-0.4.21.tgz#dc02d525579f334a7909ade8a122dabb58ccfcb5" - integrity sha512-uVSvmeCWf36pU2nB4/1kzYZjsXD9vofZKpgudqkceYY5g2aZZXJ5r9lxuzoRLl1OAp28XljXsEJ/X/85ZsKmKw== - dependencies: - buffer "^5.5.0" - multibase "^0.7.0" - varint "^5.0.0" - -murmur-128@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/murmur-128/-/murmur-128-0.2.1.tgz#a9f6568781d2350ecb1bf80c14968cadbeaa4b4d" - integrity sha512-WseEgiRkI6aMFBbj8Cg9yBj/y+OdipwVC7zUo3W2W1JAJITwouUOtpqsmGSg67EQmwwSyod7hsVsWY5LsrfQVg== - dependencies: - encode-utf8 "^1.0.2" - fmix "^0.1.0" - imul "^1.0.0" - -nano-base32@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/nano-base32/-/nano-base32-1.0.1.tgz#ba548c879efcfb90da1c4d9e097db4a46c9255ef" - integrity sha512-sxEtoTqAPdjWVGv71Q17koMFGsOMSiHsIFEvzOM7cNp8BXB4AnEwmDabm5dorusJf/v1z7QxaZYxUorU9RKaAw== - -nano-json-stream-parser@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/nano-json-stream-parser/-/nano-json-stream-parser-0.1.2.tgz#0cc8f6d0e2b622b479c40d499c46d64b755c6f5f" - integrity sha512-9MqxMH/BSJC7dnLsEMPyfN5Dvoo49IsPFYMcHw3Bcfc2kN0lpHRBSzlMSVx4HGyJ7s9B31CyBTVehWJoQ8Ctew== - -nanoid@3.3.3: - version "3.3.3" - resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.3.tgz#fd8e8b7aa761fe807dba2d1b98fb7241bb724a25" - integrity sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w== - -napi-macros@^2.2.2: - version "2.2.2" - resolved "https://registry.yarnpkg.com/napi-macros/-/napi-macros-2.2.2.tgz#817fef20c3e0e40a963fbf7b37d1600bd0201044" - integrity sha512-hmEVtAGYzVQpCKdbQea4skABsdXW4RUh5t5mJ2zzqowJS2OyXZTU1KhDVFhx+NlWZ4ap9mqR9TcDO3LTTttd+g== - -negotiator@0.6.3: - version "0.6.3" - resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd" - integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg== - -neo-async@^2.6.0: - version "2.6.2" - resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" - integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== - -next-tick@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.1.0.tgz#1836ee30ad56d67ef281b22bd199f709449b35eb" - integrity sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ== - -no-case@^2.2.0, no-case@^2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/no-case/-/no-case-2.3.2.tgz#60b813396be39b3f1288a4c1ed5d1e7d28b464ac" - integrity sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ== - dependencies: - lower-case "^1.1.1" - -node-addon-api@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-2.0.2.tgz#432cfa82962ce494b132e9d72a15b29f71ff5d32" - integrity sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA== - -node-emoji@^1.10.0: - version "1.11.0" - resolved "https://registry.yarnpkg.com/node-emoji/-/node-emoji-1.11.0.tgz#69a0150e6946e2f115e9d7ea4df7971e2628301c" - integrity sha512-wo2DpQkQp7Sjm2A0cq+sN7EHKO6Sl0ctXeBdFZrL9T9+UywORbufTcTZxom8YqpLQt/FqNMUkOpkZrJVYSKD3A== - dependencies: - lodash "^4.17.21" - -node-environment-flags@1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/node-environment-flags/-/node-environment-flags-1.0.6.tgz#a30ac13621f6f7d674260a54dede048c3982c088" - integrity sha512-5Evy2epuL+6TM0lCQGpFIj6KwiEsGh1SrHUhTbNX+sLbBtjidPZFAnVK9y5yU1+h//RitLbRHTIMyxQPtxMdHw== - dependencies: - object.getownpropertydescriptors "^2.0.3" - semver "^5.7.0" - -node-fetch@2.6.7: - version "2.6.7" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad" - integrity sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ== - dependencies: - whatwg-url "^5.0.0" - -node-gyp-build@^4.2.0, node-gyp-build@^4.3.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.6.0.tgz#0c52e4cbf54bbd28b709820ef7b6a3c2d6209055" - integrity sha512-NTZVKn9IylLwUzaKjkas1e4u2DLNcV4rdYagA4PWdPwW87Bi7z+BznyKSRwS/761tV/lzCGXplWsiaMjLqP2zQ== - -nofilter@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/nofilter/-/nofilter-1.0.4.tgz#78d6f4b6a613e7ced8b015cec534625f7667006e" - integrity sha512-N8lidFp+fCz+TD51+haYdbDGrcBWwuHX40F5+z0qkUjMJ5Tp+rdSuAkMJ9N9eoolDlEVTf6u5icM+cNKkKW2mA== - -nofilter@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/nofilter/-/nofilter-3.1.0.tgz#c757ba68801d41ff930ba2ec55bab52ca184aa66" - integrity sha512-l2NNj07e9afPnhAhvgVrCD/oy2Ai1yfLpuo3EpiO1jFTsB4sFz6oIfAfSZyQzVpkZQ9xS8ZS5g1jCBgq4Hwo0g== - -nopt@3.x: - version "3.0.6" - resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9" - integrity sha512-4GUt3kSEYmk4ITxzB/b9vaIDfUVWN/Ml1Fwl11IlnIG2iaJ9O6WXZ9SrYM9NLI8OCBieN2Y8SWC2oJV0RQ7qYg== - dependencies: - abbrev "1" - -normalize-package-data@^2.3.2: - version "2.5.0" - resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" - integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA== - dependencies: - hosted-git-info "^2.1.4" - resolve "^1.10.0" - semver "2 || 3 || 4 || 5" - validate-npm-package-license "^3.0.1" - -normalize-path@^3.0.0, normalize-path@~3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" - integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== - -normalize-url@^6.0.1: - version "6.1.0" - resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-6.1.0.tgz#40d0885b535deffe3f3147bec877d05fe4c5668a" - integrity sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A== - -nth-check@^2.0.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-2.1.1.tgz#c9eab428effce36cd6b92c924bdb000ef1f1ed1d" - integrity sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w== - dependencies: - boolbase "^1.0.0" - -number-is-nan@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" - integrity sha512-4jbtZXNAsfZbAHiiqjLPBiCl16dES1zI4Hpzzxw61Tk+loF+sBDBKx1ICKKKwIqQ7M0mFn1TmkN7euSncWgHiQ== - -number-to-bn@1.7.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/number-to-bn/-/number-to-bn-1.7.0.tgz#bb3623592f7e5f9e0030b1977bd41a0c53fe1ea0" - integrity sha512-wsJ9gfSz1/s4ZsJN01lyonwuxA1tml6X1yBDnfpMglypcBRFZZkus26EdPSlqS5GJfYddVZa22p3VNb3z5m5Ig== - dependencies: - bn.js "4.11.6" - strip-hex-prefix "1.0.0" - -oauth-sign@~0.9.0: - version "0.9.0" - resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" - integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== - -object-assign@^4, object-assign@^4.1.0, object-assign@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" - integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== - -object-inspect@^1.12.3, object-inspect@^1.9.0: - version "1.12.3" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.3.tgz#ba62dffd67ee256c8c086dfae69e016cd1f198b9" - integrity sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g== - -object-keys@^1.0.11, object-keys@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" - integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== - -object.assign@4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.0.tgz#968bf1100d7956bb3ca086f006f846b3bc4008da" - integrity sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w== - dependencies: - define-properties "^1.1.2" - function-bind "^1.1.1" - has-symbols "^1.0.0" - object-keys "^1.0.11" - -object.assign@^4.1.4: - version "4.1.4" - resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.4.tgz#9673c7c7c351ab8c4d0b516f4343ebf4dfb7799f" - integrity sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - has-symbols "^1.0.3" - object-keys "^1.1.1" - -object.getownpropertydescriptors@^2.0.3: - version "2.1.6" - resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.6.tgz#5e5c384dd209fa4efffead39e3a0512770ccc312" - integrity sha512-lq+61g26E/BgHv0ZTFgRvi7NMEPuAxLkFU7rukXjc/AlwH4Am5xXVnIXy3un1bg/JPbXHrixRkK1itUzzPiIjQ== - dependencies: - array.prototype.reduce "^1.0.5" - call-bind "^1.0.2" - define-properties "^1.2.0" - es-abstract "^1.21.2" - safe-array-concat "^1.0.0" - -obliterator@^2.0.0: - version "2.0.4" - resolved "https://registry.yarnpkg.com/obliterator/-/obliterator-2.0.4.tgz#fa650e019b2d075d745e44f1effeb13a2adbe816" - integrity sha512-lgHwxlxV1qIg1Eap7LgIeoBWIMFibOjbrYPIPJZcI1mmGAI2m3lNYpK12Y+GBdPQ0U1hRwSord7GIaawz962qQ== - -oboe@2.1.5: - version "2.1.5" - resolved "https://registry.yarnpkg.com/oboe/-/oboe-2.1.5.tgz#5554284c543a2266d7a38f17e073821fbde393cd" - integrity sha512-zRFWiF+FoicxEs3jNI/WYUrVEgA7DeET/InK0XQuudGHRg8iIob3cNPrJTKaz4004uaA9Pbe+Dwa8iluhjLZWA== - dependencies: - http-https "^1.0.0" - -on-finished@2.4.1: - version "2.4.1" - resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.4.1.tgz#58c8c44116e54845ad57f14ab10b03533184ac3f" - integrity sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg== - dependencies: - ee-first "1.1.1" - -once@1.x, once@^1.3.0, once@^1.3.1, once@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" - integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== - dependencies: - wrappy "1" - -optionator@^0.8.1: - version "0.8.3" - resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" - integrity sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA== - dependencies: - deep-is "~0.1.3" - fast-levenshtein "~2.0.6" - levn "~0.3.0" - prelude-ls "~1.1.2" - type-check "~0.3.2" - word-wrap "~1.2.3" - -ordinal@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/ordinal/-/ordinal-1.0.3.tgz#1a3c7726a61728112f50944ad7c35c06ae3a0d4d" - integrity sha512-cMddMgb2QElm8G7vdaa02jhUNbTSrhsgAGUz1OokD83uJTwSUn+nKoNoKVVaRa08yF6sgfO7Maou1+bgLd9rdQ== - -os-locale@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-1.4.0.tgz#20f9f17ae29ed345e8bde583b13d2009803c14d9" - integrity sha512-PRT7ZORmwu2MEFt4/fv3Q+mEfN4zetKxufQrkShY2oGvUms9r8otu5HfdyIFHkYXjO7laNsoVGmM2MANfuTA8g== - dependencies: - lcid "^1.0.0" - -os-tmpdir@~1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" - integrity sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g== - -p-cancelable@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-2.1.1.tgz#aab7fbd416582fa32a3db49859c122487c5ed2cf" - integrity sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg== - -p-cancelable@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-3.0.0.tgz#63826694b54d61ca1c20ebcb6d3ecf5e14cd8050" - integrity sha512-mlVgR3PGuzlo0MmTdk4cXqXWlwQDLnONTAg6sm62XkMJEiRxN3GL3SffkYvqwonbkJBcrI7Uvv5Zh9yjvn2iUw== - -p-limit@^1.1.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" - integrity sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q== - dependencies: - p-try "^1.0.0" - -p-limit@^2.0.0, p-limit@^2.2.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" - integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== - dependencies: - p-try "^2.0.0" - -p-limit@^3.0.2: - version "3.1.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" - integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== - dependencies: - yocto-queue "^0.1.0" - -p-locate@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" - integrity sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg== - dependencies: - p-limit "^1.1.0" - -p-locate@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" - integrity sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ== - dependencies: - p-limit "^2.0.0" - -p-locate@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" - integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== - dependencies: - p-limit "^2.2.0" - -p-locate@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" - integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== - dependencies: - p-limit "^3.0.2" - -p-map@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/p-map/-/p-map-4.0.0.tgz#bb2f95a5eda2ec168ec9274e06a747c3e2904d2b" - integrity sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ== - dependencies: - aggregate-error "^3.0.0" - -p-try@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" - integrity sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww== - -p-try@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" - integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== - -param-case@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/param-case/-/param-case-2.1.1.tgz#df94fd8cf6531ecf75e6bef9a0858fbc72be2247" - integrity sha512-eQE845L6ot89sk2N8liD8HAuH4ca6Vvr7VWAWwt7+kvvG5aBcPmmphQ68JsEG2qa9n1TykS2DLeMt363AAH8/w== - dependencies: - no-case "^2.2.0" - -parse-cache-control@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/parse-cache-control/-/parse-cache-control-1.0.1.tgz#8eeab3e54fa56920fe16ba38f77fa21aacc2d74e" - integrity sha512-60zvsJReQPX5/QP0Kzfd/VrpjScIQ7SHBW6bFCYfEP+fp0Eppr1SHhIO5nd1PjZtvclzSzES9D/p5nFJurwfWg== - -parse-headers@^2.0.0: - version "2.0.5" - resolved "https://registry.yarnpkg.com/parse-headers/-/parse-headers-2.0.5.tgz#069793f9356a54008571eb7f9761153e6c770da9" - integrity sha512-ft3iAoLOB/MlwbNXgzy43SWGP6sQki2jQvAyBg/zDFAgr9bfNWZIUj42Kw2eJIl8kEi4PbgE6U1Zau/HwI75HA== - -parse-json@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" - integrity sha512-QR/GGaKCkhwk1ePQNYDRKYZ3mwU9ypsKhB0XyFnLQdomyEqk3e8wpW3V5Jp88zbxK4n5ST1nqo+g9juTpownhQ== - dependencies: - error-ex "^1.2.0" - -parse5-htmlparser2-tree-adapter@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-7.0.0.tgz#23c2cc233bcf09bb7beba8b8a69d46b08c62c2f1" - integrity sha512-B77tOZrqqfUfnVcOrUvfdLbz4pu4RopLD/4vmu3HUPswwTA8OH0EMW9BlWR2B0RCoiZRAHEUu7IxeP1Pd1UU+g== - dependencies: - domhandler "^5.0.2" - parse5 "^7.0.0" - -parse5@^7.0.0: - version "7.1.2" - resolved "https://registry.yarnpkg.com/parse5/-/parse5-7.1.2.tgz#0736bebbfd77793823240a23b7fc5e010b7f8e32" - integrity sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw== - dependencies: - entities "^4.4.0" - -parseurl@~1.3.3: - version "1.3.3" - resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" - integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== - -pascal-case@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/pascal-case/-/pascal-case-2.0.1.tgz#2d578d3455f660da65eca18ef95b4e0de912761e" - integrity sha512-qjS4s8rBOJa2Xm0jmxXiyh1+OFf6ekCWOvUaRgAQSktzlTbMotS0nmG9gyYAybCWBcuP4fsBeRCKNwGBnMe2OQ== - dependencies: - camel-case "^3.0.0" - upper-case-first "^1.1.0" - -path-case@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/path-case/-/path-case-2.1.1.tgz#94b8037c372d3fe2906e465bb45e25d226e8eea5" - integrity sha512-Ou0N05MioItesaLr9q8TtHVWmJ6fxWdqKB2RohFmNWVyJ+2zeKIeDNWAN6B/Pe7wpzWChhZX6nONYmOnMeJQ/Q== - dependencies: - no-case "^2.2.0" - -path-exists@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" - integrity sha512-yTltuKuhtNeFJKa1PiRzfLAU5182q1y4Eb4XCJ3PBqyzEDkAZRzBrKKBct682ls9reBVHf9udYLN5Nd+K1B9BQ== - dependencies: - pinkie-promise "^2.0.0" - -path-exists@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" - integrity sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ== - -path-exists@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" - integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== - -path-is-absolute@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" - integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== - -path-parse@^1.0.6, path-parse@^1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" - integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== - -path-to-regexp@0.1.7: - version "0.1.7" - resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" - integrity sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ== - -path-type@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" - integrity sha512-S4eENJz1pkiQn9Znv33Q+deTOKmbl+jj1Fl+qiP/vYezj+S8x+J3Uo0ISrx/QoEvIlOaDWJhPaRd1flJ9HXZqg== - dependencies: - graceful-fs "^4.1.2" - pify "^2.0.0" - pinkie-promise "^2.0.0" - -path-type@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" - integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== - -pathval@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.1.tgz#8534e77a77ce7ac5a2512ea21e0fdb8fcf6c3d8d" - integrity sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ== - -pbkdf2@^3.0.17: - version "3.1.2" - resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.1.2.tgz#dd822aa0887580e52f1a039dc3eda108efae3075" - integrity sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA== - dependencies: - create-hash "^1.1.2" - create-hmac "^1.1.4" - ripemd160 "^2.0.1" - safe-buffer "^5.0.1" - sha.js "^2.4.8" - -performance-now@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" - integrity sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow== - -picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.3.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" - integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== - -pify@^2.0.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" - integrity sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog== - -pify@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231" - integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g== - -pinkie-promise@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" - integrity sha512-0Gni6D4UcLTbv9c57DfxDGdr41XfgUjqWZu492f0cIGr16zDU06BWP/RAEvOuo7CQ0CNjHaLlM59YJJFm3NWlw== - dependencies: - pinkie "^2.0.0" - -pinkie@^2.0.0: - version "2.0.4" - resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" - integrity sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg== - -prelude-ls@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" - integrity sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w== - -prettier@^2.3.1: - version "2.8.8" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.8.tgz#e8c5d7e98a4305ffe3de2e1fc4aca1a71c28b1da" - integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q== - -process-nextick-args@~2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" - integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== - -process@^0.11.10: - version "0.11.10" - resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" - integrity sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A== - -promise@^8.0.0: - version "8.3.0" - resolved "https://registry.yarnpkg.com/promise/-/promise-8.3.0.tgz#8cb333d1edeb61ef23869fbb8a4ea0279ab60e0a" - integrity sha512-rZPNPKTOYVNEEKFaq1HqTgOwZD+4/YHS5ukLzQCypkj+OkYx7iv0mA91lJlpPPZ8vMau3IIGj5Qlwrx+8iiSmg== - dependencies: - asap "~2.0.6" - -proper-lockfile@^4.1.1: - version "4.1.2" - resolved "https://registry.yarnpkg.com/proper-lockfile/-/proper-lockfile-4.1.2.tgz#c8b9de2af6b2f1601067f98e01ac66baa223141f" - integrity sha512-TjNPblN4BwAWMXU8s9AEz4JmQxnD1NNL7bNOY/AKUzyamc379FWASUhc/K1pL2noVb+XmZKLL68cjzLsiOAMaA== - dependencies: - graceful-fs "^4.2.4" - retry "^0.12.0" - signal-exit "^3.0.2" - -proxy-addr@~2.0.7: - version "2.0.7" - resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.7.tgz#f19fe69ceab311eeb94b42e70e8c2070f9ba1025" - integrity sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg== - dependencies: - forwarded "0.2.0" - ipaddr.js "1.9.1" - -psl@^1.1.28: - version "1.9.0" - resolved "https://registry.yarnpkg.com/psl/-/psl-1.9.0.tgz#d0df2a137f00794565fcaf3b2c00cd09f8d5a5a7" - integrity sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag== - -pump@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" - integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww== - dependencies: - end-of-stream "^1.1.0" - once "^1.3.1" - -punycode@2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.0.tgz#5f863edc89b96db09074bad7947bf09056ca4e7d" - integrity sha512-Yxz2kRwT90aPiWEMHVYnEf4+rhwF1tBmmZ4KepCP+Wkium9JxtWnUm1nqGwpiAHr/tnTSeHqr3wb++jgSkXjhA== - -punycode@^2.1.0, punycode@^2.1.1: - version "2.3.0" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.0.tgz#f67fa67c94da8f4d0cfff981aee4118064199b8f" - integrity sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA== - -pure-rand@^5.0.1: - version "5.0.5" - resolved "https://registry.yarnpkg.com/pure-rand/-/pure-rand-5.0.5.tgz#bda2a7f6a1fc0f284d78d78ca5902f26f2ad35cf" - integrity sha512-BwQpbqxSCBJVpamI6ydzcKqyFmnd5msMWUGvzXLm1aXvusbbgkbOto/EUPM00hjveJEaJtdbhUjKSzWRhQVkaw== - -qs@6.11.0: - version "6.11.0" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.0.tgz#fd0d963446f7a65e1367e01abd85429453f0c37a" - integrity sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q== - dependencies: - side-channel "^1.0.4" - -qs@^6.4.0, qs@^6.7.0: - version "6.11.1" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.1.tgz#6c29dff97f0c0060765911ba65cbc9764186109f" - integrity sha512-0wsrzgTz/kAVIeuxSjnpGC56rzYtr6JT/2BwEvMaPhFIoYa1aGO8LbzuU1R0uUYQkLpWBTOj0l/CLAJB64J6nQ== - dependencies: - side-channel "^1.0.4" - -qs@^6.9.4: - version "6.11.2" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.2.tgz#64bea51f12c1f5da1bc01496f48ffcff7c69d7d9" - integrity sha512-tDNIz22aBzCDxLtVH++VnTfzxlfeK5CbqohpSqpJgj1Wg/cQbStNAz3NuqCs5vV+pjBsK4x4pN9HlVh7rcYRiA== - dependencies: - side-channel "^1.0.4" - -qs@~6.5.2: - version "6.5.3" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.3.tgz#3aeeffc91967ef6e35c0e488ef46fb296ab76aad" - integrity sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA== - -query-string@^5.0.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/query-string/-/query-string-5.1.1.tgz#a78c012b71c17e05f2e3fa2319dd330682efb3cb" - integrity sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw== - dependencies: - decode-uri-component "^0.2.0" - object-assign "^4.1.0" - strict-uri-encode "^1.0.0" - -queue-microtask@^1.2.2, queue-microtask@^1.2.3: - version "1.2.3" - resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" - integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== - -quick-lru@^5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-5.1.1.tgz#366493e6b3e42a3a6885e2e99d18f80fb7a8c932" - integrity sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA== - -randombytes@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" - integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== - dependencies: - safe-buffer "^5.1.0" - -range-parser@~1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" - integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== - -raw-body@2.5.1: - version "2.5.1" - resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.5.1.tgz#fe1b1628b181b700215e5fd42389f98b71392857" - integrity sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig== - dependencies: - bytes "3.1.2" - http-errors "2.0.0" - iconv-lite "0.4.24" - unpipe "1.0.0" - -raw-body@2.5.2, raw-body@^2.4.1: - version "2.5.2" - resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.5.2.tgz#99febd83b90e08975087e8f1f9419a149366b68a" - integrity sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA== - dependencies: - bytes "3.1.2" - http-errors "2.0.0" - iconv-lite "0.4.24" - unpipe "1.0.0" - -read-pkg-up@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" - integrity sha512-WD9MTlNtI55IwYUS27iHh9tK3YoIVhxis8yKhLpTqWtml739uXc9NWTpxoHkfZf3+DkCCsXox94/VWZniuZm6A== - dependencies: - find-up "^1.0.0" - read-pkg "^1.0.0" - -read-pkg@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" - integrity sha512-7BGwRHqt4s/uVbuyoeejRn4YmFnYZiFl4AuaeXHlgZf3sONF0SOGlxs2Pw8g6hCKupo08RafIO5YXFNOKTfwsQ== - dependencies: - load-json-file "^1.0.0" - normalize-package-data "^2.3.2" - path-type "^1.0.0" - -readable-stream@^2.2.2: - version "2.3.8" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.8.tgz#91125e8042bba1b9887f49345f6277027ce8be9b" - integrity sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA== - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.3" - isarray "~1.0.0" - process-nextick-args "~2.0.0" - safe-buffer "~5.1.1" - string_decoder "~1.1.1" - util-deprecate "~1.0.1" - -readable-stream@^3.6.0: - version "3.6.2" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.2.tgz#56a9b36ea965c00c5a93ef31eb111a0f11056967" - integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== - dependencies: - inherits "^2.0.3" - string_decoder "^1.1.1" - util-deprecate "^1.0.1" - -readdirp@~3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.2.0.tgz#c30c33352b12c96dfb4b895421a49fd5a9593839" - integrity sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ== - dependencies: - picomatch "^2.0.4" - -readdirp@~3.6.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" - integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== - dependencies: - picomatch "^2.2.1" - -rechoir@^0.6.2: - version "0.6.2" - resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" - integrity sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw== - dependencies: - resolve "^1.1.6" - -recursive-readdir@^2.2.2: - version "2.2.3" - resolved "https://registry.yarnpkg.com/recursive-readdir/-/recursive-readdir-2.2.3.tgz#e726f328c0d69153bcabd5c322d3195252379372" - integrity sha512-8HrF5ZsXk5FAH9dgsx3BlUer73nIhuj+9OrQwEbLTPOBzGkL1lsFCR01am+v+0m2Cmbs1nP12hLDl5FA7EszKA== - dependencies: - minimatch "^3.0.5" - -reduce-flatten@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/reduce-flatten/-/reduce-flatten-2.0.0.tgz#734fd84e65f375d7ca4465c69798c25c9d10ae27" - integrity sha512-EJ4UNY/U1t2P/2k6oqotuX2Cc3T6nxJwsM0N0asT7dhrtH1ltUxDn4NalSYmPE2rCkVpcf/X6R0wDwcFpzhd4w== - -regenerator-runtime@^0.13.11: - version "0.13.11" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz#f6dca3e7ceec20590d07ada785636a90cdca17f9" - integrity sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg== - -regexp.prototype.flags@^1.4.3: - version "1.5.0" - resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.0.tgz#fe7ce25e7e4cca8db37b6634c8a2c7009199b9cb" - integrity sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA== - dependencies: - call-bind "^1.0.2" - define-properties "^1.2.0" - functions-have-names "^1.2.3" - -req-cwd@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/req-cwd/-/req-cwd-2.0.0.tgz#d4082b4d44598036640fb73ddea01ed53db49ebc" - integrity sha512-ueoIoLo1OfB6b05COxAA9UpeoscNpYyM+BqYlA7H6LVF4hKGPXQQSSaD2YmvDVJMkk4UDpAHIeU1zG53IqjvlQ== - dependencies: - req-from "^2.0.0" - -req-from@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/req-from/-/req-from-2.0.0.tgz#d74188e47f93796f4aa71df6ee35ae689f3e0e70" - integrity sha512-LzTfEVDVQHBRfjOUMgNBA+V6DWsSnoeKzf42J7l0xa/B4jyPOuuF5MlNSmomLNGemWTnV2TIdjSSLnEn95fOQA== - dependencies: - resolve-from "^3.0.0" - -request-promise-core@1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/request-promise-core/-/request-promise-core-1.1.4.tgz#3eedd4223208d419867b78ce815167d10593a22f" - integrity sha512-TTbAfBBRdWD7aNNOoVOBH4pN/KigV6LyapYNNlAPA8JwbovRti1E88m3sYAwsLi5ryhPKsE9APwnjFTgdUjTpw== - dependencies: - lodash "^4.17.19" - -request-promise-native@^1.0.5: - version "1.0.9" - resolved "https://registry.yarnpkg.com/request-promise-native/-/request-promise-native-1.0.9.tgz#e407120526a5efdc9a39b28a5679bf47b9d9dc28" - integrity sha512-wcW+sIUiWnKgNY0dqCpOZkUbF/I+YPi+f09JZIDa39Ec+q82CpSYniDp+ISgTTbKmnpJWASeJBPZmoxH84wt3g== - dependencies: - request-promise-core "1.1.4" - stealthy-require "^1.1.1" - tough-cookie "^2.3.3" - -request@^2.79.0, request@^2.88.0: - version "2.88.2" - resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3" - integrity sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw== - dependencies: - aws-sign2 "~0.7.0" - aws4 "^1.8.0" - caseless "~0.12.0" - combined-stream "~1.0.6" - extend "~3.0.2" - forever-agent "~0.6.1" - form-data "~2.3.2" - har-validator "~5.1.3" - http-signature "~1.2.0" - is-typedarray "~1.0.0" - isstream "~0.1.2" - json-stringify-safe "~5.0.1" - mime-types "~2.1.19" - oauth-sign "~0.9.0" - performance-now "^2.1.0" - qs "~6.5.2" - safe-buffer "^5.1.2" - tough-cookie "~2.5.0" - tunnel-agent "^0.6.0" - uuid "^3.3.2" - -require-directory@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" - integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== - -require-from-string@^1.1.0: - version "1.2.1" - resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-1.2.1.tgz#529c9ccef27380adfec9a2f965b649bbee636418" - integrity sha512-H7AkJWMobeskkttHyhTVtS0fxpFLjxhbfMa6Bk3wimP7sdPRGL3EyCg3sAQenFfAe+xQ+oAc85Nmtvq0ROM83Q== - -require-from-string@^2.0.0, require-from-string@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" - integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== - -require-main-filename@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" - integrity sha512-IqSUtOVP4ksd1C/ej5zeEh/BIP2ajqpn8c5x+q99gvcIG/Qf0cud5raVnE/Dwd0ua9TXYDoDc0RE5hBSdz22Ug== - -require-main-filename@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" - integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== - -resolve-alpn@^1.0.0, resolve-alpn@^1.2.0: - version "1.2.1" - resolved "https://registry.yarnpkg.com/resolve-alpn/-/resolve-alpn-1.2.1.tgz#b7adbdac3546aaaec20b45e7d8265927072726f9" - integrity sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g== - -resolve-from@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" - integrity sha512-GnlH6vxLymXJNMBo7XP1fJIzBFbdYt49CuTwmB/6N53t+kMPRMFKz783LlQ4tv28XoQfMWinAJX6WCGf2IlaIw== - -resolve@1.1.x: - version "1.1.7" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" - integrity sha512-9znBF0vBcaSN3W2j7wKvdERPwqTxSpCq+if5C0WoTCyV9n24rua28jeuQ2pL/HOf+yUe/Mef+H/5p60K0Id3bg== - -resolve@1.17.0: - version "1.17.0" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.17.0.tgz#b25941b54968231cc2d1bb76a79cb7f2c0bf8444" - integrity sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w== - dependencies: - path-parse "^1.0.6" - -resolve@^1.1.6, resolve@^1.10.0: - version "1.22.2" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.2.tgz#0ed0943d4e301867955766c9f3e1ae6d01c6845f" - integrity sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g== - dependencies: - is-core-module "^2.11.0" - path-parse "^1.0.7" - supports-preserve-symlinks-flag "^1.0.0" - -responselike@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/responselike/-/responselike-2.0.1.tgz#9a0bc8fdc252f3fb1cca68b016591059ba1422bc" - integrity sha512-4gl03wn3hj1HP3yzgdI7d3lCkF95F21Pz4BPGvKHinyQzALR5CapwC8yIi0Rh58DEMQ/SguC03wFj2k0M/mHhw== - dependencies: - lowercase-keys "^2.0.0" - -retry@^0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/retry/-/retry-0.12.0.tgz#1b42a6266a21f07421d1b0b54b7dc167b01c013b" - integrity sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow== - -reusify@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" - integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== - -rimraf@^2.2.8: - version "2.7.1" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" - integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== - dependencies: - glob "^7.1.3" - -ripemd160-min@0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/ripemd160-min/-/ripemd160-min-0.0.6.tgz#a904b77658114474d02503e819dcc55853b67e62" - integrity sha512-+GcJgQivhs6S9qvLogusiTcS9kQUfgR75whKuy5jIhuiOfQuJ8fjqxV6EGD5duH1Y/FawFUMtMhyeq3Fbnib8A== - -ripemd160@^2.0.0, ripemd160@^2.0.1, ripemd160@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c" - integrity sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA== - dependencies: - hash-base "^3.0.0" - inherits "^2.0.1" - -rlp@^2.2.3, rlp@^2.2.4: - version "2.2.7" - resolved "https://registry.yarnpkg.com/rlp/-/rlp-2.2.7.tgz#33f31c4afac81124ac4b283e2bd4d9720b30beaf" - integrity sha512-d5gdPmgQ0Z+AklL2NVXr/IoSjNZFfTVvQWzL/AM2AOcSzYP2xjlb0AC8YyCLc41MSNf6P6QVtjgPdmVtzb+4lQ== - dependencies: - bn.js "^5.2.0" - -run-parallel-limit@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/run-parallel-limit/-/run-parallel-limit-1.1.0.tgz#be80e936f5768623a38a963262d6bef8ff11e7ba" - integrity sha512-jJA7irRNM91jaKc3Hcl1npHsFLOXOoTkPCUL1JEa1R82O2miplXXRaGdjW/KM/98YQWDhJLiSs793CnXfblJUw== - dependencies: - queue-microtask "^1.2.2" - -run-parallel@^1.1.9: - version "1.2.0" - resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" - integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== - dependencies: - queue-microtask "^1.2.2" - -rustbn.js@~0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/rustbn.js/-/rustbn.js-0.2.0.tgz#8082cb886e707155fd1cb6f23bd591ab8d55d0ca" - integrity sha512-4VlvkRUuCJvr2J6Y0ImW7NvTCriMi7ErOAqWk1y69vAdoNIzCF3yPmgeNzx+RQTLEDFq5sHfscn1MwHxP9hNfA== - -safe-array-concat@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/safe-array-concat/-/safe-array-concat-1.0.0.tgz#2064223cba3c08d2ee05148eedbc563cd6d84060" - integrity sha512-9dVEFruWIsnie89yym+xWTAYASdpw3CJV7Li/6zBewGf9z2i1j31rP6jnY0pHEO4QZh6N0K11bFjWmdR8UGdPQ== - dependencies: - call-bind "^1.0.2" - get-intrinsic "^1.2.0" - has-symbols "^1.0.3" - isarray "^2.0.5" - -safe-buffer@5.2.1, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@^5.2.1, safe-buffer@~5.2.0: - version "5.2.1" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" - integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== - -safe-buffer@~5.1.0, safe-buffer@~5.1.1: - version "5.1.2" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" - integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== - -safe-regex-test@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/safe-regex-test/-/safe-regex-test-1.0.0.tgz#793b874d524eb3640d1873aad03596db2d4f2295" - integrity sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA== - dependencies: - call-bind "^1.0.2" - get-intrinsic "^1.1.3" - is-regex "^1.1.4" - -"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: - version "2.1.2" - resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" - integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== - -sc-istanbul@^0.4.5: - version "0.4.6" - resolved "https://registry.yarnpkg.com/sc-istanbul/-/sc-istanbul-0.4.6.tgz#cf6784355ff2076f92d70d59047d71c13703e839" - integrity sha512-qJFF/8tW/zJsbyfh/iT/ZM5QNHE3CXxtLJbZsL+CzdJLBsPD7SedJZoUA4d8iAcN2IoMp/Dx80shOOd2x96X/g== - dependencies: - abbrev "1.0.x" - async "1.x" - escodegen "1.8.x" - esprima "2.7.x" - glob "^5.0.15" - handlebars "^4.0.1" - js-yaml "3.x" - mkdirp "0.5.x" - nopt "3.x" - once "1.x" - resolve "1.1.x" - supports-color "^3.1.0" - which "^1.1.1" - wordwrap "^1.0.0" - -scrypt-js@2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/scrypt-js/-/scrypt-js-2.0.4.tgz#32f8c5149f0797672e551c07e230f834b6af5f16" - integrity sha512-4KsaGcPnuhtCZQCxFxN3GVYIhKFPTdLd8PLC552XwbMndtD0cjRFAhDuuydXQ0h08ZfPgzqe6EKHozpuH74iDw== - -scrypt-js@3.0.1, scrypt-js@^3.0.0, scrypt-js@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/scrypt-js/-/scrypt-js-3.0.1.tgz#d314a57c2aef69d1ad98a138a21fe9eafa9ee312" - integrity sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA== - -secp256k1@^4.0.1: - version "4.0.3" - resolved "https://registry.yarnpkg.com/secp256k1/-/secp256k1-4.0.3.tgz#c4559ecd1b8d3c1827ed2d1b94190d69ce267303" - integrity sha512-NLZVf+ROMxwtEj3Xa562qgv2BK5e2WNmXPiOdVIPLgs6lyTzMvBq0aWTYMI5XCP9jZMVKOcqZLw/Wc4vDkuxhA== - dependencies: - elliptic "^6.5.4" - node-addon-api "^2.0.0" - node-gyp-build "^4.2.0" - -"semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.5.0, semver@^5.6.0, semver@^5.7.0: - version "5.7.1" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" - integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== - -semver@7.3.7: - version "7.3.7" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.7.tgz#12c5b649afdbf9049707796e22a4028814ce523f" - integrity sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g== - dependencies: - lru-cache "^6.0.0" - -semver@^6.3.0: - version "6.3.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" - integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== - -semver@^7.3.4: - version "7.5.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.0.tgz#ed8c5dc8efb6c629c88b23d41dc9bf40c1d96cd0" - integrity sha512-+XC0AD/R7Q2mPSRuy2Id0+CGTZ98+8f+KvwirxOKIEyid+XSx6HbC63p+O4IndTHuX5Z+JxQ0TghCkO5Cg/2HA== - dependencies: - lru-cache "^6.0.0" - -send@0.18.0: - version "0.18.0" - resolved "https://registry.yarnpkg.com/send/-/send-0.18.0.tgz#670167cc654b05f5aa4a767f9113bb371bc706be" - integrity sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg== - dependencies: - debug "2.6.9" - depd "2.0.0" - destroy "1.2.0" - encodeurl "~1.0.2" - escape-html "~1.0.3" - etag "~1.8.1" - fresh "0.5.2" - http-errors "2.0.0" - mime "1.6.0" - ms "2.1.3" - on-finished "2.4.1" - range-parser "~1.2.1" - statuses "2.0.1" - -sentence-case@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/sentence-case/-/sentence-case-2.1.1.tgz#1f6e2dda39c168bf92d13f86d4a918933f667ed4" - integrity sha512-ENl7cYHaK/Ktwk5OTD+aDbQ3uC8IByu/6Bkg+HDv8Mm+XnBnppVNalcfJTNsp1ibstKh030/JKQQWglDvtKwEQ== - dependencies: - no-case "^2.2.0" - upper-case-first "^1.1.2" - -serialize-javascript@6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.0.tgz#efae5d88f45d7924141da8b5c3a7a7e663fefeb8" - integrity sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag== - dependencies: - randombytes "^2.1.0" - -serve-static@1.15.0: - version "1.15.0" - resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.15.0.tgz#faaef08cffe0a1a62f60cad0c4e513cff0ac9540" - integrity sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g== - dependencies: - encodeurl "~1.0.2" - escape-html "~1.0.3" - parseurl "~1.3.3" - send "0.18.0" - -servify@^0.1.12: - version "0.1.12" - resolved "https://registry.yarnpkg.com/servify/-/servify-0.1.12.tgz#142ab7bee1f1d033b66d0707086085b17c06db95" - integrity sha512-/xE6GvsKKqyo1BAY+KxOWXcLpPsUUyji7Qg3bVD7hh1eRze5bR1uYiuDA/k3Gof1s9BTzQZEJK8sNcNGFIzeWw== - dependencies: - body-parser "^1.16.0" - cors "^2.8.1" - express "^4.14.0" - request "^2.79.0" - xhr "^2.3.3" - -set-blocking@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" - integrity sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw== - -setimmediate@1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.4.tgz#20e81de622d4a02588ce0c8da8973cbcf1d3138f" - integrity sha512-/TjEmXQVEzdod/FFskf3o7oOAsGhHf2j1dZqRFbDzq4F3mvvxflIIi4Hd3bLQE9y/CpwqfSQam5JakI/mi3Pog== - -setimmediate@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" - integrity sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA== - -setprototypeof@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424" - integrity sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw== - -sha.js@^2.4.0, sha.js@^2.4.8: - version "2.4.11" - resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7" - integrity sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ== - dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" - -sha1@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/sha1/-/sha1-1.1.1.tgz#addaa7a93168f393f19eb2b15091618e2700f848" - integrity sha512-dZBS6OrMjtgVkopB1Gmo4RQCDKiZsqcpAQpkV/aaj+FCrCg8r4I4qMkDPQjBgLIxlmu9k4nUbWq6ohXahOneYA== - dependencies: - charenc ">= 0.0.1" - crypt ">= 0.0.1" - -sha3@^2.1.1: - version "2.1.4" - resolved "https://registry.yarnpkg.com/sha3/-/sha3-2.1.4.tgz#000fac0fe7c2feac1f48a25e7a31b52a6492cc8f" - integrity sha512-S8cNxbyb0UGUM2VhRD4Poe5N58gJnJsLJ5vC7FYWGUmGhcsj4++WaIOBFVDxlG0W3To6xBuiRh+i0Qp2oNCOtg== - dependencies: - buffer "6.0.3" - -shelljs@^0.8.3: - version "0.8.5" - resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.5.tgz#de055408d8361bed66c669d2f000538ced8ee20c" - integrity sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow== - dependencies: - glob "^7.0.0" - interpret "^1.0.0" - rechoir "^0.6.2" - -side-channel@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" - integrity sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw== - dependencies: - call-bind "^1.0.0" - get-intrinsic "^1.0.2" - object-inspect "^1.9.0" - -signal-exit@^3.0.2: - version "3.0.7" - resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" - integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== - -simple-concat@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/simple-concat/-/simple-concat-1.0.1.tgz#f46976082ba35c2263f1c8ab5edfe26c41c9552f" - integrity sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q== - -simple-get@^2.7.0: - version "2.8.2" - resolved "https://registry.yarnpkg.com/simple-get/-/simple-get-2.8.2.tgz#5708fb0919d440657326cd5fe7d2599d07705019" - integrity sha512-Ijd/rV5o+mSBBs4F/x9oDPtTx9Zb6X9brmnXvMW4J7IR15ngi9q5xxqWBKU744jTZiaXtxaPL7uHG6vtN8kUkw== - dependencies: - decompress-response "^3.3.0" - once "^1.3.1" - simple-concat "^1.0.0" - -slash@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" - integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== - -slice-ansi@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-4.0.0.tgz#500e8dd0fd55b05815086255b3195adf2a45fe6b" - integrity sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ== - dependencies: - ansi-styles "^4.0.0" - astral-regex "^2.0.0" - is-fullwidth-code-point "^3.0.0" - -snake-case@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/snake-case/-/snake-case-2.1.0.tgz#41bdb1b73f30ec66a04d4e2cad1b76387d4d6d9f" - integrity sha512-FMR5YoPFwOLuh4rRz92dywJjyKYZNLpMn1R5ujVpIYkbA9p01fq8RMg0FkO4M+Yobt4MjHeLTJVm5xFFBHSV2Q== - dependencies: - no-case "^2.2.0" - -solc@0.7.3: - version "0.7.3" - resolved "https://registry.yarnpkg.com/solc/-/solc-0.7.3.tgz#04646961bd867a744f63d2b4e3c0701ffdc7d78a" - integrity sha512-GAsWNAjGzIDg7VxzP6mPjdurby3IkGCjQcM8GFYZT6RyaoUZKmMU6Y7YwG+tFGhv7dwZ8rmR4iwFDrrD99JwqA== - dependencies: - command-exists "^1.2.8" - commander "3.0.2" - follow-redirects "^1.12.1" - fs-extra "^0.30.0" - js-sha3 "0.8.0" - memorystream "^0.3.1" - require-from-string "^2.0.0" - semver "^5.5.0" - tmp "0.0.33" - -solc@^0.4.20: - version "0.4.26" - resolved "https://registry.yarnpkg.com/solc/-/solc-0.4.26.tgz#5390a62a99f40806b86258c737c1cf653cc35cb5" - integrity sha512-o+c6FpkiHd+HPjmjEVpQgH7fqZ14tJpXhho+/bQXlXbliLIS/xjXb42Vxh+qQY1WCSTMQ0+a5vR9vi0MfhU6mA== - dependencies: - fs-extra "^0.30.0" - memorystream "^0.3.1" - require-from-string "^1.1.0" - semver "^5.3.0" - yargs "^4.7.1" - -solidity-ast@^0.4.15: - version "0.4.49" - resolved "https://registry.yarnpkg.com/solidity-ast/-/solidity-ast-0.4.49.tgz#ecba89d10c0067845b7848c3a3e8cc61a4fc5b82" - integrity sha512-Pr5sCAj1SFqzwFZw1HPKSq0PehlQNdM8GwKyAVYh2DOn7/cCK8LUKD1HeHnKtTgBW7hi9h4nnnan7hpAg5RhWQ== - -solidity-coverage@^0.8.0: - version "0.8.2" - resolved "https://registry.yarnpkg.com/solidity-coverage/-/solidity-coverage-0.8.2.tgz#bc39604ab7ce0a3fa7767b126b44191830c07813" - integrity sha512-cv2bWb7lOXPE9/SSleDO6czkFiMHgP4NXPj+iW9W7iEKLBk7Cj0AGBiNmGX3V1totl9wjPrT0gHmABZKZt65rQ== - dependencies: - "@ethersproject/abi" "^5.0.9" - "@solidity-parser/parser" "^0.14.1" - chalk "^2.4.2" - death "^1.1.0" - detect-port "^1.3.0" - difflib "^0.2.4" - fs-extra "^8.1.0" - ghost-testrpc "^0.0.2" - global-modules "^2.0.0" - globby "^10.0.1" - jsonschema "^1.2.4" - lodash "^4.17.15" - mocha "7.1.2" - node-emoji "^1.10.0" - pify "^4.0.1" - recursive-readdir "^2.2.2" - sc-istanbul "^0.4.5" - semver "^7.3.4" - shelljs "^0.8.3" - web3-utils "^1.3.6" - -source-map-support@^0.5.13: - version "0.5.21" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" - integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== - dependencies: - buffer-from "^1.0.0" - source-map "^0.6.0" - -source-map@^0.6.0, source-map@^0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" - integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== - -source-map@~0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.2.0.tgz#dab73fbcfc2ba819b4de03bd6f6eaa48164b3f9d" - integrity sha512-CBdZ2oa/BHhS4xj5DlhjWNHcan57/5YuvfdLf17iVmIpd9KRm+DFLmC6nBNj+6Ua7Kt3TmOjDpQT1aTYOQtoUA== - dependencies: - amdefine ">=0.0.4" - -spdx-correct@^3.0.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.2.0.tgz#4f5ab0668f0059e34f9c00dce331784a12de4e9c" - integrity sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA== - dependencies: - spdx-expression-parse "^3.0.0" - spdx-license-ids "^3.0.0" - -spdx-exceptions@^2.1.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz#3f28ce1a77a00372683eade4a433183527a2163d" - integrity sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A== - -spdx-expression-parse@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz#cf70f50482eefdc98e3ce0a6833e4a53ceeba679" - integrity sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q== - dependencies: - spdx-exceptions "^2.1.0" - spdx-license-ids "^3.0.0" - -spdx-license-ids@^3.0.0: - version "3.0.13" - resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.13.tgz#7189a474c46f8d47c7b0da4b987bb45e908bd2d5" - integrity sha512-XkD+zwiqXHikFZm4AX/7JSCXA98U5Db4AFd5XUg/+9UNtnH75+Z9KxtpYiJZx36mUDVOwH83pl7yvCer6ewM3w== - -sprintf-js@~1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" - integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g== - -sshpk@^1.7.0: - version "1.17.0" - resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.17.0.tgz#578082d92d4fe612b13007496e543fa0fbcbe4c5" - integrity sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ== - dependencies: - asn1 "~0.2.3" - assert-plus "^1.0.0" - bcrypt-pbkdf "^1.0.0" - dashdash "^1.12.0" - ecc-jsbn "~0.1.1" - getpass "^0.1.1" - jsbn "~0.1.0" - safer-buffer "^2.0.2" - tweetnacl "~0.14.0" - -stacktrace-parser@^0.1.10: - version "0.1.10" - resolved "https://registry.yarnpkg.com/stacktrace-parser/-/stacktrace-parser-0.1.10.tgz#29fb0cae4e0d0b85155879402857a1639eb6051a" - integrity sha512-KJP1OCML99+8fhOHxwwzyWrlUuVX5GQ0ZpJTd1DFXhdkrvg1szxfHhawXUZ3g9TkXORQd4/WG68jMlQZ2p8wlg== - dependencies: - type-fest "^0.7.1" - -statuses@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/statuses/-/statuses-2.0.1.tgz#55cb000ccf1d48728bd23c685a063998cf1a1b63" - integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ== - -stealthy-require@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/stealthy-require/-/stealthy-require-1.1.1.tgz#35b09875b4ff49f26a777e509b3090a3226bf24b" - integrity sha512-ZnWpYnYugiOVEY5GkcuJK1io5V8QmNYChG62gSit9pQVGErXtrKuPC55ITaVSukmMta5qpMU7vqLt2Lnni4f/g== - -streamsearch@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/streamsearch/-/streamsearch-1.1.0.tgz#404dd1e2247ca94af554e841a8ef0eaa238da764" - integrity sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg== - -strict-uri-encode@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713" - integrity sha512-R3f198pcvnB+5IpnBlRkphuE9n46WyVl8I39W/ZUTZLz4nqSP/oLYUrcnJrw462Ds8he4YKMov2efsTIw1BDGQ== - -string-format@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/string-format/-/string-format-2.0.0.tgz#f2df2e7097440d3b65de31b6d40d54c96eaffb9b" - integrity sha512-bbEs3scLeYNXLecRRuk6uJxdXUSj6le/8rNPHChIJTn2V79aXVTR1EH2OH5zLKKoz0V02fOUKZZcw01pLUShZA== - -string-width@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" - integrity sha512-0XsVpQLnVCXHJfyEs8tC0zpTVIr5PKKsQtkT29IwupnPTjtPmQ3xT/4yCREF9hYkV/3M3kzcUTSAZT6a6h81tw== - dependencies: - code-point-at "^1.0.0" - is-fullwidth-code-point "^1.0.0" - strip-ansi "^3.0.0" - -"string-width@^1.0.2 || 2", string-width@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" - integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== - dependencies: - is-fullwidth-code-point "^2.0.0" - strip-ansi "^4.0.0" - -string-width@^3.0.0, string-width@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961" - integrity sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w== - dependencies: - emoji-regex "^7.0.1" - is-fullwidth-code-point "^2.0.0" - strip-ansi "^5.1.0" - -string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: - version "4.2.3" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" - integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== - dependencies: - emoji-regex "^8.0.0" - is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.1" - -string.prototype.trim@^1.2.7: - version "1.2.7" - resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.7.tgz#a68352740859f6893f14ce3ef1bb3037f7a90533" - integrity sha512-p6TmeT1T3411M8Cgg9wBTMRtY2q9+PNy9EV1i2lIXUN/btt763oIfxwN3RR8VU6wHX8j/1CFy0L+YuThm6bgOg== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - -string.prototype.trimend@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz#c4a27fa026d979d79c04f17397f250a462944533" - integrity sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - -string.prototype.trimstart@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz#e90ab66aa8e4007d92ef591bbf3cd422c56bdcf4" - integrity sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - -string_decoder@^1.1.1: - version "1.3.0" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" - integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== - dependencies: - safe-buffer "~5.2.0" - -string_decoder@~1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" - integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== - dependencies: - safe-buffer "~5.1.0" - -strip-ansi@^3.0.0, strip-ansi@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" - integrity sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg== - dependencies: - ansi-regex "^2.0.0" - -strip-ansi@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" - integrity sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow== - dependencies: - ansi-regex "^3.0.0" - -strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" - integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA== - dependencies: - ansi-regex "^4.1.0" - -strip-ansi@^6.0.0, strip-ansi@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" - integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== - dependencies: - ansi-regex "^5.0.1" - -strip-bom@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" - integrity sha512-kwrX1y7czp1E69n2ajbG65mIo9dqvJ+8aBQXOGVxqwvNbsXdFM6Lq37dLAY3mknUwru8CfcCbfOLL/gMo+fi3g== - dependencies: - is-utf8 "^0.2.0" - -strip-hex-prefix@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz#0c5f155fef1151373377de9dbb588da05500e36f" - integrity sha512-q8d4ue7JGEiVcypji1bALTos+0pWtyGlivAWyPuTkHzuTCJqrK9sWxYQZUq6Nq3cuyv3bm734IhHvHtGGURU6A== - dependencies: - is-hex-prefixed "1.0.0" - -strip-indent@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-2.0.0.tgz#5ef8db295d01e6ed6cbf7aab96998d7822527b68" - integrity sha512-RsSNPLpq6YUL7QYy44RnPVTn/lcVZtb48Uof3X5JLbF4zD/Gs7ZFDv2HWol+leoQN2mT86LAzSshGfkTlSOpsA== - -strip-json-comments@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" - integrity sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ== - -strip-json-comments@3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" - integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== - -supports-color@6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-6.0.0.tgz#76cfe742cf1f41bb9b1c29ad03068c05b4c0e40a" - integrity sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg== - dependencies: - has-flag "^3.0.0" - -supports-color@8.1.1: - version "8.1.1" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" - integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== - dependencies: - has-flag "^4.0.0" - -supports-color@^3.1.0: - version "3.2.3" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6" - integrity sha512-Jds2VIYDrlp5ui7t8abHN2bjAu4LV/q4N2KivFPpGH0lrka0BMq/33AmECUXlKPcHigkNaqfXRENFju+rlcy+A== - dependencies: - has-flag "^1.0.0" - -supports-color@^5.3.0: - version "5.5.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" - integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== - dependencies: - has-flag "^3.0.0" - -supports-color@^7.1.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" - integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== - dependencies: - has-flag "^4.0.0" - -supports-preserve-symlinks-flag@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" - integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== - -swap-case@^1.1.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/swap-case/-/swap-case-1.1.2.tgz#c39203a4587385fad3c850a0bd1bcafa081974e3" - integrity sha512-BAmWG6/bx8syfc6qXPprof3Mn5vQgf5dwdUNJhsNqU9WdPt5P+ES/wQ5bxfijy8zwZgZZHslC3iAsxsuQMCzJQ== - dependencies: - lower-case "^1.1.1" - upper-case "^1.1.1" - -swarm-js@^0.1.40: - version "0.1.42" - resolved "https://registry.yarnpkg.com/swarm-js/-/swarm-js-0.1.42.tgz#497995c62df6696f6e22372f457120e43e727979" - integrity sha512-BV7c/dVlA3R6ya1lMlSSNPLYrntt0LUq4YMgy3iwpCIc6rZnS5W2wUoctarZ5pXlpKtxDDf9hNziEkcfrxdhqQ== - dependencies: - bluebird "^3.5.0" - buffer "^5.0.5" - eth-lib "^0.1.26" - fs-extra "^4.0.2" - got "^11.8.5" - mime-types "^2.1.16" - mkdirp-promise "^5.0.1" - mock-fs "^4.1.0" - setimmediate "^1.0.5" - tar "^4.0.2" - xhr-request "^1.0.1" - -sync-request@^6.0.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/sync-request/-/sync-request-6.1.0.tgz#e96217565b5e50bbffe179868ba75532fb597e68" - integrity sha512-8fjNkrNlNCrVc/av+Jn+xxqfCjYaBoHqCsDz6mt030UMxJGr+GSfCV1dQt2gRtlL63+VPidwDVLr7V2OcTSdRw== - dependencies: - http-response-object "^3.0.1" - sync-rpc "^1.2.1" - then-request "^6.0.0" - -sync-rpc@^1.2.1: - version "1.3.6" - resolved "https://registry.yarnpkg.com/sync-rpc/-/sync-rpc-1.3.6.tgz#b2e8b2550a12ccbc71df8644810529deb68665a7" - integrity sha512-J8jTXuZzRlvU7HemDgHi3pGnh/rkoqR/OZSjhTyyZrEkkYQbk7Z33AXp37mkPfPpfdOuj7Ex3H/TJM1z48uPQw== - dependencies: - get-port "^3.1.0" - -table-layout@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/table-layout/-/table-layout-1.0.2.tgz#c4038a1853b0136d63365a734b6931cf4fad4a04" - integrity sha512-qd/R7n5rQTRFi+Zf2sk5XVVd9UQl6ZkduPFC3S7WEGJAmetDTjY3qPN50eSKzwuzEyQKy5TN2TiZdkIjos2L6A== - dependencies: - array-back "^4.0.1" - deep-extend "~0.6.0" - typical "^5.2.0" - wordwrapjs "^4.0.0" - -table@^6.8.0: - version "6.8.1" - resolved "https://registry.yarnpkg.com/table/-/table-6.8.1.tgz#ea2b71359fe03b017a5fbc296204471158080bdf" - integrity sha512-Y4X9zqrCftUhMeH2EptSSERdVKt/nEdijTOacGD/97EKjhQ/Qs8RTlEGABSJNNN8lac9kheH+af7yAkEWlgneA== - dependencies: - ajv "^8.0.1" - lodash.truncate "^4.4.2" - slice-ansi "^4.0.0" - string-width "^4.2.3" - strip-ansi "^6.0.1" - -tar@^4.0.2: - version "4.4.19" - resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.19.tgz#2e4d7263df26f2b914dee10c825ab132123742f3" - integrity sha512-a20gEsvHnWe0ygBY8JbxoM4w3SJdhc7ZAuxkLqh+nvNQN2IOt0B5lLgM490X5Hl8FF0dl0tOf2ewFYAlIFgzVA== - dependencies: - chownr "^1.1.4" - fs-minipass "^1.2.7" - minipass "^2.9.0" - minizlib "^1.3.3" - mkdirp "^0.5.5" - safe-buffer "^5.2.1" - yallist "^3.1.1" - -testrpc@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/testrpc/-/testrpc-0.0.1.tgz#83e2195b1f5873aec7be1af8cbe6dcf39edb7aed" - integrity sha512-afH1hO+SQ/VPlmaLUFj2636QMeDvPCeQMc/9RBMW0IfjNe9gFD9Ra3ShqYkB7py0do1ZcCna/9acHyzTJ+GcNA== - -then-request@^6.0.0: - version "6.0.2" - resolved "https://registry.yarnpkg.com/then-request/-/then-request-6.0.2.tgz#ec18dd8b5ca43aaee5cb92f7e4c1630e950d4f0c" - integrity sha512-3ZBiG7JvP3wbDzA9iNY5zJQcHL4jn/0BWtXIkagfz7QgOL/LqjCEOBQuJNZfu0XYnv5JhKh+cDxCPM4ILrqruA== - dependencies: - "@types/concat-stream" "^1.6.0" - "@types/form-data" "0.0.33" - "@types/node" "^8.0.0" - "@types/qs" "^6.2.31" - caseless "~0.12.0" - concat-stream "^1.6.0" - form-data "^2.2.0" - http-basic "^8.1.1" - http-response-object "^3.0.1" - promise "^8.0.0" - qs "^6.4.0" - -timed-out@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-4.0.1.tgz#f32eacac5a175bea25d7fab565ab3ed8741ef56f" - integrity sha512-G7r3AhovYtr5YKOWQkta8RKAPb+J9IsO4uVmzjl8AZwfhs8UcUwTiD6gcJYSgOtzyjvQKrKYn41syHbUWMkafA== - -title-case@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/title-case/-/title-case-2.1.1.tgz#3e127216da58d2bc5becf137ab91dae3a7cd8faa" - integrity sha512-EkJoZ2O3zdCz3zJsYCsxyq2OC5hrxR9mfdd5I+w8h/tmFfeOxJ+vvkxsKxdmN0WtS9zLdHEgfgVOiMVgv+Po4Q== - dependencies: - no-case "^2.2.0" - upper-case "^1.0.3" - -tmp@0.0.33: - version "0.0.33" - resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" - integrity sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw== - dependencies: - os-tmpdir "~1.0.2" - -to-regex-range@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" - integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== - dependencies: - is-number "^7.0.0" - -toidentifier@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35" - integrity sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA== - -tough-cookie@^2.3.3, tough-cookie@~2.5.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" - integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g== - dependencies: - psl "^1.1.28" - punycode "^2.1.1" - -tr46@~0.0.3: - version "0.0.3" - resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" - integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== - -ts-command-line-args@^2.2.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/ts-command-line-args/-/ts-command-line-args-2.5.0.tgz#7eeed3a6937b2612ea08a0794cf9d43fbbea89c4" - integrity sha512-Ff7Xt04WWCjj/cmPO9eWTJX3qpBZWuPWyQYG1vnxJao+alWWYjwJBc5aYz3h5p5dE08A6AnpkgiCtP/0KXXBYw== - dependencies: - "@morgan-stanley/ts-mocking-bird" "^0.6.2" - chalk "^4.1.0" - command-line-args "^5.1.1" - command-line-usage "^6.1.0" - string-format "^2.0.0" - -ts-essentials@^7.0.1: - version "7.0.3" - resolved "https://registry.yarnpkg.com/ts-essentials/-/ts-essentials-7.0.3.tgz#686fd155a02133eedcc5362dc8b5056cde3e5a38" - integrity sha512-8+gr5+lqO3G84KdiTSMRLtuyJ+nTBVRKuCrK4lidMPdVeEp0uqC875uE5NMcaA7YYMN7XsNiFQuMvasF8HT/xQ== - -ts-node@>=8.0.0: - version "10.9.1" - resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.1.tgz#e73de9102958af9e1f0b168a6ff320e25adcff4b" - integrity sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw== - dependencies: - "@cspotcode/source-map-support" "^0.8.0" - "@tsconfig/node10" "^1.0.7" - "@tsconfig/node12" "^1.0.7" - "@tsconfig/node14" "^1.0.0" - "@tsconfig/node16" "^1.0.2" - acorn "^8.4.1" - acorn-walk "^8.1.1" - arg "^4.1.0" - create-require "^1.1.0" - diff "^4.0.1" - make-error "^1.1.1" - v8-compile-cache-lib "^3.0.1" - yn "3.1.1" - -tslib@^1.9.3: - version "1.14.1" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" - integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== - -tsort@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/tsort/-/tsort-0.0.1.tgz#e2280f5e817f8bf4275657fd0f9aebd44f5a2786" - integrity sha512-Tyrf5mxF8Ofs1tNoxA13lFeZ2Zrbd6cKbuH3V+MQ5sb6DtBj5FjrXVsRWT8YvNAQTqNoz66dz1WsbigI22aEnw== - -tunnel-agent@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" - integrity sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w== - dependencies: - safe-buffer "^5.0.1" - -tweetnacl-util@^0.15.1: - version "0.15.1" - resolved "https://registry.yarnpkg.com/tweetnacl-util/-/tweetnacl-util-0.15.1.tgz#b80fcdb5c97bcc508be18c44a4be50f022eea00b" - integrity sha512-RKJBIj8lySrShN4w6i/BonWp2Z/uxwC3h4y7xsRrpP59ZboCd0GpEVsOnMDYLMmKBpYhb5TgHzZXy7wTfYFBRw== - -tweetnacl@^0.14.3, tweetnacl@~0.14.0: - version "0.14.5" - resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" - integrity sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA== - -tweetnacl@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-1.0.3.tgz#ac0af71680458d8a6378d0d0d050ab1407d35596" - integrity sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw== - -type-check@~0.3.2: - version "0.3.2" - resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" - integrity sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg== - dependencies: - prelude-ls "~1.1.2" - -type-detect@^4.0.0, type-detect@^4.0.5: - version "4.0.8" - resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" - integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== - -type-fest@^0.21.3: - version "0.21.3" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" - integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== - -type-fest@^0.7.1: - version "0.7.1" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.7.1.tgz#8dda65feaf03ed78f0a3f9678f1869147f7c5c48" - integrity sha512-Ne2YiiGN8bmrmJJEuTWTLJR32nh/JdL1+PSicowtNb0WFpn59GK8/lfD61bVtzguz7b3PBt74nxpv/Pw5po5Rg== - -type-is@~1.6.18: - version "1.6.18" - resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" - integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g== - dependencies: - media-typer "0.3.0" - mime-types "~2.1.24" - -type@^1.0.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/type/-/type-1.2.0.tgz#848dd7698dafa3e54a6c479e759c4bc3f18847a0" - integrity sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg== - -type@^2.7.2: - version "2.7.2" - resolved "https://registry.yarnpkg.com/type/-/type-2.7.2.tgz#2376a15a3a28b1efa0f5350dcf72d24df6ef98d0" - integrity sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw== - -typechain@^8.1.0: - version "8.1.1" - resolved "https://registry.yarnpkg.com/typechain/-/typechain-8.1.1.tgz#9c2e8012c2c4c586536fc18402dcd7034c4ff0bd" - integrity sha512-uF/sUvnXTOVF2FHKhQYnxHk4su4JjZR8vr4mA2mBaRwHTbwh0jIlqARz9XJr1tA0l7afJGvEa1dTSi4zt039LQ== - dependencies: - "@types/prettier" "^2.1.1" - debug "^4.3.1" - fs-extra "^7.0.0" - glob "7.1.7" - js-sha3 "^0.8.0" - lodash "^4.17.15" - mkdirp "^1.0.4" - prettier "^2.3.1" - ts-command-line-args "^2.2.0" - ts-essentials "^7.0.1" - -typed-array-length@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/typed-array-length/-/typed-array-length-1.0.4.tgz#89d83785e5c4098bec72e08b319651f0eac9c1bb" - integrity sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng== - dependencies: - call-bind "^1.0.2" - for-each "^0.3.3" - is-typed-array "^1.1.9" - -typedarray-to-buffer@^3.1.5: - version "3.1.5" - resolved "https://registry.yarnpkg.com/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz#a97ee7a9ff42691b9f783ff1bc5112fe3fca9080" - integrity sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q== - dependencies: - is-typedarray "^1.0.0" - -typedarray@^0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" - integrity sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA== - -typescript@>=4.5.0: - version "5.0.4" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.0.4.tgz#b217fd20119bd61a94d4011274e0ab369058da3b" - integrity sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw== - -typical@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/typical/-/typical-4.0.0.tgz#cbeaff3b9d7ae1e2bbfaf5a4e6f11eccfde94fc4" - integrity sha512-VAH4IvQ7BDFYglMd7BPRDfLgxZZX4O4TFcRDA6EN5X7erNJJq+McIEp8np9aVtxrCJ6qx4GTYVfOWNjcqwZgRw== - -typical@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/typical/-/typical-5.2.0.tgz#4daaac4f2b5315460804f0acf6cb69c52bb93066" - integrity sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg== - -uglify-js@^3.1.4: - version "3.17.4" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.17.4.tgz#61678cf5fa3f5b7eb789bb345df29afb8257c22c" - integrity sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g== - -ultron@~1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.1.1.tgz#9fe1536a10a664a65266a1e3ccf85fd36302bc9c" - integrity sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og== - -unbox-primitive@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.2.tgz#29032021057d5e6cdbd08c5129c226dff8ed6f9e" - integrity sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw== - dependencies: - call-bind "^1.0.2" - has-bigints "^1.0.2" - has-symbols "^1.0.3" - which-boxed-primitive "^1.0.2" - -undici@^5.14.0: - version "5.22.0" - resolved "https://registry.yarnpkg.com/undici/-/undici-5.22.0.tgz#5e205d82a5aecc003fc4388ccd3d2c6e8674a0ad" - integrity sha512-fR9RXCc+6Dxav4P9VV/sp5w3eFiSdOjJYsbtWfd4s5L5C4ogyuVpdKIVHeW0vV1MloM65/f7W45nR9ZxwVdyiA== - dependencies: - busboy "^1.6.0" - -universalify@^0.1.0: - version "0.1.2" - resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" - integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== - -universalify@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717" - integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ== - -unpipe@1.0.0, unpipe@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" - integrity sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ== - -untildify@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/untildify/-/untildify-4.0.0.tgz#2bc947b953652487e4600949fb091e3ae8cd919b" - integrity sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw== - -upper-case-first@^1.1.0, upper-case-first@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/upper-case-first/-/upper-case-first-1.1.2.tgz#5d79bedcff14419518fd2edb0a0507c9b6859115" - integrity sha512-wINKYvI3Db8dtjikdAqoBbZoP6Q+PZUyfMR7pmwHzjC2quzSkUq5DmPrTtPEqHaz8AGtmsB4TqwapMTM1QAQOQ== - dependencies: - upper-case "^1.1.1" - -upper-case@^1.0.3, upper-case@^1.1.0, upper-case@^1.1.1, upper-case@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/upper-case/-/upper-case-1.1.3.tgz#f6b4501c2ec4cdd26ba78be7222961de77621598" - integrity sha512-WRbjgmYzgXkCV7zNVpy5YgrHgbBv126rMALQQMrmzOVC4GM2waQ9x7xtm8VU+1yF2kWyPzI9zbZ48n4vSxwfSA== - -uri-js@^4.2.2: - version "4.4.1" - resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" - integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== - dependencies: - punycode "^2.1.0" - -url-set-query@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/url-set-query/-/url-set-query-1.0.0.tgz#016e8cfd7c20ee05cafe7795e892bd0702faa339" - integrity sha512-3AChu4NiXquPfeckE5R5cGdiHCMWJx1dwCWOmWIL4KHAziJNOFIYJlpGFeKDvwLPHovZRCxK3cYlwzqI9Vp+Gg== - -utf-8-validate@^5.0.2: - version "5.0.10" - resolved "https://registry.yarnpkg.com/utf-8-validate/-/utf-8-validate-5.0.10.tgz#d7d10ea39318171ca982718b6b96a8d2442571a2" - integrity sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ== - dependencies: - node-gyp-build "^4.3.0" - -utf8@3.0.0, utf8@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/utf8/-/utf8-3.0.0.tgz#f052eed1364d696e769ef058b183df88c87f69d1" - integrity sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ== - -util-deprecate@^1.0.1, util-deprecate@~1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" - integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== - -util@^0.12.5: - version "0.12.5" - resolved "https://registry.yarnpkg.com/util/-/util-0.12.5.tgz#5f17a6059b73db61a875668781a1c2b136bd6fbc" - integrity sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA== - dependencies: - inherits "^2.0.3" - is-arguments "^1.0.4" - is-generator-function "^1.0.7" - is-typed-array "^1.1.3" - which-typed-array "^1.1.2" - -utils-merge@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" - integrity sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA== - -uuid@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-2.0.1.tgz#c2a30dedb3e535d72ccf82e343941a50ba8533ac" - integrity sha512-nWg9+Oa3qD2CQzHIP4qKUqwNfzKn8P0LtFhotaCTFchsV7ZfDhAybeip/HZVeMIpZi9JgY1E3nUlwaCmZT1sEg== - -uuid@^3.3.2: - version "3.4.0" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" - integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== - -uuid@^7.0.3: - version "7.0.3" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-7.0.3.tgz#c5c9f2c8cf25dc0a372c4df1441c41f5bd0c680b" - integrity sha512-DPSke0pXhTZgoF/d+WSt2QaKMCFSfx7QegxEWT+JOuHF5aWrKEn0G+ztjuJg/gG8/ItK+rbPCD/yNv8yyih6Cg== - -uuid@^8.3.2: - version "8.3.2" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" - integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== - -uuid@^9.0.0: - version "9.0.0" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-9.0.0.tgz#592f550650024a38ceb0c562f2f6aa435761efb5" - integrity sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg== - -v8-compile-cache-lib@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf" - integrity sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg== - -validate-npm-package-license@^3.0.1: - version "3.0.4" - resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" - integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew== - dependencies: - spdx-correct "^3.0.0" - spdx-expression-parse "^3.0.0" - -varint@^5.0.0: - version "5.0.2" - resolved "https://registry.yarnpkg.com/varint/-/varint-5.0.2.tgz#5b47f8a947eb668b848e034dcfa87d0ff8a7f7a4" - integrity sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow== - -vary@^1, vary@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" - integrity sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg== - -verror@1.10.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" - integrity sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw== - dependencies: - assert-plus "^1.0.0" - core-util-is "1.0.2" - extsprintf "^1.2.0" - -web3-bzz@1.8.2: - version "1.8.2" - resolved "https://registry.yarnpkg.com/web3-bzz/-/web3-bzz-1.8.2.tgz#67ea1c775874056250eece551ded22905ed08784" - integrity sha512-1EEnxjPnFnvNWw3XeeKuTR8PBxYd0+XWzvaLK7OJC/Go9O8llLGxrxICbKV+8cgIE0sDRBxiYx02X+6OhoAQ9w== - dependencies: - "@types/node" "^12.12.6" - got "12.1.0" - swarm-js "^0.1.40" - -web3-bzz@1.9.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/web3-bzz/-/web3-bzz-1.9.0.tgz#3334049f386e73e2b3dcfa96432e65391538d8ac" - integrity sha512-9Zli9dikX8GdHwBb5/WPzpSVuy3EWMKY3P4EokCQra31fD7DLizqAAaTUsFwnK7xYkw5ogpHgelw9uKHHzNajg== - dependencies: - "@types/node" "^12.12.6" - got "12.1.0" - swarm-js "^0.1.40" - -web3-core-helpers@1.8.2: - version "1.8.2" - resolved "https://registry.yarnpkg.com/web3-core-helpers/-/web3-core-helpers-1.8.2.tgz#82066560f8085e6c7b93bcc8e88b441289ea9f9f" - integrity sha512-6B1eLlq9JFrfealZBomd1fmlq1o4A09vrCVQSa51ANoib/jllT3atZrRDr0zt1rfI7TSZTZBXdN/aTdeN99DWw== - dependencies: - web3-eth-iban "1.8.2" - web3-utils "1.8.2" - -web3-core-helpers@1.9.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/web3-core-helpers/-/web3-core-helpers-1.9.0.tgz#a1ca4ac7b9cec822886643312d2e98b0e4d8f1bc" - integrity sha512-NeJzylAp9Yj9xAt2uTT+kyug3X0DLnfBdnAcGZuY6HhoNPDIfQRA9CkJjLngVRlGTLZGjNp9x9eR+RyZQgUlXg== - dependencies: - web3-eth-iban "1.9.0" - web3-utils "1.9.0" - -web3-core-method@1.8.2: - version "1.8.2" - resolved "https://registry.yarnpkg.com/web3-core-method/-/web3-core-method-1.8.2.tgz#ba5ec68084e903f0516415010477618be017eac2" - integrity sha512-1qnr5mw5wVyULzLOrk4B+ryO3gfGjGd/fx8NR+J2xCGLf1e6OSjxT9vbfuQ3fErk/NjSTWWreieYWLMhaogcRA== - dependencies: - "@ethersproject/transactions" "^5.6.2" - web3-core-helpers "1.8.2" - web3-core-promievent "1.8.2" - web3-core-subscriptions "1.8.2" - web3-utils "1.8.2" - -web3-core-method@1.9.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/web3-core-method/-/web3-core-method-1.9.0.tgz#81da8aa21503b470537c9f075f30adfad194a2d8" - integrity sha512-sswbNsY2xRBBhGeaLt9c/eDc+0yDDhi6keUBAkgIRa9ueSx/VKzUY9HMqiV6bXDcGT2fJyejq74FfEB4lc/+/w== - dependencies: - "@ethersproject/transactions" "^5.6.2" - web3-core-helpers "1.9.0" - web3-core-promievent "1.9.0" - web3-core-subscriptions "1.9.0" - web3-utils "1.9.0" - -web3-core-promievent@1.8.2: - version "1.8.2" - resolved "https://registry.yarnpkg.com/web3-core-promievent/-/web3-core-promievent-1.8.2.tgz#e670d6b4453632e6ecfd9ad82da44f77ac1585c9" - integrity sha512-nvkJWDVgoOSsolJldN33tKW6bKKRJX3MCPDYMwP5SUFOA/mCzDEoI88N0JFofDTXkh1k7gOqp1pvwi9heuaxGg== - dependencies: - eventemitter3 "4.0.4" - -web3-core-promievent@1.9.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/web3-core-promievent/-/web3-core-promievent-1.9.0.tgz#2598a4d91b4edd3607366529f52bc96dee9f6d83" - integrity sha512-PHG1Mn23IGwMZhnPDN8dETKypqsFbHfiyRqP+XsVMPmTHkVfzDQTCBU/c2r6hUktBDoGKut5xZQpGfhFk71KbQ== - dependencies: - eventemitter3 "4.0.4" - -web3-core-requestmanager@1.8.2: - version "1.8.2" - resolved "https://registry.yarnpkg.com/web3-core-requestmanager/-/web3-core-requestmanager-1.8.2.tgz#dda95e83ca4808949612a41e54ecea557f78ef26" - integrity sha512-p1d090RYs5Mu7DK1yyc3GCBVZB/03rBtFhYFoS2EruGzOWs/5Q0grgtpwS/DScdRAm8wB8mYEBhY/RKJWF6B2g== - dependencies: - util "^0.12.5" - web3-core-helpers "1.8.2" - web3-providers-http "1.8.2" - web3-providers-ipc "1.8.2" - web3-providers-ws "1.8.2" - -web3-core-requestmanager@1.9.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/web3-core-requestmanager/-/web3-core-requestmanager-1.9.0.tgz#9d7d0e7f890cf7a24e9c568b9772c64d57fc4fcd" - integrity sha512-hcJ5PCtTIJpj+8qWxoseqlCovDo94JJjTX7dZOLXgwp8ah7E3WRYozhGyZocerx+KebKyg1mCQIhkDpMwjfo9Q== - dependencies: - util "^0.12.5" - web3-core-helpers "1.9.0" - web3-providers-http "1.9.0" - web3-providers-ipc "1.9.0" - web3-providers-ws "1.9.0" - -web3-core-subscriptions@1.8.2: - version "1.8.2" - resolved "https://registry.yarnpkg.com/web3-core-subscriptions/-/web3-core-subscriptions-1.8.2.tgz#0c8bd49439d83c6f0a03c70f00b24a915a70a5ed" - integrity sha512-vXQogHDmAIQcKpXvGiMddBUeP9lnKgYF64+yQJhPNE5PnWr1sAibXuIPV7mIPihpFr/n/DORRj6Wh1pUv9zaTw== - dependencies: - eventemitter3 "4.0.4" - web3-core-helpers "1.8.2" - -web3-core-subscriptions@1.9.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/web3-core-subscriptions/-/web3-core-subscriptions-1.9.0.tgz#dc67b478875dab1875844df3307a986dd7d468dd" - integrity sha512-MaIo29yz7hTV8X8bioclPDbHFOVuHmnbMv+D3PDH12ceJFJAXGyW8GL5KU1DYyWIj4TD1HM4WknyVA/YWBiiLA== - dependencies: - eventemitter3 "4.0.4" - web3-core-helpers "1.9.0" - -web3-core@1.8.2: - version "1.8.2" - resolved "https://registry.yarnpkg.com/web3-core/-/web3-core-1.8.2.tgz#333e93d7872b1a36efe758ed8b89a7acbdd962c2" - integrity sha512-DJTVEAYcNqxkqruJE+Rxp3CIv0y5AZMwPHQmOkz/cz+MM75SIzMTc0AUdXzGyTS8xMF8h3YWMQGgGEy8SBf1PQ== - dependencies: - "@types/bn.js" "^5.1.0" - "@types/node" "^12.12.6" - bignumber.js "^9.0.0" - web3-core-helpers "1.8.2" - web3-core-method "1.8.2" - web3-core-requestmanager "1.8.2" - web3-utils "1.8.2" - -web3-core@1.9.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/web3-core/-/web3-core-1.9.0.tgz#9cfafb2f8c01931429108af75205610406a5a1ab" - integrity sha512-DZ+TPmq/ZLlx4LSVzFgrHCP/QFpKDbGWO4HoquZSdu24cjk5SZ+FEU1SZB2OaK3/bgBh+25mRbmv8y56ysUu1w== - dependencies: - "@types/bn.js" "^5.1.1" - "@types/node" "^12.12.6" - bignumber.js "^9.0.0" - web3-core-helpers "1.9.0" - web3-core-method "1.9.0" - web3-core-requestmanager "1.9.0" - web3-utils "1.9.0" - -web3-eth-abi@1.8.2: - version "1.8.2" - resolved "https://registry.yarnpkg.com/web3-eth-abi/-/web3-eth-abi-1.8.2.tgz#16e1e9be40e2527404f041a4745111211488f31a" - integrity sha512-Om9g3kaRNjqiNPAgKwGT16y+ZwtBzRe4ZJFGjLiSs6v5I7TPNF+rRMWuKnR6jq0azQZDj6rblvKFMA49/k48Og== - dependencies: - "@ethersproject/abi" "^5.6.3" - web3-utils "1.8.2" - -web3-eth-abi@1.9.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/web3-eth-abi/-/web3-eth-abi-1.9.0.tgz#18662ef68bd3d25eedd9a1a1484089c39529c652" - integrity sha512-0BLQ3FKMrzJkA930jOX3fMaybAyubk06HChclLpiR0NWmgWXm1tmBrJdkyRy2ZTZpmfuZc9xTFRfl0yZID1voA== - dependencies: - "@ethersproject/abi" "^5.6.3" - web3-utils "1.9.0" - -web3-eth-accounts@1.8.2: - version "1.8.2" - resolved "https://registry.yarnpkg.com/web3-eth-accounts/-/web3-eth-accounts-1.8.2.tgz#b894f5d5158fcae429da42de75d96520d0712971" - integrity sha512-c367Ij63VCz9YdyjiHHWLFtN85l6QghgwMQH2B1eM/p9Y5lTlTX7t/Eg/8+f1yoIStXbk2w/PYM2lk+IkbqdLA== - dependencies: - "@ethereumjs/common" "2.5.0" - "@ethereumjs/tx" "3.3.2" - eth-lib "0.2.8" - ethereumjs-util "^7.1.5" - scrypt-js "^3.0.1" - uuid "^9.0.0" - web3-core "1.8.2" - web3-core-helpers "1.8.2" - web3-core-method "1.8.2" - web3-utils "1.8.2" - -web3-eth-accounts@1.9.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/web3-eth-accounts/-/web3-eth-accounts-1.9.0.tgz#fab7d563c63bdff2aa5ad89a94faf128961d9504" - integrity sha512-VeIZVevmnSll0AC1k5F/y398ZE89d1SRuYk8IewLUhL/tVAsFEsjl2SGgm0+aDcHmgPrkW+qsCJ+C7rWg/N4ZA== - dependencies: - "@ethereumjs/common" "2.5.0" - "@ethereumjs/tx" "3.3.2" - eth-lib "0.2.8" - ethereumjs-util "^7.1.5" - scrypt-js "^3.0.1" - uuid "^9.0.0" - web3-core "1.9.0" - web3-core-helpers "1.9.0" - web3-core-method "1.9.0" - web3-utils "1.9.0" - -web3-eth-contract@1.8.2: - version "1.8.2" - resolved "https://registry.yarnpkg.com/web3-eth-contract/-/web3-eth-contract-1.8.2.tgz#5388b7130923d2b790c09a420391a81312a867fb" - integrity sha512-ID5A25tHTSBNwOPjiXSVzxruz006ULRIDbzWTYIFTp7NJ7vXu/kynKK2ag/ObuTqBpMbobP8nXcA9b5EDkIdQA== - dependencies: - "@types/bn.js" "^5.1.0" - web3-core "1.8.2" - web3-core-helpers "1.8.2" - web3-core-method "1.8.2" - web3-core-promievent "1.8.2" - web3-core-subscriptions "1.8.2" - web3-eth-abi "1.8.2" - web3-utils "1.8.2" - -web3-eth-contract@1.9.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/web3-eth-contract/-/web3-eth-contract-1.9.0.tgz#00b7ac8314d562d10d7dd0c7d0f52555c3862995" - integrity sha512-+j26hpSaEtAdUed0TN5rnc+YZOcjPxMjFX4ZBKatvFkImdbVv/tzTvcHlltubSpgb2ZLyZ89lSL6phKYwd2zNQ== - dependencies: - "@types/bn.js" "^5.1.1" - web3-core "1.9.0" - web3-core-helpers "1.9.0" - web3-core-method "1.9.0" - web3-core-promievent "1.9.0" - web3-core-subscriptions "1.9.0" - web3-eth-abi "1.9.0" - web3-utils "1.9.0" - -web3-eth-ens@1.8.2: - version "1.8.2" - resolved "https://registry.yarnpkg.com/web3-eth-ens/-/web3-eth-ens-1.8.2.tgz#0a086ad4d919102e28b9fd3036df246add9df22a" - integrity sha512-PWph7C/CnqdWuu1+SH4U4zdrK4t2HNt0I4XzPYFdv9ugE8EuojselioPQXsVGvjql+Nt3jDLvQvggPqlMbvwRw== - dependencies: - content-hash "^2.5.2" - eth-ens-namehash "2.0.8" - web3-core "1.8.2" - web3-core-helpers "1.8.2" - web3-core-promievent "1.8.2" - web3-eth-abi "1.8.2" - web3-eth-contract "1.8.2" - web3-utils "1.8.2" - -web3-eth-ens@1.9.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/web3-eth-ens/-/web3-eth-ens-1.9.0.tgz#2014b16e1116be5ab34404a8db29ad1d8632ced0" - integrity sha512-LOJZeN+AGe9arhuExnrPPFYQr4WSxXEkpvYIlst/joOEUNLDwfndHnJIK6PI5mXaYSROBtTx6erv+HupzGo7vA== - dependencies: - content-hash "^2.5.2" - eth-ens-namehash "2.0.8" - web3-core "1.9.0" - web3-core-helpers "1.9.0" - web3-core-promievent "1.9.0" - web3-eth-abi "1.9.0" - web3-eth-contract "1.9.0" - web3-utils "1.9.0" - -web3-eth-iban@1.8.2: - version "1.8.2" - resolved "https://registry.yarnpkg.com/web3-eth-iban/-/web3-eth-iban-1.8.2.tgz#5cb3022234b13986f086353b53f0379a881feeaf" - integrity sha512-h3vNblDWkWMuYx93Q27TAJz6lhzpP93EiC3+45D6xoz983p6si773vntoQ+H+5aZhwglBtoiBzdh7PSSOnP/xQ== - dependencies: - bn.js "^5.2.1" - web3-utils "1.8.2" - -web3-eth-iban@1.9.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/web3-eth-iban/-/web3-eth-iban-1.9.0.tgz#a8f838e42c20d49ff58aaa9f67ece47a968e40b1" - integrity sha512-jPAm77PuEs1kE/UrrBFJdPD2PN42pwfXA0gFuuw35bZezhskYML9W4QCxcqnUtceyEA4FUn7K2qTMuCk+23fog== - dependencies: - bn.js "^5.2.1" - web3-utils "1.9.0" - -web3-eth-personal@1.8.2: - version "1.8.2" - resolved "https://registry.yarnpkg.com/web3-eth-personal/-/web3-eth-personal-1.8.2.tgz#3526c1ebaa4e7bf3a0a8ec77e34f067cc9a750b2" - integrity sha512-Vg4HfwCr7doiUF/RC+Jz0wT4+cYaXcOWMAW2AHIjHX6Z7Xwa8nrURIeQgeEE62qcEHAzajyAdB1u6bJyTfuCXw== - dependencies: - "@types/node" "^12.12.6" - web3-core "1.8.2" - web3-core-helpers "1.8.2" - web3-core-method "1.8.2" - web3-net "1.8.2" - web3-utils "1.8.2" - -web3-eth-personal@1.9.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/web3-eth-personal/-/web3-eth-personal-1.9.0.tgz#f5092bcb2688979dd7778d5a56ae6922c341ce52" - integrity sha512-r9Ldo/luBqJlv1vCUEQnUS+C3a3ZdbYxVHyfDkj6RWMyCqqo8JE41HWE+pfa0RmB1xnGL2g8TbYcHcqItck/qg== - dependencies: - "@types/node" "^12.12.6" - web3-core "1.9.0" - web3-core-helpers "1.9.0" - web3-core-method "1.9.0" - web3-net "1.9.0" - web3-utils "1.9.0" - -web3-eth@1.8.2: - version "1.8.2" - resolved "https://registry.yarnpkg.com/web3-eth/-/web3-eth-1.8.2.tgz#8562287ae1803c30eb54dc7d832092e5739ce06a" - integrity sha512-JoTiWWc4F4TInpbvDUGb0WgDYJsFhuIjJlinc5ByjWD88Gvh+GKLsRjjFdbqe5YtwIGT4NymwoC5LQd1K6u/QQ== - dependencies: - web3-core "1.8.2" - web3-core-helpers "1.8.2" - web3-core-method "1.8.2" - web3-core-subscriptions "1.8.2" - web3-eth-abi "1.8.2" - web3-eth-accounts "1.8.2" - web3-eth-contract "1.8.2" - web3-eth-ens "1.8.2" - web3-eth-iban "1.8.2" - web3-eth-personal "1.8.2" - web3-net "1.8.2" - web3-utils "1.8.2" - -web3-eth@1.9.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/web3-eth/-/web3-eth-1.9.0.tgz#1fe82ba429a44b1aa0a3b95de3e79e6c5a9eb00c" - integrity sha512-c5gSWk9bLNr6VPATHmZ1n7LTIefIZQnJMzfnvkoBcIFGKJbGmsuRhv6lEXsKdAO/FlqYnSbaw3fOq1fVFiIOFQ== - dependencies: - web3-core "1.9.0" - web3-core-helpers "1.9.0" - web3-core-method "1.9.0" - web3-core-subscriptions "1.9.0" - web3-eth-abi "1.9.0" - web3-eth-accounts "1.9.0" - web3-eth-contract "1.9.0" - web3-eth-ens "1.9.0" - web3-eth-iban "1.9.0" - web3-eth-personal "1.9.0" - web3-net "1.9.0" - web3-utils "1.9.0" - -web3-net@1.8.2: - version "1.8.2" - resolved "https://registry.yarnpkg.com/web3-net/-/web3-net-1.8.2.tgz#97e1e0015fabc4cda31017813e98d0b5468dd04f" - integrity sha512-1itkDMGmbgb83Dg9nporFes9/fxsU7smJ3oRXlFkg4ZHn8YJyP1MSQFPJWWwSc+GrcCFt4O5IrUTvEkHqE3xag== - dependencies: - web3-core "1.8.2" - web3-core-method "1.8.2" - web3-utils "1.8.2" - -web3-net@1.9.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/web3-net/-/web3-net-1.9.0.tgz#ee8799bf766039aa5b157d6db0be5ffdecd39d64" - integrity sha512-L+fDZFgrLM5Y15aonl2q6L+RvfaImAngmC0Jv45hV2FJ5IfRT0/2ob9etxZmvEBWvOpbqSvghfOhJIT3XZ37Pg== - dependencies: - web3-core "1.9.0" - web3-core-method "1.9.0" - web3-utils "1.9.0" - -web3-providers-http@1.8.2: - version "1.8.2" - resolved "https://registry.yarnpkg.com/web3-providers-http/-/web3-providers-http-1.8.2.tgz#fbda3a3bbc8db004af36e91bec35f80273b37885" - integrity sha512-2xY94IIEQd16+b+vIBF4IC1p7GVaz9q4EUFscvMUjtEq4ru4Atdzjs9GP+jmcoo49p70II0UV3bqQcz0TQfVyQ== - dependencies: - abortcontroller-polyfill "^1.7.3" - cross-fetch "^3.1.4" - es6-promise "^4.2.8" - web3-core-helpers "1.8.2" - -web3-providers-http@1.9.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/web3-providers-http/-/web3-providers-http-1.9.0.tgz#93cd3eb42fff974c9f7634ede1a9795d6435c3fe" - integrity sha512-5+dMNDAE0rRFz6SJpfnBqlVi2J5bB/Ivr2SanMt2YUrkxW5t8betZbzVwRkTbwtUvkqgj3xeUQzqpOttiv+IqQ== - dependencies: - abortcontroller-polyfill "^1.7.3" - cross-fetch "^3.1.4" - es6-promise "^4.2.8" - web3-core-helpers "1.9.0" - -web3-providers-ipc@1.8.2: - version "1.8.2" - resolved "https://registry.yarnpkg.com/web3-providers-ipc/-/web3-providers-ipc-1.8.2.tgz#e52a7250f40c83b99a2482ec5b4cf2728377ae5c" - integrity sha512-p6fqKVGFg+WiXGHWnB1hu43PbvPkDHTz4RgoEzbXugv5rtv5zfYLqm8Ba6lrJOS5ks9kGKR21a0y3NzE3u7V4w== - dependencies: - oboe "2.1.5" - web3-core-helpers "1.8.2" - -web3-providers-ipc@1.9.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/web3-providers-ipc/-/web3-providers-ipc-1.9.0.tgz#db486cb0dde9062ac6055478861e3d37535924d2" - integrity sha512-cPXU93Du40HCylvjaa5x62DbnGqH+86HpK/+kMcFIzF6sDUBhKpag2tSbYhGbj7GMpfkmDTUiiMLdWnFV6+uBA== - dependencies: - oboe "2.1.5" - web3-core-helpers "1.9.0" - -web3-providers-ws@1.8.2: - version "1.8.2" - resolved "https://registry.yarnpkg.com/web3-providers-ws/-/web3-providers-ws-1.8.2.tgz#56a2b701387011aca9154ca4bc06ea4b5f27e4ef" - integrity sha512-3s/4K+wHgbiN+Zrp9YjMq2eqAF6QGABw7wFftPdx+m5hWImV27/MoIx57c6HffNRqZXmCHnfWWFCNHHsi7wXnA== - dependencies: - eventemitter3 "4.0.4" - web3-core-helpers "1.8.2" - websocket "^1.0.32" - -web3-providers-ws@1.9.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/web3-providers-ws/-/web3-providers-ws-1.9.0.tgz#568330766e8abbb6eb43e1153a72fb24398fcb7e" - integrity sha512-JRVsnQZ7j2k1a2yzBNHe39xqk1ijOv01dfIBFw52VeEkSRzvrOcsPIM/ttSyBuJqt70ntMxXY0ekCrqfleKH/w== - dependencies: - eventemitter3 "4.0.4" - web3-core-helpers "1.9.0" - websocket "^1.0.32" - -web3-shh@1.8.2: - version "1.8.2" - resolved "https://registry.yarnpkg.com/web3-shh/-/web3-shh-1.8.2.tgz#217a417f0d6e243dd4d441848ffc2bd164cea8a0" - integrity sha512-uZ+3MAoNcaJsXXNCDnizKJ5viBNeHOFYsCbFhV755Uu52FswzTOw6DtE7yK9nYXMtIhiSgi7nwl1RYzP8pystw== - dependencies: - web3-core "1.8.2" - web3-core-method "1.8.2" - web3-core-subscriptions "1.8.2" - web3-net "1.8.2" - -web3-shh@1.9.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/web3-shh/-/web3-shh-1.9.0.tgz#75a37cd9f78d485ee5f018e2e66853e1e1c6ce4f" - integrity sha512-bIBZlralgz4ICCrwkefB2nPPJWfx28NuHIpjB7d9ADKynElubQuqudYhKtSEkKXACuME/BJm0pIFJcJs/gDnMg== - dependencies: - web3-core "1.9.0" - web3-core-method "1.9.0" - web3-core-subscriptions "1.9.0" - web3-net "1.9.0" - -web3-utils@1.8.2: - version "1.8.2" - resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.8.2.tgz#c32dec5e9b955acbab220eefd7715bc540b75cc9" - integrity sha512-v7j6xhfLQfY7xQDrUP0BKbaNrmZ2/+egbqP9q3KYmOiPpnvAfol+32slgL0WX/5n8VPvKCK5EZ1HGrAVICSToA== - dependencies: - bn.js "^5.2.1" - ethereum-bloom-filters "^1.0.6" - ethereumjs-util "^7.1.0" - ethjs-unit "0.1.6" - number-to-bn "1.7.0" - randombytes "^2.1.0" - utf8 "3.0.0" - -web3-utils@1.9.0, web3-utils@^1.0.0-beta.31, web3-utils@^1.2.5, web3-utils@^1.3.6: - version "1.9.0" - resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.9.0.tgz#7c5775a47586cefb4ad488831be8f6627be9283d" - integrity sha512-p++69rCNNfu2jM9n5+VD/g26l+qkEOQ1m6cfRQCbH8ZRrtquTmrirJMgTmyOoax5a5XRYOuws14aypCOs51pdQ== - dependencies: - bn.js "^5.2.1" - ethereum-bloom-filters "^1.0.6" - ethereumjs-util "^7.1.0" - ethjs-unit "0.1.6" - number-to-bn "1.7.0" - randombytes "^2.1.0" - utf8 "3.0.0" - -web3@1.8.2: - version "1.8.2" - resolved "https://registry.yarnpkg.com/web3/-/web3-1.8.2.tgz#95a4e5398fd0f01325264bf8e5e8cdc69a7afe86" - integrity sha512-92h0GdEHW9wqDICQQKyG4foZBYi0OQkyg4CRml2F7XBl/NG+fu9o6J19kzfFXzSBoA4DnJXbyRgj/RHZv5LRiw== - dependencies: - web3-bzz "1.8.2" - web3-core "1.8.2" - web3-eth "1.8.2" - web3-eth-personal "1.8.2" - web3-net "1.8.2" - web3-shh "1.8.2" - web3-utils "1.8.2" - -web3@^1.2.5: - version "1.9.0" - resolved "https://registry.yarnpkg.com/web3/-/web3-1.9.0.tgz#4fde5d134f8ee11355ed5bfa1bb41f8bc58e23f3" - integrity sha512-E9IvVy/d2ozfQQsCiV+zh/LmlZGv9fQxI0UedDVjm87yOKf4AYbBNEn1iWtHveiGzAk2CEMZMUzAZzaQNSSYog== - dependencies: - web3-bzz "1.9.0" - web3-core "1.9.0" - web3-eth "1.9.0" - web3-eth-personal "1.9.0" - web3-net "1.9.0" - web3-shh "1.9.0" - web3-utils "1.9.0" - -webidl-conversions@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" - integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== - -websocket@^1.0.32: - version "1.0.34" - resolved "https://registry.yarnpkg.com/websocket/-/websocket-1.0.34.tgz#2bdc2602c08bf2c82253b730655c0ef7dcab3111" - integrity sha512-PRDso2sGwF6kM75QykIesBijKSVceR6jL2G8NGYyq2XrItNC2P5/qL5XeR056GhA+Ly7JMFvJb9I312mJfmqnQ== - dependencies: - bufferutil "^4.0.1" - debug "^2.2.0" - es5-ext "^0.10.50" - typedarray-to-buffer "^3.1.5" - utf-8-validate "^5.0.2" - yaeti "^0.0.6" - -whatwg-url@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d" - integrity sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw== - dependencies: - tr46 "~0.0.3" - webidl-conversions "^3.0.0" - -which-boxed-primitive@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz#13757bc89b209b049fe5d86430e21cf40a89a8e6" - integrity sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg== - dependencies: - is-bigint "^1.0.1" - is-boolean-object "^1.1.0" - is-number-object "^1.0.4" - is-string "^1.0.5" - is-symbol "^1.0.3" - -which-module@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f" - integrity sha512-F6+WgncZi/mJDrammbTuHe1q0R5hOXv/mBaiNA2TCNT/LTHusX0V+CJnj9XT8ki5ln2UZyyddDgHfCzyrOH7MQ== - -which-module@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.1.tgz#776b1fe35d90aebe99e8ac15eb24093389a4a409" - integrity sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ== - -which-typed-array@^1.1.2, which-typed-array@^1.1.9: - version "1.1.9" - resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.9.tgz#307cf898025848cf995e795e8423c7f337efbde6" - integrity sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA== - dependencies: - available-typed-arrays "^1.0.5" - call-bind "^1.0.2" - for-each "^0.3.3" - gopd "^1.0.1" - has-tostringtag "^1.0.0" - is-typed-array "^1.1.10" - -which@1.3.1, which@^1.1.1, which@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" - integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== - dependencies: - isexe "^2.0.0" - -wide-align@1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" - integrity sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA== - dependencies: - string-width "^1.0.2 || 2" - -window-size@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.2.0.tgz#b4315bb4214a3d7058ebeee892e13fa24d98b075" - integrity sha512-UD7d8HFA2+PZsbKyaOCEy8gMh1oDtHgJh1LfgjQ4zVXmYjAT/kvz3PueITKuqDiIXQe7yzpPnxX3lNc+AhQMyw== - -word-wrap@~1.2.3: - version "1.2.3" - resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" - integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== - -wordwrap@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" - integrity sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q== - -wordwrapjs@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/wordwrapjs/-/wordwrapjs-4.0.1.tgz#d9790bccfb110a0fc7836b5ebce0937b37a8b98f" - integrity sha512-kKlNACbvHrkpIw6oPeYDSmdCTu2hdMHoyXLTcUKala++lx5Y+wjJ/e474Jqv5abnVmwxw08DiTuHmw69lJGksA== - dependencies: - reduce-flatten "^2.0.0" - typical "^5.2.0" - -workerpool@6.2.1: - version "6.2.1" - resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.2.1.tgz#46fc150c17d826b86a008e5a4508656777e9c343" - integrity sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw== - -wrap-ansi@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" - integrity sha512-vAaEaDM946gbNpH5pLVNR+vX2ht6n0Bt3GXwVB1AuAqZosOvHNF3P7wDnh8KLkSqgUh0uh77le7Owgoz+Z9XBw== - dependencies: - string-width "^1.0.1" - strip-ansi "^3.0.1" - -wrap-ansi@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-5.1.0.tgz#1fd1f67235d5b6d0fee781056001bfb694c03b09" - integrity sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q== - dependencies: - ansi-styles "^3.2.0" - string-width "^3.0.0" - strip-ansi "^5.0.0" - -wrap-ansi@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" - integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - -wrappy@1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" - integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== - -ws@7.4.6: - version "7.4.6" - resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.6.tgz#5654ca8ecdeee47c33a9a4bf6d28e2be2980377c" - integrity sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A== - -ws@^3.0.0: - version "3.3.3" - resolved "https://registry.yarnpkg.com/ws/-/ws-3.3.3.tgz#f1cf84fe2d5e901ebce94efaece785f187a228f2" - integrity sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA== - dependencies: - async-limiter "~1.0.0" - safe-buffer "~5.1.0" - ultron "~1.1.0" - -ws@^7.4.6: - version "7.5.9" - resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.9.tgz#54fa7db29f4c7cec68b1ddd3a89de099942bb591" - integrity sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q== - -xhr-request-promise@^0.1.2: - version "0.1.3" - resolved "https://registry.yarnpkg.com/xhr-request-promise/-/xhr-request-promise-0.1.3.tgz#2d5f4b16d8c6c893be97f1a62b0ed4cf3ca5f96c" - integrity sha512-YUBytBsuwgitWtdRzXDDkWAXzhdGB8bYm0sSzMPZT7Z2MBjMSTHFsyCT1yCRATY+XC69DUrQraRAEgcoCRaIPg== - dependencies: - xhr-request "^1.1.0" - -xhr-request@^1.0.1, xhr-request@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/xhr-request/-/xhr-request-1.1.0.tgz#f4a7c1868b9f198723444d82dcae317643f2e2ed" - integrity sha512-Y7qzEaR3FDtL3fP30k9wO/e+FBnBByZeybKOhASsGP30NIkRAAkKD/sCnLvgEfAIEC1rcmK7YG8f4oEnIrrWzA== - dependencies: - buffer-to-arraybuffer "^0.0.5" - object-assign "^4.1.1" - query-string "^5.0.1" - simple-get "^2.7.0" - timed-out "^4.0.1" - url-set-query "^1.0.0" - xhr "^2.0.4" - -xhr@^2.0.4, xhr@^2.3.3: - version "2.6.0" - resolved "https://registry.yarnpkg.com/xhr/-/xhr-2.6.0.tgz#b69d4395e792b4173d6b7df077f0fc5e4e2b249d" - integrity sha512-/eCGLb5rxjx5e3mF1A7s+pLlR6CGyqWN91fv1JgER5mVWg1MZmlhBvy9kjcsOdRk8RrIujotWyJamfyrp+WIcA== - dependencies: - global "~4.4.0" - is-function "^1.0.1" - parse-headers "^2.0.0" - xtend "^4.0.0" - -xmlhttprequest@1.8.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz#67fe075c5c24fef39f9d65f5f7b7fe75171968fc" - integrity sha512-58Im/U0mlVBLM38NdZjHyhuMtCqa61469k2YP/AaPbvCoV9aQGUpbJBj1QRm2ytRiVQBD/fsw7L2bJGDVQswBA== - -xtend@^4.0.0: - version "4.0.2" - resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" - integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== - -y18n@^3.2.1: - version "3.2.2" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.2.tgz#85c901bd6470ce71fc4bb723ad209b70f7f28696" - integrity sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ== - -y18n@^4.0.0: - version "4.0.3" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.3.tgz#b5f259c82cd6e336921efd7bfd8bf560de9eeedf" - integrity sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ== - -y18n@^5.0.5: - version "5.0.8" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" - integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== - -yaeti@^0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/yaeti/-/yaeti-0.0.6.tgz#f26f484d72684cf42bedfb76970aa1608fbf9577" - integrity sha512-MvQa//+KcZCUkBTIC9blM+CU9J2GzuTytsOUwf2lidtvkx/6gnEp1QvJv34t9vdjhFmha/mUiNDbN0D0mJWdug== - -yallist@^3.0.0, yallist@^3.0.2, yallist@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" - integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== - -yallist@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" - integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== - -yargs-parser@13.1.2, yargs-parser@^13.1.2: - version "13.1.2" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.2.tgz#130f09702ebaeef2650d54ce6e3e5706f7a4fb38" - integrity sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg== - dependencies: - camelcase "^5.0.0" - decamelize "^1.2.0" - -yargs-parser@20.2.4: - version "20.2.4" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54" - integrity sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA== - -yargs-parser@^2.4.1: - version "2.4.1" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-2.4.1.tgz#85568de3cf150ff49fa51825f03a8c880ddcc5c4" - integrity sha512-9pIKIJhnI5tonzG6OnCFlz/yln8xHYcGl+pn3xR0Vzff0vzN1PbNRaelgfgRUwZ3s4i3jvxT9WhmUGL4whnasA== - dependencies: - camelcase "^3.0.0" - lodash.assign "^4.0.6" - -yargs-parser@^20.2.2: - version "20.2.9" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" - integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== - -yargs-unparser@1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-1.6.0.tgz#ef25c2c769ff6bd09e4b0f9d7c605fb27846ea9f" - integrity sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw== - dependencies: - flat "^4.1.0" - lodash "^4.17.15" - yargs "^13.3.0" - -yargs-unparser@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-2.0.0.tgz#f131f9226911ae5d9ad38c432fe809366c2325eb" - integrity sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA== - dependencies: - camelcase "^6.0.0" - decamelize "^4.0.0" - flat "^5.0.2" - is-plain-obj "^2.1.0" - -yargs@13.3.2, yargs@^13.3.0: - version "13.3.2" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.2.tgz#ad7ffefec1aa59565ac915f82dccb38a9c31a2dd" - integrity sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw== - dependencies: - cliui "^5.0.0" - find-up "^3.0.0" - get-caller-file "^2.0.1" - require-directory "^2.1.1" - require-main-filename "^2.0.0" - set-blocking "^2.0.0" - string-width "^3.0.0" - which-module "^2.0.0" - y18n "^4.0.0" - yargs-parser "^13.1.2" - -yargs@16.2.0: - version "16.2.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" - integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== - dependencies: - cliui "^7.0.2" - escalade "^3.1.1" - get-caller-file "^2.0.5" - require-directory "^2.1.1" - string-width "^4.2.0" - y18n "^5.0.5" - yargs-parser "^20.2.2" - -yargs@^4.7.1: - version "4.8.1" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-4.8.1.tgz#c0c42924ca4aaa6b0e6da1739dfb216439f9ddc0" - integrity sha512-LqodLrnIDM3IFT+Hf/5sxBnEGECrfdC1uIbgZeJmESCSo4HoCAaKEus8MylXHAkdacGc0ye+Qa+dpkuom8uVYA== - dependencies: - cliui "^3.2.0" - decamelize "^1.1.1" - get-caller-file "^1.0.1" - lodash.assign "^4.0.3" - os-locale "^1.4.0" - read-pkg-up "^1.0.1" - require-directory "^2.1.1" - require-main-filename "^1.0.1" - set-blocking "^2.0.0" - string-width "^1.0.1" - which-module "^1.0.0" - window-size "^0.2.0" - y18n "^3.2.1" - yargs-parser "^2.4.1" - -yn@3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" - integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q== - -yocto-queue@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" - integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== - -zksync-web3@^0.14.3: - version "0.14.3" - resolved "https://registry.yarnpkg.com/zksync-web3/-/zksync-web3-0.14.3.tgz#64ac2a16d597464c3fc4ae07447a8007631c57c9" - integrity sha512-hT72th4AnqyLW1d5Jlv8N2B/qhEnl2NePK2A3org7tAa24niem/UAaHMkEvmWI3SF9waYUPtqAtjpf+yvQ9zvQ== From 9e234d20082a4fc213d8631cf8a8a400de4acff6 Mon Sep 17 00:00:00 2001 From: alexstratos Date: Tue, 20 Jun 2023 18:13:01 -0400 Subject: [PATCH 94/95] cherry-pick fix/qb1866: fix token supply --- app/app.go | 7 +-- x/evm/keeper/keeper.go | 7 +++ x/evm/keeper/statedb.go | 2 +- x/evm/types/interfaces.go | 8 ++- x/pot/abci.go | 17 +++---- x/pot/genesis.go | 9 ++++ x/pot/keeper/keeper.go | 89 ++++++++++++++++++--------------- x/pot/types/expected_keepers.go | 1 + 8 files changed, 84 insertions(+), 56 deletions(-) diff --git a/app/app.go b/app/app.go index 29c301b2..ff8c1ef3 100644 --- a/app/app.go +++ b/app/app.go @@ -156,7 +156,7 @@ var ( maccPerms = map[string][]string{ authtypes.FeeCollectorName: nil, - distrtypes.ModuleName: nil, + distrtypes.ModuleName: {authtypes.Burner}, minttypes.ModuleName: {authtypes.Minter}, stakingtypes.BondedPoolName: {authtypes.Burner, authtypes.Staking}, stakingtypes.NotBondedPoolName: {authtypes.Burner, authtypes.Staking}, @@ -357,8 +357,7 @@ func NewInitApp( tracer := cast.ToString(appOpts.Get(srvflags.EVMTracer)) app.evmKeeper = evmkeeper.NewKeeper( appCodec, keys[evmtypes.StoreKey], tKeys[evmtypes.TransientKey], app.GetSubspace(evmtypes.ModuleName), - app.accountKeeper, app.bankKeeper, app.stakingKeeper, - tracer, + app.accountKeeper, app.bankKeeper, app.stakingKeeper, tracer, ) // Create IBC Keeper @@ -436,6 +435,8 @@ func NewInitApp( app.registerKeeper, app.potKeeper, ) + // set PotKeeper to evm module + app.evmKeeper.SetPotKeeper(app.potKeeper) /**** Module Options ****/ diff --git a/x/evm/keeper/keeper.go b/x/evm/keeper/keeper.go index a1afccf3..f38d7fb5 100644 --- a/x/evm/keeper/keeper.go +++ b/x/evm/keeper/keeper.go @@ -45,6 +45,9 @@ type Keeper struct { // access historical headers for EVM state transition execution stakingKeeper types.StakingKeeper + // access for pot functionality with related keeper + potKeeper types.PotKeeper + // Tracer used to collect execution traces from the EVM transaction execution tracer string @@ -87,6 +90,10 @@ func (k Keeper) Logger(ctx sdk.Context) log.Logger { return ctx.Logger().With("module", types.ModuleName) } +func (k *Keeper) SetPotKeeper(potk types.PotKeeper) { + k.potKeeper = potk +} + // ---------------------------------------------------------------------------- // Block Bloom // Required by Web3 API. diff --git a/x/evm/keeper/statedb.go b/x/evm/keeper/statedb.go index df423e6a..f118f0af 100644 --- a/x/evm/keeper/statedb.go +++ b/x/evm/keeper/statedb.go @@ -82,7 +82,7 @@ func (k *Keeper) SetBalance(ctx sdk.Context, addr common.Address, amount *big.In case 1: // mint coins := sdk.NewCoins(sdk.NewCoin(params.EvmDenom, sdk.NewIntFromBigInt(delta))) - if err := k.bankKeeper.MintCoins(ctx, types.ModuleName, coins); err != nil { + if err := k.potKeeper.SafeMintCoins(ctx, types.ModuleName, coins); err != nil { return err } if err := k.bankKeeper.SendCoinsFromModuleToAccount(ctx, types.ModuleName, cosmosAddr, coins); err != nil { diff --git a/x/evm/types/interfaces.go b/x/evm/types/interfaces.go index c32f7811..8ebef9aa 100644 --- a/x/evm/types/interfaces.go +++ b/x/evm/types/interfaces.go @@ -29,8 +29,8 @@ type BankKeeper interface { SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error // SendCoinsFromModuleToModule(ctx sdk.Context, senderModule, recipientModule string, amt sdk.Coins) error SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error - MintCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error BurnCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error + GetSupply(ctx sdk.Context, denom string) sdk.Coin } // StakingKeeper returns the historical headers kept in store. @@ -39,6 +39,12 @@ type StakingKeeper interface { GetValidatorByConsAddr(ctx sdk.Context, consAddr sdk.ConsAddress) (validator stakingtypes.Validator, found bool) } +type PotKeeper interface { + InitialTotalSupply(ctx sdk.Context) sdk.Coin + BondDenom(ctx sdk.Context) string + SafeMintCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error +} + // Event Hooks // These can be utilized to customize evm transaction processing. diff --git a/x/pot/abci.go b/x/pot/abci.go index c750833b..806c7a8d 100644 --- a/x/pot/abci.go +++ b/x/pot/abci.go @@ -7,6 +7,8 @@ import ( "github.com/stratosnet/stratos-chain/x/pot/keeper" ) +const CHECK_TOTAL_SUPPLY_INTERVAL = 10000 + // BeginBlocker check for infraction evidence or downtime of validators // on every begin block func BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock, k keeper.Keeper) { @@ -24,15 +26,10 @@ func EndBlocker(ctx sdk.Context, req abci.RequestEndBlock, k keeper.Keeper) []ab logger.Error("An error occurred while distributing the reward. ", "ErrMsg", err.Error()) } - // reset total supply to 100M stos - //minter, amount := k.RestoreTotalSupply(ctx) - //if minter.Empty() || amount.Empty() { - // return []abci.ValidatorUpdate{} - //} - // - //ctx.EventManager().EmitEvent( - // banktypes.NewCoinMintEvent(minter, amount), - //) - + // reset total supply to 100M stos every 10k blocks + if ctx.BlockHeight()%CHECK_TOTAL_SUPPLY_INTERVAL == 1 { + logger.Info("start RestoreTotalSupply") + k.RestoreTotalSupply(ctx) + } return []abci.ValidatorUpdate{} } diff --git a/x/pot/genesis.go b/x/pot/genesis.go index b8637c94..a4d8140f 100644 --- a/x/pot/genesis.go +++ b/x/pot/genesis.go @@ -1,6 +1,8 @@ package pot import ( + "fmt" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stratosnet/stratos-chain/x/pot/keeper" @@ -39,6 +41,13 @@ func InitGenesis(ctx sdk.Context, keeper keeper.Keeper, data *types.GenesisState } keeper.SetMaturedEpoch(ctx, data.MaturedEpoch) + // ensure total supply of bank module is LT InitialTotalSupply + totalSupply := keeper.GetSupply(ctx) + if keeper.GetParams(ctx).InitialTotalSupply.IsLT(totalSupply) { + errMsg := fmt.Sprintf("current total supply[%v] is greater than total supply limit[%v]", + totalSupply.String(), keeper.GetParams(ctx).InitialTotalSupply.String()) + panic(errMsg) + } } // ExportGenesis writes the current store values diff --git a/x/pot/keeper/keeper.go b/x/pot/keeper/keeper.go index bcc7a3a6..fef2ae2b 100644 --- a/x/pot/keeper/keeper.go +++ b/x/pot/keeper/keeper.go @@ -1,7 +1,7 @@ package keeper import ( - "bytes" + "errors" "fmt" "math" @@ -9,7 +9,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" + distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" @@ -87,61 +87,68 @@ func (k Keeper) FoundationDeposit(ctx sdk.Context, amount sdk.Coins, from sdk.Ac return nil } -// Restore total supply to 100M stos -func (k Keeper) RestoreTotalSupply(ctx sdk.Context) (minter sdk.AccAddress, mintCoins sdk.Coins) { - // reset total supply to 100M stos - events := ctx.EventManager().Events() - attrKeyAmtBytes := []byte(sdk.AttributeKeyAmount) - - totalBurnedCoins := sdk.Coins{} - for _, event := range events { - if event.Type == banktypes.EventTypeCoinBurn { - attributes := event.Attributes - for _, attr := range attributes { - if bytes.Equal(attr.Key, attrKeyAmtBytes) { - amount, err := sdk.ParseCoinsNormalized(string(attr.Value)) - if err != nil { - ctx.Logger().Error("An error occurred while parsing burned amount. ", "ErrMsg", err.Error()) - break - } - totalBurnedCoins = totalBurnedCoins.Add(amount...) - } - } - } +func (k Keeper) SafeMintCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error { + denom := k.BondDenom(ctx) + communityPollBalance := k.distrKeeper.GetFeePool(ctx).CommunityPool + availableCoinsCommunity := communityPollBalance.AmountOf(denom) + if amt.AmountOf(denom).ToDec().GT(availableCoinsCommunity) { + return errors.New("minting not completed because total supply cap is hit") } + return k.bankKeeper.MintCoins(ctx, moduleName, amt) +} - totalBurned := totalBurnedCoins.AmountOf(k.BondDenom(ctx)) - if totalBurned.IsZero() { - return sdk.AccAddress{}, sdk.Coins{} +func (k Keeper) safeBurnCoinsFromCommunityPool(ctx sdk.Context, coins sdk.Coins) error { + communityPollBalance := k.distrKeeper.GetFeePool(ctx).CommunityPool + //ctx.Logger().Info("------communityPollBalance is " + communityPollBalance.String()) + if communityPollBalance.AmountOf(k.BondDenom(ctx)).GTE(coins.AmountOf(k.BondDenom(ctx)).ToDec()) { + k.bankKeeper.BurnCoins(ctx, distrtypes.ModuleName, coins) + return nil } + return errors.New("burning not completed as a result of insufficient balance in community pool") +} +// Restore total supply to 100M stos +func (k Keeper) RestoreTotalSupply(ctx sdk.Context) (minted, burned sdk.Coins) { InitialTotalSupply := k.InitialTotalSupply(ctx).Amount currentTotalSupply := k.bankKeeper.GetSupply(ctx, k.BondDenom(ctx)).Amount - - if totalBurned.Add(currentTotalSupply).GT(InitialTotalSupply) { - mintCoins = sdk.NewCoins( - sdk.NewCoin(k.BondDenom(ctx), InitialTotalSupply.Sub(currentTotalSupply)), - ) - } else { - mintCoins = totalBurnedCoins + //ctx.Logger().Info("------currentTotalSupply is " + currentTotalSupply.String()) + if InitialTotalSupply.Equal(currentTotalSupply) { + //ctx.Logger().Info("------no need to restore") + return sdk.Coins{}, sdk.Coins{} } - - // mint coins - err := k.bankKeeper.MintCoins(ctx, types.ModuleName, mintCoins) + supplyDiff := currentTotalSupply.Sub(InitialTotalSupply) + if supplyDiff.GT(sdk.ZeroInt()) { + // burn surplus if currentTotalSupply > InitialTotalSupply + amtToBurn := supplyDiff + coinToBurn := sdk.NewCoin(k.BondDenom(ctx), amtToBurn) + coinsToBurn := sdk.NewCoins(coinToBurn) + err := k.safeBurnCoinsFromCommunityPool(ctx, coinsToBurn) + if err != nil { + return sdk.Coins{}, sdk.Coins{} + } + return sdk.Coins{}, coinsToBurn + } + // mint slack + amtToMint := supplyDiff.Abs() + coinToMint := sdk.NewCoin(k.BondDenom(ctx), amtToMint) + coinsToMint := sdk.NewCoins(coinToMint) + err := k.bankKeeper.MintCoins(ctx, types.ModuleName, coinsToMint) // do not use SafeMintCoins here if err != nil { ctx.Logger().Error("Restore total supply failed:", err.Error()) - return sdk.AccAddress{}, sdk.Coins{} + return sdk.Coins{}, sdk.Coins{} } - // send new mint coins to community pool senderAddr := k.accountKeeper.GetModuleAddress(types.ModuleName) - err = k.distrKeeper.FundCommunityPool(ctx, mintCoins, senderAddr) + err = k.distrKeeper.FundCommunityPool(ctx, coinsToMint, senderAddr) if err != nil { ctx.Logger().Error("Restore total supply failed:", err.Error()) - return sdk.AccAddress{}, sdk.Coins{} + return sdk.Coins{}, sdk.Coins{} } + return coinsToMint, sdk.Coins{} +} - return +func (k Keeper) GetSupply(ctx sdk.Context) (totalSupply sdk.Coin) { + return k.bankKeeper.GetSupply(ctx, k.BondDenom(ctx)) } func (k Keeper) GetCirculationSupply(ctx sdk.Context) (circulationSupply sdk.Coins) { diff --git a/x/pot/types/expected_keepers.go b/x/pot/types/expected_keepers.go index 2ab0992e..06a6a806 100644 --- a/x/pot/types/expected_keepers.go +++ b/x/pot/types/expected_keepers.go @@ -23,6 +23,7 @@ type BankKeeper interface { GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin GetSupply(ctx sdk.Context, denom string) sdk.Coin MintCoins(ctx sdk.Context, moduleName string, amounts sdk.Coins) error + BurnCoins(ctx sdk.Context, moduleName string, amounts sdk.Coins) error } type RegisterKeeper interface { From ef7a686d1b21fd9986abb680f3cb63c417b4431b Mon Sep 17 00:00:00 2001 From: alexstratos <58865166+alexstratos@users.noreply.github.com> Date: Thu, 6 Jul 2023 16:20:00 -0400 Subject: [PATCH 95/95] Audit conflict resolve (#291) * Qb 1816 - implement proxy, add prepay (#265)` * Revert "Qb 1816 - implement proxy, add prepay (#265)" (#285) This reverts commit b05d09e8fc7e45e36fa7340d25561d57610e3fa5. --------- Co-authored-by: BoThe1K <121880388+BoThe1K@users.noreply.github.com> --- .gitignore | 1 - app/ante/eth.go | 3 +- app/ante/interfaces.go | 2 +- app/app.go | 18 +- core/statedb/journal.go | 133 - core/statedb/state_object.go | 94 - core/statedb/statedb.go | 165 - core/statedb/types.go | 59 - go.mod | 11 +- go.sum | 9 +- package.json | 19 - packages/gov/.eslintignore | 4 - packages/gov/.eslintrc.js | 24 - packages/gov/.gitignore | 11 - packages/gov/.npmignore | 3 - packages/gov/.prettierignore | 5 - packages/gov/.solhint.json | 15 - packages/gov/README.md | 14 - packages/gov/contracts/Prepay.sol | 48 - .../gov/contracts/mock/PrepayMockOverride.sol | 46 - packages/gov/contracts/versions/Version0.sol | 11 - packages/gov/contracts/versions/Version1.sol | 11 - packages/gov/hardhat.config.ts | 41 - packages/gov/package.json | 42 - packages/gov/test/Prepay.test.ts | 38 - packages/gov/tsconfig.json | 11 - packages/tsconfig.package.json | 38 - proto/stratos/evm/v1/evm.proto | 26 - proto/stratos/evm/v1/proposal.proto | 21 - rpc/namespaces/ethereum/debug/api.go | 15 +- rpc/namespaces/ethereum/eth/api.go | 2 +- types/config.go | 3 +- x/evm/client/cli/tx.go | 99 - x/evm/client/proposal_handler.go | 25 - x/evm/keeper/abci.go | 11 - x/evm/keeper/grpc_query.go | 19 +- x/evm/keeper/keeper.go | 63 +- x/evm/keeper/proposal.go | 305 - x/evm/keeper/state_transition.go | 77 +- x/evm/keeper/store.go | 42 - x/evm/proposal_handler.go | 28 - x/evm/simulation/genesis.go | 4 +- x/evm/statedb/statedb.go | 36 +- x/evm/tracers/js/goja.go | 8 +- x/evm/tracers/logger/access_list_tracer.go | 184 - x/evm/tracers/logger/gen_structlog.go | 110 - x/evm/tracers/logger/logger.go | 464 - x/evm/tracers/logger/logger_json.go | 104 - x/evm/tracers/native/4byte.go | 21 +- x/evm/tracers/native/call.go | 4 +- x/evm/tracers/native/noop.go | 4 +- x/evm/tracers/native/prestate.go | 4 +- x/evm/tracers/native/revertreason.go | 4 +- x/evm/tracers/native/tracer.go | 10 +- x/evm/types/codec.go | 12 - x/evm/types/contracts.go | 23 - x/evm/types/evm.pb.go | 1011 +-- x/evm/types/interfaces.go | 14 +- x/evm/types/params.go | 107 +- x/evm/types/proposal.go | 79 - x/evm/types/proposal.pb.go | 487 -- x/evm/{tracers/tracers.go => types/tracer.go} | 82 +- x/evm/vm/analysis.go | 118 - x/evm/vm/common.go | 82 - x/evm/vm/contract.go | 194 - x/evm/vm/contracts.go | 1043 --- x/evm/vm/doc.go | 24 - x/evm/vm/eips.go | 194 - x/evm/vm/errors.go | 72 - x/evm/vm/evm.go | 630 -- x/evm/vm/gas.go | 59 - x/evm/vm/gas_table.go | 458 - x/evm/vm/instructions.go | 1017 --- x/evm/vm/interface.go | 106 - x/evm/vm/interpreter.go | 258 - x/evm/vm/jump_table.go | 1062 --- x/evm/vm/keeper_amplifier.go | 28 - x/evm/vm/logger.go | 44 - x/evm/vm/memory.go | 105 - x/evm/vm/memory_table.go | 128 - x/evm/vm/opcodes.go | 562 -- x/evm/vm/operations_acl.go | 244 - x/evm/vm/stack.go | 82 - x/evm/vm/stack_table.go | 42 - x/evm/vm/verifier.go | 39 - x/register/keeper/store_new.go | 35 - x/sds/keeper/keeper.go | 23 +- yarn.lock | 7594 ----------------- 88 files changed, 230 insertions(+), 18397 deletions(-) delete mode 100644 core/statedb/journal.go delete mode 100644 core/statedb/state_object.go delete mode 100644 core/statedb/statedb.go delete mode 100644 core/statedb/types.go delete mode 100644 package.json delete mode 100644 packages/gov/.eslintignore delete mode 100644 packages/gov/.eslintrc.js delete mode 100644 packages/gov/.gitignore delete mode 100644 packages/gov/.npmignore delete mode 100644 packages/gov/.prettierignore delete mode 100644 packages/gov/.solhint.json delete mode 100644 packages/gov/README.md delete mode 100644 packages/gov/contracts/Prepay.sol delete mode 100644 packages/gov/contracts/mock/PrepayMockOverride.sol delete mode 100644 packages/gov/contracts/versions/Version0.sol delete mode 100644 packages/gov/contracts/versions/Version1.sol delete mode 100644 packages/gov/hardhat.config.ts delete mode 100644 packages/gov/package.json delete mode 100644 packages/gov/test/Prepay.test.ts delete mode 100644 packages/gov/tsconfig.json delete mode 100644 packages/tsconfig.package.json delete mode 100644 proto/stratos/evm/v1/proposal.proto delete mode 100644 x/evm/client/proposal_handler.go delete mode 100644 x/evm/keeper/proposal.go delete mode 100644 x/evm/keeper/store.go delete mode 100644 x/evm/proposal_handler.go delete mode 100644 x/evm/tracers/logger/access_list_tracer.go delete mode 100644 x/evm/tracers/logger/gen_structlog.go delete mode 100644 x/evm/tracers/logger/logger.go delete mode 100644 x/evm/tracers/logger/logger_json.go delete mode 100644 x/evm/types/contracts.go delete mode 100644 x/evm/types/proposal.go delete mode 100644 x/evm/types/proposal.pb.go rename x/evm/{tracers/tracers.go => types/tracer.go} (64%) delete mode 100644 x/evm/vm/analysis.go delete mode 100644 x/evm/vm/common.go delete mode 100644 x/evm/vm/contract.go delete mode 100644 x/evm/vm/contracts.go delete mode 100644 x/evm/vm/doc.go delete mode 100644 x/evm/vm/eips.go delete mode 100644 x/evm/vm/errors.go delete mode 100644 x/evm/vm/evm.go delete mode 100644 x/evm/vm/gas.go delete mode 100644 x/evm/vm/gas_table.go delete mode 100644 x/evm/vm/instructions.go delete mode 100644 x/evm/vm/interface.go delete mode 100644 x/evm/vm/interpreter.go delete mode 100644 x/evm/vm/jump_table.go delete mode 100644 x/evm/vm/keeper_amplifier.go delete mode 100644 x/evm/vm/logger.go delete mode 100644 x/evm/vm/memory.go delete mode 100644 x/evm/vm/memory_table.go delete mode 100644 x/evm/vm/opcodes.go delete mode 100644 x/evm/vm/operations_acl.go delete mode 100644 x/evm/vm/stack.go delete mode 100644 x/evm/vm/stack_table.go delete mode 100644 x/evm/vm/verifier.go delete mode 100644 x/register/keeper/store_new.go delete mode 100644 yarn.lock diff --git a/.gitignore b/.gitignore index 2693ff77..62dfce57 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,3 @@ playground.go /tmp-swagger-gen/ /github.com/ .DS_Store -node_modules/ diff --git a/app/ante/eth.go b/app/ante/eth.go index 45ac713b..71add19b 100644 --- a/app/ante/eth.go +++ b/app/ante/eth.go @@ -14,7 +14,6 @@ import ( stratos "github.com/stratosnet/stratos-chain/types" evmkeeper "github.com/stratosnet/stratos-chain/x/evm/keeper" "github.com/stratosnet/stratos-chain/x/evm/statedb" - "github.com/stratosnet/stratos-chain/x/evm/tracers" evmtypes "github.com/stratosnet/stratos-chain/x/evm/types" ) @@ -313,7 +312,7 @@ func (ctd CanTransferDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate BaseFee: baseFee, } stateDB := statedb.New(ctx, ctd.evmKeeper, statedb.NewEmptyTxConfig(common.BytesToHash(ctx.HeaderHash().Bytes()))) - evm := ctd.evmKeeper.NewEVM(ctx, coreMsg, cfg, tracers.NewNoOpTracer(), stateDB) + evm := ctd.evmKeeper.NewEVM(ctx, coreMsg, cfg, evmtypes.NewNoOpTracer(), stateDB) // check that caller has enough balance to cover asset transfer for **topmost** call // NOTE: here the gas consumed is from the context with the infinite gas meter diff --git a/app/ante/interfaces.go b/app/ante/interfaces.go index b11dda54..89369928 100644 --- a/app/ante/interfaces.go +++ b/app/ante/interfaces.go @@ -9,11 +9,11 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core" + "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/params" "github.com/stratosnet/stratos-chain/x/evm/statedb" evmtypes "github.com/stratosnet/stratos-chain/x/evm/types" - "github.com/stratosnet/stratos-chain/x/evm/vm" ) // AccountKeeper defines the contract needed for AccountKeeper related APIs. diff --git a/app/app.go b/app/app.go index 96c61dc9..5d768096 100644 --- a/app/app.go +++ b/app/app.go @@ -96,7 +96,6 @@ import ( srvflags "github.com/stratosnet/stratos-chain/server/flags" stratos "github.com/stratosnet/stratos-chain/types" "github.com/stratosnet/stratos-chain/x/evm" - evmclient "github.com/stratosnet/stratos-chain/x/evm/client" evmrest "github.com/stratosnet/stratos-chain/x/evm/client/rest" evmkeeper "github.com/stratosnet/stratos-chain/x/evm/keeper" evmtypes "github.com/stratosnet/stratos-chain/x/evm/types" @@ -137,7 +136,6 @@ var ( upgradeclient.CancelProposalHandler, ibcclientclient.UpdateClientProposalHandler, ibcclientclient.UpgradeProposalHandler, - evmclient.EVMChangeProxyImplementationHandler, ), params.AppModuleBasic{}, crisis.AppModuleBasic{}, @@ -189,9 +187,8 @@ var ( // module accounts that are allowed to receive tokens allowedReceivingModAcc = map[string]bool{ - distrtypes.ModuleName: true, - authtypes.FeeCollectorName: true, - registertypes.TotalUnissuedPrepay: true, + distrtypes.ModuleName: true, + authtypes.FeeCollectorName: true, //pot.FoundationAccount: true, } ) @@ -360,7 +357,8 @@ func NewInitApp( tracer := cast.ToString(appOpts.Get(srvflags.EVMTracer)) app.evmKeeper = evmkeeper.NewKeeper( appCodec, keys[evmtypes.StoreKey], tKeys[evmtypes.TransientKey], app.GetSubspace(evmtypes.ModuleName), - app.accountKeeper, app.bankKeeper, app.stakingKeeper, app.potKeeper, nil, tracer, + app.accountKeeper, app.bankKeeper, app.stakingKeeper, + tracer, ) // Create IBC Keeper @@ -373,8 +371,7 @@ func NewInitApp( AddRoute(paramproposal.RouterKey, params.NewParamChangeProposalHandler(app.paramsKeeper)). AddRoute(distrtypes.RouterKey, distr.NewCommunityPoolSpendProposalHandler(app.distrKeeper)). AddRoute(upgradetypes.RouterKey, upgrade.NewSoftwareUpgradeProposalHandler(app.upgradeKeeper)). - AddRoute(ibchost.RouterKey, ibcclient.NewClientProposalHandler(app.ibcKeeper.ClientKeeper)). - AddRoute(evmtypes.RouterKey, evm.NewEVMChangeProposalHandler(app.evmKeeper)) + AddRoute(ibchost.RouterKey, ibcclient.NewClientProposalHandler(app.ibcKeeper.ClientKeeper)) govKeeper := govkeeper.NewKeeper( appCodec, keys[govtypes.StoreKey], app.GetSubspace(govtypes.ModuleName), app.accountKeeper, app.bankKeeper, @@ -440,11 +437,6 @@ func NewInitApp( app.potKeeper, ) - // required because of weird order( - // possible solution is to make all keepers as pointers, hovewer this could break something - app.evmKeeper.SetRegisterKeeper(&app.registerKeeper) - app.evmKeeper.SetSdsKeeper(&app.sdsKeeper) - /**** Module Options ****/ // NOTE: we may consider parsing `appOpts` inside module constructors. For the moment diff --git a/core/statedb/journal.go b/core/statedb/journal.go deleted file mode 100644 index d55b748e..00000000 --- a/core/statedb/journal.go +++ /dev/null @@ -1,133 +0,0 @@ -package statedb - -import ( - "bytes" - "sort" - - sdk "github.com/cosmos/cosmos-sdk/types" -) - -type dirtyObj struct { - storeKey sdk.StoreKey - key StorageKey -} - -func (do *dirtyObj) ObjKey() []byte { - return append([]byte(do.storeKey.Name()), do.key[:]...) -} - -// journalEntry is a modification entry in the state change journal that can be -// reverted on demand. -type journalEntry interface { - // revert undoes the changes introduced by this journal entry. - revert(*KeestateDB) - - // dirtied returns the key modified by this journal entry. - dirtied() *dirtyObj -} - -// journal contains the list of state modifications applied since the last state -// commit. These are tracked to be able to be reverted in the case of an execution -// exception or request for reversal. -type journal struct { - entries []journalEntry // Current changes tracked by the journal - dirties map[sdk.StoreKey]map[StorageKey]int // Dirty accounts and the number of changes -} - -// newJournal creates a new initialized journal. -func newJournal() *journal { - return &journal{ - dirties: make(map[sdk.StoreKey]map[StorageKey]int), - } -} - -// sortedDirties sort the dirty addresses for deterministic iteration -func (j *journal) sortedDirties() []*dirtyObj { - keys := make([]*dirtyObj, 0) - t := 0 - for i := range j.dirties { - for k := range j.dirties[i] { - keys = append(keys, &dirtyObj{ - storeKey: i, - key: k, - }) - t++ - } - } - sort.Slice(keys, func(i, j int) bool { - return bytes.Compare(keys[i].ObjKey(), keys[j].ObjKey()) < 0 - }) - return keys -} - -// append inserts a new modification entry to the end of the change journal. -func (j *journal) append(entry journalEntry) { - j.entries = append(j.entries, entry) - if dirty := entry.dirtied(); dirty != nil { - if _, ok := j.dirties[dirty.storeKey]; !ok { - j.dirties[dirty.storeKey] = make(map[StorageKey]int) - } - j.dirties[dirty.storeKey][dirty.key]++ - } -} - -// revert undoes a batch of journalled modifications along with any reverted -// dirty handling too. -func (j *journal) revert(statedb *KeestateDB, snapshot int) { - for i := len(j.entries) - 1; i >= snapshot; i-- { - // Undo the changes made by the operation - j.entries[i].revert(statedb) - - // Drop any dirty tracking induced by the change - if dirty := j.entries[i].dirtied(); dirty != nil { - if j.dirties[dirty.storeKey][dirty.key]--; j.dirties[dirty.storeKey][dirty.key] == 0 { - delete(j.dirties[dirty.storeKey], dirty.key) - } - } - } - j.entries = j.entries[:snapshot] -} - -// length returns the current number of entries in the journal. -func (j *journal) length() int { - return len(j.entries) -} - -type ( - storageChange struct { - storeKey sdk.StoreKey - key StorageKey - prevalue StorageValue - } - createObjectChange struct { - storeKey sdk.StoreKey - key StorageKey - } - resetObjectChange struct { - prev *stateObject - } -) - -func (ch storageChange) revert(s *KeestateDB) { - s.getStateObject(ch.storeKey, []byte(ch.key)).SetState(ch.prevalue.Result()) -} - -func (ch storageChange) dirtied() *dirtyObj { - return &dirtyObj{storeKey: ch.storeKey, key: ch.key} -} - -func (ch createObjectChange) revert(s *KeestateDB) { - delete(s.stateObjects[ch.storeKey], ch.key) -} - -func (ch createObjectChange) dirtied() *dirtyObj { - return &dirtyObj{storeKey: ch.storeKey, key: ch.key} -} - -func (ch resetObjectChange) revert(s *KeestateDB) { - s.setStateObject(ch.prev) -} - -func (ch resetObjectChange) dirtied() *dirtyObj { - return nil -} diff --git a/core/statedb/state_object.go b/core/statedb/state_object.go deleted file mode 100644 index 2075a779..00000000 --- a/core/statedb/state_object.go +++ /dev/null @@ -1,94 +0,0 @@ -package statedb - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" -) - -// stateObject is the state of an acount -type stateObject struct { - ctx sdk.Context - db *KeestateDB - - storeKey sdk.StoreKey - key StorageKey - value StorageValue - - // state storage - originStorage Storage - dirtyStorage Storage -} - -// newObject creates a state object. -func newObject(db *KeestateDB, storeKey sdk.StoreKey, key StorageKey) *stateObject { - so := &stateObject{ - ctx: db.ctx, - db: db, - storeKey: storeKey, - key: key, - originStorage: make(Storage), - dirtyStorage: make(Storage), - } - if value := so.read(); value.Result() != nil { - so.value = value - } - return so -} - -func (s stateObject) read() StorageValue { - value := s.ctx.KVStore(s.storeKey).Get([]byte(s.key)) - if value != nil { - return NewStorageValue(value) - } - return StorageValue{} -} - -func (s stateObject) store(value StorageValue) { - store := s.ctx.KVStore(s.storeKey) - if value.IsNil() { - store.Delete([]byte(s.key)) - } else { - store.Set([]byte(s.key), value.Result()) - } -} - -// GetCommittedState query the committed state -func (s *stateObject) GetCommittedState() StorageValue { - if value, cached := s.originStorage[s.key]; cached { - return value - } - // If no live objects are available, load it from indexdb - value := s.read() - if value.IsNil() { - return StorageValue{} - } - s.originStorage[s.key] = value - return value -} - -// GetState query the current state (including dirty state) -func (s *stateObject) GetState() StorageValue { - if value, dirty := s.dirtyStorage[s.key]; dirty { - return value - } - return s.GetCommittedState() -} - -// SetState sets the contract state -func (s *stateObject) SetState(value []byte) { - // If the new value is the same as old, don't set - prev := s.GetState() - if prev.Eq(value) { - return - } - // New value is different, update and journal the change - s.db.journal.append(storageChange{ - storeKey: s.storeKey, - key: s.key, - prevalue: prev, - }) - s.setState(value) -} - -func (s *stateObject) setState(value []byte) { - s.dirtyStorage[s.key] = NewStorageValue(value) -} diff --git a/core/statedb/statedb.go b/core/statedb/statedb.go deleted file mode 100644 index 1f4c6fe9..00000000 --- a/core/statedb/statedb.go +++ /dev/null @@ -1,165 +0,0 @@ -package statedb - -import ( - "fmt" - "sort" - - sdk "github.com/cosmos/cosmos-sdk/types" -) - -// revision is the identifier of a version of state. -// it consists of an auto-increment id and a journal index. -// it's safer to use than using journal index alone. -type revision struct { - id int - journalIndex int -} - -type KeestateDB struct { - ctx sdk.Context - - // Journal of state modifications. This is the backbone of - // Snapshot and RevertToSnapshot. - journal *journal - validRevisions []revision - nextRevisionID int - - stateObjects map[sdk.StoreKey]map[StorageKey]*stateObject -} - -// New creates a new state from a given trie. -func New(ctx sdk.Context) *KeestateDB { - return &KeestateDB{ - ctx: ctx, - journal: newJournal(), - stateObjects: make(map[sdk.StoreKey]map[StorageKey]*stateObject), - } -} - -func (ks *KeestateDB) getStateObject(storeKey sdk.StoreKey, key []byte) *stateObject { - skey := StorageKey(key) - // Prefer live objects if any is available - if obj := ks.stateObjects[storeKey][skey]; obj != nil { - return obj - } - - // Insert into the live set - obj := newObject(ks, storeKey, skey) - if obj.value.IsNil() { - // if not, means issue with db, return nil obj - return nil - } - ks.setStateObject(obj) - return obj -} - -func (ks *KeestateDB) getOrNewStateObject(storeKey sdk.StoreKey, key []byte) *stateObject { - stateObject := ks.getStateObject(storeKey, key) - if stateObject == nil { - stateObject, _ = ks.createObject(storeKey, key) - } - return stateObject -} - -func (ks *KeestateDB) setStateObject(object *stateObject) { - if _, ok := ks.stateObjects[object.storeKey]; !ok { - ks.stateObjects[object.storeKey] = make(map[StorageKey]*stateObject) - } - ks.stateObjects[object.storeKey][object.key] = object -} - -func (ks *KeestateDB) createObject(storeKey sdk.StoreKey, key []byte) (newobj, prev *stateObject) { - prev = ks.getStateObject(storeKey, key) - - skey := StorageKey(key) - newobj = newObject(ks, storeKey, skey) - if prev == nil { - ks.journal.append(createObjectChange{storeKey, skey}) - } else { - ks.journal.append(resetObjectChange{prev: prev}) - } - ks.setStateObject(newobj) - if prev != nil { - return newobj, prev - } - return newobj, nil -} - -// SetState sets the keeper state. -func (ks *KeestateDB) SetState(storeKey sdk.StoreKey, key, value []byte) { - stateObject := ks.getOrNewStateObject(storeKey, key) - if stateObject != nil { - stateObject.SetState(value) - } -} - -// GetState retrieves a value from the given key's storage trie. -func (ks *KeestateDB) GetState(storeKey sdk.StoreKey, key []byte) []byte { - stateObject := ks.getStateObject(storeKey, key) - if stateObject != nil { - stateValue := stateObject.GetState() - if !stateValue.IsNil() { - return stateValue.Result() - } - } - return nil -} - -// GetCommittedState retrieves a value from the given key's committed storage trie. -func (ks *KeestateDB) GetCommittedState(storeKey sdk.StoreKey, key []byte) []byte { - stateObject := ks.getStateObject(storeKey, key) - if stateObject != nil { - stateValue := stateObject.GetCommittedState() - if !stateValue.IsNil() { - return stateValue.Result() - } - } - return nil -} - -// Commit all changes to a storage trie -func (ks *KeestateDB) Commit() error { - for _, dirtyObj := range ks.journal.sortedDirties() { - obj := ks.stateObjects[dirtyObj.storeKey][dirtyObj.key] - for _, key := range obj.dirtyStorage.SortedKeys() { - value := obj.dirtyStorage[key] - origin := obj.originStorage[key] - // Skip noop changes, persist actual changes - if value.Eq(origin.Result()) { - continue - } - obj.store(value) - } - } - // no need to clean up as it will be always on fresh ctx - return nil -} - -// Snapshot returns an identifier for the current revision of the state. -func (ks *KeestateDB) Snapshot() int { - id := ks.nextRevisionID - ks.nextRevisionID++ - ks.validRevisions = append(ks.validRevisions, revision{id, ks.journal.length()}) - return id -} - -// RevertToSnapshot reverts all state changes made since the given revision. -func (ks *KeestateDB) RevertToSnapshot(revid int) { - // Find the snapshot in the stack of valid snapshots. - idx := sort.Search(len(ks.validRevisions), func(i int) bool { - return ks.validRevisions[i].id >= revid - }) - if idx == len(ks.validRevisions) || ks.validRevisions[idx].id != revid { - panic(fmt.Errorf("revision id %v cannot be reverted", revid)) - } - snapshot := ks.validRevisions[idx].journalIndex - - // Replay the journal to undo changes and remove invalidated snapshots - ks.journal.revert(ks, snapshot) - ks.validRevisions = ks.validRevisions[:idx] -} - -// GetSdkCtx returns current cosmos sdk context -func (ks *KeestateDB) GetSdkCtx() sdk.Context { - return ks.ctx -} diff --git a/core/statedb/types.go b/core/statedb/types.go deleted file mode 100644 index f1c60ee8..00000000 --- a/core/statedb/types.go +++ /dev/null @@ -1,59 +0,0 @@ -package statedb - -import ( - "bytes" - "sort" - "strings" -) - -type StorageKey string - -func (sk StorageKey) Len() int { - return len(sk) -} - -type StorageValue struct { - value []byte -} - -func (sv *StorageValue) Result() []byte { - return sv.value -} - -func (sv *StorageValue) Eq(v []byte) bool { - if sv.IsNil() && v == nil { - return true - } - if sv.IsNil() && v != nil { - return false - } - if !sv.IsNil() && v == nil { - return false - } - return bytes.Equal(sv.value, v) -} - -func (sv *StorageValue) IsNil() bool { - return sv.value == nil -} - -func NewStorageValue(v []byte) StorageValue { - return StorageValue{value: v} -} - -// Storage represents in-memory cache/buffer of contract storage. -type Storage map[StorageKey]StorageValue - -// SortedKeys sort the keys for deterministic iteration -func (s Storage) SortedKeys() []StorageKey { - keys := make([]StorageKey, len(s)) - i := 0 - for k := range s { - keys[i] = k - i++ - } - sort.Slice(keys, func(i, j int) bool { - return strings.Compare(string(keys[i]), string(keys[j])) < 0 - }) - return keys -} diff --git a/go.mod b/go.mod index 0b52a756..823699c0 100644 --- a/go.mod +++ b/go.mod @@ -6,9 +6,9 @@ require ( github.com/Nik-U/pbc v0.0.0-20181205041846-3e516ca0c5d6 github.com/btcsuite/btcd v0.23.4 github.com/btcsuite/btcd/btcutil v1.1.2 - github.com/cosmos/cosmos-sdk v0.45.10 + github.com/cosmos/cosmos-sdk v0.45.9 github.com/cosmos/go-bip39 v1.0.0 - github.com/cosmos/ibc-go/v3 v3.4.0 + github.com/cosmos/ibc-go/v3 v3.0.0 github.com/davecgh/go-spew v1.1.1 github.com/dop251/goja v0.0.0-20220405120441-9037c2b61cbf github.com/ethereum/go-ethereum v1.10.26 @@ -16,7 +16,6 @@ require ( github.com/golang/protobuf v1.5.2 github.com/gorilla/mux v1.8.0 github.com/grpc-ecosystem/grpc-gateway v1.16.0 - github.com/holiman/uint256 v1.2.0 github.com/improbable-eng/grpc-web v0.15.0 github.com/ipfs/go-cid v0.1.0 github.com/kelindar/bitmap v1.4.1 @@ -31,7 +30,6 @@ require ( github.com/tendermint/tendermint v0.34.25-0.20221221220620-936221e0a8d9 github.com/tendermint/tm-db v0.6.7 github.com/tyler-smith/go-bip39 v1.1.0 - golang.org/x/crypto v0.4.0 google.golang.org/genproto v0.0.0-20221024183307-1bc688fe9f3e google.golang.org/grpc v1.50.1 google.golang.org/protobuf v1.28.2-0.20220831092852-f930b1dc76e8 @@ -77,10 +75,12 @@ require ( github.com/felixge/httpsnoop v1.0.1 // indirect github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect + github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff // indirect github.com/go-kit/kit v0.12.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.5.1 // indirect github.com/go-ole/go-ole v1.2.1 // indirect + github.com/go-playground/validator/v10 v10.4.1 // indirect github.com/go-sourcemap/sourcemap v2.1.3+incompatible // indirect github.com/go-stack/stack v1.8.0 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect @@ -102,6 +102,7 @@ require ( github.com/hashicorp/hcl v1.0.0 // indirect github.com/hdevalence/ed25519consensus v0.0.0-20210204194344-59a8610d2b87 // indirect github.com/holiman/bloomfilter/v2 v2.0.3 // indirect + github.com/holiman/uint256 v1.2.0 // indirect github.com/huin/goupnp v1.0.3 // indirect github.com/inconshreveable/mousetrap v1.0.1 // indirect github.com/jackpal/go-nat-pmp v1.0.2 // indirect @@ -150,6 +151,7 @@ require ( github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible // indirect github.com/spf13/afero v1.9.2 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect + github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4 // indirect github.com/subosito/gotenv v1.4.1 // indirect github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect github.com/tendermint/go-amino v0.16.0 // indirect @@ -161,6 +163,7 @@ require ( github.com/zondax/hid v0.9.1 // indirect github.com/zondax/ledger-go v0.14.1 // indirect go.etcd.io/bbolt v1.3.6 // indirect + golang.org/x/crypto v0.4.0 // indirect golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e // indirect golang.org/x/net v0.4.0 // indirect golang.org/x/sync v0.1.0 // indirect diff --git a/go.sum b/go.sum index ab46df16..639024f2 100644 --- a/go.sum +++ b/go.sum @@ -184,8 +184,8 @@ github.com/cosmos/gorocksdb v1.2.0 h1:d0l3jJG8M4hBouIZq0mDUHZ+zjOx044J3nGRskwTb4 github.com/cosmos/gorocksdb v1.2.0/go.mod h1:aaKvKItm514hKfNJpUJXnnOWeBnk2GL4+Qw9NHizILw= github.com/cosmos/iavl v0.19.4 h1:t82sN+Y0WeqxDLJRSpNd8YFX5URIrT+p8n6oJbJ2Dok= github.com/cosmos/iavl v0.19.4/go.mod h1:X9PKD3J0iFxdmgNLa7b2LYWdsGd90ToV5cAONApkEPw= -github.com/cosmos/ibc-go/v3 v3.4.0 h1:ha3cqEG36pqMWqA1D+kxDWBTZXpeFMd/aZIQF7I0xro= -github.com/cosmos/ibc-go/v3 v3.4.0/go.mod h1:VwB/vWu4ysT5DN2aF78d17LYmx3omSAdq6gpKvM7XRA= +github.com/cosmos/ibc-go/v3 v3.0.0 h1:XUNplHVS51Q2gMnTFsFsH9QJ7flsovMamnltKbEgPQ4= +github.com/cosmos/ibc-go/v3 v3.0.0/go.mod h1:Mb+1NXiPOLd+CPFlOC6BKeAUaxXlhuWenMmRiUiSmwY= github.com/cosmos/keyring v1.1.7-0.20210622111912-ef00f8ac3d76 h1:DdzS1m6o/pCqeZ8VOAit/gyATedRgjvkVI+UCrLpyuU= github.com/cosmos/keyring v1.1.7-0.20210622111912-ef00f8ac3d76/go.mod h1:0mkLWIoZuQ7uBoospo5Q9zIpqq6rYCPJDSUdeCJvPM8= github.com/cosmos/ledger-cosmos-go v0.12.2 h1:/XYaBlE2BJxtvpkHiBm97gFGSGmYGKunKyF3nNqAXZA= @@ -272,12 +272,13 @@ github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMo github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= +github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff h1:tY80oXqGNY4FhTFhk+o9oFHGINQ/+vhlm8HFzi6znCI= github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= -github.com/gin-gonic/gin v1.6.3 h1:ahKqKTFpO5KTPHxWZjEdPScmYaGtLo8Y4DMHoEsnp14= github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= +github.com/gin-gonic/gin v1.7.0 h1:jGB9xAJQ12AIGNB4HguylppmDK1Am9ppF7XnGXXJuoU= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -304,6 +305,7 @@ github.com/go-playground/universal-translator v0.17.0 h1:icxd5fm+REJzpZx7ZfpaD87 github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= github.com/go-playground/validator/v10 v10.4.1 h1:pH2c5ADXtd66mxoE0Zm9SUhxE20r7aM3F26W0hOn+GE= +github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4= github.com/go-sourcemap/sourcemap v2.1.2+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= github.com/go-sourcemap/sourcemap v2.1.3+incompatible h1:W1iEw64niKVGogNgBN3ePyLFfuisuzeidWPMPWmECqU= github.com/go-sourcemap/sourcemap v2.1.3+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= @@ -814,6 +816,7 @@ github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/spf13/viper v1.14.0 h1:Rg7d3Lo706X9tHsJMUjdiwMpHB7W8WnSVOssIY+JElU= github.com/spf13/viper v1.14.0/go.mod h1:WT//axPky3FdvXHzGw33dNdXXXfFQqmEalje+egj8As= +github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4 h1:Gb2Tyox57NRNuZ2d3rmvB3pcmbu7O1RS3m8WRx7ilrg= github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4/go.mod h1:RZLeN1LMWmRsyYjvAu+I6Dm9QmlDaIIt+Y+4Kd7Tp+Q= github.com/steakknife/bloomfilter v0.0.0-20180922174646-6819c0d2a570/go.mod h1:8OR4w3TdeIHIh1g6EMY5p0gVNOovcWC+1vpc7naMuAw= github.com/steakknife/hamming v0.0.0-20180906055917-c99c65617cd3/go.mod h1:hpGUWaI9xL8pRQCTXQgocU38Qw1g0Us7n5PxxTwTCYU= diff --git a/package.json b/package.json deleted file mode 100644 index abe60ead..00000000 --- a/package.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "@stratosnet/stratos-chain", - "private": true, - "workspaces": [ - "packages/gov" - ], - "scripts": { - "gov": "yarn workspace @stratosnet/stratos-chain-gov hh", - "compile": "yarn gov compile", - "test": "yarn gov test" - }, - "packageManager": "yarn@3.2.0", - "version": "1.0.0", - "description": "Stratoschain base launcher for workspace packages", - "main": "index.js", - "repository": "https://github.com/stratosnet/stratos-chain.git", - "author": "BoThe1K ", - "license": "MIT OR Apache-2.0" -} \ No newline at end of file diff --git a/packages/gov/.eslintignore b/packages/gov/.eslintignore deleted file mode 100644 index 85f5562a..00000000 --- a/packages/gov/.eslintignore +++ /dev/null @@ -1,4 +0,0 @@ -node_modules -artifacts -cache -coverage diff --git a/packages/gov/.eslintrc.js b/packages/gov/.eslintrc.js deleted file mode 100644 index 98ce1937..00000000 --- a/packages/gov/.eslintrc.js +++ /dev/null @@ -1,24 +0,0 @@ -module.exports = { - env: { - browser: false, - es2021: true, - mocha: true, - node: true, - }, - plugins: ["@typescript-eslint"], - extends: [ - "standard", - "plugin:prettier/recommended", - "plugin:node/recommended", - ], - parser: "@typescript-eslint/parser", - parserOptions: { - ecmaVersion: 12, - }, - rules: { - "node/no-unsupported-features/es-syntax": [ - "error", - { ignores: ["modules"] }, - ], - }, -}; diff --git a/packages/gov/.gitignore b/packages/gov/.gitignore deleted file mode 100644 index 00dad773..00000000 --- a/packages/gov/.gitignore +++ /dev/null @@ -1,11 +0,0 @@ -node_modules -.env -coverage -coverage.json -typechain -typechain-types - -# Hardhat files -cache -artifacts - diff --git a/packages/gov/.npmignore b/packages/gov/.npmignore deleted file mode 100644 index dc037817..00000000 --- a/packages/gov/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -hardhat.config.ts -scripts -test diff --git a/packages/gov/.prettierignore b/packages/gov/.prettierignore deleted file mode 100644 index f268596e..00000000 --- a/packages/gov/.prettierignore +++ /dev/null @@ -1,5 +0,0 @@ -node_modules -artifacts -cache -coverage* -gasReporterOutput.json diff --git a/packages/gov/.solhint.json b/packages/gov/.solhint.json deleted file mode 100644 index ec2551c5..00000000 --- a/packages/gov/.solhint.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "solhint:recommended", - "rules": { - "compiler-version": [ - "error", - "^0.8.18" - ], - "func-visibility": [ - "warn", - { - "ignoreConstructors": true - } - ] - } -} \ No newline at end of file diff --git a/packages/gov/README.md b/packages/gov/README.md deleted file mode 100644 index 5b7cba6f..00000000 --- a/packages/gov/README.md +++ /dev/null @@ -1,14 +0,0 @@ -# Stratos chain gov contracts - -This contracts relatd to gov mechanics via proxy calls like: - - Prepay - -Try running some of the following tasks: - -```shell -npx hardhat help -npx hardhat test -REPORT_GAS=true npx hardhat test -npx hardhat node -npx hardhat run scripts/deploy.ts -``` diff --git a/packages/gov/contracts/Prepay.sol b/packages/gov/contracts/Prepay.sol deleted file mode 100644 index 7987ca25..00000000 --- a/packages/gov/contracts/Prepay.sol +++ /dev/null @@ -1,48 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity ^0.8.18; - -import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; - -import "./versions/Version0.sol"; - -contract Prepay is Version0, OwnableUpgradeable { - event PrepayCreated( - address indexed sender, - address indexed beneficiery, - uint256 indexed amount, - uint256 purchased - ); - - // ----- proxy ------ - uint256[49] private __gap; - - // ===== fallbacks ===== - - receive() external payable {} - - // Initialize function for proxy constructor. Must be used atomically - function initialize() public initializer { - // proxy inits - __Context_init_unchained(); - __Ownable_init_unchained(); - } - - function prepay() external payable { - uint256 amount = msg.value; - require(amount != 0, "P: ZERO_AMOUNT"); - - uint256[1] memory input; - input[0] = uint256(uint160(msg.sender)); - - uint256[1] memory output; - - assembly { - if iszero(call(not(0), 0xf1, amount, input, 0x20, output, 0x20)) { - revert(0x0, 0x0) - } - } - - emit PrepayCreated(address(this), msg.sender, amount, output[0]); - } -} diff --git a/packages/gov/contracts/mock/PrepayMockOverride.sol b/packages/gov/contracts/mock/PrepayMockOverride.sol deleted file mode 100644 index 361a8289..00000000 --- a/packages/gov/contracts/mock/PrepayMockOverride.sol +++ /dev/null @@ -1,46 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity ^0.8.18; - -import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; - -import "../versions/Version1.sol"; - -contract PrepayMockOverride is Version1, OwnableUpgradeable { - event PrepayCreated( - address indexed sender, - address indexed beneficiery, - uint256 indexed amount, - uint256 purchased - ); - - address public EXECUTOR; - uint8 public IS_TEST; - - // ----- proxy ------ - uint256[47] private __gap; - - // ===== fallbacks ===== - - receive() external payable {} - - function upgrade() public { - require( - _msgSender() == 0x1000000000000000000000000000000000000000, - "PMO: WRONG_SENDER" - ); - IS_TEST = 1; - EXECUTOR = _msgSender(); - } - - // Initialize function for proxy constructor. Must be used atomically - function initialize() public initializer { - // proxy inits - __Context_init_unchained(); - __Ownable_init_unchained(); - } - - function prepay() external { - emit PrepayCreated(address(this), msg.sender, 0, 0); - } -} diff --git a/packages/gov/contracts/versions/Version0.sol b/packages/gov/contracts/versions/Version0.sol deleted file mode 100644 index cfa9f152..00000000 --- a/packages/gov/contracts/versions/Version0.sol +++ /dev/null @@ -1,11 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity ^0.8.0; - -/** - * @title Version0 - * @notice Version getter for contracts - **/ -contract Version0 { - uint8 public constant VERSION = 0; -} diff --git a/packages/gov/contracts/versions/Version1.sol b/packages/gov/contracts/versions/Version1.sol deleted file mode 100644 index 28b6a25e..00000000 --- a/packages/gov/contracts/versions/Version1.sol +++ /dev/null @@ -1,11 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity ^0.8.0; - -/** - * @title Version1 - * @notice Version getter for contracts - **/ -contract Version1 { - uint8 public constant VERSION = 1; -} diff --git a/packages/gov/hardhat.config.ts b/packages/gov/hardhat.config.ts deleted file mode 100644 index 52325a7b..00000000 --- a/packages/gov/hardhat.config.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { HardhatUserConfig, task } from "hardhat/config"; - -import "@nomicfoundation/hardhat-toolbox"; -import "hardhat-gas-reporter"; -import "hardhat-deploy"; -import "@nomiclabs/hardhat-ethers"; - -task("accounts", "Prints the list of accounts", async (taskArgs, hre) => { - const accounts = await hre.ethers.getSigners(); - - for (const account of accounts) { - console.log(account.address); - } -}); - -const config: HardhatUserConfig = { - solidity: "0.8.18", - contractSizer: { - alphaSort: true, - disambiguatePaths: false, - runOnCompile: true, - strict: true, - }, - networks: { - localnet: { - url: "http://localhost:8545", - accounts: { - mnemonic: "test test test test test test test test test test test junk", - }, - loggingEnabled: true, - }, - }, - namedAccounts: { - tester: 0, - }, - mocha: { - timeout: 100000000 - }, -}; - -export default config; diff --git a/packages/gov/package.json b/packages/gov/package.json deleted file mode 100644 index 9649ca8f..00000000 --- a/packages/gov/package.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "@stratosnet/stratos-chain-gov", - "description": "Gov contracts", - "version": "1.0.0", - "main": "index.js", - "directories": { - "hh": "hh" - }, - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "author": "", - "license": "MIT", - "devDependencies": { - "@ethersproject/abi": "^5.4.7", - "@ethersproject/providers": "^5.4.7", - "@nomicfoundation/hardhat-chai-matchers": "^1.0.0", - "@nomicfoundation/hardhat-network-helpers": "^1.0.0", - "@nomicfoundation/hardhat-toolbox": "^2.0.0", - "@nomiclabs/hardhat-ethers": "npm:hardhat-deploy-ethers", - "@nomiclabs/hardhat-etherscan": "^3.0.0", - "@openzeppelin/contracts": "^4.8.3", - "@openzeppelin/contracts-upgradeable": "^4.8.3", - "@openzeppelin/hardhat-upgrades": "^1.23.1", - "@openzeppelin/test-helpers": "^0.5.16", - "@typechain/ethers-v5": "^10.1.0", - "@typechain/hardhat": "^6.1.2", - "@types/chai": "^4.2.0", - "@types/mocha": ">=9.1.0", - "@types/node": ">=12.0.0", - "chai": "^4.2.0", - "ethers": "5.7.2", - "hardhat": "^2.11.1", - "hardhat-deploy": "^0.11.29", - "hardhat-gas-reporter": "^1.0.8", - "hardhat-shorthand": "^1.0.0", - "solidity-coverage": "^0.8.0", - "ts-node": ">=8.0.0", - "typechain": "^8.1.0", - "typescript": ">=4.5.0" - } -} diff --git a/packages/gov/test/Prepay.test.ts b/packages/gov/test/Prepay.test.ts deleted file mode 100644 index 8d81894b..00000000 --- a/packages/gov/test/Prepay.test.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { ethers } from "hardhat" -import { Prepay } from "../typechain-types"; -import { expect } from "chai"; - -describe("Prepay local test", () => { - - // could be changed - const prepayContractAddress = '0x1000000000000000000000000000000000010101'; - const totalUnissuedPrepayAddress = '0xa2776119cb0503aaa30f11b6d3fb1b6ba539c61d'; - - const prepayValue = ethers.utils.parseUnits('1', 'gwei'); - const purchased = ethers.utils.parseUnits('999', 'wei') - - it("should prepay be executed", async () => { - const signer = await ethers.getNamedSigner("tester"); - - console.group('1. Unissued address check') - const balanceBefore = await ethers.provider.getBalance(totalUnissuedPrepayAddress); - console.log("Checking balance before next step for unissued address:", balanceBefore.toString()); - console.groupEnd(); - - console.group('2. Preparations for prepay') - const contract: Prepay = await ethers.getContractAt("Prepay", prepayContractAddress, signer); - console.log(`Executing prepay with "${prepayValue.toString()}" ETH on proxy contract "${prepayContractAddress}"...`) - const tx = contract.prepay({ value: prepayValue }); - - await expect(tx).to - .emit(contract, "PrepayCreated") - .withArgs(contract.address, signer.address, prepayValue, purchased); - - console.log(`Completed, result: "${(await tx).hash}"`); - - const balanceAfter = await ethers.provider.getBalance(totalUnissuedPrepayAddress); - console.log("Checking balance after next step for unissued address:", balanceAfter.toString()); - expect(balanceAfter).to.be.eq(balanceBefore.add(purchased)); - console.groupEnd(); - }) -}) diff --git a/packages/gov/tsconfig.json b/packages/gov/tsconfig.json deleted file mode 100644 index 574e785c..00000000 --- a/packages/gov/tsconfig.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "compilerOptions": { - "target": "es2020", - "module": "commonjs", - "esModuleInterop": true, - "forceConsistentCasingInFileNames": true, - "strict": true, - "skipLibCheck": true, - "resolveJsonModule": true - } -} diff --git a/packages/tsconfig.package.json b/packages/tsconfig.package.json deleted file mode 100644 index 5f06d36d..00000000 --- a/packages/tsconfig.package.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "exclude": [ - "**/dist/**", - "**/node_modules/**", - "**/test/**" - ], - "compilerOptions": { - "composite": true, - "declaration": true, - "declarationMap": true, - "esModuleInterop": true, - "forceConsistentCasingInFileNames": true, - "lib": [ - "es2015", - "es5", - "dom" - ], - "module": "commonjs", - "moduleResolution": "node", - "noEmitOnError": true, - "noFallthroughCasesInSwitch": true, - "noImplicitAny": false, - "noImplicitReturns": false, - "noUnusedLocals": true, - "preserveSymlinks": true, - "preserveWatchOutput": true, - "pretty": false, - "resolveJsonModule": true, - "sourceMap": true, - "target": "es6", - "strict": true - }, - "references": [ - { - "path": "./gov" - }, - ] -} \ No newline at end of file diff --git a/proto/stratos/evm/v1/evm.proto b/proto/stratos/evm/v1/evm.proto index e308cb32..8d5dfe35 100644 --- a/proto/stratos/evm/v1/evm.proto +++ b/proto/stratos/evm/v1/evm.proto @@ -28,10 +28,6 @@ message Params { (gogoproto.moretags) = "yaml:\"fee_market_params\"", (gogoproto.nullable) = false ]; - ProxyProposalParams proxy_proposal_params = 7 [ - (gogoproto.moretags) = "yaml:\"proxy_proposal_params\"", - (gogoproto.nullable) = false - ]; } // ChainConfig defines the Ethereum ChainConfig parameters using *sdk.Int values @@ -265,26 +261,4 @@ message FeeMarketParams { (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false ]; -} - -message ProxyContractInitState { - // height where it should be applied - uint64 height = 1; - // address of proxy contract - string address = 2; - // solidity compiled code - string bin = 3; - // initializer method data - string init = 4; -} - -// Params defines default proxy addresses for futur gov contracts update -message ProxyProposalParams { - // consensus address as msg.sender, used to define admin authority, could be simply zero address or custom - // basically it is an owner of evrything. resposible to add proxies and update proxies implementations - string consensus_address = 1; - // proxy owner who basically the owner of proxy contract (for Ownable purpose, not admin) - string proxy_owner_address = 2; - // proxy contracts name per address reservations - map contracts = 3; } \ No newline at end of file diff --git a/proto/stratos/evm/v1/proposal.proto b/proto/stratos/evm/v1/proposal.proto deleted file mode 100644 index 6ec3ebbc..00000000 --- a/proto/stratos/evm/v1/proposal.proto +++ /dev/null @@ -1,21 +0,0 @@ -syntax = "proto3"; -package stratos.evm.v1; - -import "gogoproto/gogo.proto"; - -option go_package = "github.com/stratosnet/stratos-chain/x/evm/types"; - -// UpdateImplmentationProposal used to update implemntation for genesis proxies -message UpdateImplmentationProposal { - // proxy address where data will be executed - string proxy_address = 1; - // implmentation address as API for a storage - string implementation_address = 2; - // data for execution - bytes data = 3; - // value for proxy func call - string value = 4 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.customname) = "Amount" - ]; -} \ No newline at end of file diff --git a/rpc/namespaces/ethereum/debug/api.go b/rpc/namespaces/ethereum/debug/api.go index 89743869..6ec028d4 100644 --- a/rpc/namespaces/ethereum/debug/api.go +++ b/rpc/namespaces/ethereum/debug/api.go @@ -16,8 +16,11 @@ import ( "time" "github.com/davecgh/go-spew/spew" + "github.com/ethereum/go-ethereum/eth/tracers" stderrors "github.com/pkg/errors" + "github.com/ethereum/go-ethereum/eth/tracers/logger" + "github.com/tendermint/tendermint/libs/log" tmrpctypes "github.com/tendermint/tendermint/rpc/core/types" @@ -33,9 +36,7 @@ import ( "github.com/stratosnet/stratos-chain/rpc/backend" rpctypes "github.com/stratosnet/stratos-chain/rpc/types" - "github.com/stratosnet/stratos-chain/x/evm/tracers" jstracers "github.com/stratosnet/stratos-chain/x/evm/tracers/js" - "github.com/stratosnet/stratos-chain/x/evm/tracers/logger" nativetracers "github.com/stratosnet/stratos-chain/x/evm/tracers/native" evmtypes "github.com/stratosnet/stratos-chain/x/evm/types" tmrpccore "github.com/tendermint/tendermint/rpc/core" @@ -196,7 +197,7 @@ func (a *API) TraceTransaction(ctx context.Context, hash common.Hash, config *tr // TraceBlockByNumber returns the structured logs created during the execution of // EVM and returns them as a JSON object. -func (a *API) TraceBlockByNumber(height rpctypes.BlockNumber, config *evmtypes.TraceConfig) ([]*tracers.TxTraceResult, error) { +func (a *API) TraceBlockByNumber(height rpctypes.BlockNumber, config *evmtypes.TraceConfig) ([]*evmtypes.TxTraceResult, error) { a.logger.Debug("debug_traceBlockByNumber", "height", height) if height == 0 { return nil, errors.New("genesis is not traceable") @@ -213,7 +214,7 @@ func (a *API) TraceBlockByNumber(height rpctypes.BlockNumber, config *evmtypes.T // TraceBlockByHash returns the structured logs created during the execution of // EVM and returns them as a JSON object. -func (a *API) TraceBlockByHash(hash common.Hash, config *evmtypes.TraceConfig) ([]*tracers.TxTraceResult, error) { +func (a *API) TraceBlockByHash(hash common.Hash, config *evmtypes.TraceConfig) ([]*evmtypes.TxTraceResult, error) { a.logger.Debug("debug_traceBlockByHash", "hash", hash) // Get Tendermint Block resBlock, err := a.backend.GetTendermintBlockByHash(hash) @@ -233,13 +234,13 @@ func (a *API) TraceBlockByHash(hash common.Hash, config *evmtypes.TraceConfig) ( // traceBlock configures a new tracer according to the provided configuration, and // executes all the transactions contained within. The return value will be one item // per transaction, dependent on the requested tracer. -func (a *API) traceBlock(height rpctypes.BlockNumber, config *evmtypes.TraceConfig, block *tmrpctypes.ResultBlock) ([]*tracers.TxTraceResult, error) { +func (a *API) traceBlock(height rpctypes.BlockNumber, config *evmtypes.TraceConfig, block *tmrpctypes.ResultBlock) ([]*evmtypes.TxTraceResult, error) { txs := block.Block.Txs txsLength := len(txs) if txsLength == 0 { // If there are no transactions return empty array - return []*tracers.TxTraceResult{}, nil + return []*evmtypes.TxTraceResult{}, nil } txDecoder := a.clientCtx.TxConfig.TxDecoder() @@ -287,7 +288,7 @@ func (a *API) traceBlock(height rpctypes.BlockNumber, config *evmtypes.TraceConf return nil, err } - decodedResults := make([]*tracers.TxTraceResult, txsLength) + decodedResults := make([]*evmtypes.TxTraceResult, txsLength) if err := json.Unmarshal(res.Data, &decodedResults); err != nil { return nil, err } diff --git a/rpc/namespaces/ethereum/eth/api.go b/rpc/namespaces/ethereum/eth/api.go index 49ad7f2c..047e2fb8 100644 --- a/rpc/namespaces/ethereum/eth/api.go +++ b/rpc/namespaces/ethereum/eth/api.go @@ -628,7 +628,7 @@ func (e *PublicAPI) doCall( // return if requested block height is greater than the current one or chain not synced if resBlock == nil || resBlock.Block == nil { - return nil, fmt.Errorf("block not found '%d'", blockNr.Int64()) + return nil, nil } sdkCtx, err := e.backend.GetEVMContext().GetSdkContextWithHeader(&resBlock.Block.Header) diff --git a/types/config.go b/types/config.go index 8116e5fb..63251490 100644 --- a/types/config.go +++ b/types/config.go @@ -91,8 +91,7 @@ func (config *Config) SetBech32PrefixForAccount(addressPrefix, pubKeyPrefix stri } // SetBech32PrefixForValidator builds the Config with Bech32 addressPrefix and publKeyPrefix for validators -// -// and returns the config instance +// and returns the config instance func (config *Config) SetBech32PrefixForValidator(addressPrefix, pubKeyPrefix string) { sdkConfig := sdk.GetConfig() sdkConfig.SetBech32PrefixForValidator(addressPrefix, pubKeyPrefix) diff --git a/x/evm/client/cli/tx.go b/x/evm/client/cli/tx.go index b99366ea..466fd98e 100644 --- a/x/evm/client/cli/tx.go +++ b/x/evm/client/cli/tx.go @@ -11,12 +11,7 @@ import ( "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/input" - "github.com/cosmos/cosmos-sdk/client/tx" - sdk "github.com/cosmos/cosmos-sdk/types" - govcli "github.com/cosmos/cosmos-sdk/x/gov/client/cli" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" - "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" rpctypes "github.com/stratosnet/stratos-chain/rpc/types" @@ -116,97 +111,3 @@ func NewRawTxCmd() *cobra.Command { flags.AddTxFlagsToCmd(cmd) return cmd } - -const ( - FlagProxyAddress = "proxy-address" - FlagImplementationAddress = "implementation-address" - FlagData = "data" - FlagValue = "value" -) - -// NewEVMProxyImplmentationUpgrade implements a command handler for submitting a software upgrade with implementation upgrade for existing gensis proxies -func NewEVMProxyImplmentationUpgrade() *cobra.Command { - cmd := &cobra.Command{ - Use: "evm-proxy-upgrade (--proxy-address [address]) (--implmentation-address [address]) (--data [data]) (--value [value]) [flags]", - Args: cobra.ExactArgs(0), - Short: "Submit an implemntation upgrade for genesis proxy", - Long: "Initial proxy implementation upgrade for defined genesis proxy addresses", - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientTxContext(cmd) - if err != nil { - return err - } - from := clientCtx.GetFromAddress() - - proxyAddrStr, err := cmd.Flags().GetString(FlagProxyAddress) - if err != nil { - return err - } - if !common.IsHexAddress(proxyAddrStr) { - return fmt.Errorf("%s is not a valid Ethereum address", proxyAddrStr) - } - proxyAddr := common.HexToAddress(proxyAddrStr) - - implAddrStr, err := cmd.Flags().GetString(FlagImplementationAddress) - if err != nil { - return err - } - if !common.IsHexAddress(implAddrStr) { - return fmt.Errorf("%s is not a valid Ethereum address", implAddrStr) - } - implAddr := common.HexToAddress(implAddrStr) - - dataStr, err := cmd.Flags().GetString(FlagData) - if err != nil { - return err - } - data, err := hexutil.Decode(dataStr) - if err != nil { - return err - } - - fmt.Println("data", data) - - valueStr, err := cmd.Flags().GetString(FlagValue) - if err != nil { - return err - } - valueCoin, err := sdk.ParseCoinNormalized(valueStr) - if err != nil { - return err - } - value := valueCoin.Amount - - depositStr, err := cmd.Flags().GetString(govcli.FlagDeposit) - if err != nil { - return err - } - deposit, err := sdk.ParseCoinsNormalized(depositStr) - if err != nil { - return err - } - content := types.NewUpdateImplmentationProposal(proxyAddr, implAddr, data, &value) - - msg, err := govtypes.NewMsgSubmitProposal(content, deposit, from) - if err != nil { - return err - } - - if err = msg.ValidateBasic(); err != nil { - return err - } - - return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) - }, - } - - cmd.Flags().String(FlagProxyAddress, "", "proxy address of the contract") - cmd.Flags().String(FlagImplementationAddress, "", "implementation address which should be used for proxy upgrade") - cmd.Flags().String(FlagData, "0x", "addition smart contract data for proxy execution (optional)") - cmd.Flags().String(FlagValue, "0wei", "value of tokens should be used in data execution with payable modifier (optional)") - cmd.Flags().String(govcli.FlagDeposit, "", "deposit of proposal (optional)") - cmd.MarkFlagRequired(FlagProxyAddress) - cmd.MarkFlagRequired(FlagImplementationAddress) - - return cmd -} diff --git a/x/evm/client/proposal_handler.go b/x/evm/client/proposal_handler.go deleted file mode 100644 index d2ec18ee..00000000 --- a/x/evm/client/proposal_handler.go +++ /dev/null @@ -1,25 +0,0 @@ -package client - -import ( - "net/http" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/types/rest" - govclient "github.com/cosmos/cosmos-sdk/x/gov/client" - govrest "github.com/cosmos/cosmos-sdk/x/gov/client/rest" - - "github.com/stratosnet/stratos-chain/x/evm/client/cli" -) - -var ( - EVMChangeProxyImplementationHandler = govclient.NewProposalHandler(cli.NewEVMProxyImplmentationUpgrade, emptyRestHandler) -) - -func emptyRestHandler(client.Context) govrest.ProposalRESTHandler { - return govrest.ProposalRESTHandler{ - SubRoute: "unsupported-evm-client", - Handler: func(w http.ResponseWriter, r *http.Request) { - rest.WriteErrorResponse(w, http.StatusBadRequest, "REST Routes are not supported for EVM proposals") - }, - } -} diff --git a/x/evm/keeper/abci.go b/x/evm/keeper/abci.go index 8d412cbe..14396427 100644 --- a/x/evm/keeper/abci.go +++ b/x/evm/keeper/abci.go @@ -22,8 +22,6 @@ func (k *Keeper) BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock) { k.SetBaseFeeParam(ctx, baseFee) - k.AddGenesisVerifier(ctx) - // Store current base fee in event ctx.EventManager().EmitEvents(sdk.Events{ sdk.NewEvent( @@ -58,14 +56,5 @@ func (k *Keeper) EndBlock(ctx sdk.Context, req abci.RequestEndBlock) []abci.Vali bloom := ethtypes.BytesToBloom(k.GetBlockBloomTransient(infCtx).Bytes()) k.EmitBlockBloomEvent(infCtx, bloom) - pc, err := NewProposalCounsil(k, ctx) - if err != nil { - panic(err) - } - - if err := pc.ApplyGenesisState(uint64(req.Height)); err != nil { - panic(err) - } - return []abci.ValidatorUpdate{} } diff --git a/x/evm/keeper/grpc_query.go b/x/evm/keeper/grpc_query.go index 6f209e74..7a1e6b29 100644 --- a/x/evm/keeper/grpc_query.go +++ b/x/evm/keeper/grpc_query.go @@ -18,14 +18,14 @@ import ( "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/core" ethtypes "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/core/vm" + "github.com/ethereum/go-ethereum/eth/tracers" + "github.com/ethereum/go-ethereum/eth/tracers/logger" ethparams "github.com/ethereum/go-ethereum/params" stratos "github.com/stratosnet/stratos-chain/types" "github.com/stratosnet/stratos-chain/x/evm/statedb" - "github.com/stratosnet/stratos-chain/x/evm/tracers" - "github.com/stratosnet/stratos-chain/x/evm/tracers/logger" "github.com/stratosnet/stratos-chain/x/evm/types" - "github.com/stratosnet/stratos-chain/x/evm/vm" ) var _ types.QueryServer = Keeper{} @@ -388,8 +388,7 @@ func (k Keeper) TraceTx(c context.Context, req *types.QueryTraceTxRequest) (*typ } txConfig.TxHash = ethTx.Hash() txConfig.TxIndex = uint(i) - tracer := tracers.NewNoOpTracer() - rsp, err := k.ApplyMessageWithConfig(ctx, msg, tracer, true, cfg, txConfig) + rsp, err := k.ApplyMessageWithConfig(ctx, msg, types.NewNoOpTracer(), true, cfg, txConfig) if err != nil { continue } @@ -445,11 +444,11 @@ func (k Keeper) TraceBlock(c context.Context, req *types.QueryTraceBlockRequest) } signer := ethtypes.MakeSigner(cfg.ChainConfig, big.NewInt(ctx.BlockHeight())) txsLength := len(req.Txs) - results := make([]*tracers.TxTraceResult, 0, txsLength) + results := make([]*types.TxTraceResult, 0, txsLength) txConfig := statedb.NewEmptyTxConfig(common.BytesToHash(ctx.HeaderHash().Bytes())) for i, tx := range req.Txs { - result := tracers.TxTraceResult{} + result := types.TxTraceResult{} ethTx := tx.AsTransaction() txConfig.TxHash = ethTx.Hash() txConfig.TxIndex = uint(i) @@ -545,7 +544,7 @@ func (k *Keeper) traceTx( } tracer = logger.NewStructLogger(&logConfig) default: - tracer = tracers.NewTracer(tracers.TracerStruct, msg, cfg.ChainConfig, ctx.BlockHeight()) + tracer = types.NewTracer(types.TracerStruct, msg, cfg.ChainConfig, ctx.BlockHeight()) } res, err := k.ApplyMessageWithConfig(ctx, msg, tracer, commitMessage, cfg, txConfig) @@ -565,11 +564,11 @@ func (k *Keeper) traceTx( } else { returnVal = fmt.Sprintf("%x", res.Return()) } - result = tracers.ExecutionResult{ + result = types.ExecutionResult{ Gas: res.GasUsed, Failed: res.Failed(), ReturnValue: returnVal, - StructLogs: tracers.FormatLogs(tracer.StructLogs()), + StructLogs: types.FormatLogs(tracer.StructLogs()), } case tracers.Tracer: result, err = tracer.GetResult() diff --git a/x/evm/keeper/keeper.go b/x/evm/keeper/keeper.go index dceb7e45..bbb3e30f 100644 --- a/x/evm/keeper/keeper.go +++ b/x/evm/keeper/keeper.go @@ -2,7 +2,6 @@ package keeper import ( "math/big" - "sort" "github.com/tendermint/tendermint/libs/log" @@ -15,14 +14,12 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core" ethtypes "github.com/ethereum/go-ethereum/core/types" - + "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/params" stratos "github.com/stratosnet/stratos-chain/types" "github.com/stratosnet/stratos-chain/x/evm/statedb" - "github.com/stratosnet/stratos-chain/x/evm/tracers" "github.com/stratosnet/stratos-chain/x/evm/types" - "github.com/stratosnet/stratos-chain/x/evm/vm" ) // Keeper grants access to the EVM module state and implements the go-ethereum StateDB interface. @@ -49,30 +46,19 @@ type Keeper struct { stakingKeeper types.StakingKeeper // access for pot functionality with related keeper potKeeper types.PotKeeper - // access for registry functionality with related keeper - registerKeeper types.RegisterKeeper - // access for sds functionality with related keeper - sdsKeeper types.SdsKeeper // Tracer used to collect execution traces from the EVM transaction execution tracer string - // genesisContractVerifier verifies is contract is trusted in order to allow curtain opcodes - verifier *vm.GenesisContractVerifier - // EVM Hooks for tx post-processing hooks types.EvmHooks - - // cosmos events to execute when all execution passed - events sdk.Events } // NewKeeper generates new evm module keeper func NewKeeper( cdc codec.BinaryCodec, storeKey, transientKey sdk.StoreKey, paramSpace paramtypes.Subspace, - ak types.AccountKeeper, bankKeeper types.BankKeeper, sk types.StakingKeeper, potKeeper types.PotKeeper, - sdsKeeper types.SdsKeeper, + ak types.AccountKeeper, bankKeeper types.BankKeeper, sk types.StakingKeeper, tracer string, ) *Keeper { // ensure evm module account is set @@ -92,11 +78,9 @@ func NewKeeper( accountKeeper: ak, bankKeeper: bankKeeper, stakingKeeper: sk, - sdsKeeper: sdsKeeper, storeKey: storeKey, transientKey: transientKey, tracer: tracer, - events: make(sdk.Events, 0, 12), } } @@ -105,47 +89,6 @@ func (k Keeper) Logger(ctx sdk.Context) log.Logger { return ctx.Logger().With("module", types.ModuleName) } -func (k *Keeper) SetRegisterKeeper(rk types.RegisterKeeper) { - k.registerKeeper = rk -} - -func (k *Keeper) SetSdsKeeper(sdsk types.SdsKeeper) { - k.sdsKeeper = sdsk -} - -// cosmos events -func (k *Keeper) AddEvents(events sdk.Events) { - k.events = append(k.events, events...) -} - -func (k *Keeper) ApplyEvents(ctx sdk.Context, isVmError bool) { - if len(k.events) > 0 && !isVmError { - ctx.EventManager().EmitEvents(k.events) - } - k.events = k.events[:0] // clear prvious events to avoid conflicts -} - -// AddVerifier adding verifier with initial contracts -func (k *Keeper) AddGenesisVerifier(ctx sdk.Context) { - // could be as cached - if k.verifier != nil { - return - } - - k.verifier = vm.NewGenesisContractVerifier() - - params := k.GetParams(ctx) - keys := make([]string, 0) - for k := range params.ProxyProposalParams.Contracts { - keys = append(keys, k) - } - sort.Strings(keys) - for _, key := range keys { - contract := params.ProxyProposalParams.Contracts[key] - k.verifier.AddContract(contract, true) - } -} - // ---------------------------------------------------------------------------- // Block Bloom // Required by Web3 API. @@ -265,7 +208,7 @@ func (k *Keeper) PostTxProcessing(ctx sdk.Context, msg core.Message, receipt *et // Tracer return a default vm.Tracer based on current keeper state func (k Keeper) Tracer(ctx sdk.Context, msg core.Message, ethCfg *params.ChainConfig) vm.EVMLogger { - return tracers.NewTracer(k.tracer, msg, ethCfg, ctx.BlockHeight()) + return types.NewTracer(k.tracer, msg, ethCfg, ctx.BlockHeight()) } // GetAccountWithoutBalance load nonce and codehash without balance, diff --git a/x/evm/keeper/proposal.go b/x/evm/keeper/proposal.go deleted file mode 100644 index 797bedd3..00000000 --- a/x/evm/keeper/proposal.go +++ /dev/null @@ -1,305 +0,0 @@ -package keeper - -import ( - "bytes" - "fmt" - "math" - "math/big" - - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/params" - - stratos "github.com/stratosnet/stratos-chain/types" - "github.com/stratosnet/stratos-chain/x/evm/statedb" - "github.com/stratosnet/stratos-chain/x/evm/tracers" - "github.com/stratosnet/stratos-chain/x/evm/types" - "github.com/stratosnet/stratos-chain/x/evm/vm" -) - -var ( - emptyCodeHash = crypto.Keccak256Hash(nil) -) - -type ProposalCounsil struct { - keeper *Keeper - ctx sdk.Context - stateDB *statedb.StateDB - evm *vm.EVM - consensusOwner common.Address - proxyOwner common.Address - verifier *vm.GenesisContractVerifier -} - -func NewProposalCounsil(k *Keeper, ctx sdk.Context) (*ProposalCounsil, error) { - params := k.GetParams(ctx) - - pc := &ProposalCounsil{ - keeper: k, - ctx: ctx, - consensusOwner: common.HexToAddress(params.ProxyProposalParams.ConsensusAddress), - proxyOwner: common.HexToAddress(params.ProxyProposalParams.ProxyOwnerAddress), - verifier: k.verifier, - } - cfg, err := k.EVMConfig(ctx) - if err != nil { - return nil, sdkerrors.Wrap(err, "failed to load evm config") - } - - blockCtx := vm.BlockContext{ - CanTransfer: vm.CanTransfer, - Transfer: vm.Transfer, - GetHash: k.GetHashFn(ctx), - Coinbase: cfg.CoinBase, - GasLimit: stratos.BlockGasLimit(ctx), - BlockNumber: big.NewInt(ctx.BlockHeight()), - Time: big.NewInt(ctx.BlockHeader().Time.Unix()), - Difficulty: big.NewInt(0), // unused. Only required in PoW context - BaseFee: cfg.BaseFee, - } - - txCtx := vm.TxContext{ - Origin: pc.consensusOwner, - GasPrice: big.NewInt(0), - } - tracer := tracers.NewNoOpTracer() - vmConfig := k.VMConfig(ctx, cfg, tracer) - - txConfig := statedb.NewEmptyTxConfig(common.BytesToHash(ctx.HeaderHash())) - pc.stateDB = statedb.New(ctx, pc.keeper, txConfig) - pc.evm = vm.NewEVM(blockCtx, txCtx, pc.stateDB, cfg.ChainConfig, vmConfig, pc.verifier) - - return pc, nil -} - -func (pc *ProposalCounsil) finalize() error { - if err := pc.stateDB.Commit(); err != nil { - return err - } - return nil -} - -func (pc *ProposalCounsil) call(sender, contractAddress common.Address, data []byte, value *big.Int) error { - // required - txCtx := vm.TxContext{ - Origin: sender, - GasPrice: big.NewInt(0), - } - pc.evm.Reset(txCtx, pc.stateDB) - - nonce := pc.stateDB.GetNonce(sender) - // we do not care about gas during consil execution - gas := uint64(math.MaxUint64) - // for safety - if value == nil { - value = big.NewInt(0) - } - - { - pc.stateDB.SetNonce(sender, nonce+1) - } - - if _, _, vmErr := pc.evm.Call(vm.AccountRef(sender), contractAddress, data, gas, value); vmErr != nil { - return vmErr - } - return nil -} - -func (pc *ProposalCounsil) create(sender, contractAddress common.Address, data []byte, value *big.Int) (*common.Address, error) { - // required - txCtx := vm.TxContext{ - Origin: sender, - GasPrice: big.NewInt(0), - } - pc.evm.Reset(txCtx, pc.stateDB) - - nonce := pc.stateDB.GetNonce(sender) - // we do not care about gas during consil execution - gas := uint64(math.MaxUint64) - - // for safety - if value == nil { - value = big.NewInt(0) - } - - interpreter := vm.NewEVMInterpreter(pc.evm, pc.evm.Config) - - accRef := vm.AccountRef(sender) - - { - pc.stateDB.SetNonce(accRef.Address(), nonce+1) - } - - contractHash := pc.evm.StateDB.GetCodeHash(contractAddress) - if pc.evm.StateDB.GetNonce(contractAddress) != 0 || (contractHash != (common.Hash{}) && contractHash != emptyCodeHash) { - return nil, vm.ErrContractAddressCollision - } - - snapshot := pc.evm.StateDB.Snapshot() - - pc.evm.StateDB.CreateAccount(contractAddress) - pc.evm.StateDB.SetNonce(contractAddress, 1) - pc.evm.Context.Transfer(pc.evm.StateDB, sender, contractAddress, value) - - contract := vm.NewContract(accRef, vm.AccountRef(contractAddress), value, gas) - contract.SetCallCode(&contractAddress, common.Hash{}, data) - - ret, err := interpreter.Run(contract, nil, false) - if err != nil { - return nil, err - } - - // Check whether the max code size has been exceeded, assign err if the case. - if err == nil && len(ret) > params.MaxCodeSize { - err = vm.ErrMaxCodeSizeExceeded - } - - // Reject code starting with 0xEF if EIP-3541 is enabled. - if err == nil && len(ret) >= 1 && ret[0] == 0xEF { - err = vm.ErrInvalidCode - } - - // if the contract creation ran successfully and no errors were returned - // calculate the gas required to store the code. If the code could not - // be stored due to not enough gas set an error and let it be handled - // by the error checking condition below. - if err == nil { - createDataGas := uint64(len(ret)) * params.CreateDataGas - if contract.UseGas(createDataGas) { - pc.evm.StateDB.SetCode(contractAddress, ret) - } else { - err = vm.ErrCodeStoreOutOfGas - } - } - - // When an error was returned by the EVM or when setting the creation code - // above we revert to the snapshot and consume any gas remaining. Additionally - // when we're in homestead this also counts for code storage gas errors. - if err != nil { - pc.evm.StateDB.RevertToSnapshot(snapshot) - if err != vm.ErrExecutionReverted { - contract.UseGas(contract.Gas) - } - } - - return &contractAddress, nil -} - -func (pc *ProposalCounsil) ApplyGenesisState(height uint64) error { - contracts := pc.verifier.GetContracts(height) - - if len(contracts) == 0 { - return nil - } - - for _, contract := range contracts { - implAddr := crypto.CreateAddress(pc.consensusOwner, pc.stateDB.GetNonce(pc.consensusOwner)) - proxyAddr := common.HexToAddress(contract.GetAddress()) - - bin, err := hexutil.Decode(contract.GetBin()) - if err != nil { - return err - } - - data, err := hexutil.Decode(contract.GetInit()) - if err != nil { - return err - } - - implCode := pc.stateDB.GetCode(implAddr) - if implCode == nil { - if _, err := pc.create(pc.proxyOwner, implAddr, bin, nil); err != nil { - return sdkerrors.Wrapf(err, "failed to get or create address on '%s'", implAddr) - } - } - - value := sdk.NewInt(0) - c := types.NewUpdateImplmentationProposal( - proxyAddr, - implAddr, - data, - &value, - ) - - if err := c.ValidateBasic(); err != nil { - return err - } - - if err = pc.updateProxyImplementation(c.(*types.UpdateImplmentationProposal), false); err != nil { - return err - } - } - if err := pc.finalize(); err != nil { - return err - } - return nil -} - -func (pc *ProposalCounsil) UpdateProxyImplementation(p *types.UpdateImplmentationProposal) error { - return pc.updateProxyImplementation(p, true) -} - -// updateProxyImplementation execute provided function to a proxy contract for impl upgrade -func (pc *ProposalCounsil) updateProxyImplementation(p *types.UpdateImplmentationProposal, commit bool) error { - if !pc.verifier.IsTrustedAddress(p.ProxyAddress) { - return fmt.Errorf("proxy '%s' has not been verified", p.ProxyAddress) - } - - proxyAddress := common.HexToAddress(p.ProxyAddress) - implAddress := common.HexToAddress(p.ImplementationAddress) - - implCode := pc.stateDB.GetCode(implAddress) - if implCode == nil { - return fmt.Errorf("implementation '%s' not found", implAddress) - } - - if bytes.Equal(implCode, emptyCodeHash[:]) { - return fmt.Errorf("implementation '%s' is EOA", implAddress) - } - - proxyCode := pc.stateDB.GetCode(proxyAddress) - if proxyCode != nil { - upgradeData, err := types.EncodeContractFunc( - types.TransparentUpgradableProxyABI, - "upgradeToAndCall", - implAddress, - p.Data, - ) - if err != nil { - return err - } - - if err := pc.call(pc.consensusOwner, proxyAddress, upgradeData, p.Amount.BigInt()); err != nil { - return err - } - } else { - proxyConstructorData, err := types.EncodeContractFunc( - types.TransparentUpgradableProxyABI, - "", - implAddress, - pc.consensusOwner, - p.Data, - ) - if err != nil { - return err - } - - proxyConstructorData = append(common.FromHex(types.TransparentUpgradableProxyBin), proxyConstructorData...) - - if _, err := pc.create(pc.proxyOwner, proxyAddress, proxyConstructorData, p.Amount.BigInt()); err != nil { - return err - } - } - - if commit { - if err := pc.finalize(); err != nil { - return err - } - } - - return nil -} diff --git a/x/evm/keeper/state_transition.go b/x/evm/keeper/state_transition.go index bd434ca7..b9dd1588 100644 --- a/x/evm/keeper/state_transition.go +++ b/x/evm/keeper/state_transition.go @@ -15,16 +15,13 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core" ethtypes "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/params" stratos "github.com/stratosnet/stratos-chain/types" "github.com/stratosnet/stratos-chain/x/evm/statedb" - "github.com/stratosnet/stratos-chain/x/evm/tracers" "github.com/stratosnet/stratos-chain/x/evm/types" - "github.com/stratosnet/stratos-chain/x/evm/vm" - registertypes "github.com/stratosnet/stratos-chain/x/register/types" - sdstypes "github.com/stratosnet/stratos-chain/x/sds/types" ) // GasToRefund calculates the amount of gas the state machine should refund to the sender. It is @@ -44,6 +41,7 @@ func (k *Keeper) EVMConfig(ctx sdk.Context) (*types.EVMConfig, error) { params := k.GetParams(ctx) ethCfg := params.ChainConfig.EthereumConfig() + // get the coinbase address from the block proposer coinbase, err := k.GetCoinbaseAddress(ctx) if err != nil { return nil, sdkerrors.Wrap(err, "failed to obtain coinbase address") @@ -80,10 +78,9 @@ func (k *Keeper) NewEVM( stateDB vm.StateDB, ) *vm.EVM { blockCtx := vm.BlockContext{ - CanTransfer: vm.CanTransfer, - Transfer: vm.Transfer, + CanTransfer: core.CanTransfer, + Transfer: core.Transfer, GetHash: k.GetHashFn(ctx), - Prepay: k.PrepayFn(ctx), Coinbase: cfg.CoinBase, GasLimit: stratos.BlockGasLimit(ctx), BlockNumber: big.NewInt(ctx.BlockHeight()), @@ -92,25 +89,24 @@ func (k *Keeper) NewEVM( BaseFee: cfg.BaseFee, } - txCtx := vm.NewEVMTxContext(msg) + txCtx := core.NewEVMTxContext(msg) if tracer == nil { tracer = k.Tracer(ctx, msg, cfg.ChainConfig) } - vmConfig := k.VMConfig(ctx, cfg, tracer) - return vm.NewEVM(blockCtx, txCtx, stateDB, cfg.ChainConfig, vmConfig, k.verifier) + vmConfig := k.VMConfig(ctx, msg, cfg, tracer) + return vm.NewEVM(blockCtx, txCtx, stateDB, cfg.ChainConfig, vmConfig) } // VMConfig creates an EVM configuration from the debug setting and the extra EIPs enabled on the // module parameters. The config generated uses the default JumpTable from the EVM. -func (k Keeper) VMConfig(ctx sdk.Context, cfg *types.EVMConfig, tracer vm.EVMLogger) vm.Config { +func (k Keeper) VMConfig(ctx sdk.Context, msg core.Message, cfg *types.EVMConfig, tracer vm.EVMLogger) vm.Config { noBaseFee := true if types.IsLondon(cfg.ChainConfig, ctx.BlockHeight()) { noBaseFee = k.GetParams(ctx).FeeMarketParams.NoBaseFee } var debug bool - - if _, ok := tracer.(tracers.NoOpTracer); !ok { + if _, ok := tracer.(types.NoOpTracer); !ok { debug = true noBaseFee = true } @@ -123,59 +119,6 @@ func (k Keeper) VMConfig(ctx sdk.Context, cfg *types.EVMConfig, tracer vm.EVMLog } } -func (k *Keeper) PrepayFn(ctx sdk.Context) vm.PrepayFunc { - return func(evm *vm.EVM, from, beneficiary common.Address, amount *big.Int, gas uint64) (*big.Int, uint64, error) { - if amount.Sign() == 0 { - return nil, gas, vm.ErrExecutionReverted - } - if gas < vm.ReturnGasPrepay { - return nil, gas, vm.ErrGasUintOverflow - } - // NOTE: Required to return correct left gas amount to solidity - returnGas := gas - vm.ReturnGasPrepay - - kdb := evm.StateDB.GetKeestateDB() - kSnapshot := evm.StateDB.KeeSnapshot() - - accFrom := sdk.AccAddress(from.Bytes()) - accBeneficiary := sdk.AccAddress(beneficiary.Bytes()) - - purchased, remaining, err := k.KeeCalculatePrepayPurchaseAmount(evm.StateDB, sdk.NewIntFromBigInt(amount)) - if err != nil { - evm.StateDB.RevertToKeeSnapshot(kSnapshot) - - return nil, returnGas, vm.ErrExecutionReverted - } - - to := common.BytesToAddress(authtypes.NewModuleAddress(registertypes.TotalUnissuedPrepay)) - - if !evm.StateDB.Exist(to) { - evm.StateDB.CreateAccount(to) - } - - evm.Context.Transfer(evm.StateDB, from, to, purchased.BigInt()) - - k.registerKeeper.KeeSetRemainingOzoneLimit(kdb, remaining) - - k.AddEvents(sdk.Events{ - sdk.NewEvent( - sdstypes.EventTypePrepay, - sdk.NewAttribute(sdk.AttributeKeySender, accFrom.String()), - sdk.NewAttribute(sdstypes.AttributeKeyBeneficiary, accBeneficiary.String()), - sdk.NewAttribute(sdstypes.AttributeKeyAmount, sdk.NewIntFromBigInt(amount).String()), - sdk.NewAttribute(sdstypes.AttributeKeyPurchasedNoz, purchased.String()), - ), - sdk.NewEvent( - sdk.EventTypeMessage, - sdk.NewAttribute(sdk.AttributeKeyModule, sdstypes.AttributeValueCategory), - sdk.NewAttribute(sdk.AttributeKeySender, accFrom.String()), - ), - }) - - return purchased.BigInt(), returnGas, nil - } -} - // GetHashFn implements vm.GetHashFunc for stratos. It handles 3 cases: // 1. The requested height matches the current height from context (and thus same epoch number) // 2. The requested height is from an previous height from the same chain epoch @@ -483,8 +426,6 @@ func (k *Keeper) ApplyMessageWithConfig(ctx sdk.Context, msg core.Message, trace } } - k.ApplyEvents(ctx, vmErr != nil) - return &types.MsgEthereumTxResponse{ GasUsed: gasUsed, VmError: vmError, diff --git a/x/evm/keeper/store.go b/x/evm/keeper/store.go deleted file mode 100644 index 1f4109d6..00000000 --- a/x/evm/keeper/store.go +++ /dev/null @@ -1,42 +0,0 @@ -package keeper - -import ( - "fmt" - - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/ethereum/go-ethereum/common" - "github.com/stratosnet/stratos-chain/x/evm/vm" - regtypes "github.com/stratosnet/stratos-chain/x/register/types" -) - -func (k Keeper) KeeGetTotalUnissuedPrepay(statedb vm.StateDB) (value sdk.Int) { - totalUnissuedPrepayAccAddr := k.accountKeeper.GetModuleAddress(regtypes.TotalUnissuedPrepay) - if totalUnissuedPrepayAccAddr == nil { - value = sdk.ZeroInt() - } else { - value = sdk.NewIntFromBigInt(statedb.GetBalance(common.BytesToAddress(totalUnissuedPrepayAccAddr))) - } - - return -} - -func (k *Keeper) KeeCalculatePrepayPurchaseAmount(statedb vm.StateDB, amount sdk.Int) (sdk.Int, sdk.Int, error) { - kdb := statedb.GetKeestateDB() - St := k.registerKeeper.KeeGetEffectiveTotalDeposit(kdb) - Pt := k.KeeGetTotalUnissuedPrepay(statedb) - Lt := k.registerKeeper.KeeGetRemainingOzoneLimit(kdb) - - purchase := Lt.ToDec(). - Mul(amount.ToDec()). - Quo((St. - Add(Pt). - Add(amount)).ToDec()). - TruncateInt() - if purchase.GT(Lt) { - return sdk.NewInt(0), sdk.NewInt(0), fmt.Errorf("not enough remaining ozone limit to complete prepay") - } - - remaining := Lt.Sub(purchase) - - return purchase, remaining, nil -} diff --git a/x/evm/proposal_handler.go b/x/evm/proposal_handler.go deleted file mode 100644 index 8ac002d3..00000000 --- a/x/evm/proposal_handler.go +++ /dev/null @@ -1,28 +0,0 @@ -package evm - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" - - "github.com/stratosnet/stratos-chain/x/evm/keeper" - "github.com/stratosnet/stratos-chain/x/evm/types" -) - -// NewEVMChangeProposalHandler defines the evm changes proposals -func NewEVMChangeProposalHandler(k *keeper.Keeper) govtypes.Handler { - return func(ctx sdk.Context, content govtypes.Content) error { - pc, err := keeper.NewProposalCounsil(k, ctx) - if err != nil { - return err - } - - switch c := content.(type) { - case *types.UpdateImplmentationProposal: - return pc.UpdateProxyImplementation(c) - - default: - return sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "unrecognized proxy proposal content type: %T", c) - } - } -} diff --git a/x/evm/simulation/genesis.go b/x/evm/simulation/genesis.go index f6d60a98..7cd73a3c 100644 --- a/x/evm/simulation/genesis.go +++ b/x/evm/simulation/genesis.go @@ -41,7 +41,7 @@ func GenEnableCall(r *rand.Rand) bool { // RandomizedGenState generates a random GenesisState for the EVM module func RandomizedGenState(simState *module.SimulationState) { feeMarketParams := types.NewFeeMarketParams(simState.Rand.Uint32()%2 == 0, simState.Rand.Uint32(), simState.Rand.Uint32(), simState.Rand.Uint64(), simState.Rand.Int63()) - proxyParams := types.DefaultProxyProposalParams() + // evm params var extraEIPs []int64 @@ -50,7 +50,7 @@ func RandomizedGenState(simState *module.SimulationState) { func(r *rand.Rand) { extraEIPs = GenExtraEIPs(r) }, ) - params := types.NewParams(types.DefaultEVMDenom, true, true, types.DefaultChainConfig(), feeMarketParams, proxyParams, extraEIPs...) + params := types.NewParams(types.DefaultEVMDenom, true, true, types.DefaultChainConfig(), feeMarketParams, extraEIPs...) evmGenesis := types.NewGenesisState(params, []types.GenesisAccount{}) bz, err := json.MarshalIndent(evmGenesis, "", " ") diff --git a/x/evm/statedb/statedb.go b/x/evm/statedb/statedb.go index c13e1e5a..e075308d 100644 --- a/x/evm/statedb/statedb.go +++ b/x/evm/statedb/statedb.go @@ -9,9 +9,8 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/ethereum/go-ethereum/common" ethtypes "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/crypto" - keestatedb "github.com/stratosnet/stratos-chain/core/statedb" - "github.com/stratosnet/stratos-chain/x/evm/vm" ) // revision is the identifier of a version of state. @@ -51,9 +50,6 @@ type StateDB struct { // Per-transaction access list accessList *accessList - - // core keestatedb for basic keeper commit state changes - keestatedb *keestatedb.KeestateDB } // New creates a new state from a given trie. @@ -66,7 +62,6 @@ func New(ctx sdk.Context, keeper Keeper, txConfig TxConfig) *StateDB { accessList: newAccessList(), logs: make([]*ethtypes.Log, 0), txConfig: txConfig, - keestatedb: keestatedb.New(ctx), } } @@ -255,8 +250,8 @@ func (s *StateDB) createObject(addr common.Address) (newobj, prev *stateObject) // CreateAccount is called during the EVM CREATE operation. The situation might arise that // a contract does the following: // -// 1. sends funds to sha(account ++ (nonce + 1)) -// 2. tx_create(sha(account ++ nonce)) (note that this gets the address of 1) +// 1. sends funds to sha(account ++ (nonce + 1)) +// 2. tx_create(sha(account ++ nonce)) (note that this gets the address of 1) // // Carrying over the balance ensures that Ether doesn't disappear. func (s *StateDB) CreateAccount(addr common.Address) { @@ -464,30 +459,5 @@ func (s *StateDB) Commit() error { } } } - if err := s.keestatedb.Commit(); err != nil { - return err - } return nil } - -// proxy methods to keestatedb - -func (s *StateDB) GetKeestateDB() *keestatedb.KeestateDB { - return s.keestatedb -} - -func (s *StateDB) GetKeeState(storeKey sdk.StoreKey, key []byte) []byte { - return s.keestatedb.GetState(storeKey, key) -} - -func (s *StateDB) SetKeeState(storeKey sdk.StoreKey, key, value []byte) { - s.keestatedb.SetState(storeKey, key, value) -} - -func (s *StateDB) RevertToKeeSnapshot(revid int) { - s.keestatedb.RevertToSnapshot(revid) -} - -func (s *StateDB) KeeSnapshot() int { - return s.keestatedb.Snapshot() -} diff --git a/x/evm/tracers/js/goja.go b/x/evm/tracers/js/goja.go index 2129e89c..adbcfcaf 100644 --- a/x/evm/tracers/js/goja.go +++ b/x/evm/tracers/js/goja.go @@ -27,11 +27,9 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" - ethvm "github.com/ethereum/go-ethereum/core/vm" + "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/crypto" - "github.com/stratosnet/stratos-chain/x/evm/tracers" - "github.com/stratosnet/stratos-chain/x/evm/vm" - + "github.com/ethereum/go-ethereum/eth/tracers" jsassets "github.com/stratosnet/stratos-chain/x/evm/tracers/js/internal/tracers" ) @@ -643,7 +641,7 @@ func (s *stackObj) setupObject() *goja.Object { } type dbObj struct { - db ethvm.StateDB + db vm.StateDB vm *goja.Runtime toBig toBigFn toBuf toBufFn diff --git a/x/evm/tracers/logger/access_list_tracer.go b/x/evm/tracers/logger/access_list_tracer.go deleted file mode 100644 index 88cad6c1..00000000 --- a/x/evm/tracers/logger/access_list_tracer.go +++ /dev/null @@ -1,184 +0,0 @@ -// Copyright 2021 The go-ethereum Authors -// This file is part of the go-ethereum library. -// -// The go-ethereum library is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// The go-ethereum library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . - -package logger - -import ( - "math/big" - "time" - - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" - "github.com/stratosnet/stratos-chain/x/evm/vm" -) - -// accessList is an accumulator for the set of accounts and storage slots an EVM -// contract execution touches. -type accessList map[common.Address]accessListSlots - -// accessListSlots is an accumulator for the set of storage slots within a single -// contract that an EVM contract execution touches. -type accessListSlots map[common.Hash]struct{} - -// newAccessList creates a new accessList. -func newAccessList() accessList { - return make(map[common.Address]accessListSlots) -} - -// addAddress adds an address to the accesslist. -func (al accessList) addAddress(address common.Address) { - // Set address if not previously present - if _, present := al[address]; !present { - al[address] = make(map[common.Hash]struct{}) - } -} - -// addSlot adds a storage slot to the accesslist. -func (al accessList) addSlot(address common.Address, slot common.Hash) { - // Set address if not previously present - al.addAddress(address) - - // Set the slot on the surely existent storage set - al[address][slot] = struct{}{} -} - -// equal checks if the content of the current access list is the same as the -// content of the other one. -func (al accessList) equal(other accessList) bool { - // Cross reference the accounts first - if len(al) != len(other) { - return false - } - // Given that len(al) == len(other), we only need to check that - // all the items from al are in other. - for addr := range al { - if _, ok := other[addr]; !ok { - return false - } - } - - // Accounts match, cross reference the storage slots too - for addr, slots := range al { - otherslots := other[addr] - - if len(slots) != len(otherslots) { - return false - } - // Given that len(slots) == len(otherslots), we only need to check that - // all the items from slots are in otherslots. - for hash := range slots { - if _, ok := otherslots[hash]; !ok { - return false - } - } - } - return true -} - -// accesslist converts the accesslist to a types.AccessList. -func (al accessList) accessList() types.AccessList { - acl := make(types.AccessList, 0, len(al)) - for addr, slots := range al { - tuple := types.AccessTuple{Address: addr, StorageKeys: []common.Hash{}} - for slot := range slots { - tuple.StorageKeys = append(tuple.StorageKeys, slot) - } - acl = append(acl, tuple) - } - return acl -} - -// AccessListTracer is a tracer that accumulates touched accounts and storage -// slots into an internal set. -type AccessListTracer struct { - excl map[common.Address]struct{} // Set of account to exclude from the list - list accessList // Set of accounts and storage slots touched -} - -// NewAccessListTracer creates a new tracer that can generate AccessLists. -// An optional AccessList can be specified to occupy slots and addresses in -// the resulting accesslist. -func NewAccessListTracer(acl types.AccessList, from, to common.Address, precompiles []common.Address) *AccessListTracer { - excl := map[common.Address]struct{}{ - from: {}, to: {}, - } - for _, addr := range precompiles { - excl[addr] = struct{}{} - } - list := newAccessList() - for _, al := range acl { - if _, ok := excl[al.Address]; !ok { - list.addAddress(al.Address) - } - for _, slot := range al.StorageKeys { - list.addSlot(al.Address, slot) - } - } - return &AccessListTracer{ - excl: excl, - list: list, - } -} - -func (a *AccessListTracer) CaptureStart(env *vm.EVM, from common.Address, to common.Address, create bool, input []byte, gas uint64, value *big.Int) { -} - -// CaptureState captures all opcodes that touch storage or addresses and adds them to the accesslist. -func (a *AccessListTracer) CaptureState(pc uint64, op vm.OpCode, gas, cost uint64, scope *vm.ScopeContext, rData []byte, depth int, err error) { - stack := scope.Stack - stackData := stack.Data() - stackLen := len(stackData) - if (op == vm.SLOAD || op == vm.SSTORE) && stackLen >= 1 { - slot := common.Hash(stackData[stackLen-1].Bytes32()) - a.list.addSlot(scope.Contract.Address(), slot) - } - if (op == vm.EXTCODECOPY || op == vm.EXTCODEHASH || op == vm.EXTCODESIZE || op == vm.BALANCE || op == vm.SELFDESTRUCT) && stackLen >= 1 { - addr := common.Address(stackData[stackLen-1].Bytes20()) - if _, ok := a.excl[addr]; !ok { - a.list.addAddress(addr) - } - } - if (op == vm.DELEGATECALL || op == vm.CALL || op == vm.STATICCALL || op == vm.CALLCODE) && stackLen >= 5 { - addr := common.Address(stackData[stackLen-2].Bytes20()) - if _, ok := a.excl[addr]; !ok { - a.list.addAddress(addr) - } - } -} - -func (*AccessListTracer) CaptureFault(pc uint64, op vm.OpCode, gas, cost uint64, scope *vm.ScopeContext, depth int, err error) { -} - -func (*AccessListTracer) CaptureEnd(output []byte, gasUsed uint64, t time.Duration, err error) {} - -func (*AccessListTracer) CaptureEnter(typ vm.OpCode, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) { -} - -func (*AccessListTracer) CaptureExit(output []byte, gasUsed uint64, err error) {} - -func (*AccessListTracer) CaptureTxStart(gasLimit uint64) {} - -func (*AccessListTracer) CaptureTxEnd(restGas uint64) {} - -// AccessList returns the current accesslist maintained by the tracer. -func (a *AccessListTracer) AccessList() types.AccessList { - return a.list.accessList() -} - -// Equal returns if the content of two access list traces are equal. -func (a *AccessListTracer) Equal(other *AccessListTracer) bool { - return a.list.equal(other.list) -} diff --git a/x/evm/tracers/logger/gen_structlog.go b/x/evm/tracers/logger/gen_structlog.go deleted file mode 100644 index f6968a0f..00000000 --- a/x/evm/tracers/logger/gen_structlog.go +++ /dev/null @@ -1,110 +0,0 @@ -// Code generated by github.com/fjl/gencodec. DO NOT EDIT. - -package logger - -import ( - "encoding/json" - - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/ethereum/go-ethereum/common/math" - "github.com/stratosnet/stratos-chain/x/evm/vm" - "github.com/holiman/uint256" -) - -var _ = (*structLogMarshaling)(nil) - -// MarshalJSON marshals as JSON. -func (s StructLog) MarshalJSON() ([]byte, error) { - type StructLog struct { - Pc uint64 `json:"pc"` - Op vm.OpCode `json:"op"` - Gas math.HexOrDecimal64 `json:"gas"` - GasCost math.HexOrDecimal64 `json:"gasCost"` - Memory hexutil.Bytes `json:"memory,omitempty"` - MemorySize int `json:"memSize"` - Stack []uint256.Int `json:"stack"` - ReturnData hexutil.Bytes `json:"returnData,omitempty"` - Storage map[common.Hash]common.Hash `json:"-"` - Depth int `json:"depth"` - RefundCounter uint64 `json:"refund"` - Err error `json:"-"` - OpName string `json:"opName"` - ErrorString string `json:"error,omitempty"` - } - var enc StructLog - enc.Pc = s.Pc - enc.Op = s.Op - enc.Gas = math.HexOrDecimal64(s.Gas) - enc.GasCost = math.HexOrDecimal64(s.GasCost) - enc.Memory = s.Memory - enc.MemorySize = s.MemorySize - enc.Stack = s.Stack - enc.ReturnData = s.ReturnData - enc.Storage = s.Storage - enc.Depth = s.Depth - enc.RefundCounter = s.RefundCounter - enc.Err = s.Err - enc.OpName = s.OpName() - enc.ErrorString = s.ErrorString() - return json.Marshal(&enc) -} - -// UnmarshalJSON unmarshals from JSON. -func (s *StructLog) UnmarshalJSON(input []byte) error { - type StructLog struct { - Pc *uint64 `json:"pc"` - Op *vm.OpCode `json:"op"` - Gas *math.HexOrDecimal64 `json:"gas"` - GasCost *math.HexOrDecimal64 `json:"gasCost"` - Memory *hexutil.Bytes `json:"memory,omitempty"` - MemorySize *int `json:"memSize"` - Stack []uint256.Int `json:"stack"` - ReturnData *hexutil.Bytes `json:"returnData,omitempty"` - Storage map[common.Hash]common.Hash `json:"-"` - Depth *int `json:"depth"` - RefundCounter *uint64 `json:"refund"` - Err error `json:"-"` - } - var dec StructLog - if err := json.Unmarshal(input, &dec); err != nil { - return err - } - if dec.Pc != nil { - s.Pc = *dec.Pc - } - if dec.Op != nil { - s.Op = *dec.Op - } - if dec.Gas != nil { - s.Gas = uint64(*dec.Gas) - } - if dec.GasCost != nil { - s.GasCost = uint64(*dec.GasCost) - } - if dec.Memory != nil { - s.Memory = *dec.Memory - } - if dec.MemorySize != nil { - s.MemorySize = *dec.MemorySize - } - if dec.Stack != nil { - s.Stack = dec.Stack - } - if dec.ReturnData != nil { - s.ReturnData = *dec.ReturnData - } - if dec.Storage != nil { - s.Storage = dec.Storage - } - if dec.Depth != nil { - s.Depth = *dec.Depth - } - if dec.RefundCounter != nil { - s.RefundCounter = *dec.RefundCounter - } - if dec.Err != nil { - s.Err = dec.Err - } - return nil -} diff --git a/x/evm/tracers/logger/logger.go b/x/evm/tracers/logger/logger.go deleted file mode 100644 index bfedb004..00000000 --- a/x/evm/tracers/logger/logger.go +++ /dev/null @@ -1,464 +0,0 @@ -// Copyright 2021 The go-ethereum Authors -// This file is part of the go-ethereum library. -// -// The go-ethereum library is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// The go-ethereum library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . - -package logger - -import ( - "encoding/hex" - "encoding/json" - "fmt" - "io" - "math/big" - "strings" - "sync/atomic" - "time" - - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/ethereum/go-ethereum/common/math" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/params" - "github.com/holiman/uint256" - "github.com/stratosnet/stratos-chain/x/evm/vm" -) - -// Storage represents a contract's storage. -type Storage map[common.Hash]common.Hash - -// Copy duplicates the current storage. -func (s Storage) Copy() Storage { - cpy := make(Storage, len(s)) - for key, value := range s { - cpy[key] = value - } - return cpy -} - -// Config are the configuration options for structured logger the EVM -type Config struct { - EnableMemory bool // enable memory capture - DisableStack bool // disable stack capture - DisableStorage bool // disable storage capture - EnableReturnData bool // enable return data capture - Debug bool // print output during capture end - Limit int // maximum length of output, but zero means unlimited - // Chain overrides, can be used to execute a trace using future fork rules - Overrides *params.ChainConfig `json:"overrides,omitempty"` -} - -//go:generate go run github.com/fjl/gencodec -type StructLog -field-override structLogMarshaling -out gen_structlog.go - -// StructLog is emitted to the EVM each cycle and lists information about the current internal state -// prior to the execution of the statement. -type StructLog struct { - Pc uint64 `json:"pc"` - Op vm.OpCode `json:"op"` - Gas uint64 `json:"gas"` - GasCost uint64 `json:"gasCost"` - Memory []byte `json:"memory,omitempty"` - MemorySize int `json:"memSize"` - Stack []uint256.Int `json:"stack"` - ReturnData []byte `json:"returnData,omitempty"` - Storage map[common.Hash]common.Hash `json:"-"` - Depth int `json:"depth"` - RefundCounter uint64 `json:"refund"` - Err error `json:"-"` -} - -// overrides for gencodec -type structLogMarshaling struct { - Gas math.HexOrDecimal64 - GasCost math.HexOrDecimal64 - Memory hexutil.Bytes - ReturnData hexutil.Bytes - OpName string `json:"opName"` // adds call to OpName() in MarshalJSON - ErrorString string `json:"error,omitempty"` // adds call to ErrorString() in MarshalJSON -} - -// OpName formats the operand name in a human-readable format. -func (s *StructLog) OpName() string { - return s.Op.String() -} - -// ErrorString formats the log's error as a string. -func (s *StructLog) ErrorString() string { - if s.Err != nil { - return s.Err.Error() - } - return "" -} - -// StructLogger is an EVM state logger and implements EVMLogger. -// -// StructLogger can capture state based on the given Log configuration and also keeps -// a track record of modified storage which is used in reporting snapshots of the -// contract their storage. -type StructLogger struct { - cfg Config - env *vm.EVM - - storage map[common.Address]Storage - logs []StructLog - output []byte - err error - gasLimit uint64 - usedGas uint64 - - interrupt uint32 // Atomic flag to signal execution interruption - reason error // Textual reason for the interruption -} - -// NewStructLogger returns a new logger -func NewStructLogger(cfg *Config) *StructLogger { - logger := &StructLogger{ - storage: make(map[common.Address]Storage), - } - if cfg != nil { - logger.cfg = *cfg - } - return logger -} - -// Reset clears the data held by the logger. -func (l *StructLogger) Reset() { - l.storage = make(map[common.Address]Storage) - l.output = make([]byte, 0) - l.logs = l.logs[:0] - l.err = nil -} - -// CaptureStart implements the EVMLogger interface to initialize the tracing operation. -func (l *StructLogger) CaptureStart(env *vm.EVM, from common.Address, to common.Address, create bool, input []byte, gas uint64, value *big.Int) { - l.env = env -} - -// CaptureState logs a new structured log message and pushes it out to the environment -// -// CaptureState also tracks SLOAD/SSTORE ops to track storage change. -func (l *StructLogger) CaptureState(pc uint64, op vm.OpCode, gas, cost uint64, scope *vm.ScopeContext, rData []byte, depth int, err error) { - // If tracing was interrupted, set the error and stop - if atomic.LoadUint32(&l.interrupt) > 0 { - l.env.Cancel() - return - } - // check if already accumulated the specified number of logs - if l.cfg.Limit != 0 && l.cfg.Limit <= len(l.logs) { - return - } - - memory := scope.Memory - stack := scope.Stack - contract := scope.Contract - // Copy a snapshot of the current memory state to a new buffer - var mem []byte - if l.cfg.EnableMemory { - mem = make([]byte, len(memory.Data())) - copy(mem, memory.Data()) - } - // Copy a snapshot of the current stack state to a new buffer - var stck []uint256.Int - if !l.cfg.DisableStack { - stck = make([]uint256.Int, len(stack.Data())) - for i, item := range stack.Data() { - stck[i] = item - } - } - stackData := stack.Data() - stackLen := len(stackData) - // Copy a snapshot of the current storage to a new container - var storage Storage - if !l.cfg.DisableStorage && (op == vm.SLOAD || op == vm.SSTORE) { - // initialise new changed values storage container for this contract - // if not present. - if l.storage[contract.Address()] == nil { - l.storage[contract.Address()] = make(Storage) - } - // capture SLOAD opcodes and record the read entry in the local storage - if op == vm.SLOAD && stackLen >= 1 { - var ( - address = common.Hash(stackData[stackLen-1].Bytes32()) - value = l.env.StateDB.GetState(contract.Address(), address) - ) - l.storage[contract.Address()][address] = value - storage = l.storage[contract.Address()].Copy() - } else if op == vm.SSTORE && stackLen >= 2 { - // capture SSTORE opcodes and record the written entry in the local storage. - var ( - value = common.Hash(stackData[stackLen-2].Bytes32()) - address = common.Hash(stackData[stackLen-1].Bytes32()) - ) - l.storage[contract.Address()][address] = value - storage = l.storage[contract.Address()].Copy() - } - } - var rdata []byte - if l.cfg.EnableReturnData { - rdata = make([]byte, len(rData)) - copy(rdata, rData) - } - // create a new snapshot of the EVM. - log := StructLog{pc, op, gas, cost, mem, memory.Len(), stck, rdata, storage, depth, l.env.StateDB.GetRefund(), err} - l.logs = append(l.logs, log) -} - -// CaptureFault implements the EVMLogger interface to trace an execution fault -// while running an opcode. -func (l *StructLogger) CaptureFault(pc uint64, op vm.OpCode, gas, cost uint64, scope *vm.ScopeContext, depth int, err error) { -} - -// CaptureEnd is called after the call finishes to finalize the tracing. -func (l *StructLogger) CaptureEnd(output []byte, gasUsed uint64, t time.Duration, err error) { - l.output = output - l.err = err - if l.cfg.Debug { - fmt.Printf("%#x\n", output) - if err != nil { - fmt.Printf(" error: %v\n", err) - } - } -} - -func (l *StructLogger) CaptureEnter(typ vm.OpCode, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) { -} - -func (l *StructLogger) CaptureExit(output []byte, gasUsed uint64, err error) { -} - -func (l *StructLogger) GetResult() (json.RawMessage, error) { - // Tracing aborted - if l.reason != nil { - return nil, l.reason - } - failed := l.err != nil - returnData := common.CopyBytes(l.output) - // Return data when successful and revert reason when reverted, otherwise empty. - returnVal := fmt.Sprintf("%x", returnData) - if failed && l.err != vm.ErrExecutionReverted { - returnVal = "" - } - return json.Marshal(&ExecutionResult{ - Gas: l.usedGas, - Failed: failed, - ReturnValue: returnVal, - StructLogs: formatLogs(l.StructLogs()), - }) -} - -// Stop terminates execution of the tracer at the first opportune moment. -func (l *StructLogger) Stop(err error) { - l.reason = err - atomic.StoreUint32(&l.interrupt, 1) -} - -func (l *StructLogger) CaptureTxStart(gasLimit uint64) { - l.gasLimit = gasLimit -} - -func (l *StructLogger) CaptureTxEnd(restGas uint64) { - l.usedGas = l.gasLimit - restGas -} - -// StructLogs returns the captured log entries. -func (l *StructLogger) StructLogs() []StructLog { return l.logs } - -// Error returns the VM error captured by the trace. -func (l *StructLogger) Error() error { return l.err } - -// Output returns the VM return value captured by the trace. -func (l *StructLogger) Output() []byte { return l.output } - -// WriteTrace writes a formatted trace to the given writer -func WriteTrace(writer io.Writer, logs []StructLog) { - for _, log := range logs { - fmt.Fprintf(writer, "%-16spc=%08d gas=%v cost=%v", log.Op, log.Pc, log.Gas, log.GasCost) - if log.Err != nil { - fmt.Fprintf(writer, " ERROR: %v", log.Err) - } - fmt.Fprintln(writer) - - if len(log.Stack) > 0 { - fmt.Fprintln(writer, "Stack:") - for i := len(log.Stack) - 1; i >= 0; i-- { - fmt.Fprintf(writer, "%08d %s\n", len(log.Stack)-i-1, log.Stack[i].Hex()) - } - } - if len(log.Memory) > 0 { - fmt.Fprintln(writer, "Memory:") - fmt.Fprint(writer, hex.Dump(log.Memory)) - } - if len(log.Storage) > 0 { - fmt.Fprintln(writer, "Storage:") - for h, item := range log.Storage { - fmt.Fprintf(writer, "%x: %x\n", h, item) - } - } - if len(log.ReturnData) > 0 { - fmt.Fprintln(writer, "ReturnData:") - fmt.Fprint(writer, hex.Dump(log.ReturnData)) - } - fmt.Fprintln(writer) - } -} - -// WriteLogs writes vm logs in a readable format to the given writer -func WriteLogs(writer io.Writer, logs []*types.Log) { - for _, log := range logs { - fmt.Fprintf(writer, "LOG%d: %x bn=%d txi=%x\n", len(log.Topics), log.Address, log.BlockNumber, log.TxIndex) - - for i, topic := range log.Topics { - fmt.Fprintf(writer, "%08d %x\n", i, topic) - } - - fmt.Fprint(writer, hex.Dump(log.Data)) - fmt.Fprintln(writer) - } -} - -type mdLogger struct { - out io.Writer - cfg *Config - env *vm.EVM -} - -// NewMarkdownLogger creates a logger which outputs information in a format adapted -// for human readability, and is also a valid markdown table -func NewMarkdownLogger(cfg *Config, writer io.Writer) *mdLogger { - l := &mdLogger{out: writer, cfg: cfg} - if l.cfg == nil { - l.cfg = &Config{} - } - return l -} - -func (t *mdLogger) CaptureStart(env *vm.EVM, from common.Address, to common.Address, create bool, input []byte, gas uint64, value *big.Int) { - t.env = env - if !create { - fmt.Fprintf(t.out, "From: `%v`\nTo: `%v`\nData: `%#x`\nGas: `%d`\nValue `%v` wei\n", - from.String(), to.String(), - input, gas, value) - } else { - fmt.Fprintf(t.out, "From: `%v`\nCreate at: `%v`\nData: `%#x`\nGas: `%d`\nValue `%v` wei\n", - from.String(), to.String(), - input, gas, value) - } - - fmt.Fprintf(t.out, ` -| Pc | Op | Cost | Stack | RStack | Refund | -|-------|-------------|------|-----------|-----------|---------| -`) -} - -// CaptureState also tracks SLOAD/SSTORE ops to track storage change. -func (t *mdLogger) CaptureState(pc uint64, op vm.OpCode, gas, cost uint64, scope *vm.ScopeContext, rData []byte, depth int, err error) { - stack := scope.Stack - fmt.Fprintf(t.out, "| %4d | %10v | %3d |", pc, op, cost) - - if !t.cfg.DisableStack { - // format stack - var a []string - for _, elem := range stack.Data() { - a = append(a, elem.Hex()) - } - b := fmt.Sprintf("[%v]", strings.Join(a, ",")) - fmt.Fprintf(t.out, "%10v |", b) - } - fmt.Fprintf(t.out, "%10v |", t.env.StateDB.GetRefund()) - fmt.Fprintln(t.out, "") - if err != nil { - fmt.Fprintf(t.out, "Error: %v\n", err) - } -} - -func (t *mdLogger) CaptureFault(pc uint64, op vm.OpCode, gas, cost uint64, scope *vm.ScopeContext, depth int, err error) { - fmt.Fprintf(t.out, "\nError: at pc=%d, op=%v: %v\n", pc, op, err) -} - -func (t *mdLogger) CaptureEnd(output []byte, gasUsed uint64, tm time.Duration, err error) { - fmt.Fprintf(t.out, "\nOutput: `%#x`\nConsumed gas: `%d`\nError: `%v`\n", - output, gasUsed, err) -} - -func (t *mdLogger) CaptureEnter(typ vm.OpCode, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) { -} - -func (t *mdLogger) CaptureExit(output []byte, gasUsed uint64, err error) {} - -func (*mdLogger) CaptureTxStart(gasLimit uint64) {} - -func (*mdLogger) CaptureTxEnd(restGas uint64) {} - -// ExecutionResult groups all structured logs emitted by the EVM -// while replaying a transaction in debug mode as well as transaction -// execution status, the amount of gas used and the return value -type ExecutionResult struct { - Gas uint64 `json:"gas"` - Failed bool `json:"failed"` - ReturnValue string `json:"returnValue"` - StructLogs []StructLogRes `json:"structLogs"` -} - -// StructLogRes stores a structured log emitted by the EVM while replaying a -// transaction in debug mode -type StructLogRes struct { - Pc uint64 `json:"pc"` - Op string `json:"op"` - Gas uint64 `json:"gas"` - GasCost uint64 `json:"gasCost"` - Depth int `json:"depth"` - Error string `json:"error,omitempty"` - Stack *[]string `json:"stack,omitempty"` - Memory *[]string `json:"memory,omitempty"` - Storage *map[string]string `json:"storage,omitempty"` - RefundCounter uint64 `json:"refund,omitempty"` -} - -// formatLogs formats EVM returned structured logs for json output -func formatLogs(logs []StructLog) []StructLogRes { - formatted := make([]StructLogRes, len(logs)) - for index, trace := range logs { - formatted[index] = StructLogRes{ - Pc: trace.Pc, - Op: trace.Op.String(), - Gas: trace.Gas, - GasCost: trace.GasCost, - Depth: trace.Depth, - Error: trace.ErrorString(), - RefundCounter: trace.RefundCounter, - } - if trace.Stack != nil { - stack := make([]string, len(trace.Stack)) - for i, stackValue := range trace.Stack { - stack[i] = stackValue.Hex() - } - formatted[index].Stack = &stack - } - if trace.Memory != nil { - memory := make([]string, 0, (len(trace.Memory)+31)/32) - for i := 0; i+32 <= len(trace.Memory); i += 32 { - memory = append(memory, fmt.Sprintf("%x", trace.Memory[i:i+32])) - } - formatted[index].Memory = &memory - } - if trace.Storage != nil { - storage := make(map[string]string) - for i, storageValue := range trace.Storage { - storage[fmt.Sprintf("%x", i)] = fmt.Sprintf("%x", storageValue) - } - formatted[index].Storage = &storage - } - } - return formatted -} diff --git a/x/evm/tracers/logger/logger_json.go b/x/evm/tracers/logger/logger_json.go deleted file mode 100644 index fb5a4e10..00000000 --- a/x/evm/tracers/logger/logger_json.go +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright 2021 The go-ethereum Authors -// This file is part of the go-ethereum library. -// -// The go-ethereum library is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// The go-ethereum library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . - -package logger - -import ( - "encoding/json" - "io" - "math/big" - "time" - - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/math" - "github.com/stratosnet/stratos-chain/x/evm/vm" -) - -type JSONLogger struct { - encoder *json.Encoder - cfg *Config - env *vm.EVM -} - -// NewJSONLogger creates a new EVM tracer that prints execution steps as JSON objects -// into the provided stream. -func NewJSONLogger(cfg *Config, writer io.Writer) *JSONLogger { - l := &JSONLogger{encoder: json.NewEncoder(writer), cfg: cfg} - if l.cfg == nil { - l.cfg = &Config{} - } - return l -} - -func (l *JSONLogger) CaptureStart(env *vm.EVM, from, to common.Address, create bool, input []byte, gas uint64, value *big.Int) { - l.env = env -} - -func (l *JSONLogger) CaptureFault(pc uint64, op vm.OpCode, gas uint64, cost uint64, scope *vm.ScopeContext, depth int, err error) { - // TODO: Add rData to this interface as well - l.CaptureState(pc, op, gas, cost, scope, nil, depth, err) -} - -// CaptureState outputs state information on the logger. -func (l *JSONLogger) CaptureState(pc uint64, op vm.OpCode, gas, cost uint64, scope *vm.ScopeContext, rData []byte, depth int, err error) { - memory := scope.Memory - stack := scope.Stack - - log := StructLog{ - Pc: pc, - Op: op, - Gas: gas, - GasCost: cost, - MemorySize: memory.Len(), - Depth: depth, - RefundCounter: l.env.StateDB.GetRefund(), - Err: err, - } - if l.cfg.EnableMemory { - log.Memory = memory.Data() - } - if !l.cfg.DisableStack { - log.Stack = stack.Data() - } - if l.cfg.EnableReturnData { - log.ReturnData = rData - } - l.encoder.Encode(log) -} - -// CaptureEnd is triggered at end of execution. -func (l *JSONLogger) CaptureEnd(output []byte, gasUsed uint64, t time.Duration, err error) { - type endLog struct { - Output string `json:"output"` - GasUsed math.HexOrDecimal64 `json:"gasUsed"` - Time time.Duration `json:"time"` - Err string `json:"error,omitempty"` - } - var errMsg string - if err != nil { - errMsg = err.Error() - } - l.encoder.Encode(endLog{common.Bytes2Hex(output), math.HexOrDecimal64(gasUsed), t, errMsg}) -} - -func (l *JSONLogger) CaptureEnter(typ vm.OpCode, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) { -} - -func (l *JSONLogger) CaptureExit(output []byte, gasUsed uint64, err error) {} - -func (l *JSONLogger) CaptureTxStart(gasLimit uint64) {} - -func (l *JSONLogger) CaptureTxEnd(restGas uint64) {} diff --git a/x/evm/tracers/native/4byte.go b/x/evm/tracers/native/4byte.go index 6f5081db..34e608bf 100644 --- a/x/evm/tracers/native/4byte.go +++ b/x/evm/tracers/native/4byte.go @@ -24,8 +24,8 @@ import ( "time" "github.com/ethereum/go-ethereum/common" - "github.com/stratosnet/stratos-chain/x/evm/tracers" - "github.com/stratosnet/stratos-chain/x/evm/vm" + "github.com/ethereum/go-ethereum/core/vm" + "github.com/ethereum/go-ethereum/eth/tracers" ) func init() { @@ -37,15 +37,14 @@ func init() { // a reversed signature can be matched against the size of the data. // // Example: -// -// > debug.traceTransaction( "0x214e597e35da083692f5386141e69f47e973b2c56e7a8073b1ea08fd7571e9de", {tracer: "4byteTracer"}) -// { -// 0x27dc297e-128: 1, -// 0x38cc4831-0: 2, -// 0x524f3889-96: 1, -// 0xadf59f99-288: 1, -// 0xc281d19e-0: 1 -// } +// > debug.traceTransaction( "0x214e597e35da083692f5386141e69f47e973b2c56e7a8073b1ea08fd7571e9de", {tracer: "4byteTracer"}) +// { +// 0x27dc297e-128: 1, +// 0x38cc4831-0: 2, +// 0x524f3889-96: 1, +// 0xadf59f99-288: 1, +// 0xc281d19e-0: 1 +// } type fourByteTracer struct { env *vm.EVM ids map[string]int // ids aggregates the 4byte ids found diff --git a/x/evm/tracers/native/call.go b/x/evm/tracers/native/call.go index a224e244..7af0e658 100644 --- a/x/evm/tracers/native/call.go +++ b/x/evm/tracers/native/call.go @@ -26,8 +26,8 @@ import ( "time" "github.com/ethereum/go-ethereum/common" - "github.com/stratosnet/stratos-chain/x/evm/tracers" - "github.com/stratosnet/stratos-chain/x/evm/vm" + "github.com/ethereum/go-ethereum/core/vm" + "github.com/ethereum/go-ethereum/eth/tracers" ) func init() { diff --git a/x/evm/tracers/native/noop.go b/x/evm/tracers/native/noop.go index fa7f73be..c252b240 100644 --- a/x/evm/tracers/native/noop.go +++ b/x/evm/tracers/native/noop.go @@ -22,8 +22,8 @@ import ( "time" "github.com/ethereum/go-ethereum/common" - "github.com/stratosnet/stratos-chain/x/evm/tracers" - "github.com/stratosnet/stratos-chain/x/evm/vm" + "github.com/ethereum/go-ethereum/core/vm" + "github.com/ethereum/go-ethereum/eth/tracers" ) func init() { diff --git a/x/evm/tracers/native/prestate.go b/x/evm/tracers/native/prestate.go index 83279e1f..b513f383 100644 --- a/x/evm/tracers/native/prestate.go +++ b/x/evm/tracers/native/prestate.go @@ -24,9 +24,9 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/crypto" - "github.com/stratosnet/stratos-chain/x/evm/tracers" - "github.com/stratosnet/stratos-chain/x/evm/vm" + "github.com/ethereum/go-ethereum/eth/tracers" ) func init() { diff --git a/x/evm/tracers/native/revertreason.go b/x/evm/tracers/native/revertreason.go index db9fbcf4..d09b8610 100644 --- a/x/evm/tracers/native/revertreason.go +++ b/x/evm/tracers/native/revertreason.go @@ -25,9 +25,9 @@ import ( "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/crypto" - "github.com/stratosnet/stratos-chain/x/evm/tracers" - "github.com/stratosnet/stratos-chain/x/evm/vm" + "github.com/ethereum/go-ethereum/eth/tracers" ) func init() { diff --git a/x/evm/tracers/native/tracer.go b/x/evm/tracers/native/tracer.go index 468e44b3..fda3e659 100644 --- a/x/evm/tracers/native/tracer.go +++ b/x/evm/tracers/native/tracer.go @@ -27,11 +27,9 @@ Aside from implementing the tracer, it also needs to register itself, using the Example: ```golang - - func init() { - register("noopTracerNative", newNoopTracer) - } - +func init() { + register("noopTracerNative", newNoopTracer) +} ``` */ package native @@ -40,7 +38,7 @@ import ( "encoding/json" "errors" - "github.com/stratosnet/stratos-chain/x/evm/tracers" + "github.com/ethereum/go-ethereum/eth/tracers" ) // InitTracer retrieves the Go transaction tracers included in go-ethereum. diff --git a/x/evm/types/codec.go b/x/evm/types/codec.go index a6e7889c..0e0af3cd 100644 --- a/x/evm/types/codec.go +++ b/x/evm/types/codec.go @@ -6,7 +6,6 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/types/msgservice" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" "github.com/gogo/protobuf/proto" ) @@ -16,11 +15,6 @@ type ( ExtensionOptionsEthereumTxI interface{} ) -// RegisterLegacyAminoCodec RegisterCodec registers concrete types on codec -func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { - cdc.RegisterConcrete(&UpdateImplmentationProposal{}, "cosmos-sdk/UpdateImplmentationProposal", nil) -} - // RegisterInterfaces registers the client interfaces to protobuf Any. func RegisterInterfaces(registry codectypes.InterfaceRegistry) { registry.RegisterImplementations( @@ -39,12 +33,6 @@ func RegisterInterfaces(registry codectypes.InterfaceRegistry) { &AccessListTx{}, &LegacyTx{}, ) - // for gov - registry.RegisterInterface( - "cosmos.gov.v1beta1.Content", - (*govtypes.Content)(nil), - &UpdateImplmentationProposal{}, - ) msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) } diff --git a/x/evm/types/contracts.go b/x/evm/types/contracts.go deleted file mode 100644 index 6fa1f154..00000000 --- a/x/evm/types/contracts.go +++ /dev/null @@ -1,23 +0,0 @@ -package types - -import ( - "strings" - - "github.com/ethereum/go-ethereum/accounts/abi" -) - -const ( - TransparentUpgradableProxyABI = "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"changeAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}]" -) - -var ( - TransparentUpgradableProxyBin = "0x608060405260405162000ed038038062000ed08339810160408190526200002691620004a0565b828162000036828260006200004d565b50620000449050826200008a565b505050620005d3565b6200005883620000e5565b600082511180620000665750805b1562000085576200008383836200012760201b620001691760201c565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f620000b562000156565b604080516001600160a01b03928316815291841660208301520160405180910390a1620000e2816200018f565b50565b620000f08162000244565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606200014f838360405180606001604052806027815260200162000ea960279139620002f8565b9392505050565b60006200018060008051602062000e8983398151915260001b6200037760201b620001951760201c565b546001600160a01b0316919050565b6001600160a01b038116620001fa5760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b806200022360008051602062000e8983398151915260001b6200037760201b620001951760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b6200025a816200037a60201b620001981760201c565b620002be5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401620001f1565b80620002237f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b6200037760201b620001951760201c565b6060600080856001600160a01b03168560405162000317919062000580565b600060405180830381855af49150503d806000811462000354576040519150601f19603f3d011682016040523d82523d6000602084013e62000359565b606091505b5090925090506200036d8683838762000389565b9695505050505050565b90565b6001600160a01b03163b151590565b60608315620003fd578251600003620003f5576001600160a01b0385163b620003f55760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401620001f1565b508162000409565b62000409838362000411565b949350505050565b815115620004225781518083602001fd5b8060405162461bcd60e51b8152600401620001f191906200059e565b80516001600160a01b03811681146200045657600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b838110156200048e57818101518382015260200162000474565b83811115620000835750506000910152565b600080600060608486031215620004b657600080fd5b620004c1846200043e565b9250620004d1602085016200043e565b60408501519092506001600160401b0380821115620004ef57600080fd5b818601915086601f8301126200050457600080fd5b8151818111156200051957620005196200045b565b604051601f8201601f19908116603f011681019083821181831017156200054457620005446200045b565b816040528281528960208487010111156200055e57600080fd5b6200057183602083016020880162000471565b80955050505050509250925092565b600082516200059481846020870162000471565b9190910192915050565b6020815260008251806020840152620005bf81604085016020870162000471565b601f01601f19169190910160400192915050565b6108a680620005e36000396000f3fe60806040523661001357610011610017565b005b6100115b61001f6101a7565b6001600160a01b0316330361015f5760606001600160e01b0319600035166364d3180d60e11b810161005a576100536101da565b9150610157565b63587086bd60e11b6001600160e01b031982160161007a57610053610231565b63070d7c6960e41b6001600160e01b031982160161009a57610053610277565b621eb96f60e61b6001600160e01b03198216016100b9576100536102a8565b63a39f25e560e01b6001600160e01b03198216016100d9576100536102e8565b60405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b815160208301f35b6101676102fc565b565b606061018e838360405180606001604052806027815260200161084a6027913961030c565b9392505050565b90565b6001600160a01b03163b151590565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b60606101e4610384565b60006101f33660048184610695565b81019061020091906106db565b905061021d8160405180602001604052806000815250600061038f565b505060408051602081019091526000815290565b60606000806102433660048184610695565b810190610250919061070c565b915091506102608282600161038f565b604051806020016040528060008152509250505090565b6060610281610384565b60006102903660048184610695565b81019061029d91906106db565b905061021d816103bb565b60606102b2610384565b60006102bc6101a7565b604080516001600160a01b03831660208201529192500160405160208183030381529060405291505090565b60606102f2610384565b60006102bc610412565b610167610307610412565b610421565b6060600080856001600160a01b03168560405161032991906107fa565b600060405180830381855af49150503d8060008114610364576040519150601f19603f3d011682016040523d82523d6000602084013e610369565b606091505b509150915061037a86838387610445565b9695505050505050565b341561016757600080fd5b610398836104c6565b6000825111806103a55750805b156103b6576103b48383610169565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6103e46101a7565b604080516001600160a01b03928316815291841660208301520160405180910390a161040f81610506565b50565b600061041c6105af565b905090565b3660008037600080366000845af43d6000803e808015610440573d6000f35b3d6000fd5b606083156104b45782516000036104ad576001600160a01b0385163b6104ad5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161014e565b50816104be565b6104be83836105d7565b949350505050565b6104cf81610601565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6001600160a01b03811661056b5760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b606482015260840161014e565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc6101cb565b8151156105e75781518083602001fd5b8060405162461bcd60e51b815260040161014e9190610816565b6001600160a01b0381163b61066e5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b606482015260840161014e565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc61058e565b600080858511156106a557600080fd5b838611156106b257600080fd5b5050820193919092039150565b80356001600160a01b03811681146106d657600080fd5b919050565b6000602082840312156106ed57600080fd5b61018e826106bf565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561071f57600080fd5b610728836106bf565b9150602083013567ffffffffffffffff8082111561074557600080fd5b818501915085601f83011261075957600080fd5b81358181111561076b5761076b6106f6565b604051601f8201601f19908116603f01168101908382118183101715610793576107936106f6565b816040528281528860208487010111156107ac57600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b60005b838110156107e95781810151838201526020016107d1565b838111156103b45750506000910152565b6000825161080c8184602087016107ce565b9190910192915050565b60208152600082518060208401526108358160408501602087016107ce565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122081bdb2c4d7ec00ca91134719260d0c14c35df5f50dba8a8c2c59a0ef40e1066064736f6c634300080f0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564" -) - -func EncodeContractFunc(contractsABI string, name string, params ...interface{}) ([]byte, error) { - parsedABI, err := abi.JSON(strings.NewReader(contractsABI)) - if err != nil { - return nil, err - } - return parsedABI.Pack(name, params...) -} diff --git a/x/evm/types/evm.pb.go b/x/evm/types/evm.pb.go index b6d46461..dc6e18f2 100644 --- a/x/evm/types/evm.pb.go +++ b/x/evm/types/evm.pb.go @@ -36,9 +36,8 @@ type Params struct { // extra eips defines the additional EIPs for the vm.Config ExtraEIPs []int64 `protobuf:"varint,4,rep,packed,name=extra_eips,json=extraEips,proto3" json:"extra_eips,omitempty" yaml:"extra_eips"` // chain config defines the EVM chain configuration parameters - ChainConfig ChainConfig `protobuf:"bytes,5,opt,name=chain_config,json=chainConfig,proto3" json:"chain_config" yaml:"chain_config"` - FeeMarketParams FeeMarketParams `protobuf:"bytes,6,opt,name=fee_market_params,json=feeMarketParams,proto3" json:"fee_market_params" yaml:"fee_market_params"` - ProxyProposalParams ProxyProposalParams `protobuf:"bytes,7,opt,name=proxy_proposal_params,json=proxyProposalParams,proto3" json:"proxy_proposal_params" yaml:"proxy_proposal_params"` + ChainConfig ChainConfig `protobuf:"bytes,5,opt,name=chain_config,json=chainConfig,proto3" json:"chain_config" yaml:"chain_config"` + FeeMarketParams FeeMarketParams `protobuf:"bytes,6,opt,name=fee_market_params,json=feeMarketParams,proto3" json:"fee_market_params" yaml:"fee_market_params"` } func (m *Params) Reset() { *m = Params{} } @@ -116,13 +115,6 @@ func (m *Params) GetFeeMarketParams() FeeMarketParams { return FeeMarketParams{} } -func (m *Params) GetProxyProposalParams() ProxyProposalParams { - if m != nil { - return m.ProxyProposalParams - } - return ProxyProposalParams{} -} - // ChainConfig defines the Ethereum ChainConfig parameters using *sdk.Int values // instead of *big.Int. type ChainConfig struct { @@ -738,143 +730,6 @@ func (m *FeeMarketParams) GetEnableHeight() int64 { return 0 } -type ProxyContractInitState struct { - // height where it should be applied - Height uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` - // address of proxy contract - Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` - // solidity compiled code - Bin string `protobuf:"bytes,3,opt,name=bin,proto3" json:"bin,omitempty"` - // initializer method data - Init string `protobuf:"bytes,4,opt,name=init,proto3" json:"init,omitempty"` -} - -func (m *ProxyContractInitState) Reset() { *m = ProxyContractInitState{} } -func (m *ProxyContractInitState) String() string { return proto.CompactTextString(m) } -func (*ProxyContractInitState) ProtoMessage() {} -func (*ProxyContractInitState) Descriptor() ([]byte, []int) { - return fileDescriptor_6ee18d4714e9d670, []int{9} -} -func (m *ProxyContractInitState) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ProxyContractInitState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ProxyContractInitState.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 *ProxyContractInitState) XXX_Merge(src proto.Message) { - xxx_messageInfo_ProxyContractInitState.Merge(m, src) -} -func (m *ProxyContractInitState) XXX_Size() int { - return m.Size() -} -func (m *ProxyContractInitState) XXX_DiscardUnknown() { - xxx_messageInfo_ProxyContractInitState.DiscardUnknown(m) -} - -var xxx_messageInfo_ProxyContractInitState proto.InternalMessageInfo - -func (m *ProxyContractInitState) GetHeight() uint64 { - if m != nil { - return m.Height - } - return 0 -} - -func (m *ProxyContractInitState) GetAddress() string { - if m != nil { - return m.Address - } - return "" -} - -func (m *ProxyContractInitState) GetBin() string { - if m != nil { - return m.Bin - } - return "" -} - -func (m *ProxyContractInitState) GetInit() string { - if m != nil { - return m.Init - } - return "" -} - -// Params defines default proxy addresses for futur gov contracts update -type ProxyProposalParams struct { - // consensus address as msg.sender, used to define admin authority, could be simply zero address or custom - // basically it is an owner of evrything. resposible to add proxies and update proxies implementations - ConsensusAddress string `protobuf:"bytes,1,opt,name=consensus_address,json=consensusAddress,proto3" json:"consensus_address,omitempty"` - // proxy owner who basically the owner of proxy contract (for Ownable purpose, not admin) - ProxyOwnerAddress string `protobuf:"bytes,2,opt,name=proxy_owner_address,json=proxyOwnerAddress,proto3" json:"proxy_owner_address,omitempty"` - // proxy contracts name per address reservations - Contracts map[string]*ProxyContractInitState `protobuf:"bytes,3,rep,name=contracts,proto3" json:"contracts,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (m *ProxyProposalParams) Reset() { *m = ProxyProposalParams{} } -func (m *ProxyProposalParams) String() string { return proto.CompactTextString(m) } -func (*ProxyProposalParams) ProtoMessage() {} -func (*ProxyProposalParams) Descriptor() ([]byte, []int) { - return fileDescriptor_6ee18d4714e9d670, []int{10} -} -func (m *ProxyProposalParams) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ProxyProposalParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ProxyProposalParams.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 *ProxyProposalParams) XXX_Merge(src proto.Message) { - xxx_messageInfo_ProxyProposalParams.Merge(m, src) -} -func (m *ProxyProposalParams) XXX_Size() int { - return m.Size() -} -func (m *ProxyProposalParams) XXX_DiscardUnknown() { - xxx_messageInfo_ProxyProposalParams.DiscardUnknown(m) -} - -var xxx_messageInfo_ProxyProposalParams proto.InternalMessageInfo - -func (m *ProxyProposalParams) GetConsensusAddress() string { - if m != nil { - return m.ConsensusAddress - } - return "" -} - -func (m *ProxyProposalParams) GetProxyOwnerAddress() string { - if m != nil { - return m.ProxyOwnerAddress - } - return "" -} - -func (m *ProxyProposalParams) GetContracts() map[string]*ProxyContractInitState { - if m != nil { - return m.Contracts - } - return nil -} - func init() { proto.RegisterType((*Params)(nil), "stratos.evm.v1.Params") proto.RegisterType((*ChainConfig)(nil), "stratos.evm.v1.ChainConfig") @@ -885,132 +740,117 @@ func init() { proto.RegisterType((*AccessTuple)(nil), "stratos.evm.v1.AccessTuple") proto.RegisterType((*TraceConfig)(nil), "stratos.evm.v1.TraceConfig") proto.RegisterType((*FeeMarketParams)(nil), "stratos.evm.v1.FeeMarketParams") - proto.RegisterType((*ProxyContractInitState)(nil), "stratos.evm.v1.ProxyContractInitState") - proto.RegisterType((*ProxyProposalParams)(nil), "stratos.evm.v1.ProxyProposalParams") - proto.RegisterMapType((map[string]*ProxyContractInitState)(nil), "stratos.evm.v1.ProxyProposalParams.ContractsEntry") } func init() { proto.RegisterFile("stratos/evm/v1/evm.proto", fileDescriptor_6ee18d4714e9d670) } var fileDescriptor_6ee18d4714e9d670 = []byte{ - // 1867 bytes of a gzipped FileDescriptorPro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1e, 0x13, 0x8a, 0x05, 0xf0, 0x69, 0x2c, 0x32, 0x96, 0xf1, 0x27, 0xc8, 0xea, 0x50, 0xe9, - 0x75, 0x25, 0x0b, 0xf4, 0x77, 0x20, 0xa5, 0x0e, 0x95, 0xbf, 0x91, 0x2c, 0x78, 0x51, 0xfc, 0xcb, - 0x3f, 0x9c, 0x47, 0x2e, 0x45, 0x95, 0x23, 0xdf, 0x67, 0x52, 0xbe, 0xeb, 0xa6, 0x11, 0xfb, 0x81, - 0xfa, 0x3a, 0x40, 0x55, 0xa9, 0xb8, 0xa0, 0x1d, 0xe6, 0x5d, 0xb1, 0x81, 0xa9, 0x32, 0x5d, 0x33, - 0x46, 0xff, 0x6b, 0x36, 0x90, 0x64, 0x5a, 0x30, 0x14, 0x59, 0x01, 0x55, 0xde, 0x09, 0xea, 0x33, - 0x73, 0xab, 0xcd, 0x2b, 0x35, 0x17, 0x85, 0xa1, 0x30, 0x52, 0xce, 0xad, 0xc2, 0x98, 0xf1, 0xae, - 0x32, 0x7b, 0x69, 0x24, 0xe6, 0x11, 0x82, 0xb1, 0x3e, 0xf3, 0x21, 0x89, 0x45, 0x62, 0x24, 0x7c, - 0x88, 0x56, 0x82, 0x50, 0xc2, 0xd3, 0x46, 0x2a, 0x6a, 0x2e, 0x5e, 0x56, 0xd3, 0xbe, 0xc9, 0x9c, - 0xaa, 0x31, 0xbc, 0xcd, 0xf5, 0x64, 0x46, 0xc2, 0xbf, 0x44, 0xf5, 0x49, 0x18, 0xcc, 0x16, 0x72, - 0x63, 0x35, 0xf1, 0x4d, 0xe6, 0xd4, 0xc6, 0xae, 0x60, 0x21, 0x73, 0x72, 0xfe, 0x9d, 0x03, 0xd6, - 0xee, 0x76, 0xa0, 0xf4, 0x2c, 0xa2, 0x85, 0x5c, 0x1b, 0x85, 0x71, 0xa8, 0xa0, 0xd4, 0x96, 0x88, - 0x16, 0xf0, 0x2f, 0x50, 0x99, 0xf7, 0x98, 0x10, 0x61, 0xc0, 0x24, 0xf4, 0xfc, 0x1f, 0x7e, 0x17, - 0x91, 0x89, 0x77, 0xbe, 0x34, 0xf3, 0x68, 0x8b, 0x59, 0xcc, 0xc5, 0x00, 0x1a, 0xb7, 0x59, 0x9a, - 0x36, 0xbc, 0x01, 0x3d, 0x99, 0x91, 0x70, 0x13, 0x61, 0x13, 0x26, 0x98, 0xea, 0x8a, 0xc4, 0x83, - 0xbd, 0x5f, 0x85, 0x58, 0xd8, 0x81, 0xda, 0x4a, 0xc0, 0x78, 0x42, 0x15, 0x25, 0xb7, 0x34, 0x67, - 0x45, 0xab, 0x68, 0x2f, 0x9d, 0x15, 0xad, 0x92, 0x6d, 0x8d, 0x57, 0x6f, 0x66, 0x41, 0xd6, 0x46, - 0xf2, 0x14, 0xbc, 0xfb, 0xaf, 0x45, 0x54, 0x9f, 0x7b, 0x7c, 0xe1, 0x2d, 0x54, 0x49, 0xb8, 0xd7, - 0xa6, 0x92, 0x79, 0x17, 0x8c, 0xc1, 0x97, 0xb6, 0x48, 0x39, 0xe1, 0x4d, 0x2a, 0xd9, 0x4b, 0xc6, - 0xf0, 0x97, 0x68, 0x73, 0x64, 0xf4, 0xfc, 0x4b, 0x9a, 0x74, 0x98, 0x7e, 0x14, 0x87, 0x09, 0x55, - 0x5c, 0x40, 0x01, 0xac, 0x90, 0x46, 0x5b, 0x7b, 0x1f, 0x83, 0xc3, 0xc9, 0xc4, 0x8e, 0x9f, 0xa1, - 0xc7, 0x2c, 0xa2, 0x52, 0x85, 0x7e, 0xa8, 0x06, 0x5e, 0xdc, 0x8d, 0x54, 0x98, 0x46, 0x21, 0x13, - 0x50, 0x20, 0x2b, 0x64, 0x7d, 0x62, 0x7c, 0x33, 0xb6, 0xe1, 0x4f, 0xc7, 0x39, 0xbd, 0x64, 0x61, - 0xe7, 0x52, 0x41, 0xb9, 0x14, 0x46, 0x19, 0x7c, 0x05, 0x3a, 0xdc, 0x42, 0xd6, 0x78, 0xd6, 0xfa, - 0x4e, 0xbd, 0x9b,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23, 0x15, 0xd1, 0x78, 0x56, 0x8c, 0x76, 0xe7, 0xfb, 0xdb, 0xfd, 0xf5, + 0x1f, 0x6e, 0xf7, 0xd7, 0xff, 0x77, 0xbb, 0xbf, 0xfe, 0xb7, 0x0f, 0xfb, 0x6b, 0x3f, 0x7c, 0xd8, + 0x5f, 0xfb, 0xcf, 0x87, 0xfd, 0xb5, 0xdf, 0xb7, 0x16, 0x28, 0x4c, 0x9f, 0xa4, 0x4c, 0x4d, 0x97, + 0xcf, 0xe0, 0x93, 0xad, 0x35, 0x82, 0xff, 0x11, 0x00, 0x5f, 0x77, 0x0b, 0xbe, 0xfe, 0x5f, 0xfc, + 0x3f, 0x00, 0x00, 0xff, 0xff, 0xb4, 0xc3, 0x75, 0x8b, 0x3f, 0x10, 0x00, 0x00, } func (m *Params) Marshal() (dAtA []byte, err error) { @@ -1033,16 +873,6 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - { - size, err := m.ProxyProposalParams.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEvm(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a { size, err := m.FeeMarketParams.MarshalToSizedBuffer(dAtA[:i]) if err != nil { @@ -1064,21 +894,21 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x2a if len(m.ExtraEIPs) > 0 { - dAtA5 := make([]byte, len(m.ExtraEIPs)*10) - var j4 int + dAtA4 := make([]byte, len(m.ExtraEIPs)*10) + var j3 int for _, num1 := range m.ExtraEIPs { num := uint64(num1) for num >= 1<<7 { - dAtA5[j4] = uint8(uint64(num)&0x7f | 0x80) + dAtA4[j3] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 - j4++ + j3++ } - dAtA5[j4] = uint8(num) - j4++ + dAtA4[j3] = uint8(num) + j3++ } - i -= j4 - copy(dAtA[i:], dAtA5[:j4]) - i = encodeVarintEvm(dAtA, i, uint64(j4)) + i -= j3 + copy(dAtA[i:], dAtA4[:j3]) + i = encodeVarintEvm(dAtA, i, uint64(j3)) i-- dAtA[i] = 0x22 } @@ -1779,118 +1609,6 @@ func (m *FeeMarketParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *ProxyContractInitState) 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 *ProxyContractInitState) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ProxyContractInitState) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Init) > 0 { - i -= len(m.Init) - copy(dAtA[i:], m.Init) - i = encodeVarintEvm(dAtA, i, uint64(len(m.Init))) - i-- - dAtA[i] = 0x22 - } - if len(m.Bin) > 0 { - i -= len(m.Bin) - copy(dAtA[i:], m.Bin) - i = encodeVarintEvm(dAtA, i, uint64(len(m.Bin))) - i-- - dAtA[i] = 0x1a - } - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintEvm(dAtA, i, uint64(len(m.Address))) - i-- - dAtA[i] = 0x12 - } - if m.Height != 0 { - i = encodeVarintEvm(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *ProxyProposalParams) 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 *ProxyProposalParams) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ProxyProposalParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Contracts) > 0 { - for k := range m.Contracts { - v := m.Contracts[k] - baseI := i - if v != nil { - { - size, err := v.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEvm(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintEvm(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintEvm(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x1a - } - } - if len(m.ProxyOwnerAddress) > 0 { - i -= len(m.ProxyOwnerAddress) - copy(dAtA[i:], m.ProxyOwnerAddress) - i = encodeVarintEvm(dAtA, i, uint64(len(m.ProxyOwnerAddress))) - i-- - dAtA[i] = 0x12 - } - if len(m.ConsensusAddress) > 0 { - i -= len(m.ConsensusAddress) - copy(dAtA[i:], m.ConsensusAddress) - i = encodeVarintEvm(dAtA, i, uint64(len(m.ConsensusAddress))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - func encodeVarintEvm(dAtA []byte, offset int, v uint64) int { offset -= sovEvm(v) base := offset @@ -1929,8 +1647,6 @@ func (m *Params) Size() (n int) { n += 1 + l + sovEvm(uint64(l)) l = m.FeeMarketParams.Size() n += 1 + l + sovEvm(uint64(l)) - l = m.ProxyProposalParams.Size() - n += 1 + l + sovEvm(uint64(l)) return n } @@ -2202,60 +1918,6 @@ func (m *FeeMarketParams) Size() (n int) { return n } -func (m *ProxyContractInitState) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Height != 0 { - n += 1 + sovEvm(uint64(m.Height)) - } - l = len(m.Address) - if l > 0 { - n += 1 + l + sovEvm(uint64(l)) - } - l = len(m.Bin) - if l > 0 { - n += 1 + l + sovEvm(uint64(l)) - } - l = len(m.Init) - if l > 0 { - n += 1 + l + sovEvm(uint64(l)) - } - return n -} - -func (m *ProxyProposalParams) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ConsensusAddress) - if l > 0 { - n += 1 + l + sovEvm(uint64(l)) - } - l = len(m.ProxyOwnerAddress) - if l > 0 { - n += 1 + l + sovEvm(uint64(l)) - } - if len(m.Contracts) > 0 { - for k, v := range m.Contracts { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - l += 1 + sovEvm(uint64(l)) - } - mapEntrySize := 1 + len(k) + sovEvm(uint64(len(k))) + l - n += mapEntrySize + 1 + sovEvm(uint64(mapEntrySize)) - } - } - return n -} - func sovEvm(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -2505,39 +2167,6 @@ func (m *Params) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProxyProposalParams", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEvm - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEvm - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ProxyProposalParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipEvm(dAtA[iNdEx:]) @@ -4505,414 +4134,6 @@ func (m *FeeMarketParams) Unmarshal(dAtA []byte) error { } return nil } -func (m *ProxyContractInitState) 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 ErrIntOverflowEvm - } - 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: ProxyContractInitState: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ProxyContractInitState: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - m.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Height |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - 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 ErrInvalidLengthEvm - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvm - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Bin", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - 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 ErrInvalidLengthEvm - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvm - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Bin = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Init", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - 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 ErrInvalidLengthEvm - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvm - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Init = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEvm(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthEvm - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ProxyProposalParams) 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 ErrIntOverflowEvm - } - 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: ProxyProposalParams: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ProxyProposalParams: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConsensusAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - 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 ErrInvalidLengthEvm - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvm - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ConsensusAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProxyOwnerAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - 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 ErrInvalidLengthEvm - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvm - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProxyOwnerAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Contracts", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEvm - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEvm - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Contracts == nil { - m.Contracts = make(map[string]*ProxyContractInitState) - } - var mapkey string - var mapvalue *ProxyContractInitState - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthEvm - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthEvm - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthEvm - } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { - return ErrInvalidLengthEvm - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &ProxyContractInitState{} - if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipEvm(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthEvm - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Contracts[mapkey] = mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipEvm(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthEvm - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func skipEvm(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/evm/types/interfaces.go b/x/evm/types/interfaces.go index 63c58100..8ebef9aa 100644 --- a/x/evm/types/interfaces.go +++ b/x/evm/types/interfaces.go @@ -7,7 +7,7 @@ import ( "github.com/ethereum/go-ethereum/core" ethtypes "github.com/ethereum/go-ethereum/core/types" - keestatedb "github.com/stratosnet/stratos-chain/core/statedb" + //feemarkettypes "github.com/stratosnet/stratos-chain/x/feemarket/types" ) // AccountKeeper defines the expected account keeper interface @@ -39,18 +39,6 @@ type StakingKeeper interface { GetValidatorByConsAddr(ctx sdk.Context, consAddr sdk.ConsAddress) (validator stakingtypes.Validator, found bool) } -// RegisterKeeper defines functionality related for meta and resource node -type RegisterKeeper interface { - KeeGetEffectiveTotalDeposit(kdb *keestatedb.KeestateDB) sdk.Int - KeeGetRemainingOzoneLimit(kdb *keestatedb.KeestateDB) sdk.Int - KeeSetRemainingOzoneLimit(kdb *keestatedb.KeestateDB, value sdk.Int) -} - -// SdsKeper defines functionality related for ozone purchase -type SdsKeeper interface { - Prepay(ctx sdk.Context, sender sdk.AccAddress, coins sdk.Coins) (sdk.Int, error) -} - type PotKeeper interface { InitialTotalSupply(ctx sdk.Context) sdk.Coin BondDenom(ctx sdk.Context) string diff --git a/x/evm/types/params.go b/x/evm/types/params.go index b4ebb2f0..f77fbf33 100644 --- a/x/evm/types/params.go +++ b/x/evm/types/params.go @@ -3,13 +3,10 @@ package types import ( "fmt" "math/big" - "sort" sdk "github.com/cosmos/cosmos-sdk/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/params" @@ -43,11 +40,6 @@ var ( ParamStoreKeyElasticityMultiplier = []byte("ElasticityMultiplier") ParamStoreKeyBaseFee = []byte("BaseFee") ParamStoreKeyEnableHeight = []byte("EnableHeight") - - // proposal proxy - ParamStoreKeyConsensusAddress = []byte("ProposalConsensusAddress") - ParamStoreKeyProxyOwnerAddress = []byte("ProxyOwnerAddress") - ParamStoreKeyContracts = []byte("ProposalContracts") ) // ParamKeyTable returns the parameter key table. @@ -56,15 +48,14 @@ func ParamKeyTable() paramtypes.KeyTable { } // NewParams creates a new Params instance -func NewParams(evmDenom string, enableCreate, enableCall bool, config ChainConfig, feeMarketParams FeeMarketParams, proxyProposalParams ProxyProposalParams, extraEIPs ...int64) Params { +func NewParams(evmDenom string, enableCreate, enableCall bool, config ChainConfig, feeMarketParams FeeMarketParams, extraEIPs ...int64) Params { return Params{ - EvmDenom: evmDenom, - EnableCreate: enableCreate, - EnableCall: enableCall, - ExtraEIPs: extraEIPs, - ChainConfig: config, - FeeMarketParams: feeMarketParams, - ProxyProposalParams: proxyProposalParams, + EvmDenom: evmDenom, + EnableCreate: enableCreate, + EnableCall: enableCall, + ExtraEIPs: extraEIPs, + ChainConfig: config, + FeeMarketParams: feeMarketParams, } } @@ -72,13 +63,12 @@ func NewParams(evmDenom string, enableCreate, enableCall bool, config ChainConfi // ExtraEIPs is empty to prevent overriding the latest hard fork instruction set func DefaultParams() Params { return Params{ - EvmDenom: DefaultEVMDenom, - EnableCreate: true, - EnableCall: true, - ChainConfig: DefaultChainConfig(), - ExtraEIPs: nil, - FeeMarketParams: DefaultFeeMarketParams(), - ProxyProposalParams: DefaultProxyProposalParams(), + EvmDenom: DefaultEVMDenom, + EnableCreate: true, + EnableCall: true, + ChainConfig: DefaultChainConfig(), + ExtraEIPs: nil, + FeeMarketParams: DefaultFeeMarketParams(), } } @@ -96,10 +86,6 @@ func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { paramtypes.NewParamSetPair(ParamStoreKeyElasticityMultiplier, &p.FeeMarketParams.ElasticityMultiplier, validateElasticityMultiplier), paramtypes.NewParamSetPair(ParamStoreKeyBaseFee, &p.FeeMarketParams.BaseFee, validateBaseFee), paramtypes.NewParamSetPair(ParamStoreKeyEnableHeight, &p.FeeMarketParams.EnableHeight, validateEnableHeight), - //proposal proxy - paramtypes.NewParamSetPair(ParamStoreKeyConsensusAddress, &p.ProxyProposalParams.ConsensusAddress, validateAddress), - paramtypes.NewParamSetPair(ParamStoreKeyProxyOwnerAddress, &p.ProxyProposalParams.ProxyOwnerAddress, validateAddress), - paramtypes.NewParamSetPair(ParamStoreKeyContracts, &p.ProxyProposalParams.Contracts, validateContracts), } } @@ -264,70 +250,3 @@ func validateEnableHeight(i interface{}) error { return nil } - -// creates a new ProxyProposalParams instance -func NewProxyProposalParams(consensusAddress, proxyOwnerAddress common.Address) ProxyProposalParams { - return ProxyProposalParams{ - ConsensusAddress: consensusAddress.Hex(), - ProxyOwnerAddress: proxyOwnerAddress.Hex(), - Contracts: make(map[string]*ProxyContractInitState), - } -} - -// ProxyProposalParams returns default proxy parameters -func DefaultProxyProposalParams() ProxyProposalParams { - ppp := NewProxyProposalParams( - common.HexToAddress("0x1000000000000000000000000000000000000000"), - common.HexToAddress("0x1000000000000000000000000000000000000001"), - ) - // TODO: Maybe create some pretty method? - ppp.Contracts["prepay"] = &ProxyContractInitState{ - Height: 1, - Address: "0x1000000000000000000000000000000000010101", - Bin: "0x608060405234801561001057600080fd5b50610b19806100206000396000f3fe6080604052600436106100595760003560e01c806334fe1d1e14610065578063715018a61461006f5780638129fc1c146100865780638da5cb5b1461009d578063f2fde38b146100c8578063ffa1ad74146100f157610060565b3661006057005b600080fd5b61006d61011c565b005b34801561007b57600080fd5b50610084610241565b005b34801561009257600080fd5b5061009b610255565b005b3480156100a957600080fd5b506100b261039b565b6040516100bf91906106d1565b60405180910390f35b3480156100d457600080fd5b506100ef60048036038101906100ea919061071d565b6103c5565b005b3480156100fd57600080fd5b50610106610448565b6040516101139190610766565b60405180910390f35b600034905060008103610164576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161015b906107de565b60405180910390fd5b61016c61066e565b3373ffffffffffffffffffffffffffffffffffffffff1681600060018110610197576101966107fe565b5b6020020181815250506101a861066e565b6020816020848660f1600019f16101be57600080fd5b823373ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff167fa9fdf2e446d7225a2b445bc7c21ca59dcea69b5b23f5c4e6f54f87a5db6cdaee84600060018110610222576102216107fe565b5b60200201516040516102349190610846565b60405180910390a4505050565b61024961044d565b61025360006104cb565b565b60008060019054906101000a900460ff161590508080156102865750600160008054906101000a900460ff1660ff16105b806102b3575061029530610591565b1580156102b25750600160008054906101000a900460ff1660ff16145b5b6102f2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102e9906108d3565b60405180910390fd5b60016000806101000a81548160ff021916908360ff160217905550801561032f576001600060016101000a81548160ff0219169083151502179055505b6103376105b4565b61033f610605565b80156103985760008060016101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498600160405161038f9190610938565b60405180910390a15b50565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6103cd61044d565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361043c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610433906109c5565b60405180910390fd5b610445816104cb565b50565b600081565b610455610666565b73ffffffffffffffffffffffffffffffffffffffff1661047361039b565b73ffffffffffffffffffffffffffffffffffffffff16146104c9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104c090610a31565b60405180910390fd5b565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081603360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b600060019054906101000a900460ff16610603576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105fa90610ac3565b60405180910390fd5b565b600060019054906101000a900460ff16610654576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161064b90610ac3565b60405180910390fd5b61066461065f610666565b6104cb565b565b600033905090565b6040518060200160405280600190602082028036833780820191505090505090565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006106bb82610690565b9050919050565b6106cb816106b0565b82525050565b60006020820190506106e660008301846106c2565b92915050565b600080fd5b6106fa816106b0565b811461070557600080fd5b50565b600081359050610717816106f1565b92915050565b600060208284031215610733576107326106ec565b5b600061074184828501610708565b91505092915050565b600060ff82169050919050565b6107608161074a565b82525050565b600060208201905061077b6000830184610757565b92915050565b600082825260208201905092915050565b7f503a205a45524f5f414d4f554e54000000000000000000000000000000000000600082015250565b60006107c8600e83610781565b91506107d382610792565b602082019050919050565b600060208201905081810360008301526107f7816107bb565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000819050919050565b6108408161082d565b82525050565b600060208201905061085b6000830184610837565b92915050565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160008201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b60006108bd602e83610781565b91506108c882610861565b604082019050919050565b600060208201905081810360008301526108ec816108b0565b9050919050565b6000819050919050565b6000819050919050565b600061092261091d610918846108f3565b6108fd565b61074a565b9050919050565b61093281610907565b82525050565b600060208201905061094d6000830184610929565b92915050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b60006109af602683610781565b91506109ba82610953565b604082019050919050565b600060208201905081810360008301526109de816109a2565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000610a1b602083610781565b9150610a26826109e5565b602082019050919050565b60006020820190508181036000830152610a4a81610a0e565b9050919050565b7f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960008201527f6e697469616c697a696e67000000000000000000000000000000000000000000602082015250565b6000610aad602b83610781565b9150610ab882610a51565b604082019050919050565b60006020820190508181036000830152610adc81610aa0565b905091905056fea2646970667358221220af723f0b659da0cdaa0d447e54bb8c0c3af22886c04139bf5fc7ee74f487451c64736f6c63430008120033", - Init: "0x8129fc1c", - } - return ppp -} - -func validateAddress(i interface{}) error { - value, ok := i.(string) - if !ok { - return fmt.Errorf("invalid parameter type: %T", i) - } - if !common.IsHexAddress(value) { - return fmt.Errorf("address '%s' is not a hex", value) - } - return nil -} - -func validateContracts(i interface{}) error { - contracts, ok := i.(map[string]*ProxyContractInitState) - if !ok { - return fmt.Errorf("invalid parameter type: %T", i) - } - - keys := make([]string, 0) - for k := range contracts { - keys = append(keys, k) - } - sort.Strings(keys) - - for _, k := range keys { - state := contracts[k] - if err := validateAddress(state.Address); err != nil { - return err - } - if state.Height < 1 { - return fmt.Errorf("invalid height '%d'", state.Height) - } - if _, err := hexutil.Decode(state.Bin); err != nil { - return err - } - if _, err := hexutil.Decode(state.Init); len(state.Init) != 0 && err != nil { - return err - } - } - - return nil -} diff --git a/x/evm/types/proposal.go b/x/evm/types/proposal.go deleted file mode 100644 index 83aad802..00000000 --- a/x/evm/types/proposal.go +++ /dev/null @@ -1,79 +0,0 @@ -package types - -import ( - "bytes" - "fmt" - - sdk "github.com/cosmos/cosmos-sdk/types" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" - "github.com/ethereum/go-ethereum/common" -) - -const ( - ProposalTypeUpdateImplementation = "UpdateImplementation" -) - -var ( - _ govtypes.Content = &UpdateImplmentationProposal{} -) - -func init() { - govtypes.RegisterProposalType(ProposalTypeUpdateImplementation) -} - -// NewUpdateImplmentationProposal creates a new proxy update proposal. -func NewUpdateImplmentationProposal(proxy, impl common.Address, data []byte, amt *sdk.Int) govtypes.Content { - return &UpdateImplmentationProposal{ - ProxyAddress: proxy.Hex(), - ImplementationAddress: impl.Hex(), - Data: data, - Amount: amt, - } -} - -// GetTitle returns the title of a new proxy update proposal. -func (epd *UpdateImplmentationProposal) GetTitle() string { - return "New proxy upgrade function call" -} - -// GetDescription returns the description of a new proxy update proposal. -func (epd *UpdateImplmentationProposal) GetDescription() string { - return fmt.Sprintf( - "This is upgrade for proxy '%s' address with a new implementation '%s'", - epd.ProxyAddress, epd.ImplementationAddress, - ) -} - -// ProposalRoute returns the routing key of a new proxy update proposal. -func (epd *UpdateImplmentationProposal) ProposalRoute() string { return RouterKey } - -// ProposalType returns the type of a new proxy update proposal. -func (epd *UpdateImplmentationProposal) ProposalType() string { - return ProposalTypeUpdateImplementation -} - -// ValidateBasic runs basic stateless validity checks -func (epd *UpdateImplmentationProposal) ValidateBasic() error { - err := govtypes.ValidateAbstract(epd) - if err != nil { - return err - } - - if !common.IsHexAddress(epd.ProxyAddress) { - return fmt.Errorf("address '%s' is not valid", epd.ProxyAddress) - } - - if !common.IsHexAddress(epd.ImplementationAddress) { - return fmt.Errorf("address '%s' is not valid", epd.ImplementationAddress) - } - - if bytes.Equal(common.HexToAddress(epd.ImplementationAddress).Bytes(), common.Address{}.Bytes()) { - return fmt.Errorf("implementation address could not be zero address") - } - - if epd.Amount == nil { - return fmt.Errorf("amount should be zero or greater") - } - - return nil -} diff --git a/x/evm/types/proposal.pb.go b/x/evm/types/proposal.pb.go deleted file mode 100644 index f538179f..00000000 --- a/x/evm/types/proposal.pb.go +++ /dev/null @@ -1,487 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: stratos/evm/v1/proposal.proto - -package types - -import ( - fmt "fmt" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// UpdateImplmentationProposal used to update implemntation for genesis proxies -type UpdateImplmentationProposal struct { - // proxy address where data will be executed - ProxyAddress string `protobuf:"bytes,1,opt,name=proxy_address,json=proxyAddress,proto3" json:"proxy_address,omitempty"` - // implmentation address as API for a storage - ImplementationAddress string `protobuf:"bytes,2,opt,name=implementation_address,json=implementationAddress,proto3" json:"implementation_address,omitempty"` - // data for execution - Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` - // value for proxy func call - Amount *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,4,opt,name=value,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"value,omitempty"` -} - -func (m *UpdateImplmentationProposal) Reset() { *m = UpdateImplmentationProposal{} } -func (m *UpdateImplmentationProposal) String() string { return proto.CompactTextString(m) } -func (*UpdateImplmentationProposal) ProtoMessage() {} -func (*UpdateImplmentationProposal) Descriptor() ([]byte, []int) { - return fileDescriptor_3c6013e0da139f02, []int{0} -} -func (m *UpdateImplmentationProposal) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *UpdateImplmentationProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_UpdateImplmentationProposal.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 *UpdateImplmentationProposal) XXX_Merge(src proto.Message) { - xxx_messageInfo_UpdateImplmentationProposal.Merge(m, src) -} -func (m *UpdateImplmentationProposal) XXX_Size() int { - return m.Size() -} -func (m *UpdateImplmentationProposal) XXX_DiscardUnknown() { - xxx_messageInfo_UpdateImplmentationProposal.DiscardUnknown(m) -} - -var xxx_messageInfo_UpdateImplmentationProposal proto.InternalMessageInfo - -func (m *UpdateImplmentationProposal) GetProxyAddress() string { - if m != nil { - return m.ProxyAddress - } - return "" -} - -func (m *UpdateImplmentationProposal) GetImplementationAddress() string { - if m != nil { - return m.ImplementationAddress - } - return "" -} - -func (m *UpdateImplmentationProposal) GetData() []byte { - if m != nil { - return m.Data - } - return nil -} - -func init() { - proto.RegisterType((*UpdateImplmentationProposal)(nil), "stratos.evm.v1.UpdateImplmentationProposal") -} - -func init() { proto.RegisterFile("stratos/evm/v1/proposal.proto", fileDescriptor_3c6013e0da139f02) } - -var fileDescriptor_3c6013e0da139f02 = []byte{ - // 290 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x90, 0xc1, 0x4a, 0xf3, 0x40, - 0x14, 0x85, 0x3b, 0xff, 0x5f, 0x0b, 0x0e, 0xd5, 0x45, 0x50, 0x29, 0x8a, 0xd3, 0xa2, 0x20, 0xdd, - 0x34, 0x43, 0x51, 0x1f, 0xa0, 0xdd, 0xd5, 0x95, 0x04, 0xdc, 0xb8, 0x91, 0x69, 0x32, 0xa4, 0xc1, - 0xcc, 0xdc, 0x21, 0x73, 0x13, 0xda, 0xb7, 0xf0, 0xb1, 0x5c, 0x76, 0xa9, 0x2e, 0x8a, 0x24, 0x2f, - 0x22, 0x9d, 0xa4, 0x45, 0x57, 0xf7, 0x70, 0xcf, 0x39, 0xdf, 0xe2, 0xd0, 0x4b, 0x8b, 0x99, 0x40, - 0xb0, 0x5c, 0x16, 0x8a, 0x17, 0x63, 0x6e, 0x32, 0x30, 0x60, 0x45, 0xea, 0x9b, 0x0c, 0x10, 0xbc, - 0xe3, 0xc6, 0xf6, 0x65, 0xa1, 0xfc, 0x62, 0x7c, 0x7e, 0x12, 0x43, 0x0c, 0xce, 0xe2, 0x5b, 0x55, - 0xa7, 0xae, 0x3e, 0x09, 0xbd, 0x78, 0x32, 0x91, 0x40, 0x39, 0x53, 0x26, 0x55, 0x52, 0xa3, 0xc0, - 0x04, 0xf4, 0x63, 0xc3, 0xf2, 0xae, 0xe9, 0x91, 0xc9, 0x60, 0xb9, 0x7a, 0x11, 0x51, 0x94, 0x49, - 0x6b, 0x7b, 0x64, 0x40, 0x86, 0x87, 0x41, 0xd7, 0x3d, 0x27, 0xf5, 0xcf, 0xbb, 0xa7, 0x67, 0x89, - 0x32, 0xa9, 0xdc, 0xd7, 0xf7, 0xe9, 0x7f, 0x2e, 0x7d, 0xfa, 0xd7, 0xdd, 0xd5, 0x3c, 0xda, 0x8e, - 0x04, 0x8a, 0xde, 0xff, 0x01, 0x19, 0x76, 0x03, 0xa7, 0xbd, 0x07, 0x7a, 0x50, 0x88, 0x34, 0x97, - 0xbd, 0xf6, 0xb6, 0x39, 0xbd, 0xfb, 0xda, 0xf4, 0x6f, 0xe2, 0x04, 0x17, 0xf9, 0xdc, 0x0f, 0x41, - 0xf1, 0x10, 0xac, 0x02, 0xdb, 0x9c, 0x91, 0x8d, 0x5e, 0x39, 0xae, 0x8c, 0xb4, 0xfe, 0x4c, 0x63, - 0xb9, 0xe9, 0x77, 0x26, 0x0a, 0x72, 0x8d, 0x41, 0x8d, 0x98, 0xce, 0xde, 0x4b, 0x46, 0xd6, 0x25, - 0x23, 0xdf, 0x25, 0x23, 0x6f, 0x15, 0x6b, 0xad, 0x2b, 0xd6, 0xfa, 0xa8, 0x58, 0xeb, 0x99, 0xff, - 0x42, 0x36, 0x33, 0x69, 0x89, 0x3b, 0x39, 0x0a, 0x17, 0x22, 0xd1, 0x7c, 0xe9, 0x86, 0x75, 0xfc, - 0x79, 0xc7, 0xad, 0x75, 0xfb, 0x13, 0x00, 0x00, 0xff, 0xff, 0xfb, 0x01, 0xc9, 0x85, 0x74, 0x01, - 0x00, 0x00, -} - -func (m *UpdateImplmentationProposal) 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 *UpdateImplmentationProposal) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *UpdateImplmentationProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Amount != nil { - { - size := m.Amount.Size() - i -= size - if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintProposal(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if len(m.Data) > 0 { - i -= len(m.Data) - copy(dAtA[i:], m.Data) - i = encodeVarintProposal(dAtA, i, uint64(len(m.Data))) - i-- - dAtA[i] = 0x1a - } - if len(m.ImplementationAddress) > 0 { - i -= len(m.ImplementationAddress) - copy(dAtA[i:], m.ImplementationAddress) - i = encodeVarintProposal(dAtA, i, uint64(len(m.ImplementationAddress))) - i-- - dAtA[i] = 0x12 - } - if len(m.ProxyAddress) > 0 { - i -= len(m.ProxyAddress) - copy(dAtA[i:], m.ProxyAddress) - i = encodeVarintProposal(dAtA, i, uint64(len(m.ProxyAddress))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintProposal(dAtA []byte, offset int, v uint64) int { - offset -= sovProposal(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *UpdateImplmentationProposal) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ProxyAddress) - if l > 0 { - n += 1 + l + sovProposal(uint64(l)) - } - l = len(m.ImplementationAddress) - if l > 0 { - n += 1 + l + sovProposal(uint64(l)) - } - l = len(m.Data) - if l > 0 { - n += 1 + l + sovProposal(uint64(l)) - } - if m.Amount != nil { - l = m.Amount.Size() - n += 1 + l + sovProposal(uint64(l)) - } - return n -} - -func sovProposal(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozProposal(x uint64) (n int) { - return sovProposal(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *UpdateImplmentationProposal) 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 ErrIntOverflowProposal - } - 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: UpdateImplmentationProposal: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UpdateImplmentationProposal: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProxyAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProposal - } - 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 ErrInvalidLengthProposal - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthProposal - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProxyAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ImplementationAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProposal - } - 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 ErrInvalidLengthProposal - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthProposal - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ImplementationAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProposal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthProposal - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthProposal - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) - if m.Data == nil { - m.Data = []byte{} - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProposal - } - 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 ErrInvalidLengthProposal - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthProposal - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v github_com_cosmos_cosmos_sdk_types.Int - m.Amount = &v - if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipProposal(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthProposal - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipProposal(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowProposal - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowProposal - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowProposal - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthProposal - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupProposal - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthProposal - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthProposal = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowProposal = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupProposal = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/evm/tracers/tracers.go b/x/evm/types/tracer.go similarity index 64% rename from x/evm/tracers/tracers.go rename to x/evm/types/tracer.go index 4f2f9d9a..ea22fd55 100644 --- a/x/evm/tracers/tracers.go +++ b/x/evm/types/tracer.go @@ -1,25 +1,6 @@ -// Copyright 2017 The go-ethereum Authors -// This file is part of the go-ethereum library. -// -// The go-ethereum library is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// The go-ethereum library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . - -// Package tracers is a manager for transaction tracing engines. -package tracers +package types import ( - "encoding/json" - "errors" "fmt" "math/big" "os" @@ -27,68 +8,11 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core" + "github.com/ethereum/go-ethereum/core/vm" + "github.com/ethereum/go-ethereum/eth/tracers/logger" "github.com/ethereum/go-ethereum/params" - - "github.com/stratosnet/stratos-chain/x/evm/tracers/logger" - "github.com/stratosnet/stratos-chain/x/evm/vm" ) -type TraceConfig struct { - *logger.Config - Tracer *string - Timeout *string - Reexec *uint64 - // Config specific to given tracer. Note struct logger - // config are historically embedded in main object. - TracerConfig json.RawMessage -} - -// Context contains some contextual infos for a transaction execution that is not -// available from within the EVM object. -type Context struct { - BlockHash common.Hash // Hash of the block the tx is contained within (zero if dangling tx or call) - TxIndex int // Index of the transaction within a block (zero if dangling tx or call) - TxHash common.Hash // Hash of the transaction being traced (zero if dangling call) -} - -// Tracer interface extends vm.EVMLogger and additionally -// allows collecting the tracing result. -type Tracer interface { - vm.EVMLogger - GetResult() (json.RawMessage, error) - // Stop terminates execution of the tracer at the first opportune moment. - Stop(err error) -} - -type lookupFunc func(string, *Context, json.RawMessage) (Tracer, error) - -var ( - lookups []lookupFunc -) - -// RegisterLookup registers a method as a lookup for tracers, meaning that -// users can invoke a named tracer through that lookup. If 'wildcard' is true, -// then the lookup will be placed last. This is typically meant for interpreted -// engines (js) which can evaluate dynamic user-supplied code. -func RegisterLookup(wildcard bool, lookup lookupFunc) { - if wildcard { - lookups = append(lookups, lookup) - } else { - lookups = append([]lookupFunc{lookup}, lookups...) - } -} - -// New returns a new instance of a tracer, by iterating through the -// registered lookups. -func New(code string, ctx *Context, cfg json.RawMessage) (Tracer, error) { - for _, lookup := range lookups { - if tracer, err := lookup(code, ctx, cfg); err == nil { - return tracer, nil - } - } - return nil, errors.New("tracer not found") -} - const ( TracerAccessList = "access_list" TracerJSON = "json" diff --git a/x/evm/vm/analysis.go b/x/evm/vm/analysis.go deleted file mode 100644 index 4aa8cfe7..00000000 --- a/x/evm/vm/analysis.go +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. -// -// The go-ethereum library is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// The go-ethereum library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . - -package vm - -const ( - set2BitsMask = uint16(0b11) - set3BitsMask = uint16(0b111) - set4BitsMask = uint16(0b1111) - set5BitsMask = uint16(0b1_1111) - set6BitsMask = uint16(0b11_1111) - set7BitsMask = uint16(0b111_1111) -) - -// bitvec is a bit vector which maps bytes in a program. -// An unset bit means the byte is an opcode, a set bit means -// it's data (i.e. argument of PUSHxx). -type bitvec []byte - -func (bits bitvec) set1(pos uint64) { - bits[pos/8] |= 1 << (pos % 8) -} - -func (bits bitvec) setN(flag uint16, pos uint64) { - a := flag << (pos % 8) - bits[pos/8] |= byte(a) - if b := byte(a >> 8); b != 0 { - bits[pos/8+1] = b - } -} - -func (bits bitvec) set8(pos uint64) { - a := byte(0xFF << (pos % 8)) - bits[pos/8] |= a - bits[pos/8+1] = ^a -} - -func (bits bitvec) set16(pos uint64) { - a := byte(0xFF << (pos % 8)) - bits[pos/8] |= a - bits[pos/8+1] = 0xFF - bits[pos/8+2] = ^a -} - -// codeSegment checks if the position is in a code segment. -func (bits *bitvec) codeSegment(pos uint64) bool { - return (((*bits)[pos/8] >> (pos % 8)) & 1) == 0 -} - -// codeBitmap collects data locations in code. -func codeBitmap(code []byte) bitvec { - // The bitmap is 4 bytes longer than necessary, in case the code - // ends with a PUSH32, the algorithm will push zeroes onto the - // bitvector outside the bounds of the actual code. - bits := make(bitvec, len(code)/8+1+4) - return codeBitmapInternal(code, bits) -} - -// codeBitmapInternal is the internal implementation of codeBitmap. -// It exists for the purpose of being able to run benchmark tests -// without dynamic allocations affecting the results. -func codeBitmapInternal(code, bits bitvec) bitvec { - for pc := uint64(0); pc < uint64(len(code)); { - op := OpCode(code[pc]) - pc++ - if int8(op) < int8(PUSH1) { // If not PUSH (the int8(op) > int(PUSH32) is always false). - continue - } - numbits := op - PUSH1 + 1 - if numbits >= 8 { - for ; numbits >= 16; numbits -= 16 { - bits.set16(pc) - pc += 16 - } - for ; numbits >= 8; numbits -= 8 { - bits.set8(pc) - pc += 8 - } - } - switch numbits { - case 1: - bits.set1(pc) - pc += 1 - case 2: - bits.setN(set2BitsMask, pc) - pc += 2 - case 3: - bits.setN(set3BitsMask, pc) - pc += 3 - case 4: - bits.setN(set4BitsMask, pc) - pc += 4 - case 5: - bits.setN(set5BitsMask, pc) - pc += 5 - case 6: - bits.setN(set6BitsMask, pc) - pc += 6 - case 7: - bits.setN(set7BitsMask, pc) - pc += 7 - } - } - return bits -} diff --git a/x/evm/vm/common.go b/x/evm/vm/common.go deleted file mode 100644 index 90ba4a4a..00000000 --- a/x/evm/vm/common.go +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. -// -// The go-ethereum library is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// The go-ethereum library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . - -package vm - -import ( - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/math" - "github.com/holiman/uint256" -) - -// calcMemSize64 calculates the required memory size, and returns -// the size and whether the result overflowed uint64 -func calcMemSize64(off, l *uint256.Int) (uint64, bool) { - if !l.IsUint64() { - return 0, true - } - return calcMemSize64WithUint(off, l.Uint64()) -} - -// calcMemSize64WithUint calculates the required memory size, and returns -// the size and whether the result overflowed uint64 -// Identical to calcMemSize64, but length is a uint64 -func calcMemSize64WithUint(off *uint256.Int, length64 uint64) (uint64, bool) { - // if length is zero, memsize is always zero, regardless of offset - if length64 == 0 { - return 0, false - } - // Check that offset doesn't overflow - offset64, overflow := off.Uint64WithOverflow() - if overflow { - return 0, true - } - val := offset64 + length64 - // if value < either of it's parts, then it overflowed - return val, val < offset64 -} - -// getData returns a slice from the data based on the start and size and pads -// up to size with zero's. This function is overflow safe. -func getData(data []byte, start uint64, size uint64) []byte { - length := uint64(len(data)) - if start > length { - start = length - } - end := start + size - if end > length { - end = length - } - return common.RightPadBytes(data[start:end], int(size)) -} - -// toWordSize returns the ceiled word size required for memory expansion. -func toWordSize(size uint64) uint64 { - if size > math.MaxUint64-31 { - return math.MaxUint64/32 + 1 - } - - return (size + 31) / 32 -} - -func allZero(b []byte) bool { - for _, byte := range b { - if byte != 0 { - return false - } - } - return true -} diff --git a/x/evm/vm/contract.go b/x/evm/vm/contract.go deleted file mode 100644 index bb090296..00000000 --- a/x/evm/vm/contract.go +++ /dev/null @@ -1,194 +0,0 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. -// -// The go-ethereum library is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// The go-ethereum library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . - -package vm - -import ( - "math/big" - - "github.com/ethereum/go-ethereum/common" - "github.com/holiman/uint256" -) - -// ContractRef is a reference to the contract's backing object -type ContractRef interface { - Address() common.Address -} - -// AccountRef implements ContractRef. -// -// Account references are used during EVM initialisation and -// it's primary use is to fetch addresses. Removing this object -// proves difficult because of the cached jump destinations which -// are fetched from the parent contract (i.e. the caller), which -// is a ContractRef. -type AccountRef common.Address - -// Address casts AccountRef to a Address -func (ar AccountRef) Address() common.Address { return (common.Address)(ar) } - -// Contract represents an ethereum contract in the state database. It contains -// the contract code, calling arguments. Contract implements ContractRef -type Contract struct { - // CallerAddress is the result of the caller which initialised this - // contract. However when the "call method" is delegated this value - // needs to be initialised to that of the caller's caller. - CallerAddress common.Address - caller ContractRef - self ContractRef - - jumpdests map[common.Hash]bitvec // Aggregated result of JUMPDEST analysis. - analysis bitvec // Locally cached result of JUMPDEST analysis - - Code []byte - CodeHash common.Hash - CodeAddr *common.Address - Input []byte - - Gas uint64 - value *big.Int -} - -// NewContract returns a new contract environment for the execution of EVM. -func NewContract(caller ContractRef, object ContractRef, value *big.Int, gas uint64) *Contract { - c := &Contract{CallerAddress: caller.Address(), caller: caller, self: object} - - if parent, ok := caller.(*Contract); ok { - // Reuse JUMPDEST analysis from parent context if available. - c.jumpdests = parent.jumpdests - } else { - c.jumpdests = make(map[common.Hash]bitvec) - } - - // Gas should be a pointer so it can safely be reduced through the run - // This pointer will be off the state transition - c.Gas = gas - // ensures a value is set - c.value = value - - return c -} - -func (c *Contract) validJumpdest(dest *uint256.Int) bool { - udest, overflow := dest.Uint64WithOverflow() - // PC cannot go beyond len(code) and certainly can't be bigger than 63bits. - // Don't bother checking for JUMPDEST in that case. - if overflow || udest >= uint64(len(c.Code)) { - return false - } - // Only JUMPDESTs allowed for destinations - if OpCode(c.Code[udest]) != JUMPDEST { - return false - } - return c.isCode(udest) -} - -// isCode returns true if the provided PC location is an actual opcode, as -// opposed to a data-segment following a PUSHN operation. -func (c *Contract) isCode(udest uint64) bool { - // Do we already have an analysis laying around? - if c.analysis != nil { - return c.analysis.codeSegment(udest) - } - // Do we have a contract hash already? - // If we do have a hash, that means it's a 'regular' contract. For regular - // contracts ( not temporary initcode), we store the analysis in a map - if c.CodeHash != (common.Hash{}) { - // Does parent context have the analysis? - analysis, exist := c.jumpdests[c.CodeHash] - if !exist { - // Do the analysis and save in parent context - // We do not need to store it in c.analysis - analysis = codeBitmap(c.Code) - c.jumpdests[c.CodeHash] = analysis - } - // Also stash it in current contract for faster access - c.analysis = analysis - return analysis.codeSegment(udest) - } - // We don't have the code hash, most likely a piece of initcode not already - // in state trie. In that case, we do an analysis, and save it locally, so - // we don't have to recalculate it for every JUMP instruction in the execution - // However, we don't save it within the parent context - if c.analysis == nil { - c.analysis = codeBitmap(c.Code) - } - return c.analysis.codeSegment(udest) -} - -// AsDelegate sets the contract to be a delegate call and returns the current -// contract (for chaining calls) -func (c *Contract) AsDelegate() *Contract { - // NOTE: caller must, at all times be a contract. It should never happen - // that caller is something other than a Contract. - parent := c.caller.(*Contract) - c.CallerAddress = parent.CallerAddress - c.value = parent.value - - return c -} - -// GetOp returns the n'th element in the contract's byte array -func (c *Contract) GetOp(n uint64) OpCode { - if n < uint64(len(c.Code)) { - return OpCode(c.Code[n]) - } - - return STOP -} - -// Caller returns the caller of the contract. -// -// Caller will recursively call caller when the contract is a delegate -// call, including that of caller's caller. -func (c *Contract) Caller() common.Address { - return c.CallerAddress -} - -// UseGas attempts the use gas and subtracts it and returns true on success -func (c *Contract) UseGas(gas uint64) (ok bool) { - if c.Gas < gas { - return false - } - c.Gas -= gas - return true -} - -// Address returns the contracts address -func (c *Contract) Address() common.Address { - return c.self.Address() -} - -// Value returns the contract's value (sent to it from it's caller) -func (c *Contract) Value() *big.Int { - return c.value -} - -// SetCallCode sets the code of the contract and address of the backing data -// object -func (c *Contract) SetCallCode(addr *common.Address, hash common.Hash, code []byte) { - c.Code = code - c.CodeHash = hash - c.CodeAddr = addr -} - -// SetCodeOptionalHash can be used to provide code, but it's optional to provide hash. -// In case hash is not provided, the jumpdest analysis will not be saved to the parent context -func (c *Contract) SetCodeOptionalHash(addr *common.Address, codeAndHash *codeAndHash) { - c.Code = codeAndHash.code - c.CodeHash = codeAndHash.hash - c.CodeAddr = addr -} diff --git a/x/evm/vm/contracts.go b/x/evm/vm/contracts.go deleted file mode 100644 index 1b832b63..00000000 --- a/x/evm/vm/contracts.go +++ /dev/null @@ -1,1043 +0,0 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. -// -// The go-ethereum library is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// The go-ethereum library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . - -package vm - -import ( - "crypto/sha256" - "encoding/binary" - "errors" - "math/big" - - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/math" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/crypto/blake2b" - "github.com/ethereum/go-ethereum/crypto/bls12381" - "github.com/ethereum/go-ethereum/crypto/bn256" - "github.com/ethereum/go-ethereum/params" - "golang.org/x/crypto/ripemd160" -) - -// PrecompiledContract is the basic interface for native Go contracts. The implementation -// requires a deterministic gas count based on the input size of the Run method of the -// contract. -type PrecompiledContract interface { - RequiredGas(input []byte) uint64 // RequiredPrice calculates the contract gas use - Run(input []byte) ([]byte, error) // Run runs the precompiled contract -} - -// PrecompiledContractsHomestead contains the default set of pre-compiled Ethereum -// contracts used in the Frontier and Homestead releases. -var PrecompiledContractsHomestead = map[common.Address]PrecompiledContract{ - common.BytesToAddress([]byte{1}): &ecrecover{}, - common.BytesToAddress([]byte{2}): &sha256hash{}, - common.BytesToAddress([]byte{3}): &ripemd160hash{}, - common.BytesToAddress([]byte{4}): &dataCopy{}, -} - -// PrecompiledContractsByzantium contains the default set of pre-compiled Ethereum -// contracts used in the Byzantium release. -var PrecompiledContractsByzantium = map[common.Address]PrecompiledContract{ - common.BytesToAddress([]byte{1}): &ecrecover{}, - common.BytesToAddress([]byte{2}): &sha256hash{}, - common.BytesToAddress([]byte{3}): &ripemd160hash{}, - common.BytesToAddress([]byte{4}): &dataCopy{}, - common.BytesToAddress([]byte{5}): &bigModExp{eip2565: false}, - common.BytesToAddress([]byte{6}): &bn256AddByzantium{}, - common.BytesToAddress([]byte{7}): &bn256ScalarMulByzantium{}, - common.BytesToAddress([]byte{8}): &bn256PairingByzantium{}, -} - -// PrecompiledContractsIstanbul contains the default set of pre-compiled Ethereum -// contracts used in the Istanbul release. -var PrecompiledContractsIstanbul = map[common.Address]PrecompiledContract{ - common.BytesToAddress([]byte{1}): &ecrecover{}, - common.BytesToAddress([]byte{2}): &sha256hash{}, - common.BytesToAddress([]byte{3}): &ripemd160hash{}, - common.BytesToAddress([]byte{4}): &dataCopy{}, - common.BytesToAddress([]byte{5}): &bigModExp{eip2565: false}, - common.BytesToAddress([]byte{6}): &bn256AddIstanbul{}, - common.BytesToAddress([]byte{7}): &bn256ScalarMulIstanbul{}, - common.BytesToAddress([]byte{8}): &bn256PairingIstanbul{}, - common.BytesToAddress([]byte{9}): &blake2F{}, -} - -// PrecompiledContractsBerlin contains the default set of pre-compiled Ethereum -// contracts used in the Berlin release. -var PrecompiledContractsBerlin = map[common.Address]PrecompiledContract{ - common.BytesToAddress([]byte{1}): &ecrecover{}, - common.BytesToAddress([]byte{2}): &sha256hash{}, - common.BytesToAddress([]byte{3}): &ripemd160hash{}, - common.BytesToAddress([]byte{4}): &dataCopy{}, - common.BytesToAddress([]byte{5}): &bigModExp{eip2565: true}, - common.BytesToAddress([]byte{6}): &bn256AddIstanbul{}, - common.BytesToAddress([]byte{7}): &bn256ScalarMulIstanbul{}, - common.BytesToAddress([]byte{8}): &bn256PairingIstanbul{}, - common.BytesToAddress([]byte{9}): &blake2F{}, -} - -// PrecompiledContractsBLS contains the set of pre-compiled Ethereum -// contracts specified in EIP-2537. These are exported for testing purposes. -var PrecompiledContractsBLS = map[common.Address]PrecompiledContract{ - common.BytesToAddress([]byte{10}): &bls12381G1Add{}, - common.BytesToAddress([]byte{11}): &bls12381G1Mul{}, - common.BytesToAddress([]byte{12}): &bls12381G1MultiExp{}, - common.BytesToAddress([]byte{13}): &bls12381G2Add{}, - common.BytesToAddress([]byte{14}): &bls12381G2Mul{}, - common.BytesToAddress([]byte{15}): &bls12381G2MultiExp{}, - common.BytesToAddress([]byte{16}): &bls12381Pairing{}, - common.BytesToAddress([]byte{17}): &bls12381MapG1{}, - common.BytesToAddress([]byte{18}): &bls12381MapG2{}, -} - -var ( - PrecompiledAddressesBerlin []common.Address - PrecompiledAddressesIstanbul []common.Address - PrecompiledAddressesByzantium []common.Address - PrecompiledAddressesHomestead []common.Address -) - -func init() { - for k := range PrecompiledContractsHomestead { - PrecompiledAddressesHomestead = append(PrecompiledAddressesHomestead, k) - } - for k := range PrecompiledContractsByzantium { - PrecompiledAddressesByzantium = append(PrecompiledAddressesByzantium, k) - } - for k := range PrecompiledContractsIstanbul { - PrecompiledAddressesIstanbul = append(PrecompiledAddressesIstanbul, k) - } - for k := range PrecompiledContractsBerlin { - PrecompiledAddressesBerlin = append(PrecompiledAddressesBerlin, k) - } -} - -// ActivePrecompiles returns the precompiles enabled with the current configuration. -func ActivePrecompiles(rules params.Rules) []common.Address { - switch { - case rules.IsBerlin: - return PrecompiledAddressesBerlin - case rules.IsIstanbul: - return PrecompiledAddressesIstanbul - case rules.IsByzantium: - return PrecompiledAddressesByzantium - default: - return PrecompiledAddressesHomestead - } -} - -// RunPrecompiledContract runs and evaluates the output of a precompiled contract. -// It returns -// - the returned bytes, -// - the _remaining_ gas, -// - any error that occurred -func RunPrecompiledContract(p PrecompiledContract, input []byte, suppliedGas uint64) (ret []byte, remainingGas uint64, err error) { - gasCost := p.RequiredGas(input) - if suppliedGas < gasCost { - return nil, 0, ErrOutOfGas - } - suppliedGas -= gasCost - output, err := p.Run(input) - return output, suppliedGas, err -} - -// ECRECOVER implemented as a native contract. -type ecrecover struct{} - -func (c *ecrecover) RequiredGas(input []byte) uint64 { - return params.EcrecoverGas -} - -func (c *ecrecover) Run(input []byte) ([]byte, error) { - const ecRecoverInputLength = 128 - - input = common.RightPadBytes(input, ecRecoverInputLength) - // "input" is (hash, v, r, s), each 32 bytes - // but for ecrecover we want (r, s, v) - - r := new(big.Int).SetBytes(input[64:96]) - s := new(big.Int).SetBytes(input[96:128]) - v := input[63] - 27 - - // tighter sig s values input homestead only apply to tx sigs - if !allZero(input[32:63]) || !crypto.ValidateSignatureValues(v, r, s, false) { - return nil, nil - } - // We must make sure not to modify the 'input', so placing the 'v' along with - // the signature needs to be done on a new allocation - sig := make([]byte, 65) - copy(sig, input[64:128]) - sig[64] = v - // v needs to be at the end for libsecp256k1 - pubKey, err := crypto.Ecrecover(input[:32], sig) - // make sure the public key is a valid one - if err != nil { - return nil, nil - } - - // the first byte of pubkey is bitcoin heritage - return common.LeftPadBytes(crypto.Keccak256(pubKey[1:])[12:], 32), nil -} - -// SHA256 implemented as a native contract. -type sha256hash struct{} - -// RequiredGas returns the gas required to execute the pre-compiled contract. -// -// This method does not require any overflow checking as the input size gas costs -// required for anything significant is so high it's impossible to pay for. -func (c *sha256hash) RequiredGas(input []byte) uint64 { - return uint64(len(input)+31)/32*params.Sha256PerWordGas + params.Sha256BaseGas -} -func (c *sha256hash) Run(input []byte) ([]byte, error) { - h := sha256.Sum256(input) - return h[:], nil -} - -// RIPEMD160 implemented as a native contract. -type ripemd160hash struct{} - -// RequiredGas returns the gas required to execute the pre-compiled contract. -// -// This method does not require any overflow checking as the input size gas costs -// required for anything significant is so high it's impossible to pay for. -func (c *ripemd160hash) RequiredGas(input []byte) uint64 { - return uint64(len(input)+31)/32*params.Ripemd160PerWordGas + params.Ripemd160BaseGas -} -func (c *ripemd160hash) Run(input []byte) ([]byte, error) { - ripemd := ripemd160.New() - ripemd.Write(input) - return common.LeftPadBytes(ripemd.Sum(nil), 32), nil -} - -// data copy implemented as a native contract. -type dataCopy struct{} - -// RequiredGas returns the gas required to execute the pre-compiled contract. -// -// This method does not require any overflow checking as the input size gas costs -// required for anything significant is so high it's impossible to pay for. -func (c *dataCopy) RequiredGas(input []byte) uint64 { - return uint64(len(input)+31)/32*params.IdentityPerWordGas + params.IdentityBaseGas -} -func (c *dataCopy) Run(in []byte) ([]byte, error) { - return in, nil -} - -// bigModExp implements a native big integer exponential modular operation. -type bigModExp struct { - eip2565 bool -} - -var ( - big0 = big.NewInt(0) - big1 = big.NewInt(1) - big3 = big.NewInt(3) - big4 = big.NewInt(4) - big7 = big.NewInt(7) - big8 = big.NewInt(8) - big16 = big.NewInt(16) - big20 = big.NewInt(20) - big32 = big.NewInt(32) - big64 = big.NewInt(64) - big96 = big.NewInt(96) - big480 = big.NewInt(480) - big1024 = big.NewInt(1024) - big3072 = big.NewInt(3072) - big199680 = big.NewInt(199680) -) - -// modexpMultComplexity implements bigModexp multComplexity formula, as defined in EIP-198 -// -// def mult_complexity(x): -// if x <= 64: return x ** 2 -// elif x <= 1024: return x ** 2 // 4 + 96 * x - 3072 -// else: return x ** 2 // 16 + 480 * x - 199680 -// -// where is x is max(length_of_MODULUS, length_of_BASE) -func modexpMultComplexity(x *big.Int) *big.Int { - switch { - case x.Cmp(big64) <= 0: - x.Mul(x, x) // x ** 2 - case x.Cmp(big1024) <= 0: - // (x ** 2 // 4 ) + ( 96 * x - 3072) - x = new(big.Int).Add( - new(big.Int).Div(new(big.Int).Mul(x, x), big4), - new(big.Int).Sub(new(big.Int).Mul(big96, x), big3072), - ) - default: - // (x ** 2 // 16) + (480 * x - 199680) - x = new(big.Int).Add( - new(big.Int).Div(new(big.Int).Mul(x, x), big16), - new(big.Int).Sub(new(big.Int).Mul(big480, x), big199680), - ) - } - return x -} - -// RequiredGas returns the gas required to execute the pre-compiled contract. -func (c *bigModExp) RequiredGas(input []byte) uint64 { - var ( - baseLen = new(big.Int).SetBytes(getData(input, 0, 32)) - expLen = new(big.Int).SetBytes(getData(input, 32, 32)) - modLen = new(big.Int).SetBytes(getData(input, 64, 32)) - ) - if len(input) > 96 { - input = input[96:] - } else { - input = input[:0] - } - // Retrieve the head 32 bytes of exp for the adjusted exponent length - var expHead *big.Int - if big.NewInt(int64(len(input))).Cmp(baseLen) <= 0 { - expHead = new(big.Int) - } else { - if expLen.Cmp(big32) > 0 { - expHead = new(big.Int).SetBytes(getData(input, baseLen.Uint64(), 32)) - } else { - expHead = new(big.Int).SetBytes(getData(input, baseLen.Uint64(), expLen.Uint64())) - } - } - // Calculate the adjusted exponent length - var msb int - if bitlen := expHead.BitLen(); bitlen > 0 { - msb = bitlen - 1 - } - adjExpLen := new(big.Int) - if expLen.Cmp(big32) > 0 { - adjExpLen.Sub(expLen, big32) - adjExpLen.Mul(big8, adjExpLen) - } - adjExpLen.Add(adjExpLen, big.NewInt(int64(msb))) - // Calculate the gas cost of the operation - gas := new(big.Int).Set(math.BigMax(modLen, baseLen)) - if c.eip2565 { - // EIP-2565 has three changes - // 1. Different multComplexity (inlined here) - // in EIP-2565 (https://eips.ethereum.org/EIPS/eip-2565): - // - // def mult_complexity(x): - // ceiling(x/8)^2 - // - //where is x is max(length_of_MODULUS, length_of_BASE) - gas = gas.Add(gas, big7) - gas = gas.Div(gas, big8) - gas.Mul(gas, gas) - - gas.Mul(gas, math.BigMax(adjExpLen, big1)) - // 2. Different divisor (`GQUADDIVISOR`) (3) - gas.Div(gas, big3) - if gas.BitLen() > 64 { - return math.MaxUint64 - } - // 3. Minimum price of 200 gas - if gas.Uint64() < 200 { - return 200 - } - return gas.Uint64() - } - gas = modexpMultComplexity(gas) - gas.Mul(gas, math.BigMax(adjExpLen, big1)) - gas.Div(gas, big20) - - if gas.BitLen() > 64 { - return math.MaxUint64 - } - return gas.Uint64() -} - -func (c *bigModExp) Run(input []byte) ([]byte, error) { - var ( - baseLen = new(big.Int).SetBytes(getData(input, 0, 32)).Uint64() - expLen = new(big.Int).SetBytes(getData(input, 32, 32)).Uint64() - modLen = new(big.Int).SetBytes(getData(input, 64, 32)).Uint64() - ) - if len(input) > 96 { - input = input[96:] - } else { - input = input[:0] - } - // Handle a special case when both the base and mod length is zero - if baseLen == 0 && modLen == 0 { - return []byte{}, nil - } - // Retrieve the operands and execute the exponentiation - var ( - base = new(big.Int).SetBytes(getData(input, 0, baseLen)) - exp = new(big.Int).SetBytes(getData(input, baseLen, expLen)) - mod = new(big.Int).SetBytes(getData(input, baseLen+expLen, modLen)) - ) - if mod.BitLen() == 0 { - // Modulo 0 is undefined, return zero - return common.LeftPadBytes([]byte{}, int(modLen)), nil - } - return common.LeftPadBytes(base.Exp(base, exp, mod).Bytes(), int(modLen)), nil -} - -// newCurvePoint unmarshals a binary blob into a bn256 elliptic curve point, -// returning it, or an error if the point is invalid. -func newCurvePoint(blob []byte) (*bn256.G1, error) { - p := new(bn256.G1) - if _, err := p.Unmarshal(blob); err != nil { - return nil, err - } - return p, nil -} - -// newTwistPoint unmarshals a binary blob into a bn256 elliptic curve point, -// returning it, or an error if the point is invalid. -func newTwistPoint(blob []byte) (*bn256.G2, error) { - p := new(bn256.G2) - if _, err := p.Unmarshal(blob); err != nil { - return nil, err - } - return p, nil -} - -// runBn256Add implements the Bn256Add precompile, referenced by both -// Byzantium and Istanbul operations. -func runBn256Add(input []byte) ([]byte, error) { - x, err := newCurvePoint(getData(input, 0, 64)) - if err != nil { - return nil, err - } - y, err := newCurvePoint(getData(input, 64, 64)) - if err != nil { - return nil, err - } - res := new(bn256.G1) - res.Add(x, y) - return res.Marshal(), nil -} - -// bn256Add implements a native elliptic curve point addition conforming to -// Istanbul consensus rules. -type bn256AddIstanbul struct{} - -// RequiredGas returns the gas required to execute the pre-compiled contract. -func (c *bn256AddIstanbul) RequiredGas(input []byte) uint64 { - return params.Bn256AddGasIstanbul -} - -func (c *bn256AddIstanbul) Run(input []byte) ([]byte, error) { - return runBn256Add(input) -} - -// bn256AddByzantium implements a native elliptic curve point addition -// conforming to Byzantium consensus rules. -type bn256AddByzantium struct{} - -// RequiredGas returns the gas required to execute the pre-compiled contract. -func (c *bn256AddByzantium) RequiredGas(input []byte) uint64 { - return params.Bn256AddGasByzantium -} - -func (c *bn256AddByzantium) Run(input []byte) ([]byte, error) { - return runBn256Add(input) -} - -// runBn256ScalarMul implements the Bn256ScalarMul precompile, referenced by -// both Byzantium and Istanbul operations. -func runBn256ScalarMul(input []byte) ([]byte, error) { - p, err := newCurvePoint(getData(input, 0, 64)) - if err != nil { - return nil, err - } - res := new(bn256.G1) - res.ScalarMult(p, new(big.Int).SetBytes(getData(input, 64, 32))) - return res.Marshal(), nil -} - -// bn256ScalarMulIstanbul implements a native elliptic curve scalar -// multiplication conforming to Istanbul consensus rules. -type bn256ScalarMulIstanbul struct{} - -// RequiredGas returns the gas required to execute the pre-compiled contract. -func (c *bn256ScalarMulIstanbul) RequiredGas(input []byte) uint64 { - return params.Bn256ScalarMulGasIstanbul -} - -func (c *bn256ScalarMulIstanbul) Run(input []byte) ([]byte, error) { - return runBn256ScalarMul(input) -} - -// bn256ScalarMulByzantium implements a native elliptic curve scalar -// multiplication conforming to Byzantium consensus rules. -type bn256ScalarMulByzantium struct{} - -// RequiredGas returns the gas required to execute the pre-compiled contract. -func (c *bn256ScalarMulByzantium) RequiredGas(input []byte) uint64 { - return params.Bn256ScalarMulGasByzantium -} - -func (c *bn256ScalarMulByzantium) Run(input []byte) ([]byte, error) { - return runBn256ScalarMul(input) -} - -var ( - // true32Byte is returned if the bn256 pairing check succeeds. - true32Byte = []byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1} - - // false32Byte is returned if the bn256 pairing check fails. - false32Byte = make([]byte, 32) - - // errBadPairingInput is returned if the bn256 pairing input is invalid. - errBadPairingInput = errors.New("bad elliptic curve pairing size") -) - -// runBn256Pairing implements the Bn256Pairing precompile, referenced by both -// Byzantium and Istanbul operations. -func runBn256Pairing(input []byte) ([]byte, error) { - // Handle some corner cases cheaply - if len(input)%192 > 0 { - return nil, errBadPairingInput - } - // Convert the input into a set of coordinates - var ( - cs []*bn256.G1 - ts []*bn256.G2 - ) - for i := 0; i < len(input); i += 192 { - c, err := newCurvePoint(input[i : i+64]) - if err != nil { - return nil, err - } - t, err := newTwistPoint(input[i+64 : i+192]) - if err != nil { - return nil, err - } - cs = append(cs, c) - ts = append(ts, t) - } - // Execute the pairing checks and return the results - if bn256.PairingCheck(cs, ts) { - return true32Byte, nil - } - return false32Byte, nil -} - -// bn256PairingIstanbul implements a pairing pre-compile for the bn256 curve -// conforming to Istanbul consensus rules. -type bn256PairingIstanbul struct{} - -// RequiredGas returns the gas required to execute the pre-compiled contract. -func (c *bn256PairingIstanbul) RequiredGas(input []byte) uint64 { - return params.Bn256PairingBaseGasIstanbul + uint64(len(input)/192)*params.Bn256PairingPerPointGasIstanbul -} - -func (c *bn256PairingIstanbul) Run(input []byte) ([]byte, error) { - return runBn256Pairing(input) -} - -// bn256PairingByzantium implements a pairing pre-compile for the bn256 curve -// conforming to Byzantium consensus rules. -type bn256PairingByzantium struct{} - -// RequiredGas returns the gas required to execute the pre-compiled contract. -func (c *bn256PairingByzantium) RequiredGas(input []byte) uint64 { - return params.Bn256PairingBaseGasByzantium + uint64(len(input)/192)*params.Bn256PairingPerPointGasByzantium -} - -func (c *bn256PairingByzantium) Run(input []byte) ([]byte, error) { - return runBn256Pairing(input) -} - -type blake2F struct{} - -func (c *blake2F) RequiredGas(input []byte) uint64 { - // If the input is malformed, we can't calculate the gas, return 0 and let the - // actual call choke and fault. - if len(input) != blake2FInputLength { - return 0 - } - return uint64(binary.BigEndian.Uint32(input[0:4])) -} - -const ( - blake2FInputLength = 213 - blake2FFinalBlockBytes = byte(1) - blake2FNonFinalBlockBytes = byte(0) -) - -var ( - errBlake2FInvalidInputLength = errors.New("invalid input length") - errBlake2FInvalidFinalFlag = errors.New("invalid final flag") -) - -func (c *blake2F) Run(input []byte) ([]byte, error) { - // Make sure the input is valid (correct length and final flag) - if len(input) != blake2FInputLength { - return nil, errBlake2FInvalidInputLength - } - if input[212] != blake2FNonFinalBlockBytes && input[212] != blake2FFinalBlockBytes { - return nil, errBlake2FInvalidFinalFlag - } - // Parse the input into the Blake2b call parameters - var ( - rounds = binary.BigEndian.Uint32(input[0:4]) - final = input[212] == blake2FFinalBlockBytes - - h [8]uint64 - m [16]uint64 - t [2]uint64 - ) - for i := 0; i < 8; i++ { - offset := 4 + i*8 - h[i] = binary.LittleEndian.Uint64(input[offset : offset+8]) - } - for i := 0; i < 16; i++ { - offset := 68 + i*8 - m[i] = binary.LittleEndian.Uint64(input[offset : offset+8]) - } - t[0] = binary.LittleEndian.Uint64(input[196:204]) - t[1] = binary.LittleEndian.Uint64(input[204:212]) - - // Execute the compression function, extract and return the result - blake2b.F(&h, m, t, final, rounds) - - output := make([]byte, 64) - for i := 0; i < 8; i++ { - offset := i * 8 - binary.LittleEndian.PutUint64(output[offset:offset+8], h[i]) - } - return output, nil -} - -var ( - errBLS12381InvalidInputLength = errors.New("invalid input length") - errBLS12381InvalidFieldElementTopBytes = errors.New("invalid field element top bytes") - errBLS12381G1PointSubgroup = errors.New("g1 point is not on correct subgroup") - errBLS12381G2PointSubgroup = errors.New("g2 point is not on correct subgroup") -) - -// bls12381G1Add implements EIP-2537 G1Add precompile. -type bls12381G1Add struct{} - -// RequiredGas returns the gas required to execute the pre-compiled contract. -func (c *bls12381G1Add) RequiredGas(input []byte) uint64 { - return params.Bls12381G1AddGas -} - -func (c *bls12381G1Add) Run(input []byte) ([]byte, error) { - // Implements EIP-2537 G1Add precompile. - // > G1 addition call expects `256` bytes as an input that is interpreted as byte concatenation of two G1 points (`128` bytes each). - // > Output is an encoding of addition operation result - single G1 point (`128` bytes). - if len(input) != 256 { - return nil, errBLS12381InvalidInputLength - } - var err error - var p0, p1 *bls12381.PointG1 - - // Initialize G1 - g := bls12381.NewG1() - - // Decode G1 point p_0 - if p0, err = g.DecodePoint(input[:128]); err != nil { - return nil, err - } - // Decode G1 point p_1 - if p1, err = g.DecodePoint(input[128:]); err != nil { - return nil, err - } - - // Compute r = p_0 + p_1 - r := g.New() - g.Add(r, p0, p1) - - // Encode the G1 point result into 128 bytes - return g.EncodePoint(r), nil -} - -// bls12381G1Mul implements EIP-2537 G1Mul precompile. -type bls12381G1Mul struct{} - -// RequiredGas returns the gas required to execute the pre-compiled contract. -func (c *bls12381G1Mul) RequiredGas(input []byte) uint64 { - return params.Bls12381G1MulGas -} - -func (c *bls12381G1Mul) Run(input []byte) ([]byte, error) { - // Implements EIP-2537 G1Mul precompile. - // > G1 multiplication call expects `160` bytes as an input that is interpreted as byte concatenation of encoding of G1 point (`128` bytes) and encoding of a scalar value (`32` bytes). - // > Output is an encoding of multiplication operation result - single G1 point (`128` bytes). - if len(input) != 160 { - return nil, errBLS12381InvalidInputLength - } - var err error - var p0 *bls12381.PointG1 - - // Initialize G1 - g := bls12381.NewG1() - - // Decode G1 point - if p0, err = g.DecodePoint(input[:128]); err != nil { - return nil, err - } - // Decode scalar value - e := new(big.Int).SetBytes(input[128:]) - - // Compute r = e * p_0 - r := g.New() - g.MulScalar(r, p0, e) - - // Encode the G1 point into 128 bytes - return g.EncodePoint(r), nil -} - -// bls12381G1MultiExp implements EIP-2537 G1MultiExp precompile. -type bls12381G1MultiExp struct{} - -// RequiredGas returns the gas required to execute the pre-compiled contract. -func (c *bls12381G1MultiExp) RequiredGas(input []byte) uint64 { - // Calculate G1 point, scalar value pair length - k := len(input) / 160 - if k == 0 { - // Return 0 gas for small input length - return 0 - } - // Lookup discount value for G1 point, scalar value pair length - var discount uint64 - if dLen := len(params.Bls12381MultiExpDiscountTable); k < dLen { - discount = params.Bls12381MultiExpDiscountTable[k-1] - } else { - discount = params.Bls12381MultiExpDiscountTable[dLen-1] - } - // Calculate gas and return the result - return (uint64(k) * params.Bls12381G1MulGas * discount) / 1000 -} - -func (c *bls12381G1MultiExp) Run(input []byte) ([]byte, error) { - // Implements EIP-2537 G1MultiExp precompile. - // G1 multiplication call expects `160*k` bytes as an input that is interpreted as byte concatenation of `k` slices each of them being a byte concatenation of encoding of G1 point (`128` bytes) and encoding of a scalar value (`32` bytes). - // Output is an encoding of multiexponentiation operation result - single G1 point (`128` bytes). - k := len(input) / 160 - if len(input) == 0 || len(input)%160 != 0 { - return nil, errBLS12381InvalidInputLength - } - var err error - points := make([]*bls12381.PointG1, k) - scalars := make([]*big.Int, k) - - // Initialize G1 - g := bls12381.NewG1() - - // Decode point scalar pairs - for i := 0; i < k; i++ { - off := 160 * i - t0, t1, t2 := off, off+128, off+160 - // Decode G1 point - if points[i], err = g.DecodePoint(input[t0:t1]); err != nil { - return nil, err - } - // Decode scalar value - scalars[i] = new(big.Int).SetBytes(input[t1:t2]) - } - - // Compute r = e_0 * p_0 + e_1 * p_1 + ... + e_(k-1) * p_(k-1) - r := g.New() - g.MultiExp(r, points, scalars) - - // Encode the G1 point to 128 bytes - return g.EncodePoint(r), nil -} - -// bls12381G2Add implements EIP-2537 G2Add precompile. -type bls12381G2Add struct{} - -// RequiredGas returns the gas required to execute the pre-compiled contract. -func (c *bls12381G2Add) RequiredGas(input []byte) uint64 { - return params.Bls12381G2AddGas -} - -func (c *bls12381G2Add) Run(input []byte) ([]byte, error) { - // Implements EIP-2537 G2Add precompile. - // > G2 addition call expects `512` bytes as an input that is interpreted as byte concatenation of two G2 points (`256` bytes each). - // > Output is an encoding of addition operation result - single G2 point (`256` bytes). - if len(input) != 512 { - return nil, errBLS12381InvalidInputLength - } - var err error - var p0, p1 *bls12381.PointG2 - - // Initialize G2 - g := bls12381.NewG2() - r := g.New() - - // Decode G2 point p_0 - if p0, err = g.DecodePoint(input[:256]); err != nil { - return nil, err - } - // Decode G2 point p_1 - if p1, err = g.DecodePoint(input[256:]); err != nil { - return nil, err - } - - // Compute r = p_0 + p_1 - g.Add(r, p0, p1) - - // Encode the G2 point into 256 bytes - return g.EncodePoint(r), nil -} - -// bls12381G2Mul implements EIP-2537 G2Mul precompile. -type bls12381G2Mul struct{} - -// RequiredGas returns the gas required to execute the pre-compiled contract. -func (c *bls12381G2Mul) RequiredGas(input []byte) uint64 { - return params.Bls12381G2MulGas -} - -func (c *bls12381G2Mul) Run(input []byte) ([]byte, error) { - // Implements EIP-2537 G2MUL precompile logic. - // > G2 multiplication call expects `288` bytes as an input that is interpreted as byte concatenation of encoding of G2 point (`256` bytes) and encoding of a scalar value (`32` bytes). - // > Output is an encoding of multiplication operation result - single G2 point (`256` bytes). - if len(input) != 288 { - return nil, errBLS12381InvalidInputLength - } - var err error - var p0 *bls12381.PointG2 - - // Initialize G2 - g := bls12381.NewG2() - - // Decode G2 point - if p0, err = g.DecodePoint(input[:256]); err != nil { - return nil, err - } - // Decode scalar value - e := new(big.Int).SetBytes(input[256:]) - - // Compute r = e * p_0 - r := g.New() - g.MulScalar(r, p0, e) - - // Encode the G2 point into 256 bytes - return g.EncodePoint(r), nil -} - -// bls12381G2MultiExp implements EIP-2537 G2MultiExp precompile. -type bls12381G2MultiExp struct{} - -// RequiredGas returns the gas required to execute the pre-compiled contract. -func (c *bls12381G2MultiExp) RequiredGas(input []byte) uint64 { - // Calculate G2 point, scalar value pair length - k := len(input) / 288 - if k == 0 { - // Return 0 gas for small input length - return 0 - } - // Lookup discount value for G2 point, scalar value pair length - var discount uint64 - if dLen := len(params.Bls12381MultiExpDiscountTable); k < dLen { - discount = params.Bls12381MultiExpDiscountTable[k-1] - } else { - discount = params.Bls12381MultiExpDiscountTable[dLen-1] - } - // Calculate gas and return the result - return (uint64(k) * params.Bls12381G2MulGas * discount) / 1000 -} - -func (c *bls12381G2MultiExp) Run(input []byte) ([]byte, error) { - // Implements EIP-2537 G2MultiExp precompile logic - // > G2 multiplication call expects `288*k` bytes as an input that is interpreted as byte concatenation of `k` slices each of them being a byte concatenation of encoding of G2 point (`256` bytes) and encoding of a scalar value (`32` bytes). - // > Output is an encoding of multiexponentiation operation result - single G2 point (`256` bytes). - k := len(input) / 288 - if len(input) == 0 || len(input)%288 != 0 { - return nil, errBLS12381InvalidInputLength - } - var err error - points := make([]*bls12381.PointG2, k) - scalars := make([]*big.Int, k) - - // Initialize G2 - g := bls12381.NewG2() - - // Decode point scalar pairs - for i := 0; i < k; i++ { - off := 288 * i - t0, t1, t2 := off, off+256, off+288 - // Decode G1 point - if points[i], err = g.DecodePoint(input[t0:t1]); err != nil { - return nil, err - } - // Decode scalar value - scalars[i] = new(big.Int).SetBytes(input[t1:t2]) - } - - // Compute r = e_0 * p_0 + e_1 * p_1 + ... + e_(k-1) * p_(k-1) - r := g.New() - g.MultiExp(r, points, scalars) - - // Encode the G2 point to 256 bytes. - return g.EncodePoint(r), nil -} - -// bls12381Pairing implements EIP-2537 Pairing precompile. -type bls12381Pairing struct{} - -// RequiredGas returns the gas required to execute the pre-compiled contract. -func (c *bls12381Pairing) RequiredGas(input []byte) uint64 { - return params.Bls12381PairingBaseGas + uint64(len(input)/384)*params.Bls12381PairingPerPairGas -} - -func (c *bls12381Pairing) Run(input []byte) ([]byte, error) { - // Implements EIP-2537 Pairing precompile logic. - // > Pairing call expects `384*k` bytes as an inputs that is interpreted as byte concatenation of `k` slices. Each slice has the following structure: - // > - `128` bytes of G1 point encoding - // > - `256` bytes of G2 point encoding - // > Output is a `32` bytes where last single byte is `0x01` if pairing result is equal to multiplicative identity in a pairing target field and `0x00` otherwise - // > (which is equivalent of Big Endian encoding of Solidity values `uint256(1)` and `uin256(0)` respectively). - k := len(input) / 384 - if len(input) == 0 || len(input)%384 != 0 { - return nil, errBLS12381InvalidInputLength - } - - // Initialize BLS12-381 pairing engine - e := bls12381.NewPairingEngine() - g1, g2 := e.G1, e.G2 - - // Decode pairs - for i := 0; i < k; i++ { - off := 384 * i - t0, t1, t2 := off, off+128, off+384 - - // Decode G1 point - p1, err := g1.DecodePoint(input[t0:t1]) - if err != nil { - return nil, err - } - // Decode G2 point - p2, err := g2.DecodePoint(input[t1:t2]) - if err != nil { - return nil, err - } - - // 'point is on curve' check already done, - // Here we need to apply subgroup checks. - if !g1.InCorrectSubgroup(p1) { - return nil, errBLS12381G1PointSubgroup - } - if !g2.InCorrectSubgroup(p2) { - return nil, errBLS12381G2PointSubgroup - } - - // Update pairing engine with G1 and G2 ponits - e.AddPair(p1, p2) - } - // Prepare 32 byte output - out := make([]byte, 32) - - // Compute pairing and set the result - if e.Check() { - out[31] = 1 - } - return out, nil -} - -// decodeBLS12381FieldElement decodes BLS12-381 elliptic curve field element. -// Removes top 16 bytes of 64 byte input. -func decodeBLS12381FieldElement(in []byte) ([]byte, error) { - if len(in) != 64 { - return nil, errors.New("invalid field element length") - } - // check top bytes - for i := 0; i < 16; i++ { - if in[i] != byte(0x00) { - return nil, errBLS12381InvalidFieldElementTopBytes - } - } - out := make([]byte, 48) - copy(out[:], in[16:]) - return out, nil -} - -// bls12381MapG1 implements EIP-2537 MapG1 precompile. -type bls12381MapG1 struct{} - -// RequiredGas returns the gas required to execute the pre-compiled contract. -func (c *bls12381MapG1) RequiredGas(input []byte) uint64 { - return params.Bls12381MapG1Gas -} - -func (c *bls12381MapG1) Run(input []byte) ([]byte, error) { - // Implements EIP-2537 Map_To_G1 precompile. - // > Field-to-curve call expects `64` bytes an an input that is interpreted as a an element of the base field. - // > Output of this call is `128` bytes and is G1 point following respective encoding rules. - if len(input) != 64 { - return nil, errBLS12381InvalidInputLength - } - - // Decode input field element - fe, err := decodeBLS12381FieldElement(input) - if err != nil { - return nil, err - } - - // Initialize G1 - g := bls12381.NewG1() - - // Compute mapping - r, err := g.MapToCurve(fe) - if err != nil { - return nil, err - } - - // Encode the G1 point to 128 bytes - return g.EncodePoint(r), nil -} - -// bls12381MapG2 implements EIP-2537 MapG2 precompile. -type bls12381MapG2 struct{} - -// RequiredGas returns the gas required to execute the pre-compiled contract. -func (c *bls12381MapG2) RequiredGas(input []byte) uint64 { - return params.Bls12381MapG2Gas -} - -func (c *bls12381MapG2) Run(input []byte) ([]byte, error) { - // Implements EIP-2537 Map_FP2_TO_G2 precompile logic. - // > Field-to-curve call expects `128` bytes an an input that is interpreted as a an element of the quadratic extension field. - // > Output of this call is `256` bytes and is G2 point following respective encoding rules. - if len(input) != 128 { - return nil, errBLS12381InvalidInputLength - } - - // Decode input field element - fe := make([]byte, 96) - c0, err := decodeBLS12381FieldElement(input[:64]) - if err != nil { - return nil, err - } - copy(fe[48:], c0) - c1, err := decodeBLS12381FieldElement(input[64:]) - if err != nil { - return nil, err - } - copy(fe[:48], c1) - - // Initialize G2 - g := bls12381.NewG2() - - // Compute mapping - r, err := g.MapToCurve(fe) - if err != nil { - return nil, err - } - - // Encode the G2 point to 256 bytes - return g.EncodePoint(r), nil -} diff --git a/x/evm/vm/doc.go b/x/evm/vm/doc.go deleted file mode 100644 index 5864d0cf..00000000 --- a/x/evm/vm/doc.go +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. -// -// The go-ethereum library is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// The go-ethereum library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . - -/* -Package vm implements the Ethereum Virtual Machine. - -The vm package implements one EVM, a byte code VM. The BC (Byte Code) VM loops -over a set of bytes and executes them according to the set of rules defined -in the Ethereum yellow paper. -*/ -package vm diff --git a/x/evm/vm/eips.go b/x/evm/vm/eips.go deleted file mode 100644 index 93f5c399..00000000 --- a/x/evm/vm/eips.go +++ /dev/null @@ -1,194 +0,0 @@ -// Copyright 2019 The go-ethereum Authors -// This file is part of the go-ethereum library. -// -// The go-ethereum library is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// The go-ethereum library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . - -package vm - -import ( - "fmt" - "sort" - - "github.com/ethereum/go-ethereum/params" - "github.com/holiman/uint256" -) - -var activators = map[int]func(*JumpTable){ - 3855: enable3855, - 3529: enable3529, - 3198: enable3198, - 2929: enable2929, - 2200: enable2200, - 1884: enable1884, - 1344: enable1344, -} - -// EnableEIP enables the given EIP on the config. -// This operation writes in-place, and callers need to ensure that the globally -// defined jump tables are not polluted. -func EnableEIP(eipNum int, jt *JumpTable) error { - enablerFn, ok := activators[eipNum] - if !ok { - return fmt.Errorf("undefined eip %d", eipNum) - } - enablerFn(jt) - return nil -} - -func ValidEip(eipNum int) bool { - _, ok := activators[eipNum] - return ok -} -func ActivateableEips() []string { - var nums []string - for k := range activators { - nums = append(nums, fmt.Sprintf("%d", k)) - } - sort.Strings(nums) - return nums -} - -// enable1884 applies EIP-1884 to the given jump table: -// - Increase cost of BALANCE to 700 -// - Increase cost of EXTCODEHASH to 700 -// - Increase cost of SLOAD to 800 -// - Define SELFBALANCE, with cost GasFastStep (5) -func enable1884(jt *JumpTable) { - // Gas cost changes - jt[SLOAD].constantGas = params.SloadGasEIP1884 - jt[BALANCE].constantGas = params.BalanceGasEIP1884 - jt[EXTCODEHASH].constantGas = params.ExtcodeHashGasEIP1884 - - // New opcode - jt[SELFBALANCE] = &operation{ - execute: opSelfBalance, - constantGas: GasFastStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - } -} - -func opSelfBalance(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - balance, _ := uint256.FromBig(interpreter.evm.StateDB.GetBalance(scope.Contract.Address())) - scope.Stack.push(balance) - return nil, nil -} - -// enable1344 applies EIP-1344 (ChainID Opcode) -// - Adds an opcode that returns the current chain’s EIP-155 unique identifier -func enable1344(jt *JumpTable) { - // New opcode - jt[CHAINID] = &operation{ - execute: opChainID, - constantGas: GasQuickStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - } -} - -// opChainID implements CHAINID opcode -func opChainID(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - chainId, _ := uint256.FromBig(interpreter.evm.chainConfig.ChainID) - scope.Stack.push(chainId) - return nil, nil -} - -// enable2200 applies EIP-2200 (Rebalance net-metered SSTORE) -func enable2200(jt *JumpTable) { - jt[SLOAD].constantGas = params.SloadGasEIP2200 - jt[SSTORE].dynamicGas = gasSStoreEIP2200 -} - -// enable2929 enables "EIP-2929: Gas cost increases for state access opcodes" -// https://eips.ethereum.org/EIPS/eip-2929 -func enable2929(jt *JumpTable) { - jt[SSTORE].dynamicGas = gasSStoreEIP2929 - - jt[SLOAD].constantGas = 0 - jt[SLOAD].dynamicGas = gasSLoadEIP2929 - - jt[EXTCODECOPY].constantGas = params.WarmStorageReadCostEIP2929 - jt[EXTCODECOPY].dynamicGas = gasExtCodeCopyEIP2929 - - jt[EXTCODESIZE].constantGas = params.WarmStorageReadCostEIP2929 - jt[EXTCODESIZE].dynamicGas = gasEip2929AccountCheck - - jt[EXTCODEHASH].constantGas = params.WarmStorageReadCostEIP2929 - jt[EXTCODEHASH].dynamicGas = gasEip2929AccountCheck - - jt[BALANCE].constantGas = params.WarmStorageReadCostEIP2929 - jt[BALANCE].dynamicGas = gasEip2929AccountCheck - - jt[CALL].constantGas = params.WarmStorageReadCostEIP2929 - jt[CALL].dynamicGas = gasCallEIP2929 - - jt[CALLCODE].constantGas = params.WarmStorageReadCostEIP2929 - jt[CALLCODE].dynamicGas = gasCallCodeEIP2929 - - jt[STATICCALL].constantGas = params.WarmStorageReadCostEIP2929 - jt[STATICCALL].dynamicGas = gasStaticCallEIP2929 - - jt[DELEGATECALL].constantGas = params.WarmStorageReadCostEIP2929 - jt[DELEGATECALL].dynamicGas = gasDelegateCallEIP2929 - - // This was previously part of the dynamic cost, but we're using it as a constantGas - // factor here - jt[SELFDESTRUCT].constantGas = params.SelfdestructGasEIP150 - jt[SELFDESTRUCT].dynamicGas = gasSelfdestructEIP2929 -} - -// enable3529 enabled "EIP-3529: Reduction in refunds": -// - Removes refunds for selfdestructs -// - Reduces refunds for SSTORE -// - Reduces max refunds to 20% gas -func enable3529(jt *JumpTable) { - jt[SSTORE].dynamicGas = gasSStoreEIP3529 - jt[SELFDESTRUCT].dynamicGas = gasSelfdestructEIP3529 -} - -// enable3198 applies EIP-3198 (BASEFEE Opcode) -// - Adds an opcode that returns the current block's base fee. -func enable3198(jt *JumpTable) { - // New opcode - jt[BASEFEE] = &operation{ - execute: opBaseFee, - constantGas: GasQuickStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - } -} - -// opBaseFee implements BASEFEE opcode -func opBaseFee(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - baseFee, _ := uint256.FromBig(interpreter.evm.Context.BaseFee) - scope.Stack.push(baseFee) - return nil, nil -} - -// enable3855 applies EIP-3855 (PUSH0 opcode) -func enable3855(jt *JumpTable) { - // New opcode - jt[PUSH0] = &operation{ - execute: opPush0, - constantGas: GasQuickStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - } -} - -// opPush0 implements the PUSH0 opcode -func opPush0(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - scope.Stack.push(new(uint256.Int)) - return nil, nil -} diff --git a/x/evm/vm/errors.go b/x/evm/vm/errors.go deleted file mode 100644 index 004f8ef1..00000000 --- a/x/evm/vm/errors.go +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. -// -// The go-ethereum library is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// The go-ethereum library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . - -package vm - -import ( - "errors" - "fmt" -) - -// List evm execution errors -var ( - ErrOutOfGas = errors.New("out of gas") - ErrCodeStoreOutOfGas = errors.New("contract creation code storage out of gas") - ErrDepth = errors.New("max call depth exceeded") - ErrInsufficientBalance = errors.New("insufficient balance for transfer") - ErrContractAddressCollision = errors.New("contract address collision") - ErrExecutionReverted = errors.New("execution reverted") - ErrMaxCodeSizeExceeded = errors.New("max code size exceeded") - ErrInvalidJump = errors.New("invalid jump destination") - ErrWriteProtection = errors.New("write protection") - ErrReturnDataOutOfBounds = errors.New("return data out of bounds") - ErrGasUintOverflow = errors.New("gas uint64 overflow") - ErrInvalidCode = errors.New("invalid code: must not begin with 0xef") - ErrNonceUintOverflow = errors.New("nonce uint64 overflow") - - // errStopToken is an internal token indicating interpreter loop termination, - // never returned to outside callers. - errStopToken = errors.New("stop token") -) - -// ErrStackUnderflow wraps an evm error when the items on the stack less -// than the minimal requirement. -type ErrStackUnderflow struct { - stackLen int - required int -} - -func (e *ErrStackUnderflow) Error() string { - return fmt.Sprintf("stack underflow (%d <=> %d)", e.stackLen, e.required) -} - -// ErrStackOverflow wraps an evm error when the items on the stack exceeds -// the maximum allowance. -type ErrStackOverflow struct { - stackLen int - limit int -} - -func (e *ErrStackOverflow) Error() string { - return fmt.Sprintf("stack limit reached %d (%d)", e.stackLen, e.limit) -} - -// ErrInvalidOpCode wraps an evm error when an invalid opcode is encountered. -type ErrInvalidOpCode struct { - opcode OpCode -} - -func (e *ErrInvalidOpCode) Error() string { return fmt.Sprintf("invalid opcode: %s", e.opcode) } diff --git a/x/evm/vm/evm.go b/x/evm/vm/evm.go deleted file mode 100644 index 84df83cb..00000000 --- a/x/evm/vm/evm.go +++ /dev/null @@ -1,630 +0,0 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. -// -// The go-ethereum library is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// The go-ethereum library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . - -package vm - -import ( - "math/big" - "sync/atomic" - "time" - - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/consensus" - "github.com/ethereum/go-ethereum/core" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/params" - "github.com/holiman/uint256" -) - -// emptyCodeHash is used by create to ensure deployment is disallowed to already -// deployed contract addresses (relevant after the account abstraction). -var emptyCodeHash = crypto.Keccak256Hash(nil) - -type ( - // CanTransferFunc is the signature of a transfer guard function - CanTransferFunc func(StateDB, common.Address, *big.Int) bool - // TransferFunc is the signature of a transfer function - TransferFunc func(StateDB, common.Address, common.Address, *big.Int) - // GetHashFunc returns the n'th block hash in the blockchain - // and is used by the BLOCKHASH EVM op code. - GetHashFunc func(uint64) common.Hash - - // custom - // PrepayFunc execute prepay with provided data in PREPAY OpCode - PrepayFunc func(evm *EVM, from, beneficiary common.Address, amount *big.Int, gas uint64) (*big.Int, uint64, error) -) - -func (evm *EVM) precompile(addr common.Address) (PrecompiledContract, bool) { - var precompiles map[common.Address]PrecompiledContract - switch { - case evm.chainRules.IsBerlin: - precompiles = PrecompiledContractsBerlin - case evm.chainRules.IsIstanbul: - precompiles = PrecompiledContractsIstanbul - case evm.chainRules.IsByzantium: - precompiles = PrecompiledContractsByzantium - default: - precompiles = PrecompiledContractsHomestead - } - p, ok := precompiles[addr] - return p, ok -} - -// BlockContext provides the EVM with auxiliary information. Once provided -// it shouldn't be modified. -type BlockContext struct { - // CanTransfer returns whether the account contains - // sufficient ether to transfer the value - CanTransfer CanTransferFunc - // Transfer transfers ether from one account to the other - Transfer TransferFunc - // GetHash returns the hash corresponding to n - GetHash GetHashFunc - // Prepay execute prepay with given context - Prepay PrepayFunc - - // Block information - Coinbase common.Address // Provides information for COINBASE - GasLimit uint64 // Provides information for GASLIMIT - BlockNumber *big.Int // Provides information for NUMBER - Time *big.Int // Provides information for TIME - Difficulty *big.Int // Provides information for DIFFICULTY - BaseFee *big.Int // Provides information for BASEFEE - Random *common.Hash // Provides information for RANDOM -} - -// TxContext provides the EVM with information about a transaction. -// All fields can change between transactions. -type TxContext struct { - // Message information - Origin common.Address // Provides information for ORIGIN - GasPrice *big.Int // Provides information for GASPRICE -} - -// EVM is the Ethereum Virtual Machine base object and provides -// the necessary tools to run a contract on the given state with -// the provided context. It should be noted that any error -// generated through any of the calls should be considered a -// revert-state-and-consume-all-gas operation, no checks on -// specific errors should ever be performed. The interpreter makes -// sure that any errors generated are to be considered faulty code. -// -// The EVM should never be reused and is not thread safe. -type EVM struct { - // Context provides auxiliary blockchain related information - Context BlockContext - TxContext - // StateDB gives access to the underlying state - StateDB StateDB - // Depth is the current call stack - depth int - - // chainConfig contains information about the current chain - chainConfig *params.ChainConfig - // chain rules contains the chain rules for the current epoch - chainRules params.Rules - // virtual machine configuration options used to initialise the - // evm. - Config Config - // global (to this context) ethereum virtual machine - // used throughout the execution of the tx. - interpreter *EVMInterpreter - // abort is used to abort the EVM calling operations - // NOTE: must be set atomically - abort int32 - // callGasTemp holds the gas available for the current call. This is needed because the - // available gas is calculated in gasCall* according to the 63/64 rule and later - // applied in opCall*. - callGasTemp uint64 - // genesisContractVerifier verifies is contract is trusted in order to allow curtain opcodes - genesisContractVerifier *GenesisContractVerifier -} - -// NewEVM returns a new EVM. The returned EVM is not thread safe and should -// only ever be used *once*. -func NewEVM(blockCtx BlockContext, txCtx TxContext, statedb StateDB, chainConfig *params.ChainConfig, config Config, genesisContractVerifier *GenesisContractVerifier) *EVM { - evm := &EVM{ - Context: blockCtx, - TxContext: txCtx, - StateDB: statedb, - Config: config, - chainConfig: chainConfig, - chainRules: chainConfig.Rules(blockCtx.BlockNumber, blockCtx.Random != nil), - genesisContractVerifier: genesisContractVerifier, - } - evm.interpreter = NewEVMInterpreter(evm, config) - return evm -} - -// Reset resets the EVM with a new transaction context.Reset -// This is not threadsafe and should only be done very cautiously. -func (evm *EVM) Reset(txCtx TxContext, statedb StateDB) { - evm.TxContext = txCtx - evm.StateDB = statedb -} - -// Cancel cancels any running EVM operation. This may be called concurrently and -// it's safe to be called multiple times. -func (evm *EVM) Cancel() { - atomic.StoreInt32(&evm.abort, 1) -} - -// Cancelled returns true if Cancel has been called -func (evm *EVM) Cancelled() bool { - return atomic.LoadInt32(&evm.abort) == 1 -} - -// Interpreter returns the current interpreter -func (evm *EVM) Interpreter() *EVMInterpreter { - return evm.interpreter -} - -// Call executes the contract associated with the addr with the given input as -// parameters. It also handles any necessary value transfer required and takes -// the necessary steps to create accounts and reverses the state in case of an -// execution error or failed value transfer. -func (evm *EVM) Call(caller ContractRef, addr common.Address, input []byte, gas uint64, value *big.Int) (ret []byte, leftOverGas uint64, err error) { - // Fail if we're trying to execute above the call depth limit - if evm.depth > int(params.CallCreateDepth) { - return nil, gas, ErrDepth - } - // Fail if we're trying to transfer more than the available balance - if value.Sign() != 0 && !evm.Context.CanTransfer(evm.StateDB, caller.Address(), value) { - return nil, gas, ErrInsufficientBalance - } - snapshot := evm.StateDB.Snapshot() - p, isPrecompile := evm.precompile(addr) - - if !evm.StateDB.Exist(addr) { - if !isPrecompile && evm.chainRules.IsEIP158 && value.Sign() == 0 { - // Calling a non existing account, don't do anything, but ping the tracer - if evm.Config.Debug { - if evm.depth == 0 { - evm.Config.Tracer.CaptureStart(evm, caller.Address(), addr, false, input, gas, value) - evm.Config.Tracer.CaptureEnd(ret, 0, 0, nil) - } else { - evm.Config.Tracer.CaptureEnter(CALL, caller.Address(), addr, input, gas, value) - evm.Config.Tracer.CaptureExit(ret, 0, nil) - } - } - return nil, gas, nil - } - evm.StateDB.CreateAccount(addr) - } - evm.Context.Transfer(evm.StateDB, caller.Address(), addr, value) - - // Capture the tracer start/end events in debug mode - if evm.Config.Debug { - if evm.depth == 0 { - evm.Config.Tracer.CaptureStart(evm, caller.Address(), addr, false, input, gas, value) - defer func(startGas uint64, startTime time.Time) { // Lazy evaluation of the parameters - evm.Config.Tracer.CaptureEnd(ret, startGas-gas, time.Since(startTime), err) - }(gas, time.Now()) - } else { - // Handle tracer events for entering and exiting a call frame - evm.Config.Tracer.CaptureEnter(CALL, caller.Address(), addr, input, gas, value) - defer func(startGas uint64) { - evm.Config.Tracer.CaptureExit(ret, startGas-gas, err) - }(gas) - } - } - - if isPrecompile { - ret, gas, err = RunPrecompiledContract(p, input, gas) - } else { - // Initialise a new contract and set the code that is to be used by the EVM. - // The contract is a scoped environment for this execution context only. - code := evm.StateDB.GetCode(addr) - if len(code) == 0 { - ret, err = nil, nil // gas is unchanged - } else { - addrCopy := addr - // If the account has no code, we can abort here - // The depth-check is already done, and precompiles handled above - contract := NewContract(caller, AccountRef(addrCopy), value, gas) - contract.SetCallCode(&addrCopy, evm.StateDB.GetCodeHash(addrCopy), code) - ret, err = evm.interpreter.Run(contract, input, false) - gas = contract.Gas - } - } - // When an error was returned by the EVM or when setting the creation code - // above we revert to the snapshot and consume any gas remaining. Additionally - // when we're in homestead this also counts for code storage gas errors. - if err != nil { - evm.StateDB.RevertToSnapshot(snapshot) - if err != ErrExecutionReverted { - gas = 0 - } - // TODO: consider clearing up unused snapshots: - //} else { - // evm.StateDB.DiscardSnapshot(snapshot) - } - return ret, gas, err -} - -// CallCode executes the contract associated with the addr with the given input -// as parameters. It also handles any necessary value transfer required and takes -// the necessary steps to create accounts and reverses the state in case of an -// execution error or failed value transfer. -// -// CallCode differs from Call in the sense that it executes the given address' -// code with the caller as context. -func (evm *EVM) CallCode(caller ContractRef, addr common.Address, input []byte, gas uint64, value *big.Int) (ret []byte, leftOverGas uint64, err error) { - // Fail if we're trying to execute above the call depth limit - if evm.depth > int(params.CallCreateDepth) { - return nil, gas, ErrDepth - } - // Fail if we're trying to transfer more than the available balance - // Note although it's noop to transfer X ether to caller itself. But - // if caller doesn't have enough balance, it would be an error to allow - // over-charging itself. So the check here is necessary. - if !evm.Context.CanTransfer(evm.StateDB, caller.Address(), value) { - return nil, gas, ErrInsufficientBalance - } - var snapshot = evm.StateDB.Snapshot() - - // Invoke tracer hooks that signal entering/exiting a call frame - if evm.Config.Debug { - evm.Config.Tracer.CaptureEnter(CALLCODE, caller.Address(), addr, input, gas, value) - defer func(startGas uint64) { - evm.Config.Tracer.CaptureExit(ret, startGas-gas, err) - }(gas) - } - - // It is allowed to call precompiles, even via delegatecall - if p, isPrecompile := evm.precompile(addr); isPrecompile { - ret, gas, err = RunPrecompiledContract(p, input, gas) - } else { - addrCopy := addr - // Initialise a new contract and set the code that is to be used by the EVM. - // The contract is a scoped environment for this execution context only. - contract := NewContract(caller, AccountRef(caller.Address()), value, gas) - contract.SetCallCode(&addrCopy, evm.StateDB.GetCodeHash(addrCopy), evm.StateDB.GetCode(addrCopy)) - ret, err = evm.interpreter.Run(contract, input, false) - gas = contract.Gas - } - if err != nil { - evm.StateDB.RevertToSnapshot(snapshot) - if err != ErrExecutionReverted { - gas = 0 - } - } - return ret, gas, err -} - -// DelegateCall executes the contract associated with the addr with the given input -// as parameters. It reverses the state in case of an execution error. -// -// DelegateCall differs from CallCode in the sense that it executes the given address' -// code with the caller as context and the caller is set to the caller of the caller. -func (evm *EVM) DelegateCall(caller ContractRef, addr common.Address, input []byte, gas uint64) (ret []byte, leftOverGas uint64, err error) { - // Fail if we're trying to execute above the call depth limit - if evm.depth > int(params.CallCreateDepth) { - return nil, gas, ErrDepth - } - var snapshot = evm.StateDB.Snapshot() - - // Invoke tracer hooks that signal entering/exiting a call frame - if evm.Config.Debug { - evm.Config.Tracer.CaptureEnter(DELEGATECALL, caller.Address(), addr, input, gas, nil) - defer func(startGas uint64) { - evm.Config.Tracer.CaptureExit(ret, startGas-gas, err) - }(gas) - } - - // It is allowed to call precompiles, even via delegatecall - if p, isPrecompile := evm.precompile(addr); isPrecompile { - ret, gas, err = RunPrecompiledContract(p, input, gas) - } else { - addrCopy := addr - // Initialise a new contract and make initialise the delegate values - contract := NewContract(caller, AccountRef(caller.Address()), nil, gas).AsDelegate() - contract.SetCallCode(&addrCopy, evm.StateDB.GetCodeHash(addrCopy), evm.StateDB.GetCode(addrCopy)) - ret, err = evm.interpreter.Run(contract, input, false) - gas = contract.Gas - } - if err != nil { - evm.StateDB.RevertToSnapshot(snapshot) - if err != ErrExecutionReverted { - gas = 0 - } - } - return ret, gas, err -} - -// StaticCall executes the contract associated with the addr with the given input -// as parameters while disallowing any modifications to the state during the call. -// Opcodes that attempt to perform such modifications will result in exceptions -// instead of performing the modifications. -func (evm *EVM) StaticCall(caller ContractRef, addr common.Address, input []byte, gas uint64) (ret []byte, leftOverGas uint64, err error) { - // Fail if we're trying to execute above the call depth limit - if evm.depth > int(params.CallCreateDepth) { - return nil, gas, ErrDepth - } - // We take a snapshot here. This is a bit counter-intuitive, and could probably be skipped. - // However, even a staticcall is considered a 'touch'. On mainnet, static calls were introduced - // after all empty accounts were deleted, so this is not required. However, if we omit this, - // then certain tests start failing; stRevertTest/RevertPrecompiledTouchExactOOG.json. - // We could change this, but for now it's left for legacy reasons - var snapshot = evm.StateDB.Snapshot() - - // We do an AddBalance of zero here, just in order to trigger a touch. - // This doesn't matter on Mainnet, where all empties are gone at the time of Byzantium, - // but is the correct thing to do and matters on other networks, in tests, and potential - // future scenarios - evm.StateDB.AddBalance(addr, big0) - - // Invoke tracer hooks that signal entering/exiting a call frame - if evm.Config.Debug { - evm.Config.Tracer.CaptureEnter(STATICCALL, caller.Address(), addr, input, gas, nil) - defer func(startGas uint64) { - evm.Config.Tracer.CaptureExit(ret, startGas-gas, err) - }(gas) - } - - if p, isPrecompile := evm.precompile(addr); isPrecompile { - ret, gas, err = RunPrecompiledContract(p, input, gas) - } else { - // At this point, we use a copy of address. If we don't, the go compiler will - // leak the 'contract' to the outer scope, and make allocation for 'contract' - // even if the actual execution ends on RunPrecompiled above. - addrCopy := addr - // Initialise a new contract and set the code that is to be used by the EVM. - // The contract is a scoped environment for this execution context only. - contract := NewContract(caller, AccountRef(addrCopy), new(big.Int), gas) - contract.SetCallCode(&addrCopy, evm.StateDB.GetCodeHash(addrCopy), evm.StateDB.GetCode(addrCopy)) - // When an error was returned by the EVM or when setting the creation code - // above we revert to the snapshot and consume any gas remaining. Additionally - // when we're in Homestead this also counts for code storage gas errors. - ret, err = evm.interpreter.Run(contract, input, true) - gas = contract.Gas - } - if err != nil { - evm.StateDB.RevertToSnapshot(snapshot) - if err != ErrExecutionReverted { - gas = 0 - } - } - return ret, gas, err -} - -type codeAndHash struct { - code []byte - hash common.Hash -} - -func (c *codeAndHash) Hash() common.Hash { - if c.hash == (common.Hash{}) { - c.hash = crypto.Keccak256Hash(c.code) - } - return c.hash -} - -// create creates a new contract using code as deployment code. -func (evm *EVM) create(caller ContractRef, codeAndHash *codeAndHash, gas uint64, value *big.Int, address common.Address, typ OpCode) ([]byte, common.Address, uint64, error) { - // Depth check execution. Fail if we're trying to execute above the - // limit. - if evm.depth > int(params.CallCreateDepth) { - return nil, common.Address{}, gas, ErrDepth - } - if !evm.Context.CanTransfer(evm.StateDB, caller.Address(), value) { - return nil, common.Address{}, gas, ErrInsufficientBalance - } - nonce := evm.StateDB.GetNonce(caller.Address()) - if nonce+1 < nonce { - return nil, common.Address{}, gas, ErrNonceUintOverflow - } - evm.StateDB.SetNonce(caller.Address(), nonce+1) - // We add this to the access list _before_ taking a snapshot. Even if the creation fails, - // the access-list change should not be rolled back - if evm.chainRules.IsBerlin { - evm.StateDB.AddAddressToAccessList(address) - } - // Ensure there's no existing contract already at the designated address - contractHash := evm.StateDB.GetCodeHash(address) - if evm.StateDB.GetNonce(address) != 0 || (contractHash != (common.Hash{}) && contractHash != emptyCodeHash) { - return nil, common.Address{}, 0, ErrContractAddressCollision - } - // Create a new account on the state - snapshot := evm.StateDB.Snapshot() - evm.StateDB.CreateAccount(address) - if evm.chainRules.IsEIP158 { - evm.StateDB.SetNonce(address, 1) - } - evm.Context.Transfer(evm.StateDB, caller.Address(), address, value) - - // Initialise a new contract and set the code that is to be used by the EVM. - // The contract is a scoped environment for this execution context only. - contract := NewContract(caller, AccountRef(address), value, gas) - contract.SetCodeOptionalHash(&address, codeAndHash) - - if evm.Config.Debug { - if evm.depth == 0 { - evm.Config.Tracer.CaptureStart(evm, caller.Address(), address, true, codeAndHash.code, gas, value) - } else { - evm.Config.Tracer.CaptureEnter(typ, caller.Address(), address, codeAndHash.code, gas, value) - } - } - - start := time.Now() - - ret, err := evm.interpreter.Run(contract, nil, false) - - // Check whether the max code size has been exceeded, assign err if the case. - if err == nil && evm.chainRules.IsEIP158 && len(ret) > params.MaxCodeSize { - err = ErrMaxCodeSizeExceeded - } - - // Reject code starting with 0xEF if EIP-3541 is enabled. - if err == nil && len(ret) >= 1 && ret[0] == 0xEF && evm.chainRules.IsLondon { - err = ErrInvalidCode - } - - // if the contract creation ran successfully and no errors were returned - // calculate the gas required to store the code. If the code could not - // be stored due to not enough gas set an error and let it be handled - // by the error checking condition below. - if err == nil { - createDataGas := uint64(len(ret)) * params.CreateDataGas - if contract.UseGas(createDataGas) { - evm.StateDB.SetCode(address, ret) - } else { - err = ErrCodeStoreOutOfGas - } - } - - // When an error was returned by the EVM or when setting the creation code - // above we revert to the snapshot and consume any gas remaining. Additionally - // when we're in homestead this also counts for code storage gas errors. - if err != nil && (evm.chainRules.IsHomestead || err != ErrCodeStoreOutOfGas) { - evm.StateDB.RevertToSnapshot(snapshot) - if err != ErrExecutionReverted { - contract.UseGas(contract.Gas) - } - } - - if evm.Config.Debug { - if evm.depth == 0 { - evm.Config.Tracer.CaptureEnd(ret, gas-contract.Gas, time.Since(start), err) - } else { - evm.Config.Tracer.CaptureExit(ret, gas-contract.Gas, err) - } - } - return ret, address, contract.Gas, err -} - -// Create creates a new contract using code as deployment code. -func (evm *EVM) Create(caller ContractRef, code []byte, gas uint64, value *big.Int) (ret []byte, contractAddr common.Address, leftOverGas uint64, err error) { - contractAddr = crypto.CreateAddress(caller.Address(), evm.StateDB.GetNonce(caller.Address())) - return evm.create(caller, &codeAndHash{code: code}, gas, value, contractAddr, CREATE) -} - -// Create2 creates a new contract using code as deployment code. -// -// The different between Create2 with Create is Create2 uses keccak256(0xff ++ msg.sender ++ salt ++ keccak256(init_code))[12:] -// instead of the usual sender-and-nonce-hash as the address where the contract is initialized at. -func (evm *EVM) Create2(caller ContractRef, code []byte, gas uint64, endowment *big.Int, salt *uint256.Int) (ret []byte, contractAddr common.Address, leftOverGas uint64, err error) { - codeAndHash := &codeAndHash{code: code} - contractAddr = crypto.CreateAddress2(caller.Address(), salt.Bytes32(), codeAndHash.Hash().Bytes()) - return evm.create(caller, codeAndHash, gas, endowment, contractAddr, CREATE2) -} - -// ChainConfig returns the environment's chain configuration -func (evm *EVM) ChainConfig() *params.ChainConfig { return evm.chainConfig } - -// ChainContext supports retrieving headers and consensus parameters from the -// current blockchain to be used during transaction processing. -type ChainContext interface { - // Engine retrieves the chain's consensus engine. - Engine() consensus.Engine - - // GetHeader returns the header corresponding to the hash/number argument pair. - GetHeader(common.Hash, uint64) *types.Header -} - -// NewEVMBlockContext creates a new context for use in the EVM. -func NewEVMBlockContext(header *types.Header, chain ChainContext, author *common.Address) BlockContext { - var ( - beneficiary common.Address - baseFee *big.Int - random *common.Hash - ) - - // If we don't have an explicit author (i.e. not mining), extract from the header - if author == nil { - beneficiary, _ = chain.Engine().Author(header) // Ignore error, we're past header validation - } else { - beneficiary = *author - } - if header.BaseFee != nil { - baseFee = new(big.Int).Set(header.BaseFee) - } - if header.Difficulty.Cmp(common.Big0) == 0 { - random = &header.MixDigest - } - return BlockContext{ - CanTransfer: CanTransfer, - Transfer: Transfer, - GetHash: GetHashFn(header, chain), - Coinbase: beneficiary, - BlockNumber: new(big.Int).Set(header.Number), - Time: new(big.Int).SetUint64(header.Time), - Difficulty: new(big.Int).Set(header.Difficulty), - BaseFee: baseFee, - GasLimit: header.GasLimit, - Random: random, - } -} - -// NewEVMTxContext creates a new transaction context for a single transaction. -func NewEVMTxContext(msg core.Message) TxContext { - return TxContext{ - Origin: msg.From(), - GasPrice: new(big.Int).Set(msg.GasPrice()), - } -} - -// GetHashFn returns a GetHashFunc which retrieves header hashes by number -func GetHashFn(ref *types.Header, chain ChainContext) func(n uint64) common.Hash { - // Cache will initially contain [refHash.parent], - // Then fill up with [refHash.p, refHash.pp, refHash.ppp, ...] - var cache []common.Hash - - return func(n uint64) common.Hash { - if ref.Number.Uint64() <= n { - // This situation can happen if we're doing tracing and using - // block overrides. - return common.Hash{} - } - // If there's no hash cache yet, make one - if len(cache) == 0 { - cache = append(cache, ref.ParentHash) - } - if idx := ref.Number.Uint64() - n - 1; idx < uint64(len(cache)) { - return cache[idx] - } - // No luck in the cache, but we can start iterating from the last element we already know - lastKnownHash := cache[len(cache)-1] - lastKnownNumber := ref.Number.Uint64() - uint64(len(cache)) - - for { - header := chain.GetHeader(lastKnownHash, lastKnownNumber) - if header == nil { - break - } - cache = append(cache, header.ParentHash) - lastKnownHash = header.ParentHash - lastKnownNumber = header.Number.Uint64() - 1 - if n == lastKnownNumber { - return lastKnownHash - } - } - return common.Hash{} - } -} - -// CanTransfer checks whether there are enough funds in the address' account to make a transfer. -// This does not take the necessary gas in to account to make the transfer valid. -func CanTransfer(db StateDB, addr common.Address, amount *big.Int) bool { - return db.GetBalance(addr).Cmp(amount) >= 0 -} - -// Transfer subtracts amount from sender and adds amount to recipient using the given Db -func Transfer(db StateDB, sender, recipient common.Address, amount *big.Int) { - db.SubBalance(sender, amount) - db.AddBalance(recipient, amount) -} diff --git a/x/evm/vm/gas.go b/x/evm/vm/gas.go deleted file mode 100644 index 10465d1f..00000000 --- a/x/evm/vm/gas.go +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. -// -// The go-ethereum library is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// The go-ethereum library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . - -package vm - -import ( - "github.com/holiman/uint256" -) - -// Gas costs -const ( - GasQuickStep uint64 = 2 - GasFastestStep uint64 = 3 - GasFastStep uint64 = 5 - GasMidStep uint64 = 8 - GasSlowStep uint64 = 10 - GasExtStep uint64 = 20 -) - -// Stos keeper gas costs -const ( - CallGasPrepay uint64 = 30 - ReturnGasPrepay uint64 = 50_000 -) - -// callGas returns the actual gas cost of the call. -// -// The cost of gas was changed during the homestead price change HF. -// As part of EIP 150 (TangerineWhistle), the returned gas is gas - base * 63 / 64. -func callGas(isEip150 bool, availableGas, base uint64, callCost *uint256.Int) (uint64, error) { - if isEip150 { - availableGas = availableGas - base - gas := availableGas - availableGas/64 - // If the bit length exceeds 64 bit we know that the newly calculated "gas" for EIP150 - // is smaller than the requested amount. Therefore we return the new gas instead - // of returning an error. - if !callCost.IsUint64() || gas < callCost.Uint64() { - return gas, nil - } - } - if !callCost.IsUint64() { - return 0, ErrGasUintOverflow - } - - return callCost.Uint64(), nil -} diff --git a/x/evm/vm/gas_table.go b/x/evm/vm/gas_table.go deleted file mode 100644 index 1f0c0d9b..00000000 --- a/x/evm/vm/gas_table.go +++ /dev/null @@ -1,458 +0,0 @@ -// Copyright 2017 The go-ethereum Authors -// This file is part of the go-ethereum library. -// -// The go-ethereum library is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// The go-ethereum library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . - -package vm - -import ( - "errors" - - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/math" - "github.com/ethereum/go-ethereum/params" -) - -// memoryGasCost calculates the quadratic gas for memory expansion. It does so -// only for the memory region that is expanded, not the total memory. -func memoryGasCost(mem *Memory, newMemSize uint64) (uint64, error) { - if newMemSize == 0 { - return 0, nil - } - // The maximum that will fit in a uint64 is max_word_count - 1. Anything above - // that will result in an overflow. Additionally, a newMemSize which results in - // a newMemSizeWords larger than 0xFFFFFFFF will cause the square operation to - // overflow. The constant 0x1FFFFFFFE0 is the highest number that can be used - // without overflowing the gas calculation. - if newMemSize > 0x1FFFFFFFE0 { - return 0, ErrGasUintOverflow - } - newMemSizeWords := toWordSize(newMemSize) - newMemSize = newMemSizeWords * 32 - - if newMemSize > uint64(mem.Len()) { - square := newMemSizeWords * newMemSizeWords - linCoef := newMemSizeWords * params.MemoryGas - quadCoef := square / params.QuadCoeffDiv - newTotalFee := linCoef + quadCoef - - fee := newTotalFee - mem.lastGasCost - mem.lastGasCost = newTotalFee - - return fee, nil - } - return 0, nil -} - -// memoryCopierGas creates the gas functions for the following opcodes, and takes -// the stack position of the operand which determines the size of the data to copy -// as argument: -// CALLDATACOPY (stack position 2) -// CODECOPY (stack position 2) -// EXTCODECOPY (stack position 3) -// RETURNDATACOPY (stack position 2) -func memoryCopierGas(stackpos int) gasFunc { - return func(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { - // Gas for expanding the memory - gas, err := memoryGasCost(mem, memorySize) - if err != nil { - return 0, err - } - // And gas for copying data, charged per word at param.CopyGas - words, overflow := stack.Back(stackpos).Uint64WithOverflow() - if overflow { - return 0, ErrGasUintOverflow - } - - if words, overflow = math.SafeMul(toWordSize(words), params.CopyGas); overflow { - return 0, ErrGasUintOverflow - } - - if gas, overflow = math.SafeAdd(gas, words); overflow { - return 0, ErrGasUintOverflow - } - return gas, nil - } -} - -var ( - gasCallDataCopy = memoryCopierGas(2) - gasCodeCopy = memoryCopierGas(2) - gasExtCodeCopy = memoryCopierGas(3) - gasReturnDataCopy = memoryCopierGas(2) -) - -func gasSStore(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { - var ( - y, x = stack.Back(1), stack.Back(0) - current = evm.StateDB.GetState(contract.Address(), x.Bytes32()) - ) - // The legacy gas metering only takes into consideration the current state - // Legacy rules should be applied if we are in Petersburg (removal of EIP-1283) - // OR Constantinople is not active - if evm.chainRules.IsPetersburg || !evm.chainRules.IsConstantinople { - // This checks for 3 scenario's and calculates gas accordingly: - // - // 1. From a zero-value address to a non-zero value (NEW VALUE) - // 2. From a non-zero value address to a zero-value address (DELETE) - // 3. From a non-zero to a non-zero (CHANGE) - switch { - case current == (common.Hash{}) && y.Sign() != 0: // 0 => non 0 - return params.SstoreSetGas, nil - case current != (common.Hash{}) && y.Sign() == 0: // non 0 => 0 - evm.StateDB.AddRefund(params.SstoreRefundGas) - return params.SstoreClearGas, nil - default: // non 0 => non 0 (or 0 => 0) - return params.SstoreResetGas, nil - } - } - // The new gas metering is based on net gas costs (EIP-1283): - // - // 1. If current value equals new value (this is a no-op), 200 gas is deducted. - // 2. If current value does not equal new value - // 2.1. If original value equals current value (this storage slot has not been changed by the current execution context) - // 2.1.1. If original value is 0, 20000 gas is deducted. - // 2.1.2. Otherwise, 5000 gas is deducted. If new value is 0, add 15000 gas to refund counter. - // 2.2. If original value does not equal current value (this storage slot is dirty), 200 gas is deducted. Apply both of the following clauses. - // 2.2.1. If original value is not 0 - // 2.2.1.1. If current value is 0 (also means that new value is not 0), remove 15000 gas from refund counter. We can prove that refund counter will never go below 0. - // 2.2.1.2. If new value is 0 (also means that current value is not 0), add 15000 gas to refund counter. - // 2.2.2. If original value equals new value (this storage slot is reset) - // 2.2.2.1. If original value is 0, add 19800 gas to refund counter. - // 2.2.2.2. Otherwise, add 4800 gas to refund counter. - value := common.Hash(y.Bytes32()) - if current == value { // noop (1) - return params.NetSstoreNoopGas, nil - } - original := evm.StateDB.GetCommittedState(contract.Address(), x.Bytes32()) - if original == current { - if original == (common.Hash{}) { // create slot (2.1.1) - return params.NetSstoreInitGas, nil - } - if value == (common.Hash{}) { // delete slot (2.1.2b) - evm.StateDB.AddRefund(params.NetSstoreClearRefund) - } - return params.NetSstoreCleanGas, nil // write existing slot (2.1.2) - } - if original != (common.Hash{}) { - if current == (common.Hash{}) { // recreate slot (2.2.1.1) - evm.StateDB.SubRefund(params.NetSstoreClearRefund) - } else if value == (common.Hash{}) { // delete slot (2.2.1.2) - evm.StateDB.AddRefund(params.NetSstoreClearRefund) - } - } - if original == value { - if original == (common.Hash{}) { // reset to original inexistent slot (2.2.2.1) - evm.StateDB.AddRefund(params.NetSstoreResetClearRefund) - } else { // reset to original existing slot (2.2.2.2) - evm.StateDB.AddRefund(params.NetSstoreResetRefund) - } - } - return params.NetSstoreDirtyGas, nil -} - -// 0. If *gasleft* is less than or equal to 2300, fail the current call. -// 1. If current value equals new value (this is a no-op), SLOAD_GAS is deducted. -// 2. If current value does not equal new value: -// 2.1. If original value equals current value (this storage slot has not been changed by the current execution context): -// 2.1.1. If original value is 0, SSTORE_SET_GAS (20K) gas is deducted. -// 2.1.2. Otherwise, SSTORE_RESET_GAS gas is deducted. If new value is 0, add SSTORE_CLEARS_SCHEDULE to refund counter. -// 2.2. If original value does not equal current value (this storage slot is dirty), SLOAD_GAS gas is deducted. Apply both of the following clauses: -// 2.2.1. If original value is not 0: -// 2.2.1.1. If current value is 0 (also means that new value is not 0), subtract SSTORE_CLEARS_SCHEDULE gas from refund counter. -// 2.2.1.2. If new value is 0 (also means that current value is not 0), add SSTORE_CLEARS_SCHEDULE gas to refund counter. -// 2.2.2. If original value equals new value (this storage slot is reset): -// 2.2.2.1. If original value is 0, add SSTORE_SET_GAS - SLOAD_GAS to refund counter. -// 2.2.2.2. Otherwise, add SSTORE_RESET_GAS - SLOAD_GAS gas to refund counter. -func gasSStoreEIP2200(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { - // If we fail the minimum gas availability invariant, fail (0) - if contract.Gas <= params.SstoreSentryGasEIP2200 { - return 0, errors.New("not enough gas for reentrancy sentry") - } - // Gas sentry honoured, do the actual gas calculation based on the stored value - var ( - y, x = stack.Back(1), stack.Back(0) - current = evm.StateDB.GetState(contract.Address(), x.Bytes32()) - ) - value := common.Hash(y.Bytes32()) - - if current == value { // noop (1) - return params.SloadGasEIP2200, nil - } - original := evm.StateDB.GetCommittedState(contract.Address(), x.Bytes32()) - if original == current { - if original == (common.Hash{}) { // create slot (2.1.1) - return params.SstoreSetGasEIP2200, nil - } - if value == (common.Hash{}) { // delete slot (2.1.2b) - evm.StateDB.AddRefund(params.SstoreClearsScheduleRefundEIP2200) - } - return params.SstoreResetGasEIP2200, nil // write existing slot (2.1.2) - } - if original != (common.Hash{}) { - if current == (common.Hash{}) { // recreate slot (2.2.1.1) - evm.StateDB.SubRefund(params.SstoreClearsScheduleRefundEIP2200) - } else if value == (common.Hash{}) { // delete slot (2.2.1.2) - evm.StateDB.AddRefund(params.SstoreClearsScheduleRefundEIP2200) - } - } - if original == value { - if original == (common.Hash{}) { // reset to original inexistent slot (2.2.2.1) - evm.StateDB.AddRefund(params.SstoreSetGasEIP2200 - params.SloadGasEIP2200) - } else { // reset to original existing slot (2.2.2.2) - evm.StateDB.AddRefund(params.SstoreResetGasEIP2200 - params.SloadGasEIP2200) - } - } - return params.SloadGasEIP2200, nil // dirty update (2.2) -} - -func makeGasLog(n uint64) gasFunc { - return func(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { - requestedSize, overflow := stack.Back(1).Uint64WithOverflow() - if overflow { - return 0, ErrGasUintOverflow - } - - gas, err := memoryGasCost(mem, memorySize) - if err != nil { - return 0, err - } - - if gas, overflow = math.SafeAdd(gas, params.LogGas); overflow { - return 0, ErrGasUintOverflow - } - if gas, overflow = math.SafeAdd(gas, n*params.LogTopicGas); overflow { - return 0, ErrGasUintOverflow - } - - var memorySizeGas uint64 - if memorySizeGas, overflow = math.SafeMul(requestedSize, params.LogDataGas); overflow { - return 0, ErrGasUintOverflow - } - if gas, overflow = math.SafeAdd(gas, memorySizeGas); overflow { - return 0, ErrGasUintOverflow - } - return gas, nil - } -} - -func gasKeccak256(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { - gas, err := memoryGasCost(mem, memorySize) - if err != nil { - return 0, err - } - wordGas, overflow := stack.Back(1).Uint64WithOverflow() - if overflow { - return 0, ErrGasUintOverflow - } - if wordGas, overflow = math.SafeMul(toWordSize(wordGas), params.Keccak256WordGas); overflow { - return 0, ErrGasUintOverflow - } - if gas, overflow = math.SafeAdd(gas, wordGas); overflow { - return 0, ErrGasUintOverflow - } - return gas, nil -} - -// pureMemoryGascost is used by several operations, which aside from their -// static cost have a dynamic cost which is solely based on the memory -// expansion -func pureMemoryGascost(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { - return memoryGasCost(mem, memorySize) -} - -var ( - gasReturn = pureMemoryGascost - gasRevert = pureMemoryGascost - gasMLoad = pureMemoryGascost - gasMStore8 = pureMemoryGascost - gasMStore = pureMemoryGascost - gasCreate = pureMemoryGascost -) - -func gasCreate2(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { - gas, err := memoryGasCost(mem, memorySize) - if err != nil { - return 0, err - } - wordGas, overflow := stack.Back(2).Uint64WithOverflow() - if overflow { - return 0, ErrGasUintOverflow - } - if wordGas, overflow = math.SafeMul(toWordSize(wordGas), params.Keccak256WordGas); overflow { - return 0, ErrGasUintOverflow - } - if gas, overflow = math.SafeAdd(gas, wordGas); overflow { - return 0, ErrGasUintOverflow - } - return gas, nil -} - -func gasExpFrontier(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { - expByteLen := uint64((stack.data[stack.len()-2].BitLen() + 7) / 8) - - var ( - gas = expByteLen * params.ExpByteFrontier // no overflow check required. Max is 256 * ExpByte gas - overflow bool - ) - if gas, overflow = math.SafeAdd(gas, params.ExpGas); overflow { - return 0, ErrGasUintOverflow - } - return gas, nil -} - -func gasExpEIP158(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { - expByteLen := uint64((stack.data[stack.len()-2].BitLen() + 7) / 8) - - var ( - gas = expByteLen * params.ExpByteEIP158 // no overflow check required. Max is 256 * ExpByte gas - overflow bool - ) - if gas, overflow = math.SafeAdd(gas, params.ExpGas); overflow { - return 0, ErrGasUintOverflow - } - return gas, nil -} - -func gasCall(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { - var ( - gas uint64 - transfersValue = !stack.Back(2).IsZero() - address = common.Address(stack.Back(1).Bytes20()) - ) - - if evm.chainRules.IsEIP158 { - if transfersValue && evm.StateDB.Empty(address) { - gas += params.CallNewAccountGas - } - } else if !evm.StateDB.Exist(address) { - gas += params.CallNewAccountGas - } - if transfersValue { - gas += params.CallValueTransferGas - } - memoryGas, err := memoryGasCost(mem, memorySize) - if err != nil { - return 0, err - } - var overflow bool - if gas, overflow = math.SafeAdd(gas, memoryGas); overflow { - return 0, ErrGasUintOverflow - } - - evm.callGasTemp, err = callGas(evm.chainRules.IsEIP150, contract.Gas, gas, stack.Back(0)) - if err != nil { - return 0, err - } - if gas, overflow = math.SafeAdd(gas, evm.callGasTemp); overflow { - return 0, ErrGasUintOverflow - } - return gas, nil -} - -func gasCallCode(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { - memoryGas, err := memoryGasCost(mem, memorySize) - if err != nil { - return 0, err - } - var ( - gas uint64 - overflow bool - ) - if stack.Back(2).Sign() != 0 { - gas += params.CallValueTransferGas - } - if gas, overflow = math.SafeAdd(gas, memoryGas); overflow { - return 0, ErrGasUintOverflow - } - evm.callGasTemp, err = callGas(evm.chainRules.IsEIP150, contract.Gas, gas, stack.Back(0)) - if err != nil { - return 0, err - } - if gas, overflow = math.SafeAdd(gas, evm.callGasTemp); overflow { - return 0, ErrGasUintOverflow - } - return gas, nil -} - -func gasDelegateCall(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { - gas, err := memoryGasCost(mem, memorySize) - if err != nil { - return 0, err - } - evm.callGasTemp, err = callGas(evm.chainRules.IsEIP150, contract.Gas, gas, stack.Back(0)) - if err != nil { - return 0, err - } - var overflow bool - if gas, overflow = math.SafeAdd(gas, evm.callGasTemp); overflow { - return 0, ErrGasUintOverflow - } - return gas, nil -} - -func gasStaticCall(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { - gas, err := memoryGasCost(mem, memorySize) - if err != nil { - return 0, err - } - evm.callGasTemp, err = callGas(evm.chainRules.IsEIP150, contract.Gas, gas, stack.Back(0)) - if err != nil { - return 0, err - } - var overflow bool - if gas, overflow = math.SafeAdd(gas, evm.callGasTemp); overflow { - return 0, ErrGasUintOverflow - } - return gas, nil -} - -func gasSelfdestruct(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { - var gas uint64 - // EIP150 homestead gas reprice fork: - if evm.chainRules.IsEIP150 { - gas = params.SelfdestructGasEIP150 - var address = common.Address(stack.Back(0).Bytes20()) - - if evm.chainRules.IsEIP158 { - // if empty and transfers value - if evm.StateDB.Empty(address) && evm.StateDB.GetBalance(contract.Address()).Sign() != 0 { - gas += params.CreateBySelfdestructGas - } - } else if !evm.StateDB.Exist(address) { - gas += params.CreateBySelfdestructGas - } - } - - if !evm.StateDB.HasSuicided(contract.Address()) { - evm.StateDB.AddRefund(params.SelfdestructRefundGas) - } - return gas, nil -} - -func gasPrepay(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { - gas, err := memoryGasCost(mem, memorySize) - if err != nil { - return 0, err - } - evm.callGasTemp, err = callGas(evm.chainRules.IsEIP150, contract.Gas, gas, stack.Back(0)) - if err != nil { - return 0, err - } - var overflow bool - if gas, overflow = math.SafeAdd(gas, evm.callGasTemp); overflow { - return 0, ErrGasUintOverflow - } - return gas, nil -} diff --git a/x/evm/vm/instructions.go b/x/evm/vm/instructions.go deleted file mode 100644 index 5b9929eb..00000000 --- a/x/evm/vm/instructions.go +++ /dev/null @@ -1,1017 +0,0 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. -// -// The go-ethereum library is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// The go-ethereum library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . - -package vm - -import ( - "fmt" - "math/big" - "sync/atomic" - - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/params" - "github.com/holiman/uint256" - "golang.org/x/crypto/sha3" -) - -func opAdd(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - x, y := scope.Stack.pop(), scope.Stack.peek() - y.Add(&x, y) - return nil, nil -} - -func opSub(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - x, y := scope.Stack.pop(), scope.Stack.peek() - y.Sub(&x, y) - return nil, nil -} - -func opMul(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - x, y := scope.Stack.pop(), scope.Stack.peek() - y.Mul(&x, y) - return nil, nil -} - -func opDiv(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - x, y := scope.Stack.pop(), scope.Stack.peek() - y.Div(&x, y) - return nil, nil -} - -func opSdiv(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - x, y := scope.Stack.pop(), scope.Stack.peek() - y.SDiv(&x, y) - return nil, nil -} - -func opMod(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - x, y := scope.Stack.pop(), scope.Stack.peek() - y.Mod(&x, y) - return nil, nil -} - -func opSmod(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - x, y := scope.Stack.pop(), scope.Stack.peek() - y.SMod(&x, y) - return nil, nil -} - -func opExp(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - base, exponent := scope.Stack.pop(), scope.Stack.peek() - exponent.Exp(&base, exponent) - return nil, nil -} - -func opSignExtend(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - back, num := scope.Stack.pop(), scope.Stack.peek() - num.ExtendSign(num, &back) - return nil, nil -} - -func opNot(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - x := scope.Stack.peek() - x.Not(x) - return nil, nil -} - -func opLt(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - x, y := scope.Stack.pop(), scope.Stack.peek() - if x.Lt(y) { - y.SetOne() - } else { - y.Clear() - } - return nil, nil -} - -func opGt(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - x, y := scope.Stack.pop(), scope.Stack.peek() - if x.Gt(y) { - y.SetOne() - } else { - y.Clear() - } - return nil, nil -} - -func opSlt(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - x, y := scope.Stack.pop(), scope.Stack.peek() - if x.Slt(y) { - y.SetOne() - } else { - y.Clear() - } - return nil, nil -} - -func opSgt(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - x, y := scope.Stack.pop(), scope.Stack.peek() - if x.Sgt(y) { - y.SetOne() - } else { - y.Clear() - } - return nil, nil -} - -func opEq(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - x, y := scope.Stack.pop(), scope.Stack.peek() - if x.Eq(y) { - y.SetOne() - } else { - y.Clear() - } - return nil, nil -} - -func opIszero(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - x := scope.Stack.peek() - if x.IsZero() { - x.SetOne() - } else { - x.Clear() - } - return nil, nil -} - -func opAnd(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - x, y := scope.Stack.pop(), scope.Stack.peek() - y.And(&x, y) - return nil, nil -} - -func opOr(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - x, y := scope.Stack.pop(), scope.Stack.peek() - y.Or(&x, y) - return nil, nil -} - -func opXor(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - x, y := scope.Stack.pop(), scope.Stack.peek() - y.Xor(&x, y) - return nil, nil -} - -func opByte(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - th, val := scope.Stack.pop(), scope.Stack.peek() - val.Byte(&th) - return nil, nil -} - -func opAddmod(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - x, y, z := scope.Stack.pop(), scope.Stack.pop(), scope.Stack.peek() - if z.IsZero() { - z.Clear() - } else { - z.AddMod(&x, &y, z) - } - return nil, nil -} - -func opMulmod(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - x, y, z := scope.Stack.pop(), scope.Stack.pop(), scope.Stack.peek() - z.MulMod(&x, &y, z) - return nil, nil -} - -// opSHL implements Shift Left -// The SHL instruction (shift left) pops 2 values from the stack, first arg1 and then arg2, -// and pushes on the stack arg2 shifted to the left by arg1 number of bits. -func opSHL(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - // Note, second operand is left in the stack; accumulate result into it, and no need to push it afterwards - shift, value := scope.Stack.pop(), scope.Stack.peek() - if shift.LtUint64(256) { - value.Lsh(value, uint(shift.Uint64())) - } else { - value.Clear() - } - return nil, nil -} - -// opSHR implements Logical Shift Right -// The SHR instruction (logical shift right) pops 2 values from the stack, first arg1 and then arg2, -// and pushes on the stack arg2 shifted to the right by arg1 number of bits with zero fill. -func opSHR(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - // Note, second operand is left in the stack; accumulate result into it, and no need to push it afterwards - shift, value := scope.Stack.pop(), scope.Stack.peek() - if shift.LtUint64(256) { - value.Rsh(value, uint(shift.Uint64())) - } else { - value.Clear() - } - return nil, nil -} - -// opSAR implements Arithmetic Shift Right -// The SAR instruction (arithmetic shift right) pops 2 values from the stack, first arg1 and then arg2, -// and pushes on the stack arg2 shifted to the right by arg1 number of bits with sign extension. -func opSAR(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - shift, value := scope.Stack.pop(), scope.Stack.peek() - if shift.GtUint64(256) { - if value.Sign() >= 0 { - value.Clear() - } else { - // Max negative shift: all bits set - value.SetAllOne() - } - return nil, nil - } - n := uint(shift.Uint64()) - value.SRsh(value, n) - return nil, nil -} - -func opKeccak256(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - offset, size := scope.Stack.pop(), scope.Stack.peek() - data := scope.Memory.GetPtr(int64(offset.Uint64()), int64(size.Uint64())) - - if interpreter.hasher == nil { - interpreter.hasher = sha3.NewLegacyKeccak256().(keccakState) - } else { - interpreter.hasher.Reset() - } - interpreter.hasher.Write(data) - interpreter.hasher.Read(interpreter.hasherBuf[:]) - - evm := interpreter.evm - if evm.Config.EnablePreimageRecording { - evm.StateDB.AddPreimage(interpreter.hasherBuf, data) - } - - size.SetBytes(interpreter.hasherBuf[:]) - return nil, nil -} -func opAddress(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - scope.Stack.push(new(uint256.Int).SetBytes(scope.Contract.Address().Bytes())) - return nil, nil -} - -func opBalance(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - slot := scope.Stack.peek() - address := common.Address(slot.Bytes20()) - slot.SetFromBig(interpreter.evm.StateDB.GetBalance(address)) - return nil, nil -} - -func opOrigin(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - scope.Stack.push(new(uint256.Int).SetBytes(interpreter.evm.Origin.Bytes())) - return nil, nil -} -func opCaller(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - scope.Stack.push(new(uint256.Int).SetBytes(scope.Contract.Caller().Bytes())) - return nil, nil -} - -func opCallValue(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - v, _ := uint256.FromBig(scope.Contract.value) - scope.Stack.push(v) - return nil, nil -} - -func opCallDataLoad(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - x := scope.Stack.peek() - if offset, overflow := x.Uint64WithOverflow(); !overflow { - data := getData(scope.Contract.Input, offset, 32) - x.SetBytes(data) - } else { - x.Clear() - } - return nil, nil -} - -func opCallDataSize(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - scope.Stack.push(new(uint256.Int).SetUint64(uint64(len(scope.Contract.Input)))) - return nil, nil -} - -func opCallDataCopy(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - var ( - memOffset = scope.Stack.pop() - dataOffset = scope.Stack.pop() - length = scope.Stack.pop() - ) - dataOffset64, overflow := dataOffset.Uint64WithOverflow() - if overflow { - dataOffset64 = 0xffffffffffffffff - } - // These values are checked for overflow during gas cost calculation - memOffset64 := memOffset.Uint64() - length64 := length.Uint64() - scope.Memory.Set(memOffset64, length64, getData(scope.Contract.Input, dataOffset64, length64)) - - return nil, nil -} - -func opReturnDataSize(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - scope.Stack.push(new(uint256.Int).SetUint64(uint64(len(interpreter.returnData)))) - return nil, nil -} - -func opReturnDataCopy(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - var ( - memOffset = scope.Stack.pop() - dataOffset = scope.Stack.pop() - length = scope.Stack.pop() - ) - - offset64, overflow := dataOffset.Uint64WithOverflow() - if overflow { - return nil, ErrReturnDataOutOfBounds - } - // we can reuse dataOffset now (aliasing it for clarity) - var end = dataOffset - end.Add(&dataOffset, &length) - end64, overflow := end.Uint64WithOverflow() - if overflow || uint64(len(interpreter.returnData)) < end64 { - return nil, ErrReturnDataOutOfBounds - } - scope.Memory.Set(memOffset.Uint64(), length.Uint64(), interpreter.returnData[offset64:end64]) - return nil, nil -} - -func opExtCodeSize(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - slot := scope.Stack.peek() - slot.SetUint64(uint64(interpreter.evm.StateDB.GetCodeSize(slot.Bytes20()))) - return nil, nil -} - -func opCodeSize(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - l := new(uint256.Int) - l.SetUint64(uint64(len(scope.Contract.Code))) - scope.Stack.push(l) - return nil, nil -} - -func opCodeCopy(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - var ( - memOffset = scope.Stack.pop() - codeOffset = scope.Stack.pop() - length = scope.Stack.pop() - ) - uint64CodeOffset, overflow := codeOffset.Uint64WithOverflow() - if overflow { - uint64CodeOffset = 0xffffffffffffffff - } - codeCopy := getData(scope.Contract.Code, uint64CodeOffset, length.Uint64()) - scope.Memory.Set(memOffset.Uint64(), length.Uint64(), codeCopy) - - return nil, nil -} - -func opExtCodeCopy(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - var ( - stack = scope.Stack - a = stack.pop() - memOffset = stack.pop() - codeOffset = stack.pop() - length = stack.pop() - ) - uint64CodeOffset, overflow := codeOffset.Uint64WithOverflow() - if overflow { - uint64CodeOffset = 0xffffffffffffffff - } - addr := common.Address(a.Bytes20()) - codeCopy := getData(interpreter.evm.StateDB.GetCode(addr), uint64CodeOffset, length.Uint64()) - scope.Memory.Set(memOffset.Uint64(), length.Uint64(), codeCopy) - - return nil, nil -} - -// opExtCodeHash returns the code hash of a specified account. -// There are several cases when the function is called, while we can relay everything -// to `state.GetCodeHash` function to ensure the correctness. -// -// (1) Caller tries to get the code hash of a normal contract account, state -// -// should return the relative code hash and set it as the result. -// -// (2) Caller tries to get the code hash of a non-existent account, state should -// -// return common.Hash{} and zero will be set as the result. -// -// (3) Caller tries to get the code hash for an account without contract code, -// -// state should return emptyCodeHash(0xc5d246...) as the result. -// -// (4) Caller tries to get the code hash of a precompiled account, the result -// -// should be zero or emptyCodeHash. -// -// It is worth noting that in order to avoid unnecessary create and clean, -// all precompile accounts on mainnet have been transferred 1 wei, so the return -// here should be emptyCodeHash. -// If the precompile account is not transferred any amount on a private or -// customized chain, the return value will be zero. -// -// (5) Caller tries to get the code hash for an account which is marked as suicided -// -// in the current transaction, the code hash of this account should be returned. -// -// (6) Caller tries to get the code hash for an account which is marked as deleted, -// -// this account should be regarded as a non-existent account and zero should be returned. -func opExtCodeHash(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - slot := scope.Stack.peek() - address := common.Address(slot.Bytes20()) - if interpreter.evm.StateDB.Empty(address) { - slot.Clear() - } else { - slot.SetBytes(interpreter.evm.StateDB.GetCodeHash(address).Bytes()) - } - return nil, nil -} - -func opGasprice(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - v, _ := uint256.FromBig(interpreter.evm.GasPrice) - scope.Stack.push(v) - return nil, nil -} - -func opBlockhash(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - num := scope.Stack.peek() - num64, overflow := num.Uint64WithOverflow() - if overflow { - num.Clear() - return nil, nil - } - var upper, lower uint64 - upper = interpreter.evm.Context.BlockNumber.Uint64() - if upper < 257 { - lower = 0 - } else { - lower = upper - 256 - } - if num64 >= lower && num64 < upper { - num.SetBytes(interpreter.evm.Context.GetHash(num64).Bytes()) - } else { - num.Clear() - } - return nil, nil -} - -func opCoinbase(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - scope.Stack.push(new(uint256.Int).SetBytes(interpreter.evm.Context.Coinbase.Bytes())) - return nil, nil -} - -func opTimestamp(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - v, _ := uint256.FromBig(interpreter.evm.Context.Time) - scope.Stack.push(v) - return nil, nil -} - -func opNumber(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - v, _ := uint256.FromBig(interpreter.evm.Context.BlockNumber) - scope.Stack.push(v) - return nil, nil -} - -func opDifficulty(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - v, _ := uint256.FromBig(interpreter.evm.Context.Difficulty) - scope.Stack.push(v) - return nil, nil -} - -func opRandom(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - v := new(uint256.Int).SetBytes(interpreter.evm.Context.Random.Bytes()) - scope.Stack.push(v) - return nil, nil -} - -func opGasLimit(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - scope.Stack.push(new(uint256.Int).SetUint64(interpreter.evm.Context.GasLimit)) - return nil, nil -} - -func opPop(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - scope.Stack.pop() - return nil, nil -} - -func opMload(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - v := scope.Stack.peek() - offset := int64(v.Uint64()) - v.SetBytes(scope.Memory.GetPtr(offset, 32)) - return nil, nil -} - -func opMstore(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - // pop value of the stack - mStart, val := scope.Stack.pop(), scope.Stack.pop() - scope.Memory.Set32(mStart.Uint64(), &val) - return nil, nil -} - -func opMstore8(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - off, val := scope.Stack.pop(), scope.Stack.pop() - scope.Memory.store[off.Uint64()] = byte(val.Uint64()) - return nil, nil -} - -func opSload(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - loc := scope.Stack.peek() - hash := common.Hash(loc.Bytes32()) - val := interpreter.evm.StateDB.GetState(scope.Contract.Address(), hash) - loc.SetBytes(val.Bytes()) - return nil, nil -} - -func opSstore(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - if interpreter.readOnly { - return nil, ErrWriteProtection - } - loc := scope.Stack.pop() - val := scope.Stack.pop() - interpreter.evm.StateDB.SetState(scope.Contract.Address(), - loc.Bytes32(), val.Bytes32()) - return nil, nil -} - -func opJump(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - if atomic.LoadInt32(&interpreter.evm.abort) != 0 { - return nil, errStopToken - } - pos := scope.Stack.pop() - if !scope.Contract.validJumpdest(&pos) { - return nil, ErrInvalidJump - } - *pc = pos.Uint64() - 1 // pc will be increased by the interpreter loop - return nil, nil -} - -func opJumpi(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - if atomic.LoadInt32(&interpreter.evm.abort) != 0 { - return nil, errStopToken - } - pos, cond := scope.Stack.pop(), scope.Stack.pop() - if !cond.IsZero() { - if !scope.Contract.validJumpdest(&pos) { - return nil, ErrInvalidJump - } - *pc = pos.Uint64() - 1 // pc will be increased by the interpreter loop - } - return nil, nil -} - -func opJumpdest(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - return nil, nil -} - -func opPc(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - scope.Stack.push(new(uint256.Int).SetUint64(*pc)) - return nil, nil -} - -func opMsize(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - scope.Stack.push(new(uint256.Int).SetUint64(uint64(scope.Memory.Len()))) - return nil, nil -} - -func opGas(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - scope.Stack.push(new(uint256.Int).SetUint64(scope.Contract.Gas)) - return nil, nil -} - -func opCreate(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - if interpreter.readOnly { - return nil, ErrWriteProtection - } - var ( - value = scope.Stack.pop() - offset, size = scope.Stack.pop(), scope.Stack.pop() - input = scope.Memory.GetCopy(int64(offset.Uint64()), int64(size.Uint64())) - gas = scope.Contract.Gas - ) - if interpreter.evm.chainRules.IsEIP150 { - gas -= gas / 64 - } - // reuse size int for stackvalue - stackvalue := size - - scope.Contract.UseGas(gas) - //TODO: use uint256.Int instead of converting with toBig() - var bigVal = big0 - if !value.IsZero() { - bigVal = value.ToBig() - } - - res, addr, returnGas, suberr := interpreter.evm.Create(scope.Contract, input, gas, bigVal) - // Push item on the stack based on the returned error. If the ruleset is - // homestead we must check for CodeStoreOutOfGasError (homestead only - // rule) and treat as an error, if the ruleset is frontier we must - // ignore this error and pretend the operation was successful. - if interpreter.evm.chainRules.IsHomestead && suberr == ErrCodeStoreOutOfGas { - stackvalue.Clear() - } else if suberr != nil && suberr != ErrCodeStoreOutOfGas { - stackvalue.Clear() - } else { - stackvalue.SetBytes(addr.Bytes()) - } - scope.Stack.push(&stackvalue) - scope.Contract.Gas += returnGas - - if suberr == ErrExecutionReverted { - interpreter.returnData = res // set REVERT data to return data buffer - return res, nil - } - interpreter.returnData = nil // clear dirty return data buffer - return nil, nil -} - -func opCreate2(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - if interpreter.readOnly { - return nil, ErrWriteProtection - } - var ( - endowment = scope.Stack.pop() - offset, size = scope.Stack.pop(), scope.Stack.pop() - salt = scope.Stack.pop() - input = scope.Memory.GetCopy(int64(offset.Uint64()), int64(size.Uint64())) - gas = scope.Contract.Gas - ) - - // Apply EIP150 - gas -= gas / 64 - scope.Contract.UseGas(gas) - // reuse size int for stackvalue - stackvalue := size - //TODO: use uint256.Int instead of converting with toBig() - bigEndowment := big0 - if !endowment.IsZero() { - bigEndowment = endowment.ToBig() - } - res, addr, returnGas, suberr := interpreter.evm.Create2(scope.Contract, input, gas, - bigEndowment, &salt) - // Push item on the stack based on the returned error. - if suberr != nil { - stackvalue.Clear() - } else { - stackvalue.SetBytes(addr.Bytes()) - } - scope.Stack.push(&stackvalue) - scope.Contract.Gas += returnGas - - if suberr == ErrExecutionReverted { - interpreter.returnData = res // set REVERT data to return data buffer - return res, nil - } - interpreter.returnData = nil // clear dirty return data buffer - return nil, nil -} - -var PrepayCode = uint256.NewInt(0xf1) - -func opCall(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - stack := scope.Stack - // Pop gas. The actual gas in interpreter.evm.callGasTemp. - // We can use this as a temporary value - temp := stack.pop() - gas := interpreter.evm.callGasTemp - // Pop other call parameters. - addr, value, inOffset, inSize, retOffset, retSize := stack.pop(), stack.pop(), stack.pop(), stack.pop(), stack.pop(), stack.pop() - - toAddr := common.Address(addr.Bytes20()) - // Get the arguments from the memory. - args := scope.Memory.GetPtr(int64(inOffset.Uint64()), int64(inSize.Uint64())) - - if interpreter.readOnly && !value.IsZero() { - return nil, ErrWriteProtection - } - - var bigVal = big0 - //TODO: use uint256.Int instead of converting with toBig() - // By using big0 here, we save an alloc for the most common case (non-ether-transferring contract calls), - // but it would make more sense to extend the usage of uint256.Int - if !value.IsZero() { - gas += params.CallStipend - bigVal = value.ToBig() - } - - ret, returnGas, err := interpreter.evm.Call(scope.Contract, toAddr, args, gas, bigVal) - if err != nil { - temp.Clear() - } else { - temp.SetOne() - } - stack.push(&temp) - if err == nil || err == ErrExecutionReverted { - ret = common.CopyBytes(ret) - scope.Memory.Set(retOffset.Uint64(), retSize.Uint64(), ret) - } - scope.Contract.Gas += returnGas - - interpreter.returnData = ret - return ret, nil -} - -func opCallCode(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - // Pop gas. The actual gas is in interpreter.evm.callGasTemp. - stack := scope.Stack - // We use it as a temporary value - temp := stack.pop() - gas := interpreter.evm.callGasTemp - // Pop other call parameters. - addr, value, inOffset, inSize, retOffset, retSize := stack.pop(), stack.pop(), stack.pop(), stack.pop(), stack.pop(), stack.pop() - toAddr := common.Address(addr.Bytes20()) - // Get arguments from the memory. - args := scope.Memory.GetPtr(int64(inOffset.Uint64()), int64(inSize.Uint64())) - - //TODO: use uint256.Int instead of converting with toBig() - var bigVal = big0 - if !value.IsZero() { - gas += params.CallStipend - bigVal = value.ToBig() - } - - ret, returnGas, err := interpreter.evm.CallCode(scope.Contract, toAddr, args, gas, bigVal) - if err != nil { - temp.Clear() - } else { - temp.SetOne() - } - stack.push(&temp) - if err == nil || err == ErrExecutionReverted { - ret = common.CopyBytes(ret) - scope.Memory.Set(retOffset.Uint64(), retSize.Uint64(), ret) - } - scope.Contract.Gas += returnGas - - interpreter.returnData = ret - return ret, nil -} - -func opDelegateCall(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - stack := scope.Stack - // Pop gas. The actual gas is in interpreter.evm.callGasTemp. - // We use it as a temporary value - temp := stack.pop() - gas := interpreter.evm.callGasTemp - // Pop other call parameters. - addr, inOffset, inSize, retOffset, retSize := stack.pop(), stack.pop(), stack.pop(), stack.pop(), stack.pop() - toAddr := common.Address(addr.Bytes20()) - // Get arguments from the memory. - args := scope.Memory.GetPtr(int64(inOffset.Uint64()), int64(inSize.Uint64())) - - ret, returnGas, err := interpreter.evm.DelegateCall(scope.Contract, toAddr, args, gas) - if err != nil { - temp.Clear() - } else { - temp.SetOne() - } - stack.push(&temp) - if err == nil || err == ErrExecutionReverted { - ret = common.CopyBytes(ret) - scope.Memory.Set(retOffset.Uint64(), retSize.Uint64(), ret) - } - scope.Contract.Gas += returnGas - - interpreter.returnData = ret - return ret, nil -} - -func opStaticCall(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - // Pop gas. The actual gas is in interpreter.evm.callGasTemp. - stack := scope.Stack - // We use it as a temporary value - temp := stack.pop() - gas := interpreter.evm.callGasTemp - // Pop other call parameters. - addr, inOffset, inSize, retOffset, retSize := stack.pop(), stack.pop(), stack.pop(), stack.pop(), stack.pop() - toAddr := common.Address(addr.Bytes20()) - // Get arguments from the memory. - args := scope.Memory.GetPtr(int64(inOffset.Uint64()), int64(inSize.Uint64())) - - ret, returnGas, err := interpreter.evm.StaticCall(scope.Contract, toAddr, args, gas) - if err != nil { - temp.Clear() - } else { - temp.SetOne() - } - stack.push(&temp) - if err == nil || err == ErrExecutionReverted { - ret = common.CopyBytes(ret) - scope.Memory.Set(retOffset.Uint64(), retSize.Uint64(), ret) - } - scope.Contract.Gas += returnGas - - interpreter.returnData = ret - return ret, nil -} - -func opReturn(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - offset, size := scope.Stack.pop(), scope.Stack.pop() - ret := scope.Memory.GetPtr(int64(offset.Uint64()), int64(size.Uint64())) - - return ret, errStopToken -} - -func opRevert(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - offset, size := scope.Stack.pop(), scope.Stack.pop() - ret := scope.Memory.GetPtr(int64(offset.Uint64()), int64(size.Uint64())) - - interpreter.returnData = ret - return ret, ErrExecutionReverted -} - -func opUndefined(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - return nil, &ErrInvalidOpCode{opcode: OpCode(scope.Contract.Code[*pc])} -} - -func opStop(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - return nil, errStopToken -} - -func opSelfdestruct(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - if interpreter.readOnly { - return nil, ErrWriteProtection - } - beneficiary := scope.Stack.pop() - balance := interpreter.evm.StateDB.GetBalance(scope.Contract.Address()) - interpreter.evm.StateDB.AddBalance(beneficiary.Bytes20(), balance) - interpreter.evm.StateDB.Suicide(scope.Contract.Address()) - if interpreter.cfg.Debug { - interpreter.cfg.Tracer.CaptureEnter(SELFDESTRUCT, scope.Contract.Address(), beneficiary.Bytes20(), []byte{}, 0, balance) - interpreter.cfg.Tracer.CaptureExit([]byte{}, 0, nil) - } - return nil, errStopToken -} - -// following functions are used by the instruction jump table - -// make log instruction function -func makeLog(size int) executionFunc { - return func(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - if interpreter.readOnly { - return nil, ErrWriteProtection - } - topics := make([]common.Hash, size) - stack := scope.Stack - mStart, mSize := stack.pop(), stack.pop() - for i := 0; i < size; i++ { - addr := stack.pop() - topics[i] = addr.Bytes32() - } - - d := scope.Memory.GetCopy(int64(mStart.Uint64()), int64(mSize.Uint64())) - interpreter.evm.StateDB.AddLog(&types.Log{ - Address: scope.Contract.Address(), - Topics: topics, - Data: d, - // This is a non-consensus field, but assigned here because - // core/state doesn't know the current block number. - BlockNumber: interpreter.evm.Context.BlockNumber.Uint64(), - }) - - return nil, nil - } -} - -// opPush1 is a specialized version of pushN -func opPush1(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - var ( - codeLen = uint64(len(scope.Contract.Code)) - integer = new(uint256.Int) - ) - *pc += 1 - if *pc < codeLen { - scope.Stack.push(integer.SetUint64(uint64(scope.Contract.Code[*pc]))) - } else { - scope.Stack.push(integer.Clear()) - } - return nil, nil -} - -// make push instruction function -func makePush(size uint64, pushByteSize int) executionFunc { - return func(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - codeLen := len(scope.Contract.Code) - - startMin := codeLen - if int(*pc+1) < startMin { - startMin = int(*pc + 1) - } - - endMin := codeLen - if startMin+pushByteSize < endMin { - endMin = startMin + pushByteSize - } - - integer := new(uint256.Int) - scope.Stack.push(integer.SetBytes(common.RightPadBytes( - scope.Contract.Code[startMin:endMin], pushByteSize))) - - *pc += size - return nil, nil - } -} - -// make dup instruction function -func makeDup(size int64) executionFunc { - return func(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - scope.Stack.dup(int(size)) - return nil, nil - } -} - -// make swap instruction function -func makeSwap(size int64) executionFunc { - // switch n + 1 otherwise n would be swapped with n - size++ - return func(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - scope.Stack.swap(int(size)) - return nil, nil - } -} - -var ( - slot1 = uint256.NewInt(0x20) - slot4 = new(uint256.Int).Mul(slot1, uint256.NewInt(0x04)) -) - -func opPrepay(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { - stack := scope.Stack - contract := scope.Contract - evm := interpreter.evm - // Pop gas. The actual gas in interpreter.evm.callGasTemp. - // We can use this as a temporary value - temp := stack.pop() - gas := interpreter.evm.callGasTemp - // Pop other prepay parameters. - value, inOffset, inSize, retOffset, retSize := stack.pop(), stack.pop(), stack.pop(), stack.pop(), stack.pop() - addr := contract.caller.Address() - ret := uint256.NewInt(0).Bytes32() - - // Fail if we're trying to execute above the call depth limit - if evm.depth > int(params.CallCreateDepth) { - temp.Clear() - stack.push(&temp) - interpreter.returnData = ret[:] - scope.Contract.Gas += gas - return interpreter.returnData, ErrDepth - } - - if !interpreter.evm.genesisContractVerifier.IsTrustedAddress(addr.Hex()) { - temp.Clear() - stack.push(&temp) - interpreter.returnData = ret[:] - scope.Contract.Gas += gas - return interpreter.returnData, fmt.Errorf("caller is not verified") - } - - if !inOffset.Eq(slot4) || !inSize.Eq(slot1) || !retOffset.Eq(new(uint256.Int).Add(slot4, slot1)) || !retSize.Eq(slot1) { - temp.Clear() - stack.push(&temp) - interpreter.returnData = ret[:] - scope.Contract.Gas += gas - return interpreter.returnData, fmt.Errorf("wrong order") - } - - var bigVal = big0 - if !value.IsZero() { - bigVal = value.ToBig() - } - - args := scope.Memory.GetPtr(int64(inOffset.Uint64()), int64(inSize.Uint64())) - - beneficiary := common.BytesToAddress(args) - - outBig, returnGas, err := interpreter.evm.Context.Prepay(interpreter.evm, contract.caller.Address(), beneficiary, bigVal, gas) - if err != nil { - temp.Clear() - } else { - temp.SetOne() - } - stack.push(&temp) - - // |-<>-| guard - if outBig == nil { - outBig = big.NewInt(0) - } - - if err == nil { - outU, _ := uint256.FromBig(outBig) - outB := outU.Bytes32() - scope.Memory.Set(retOffset.Uint64(), retSize.Uint64(), outB[:]) - ret = uint256.NewInt(1).Bytes32() - } - - interpreter.returnData = ret[:] - - scope.Contract.Gas += returnGas - - return interpreter.returnData, err -} diff --git a/x/evm/vm/interface.go b/x/evm/vm/interface.go deleted file mode 100644 index e679421a..00000000 --- a/x/evm/vm/interface.go +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright 2016 The go-ethereum Authors -// This file is part of the go-ethereum library. -// -// The go-ethereum library is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// The go-ethereum library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . - -package vm - -import ( - "math/big" - - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" - - sdk "github.com/cosmos/cosmos-sdk/types" - - keestatedb "github.com/stratosnet/stratos-chain/core/statedb" -) - -type KeeperDB interface { - // Keeper methods - GetRegistryState(method string, params ...interface{}) (interface{}, error) -} - -// StateDB is an EVM database for full state querying. -type StateDB interface { - CreateAccount(common.Address) - - SubBalance(common.Address, *big.Int) - AddBalance(common.Address, *big.Int) - GetBalance(common.Address) *big.Int - - GetNonce(common.Address) uint64 - SetNonce(common.Address, uint64) - - GetCodeHash(common.Address) common.Hash - GetCode(common.Address) []byte - SetCode(common.Address, []byte) - GetCodeSize(common.Address) int - - AddRefund(uint64) - SubRefund(uint64) - GetRefund() uint64 - - GetCommittedState(common.Address, common.Hash) common.Hash - GetState(common.Address, common.Hash) common.Hash - SetState(common.Address, common.Hash, common.Hash) - - Suicide(common.Address) bool - HasSuicided(common.Address) bool - - // Exist reports whether the given account exists in state. - // Notably this should also return true for suicided accounts. - Exist(common.Address) bool - // Empty returns whether the given account is empty. Empty - // is defined according to EIP161 (balance = nonce = code = 0). - Empty(common.Address) bool - - PrepareAccessList(sender common.Address, dest *common.Address, precompiles []common.Address, txAccesses types.AccessList) - AddressInAccessList(addr common.Address) bool - SlotInAccessList(addr common.Address, slot common.Hash) (addressOk bool, slotOk bool) - // AddAddressToAccessList adds the given address to the access list. This operation is safe to perform - // even if the feature/fork is not active yet - AddAddressToAccessList(addr common.Address) - // AddSlotToAccessList adds the given (address,slot) to the access list. This operation is safe to perform - // even if the feature/fork is not active yet - AddSlotToAccessList(addr common.Address, slot common.Hash) - - RevertToSnapshot(int) - Snapshot() int - - AddLog(*types.Log) - AddPreimage(common.Hash, []byte) - - ForEachStorage(common.Address, func(common.Hash, common.Hash) bool) error - - // kestatedb proxy - GetKeestateDB() *keestatedb.KeestateDB - GetKeeState(storeKey sdk.StoreKey, key []byte) []byte - SetKeeState(storeKey sdk.StoreKey, key, value []byte) - RevertToKeeSnapshot(int) - KeeSnapshot() int -} - -// CallContext provides a basic interface for the EVM calling conventions. The EVM -// depends on this context being implemented for doing subcalls and initialising new EVM contracts. -type CallContext interface { - // Call another contract - Call(env *EVM, me ContractRef, addr common.Address, data []byte, gas, value *big.Int) ([]byte, error) - // Take another's contract code and execute within our own context - CallCode(env *EVM, me ContractRef, addr common.Address, data []byte, gas, value *big.Int) ([]byte, error) - // Same as CallCode except sender and value is propagated from parent to child scope - DelegateCall(env *EVM, me ContractRef, addr common.Address, data []byte, gas *big.Int) ([]byte, error) - // Create a new contract - Create(env *EVM, me ContractRef, data []byte, gas, value *big.Int) ([]byte, common.Address, error) -} diff --git a/x/evm/vm/interpreter.go b/x/evm/vm/interpreter.go deleted file mode 100644 index 9d6ab0af..00000000 --- a/x/evm/vm/interpreter.go +++ /dev/null @@ -1,258 +0,0 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. -// -// The go-ethereum library is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// The go-ethereum library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . - -package vm - -import ( - "hash" - - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/math" - "github.com/ethereum/go-ethereum/log" -) - -// Config are the configuration options for the Interpreter -type Config struct { - Debug bool // Enables debugging - Tracer EVMLogger // Opcode logger - NoBaseFee bool // Forces the EIP-1559 baseFee to 0 (needed for 0 price calls) - EnablePreimageRecording bool // Enables recording of SHA3/keccak preimages - - JumpTable *JumpTable // EVM instruction table, automatically populated if unset - - ExtraEips []int // Additional EIPS that are to be enabled -} - -// ScopeContext contains the things that are per-call, such as stack and memory, -// but not transients like pc and gas -type ScopeContext struct { - Memory *Memory - Stack *Stack - Contract *Contract -} - -// keccakState wraps sha3.state. In addition to the usual hash methods, it also supports -// Read to get a variable amount of data from the hash state. Read is faster than Sum -// because it doesn't copy the internal state, but also modifies the internal state. -type keccakState interface { - hash.Hash - Read([]byte) (int, error) -} - -// EVMInterpreter represents an EVM interpreter -type EVMInterpreter struct { - evm *EVM - cfg Config - - hasher keccakState // Keccak256 hasher instance shared across opcodes - hasherBuf common.Hash // Keccak256 hasher result array shared aross opcodes - - readOnly bool // Whether to throw on stateful modifications - returnData []byte // Last CALL's return data for subsequent reuse -} - -// NewEVMInterpreter returns a new instance of the Interpreter. -func NewEVMInterpreter(evm *EVM, cfg Config) *EVMInterpreter { - // If jump table was not initialised we set the default one. - if cfg.JumpTable == nil { - switch { - case evm.chainRules.IsMerge: - cfg.JumpTable = &mergeInstructionSet - case evm.chainRules.IsLondon: - cfg.JumpTable = &londonInstructionSet - case evm.chainRules.IsBerlin: - cfg.JumpTable = &berlinInstructionSet - case evm.chainRules.IsIstanbul: - cfg.JumpTable = &istanbulInstructionSet - case evm.chainRules.IsConstantinople: - cfg.JumpTable = &constantinopleInstructionSet - case evm.chainRules.IsByzantium: - cfg.JumpTable = &byzantiumInstructionSet - case evm.chainRules.IsEIP158: - cfg.JumpTable = &spuriousDragonInstructionSet - case evm.chainRules.IsEIP150: - cfg.JumpTable = &tangerineWhistleInstructionSet - case evm.chainRules.IsHomestead: - cfg.JumpTable = &homesteadInstructionSet - default: - cfg.JumpTable = &frontierInstructionSet - } - for i, eip := range cfg.ExtraEips { - copy := *cfg.JumpTable - if err := EnableEIP(eip, ©); err != nil { - // Disable it, so caller can check if it's activated or not - cfg.ExtraEips = append(cfg.ExtraEips[:i], cfg.ExtraEips[i+1:]...) - log.Error("EIP activation failed", "eip", eip, "error", err) - } - cfg.JumpTable = © - } - } - - // stratos keeper jump table update - jt := newKeeperInstructionSet(*cfg.JumpTable) - cfg.JumpTable = &jt - - return &EVMInterpreter{ - evm: evm, - cfg: cfg, - } -} - -// Run loops and evaluates the contract's code with the given input data and returns -// the return byte-slice and an error if one occurred. -// -// It's important to note that any errors returned by the interpreter should be -// considered a revert-and-consume-all-gas operation except for -// ErrExecutionReverted which means revert-and-keep-gas-left. -func (in *EVMInterpreter) Run(contract *Contract, input []byte, readOnly bool) (ret []byte, err error) { - // Increment the call depth which is restricted to 1024 - in.evm.depth++ - defer func() { in.evm.depth-- }() - - // Make sure the readOnly is only set if we aren't in readOnly yet. - // This also makes sure that the readOnly flag isn't removed for child calls. - if readOnly && !in.readOnly { - in.readOnly = true - defer func() { in.readOnly = false }() - } - - // Reset the previous call's return data. It's unimportant to preserve the old buffer - // as every returning call will return new data anyway. - in.returnData = nil - - // Don't bother with the execution if there's no code. - if len(contract.Code) == 0 { - return nil, nil - } - - var ( - op OpCode // current opcode - mem = NewMemory() // bound memory - stack = newstack() // local stack - callContext = &ScopeContext{ - Memory: mem, - Stack: stack, - Contract: contract, - } - // For optimisation reason we're using uint64 as the program counter. - // It's theoretically possible to go above 2^64. The YP defines the PC - // to be uint256. Practically much less so feasible. - pc = uint64(0) // program counter - cost uint64 - // copies used by tracer - pcCopy uint64 // needed for the deferred EVMLogger - gasCopy uint64 // for EVMLogger to log gas remaining before execution - logged bool // deferred EVMLogger should ignore already logged steps - res []byte // result of the opcode execution function - ) - // Don't move this deferred function, it's placed before the capturestate-deferred method, - // so that it get's executed _after_: the capturestate needs the stacks before - // they are returned to the pools - defer func() { - returnStack(stack) - }() - contract.Input = input - - if in.cfg.Debug { - defer func() { - if err != nil { - if !logged { - in.cfg.Tracer.CaptureState(pcCopy, op, gasCopy, cost, callContext, in.returnData, in.evm.depth, err) - } else { - in.cfg.Tracer.CaptureFault(pcCopy, op, gasCopy, cost, callContext, in.evm.depth, err) - } - } - }() - } - // The Interpreter main run loop (contextual). This loop runs until either an - // explicit STOP, RETURN or SELFDESTRUCT is executed, an error occurred during - // the execution of one of the operations or until the done flag is set by the - // parent context. - for { - if in.cfg.Debug { - // Capture pre-execution values for tracing. - logged, pcCopy, gasCopy = false, pc, contract.Gas - } - // Get the operation from the jump table and validate the stack to ensure there are - // enough stack items available to perform the operation. - op = contract.GetOp(pc) - operation := wrapWithKeeper(op, in, callContext) - cost = operation.constantGas // For tracing - // Validate stack - if sLen := stack.len(); sLen < operation.minStack { - return nil, &ErrStackUnderflow{stackLen: sLen, required: operation.minStack} - } else if sLen > operation.maxStack { - return nil, &ErrStackOverflow{stackLen: sLen, limit: operation.maxStack} - } - if !contract.UseGas(cost) { - return nil, ErrOutOfGas - } - if operation.dynamicGas != nil { - // All ops with a dynamic memory usage also has a dynamic gas cost. - var memorySize uint64 - // calculate the new memory size and expand the memory to fit - // the operation - // Memory check needs to be done prior to evaluating the dynamic gas portion, - // to detect calculation overflows - if operation.memorySize != nil { - memSize, overflow := operation.memorySize(stack) - if overflow { - return nil, ErrGasUintOverflow - } - // memory is expanded in words of 32 bytes. Gas - // is also calculated in words. - if memorySize, overflow = math.SafeMul(toWordSize(memSize), 32); overflow { - return nil, ErrGasUintOverflow - } - } - // Consume the gas and return an error if not enough gas is available. - // cost is explicitly set so that the capture state defer method can get the proper cost - var dynamicCost uint64 - dynamicCost, err = operation.dynamicGas(in.evm, contract, stack, mem, memorySize) - cost += dynamicCost // for tracing - if err != nil || !contract.UseGas(dynamicCost) { - return nil, ErrOutOfGas - } - // Do tracing before memory expansion - if in.cfg.Debug { - in.cfg.Tracer.CaptureState(pc, op, gasCopy, cost, callContext, in.returnData, in.evm.depth, err) - logged = true - } - if memorySize > 0 { - mem.Resize(memorySize) - } - } else if in.cfg.Debug { - in.cfg.Tracer.CaptureState(pc, op, gasCopy, cost, callContext, in.returnData, in.evm.depth, err) - logged = true - } - // execute the operation - res, err = operation.execute(&pc, in, callContext) - if err != nil { - break - } - pc++ - } - - if err == errStopToken { - err = nil // clear stop token error - } - - return res, err -} - -func (in *EVMInterpreter) getOperation(opCode OpCode) *operation { - return in.cfg.JumpTable[opCode] -} diff --git a/x/evm/vm/jump_table.go b/x/evm/vm/jump_table.go deleted file mode 100644 index e6d0b6d5..00000000 --- a/x/evm/vm/jump_table.go +++ /dev/null @@ -1,1062 +0,0 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. -// -// The go-ethereum library is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// The go-ethereum library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . - -package vm - -import ( - "fmt" - - "github.com/ethereum/go-ethereum/params" -) - -type ( - executionFunc func(pc *uint64, interpreter *EVMInterpreter, callContext *ScopeContext) ([]byte, error) - gasFunc func(*EVM, *Contract, *Stack, *Memory, uint64) (uint64, error) // last parameter is the requested memory size as a uint64 - // memorySizeFunc returns the required size, and whether the operation overflowed a uint64 - memorySizeFunc func(*Stack) (size uint64, overflow bool) -) - -type operation struct { - // execute is the operation function - execute executionFunc - constantGas uint64 - dynamicGas gasFunc - // minStack tells how many stack items are required - minStack int - // maxStack specifies the max length the stack can have for this operation - // to not overflow the stack. - maxStack int - - // memorySize returns the memory size required for the operation - memorySize memorySizeFunc -} - -var ( - frontierInstructionSet = newFrontierInstructionSet() - homesteadInstructionSet = newHomesteadInstructionSet() - tangerineWhistleInstructionSet = newTangerineWhistleInstructionSet() - spuriousDragonInstructionSet = newSpuriousDragonInstructionSet() - byzantiumInstructionSet = newByzantiumInstructionSet() - constantinopleInstructionSet = newConstantinopleInstructionSet() - istanbulInstructionSet = newIstanbulInstructionSet() - berlinInstructionSet = newBerlinInstructionSet() - londonInstructionSet = newLondonInstructionSet() - mergeInstructionSet = newMergeInstructionSet() -) - -// JumpTable contains the EVM opcodes supported at a given fork. -type JumpTable [256]*operation - -func validate(jt JumpTable) JumpTable { - for i, op := range jt { - if op == nil { - panic(fmt.Sprintf("op %#x is not set", i)) - } - // The interpreter has an assumption that if the memorySize function is - // set, then the dynamicGas function is also set. This is a somewhat - // arbitrary assumption, and can be removed if we need to -- but it - // allows us to avoid a condition check. As long as we have that assumption - // in there, this little sanity check prevents us from merging in a - // change which violates it. - if op.memorySize != nil && op.dynamicGas == nil { - panic(fmt.Sprintf("op %v has dynamic memory but not dynamic gas", OpCode(i).String())) - } - } - return jt -} - -func newMergeInstructionSet() JumpTable { - instructionSet := newLondonInstructionSet() - instructionSet[RANDOM] = &operation{ - execute: opRandom, - constantGas: GasQuickStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - } - return validate(instructionSet) -} - -// newLondonInstructionSet returns the frontier, homestead, byzantium, -// contantinople, istanbul, petersburg, berlin and london instructions. -func newLondonInstructionSet() JumpTable { - instructionSet := newBerlinInstructionSet() - enable3529(&instructionSet) // EIP-3529: Reduction in refunds https://eips.ethereum.org/EIPS/eip-3529 - enable3198(&instructionSet) // Base fee opcode https://eips.ethereum.org/EIPS/eip-3198 - return validate(instructionSet) -} - -// newBerlinInstructionSet returns the frontier, homestead, byzantium, -// contantinople, istanbul, petersburg and berlin instructions. -func newBerlinInstructionSet() JumpTable { - instructionSet := newIstanbulInstructionSet() - enable2929(&instructionSet) // Access lists for trie accesses https://eips.ethereum.org/EIPS/eip-2929 - return validate(instructionSet) -} - -// newIstanbulInstructionSet returns the frontier, homestead, byzantium, -// contantinople, istanbul and petersburg instructions. -func newIstanbulInstructionSet() JumpTable { - instructionSet := newConstantinopleInstructionSet() - - enable1344(&instructionSet) // ChainID opcode - https://eips.ethereum.org/EIPS/eip-1344 - enable1884(&instructionSet) // Reprice reader opcodes - https://eips.ethereum.org/EIPS/eip-1884 - enable2200(&instructionSet) // Net metered SSTORE - https://eips.ethereum.org/EIPS/eip-2200 - - return validate(instructionSet) -} - -// newConstantinopleInstructionSet returns the frontier, homestead, -// byzantium and contantinople instructions. -func newConstantinopleInstructionSet() JumpTable { - instructionSet := newByzantiumInstructionSet() - instructionSet[SHL] = &operation{ - execute: opSHL, - constantGas: GasFastestStep, - minStack: minStack(2, 1), - maxStack: maxStack(2, 1), - } - instructionSet[SHR] = &operation{ - execute: opSHR, - constantGas: GasFastestStep, - minStack: minStack(2, 1), - maxStack: maxStack(2, 1), - } - instructionSet[SAR] = &operation{ - execute: opSAR, - constantGas: GasFastestStep, - minStack: minStack(2, 1), - maxStack: maxStack(2, 1), - } - instructionSet[EXTCODEHASH] = &operation{ - execute: opExtCodeHash, - constantGas: params.ExtcodeHashGasConstantinople, - minStack: minStack(1, 1), - maxStack: maxStack(1, 1), - } - instructionSet[CREATE2] = &operation{ - execute: opCreate2, - constantGas: params.Create2Gas, - dynamicGas: gasCreate2, - minStack: minStack(4, 1), - maxStack: maxStack(4, 1), - memorySize: memoryCreate2, - } - return validate(instructionSet) -} - -// newByzantiumInstructionSet returns the frontier, homestead and -// byzantium instructions. -func newByzantiumInstructionSet() JumpTable { - instructionSet := newSpuriousDragonInstructionSet() - instructionSet[STATICCALL] = &operation{ - execute: opStaticCall, - constantGas: params.CallGasEIP150, - dynamicGas: gasStaticCall, - minStack: minStack(6, 1), - maxStack: maxStack(6, 1), - memorySize: memoryStaticCall, - } - instructionSet[RETURNDATASIZE] = &operation{ - execute: opReturnDataSize, - constantGas: GasQuickStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - } - instructionSet[RETURNDATACOPY] = &operation{ - execute: opReturnDataCopy, - constantGas: GasFastestStep, - dynamicGas: gasReturnDataCopy, - minStack: minStack(3, 0), - maxStack: maxStack(3, 0), - memorySize: memoryReturnDataCopy, - } - instructionSet[REVERT] = &operation{ - execute: opRevert, - dynamicGas: gasRevert, - minStack: minStack(2, 0), - maxStack: maxStack(2, 0), - memorySize: memoryRevert, - } - return validate(instructionSet) -} - -// EIP 158 a.k.a Spurious Dragon -func newSpuriousDragonInstructionSet() JumpTable { - instructionSet := newTangerineWhistleInstructionSet() - instructionSet[EXP].dynamicGas = gasExpEIP158 - return validate(instructionSet) -} - -// EIP 150 a.k.a Tangerine Whistle -func newTangerineWhistleInstructionSet() JumpTable { - instructionSet := newHomesteadInstructionSet() - instructionSet[BALANCE].constantGas = params.BalanceGasEIP150 - instructionSet[EXTCODESIZE].constantGas = params.ExtcodeSizeGasEIP150 - instructionSet[SLOAD].constantGas = params.SloadGasEIP150 - instructionSet[EXTCODECOPY].constantGas = params.ExtcodeCopyBaseEIP150 - instructionSet[CALL].constantGas = params.CallGasEIP150 - instructionSet[CALLCODE].constantGas = params.CallGasEIP150 - instructionSet[DELEGATECALL].constantGas = params.CallGasEIP150 - return validate(instructionSet) -} - -// newHomesteadInstructionSet returns the frontier and homestead -// instructions that can be executed during the homestead phase. -func newHomesteadInstructionSet() JumpTable { - instructionSet := newFrontierInstructionSet() - instructionSet[DELEGATECALL] = &operation{ - execute: opDelegateCall, - dynamicGas: gasDelegateCall, - constantGas: params.CallGasFrontier, - minStack: minStack(6, 1), - maxStack: maxStack(6, 1), - memorySize: memoryDelegateCall, - } - return validate(instructionSet) -} - -// newFrontierInstructionSet returns the frontier instructions -// that can be executed during the frontier phase. -func newFrontierInstructionSet() JumpTable { - tbl := JumpTable{ - STOP: { - execute: opStop, - constantGas: 0, - minStack: minStack(0, 0), - maxStack: maxStack(0, 0), - }, - ADD: { - execute: opAdd, - constantGas: GasFastestStep, - minStack: minStack(2, 1), - maxStack: maxStack(2, 1), - }, - MUL: { - execute: opMul, - constantGas: GasFastStep, - minStack: minStack(2, 1), - maxStack: maxStack(2, 1), - }, - SUB: { - execute: opSub, - constantGas: GasFastestStep, - minStack: minStack(2, 1), - maxStack: maxStack(2, 1), - }, - DIV: { - execute: opDiv, - constantGas: GasFastStep, - minStack: minStack(2, 1), - maxStack: maxStack(2, 1), - }, - SDIV: { - execute: opSdiv, - constantGas: GasFastStep, - minStack: minStack(2, 1), - maxStack: maxStack(2, 1), - }, - MOD: { - execute: opMod, - constantGas: GasFastStep, - minStack: minStack(2, 1), - maxStack: maxStack(2, 1), - }, - SMOD: { - execute: opSmod, - constantGas: GasFastStep, - minStack: minStack(2, 1), - maxStack: maxStack(2, 1), - }, - ADDMOD: { - execute: opAddmod, - constantGas: GasMidStep, - minStack: minStack(3, 1), - maxStack: maxStack(3, 1), - }, - MULMOD: { - execute: opMulmod, - constantGas: GasMidStep, - minStack: minStack(3, 1), - maxStack: maxStack(3, 1), - }, - EXP: { - execute: opExp, - dynamicGas: gasExpFrontier, - minStack: minStack(2, 1), - maxStack: maxStack(2, 1), - }, - SIGNEXTEND: { - execute: opSignExtend, - constantGas: GasFastStep, - minStack: minStack(2, 1), - maxStack: maxStack(2, 1), - }, - LT: { - execute: opLt, - constantGas: GasFastestStep, - minStack: minStack(2, 1), - maxStack: maxStack(2, 1), - }, - GT: { - execute: opGt, - constantGas: GasFastestStep, - minStack: minStack(2, 1), - maxStack: maxStack(2, 1), - }, - SLT: { - execute: opSlt, - constantGas: GasFastestStep, - minStack: minStack(2, 1), - maxStack: maxStack(2, 1), - }, - SGT: { - execute: opSgt, - constantGas: GasFastestStep, - minStack: minStack(2, 1), - maxStack: maxStack(2, 1), - }, - EQ: { - execute: opEq, - constantGas: GasFastestStep, - minStack: minStack(2, 1), - maxStack: maxStack(2, 1), - }, - ISZERO: { - execute: opIszero, - constantGas: GasFastestStep, - minStack: minStack(1, 1), - maxStack: maxStack(1, 1), - }, - AND: { - execute: opAnd, - constantGas: GasFastestStep, - minStack: minStack(2, 1), - maxStack: maxStack(2, 1), - }, - XOR: { - execute: opXor, - constantGas: GasFastestStep, - minStack: minStack(2, 1), - maxStack: maxStack(2, 1), - }, - OR: { - execute: opOr, - constantGas: GasFastestStep, - minStack: minStack(2, 1), - maxStack: maxStack(2, 1), - }, - NOT: { - execute: opNot, - constantGas: GasFastestStep, - minStack: minStack(1, 1), - maxStack: maxStack(1, 1), - }, - BYTE: { - execute: opByte, - constantGas: GasFastestStep, - minStack: minStack(2, 1), - maxStack: maxStack(2, 1), - }, - KECCAK256: { - execute: opKeccak256, - constantGas: params.Keccak256Gas, - dynamicGas: gasKeccak256, - minStack: minStack(2, 1), - maxStack: maxStack(2, 1), - memorySize: memoryKeccak256, - }, - ADDRESS: { - execute: opAddress, - constantGas: GasQuickStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - BALANCE: { - execute: opBalance, - constantGas: params.BalanceGasFrontier, - minStack: minStack(1, 1), - maxStack: maxStack(1, 1), - }, - ORIGIN: { - execute: opOrigin, - constantGas: GasQuickStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - CALLER: { - execute: opCaller, - constantGas: GasQuickStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - CALLVALUE: { - execute: opCallValue, - constantGas: GasQuickStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - CALLDATALOAD: { - execute: opCallDataLoad, - constantGas: GasFastestStep, - minStack: minStack(1, 1), - maxStack: maxStack(1, 1), - }, - CALLDATASIZE: { - execute: opCallDataSize, - constantGas: GasQuickStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - CALLDATACOPY: { - execute: opCallDataCopy, - constantGas: GasFastestStep, - dynamicGas: gasCallDataCopy, - minStack: minStack(3, 0), - maxStack: maxStack(3, 0), - memorySize: memoryCallDataCopy, - }, - CODESIZE: { - execute: opCodeSize, - constantGas: GasQuickStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - CODECOPY: { - execute: opCodeCopy, - constantGas: GasFastestStep, - dynamicGas: gasCodeCopy, - minStack: minStack(3, 0), - maxStack: maxStack(3, 0), - memorySize: memoryCodeCopy, - }, - GASPRICE: { - execute: opGasprice, - constantGas: GasQuickStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - EXTCODESIZE: { - execute: opExtCodeSize, - constantGas: params.ExtcodeSizeGasFrontier, - minStack: minStack(1, 1), - maxStack: maxStack(1, 1), - }, - EXTCODECOPY: { - execute: opExtCodeCopy, - constantGas: params.ExtcodeCopyBaseFrontier, - dynamicGas: gasExtCodeCopy, - minStack: minStack(4, 0), - maxStack: maxStack(4, 0), - memorySize: memoryExtCodeCopy, - }, - BLOCKHASH: { - execute: opBlockhash, - constantGas: GasExtStep, - minStack: minStack(1, 1), - maxStack: maxStack(1, 1), - }, - COINBASE: { - execute: opCoinbase, - constantGas: GasQuickStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - TIMESTAMP: { - execute: opTimestamp, - constantGas: GasQuickStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - NUMBER: { - execute: opNumber, - constantGas: GasQuickStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - DIFFICULTY: { - execute: opDifficulty, - constantGas: GasQuickStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - GASLIMIT: { - execute: opGasLimit, - constantGas: GasQuickStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - POP: { - execute: opPop, - constantGas: GasQuickStep, - minStack: minStack(1, 0), - maxStack: maxStack(1, 0), - }, - MLOAD: { - execute: opMload, - constantGas: GasFastestStep, - dynamicGas: gasMLoad, - minStack: minStack(1, 1), - maxStack: maxStack(1, 1), - memorySize: memoryMLoad, - }, - MSTORE: { - execute: opMstore, - constantGas: GasFastestStep, - dynamicGas: gasMStore, - minStack: minStack(2, 0), - maxStack: maxStack(2, 0), - memorySize: memoryMStore, - }, - MSTORE8: { - execute: opMstore8, - constantGas: GasFastestStep, - dynamicGas: gasMStore8, - memorySize: memoryMStore8, - minStack: minStack(2, 0), - maxStack: maxStack(2, 0), - }, - SLOAD: { - execute: opSload, - constantGas: params.SloadGasFrontier, - minStack: minStack(1, 1), - maxStack: maxStack(1, 1), - }, - SSTORE: { - execute: opSstore, - dynamicGas: gasSStore, - minStack: minStack(2, 0), - maxStack: maxStack(2, 0), - }, - JUMP: { - execute: opJump, - constantGas: GasMidStep, - minStack: minStack(1, 0), - maxStack: maxStack(1, 0), - }, - JUMPI: { - execute: opJumpi, - constantGas: GasSlowStep, - minStack: minStack(2, 0), - maxStack: maxStack(2, 0), - }, - PC: { - execute: opPc, - constantGas: GasQuickStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - MSIZE: { - execute: opMsize, - constantGas: GasQuickStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - GAS: { - execute: opGas, - constantGas: GasQuickStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - JUMPDEST: { - execute: opJumpdest, - constantGas: params.JumpdestGas, - minStack: minStack(0, 0), - maxStack: maxStack(0, 0), - }, - PUSH1: { - execute: opPush1, - constantGas: GasFastestStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - PUSH2: { - execute: makePush(2, 2), - constantGas: GasFastestStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - PUSH3: { - execute: makePush(3, 3), - constantGas: GasFastestStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - PUSH4: { - execute: makePush(4, 4), - constantGas: GasFastestStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - PUSH5: { - execute: makePush(5, 5), - constantGas: GasFastestStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - PUSH6: { - execute: makePush(6, 6), - constantGas: GasFastestStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - PUSH7: { - execute: makePush(7, 7), - constantGas: GasFastestStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - PUSH8: { - execute: makePush(8, 8), - constantGas: GasFastestStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - PUSH9: { - execute: makePush(9, 9), - constantGas: GasFastestStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - PUSH10: { - execute: makePush(10, 10), - constantGas: GasFastestStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - PUSH11: { - execute: makePush(11, 11), - constantGas: GasFastestStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - PUSH12: { - execute: makePush(12, 12), - constantGas: GasFastestStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - PUSH13: { - execute: makePush(13, 13), - constantGas: GasFastestStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - PUSH14: { - execute: makePush(14, 14), - constantGas: GasFastestStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - PUSH15: { - execute: makePush(15, 15), - constantGas: GasFastestStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - PUSH16: { - execute: makePush(16, 16), - constantGas: GasFastestStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - PUSH17: { - execute: makePush(17, 17), - constantGas: GasFastestStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - PUSH18: { - execute: makePush(18, 18), - constantGas: GasFastestStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - PUSH19: { - execute: makePush(19, 19), - constantGas: GasFastestStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - PUSH20: { - execute: makePush(20, 20), - constantGas: GasFastestStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - PUSH21: { - execute: makePush(21, 21), - constantGas: GasFastestStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - PUSH22: { - execute: makePush(22, 22), - constantGas: GasFastestStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - PUSH23: { - execute: makePush(23, 23), - constantGas: GasFastestStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - PUSH24: { - execute: makePush(24, 24), - constantGas: GasFastestStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - PUSH25: { - execute: makePush(25, 25), - constantGas: GasFastestStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - PUSH26: { - execute: makePush(26, 26), - constantGas: GasFastestStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - PUSH27: { - execute: makePush(27, 27), - constantGas: GasFastestStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - PUSH28: { - execute: makePush(28, 28), - constantGas: GasFastestStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - PUSH29: { - execute: makePush(29, 29), - constantGas: GasFastestStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - PUSH30: { - execute: makePush(30, 30), - constantGas: GasFastestStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - PUSH31: { - execute: makePush(31, 31), - constantGas: GasFastestStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - PUSH32: { - execute: makePush(32, 32), - constantGas: GasFastestStep, - minStack: minStack(0, 1), - maxStack: maxStack(0, 1), - }, - DUP1: { - execute: makeDup(1), - constantGas: GasFastestStep, - minStack: minDupStack(1), - maxStack: maxDupStack(1), - }, - DUP2: { - execute: makeDup(2), - constantGas: GasFastestStep, - minStack: minDupStack(2), - maxStack: maxDupStack(2), - }, - DUP3: { - execute: makeDup(3), - constantGas: GasFastestStep, - minStack: minDupStack(3), - maxStack: maxDupStack(3), - }, - DUP4: { - execute: makeDup(4), - constantGas: GasFastestStep, - minStack: minDupStack(4), - maxStack: maxDupStack(4), - }, - DUP5: { - execute: makeDup(5), - constantGas: GasFastestStep, - minStack: minDupStack(5), - maxStack: maxDupStack(5), - }, - DUP6: { - execute: makeDup(6), - constantGas: GasFastestStep, - minStack: minDupStack(6), - maxStack: maxDupStack(6), - }, - DUP7: { - execute: makeDup(7), - constantGas: GasFastestStep, - minStack: minDupStack(7), - maxStack: maxDupStack(7), - }, - DUP8: { - execute: makeDup(8), - constantGas: GasFastestStep, - minStack: minDupStack(8), - maxStack: maxDupStack(8), - }, - DUP9: { - execute: makeDup(9), - constantGas: GasFastestStep, - minStack: minDupStack(9), - maxStack: maxDupStack(9), - }, - DUP10: { - execute: makeDup(10), - constantGas: GasFastestStep, - minStack: minDupStack(10), - maxStack: maxDupStack(10), - }, - DUP11: { - execute: makeDup(11), - constantGas: GasFastestStep, - minStack: minDupStack(11), - maxStack: maxDupStack(11), - }, - DUP12: { - execute: makeDup(12), - constantGas: GasFastestStep, - minStack: minDupStack(12), - maxStack: maxDupStack(12), - }, - DUP13: { - execute: makeDup(13), - constantGas: GasFastestStep, - minStack: minDupStack(13), - maxStack: maxDupStack(13), - }, - DUP14: { - execute: makeDup(14), - constantGas: GasFastestStep, - minStack: minDupStack(14), - maxStack: maxDupStack(14), - }, - DUP15: { - execute: makeDup(15), - constantGas: GasFastestStep, - minStack: minDupStack(15), - maxStack: maxDupStack(15), - }, - DUP16: { - execute: makeDup(16), - constantGas: GasFastestStep, - minStack: minDupStack(16), - maxStack: maxDupStack(16), - }, - SWAP1: { - execute: makeSwap(1), - constantGas: GasFastestStep, - minStack: minSwapStack(2), - maxStack: maxSwapStack(2), - }, - SWAP2: { - execute: makeSwap(2), - constantGas: GasFastestStep, - minStack: minSwapStack(3), - maxStack: maxSwapStack(3), - }, - SWAP3: { - execute: makeSwap(3), - constantGas: GasFastestStep, - minStack: minSwapStack(4), - maxStack: maxSwapStack(4), - }, - SWAP4: { - execute: makeSwap(4), - constantGas: GasFastestStep, - minStack: minSwapStack(5), - maxStack: maxSwapStack(5), - }, - SWAP5: { - execute: makeSwap(5), - constantGas: GasFastestStep, - minStack: minSwapStack(6), - maxStack: maxSwapStack(6), - }, - SWAP6: { - execute: makeSwap(6), - constantGas: GasFastestStep, - minStack: minSwapStack(7), - maxStack: maxSwapStack(7), - }, - SWAP7: { - execute: makeSwap(7), - constantGas: GasFastestStep, - minStack: minSwapStack(8), - maxStack: maxSwapStack(8), - }, - SWAP8: { - execute: makeSwap(8), - constantGas: GasFastestStep, - minStack: minSwapStack(9), - maxStack: maxSwapStack(9), - }, - SWAP9: { - execute: makeSwap(9), - constantGas: GasFastestStep, - minStack: minSwapStack(10), - maxStack: maxSwapStack(10), - }, - SWAP10: { - execute: makeSwap(10), - constantGas: GasFastestStep, - minStack: minSwapStack(11), - maxStack: maxSwapStack(11), - }, - SWAP11: { - execute: makeSwap(11), - constantGas: GasFastestStep, - minStack: minSwapStack(12), - maxStack: maxSwapStack(12), - }, - SWAP12: { - execute: makeSwap(12), - constantGas: GasFastestStep, - minStack: minSwapStack(13), - maxStack: maxSwapStack(13), - }, - SWAP13: { - execute: makeSwap(13), - constantGas: GasFastestStep, - minStack: minSwapStack(14), - maxStack: maxSwapStack(14), - }, - SWAP14: { - execute: makeSwap(14), - constantGas: GasFastestStep, - minStack: minSwapStack(15), - maxStack: maxSwapStack(15), - }, - SWAP15: { - execute: makeSwap(15), - constantGas: GasFastestStep, - minStack: minSwapStack(16), - maxStack: maxSwapStack(16), - }, - SWAP16: { - execute: makeSwap(16), - constantGas: GasFastestStep, - minStack: minSwapStack(17), - maxStack: maxSwapStack(17), - }, - LOG0: { - execute: makeLog(0), - dynamicGas: makeGasLog(0), - minStack: minStack(2, 0), - maxStack: maxStack(2, 0), - memorySize: memoryLog, - }, - LOG1: { - execute: makeLog(1), - dynamicGas: makeGasLog(1), - minStack: minStack(3, 0), - maxStack: maxStack(3, 0), - memorySize: memoryLog, - }, - LOG2: { - execute: makeLog(2), - dynamicGas: makeGasLog(2), - minStack: minStack(4, 0), - maxStack: maxStack(4, 0), - memorySize: memoryLog, - }, - LOG3: { - execute: makeLog(3), - dynamicGas: makeGasLog(3), - minStack: minStack(5, 0), - maxStack: maxStack(5, 0), - memorySize: memoryLog, - }, - LOG4: { - execute: makeLog(4), - dynamicGas: makeGasLog(4), - minStack: minStack(6, 0), - maxStack: maxStack(6, 0), - memorySize: memoryLog, - }, - CREATE: { - execute: opCreate, - constantGas: params.CreateGas, - dynamicGas: gasCreate, - minStack: minStack(3, 1), - maxStack: maxStack(3, 1), - memorySize: memoryCreate, - }, - CALL: { - execute: opCall, - constantGas: params.CallGasFrontier, - dynamicGas: gasCall, - minStack: minStack(7, 1), - maxStack: maxStack(7, 1), - memorySize: memoryCall, - }, - CALLCODE: { - execute: opCallCode, - constantGas: params.CallGasFrontier, - dynamicGas: gasCallCode, - minStack: minStack(7, 1), - maxStack: maxStack(7, 1), - memorySize: memoryCall, - }, - RETURN: { - execute: opReturn, - dynamicGas: gasReturn, - minStack: minStack(2, 0), - maxStack: maxStack(2, 0), - memorySize: memoryReturn, - }, - SELFDESTRUCT: { - execute: opSelfdestruct, - dynamicGas: gasSelfdestruct, - minStack: minStack(1, 0), - maxStack: maxStack(1, 0), - }, - } - - // Fill all unassigned slots with opUndefined. - for i, entry := range tbl { - if entry == nil { - tbl[i] = &operation{execute: opUndefined, maxStack: maxStack(0, 0)} - } - } - - return validate(tbl) -} - -// newKeeperInstructionSet returns an updated instructions with modified "call" call for -// custom stratos execution -// NOTE: Maybe we should make on our specific update, instead of apply on go-ethereum update -// see a top lines with instructions sets -func newKeeperInstructionSet(instructionSet JumpTable) JumpTable { - instructionSet[PREPAY] = &operation{ - execute: opPrepay, - constantGas: CallGasPrepay, - dynamicGas: gasPrepay, - minStack: minStack(6, 1), - maxStack: maxStack(6, 1), - memorySize: memoryPrepay, - } - - return validate(instructionSet) -} diff --git a/x/evm/vm/keeper_amplifier.go b/x/evm/vm/keeper_amplifier.go deleted file mode 100644 index 28f0ac9d..00000000 --- a/x/evm/vm/keeper_amplifier.go +++ /dev/null @@ -1,28 +0,0 @@ -package vm - -var handlerNumToOpcode = map[int64]OpCode{ - 0xf1: PREPAY, -} - -func wrapWithKeeper(op OpCode, interpreter *EVMInterpreter, scope *ScopeContext) *operation { - // only CALL for solpatching - if op != CALL { - return interpreter.getOperation(op) - } - - stack := scope.Stack - addr := stack.Back(1) - opKey := addr.ToBig().Int64() - - // determine opcode with reserved address for amplification - opToOverride, ok := handlerNumToOpcode[opKey] - if !ok { - return interpreter.getOperation(op) - } - - // swaping callGasTemp with addr and replace with gas to decrase params - stack.swap(2) - stack.pop() - - return interpreter.getOperation(opToOverride) -} diff --git a/x/evm/vm/logger.go b/x/evm/vm/logger.go deleted file mode 100644 index 50fccafc..00000000 --- a/x/evm/vm/logger.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. -// -// The go-ethereum library is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// The go-ethereum library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . - -package vm - -import ( - "math/big" - "time" - - "github.com/ethereum/go-ethereum/common" -) - -// EVMLogger is used to collect execution traces from an EVM transaction -// execution. CaptureState is called for each step of the VM with the -// current VM state. -// Note that reference types are actual VM data structures; make copies -// if you need to retain them beyond the current call. -type EVMLogger interface { - // Transaction level - CaptureTxStart(gasLimit uint64) - CaptureTxEnd(restGas uint64) - // Top call frame - CaptureStart(env *EVM, from common.Address, to common.Address, create bool, input []byte, gas uint64, value *big.Int) - CaptureEnd(output []byte, gasUsed uint64, t time.Duration, err error) - // Rest of call frames - CaptureEnter(typ OpCode, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) - CaptureExit(output []byte, gasUsed uint64, err error) - // Opcode level - CaptureState(pc uint64, op OpCode, gas, cost uint64, scope *ScopeContext, rData []byte, depth int, err error) - CaptureFault(pc uint64, op OpCode, gas, cost uint64, scope *ScopeContext, depth int, err error) -} diff --git a/x/evm/vm/memory.go b/x/evm/vm/memory.go deleted file mode 100644 index 35b72999..00000000 --- a/x/evm/vm/memory.go +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright 2015 The go-ethereum Authors -// This file is part of the go-ethereum library. -// -// The go-ethereum library is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// The go-ethereum library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . - -package vm - -import ( - "github.com/holiman/uint256" -) - -// Memory implements a simple memory model for the ethereum virtual machine. -type Memory struct { - store []byte - lastGasCost uint64 -} - -// NewMemory returns a new memory model. -func NewMemory() *Memory { - return &Memory{} -} - -// Set sets offset + size to value -func (m *Memory) Set(offset, size uint64, value []byte) { - // It's possible the offset is greater than 0 and size equals 0. This is because - // the calcMemSize (common.go) could potentially return 0 when size is zero (NO-OP) - if size > 0 { - // length of store may never be less than offset + size. - // The store should be resized PRIOR to setting the memory - if offset+size > uint64(len(m.store)) { - panic("invalid memory: store empty") - } - copy(m.store[offset:offset+size], value) - } -} - -// Set32 sets the 32 bytes starting at offset to the value of val, left-padded with zeroes to -// 32 bytes. -func (m *Memory) Set32(offset uint64, val *uint256.Int) { - // length of store may never be less than offset + size. - // The store should be resized PRIOR to setting the memory - if offset+32 > uint64(len(m.store)) { - panic("invalid memory: store empty") - } - // Fill in relevant bits - b32 := val.Bytes32() - copy(m.store[offset:], b32[:]) -} - -// Resize resizes the memory to size -func (m *Memory) Resize(size uint64) { - if uint64(m.Len()) < size { - m.store = append(m.store, make([]byte, size-uint64(m.Len()))...) - } -} - -// GetCopy returns offset + size as a new slice -func (m *Memory) GetCopy(offset, size int64) (cpy []byte) { - if size == 0 { - return nil - } - - if len(m.store) > int(offset) { - cpy = make([]byte, size) - copy(cpy, m.store[offset:offset+size]) - - return - } - - return -} - -// GetPtr returns the offset + size -func (m *Memory) GetPtr(offset, size int64) []byte { - if size == 0 { - return nil - } - - if len(m.store) > int(offset) { - return m.store[offset : offset+size] - } - - return nil -} - -// Len returns the length of the backing slice -func (m *Memory) Len() int { - return len(m.store) -} - -// Data returns the backing slice -func (m *Memory) Data() []byte { - return m.store -} diff --git a/x/evm/vm/memory_table.go b/x/evm/vm/memory_table.go deleted file mode 100644 index 0769e88e..00000000 --- a/x/evm/vm/memory_table.go +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright 2017 The go-ethereum Authors -// This file is part of the go-ethereum library. -// -// The go-ethereum library is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// The go-ethereum library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . - -package vm - -func memoryKeccak256(stack *Stack) (uint64, bool) { - return calcMemSize64(stack.Back(0), stack.Back(1)) -} - -func memoryCallDataCopy(stack *Stack) (uint64, bool) { - return calcMemSize64(stack.Back(0), stack.Back(2)) -} - -func memoryReturnDataCopy(stack *Stack) (uint64, bool) { - return calcMemSize64(stack.Back(0), stack.Back(2)) -} - -func memoryCodeCopy(stack *Stack) (uint64, bool) { - return calcMemSize64(stack.Back(0), stack.Back(2)) -} - -func memoryExtCodeCopy(stack *Stack) (uint64, bool) { - return calcMemSize64(stack.Back(1), stack.Back(3)) -} - -func memoryMLoad(stack *Stack) (uint64, bool) { - return calcMemSize64WithUint(stack.Back(0), 32) -} - -func memoryMStore8(stack *Stack) (uint64, bool) { - return calcMemSize64WithUint(stack.Back(0), 1) -} - -func memoryMStore(stack *Stack) (uint64, bool) { - return calcMemSize64WithUint(stack.Back(0), 32) -} - -func memoryCreate(stack *Stack) (uint64, bool) { - return calcMemSize64(stack.Back(1), stack.Back(2)) -} - -func memoryCreate2(stack *Stack) (uint64, bool) { - return calcMemSize64(stack.Back(1), stack.Back(2)) -} - -func memoryCall(stack *Stack) (uint64, bool) { - x, overflow := calcMemSize64(stack.Back(5), stack.Back(6)) - if overflow { - return 0, true - } - y, overflow := calcMemSize64(stack.Back(3), stack.Back(4)) - if overflow { - return 0, true - } - if x > y { - return x, false - } - return y, false -} -func memoryDelegateCall(stack *Stack) (uint64, bool) { - x, overflow := calcMemSize64(stack.Back(4), stack.Back(5)) - if overflow { - return 0, true - } - y, overflow := calcMemSize64(stack.Back(2), stack.Back(3)) - if overflow { - return 0, true - } - if x > y { - return x, false - } - return y, false -} - -func memoryStaticCall(stack *Stack) (uint64, bool) { - x, overflow := calcMemSize64(stack.Back(4), stack.Back(5)) - if overflow { - return 0, true - } - y, overflow := calcMemSize64(stack.Back(2), stack.Back(3)) - if overflow { - return 0, true - } - if x > y { - return x, false - } - return y, false -} - -func memoryReturn(stack *Stack) (uint64, bool) { - return calcMemSize64(stack.Back(0), stack.Back(1)) -} - -func memoryRevert(stack *Stack) (uint64, bool) { - return calcMemSize64(stack.Back(0), stack.Back(1)) -} - -func memoryLog(stack *Stack) (uint64, bool) { - return calcMemSize64(stack.Back(0), stack.Back(1)) -} - -func memoryPrepay(stack *Stack) (uint64, bool) { - x, overflow := calcMemSize64(stack.Back(4), stack.Back(5)) - if overflow { - return 0, true - } - y, overflow := calcMemSize64(stack.Back(2), stack.Back(3)) - if overflow { - return 0, true - } - if x > y { - return x, false - } - return y, false -} diff --git a/x/evm/vm/opcodes.go b/x/evm/vm/opcodes.go deleted file mode 100644 index 9caae9d2..00000000 --- a/x/evm/vm/opcodes.go +++ /dev/null @@ -1,562 +0,0 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. -// -// The go-ethereum library is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// The go-ethereum library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . - -package vm - -import ( - "fmt" -) - -// OpCode is an EVM opcode -type OpCode byte - -// IsPush specifies if an opcode is a PUSH opcode. -func (op OpCode) IsPush() bool { - switch op { - case PUSH1, PUSH2, PUSH3, PUSH4, PUSH5, PUSH6, PUSH7, PUSH8, PUSH9, PUSH10, PUSH11, PUSH12, PUSH13, PUSH14, PUSH15, PUSH16, PUSH17, PUSH18, PUSH19, PUSH20, PUSH21, PUSH22, PUSH23, PUSH24, PUSH25, PUSH26, PUSH27, PUSH28, PUSH29, PUSH30, PUSH31, PUSH32: - return true - } - return false -} - -// 0x0 range - arithmetic ops. -const ( - STOP OpCode = 0x0 - ADD OpCode = 0x1 - MUL OpCode = 0x2 - SUB OpCode = 0x3 - DIV OpCode = 0x4 - SDIV OpCode = 0x5 - MOD OpCode = 0x6 - SMOD OpCode = 0x7 - ADDMOD OpCode = 0x8 - MULMOD OpCode = 0x9 - EXP OpCode = 0xa - SIGNEXTEND OpCode = 0xb -) - -// 0x10 range - comparison ops. -const ( - LT OpCode = 0x10 - GT OpCode = 0x11 - SLT OpCode = 0x12 - SGT OpCode = 0x13 - EQ OpCode = 0x14 - ISZERO OpCode = 0x15 - AND OpCode = 0x16 - OR OpCode = 0x17 - XOR OpCode = 0x18 - NOT OpCode = 0x19 - BYTE OpCode = 0x1a - SHL OpCode = 0x1b - SHR OpCode = 0x1c - SAR OpCode = 0x1d -) - -// 0x20 range - crypto. -const ( - KECCAK256 OpCode = 0x20 -) - -// 0x30 range - closure state. -const ( - ADDRESS OpCode = 0x30 - BALANCE OpCode = 0x31 - ORIGIN OpCode = 0x32 - CALLER OpCode = 0x33 - CALLVALUE OpCode = 0x34 - CALLDATALOAD OpCode = 0x35 - CALLDATASIZE OpCode = 0x36 - CALLDATACOPY OpCode = 0x37 - CODESIZE OpCode = 0x38 - CODECOPY OpCode = 0x39 - GASPRICE OpCode = 0x3a - EXTCODESIZE OpCode = 0x3b - EXTCODECOPY OpCode = 0x3c - RETURNDATASIZE OpCode = 0x3d - RETURNDATACOPY OpCode = 0x3e - EXTCODEHASH OpCode = 0x3f -) - -// 0x40 range - block operations. -const ( - BLOCKHASH OpCode = 0x40 - COINBASE OpCode = 0x41 - TIMESTAMP OpCode = 0x42 - NUMBER OpCode = 0x43 - DIFFICULTY OpCode = 0x44 - RANDOM OpCode = 0x44 // Same as DIFFICULTY - GASLIMIT OpCode = 0x45 - CHAINID OpCode = 0x46 - SELFBALANCE OpCode = 0x47 - BASEFEE OpCode = 0x48 -) - -// 0x50 range - 'storage' and execution. -const ( - POP OpCode = 0x50 - MLOAD OpCode = 0x51 - MSTORE OpCode = 0x52 - MSTORE8 OpCode = 0x53 - SLOAD OpCode = 0x54 - SSTORE OpCode = 0x55 - JUMP OpCode = 0x56 - JUMPI OpCode = 0x57 - PC OpCode = 0x58 - MSIZE OpCode = 0x59 - GAS OpCode = 0x5a - JUMPDEST OpCode = 0x5b - PUSH0 OpCode = 0x5f -) - -// 0x60 range - pushes. -const ( - PUSH1 OpCode = 0x60 + iota - PUSH2 - PUSH3 - PUSH4 - PUSH5 - PUSH6 - PUSH7 - PUSH8 - PUSH9 - PUSH10 - PUSH11 - PUSH12 - PUSH13 - PUSH14 - PUSH15 - PUSH16 - PUSH17 - PUSH18 - PUSH19 - PUSH20 - PUSH21 - PUSH22 - PUSH23 - PUSH24 - PUSH25 - PUSH26 - PUSH27 - PUSH28 - PUSH29 - PUSH30 - PUSH31 - PUSH32 -) - -// 0x80 range - dups. -const ( - DUP1 = 0x80 + iota - DUP2 - DUP3 - DUP4 - DUP5 - DUP6 - DUP7 - DUP8 - DUP9 - DUP10 - DUP11 - DUP12 - DUP13 - DUP14 - DUP15 - DUP16 -) - -// 0x90 range - swaps. -const ( - SWAP1 = 0x90 + iota - SWAP2 - SWAP3 - SWAP4 - SWAP5 - SWAP6 - SWAP7 - SWAP8 - SWAP9 - SWAP10 - SWAP11 - SWAP12 - SWAP13 - SWAP14 - SWAP15 - SWAP16 -) - -// 0xa0 range - logging ops. -const ( - LOG0 OpCode = 0xa0 + iota - LOG1 - LOG2 - LOG3 - LOG4 -) - -// 0xdc range - closures. Stratos chain only -const ( - PREPAY OpCode = 0xdc -) - -// 0xf0 range - closures. -const ( - CREATE OpCode = 0xf0 - CALL OpCode = 0xf1 - CALLCODE OpCode = 0xf2 - RETURN OpCode = 0xf3 - DELEGATECALL OpCode = 0xf4 - CREATE2 OpCode = 0xf5 - - STATICCALL OpCode = 0xfa - REVERT OpCode = 0xfd - INVALID OpCode = 0xfe - SELFDESTRUCT OpCode = 0xff -) - -// Since the opcodes aren't all in order we can't use a regular slice. -var opCodeToString = map[OpCode]string{ - // 0x0 range - arithmetic ops. - STOP: "STOP", - ADD: "ADD", - MUL: "MUL", - SUB: "SUB", - DIV: "DIV", - SDIV: "SDIV", - MOD: "MOD", - SMOD: "SMOD", - EXP: "EXP", - NOT: "NOT", - LT: "LT", - GT: "GT", - SLT: "SLT", - SGT: "SGT", - EQ: "EQ", - ISZERO: "ISZERO", - SIGNEXTEND: "SIGNEXTEND", - - // 0x10 range - bit ops. - AND: "AND", - OR: "OR", - XOR: "XOR", - BYTE: "BYTE", - SHL: "SHL", - SHR: "SHR", - SAR: "SAR", - ADDMOD: "ADDMOD", - MULMOD: "MULMOD", - - // 0x20 range - crypto. - KECCAK256: "KECCAK256", - - // 0x30 range - closure state. - ADDRESS: "ADDRESS", - BALANCE: "BALANCE", - ORIGIN: "ORIGIN", - CALLER: "CALLER", - CALLVALUE: "CALLVALUE", - CALLDATALOAD: "CALLDATALOAD", - CALLDATASIZE: "CALLDATASIZE", - CALLDATACOPY: "CALLDATACOPY", - CODESIZE: "CODESIZE", - CODECOPY: "CODECOPY", - GASPRICE: "GASPRICE", - EXTCODESIZE: "EXTCODESIZE", - EXTCODECOPY: "EXTCODECOPY", - RETURNDATASIZE: "RETURNDATASIZE", - RETURNDATACOPY: "RETURNDATACOPY", - EXTCODEHASH: "EXTCODEHASH", - - // 0x40 range - block operations. - BLOCKHASH: "BLOCKHASH", - COINBASE: "COINBASE", - TIMESTAMP: "TIMESTAMP", - NUMBER: "NUMBER", - DIFFICULTY: "DIFFICULTY", // TODO (MariusVanDerWijden) rename to RANDOM post merge - GASLIMIT: "GASLIMIT", - CHAINID: "CHAINID", - SELFBALANCE: "SELFBALANCE", - BASEFEE: "BASEFEE", - - // 0x50 range - 'storage' and execution. - POP: "POP", - //DUP: "DUP", - //SWAP: "SWAP", - MLOAD: "MLOAD", - MSTORE: "MSTORE", - MSTORE8: "MSTORE8", - SLOAD: "SLOAD", - SSTORE: "SSTORE", - JUMP: "JUMP", - JUMPI: "JUMPI", - PC: "PC", - MSIZE: "MSIZE", - GAS: "GAS", - JUMPDEST: "JUMPDEST", - PUSH0: "PUSH0", - - // 0x60 range - push. - PUSH1: "PUSH1", - PUSH2: "PUSH2", - PUSH3: "PUSH3", - PUSH4: "PUSH4", - PUSH5: "PUSH5", - PUSH6: "PUSH6", - PUSH7: "PUSH7", - PUSH8: "PUSH8", - PUSH9: "PUSH9", - PUSH10: "PUSH10", - PUSH11: "PUSH11", - PUSH12: "PUSH12", - PUSH13: "PUSH13", - PUSH14: "PUSH14", - PUSH15: "PUSH15", - PUSH16: "PUSH16", - PUSH17: "PUSH17", - PUSH18: "PUSH18", - PUSH19: "PUSH19", - PUSH20: "PUSH20", - PUSH21: "PUSH21", - PUSH22: "PUSH22", - PUSH23: "PUSH23", - PUSH24: "PUSH24", - PUSH25: "PUSH25", - PUSH26: "PUSH26", - PUSH27: "PUSH27", - PUSH28: "PUSH28", - PUSH29: "PUSH29", - PUSH30: "PUSH30", - PUSH31: "PUSH31", - PUSH32: "PUSH32", - - DUP1: "DUP1", - DUP2: "DUP2", - DUP3: "DUP3", - DUP4: "DUP4", - DUP5: "DUP5", - DUP6: "DUP6", - DUP7: "DUP7", - DUP8: "DUP8", - DUP9: "DUP9", - DUP10: "DUP10", - DUP11: "DUP11", - DUP12: "DUP12", - DUP13: "DUP13", - DUP14: "DUP14", - DUP15: "DUP15", - DUP16: "DUP16", - - SWAP1: "SWAP1", - SWAP2: "SWAP2", - SWAP3: "SWAP3", - SWAP4: "SWAP4", - SWAP5: "SWAP5", - SWAP6: "SWAP6", - SWAP7: "SWAP7", - SWAP8: "SWAP8", - SWAP9: "SWAP9", - SWAP10: "SWAP10", - SWAP11: "SWAP11", - SWAP12: "SWAP12", - SWAP13: "SWAP13", - SWAP14: "SWAP14", - SWAP15: "SWAP15", - SWAP16: "SWAP16", - LOG0: "LOG0", - LOG1: "LOG1", - LOG2: "LOG2", - LOG3: "LOG3", - LOG4: "LOG4", - - // 0xdc range. - PREPAY: "PREPAY", - - // 0xf0 range. - CREATE: "CREATE", - CALL: "CALL", - RETURN: "RETURN", - CALLCODE: "CALLCODE", - DELEGATECALL: "DELEGATECALL", - CREATE2: "CREATE2", - STATICCALL: "STATICCALL", - REVERT: "REVERT", - INVALID: "INVALID", - SELFDESTRUCT: "SELFDESTRUCT", -} - -func (op OpCode) String() string { - str := opCodeToString[op] - if len(str) == 0 { - return fmt.Sprintf("opcode %#x not defined", int(op)) - } - - return str -} - -var stringToOp = map[string]OpCode{ - "STOP": STOP, - "ADD": ADD, - "MUL": MUL, - "SUB": SUB, - "DIV": DIV, - "SDIV": SDIV, - "MOD": MOD, - "SMOD": SMOD, - "EXP": EXP, - "NOT": NOT, - "LT": LT, - "GT": GT, - "SLT": SLT, - "SGT": SGT, - "EQ": EQ, - "ISZERO": ISZERO, - "SIGNEXTEND": SIGNEXTEND, - "AND": AND, - "OR": OR, - "XOR": XOR, - "BYTE": BYTE, - "SHL": SHL, - "SHR": SHR, - "SAR": SAR, - "ADDMOD": ADDMOD, - "MULMOD": MULMOD, - "KECCAK256": KECCAK256, - "ADDRESS": ADDRESS, - "BALANCE": BALANCE, - "ORIGIN": ORIGIN, - "CALLER": CALLER, - "CALLVALUE": CALLVALUE, - "CALLDATALOAD": CALLDATALOAD, - "CALLDATASIZE": CALLDATASIZE, - "CALLDATACOPY": CALLDATACOPY, - "CHAINID": CHAINID, - "BASEFEE": BASEFEE, - "DELEGATECALL": DELEGATECALL, - "STATICCALL": STATICCALL, - "CODESIZE": CODESIZE, - "CODECOPY": CODECOPY, - "GASPRICE": GASPRICE, - "EXTCODESIZE": EXTCODESIZE, - "EXTCODECOPY": EXTCODECOPY, - "RETURNDATASIZE": RETURNDATASIZE, - "RETURNDATACOPY": RETURNDATACOPY, - "EXTCODEHASH": EXTCODEHASH, - "BLOCKHASH": BLOCKHASH, - "COINBASE": COINBASE, - "TIMESTAMP": TIMESTAMP, - "NUMBER": NUMBER, - "DIFFICULTY": DIFFICULTY, - "GASLIMIT": GASLIMIT, - "SELFBALANCE": SELFBALANCE, - "POP": POP, - "MLOAD": MLOAD, - "MSTORE": MSTORE, - "MSTORE8": MSTORE8, - "SLOAD": SLOAD, - "SSTORE": SSTORE, - "JUMP": JUMP, - "JUMPI": JUMPI, - "PC": PC, - "MSIZE": MSIZE, - "GAS": GAS, - "JUMPDEST": JUMPDEST, - "PUSH0": PUSH0, - "PUSH1": PUSH1, - "PUSH2": PUSH2, - "PUSH3": PUSH3, - "PUSH4": PUSH4, - "PUSH5": PUSH5, - "PUSH6": PUSH6, - "PUSH7": PUSH7, - "PUSH8": PUSH8, - "PUSH9": PUSH9, - "PUSH10": PUSH10, - "PUSH11": PUSH11, - "PUSH12": PUSH12, - "PUSH13": PUSH13, - "PUSH14": PUSH14, - "PUSH15": PUSH15, - "PUSH16": PUSH16, - "PUSH17": PUSH17, - "PUSH18": PUSH18, - "PUSH19": PUSH19, - "PUSH20": PUSH20, - "PUSH21": PUSH21, - "PUSH22": PUSH22, - "PUSH23": PUSH23, - "PUSH24": PUSH24, - "PUSH25": PUSH25, - "PUSH26": PUSH26, - "PUSH27": PUSH27, - "PUSH28": PUSH28, - "PUSH29": PUSH29, - "PUSH30": PUSH30, - "PUSH31": PUSH31, - "PUSH32": PUSH32, - "DUP1": DUP1, - "DUP2": DUP2, - "DUP3": DUP3, - "DUP4": DUP4, - "DUP5": DUP5, - "DUP6": DUP6, - "DUP7": DUP7, - "DUP8": DUP8, - "DUP9": DUP9, - "DUP10": DUP10, - "DUP11": DUP11, - "DUP12": DUP12, - "DUP13": DUP13, - "DUP14": DUP14, - "DUP15": DUP15, - "DUP16": DUP16, - "SWAP1": SWAP1, - "SWAP2": SWAP2, - "SWAP3": SWAP3, - "SWAP4": SWAP4, - "SWAP5": SWAP5, - "SWAP6": SWAP6, - "SWAP7": SWAP7, - "SWAP8": SWAP8, - "SWAP9": SWAP9, - "SWAP10": SWAP10, - "SWAP11": SWAP11, - "SWAP12": SWAP12, - "SWAP13": SWAP13, - "SWAP14": SWAP14, - "SWAP15": SWAP15, - "SWAP16": SWAP16, - "LOG0": LOG0, - "LOG1": LOG1, - "LOG2": LOG2, - "LOG3": LOG3, - "LOG4": LOG4, - "CREATE": CREATE, - "CREATE2": CREATE2, - "CALL": CALL, - "RETURN": RETURN, - "CALLCODE": CALLCODE, - "REVERT": REVERT, - "INVALID": INVALID, - "SELFDESTRUCT": SELFDESTRUCT, - - // new - "PREPAY": PREPAY, -} - -// StringToOp finds the opcode whose name is stored in `str`. -func StringToOp(str string) OpCode { - return stringToOp[str] -} diff --git a/x/evm/vm/operations_acl.go b/x/evm/vm/operations_acl.go deleted file mode 100644 index 551e1f5f..00000000 --- a/x/evm/vm/operations_acl.go +++ /dev/null @@ -1,244 +0,0 @@ -// Copyright 2020 The go-ethereum Authors -// This file is part of the go-ethereum library. -// -// The go-ethereum library is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// The go-ethereum library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . - -package vm - -import ( - "errors" - - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/math" - "github.com/ethereum/go-ethereum/params" -) - -func makeGasSStoreFunc(clearingRefund uint64) gasFunc { - return func(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { - // If we fail the minimum gas availability invariant, fail (0) - if contract.Gas <= params.SstoreSentryGasEIP2200 { - return 0, errors.New("not enough gas for reentrancy sentry") - } - // Gas sentry honoured, do the actual gas calculation based on the stored value - var ( - y, x = stack.Back(1), stack.peek() - slot = common.Hash(x.Bytes32()) - current = evm.StateDB.GetState(contract.Address(), slot) - cost = uint64(0) - ) - // Check slot presence in the access list - if addrPresent, slotPresent := evm.StateDB.SlotInAccessList(contract.Address(), slot); !slotPresent { - cost = params.ColdSloadCostEIP2929 - // If the caller cannot afford the cost, this change will be rolled back - evm.StateDB.AddSlotToAccessList(contract.Address(), slot) - if !addrPresent { - // Once we're done with YOLOv2 and schedule this for mainnet, might - // be good to remove this panic here, which is just really a - // canary to have during testing - panic("impossible case: address was not present in access list during sstore op") - } - } - value := common.Hash(y.Bytes32()) - - if current == value { // noop (1) - // EIP 2200 original clause: - // return params.SloadGasEIP2200, nil - return cost + params.WarmStorageReadCostEIP2929, nil // SLOAD_GAS - } - original := evm.StateDB.GetCommittedState(contract.Address(), x.Bytes32()) - if original == current { - if original == (common.Hash{}) { // create slot (2.1.1) - return cost + params.SstoreSetGasEIP2200, nil - } - if value == (common.Hash{}) { // delete slot (2.1.2b) - evm.StateDB.AddRefund(clearingRefund) - } - // EIP-2200 original clause: - // return params.SstoreResetGasEIP2200, nil // write existing slot (2.1.2) - return cost + (params.SstoreResetGasEIP2200 - params.ColdSloadCostEIP2929), nil // write existing slot (2.1.2) - } - if original != (common.Hash{}) { - if current == (common.Hash{}) { // recreate slot (2.2.1.1) - evm.StateDB.SubRefund(clearingRefund) - } else if value == (common.Hash{}) { // delete slot (2.2.1.2) - evm.StateDB.AddRefund(clearingRefund) - } - } - if original == value { - if original == (common.Hash{}) { // reset to original inexistent slot (2.2.2.1) - // EIP 2200 Original clause: - //evm.StateDB.AddRefund(params.SstoreSetGasEIP2200 - params.SloadGasEIP2200) - evm.StateDB.AddRefund(params.SstoreSetGasEIP2200 - params.WarmStorageReadCostEIP2929) - } else { // reset to original existing slot (2.2.2.2) - // EIP 2200 Original clause: - // evm.StateDB.AddRefund(params.SstoreResetGasEIP2200 - params.SloadGasEIP2200) - // - SSTORE_RESET_GAS redefined as (5000 - COLD_SLOAD_COST) - // - SLOAD_GAS redefined as WARM_STORAGE_READ_COST - // Final: (5000 - COLD_SLOAD_COST) - WARM_STORAGE_READ_COST - evm.StateDB.AddRefund((params.SstoreResetGasEIP2200 - params.ColdSloadCostEIP2929) - params.WarmStorageReadCostEIP2929) - } - } - // EIP-2200 original clause: - //return params.SloadGasEIP2200, nil // dirty update (2.2) - return cost + params.WarmStorageReadCostEIP2929, nil // dirty update (2.2) - } -} - -// gasSLoadEIP2929 calculates dynamic gas for SLOAD according to EIP-2929 -// For SLOAD, if the (address, storage_key) pair (where address is the address of the contract -// whose storage is being read) is not yet in accessed_storage_keys, -// charge 2100 gas and add the pair to accessed_storage_keys. -// If the pair is already in accessed_storage_keys, charge 100 gas. -func gasSLoadEIP2929(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { - loc := stack.peek() - slot := common.Hash(loc.Bytes32()) - // Check slot presence in the access list - if _, slotPresent := evm.StateDB.SlotInAccessList(contract.Address(), slot); !slotPresent { - // If the caller cannot afford the cost, this change will be rolled back - // If he does afford it, we can skip checking the same thing later on, during execution - evm.StateDB.AddSlotToAccessList(contract.Address(), slot) - return params.ColdSloadCostEIP2929, nil - } - return params.WarmStorageReadCostEIP2929, nil -} - -// gasExtCodeCopyEIP2929 implements extcodecopy according to EIP-2929 -// EIP spec: -// > If the target is not in accessed_addresses, -// > charge COLD_ACCOUNT_ACCESS_COST gas, and add the address to accessed_addresses. -// > Otherwise, charge WARM_STORAGE_READ_COST gas. -func gasExtCodeCopyEIP2929(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { - // memory expansion first (dynamic part of pre-2929 implementation) - gas, err := gasExtCodeCopy(evm, contract, stack, mem, memorySize) - if err != nil { - return 0, err - } - addr := common.Address(stack.peek().Bytes20()) - // Check slot presence in the access list - if !evm.StateDB.AddressInAccessList(addr) { - evm.StateDB.AddAddressToAccessList(addr) - var overflow bool - // We charge (cold-warm), since 'warm' is already charged as constantGas - if gas, overflow = math.SafeAdd(gas, params.ColdAccountAccessCostEIP2929-params.WarmStorageReadCostEIP2929); overflow { - return 0, ErrGasUintOverflow - } - return gas, nil - } - return gas, nil -} - -// gasEip2929AccountCheck checks whether the first stack item (as address) is present in the access list. -// If it is, this method returns '0', otherwise 'cold-warm' gas, presuming that the opcode using it -// is also using 'warm' as constant factor. -// This method is used by: -// - extcodehash, -// - extcodesize, -// - (ext) balance -func gasEip2929AccountCheck(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { - addr := common.Address(stack.peek().Bytes20()) - // Check slot presence in the access list - if !evm.StateDB.AddressInAccessList(addr) { - // If the caller cannot afford the cost, this change will be rolled back - evm.StateDB.AddAddressToAccessList(addr) - // The warm storage read cost is already charged as constantGas - return params.ColdAccountAccessCostEIP2929 - params.WarmStorageReadCostEIP2929, nil - } - return 0, nil -} - -func makeCallVariantGasCallEIP2929(oldCalculator gasFunc) gasFunc { - return func(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { - addr := common.Address(stack.Back(1).Bytes20()) - // Check slot presence in the access list - warmAccess := evm.StateDB.AddressInAccessList(addr) - // The WarmStorageReadCostEIP2929 (100) is already deducted in the form of a constant cost, so - // the cost to charge for cold access, if any, is Cold - Warm - coldCost := params.ColdAccountAccessCostEIP2929 - params.WarmStorageReadCostEIP2929 - if !warmAccess { - evm.StateDB.AddAddressToAccessList(addr) - // Charge the remaining difference here already, to correctly calculate available - // gas for call - if !contract.UseGas(coldCost) { - return 0, ErrOutOfGas - } - } - // Now call the old calculator, which takes into account - // - create new account - // - transfer value - // - memory expansion - // - 63/64ths rule - gas, err := oldCalculator(evm, contract, stack, mem, memorySize) - if warmAccess || err != nil { - return gas, err - } - // In case of a cold access, we temporarily add the cold charge back, and also - // add it to the returned gas. By adding it to the return, it will be charged - // outside of this function, as part of the dynamic gas, and that will make it - // also become correctly reported to tracers. - contract.Gas += coldCost - return gas + coldCost, nil - } -} - -var ( - gasCallEIP2929 = makeCallVariantGasCallEIP2929(gasCall) - gasDelegateCallEIP2929 = makeCallVariantGasCallEIP2929(gasDelegateCall) - gasStaticCallEIP2929 = makeCallVariantGasCallEIP2929(gasStaticCall) - gasCallCodeEIP2929 = makeCallVariantGasCallEIP2929(gasCallCode) - gasSelfdestructEIP2929 = makeSelfdestructGasFn(true) - // gasSelfdestructEIP3529 implements the changes in EIP-2539 (no refunds) - gasSelfdestructEIP3529 = makeSelfdestructGasFn(false) - - // gasSStoreEIP2929 implements gas cost for SSTORE according to EIP-2929 - // - // When calling SSTORE, check if the (address, storage_key) pair is in accessed_storage_keys. - // If it is not, charge an additional COLD_SLOAD_COST gas, and add the pair to accessed_storage_keys. - // Additionally, modify the parameters defined in EIP 2200 as follows: - // - // Parameter Old value New value - // SLOAD_GAS 800 = WARM_STORAGE_READ_COST - // SSTORE_RESET_GAS 5000 5000 - COLD_SLOAD_COST - // - //The other parameters defined in EIP 2200 are unchanged. - // see gasSStoreEIP2200(...) in core/vm/gas_table.go for more info about how EIP 2200 is specified - gasSStoreEIP2929 = makeGasSStoreFunc(params.SstoreClearsScheduleRefundEIP2200) - - // gasSStoreEIP2539 implements gas cost for SSTORE according to EIP-2539 - // Replace `SSTORE_CLEARS_SCHEDULE` with `SSTORE_RESET_GAS + ACCESS_LIST_STORAGE_KEY_COST` (4,800) - gasSStoreEIP3529 = makeGasSStoreFunc(params.SstoreClearsScheduleRefundEIP3529) -) - -// makeSelfdestructGasFn can create the selfdestruct dynamic gas function for EIP-2929 and EIP-2539 -func makeSelfdestructGasFn(refundsEnabled bool) gasFunc { - gasFunc := func(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { - var ( - gas uint64 - address = common.Address(stack.peek().Bytes20()) - ) - if !evm.StateDB.AddressInAccessList(address) { - // If the caller cannot afford the cost, this change will be rolled back - evm.StateDB.AddAddressToAccessList(address) - gas = params.ColdAccountAccessCostEIP2929 - } - // if empty and transfers value - if evm.StateDB.Empty(address) && evm.StateDB.GetBalance(contract.Address()).Sign() != 0 { - gas += params.CreateBySelfdestructGas - } - if refundsEnabled && !evm.StateDB.HasSuicided(contract.Address()) { - evm.StateDB.AddRefund(params.SelfdestructRefundGas) - } - return gas, nil - } - return gasFunc -} diff --git a/x/evm/vm/stack.go b/x/evm/vm/stack.go deleted file mode 100644 index e1a957e2..00000000 --- a/x/evm/vm/stack.go +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright 2014 The go-ethereum Authors -// This file is part of the go-ethereum library. -// -// The go-ethereum library is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// The go-ethereum library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . - -package vm - -import ( - "sync" - - "github.com/holiman/uint256" -) - -var stackPool = sync.Pool{ - New: func() interface{} { - return &Stack{data: make([]uint256.Int, 0, 16)} - }, -} - -// Stack is an object for basic stack operations. Items popped to the stack are -// expected to be changed and modified. stack does not take care of adding newly -// initialised objects. -type Stack struct { - data []uint256.Int -} - -func newstack() *Stack { - return stackPool.Get().(*Stack) -} - -func returnStack(s *Stack) { - s.data = s.data[:0] - stackPool.Put(s) -} - -// Data returns the underlying uint256.Int array. -func (st *Stack) Data() []uint256.Int { - return st.data -} - -func (st *Stack) push(d *uint256.Int) { - // NOTE push limit (1024) is checked in baseCheck - st.data = append(st.data, *d) -} - -func (st *Stack) pop() (ret uint256.Int) { - ret = st.data[len(st.data)-1] - st.data = st.data[:len(st.data)-1] - return -} - -func (st *Stack) len() int { - return len(st.data) -} - -func (st *Stack) swap(n int) { - st.data[st.len()-n], st.data[st.len()-1] = st.data[st.len()-1], st.data[st.len()-n] -} - -func (st *Stack) dup(n int) { - st.push(&st.data[st.len()-n]) -} - -func (st *Stack) peek() *uint256.Int { - return &st.data[st.len()-1] -} - -// Back returns the n'th item in stack -func (st *Stack) Back(n int) *uint256.Int { - return &st.data[st.len()-n-1] -} diff --git a/x/evm/vm/stack_table.go b/x/evm/vm/stack_table.go deleted file mode 100644 index 10c12901..00000000 --- a/x/evm/vm/stack_table.go +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2017 The go-ethereum Authors -// This file is part of the go-ethereum library. -// -// The go-ethereum library is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// The go-ethereum library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see . - -package vm - -import ( - "github.com/ethereum/go-ethereum/params" -) - -func minSwapStack(n int) int { - return minStack(n, n) -} -func maxSwapStack(n int) int { - return maxStack(n, n) -} - -func minDupStack(n int) int { - return minStack(n, n+1) -} -func maxDupStack(n int) int { - return maxStack(n, n+1) -} - -func maxStack(pop, push int) int { - return int(params.StackLimit) + pop - push -} -func minStack(pops, push int) int { - return pops -} diff --git a/x/evm/vm/verifier.go b/x/evm/vm/verifier.go deleted file mode 100644 index 5d92ce32..00000000 --- a/x/evm/vm/verifier.go +++ /dev/null @@ -1,39 +0,0 @@ -package vm - -type VerifiedContract interface { - GetHeight() uint64 - GetAddress() string - GetBin() string - GetInit() string -} - -type GenesisContractVerifier struct { - applyState map[uint64][]VerifiedContract - verifiedAddresses map[string]bool -} - -func NewGenesisContractVerifier() *GenesisContractVerifier { - return &GenesisContractVerifier{ - applyState: make(map[uint64][]VerifiedContract), - verifiedAddresses: map[string]bool{}, - } -} - -func (gcv *GenesisContractVerifier) GetContracts(height uint64) []VerifiedContract { - return gcv.applyState[height] -} - -func (gcv *GenesisContractVerifier) AddContract(contract VerifiedContract, trusted bool) { - gcv.applyState[contract.GetHeight()] = append(gcv.applyState[contract.GetHeight()], contract) - if trusted { - gcv.AddTrustedAddress(contract.GetAddress()) - } -} - -func (gcv *GenesisContractVerifier) AddTrustedAddress(addr string) { - gcv.verifiedAddresses[addr] = true -} - -func (gcv *GenesisContractVerifier) IsTrustedAddress(addr string) bool { - return gcv.verifiedAddresses[addr] -} diff --git a/x/register/keeper/store_new.go b/x/register/keeper/store_new.go deleted file mode 100644 index 36dd812b..00000000 --- a/x/register/keeper/store_new.go +++ /dev/null @@ -1,35 +0,0 @@ -package keeper - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/stratosnet/stratos-chain/core/statedb" - stratos "github.com/stratosnet/stratos-chain/types" - "github.com/stratosnet/stratos-chain/x/register/types" -) - -func (k *Keeper) KeeGetEffectiveTotalDeposit(kstatedb *statedb.KeestateDB) (stake sdk.Int) { - bz := kstatedb.GetState(k.storeKey, types.EffectiveGenesisDepositTotalKey) - if bz == nil { - return sdk.ZeroInt() - } - intValue := stratos.Int{} - k.cdc.MustUnmarshalLengthPrefixed(bz, &intValue) - stake = *intValue.Value - return -} - -func (k *Keeper) KeeGetRemainingOzoneLimit(kstatedb *statedb.KeestateDB) (value sdk.Int) { - bz := kstatedb.GetState(k.storeKey, types.UpperBoundOfTotalOzoneKey) - if bz == nil { - return sdk.ZeroInt() - } - intVal := stratos.Int{} - k.cdc.MustUnmarshalLengthPrefixed(bz, &intVal) - value = *intVal.Value - return -} - -func (k *Keeper) KeeSetRemainingOzoneLimit(kstatedb *statedb.KeestateDB, value sdk.Int) { - bz := k.cdc.MustMarshalLengthPrefixed(&stratos.Int{Value: &value}) - kstatedb.SetState(k.storeKey, types.UpperBoundOfTotalOzoneKey, bz) -} diff --git a/x/sds/keeper/keeper.go b/x/sds/keeper/keeper.go index 7615ade0..53ae09f0 100644 --- a/x/sds/keeper/keeper.go +++ b/x/sds/keeper/keeper.go @@ -1,6 +1,7 @@ package keeper import ( + "errors" "fmt" "github.com/kelindar/bitmap" @@ -14,15 +15,12 @@ import ( paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" stratos "github.com/stratosnet/stratos-chain/types" - evmtypes "github.com/stratosnet/stratos-chain/x/evm/types" potKeeper "github.com/stratosnet/stratos-chain/x/pot/keeper" registerKeeper "github.com/stratosnet/stratos-chain/x/register/keeper" registertypes "github.com/stratosnet/stratos-chain/x/register/types" "github.com/stratosnet/stratos-chain/x/sds/types" ) -var _ evmtypes.SdsKeeper = &Keeper{} - // Keeper encodes/decodes files using the go-amino (binary) // encoding/decoding library. type Keeper struct { @@ -90,18 +88,29 @@ func (k Keeper) FileUpload(ctx sdk.Context, fileHash string, reporter stratos.Sd // [X] is the total amount of STOS token prepaid by user at time t // the total amount of Ozone the user gets = Lt * X / (S + Pt + X) func (k Keeper) purchaseNozAndSubCoins(ctx sdk.Context, from sdk.AccAddress, amount sdk.Int) (sdk.Int, error) { - purchased, newRemainingOzoneLimit, err := k.registerKeeper.CalculatePurchaseAmount(ctx, amount) - if err != nil { - return sdk.ZeroInt(), err + St := k.registerKeeper.GetEffectiveTotalDeposit(ctx) + Pt := k.registerKeeper.GetTotalUnissuedPrepay(ctx).Amount + Lt := k.registerKeeper.GetRemainingOzoneLimit(ctx) + + purchased := Lt.ToDec(). + Mul(amount.ToDec()). + Quo((St. + Add(Pt). + Add(amount)).ToDec()). + TruncateInt() + + if purchased.GT(Lt) { + return sdk.ZeroInt(), errors.New("not enough remaining ozone limit to complete prepay") } // send coins to total unissued prepay pool prepayAmt := sdk.NewCoin(k.BondDenom(ctx), amount) - err = k.bankKeeper.SendCoinsFromAccountToModule(ctx, from, registertypes.TotalUnissuedPrepay, sdk.NewCoins(prepayAmt)) + err := k.bankKeeper.SendCoinsFromAccountToModule(ctx, from, registertypes.TotalUnissuedPrepay, sdk.NewCoins(prepayAmt)) if err != nil { return sdk.ZeroInt(), err } // update remaining noz limit + newRemainingOzoneLimit := Lt.Sub(purchased) k.registerKeeper.SetRemainingOzoneLimit(ctx, newRemainingOzoneLimit) return purchased, nil diff --git a/yarn.lock b/yarn.lock deleted file mode 100644 index 698a002d..00000000 --- a/yarn.lock +++ /dev/null @@ -1,7594 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@babel/runtime@^7.4.4": - version "7.21.5" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.21.5.tgz#8492dddda9644ae3bda3b45eabe87382caee7200" - integrity sha512-8jI69toZqqcsnqGGqwGS4Qb1VwLOEp4hz+CXPywcvjs60u3B4Pom/U/7rm4W8tMOYEB+E9wgD0mW1l3r8qlI9Q== - dependencies: - regenerator-runtime "^0.13.11" - -"@chainsafe/as-sha256@^0.3.1": - version "0.3.1" - resolved "https://registry.yarnpkg.com/@chainsafe/as-sha256/-/as-sha256-0.3.1.tgz#3639df0e1435cab03f4d9870cc3ac079e57a6fc9" - integrity sha512-hldFFYuf49ed7DAakWVXSJODuq3pzJEguD8tQ7h+sGkM18vja+OFoJI9krnGmgzyuZC2ETX0NOIcCTy31v2Mtg== - -"@chainsafe/persistent-merkle-tree@^0.4.2": - version "0.4.2" - resolved "https://registry.yarnpkg.com/@chainsafe/persistent-merkle-tree/-/persistent-merkle-tree-0.4.2.tgz#4c9ee80cc57cd3be7208d98c40014ad38f36f7ff" - integrity sha512-lLO3ihKPngXLTus/L7WHKaw9PnNJWizlOF1H9NNzHP6Xvh82vzg9F2bzkXhYIFshMZ2gTCEz8tq6STe7r5NDfQ== - dependencies: - "@chainsafe/as-sha256" "^0.3.1" - -"@chainsafe/persistent-merkle-tree@^0.5.0": - version "0.5.0" - resolved "https://registry.yarnpkg.com/@chainsafe/persistent-merkle-tree/-/persistent-merkle-tree-0.5.0.tgz#2b4a62c9489a5739dedd197250d8d2f5427e9f63" - integrity sha512-l0V1b5clxA3iwQLXP40zYjyZYospQLZXzBVIhhr9kDg/1qHZfzzHw0jj4VPBijfYCArZDlPkRi1wZaV2POKeuw== - dependencies: - "@chainsafe/as-sha256" "^0.3.1" - -"@chainsafe/ssz@^0.10.0": - version "0.10.2" - resolved "https://registry.yarnpkg.com/@chainsafe/ssz/-/ssz-0.10.2.tgz#c782929e1bb25fec66ba72e75934b31fd087579e" - integrity sha512-/NL3Lh8K+0q7A3LsiFq09YXS9fPE+ead2rr7vM2QK8PLzrNsw3uqrif9bpRX5UxgeRjM+vYi+boCM3+GM4ovXg== - dependencies: - "@chainsafe/as-sha256" "^0.3.1" - "@chainsafe/persistent-merkle-tree" "^0.5.0" - -"@chainsafe/ssz@^0.9.2": - version "0.9.4" - resolved "https://registry.yarnpkg.com/@chainsafe/ssz/-/ssz-0.9.4.tgz#696a8db46d6975b600f8309ad3a12f7c0e310497" - integrity sha512-77Qtg2N1ayqs4Bg/wvnWfg5Bta7iy7IRh8XqXh7oNMeP2HBbBwx8m6yTpA8p0EHItWPEBkgZd5S5/LSlp3GXuQ== - dependencies: - "@chainsafe/as-sha256" "^0.3.1" - "@chainsafe/persistent-merkle-tree" "^0.4.2" - case "^1.6.3" - -"@cspotcode/source-map-support@^0.8.0": - version "0.8.1" - resolved "https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz#00629c35a688e05a88b1cda684fb9d5e73f000a1" - integrity sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw== - dependencies: - "@jridgewell/trace-mapping" "0.3.9" - -"@ensdomains/address-encoder@^0.1.7": - version "0.1.9" - resolved "https://registry.yarnpkg.com/@ensdomains/address-encoder/-/address-encoder-0.1.9.tgz#f948c485443d9ef7ed2c0c4790e931c33334d02d" - integrity sha512-E2d2gP4uxJQnDu2Kfg1tHNspefzbLT8Tyjrm5sEuim32UkU2sm5xL4VXtgc2X33fmPEw9+jUMpGs4veMbf+PYg== - dependencies: - bech32 "^1.1.3" - blakejs "^1.1.0" - bn.js "^4.11.8" - bs58 "^4.0.1" - crypto-addr-codec "^0.1.7" - nano-base32 "^1.0.1" - ripemd160 "^2.0.2" - -"@ensdomains/ens@0.4.5": - version "0.4.5" - resolved "https://registry.yarnpkg.com/@ensdomains/ens/-/ens-0.4.5.tgz#e0aebc005afdc066447c6e22feb4eda89a5edbfc" - integrity sha512-JSvpj1iNMFjK6K+uVl4unqMoa9rf5jopb8cya5UGBWz23Nw8hSNT7efgUx4BTlAPAgpNlEioUfeTyQ6J9ZvTVw== - dependencies: - bluebird "^3.5.2" - eth-ens-namehash "^2.0.8" - solc "^0.4.20" - testrpc "0.0.1" - web3-utils "^1.0.0-beta.31" - -"@ensdomains/ensjs@^2.1.0": - version "2.1.0" - resolved "https://registry.yarnpkg.com/@ensdomains/ensjs/-/ensjs-2.1.0.tgz#0a7296c1f3d735ef019320d863a7846a0760c460" - integrity sha512-GRbGPT8Z/OJMDuxs75U/jUNEC0tbL0aj7/L/QQznGYKm/tiasp+ndLOaoULy9kKJFC0TBByqfFliEHDgoLhyog== - dependencies: - "@babel/runtime" "^7.4.4" - "@ensdomains/address-encoder" "^0.1.7" - "@ensdomains/ens" "0.4.5" - "@ensdomains/resolver" "0.2.4" - content-hash "^2.5.2" - eth-ens-namehash "^2.0.8" - ethers "^5.0.13" - js-sha3 "^0.8.0" - -"@ensdomains/resolver@0.2.4": - version "0.2.4" - resolved "https://registry.yarnpkg.com/@ensdomains/resolver/-/resolver-0.2.4.tgz#c10fe28bf5efbf49bff4666d909aed0265efbc89" - integrity sha512-bvaTH34PMCbv6anRa9I/0zjLJgY4EuznbEMgbV77JBCQ9KNC46rzi0avuxpOfu+xDjPEtSFGqVEOr5GlUSGudA== - -"@ethereumjs/common@2.5.0": - version "2.5.0" - resolved "https://registry.yarnpkg.com/@ethereumjs/common/-/common-2.5.0.tgz#ec61551b31bef7a69d1dc634d8932468866a4268" - integrity sha512-DEHjW6e38o+JmB/NO3GZBpW4lpaiBpkFgXF6jLcJ6gETBYpEyaA5nTimsWBUJR3Vmtm/didUEbNjajskugZORg== - dependencies: - crc-32 "^1.2.0" - ethereumjs-util "^7.1.1" - -"@ethereumjs/common@^2.5.0": - version "2.6.5" - resolved "https://registry.yarnpkg.com/@ethereumjs/common/-/common-2.6.5.tgz#0a75a22a046272579d91919cb12d84f2756e8d30" - integrity sha512-lRyVQOeCDaIVtgfbowla32pzeDv2Obr8oR8Put5RdUBNRGr1VGPGQNGP6elWIpgK3YdpzqTOh4GyUGOureVeeA== - dependencies: - crc-32 "^1.2.0" - ethereumjs-util "^7.1.5" - -"@ethereumjs/tx@3.3.2": - version "3.3.2" - resolved "https://registry.yarnpkg.com/@ethereumjs/tx/-/tx-3.3.2.tgz#348d4624bf248aaab6c44fec2ae67265efe3db00" - integrity sha512-6AaJhwg4ucmwTvw/1qLaZUX5miWrwZ4nLOUsKyb/HtzS3BMw/CasKhdi1ims9mBKeK9sOJCH4qGKOBGyJCeeog== - dependencies: - "@ethereumjs/common" "^2.5.0" - ethereumjs-util "^7.1.2" - -"@ethersproject/abi@5.7.0", "@ethersproject/abi@^5.0.0-beta.146", "@ethersproject/abi@^5.0.9", "@ethersproject/abi@^5.1.2", "@ethersproject/abi@^5.4.7", "@ethersproject/abi@^5.6.3", "@ethersproject/abi@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/abi/-/abi-5.7.0.tgz#b3f3e045bbbeed1af3947335c247ad625a44e449" - integrity sha512-351ktp42TiRcYB3H1OP8yajPeAQstMW/yCFokj/AthP9bLHzQFPlOrxOcwYEDkUAICmOHljvN4K39OMTMUa9RA== - dependencies: - "@ethersproject/address" "^5.7.0" - "@ethersproject/bignumber" "^5.7.0" - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/constants" "^5.7.0" - "@ethersproject/hash" "^5.7.0" - "@ethersproject/keccak256" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - "@ethersproject/properties" "^5.7.0" - "@ethersproject/strings" "^5.7.0" - -"@ethersproject/abstract-provider@5.7.0", "@ethersproject/abstract-provider@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/abstract-provider/-/abstract-provider-5.7.0.tgz#b0a8550f88b6bf9d51f90e4795d48294630cb9ef" - integrity sha512-R41c9UkchKCpAqStMYUpdunjo3pkEvZC3FAwZn5S5MGbXoMQOHIdHItezTETxAO5bevtMApSyEhn9+CHcDsWBw== - dependencies: - "@ethersproject/bignumber" "^5.7.0" - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - "@ethersproject/networks" "^5.7.0" - "@ethersproject/properties" "^5.7.0" - "@ethersproject/transactions" "^5.7.0" - "@ethersproject/web" "^5.7.0" - -"@ethersproject/abstract-signer@5.7.0", "@ethersproject/abstract-signer@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/abstract-signer/-/abstract-signer-5.7.0.tgz#13f4f32117868452191a4649723cb086d2b596b2" - integrity sha512-a16V8bq1/Cz+TGCkE2OPMTOUDLS3grCpdjoJCYNnVBbdYEMSgKrU0+B90s8b6H+ByYTBZN7a3g76jdIJi7UfKQ== - dependencies: - "@ethersproject/abstract-provider" "^5.7.0" - "@ethersproject/bignumber" "^5.7.0" - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - "@ethersproject/properties" "^5.7.0" - -"@ethersproject/address@5.7.0", "@ethersproject/address@^5.0.2", "@ethersproject/address@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/address/-/address-5.7.0.tgz#19b56c4d74a3b0a46bfdbb6cfcc0a153fc697f37" - integrity sha512-9wYhYt7aghVGo758POM5nqcOMaE168Q6aRLJZwUmiqSrAungkG74gSSeKEIR7ukixesdRZGPgVqme6vmxs1fkA== - dependencies: - "@ethersproject/bignumber" "^5.7.0" - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/keccak256" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - "@ethersproject/rlp" "^5.7.0" - -"@ethersproject/base64@5.7.0", "@ethersproject/base64@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/base64/-/base64-5.7.0.tgz#ac4ee92aa36c1628173e221d0d01f53692059e1c" - integrity sha512-Dr8tcHt2mEbsZr/mwTPIQAf3Ai0Bks/7gTw9dSqk1mQvhW3XvRlmDJr/4n+wg1JmCl16NZue17CDh8xb/vZ0sQ== - dependencies: - "@ethersproject/bytes" "^5.7.0" - -"@ethersproject/basex@5.7.0", "@ethersproject/basex@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/basex/-/basex-5.7.0.tgz#97034dc7e8938a8ca943ab20f8a5e492ece4020b" - integrity sha512-ywlh43GwZLv2Voc2gQVTKBoVQ1mti3d8HK5aMxsfu/nRDnMmNqaSJ3r3n85HBByT8OpoY96SXM1FogC533T4zw== - dependencies: - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/properties" "^5.7.0" - -"@ethersproject/bignumber@5.7.0", "@ethersproject/bignumber@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/bignumber/-/bignumber-5.7.0.tgz#e2f03837f268ba655ffba03a57853e18a18dc9c2" - integrity sha512-n1CAdIHRWjSucQO3MC1zPSVgV/6dy/fjL9pMrPP9peL+QxEg9wOsVqwD4+818B6LUEtaXzVHQiuivzRoxPxUGw== - dependencies: - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - bn.js "^5.2.1" - -"@ethersproject/bytes@5.7.0", "@ethersproject/bytes@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/bytes/-/bytes-5.7.0.tgz#a00f6ea8d7e7534d6d87f47188af1148d71f155d" - integrity sha512-nsbxwgFXWh9NyYWo+U8atvmMsSdKJprTcICAkvbBffT75qDocbuggBU0SJiVK2MuTrp0q+xvLkTnGMPK1+uA9A== - dependencies: - "@ethersproject/logger" "^5.7.0" - -"@ethersproject/constants@5.7.0", "@ethersproject/constants@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/constants/-/constants-5.7.0.tgz#df80a9705a7e08984161f09014ea012d1c75295e" - integrity sha512-DHI+y5dBNvkpYUMiRQyxRBYBefZkJfo70VUkUAsRjcPs47muV9evftfZ0PJVCXYbAiCgght0DtcF9srFQmIgWA== - dependencies: - "@ethersproject/bignumber" "^5.7.0" - -"@ethersproject/contracts@5.7.0", "@ethersproject/contracts@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/contracts/-/contracts-5.7.0.tgz#c305e775abd07e48aa590e1a877ed5c316f8bd1e" - integrity sha512-5GJbzEU3X+d33CdfPhcyS+z8MzsTrBGk/sc+G+59+tPa9yFkl6HQ9D6L0QMgNTA9q8dT0XKxxkyp883XsQvbbg== - dependencies: - "@ethersproject/abi" "^5.7.0" - "@ethersproject/abstract-provider" "^5.7.0" - "@ethersproject/abstract-signer" "^5.7.0" - "@ethersproject/address" "^5.7.0" - "@ethersproject/bignumber" "^5.7.0" - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/constants" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - "@ethersproject/properties" "^5.7.0" - "@ethersproject/transactions" "^5.7.0" - -"@ethersproject/hash@5.7.0", "@ethersproject/hash@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/hash/-/hash-5.7.0.tgz#eb7aca84a588508369562e16e514b539ba5240a7" - integrity sha512-qX5WrQfnah1EFnO5zJv1v46a8HW0+E5xuBBDTwMFZLuVTx0tbU2kkx15NqdjxecrLGatQN9FGQKpb1FKdHCt+g== - dependencies: - "@ethersproject/abstract-signer" "^5.7.0" - "@ethersproject/address" "^5.7.0" - "@ethersproject/base64" "^5.7.0" - "@ethersproject/bignumber" "^5.7.0" - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/keccak256" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - "@ethersproject/properties" "^5.7.0" - "@ethersproject/strings" "^5.7.0" - -"@ethersproject/hdnode@5.7.0", "@ethersproject/hdnode@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/hdnode/-/hdnode-5.7.0.tgz#e627ddc6b466bc77aebf1a6b9e47405ca5aef9cf" - integrity sha512-OmyYo9EENBPPf4ERhR7oj6uAtUAhYGqOnIS+jE5pTXvdKBS99ikzq1E7Iv0ZQZ5V36Lqx1qZLeak0Ra16qpeOg== - dependencies: - "@ethersproject/abstract-signer" "^5.7.0" - "@ethersproject/basex" "^5.7.0" - "@ethersproject/bignumber" "^5.7.0" - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - "@ethersproject/pbkdf2" "^5.7.0" - "@ethersproject/properties" "^5.7.0" - "@ethersproject/sha2" "^5.7.0" - "@ethersproject/signing-key" "^5.7.0" - "@ethersproject/strings" "^5.7.0" - "@ethersproject/transactions" "^5.7.0" - "@ethersproject/wordlists" "^5.7.0" - -"@ethersproject/json-wallets@5.7.0", "@ethersproject/json-wallets@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/json-wallets/-/json-wallets-5.7.0.tgz#5e3355287b548c32b368d91014919ebebddd5360" - integrity sha512-8oee5Xgu6+RKgJTkvEMl2wDgSPSAQ9MB/3JYjFV9jlKvcYHUXZC+cQp0njgmxdHkYWn8s6/IqIZYm0YWCjO/0g== - dependencies: - "@ethersproject/abstract-signer" "^5.7.0" - "@ethersproject/address" "^5.7.0" - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/hdnode" "^5.7.0" - "@ethersproject/keccak256" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - "@ethersproject/pbkdf2" "^5.7.0" - "@ethersproject/properties" "^5.7.0" - "@ethersproject/random" "^5.7.0" - "@ethersproject/strings" "^5.7.0" - "@ethersproject/transactions" "^5.7.0" - aes-js "3.0.0" - scrypt-js "3.0.1" - -"@ethersproject/keccak256@5.7.0", "@ethersproject/keccak256@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/keccak256/-/keccak256-5.7.0.tgz#3186350c6e1cd6aba7940384ec7d6d9db01f335a" - integrity sha512-2UcPboeL/iW+pSg6vZ6ydF8tCnv3Iu/8tUmLLzWWGzxWKFFqOBQFLo6uLUv6BDrLgCDfN28RJ/wtByx+jZ4KBg== - dependencies: - "@ethersproject/bytes" "^5.7.0" - js-sha3 "0.8.0" - -"@ethersproject/logger@5.7.0", "@ethersproject/logger@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.7.0.tgz#6ce9ae168e74fecf287be17062b590852c311892" - integrity sha512-0odtFdXu/XHtjQXJYA3u9G0G8btm0ND5Cu8M7i5vhEcE8/HmF4Lbdqanwyv4uQTr2tx6b7fQRmgLrsnpQlmnig== - -"@ethersproject/networks@5.7.1", "@ethersproject/networks@^5.7.0": - version "5.7.1" - resolved "https://registry.yarnpkg.com/@ethersproject/networks/-/networks-5.7.1.tgz#118e1a981d757d45ccea6bb58d9fd3d9db14ead6" - integrity sha512-n/MufjFYv3yFcUyfhnXotyDlNdFb7onmkSy8aQERi2PjNcnWQ66xXxa3XlS8nCcA8aJKJjIIMNJTC7tu80GwpQ== - dependencies: - "@ethersproject/logger" "^5.7.0" - -"@ethersproject/pbkdf2@5.7.0", "@ethersproject/pbkdf2@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/pbkdf2/-/pbkdf2-5.7.0.tgz#d2267d0a1f6e123f3771007338c47cccd83d3102" - integrity sha512-oR/dBRZR6GTyaofd86DehG72hY6NpAjhabkhxgr3X2FpJtJuodEl2auADWBZfhDHgVCbu3/H/Ocq2uC6dpNjjw== - dependencies: - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/sha2" "^5.7.0" - -"@ethersproject/properties@5.7.0", "@ethersproject/properties@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/properties/-/properties-5.7.0.tgz#a6e12cb0439b878aaf470f1902a176033067ed30" - integrity sha512-J87jy8suntrAkIZtecpxEPxY//szqr1mlBaYlQ0r4RCaiD2hjheqF9s1LVE8vVuJCXisjIP+JgtK/Do54ej4Sw== - dependencies: - "@ethersproject/logger" "^5.7.0" - -"@ethersproject/providers@5.7.2", "@ethersproject/providers@^5.4.7", "@ethersproject/providers@^5.7.1", "@ethersproject/providers@^5.7.2": - version "5.7.2" - resolved "https://registry.yarnpkg.com/@ethersproject/providers/-/providers-5.7.2.tgz#f8b1a4f275d7ce58cf0a2eec222269a08beb18cb" - integrity sha512-g34EWZ1WWAVgr4aptGlVBF8mhl3VWjv+8hoAnzStu8Ah22VHBsuGzP17eb6xDVRzw895G4W7vvx60lFFur/1Rg== - dependencies: - "@ethersproject/abstract-provider" "^5.7.0" - "@ethersproject/abstract-signer" "^5.7.0" - "@ethersproject/address" "^5.7.0" - "@ethersproject/base64" "^5.7.0" - "@ethersproject/basex" "^5.7.0" - "@ethersproject/bignumber" "^5.7.0" - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/constants" "^5.7.0" - "@ethersproject/hash" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - "@ethersproject/networks" "^5.7.0" - "@ethersproject/properties" "^5.7.0" - "@ethersproject/random" "^5.7.0" - "@ethersproject/rlp" "^5.7.0" - "@ethersproject/sha2" "^5.7.0" - "@ethersproject/strings" "^5.7.0" - "@ethersproject/transactions" "^5.7.0" - "@ethersproject/web" "^5.7.0" - bech32 "1.1.4" - ws "7.4.6" - -"@ethersproject/random@5.7.0", "@ethersproject/random@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/random/-/random-5.7.0.tgz#af19dcbc2484aae078bb03656ec05df66253280c" - integrity sha512-19WjScqRA8IIeWclFme75VMXSBvi4e6InrUNuaR4s5pTF2qNhcGdCUwdxUVGtDDqC00sDLCO93jPQoDUH4HVmQ== - dependencies: - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - -"@ethersproject/rlp@5.7.0", "@ethersproject/rlp@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/rlp/-/rlp-5.7.0.tgz#de39e4d5918b9d74d46de93af80b7685a9c21304" - integrity sha512-rBxzX2vK8mVF7b0Tol44t5Tb8gomOHkj5guL+HhzQ1yBh/ydjGnpw6at+X6Iw0Kp3OzzzkcKp8N9r0W4kYSs9w== - dependencies: - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - -"@ethersproject/sha2@5.7.0", "@ethersproject/sha2@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/sha2/-/sha2-5.7.0.tgz#9a5f7a7824ef784f7f7680984e593a800480c9fb" - integrity sha512-gKlH42riwb3KYp0reLsFTokByAKoJdgFCwI+CCiX/k+Jm2mbNs6oOaCjYQSlI1+XBVejwH2KrmCbMAT/GnRDQw== - dependencies: - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - hash.js "1.1.7" - -"@ethersproject/signing-key@5.7.0", "@ethersproject/signing-key@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/signing-key/-/signing-key-5.7.0.tgz#06b2df39411b00bc57c7c09b01d1e41cf1b16ab3" - integrity sha512-MZdy2nL3wO0u7gkB4nA/pEf8lu1TlFswPNmy8AiYkfKTdO6eXBJyUdmHO/ehm/htHw9K/qF8ujnTyUAD+Ry54Q== - dependencies: - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - "@ethersproject/properties" "^5.7.0" - bn.js "^5.2.1" - elliptic "6.5.4" - hash.js "1.1.7" - -"@ethersproject/solidity@5.7.0", "@ethersproject/solidity@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/solidity/-/solidity-5.7.0.tgz#5e9c911d8a2acce2a5ebb48a5e2e0af20b631cb8" - integrity sha512-HmabMd2Dt/raavyaGukF4XxizWKhKQ24DoLtdNbBmNKUOPqwjsKQSdV9GQtj9CBEea9DlzETlVER1gYeXXBGaA== - dependencies: - "@ethersproject/bignumber" "^5.7.0" - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/keccak256" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - "@ethersproject/sha2" "^5.7.0" - "@ethersproject/strings" "^5.7.0" - -"@ethersproject/strings@5.7.0", "@ethersproject/strings@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/strings/-/strings-5.7.0.tgz#54c9d2a7c57ae8f1205c88a9d3a56471e14d5ed2" - integrity sha512-/9nu+lj0YswRNSH0NXYqrh8775XNyEdUQAuf3f+SmOrnVewcJ5SBNAjF7lpgehKi4abvNNXyf+HX86czCdJ8Mg== - dependencies: - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/constants" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - -"@ethersproject/transactions@5.7.0", "@ethersproject/transactions@^5.6.2", "@ethersproject/transactions@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/transactions/-/transactions-5.7.0.tgz#91318fc24063e057885a6af13fdb703e1f993d3b" - integrity sha512-kmcNicCp1lp8qanMTC3RIikGgoJ80ztTyvtsFvCYpSCfkjhD0jZ2LOrnbcuxuToLIUYYf+4XwD1rP+B/erDIhQ== - dependencies: - "@ethersproject/address" "^5.7.0" - "@ethersproject/bignumber" "^5.7.0" - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/constants" "^5.7.0" - "@ethersproject/keccak256" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - "@ethersproject/properties" "^5.7.0" - "@ethersproject/rlp" "^5.7.0" - "@ethersproject/signing-key" "^5.7.0" - -"@ethersproject/units@5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/units/-/units-5.7.0.tgz#637b563d7e14f42deeee39245275d477aae1d8b1" - integrity sha512-pD3xLMy3SJu9kG5xDGI7+xhTEmGXlEqXU4OfNapmfnxLVY4EMSSRp7j1k7eezutBPH7RBN/7QPnwR7hzNlEFeg== - dependencies: - "@ethersproject/bignumber" "^5.7.0" - "@ethersproject/constants" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - -"@ethersproject/wallet@5.7.0", "@ethersproject/wallet@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/wallet/-/wallet-5.7.0.tgz#4e5d0790d96fe21d61d38fb40324e6c7ef350b2d" - integrity sha512-MhmXlJXEJFBFVKrDLB4ZdDzxcBxQ3rLyCkhNqVu3CDYvR97E+8r01UgrI+TI99Le+aYm/in/0vp86guJuM7FCA== - dependencies: - "@ethersproject/abstract-provider" "^5.7.0" - "@ethersproject/abstract-signer" "^5.7.0" - "@ethersproject/address" "^5.7.0" - "@ethersproject/bignumber" "^5.7.0" - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/hash" "^5.7.0" - "@ethersproject/hdnode" "^5.7.0" - "@ethersproject/json-wallets" "^5.7.0" - "@ethersproject/keccak256" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - "@ethersproject/properties" "^5.7.0" - "@ethersproject/random" "^5.7.0" - "@ethersproject/signing-key" "^5.7.0" - "@ethersproject/transactions" "^5.7.0" - "@ethersproject/wordlists" "^5.7.0" - -"@ethersproject/web@5.7.1", "@ethersproject/web@^5.7.0": - version "5.7.1" - resolved "https://registry.yarnpkg.com/@ethersproject/web/-/web-5.7.1.tgz#de1f285b373149bee5928f4eb7bcb87ee5fbb4ae" - integrity sha512-Gueu8lSvyjBWL4cYsWsjh6MtMwM0+H4HvqFPZfB6dV8ctbP9zFAO73VG1cMWae0FLPCtz0peKPpZY8/ugJJX2w== - dependencies: - "@ethersproject/base64" "^5.7.0" - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - "@ethersproject/properties" "^5.7.0" - "@ethersproject/strings" "^5.7.0" - -"@ethersproject/wordlists@5.7.0", "@ethersproject/wordlists@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@ethersproject/wordlists/-/wordlists-5.7.0.tgz#8fb2c07185d68c3e09eb3bfd6e779ba2774627f5" - integrity sha512-S2TFNJNfHWVHNE6cNDjbVlZ6MgE17MIxMbMg2zv3wn+3XSJGosL1m9ZVv3GXCf/2ymSsQ+hRI5IzoMJTG6aoVA== - dependencies: - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/hash" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - "@ethersproject/properties" "^5.7.0" - "@ethersproject/strings" "^5.7.0" - -"@fvictorio/tabtab@^0.0.3": - version "0.0.3" - resolved "https://registry.yarnpkg.com/@fvictorio/tabtab/-/tabtab-0.0.3.tgz#1b97981424386490fa2a5818706d2afd1f6e4659" - integrity sha512-bT/BSy8MJThrTebqTCjXRnGSgZWthHLigZ4k2AvfNtC79vPyBS1myaxw8gRU6RxIcdDD3HBtm7pOsOoyC086Zg== - dependencies: - debug "^4.1.1" - enquirer "^2.3.4" - minimist "^1.2.0" - mkdirp "^1.0.3" - untildify "^4.0.0" - -"@jridgewell/resolve-uri@^3.0.3": - version "3.1.1" - resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz#c08679063f279615a3326583ba3a90d1d82cc721" - integrity sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA== - -"@jridgewell/sourcemap-codec@^1.4.10": - version "1.4.15" - resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32" - integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== - -"@jridgewell/trace-mapping@0.3.9": - version "0.3.9" - resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz#6534fd5933a53ba7cbf3a17615e273a0d1273ff9" - integrity sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ== - dependencies: - "@jridgewell/resolve-uri" "^3.0.3" - "@jridgewell/sourcemap-codec" "^1.4.10" - -"@metamask/eth-sig-util@^4.0.0": - version "4.0.1" - resolved "https://registry.yarnpkg.com/@metamask/eth-sig-util/-/eth-sig-util-4.0.1.tgz#3ad61f6ea9ad73ba5b19db780d40d9aae5157088" - integrity sha512-tghyZKLHZjcdlDqCA3gNZmLeR0XvOE9U1qoQO9ohyAZT6Pya+H9vkBPcsyXytmYLNgVoin7CKCmweo/R43V+tQ== - dependencies: - ethereumjs-abi "^0.6.8" - ethereumjs-util "^6.2.1" - ethjs-util "^0.1.6" - tweetnacl "^1.0.3" - tweetnacl-util "^0.15.1" - -"@morgan-stanley/ts-mocking-bird@^0.6.2": - version "0.6.4" - resolved "https://registry.yarnpkg.com/@morgan-stanley/ts-mocking-bird/-/ts-mocking-bird-0.6.4.tgz#2e4b60d42957bab3b50b67dbf14c3da2f62a39f7" - integrity sha512-57VJIflP8eR2xXa9cD1LUawh+Gh+BVQfVu0n6GALyg/AqV/Nz25kDRvws3i9kIe1PTrbsZZOYpsYp6bXPd6nVA== - dependencies: - lodash "^4.17.16" - uuid "^7.0.3" - -"@noble/hashes@1.2.0", "@noble/hashes@~1.2.0": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.2.0.tgz#a3150eeb09cc7ab207ebf6d7b9ad311a9bdbed12" - integrity sha512-FZfhjEDbT5GRswV3C6uvLPHMiVD6lQBmpoX5+eSiPaMTXte/IKqI5dykDxzZB/WBeK/CDuQRBWarPdi3FNY2zQ== - -"@noble/secp256k1@1.7.1", "@noble/secp256k1@~1.7.0": - version "1.7.1" - resolved "https://registry.yarnpkg.com/@noble/secp256k1/-/secp256k1-1.7.1.tgz#b251c70f824ce3ca7f8dc3df08d58f005cc0507c" - integrity sha512-hOUk6AyBFmqVrv7k5WAw/LpszxVbj9gGN4JRkIX52fdFAj1UA61KXmZDvqVEm+pOyec3+fIeZB02LYa/pWOArw== - -"@nodelib/fs.scandir@2.1.5": - version "2.1.5" - resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" - integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== - dependencies: - "@nodelib/fs.stat" "2.0.5" - run-parallel "^1.1.9" - -"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": - version "2.0.5" - resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" - integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== - -"@nodelib/fs.walk@^1.2.3": - version "1.2.8" - resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" - integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== - dependencies: - "@nodelib/fs.scandir" "2.1.5" - fastq "^1.6.0" - -"@nomicfoundation/ethereumjs-block@5.0.1": - version "5.0.1" - resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-block/-/ethereumjs-block-5.0.1.tgz#6f89664f55febbd723195b6d0974773d29ee133d" - integrity sha512-u1Yioemi6Ckj3xspygu/SfFvm8vZEO8/Yx5a1QLzi6nVU0jz3Pg2OmHKJ5w+D9Ogk1vhwRiqEBAqcb0GVhCyHw== - dependencies: - "@nomicfoundation/ethereumjs-common" "4.0.1" - "@nomicfoundation/ethereumjs-rlp" "5.0.1" - "@nomicfoundation/ethereumjs-trie" "6.0.1" - "@nomicfoundation/ethereumjs-tx" "5.0.1" - "@nomicfoundation/ethereumjs-util" "9.0.1" - ethereum-cryptography "0.1.3" - ethers "^5.7.1" - -"@nomicfoundation/ethereumjs-blockchain@7.0.1": - version "7.0.1" - resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-blockchain/-/ethereumjs-blockchain-7.0.1.tgz#80e0bd3535bfeb9baa29836b6f25123dab06a726" - integrity sha512-NhzndlGg829XXbqJEYrF1VeZhAwSPgsK/OB7TVrdzft3y918hW5KNd7gIZ85sn6peDZOdjBsAXIpXZ38oBYE5A== - dependencies: - "@nomicfoundation/ethereumjs-block" "5.0.1" - "@nomicfoundation/ethereumjs-common" "4.0.1" - "@nomicfoundation/ethereumjs-ethash" "3.0.1" - "@nomicfoundation/ethereumjs-rlp" "5.0.1" - "@nomicfoundation/ethereumjs-trie" "6.0.1" - "@nomicfoundation/ethereumjs-tx" "5.0.1" - "@nomicfoundation/ethereumjs-util" "9.0.1" - abstract-level "^1.0.3" - debug "^4.3.3" - ethereum-cryptography "0.1.3" - level "^8.0.0" - lru-cache "^5.1.1" - memory-level "^1.0.0" - -"@nomicfoundation/ethereumjs-common@4.0.1": - version "4.0.1" - resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-common/-/ethereumjs-common-4.0.1.tgz#4702d82df35b07b5407583b54a45bf728e46a2f0" - integrity sha512-OBErlkfp54GpeiE06brBW/TTbtbuBJV5YI5Nz/aB2evTDo+KawyEzPjBlSr84z/8MFfj8wS2wxzQX1o32cev5g== - dependencies: - "@nomicfoundation/ethereumjs-util" "9.0.1" - crc-32 "^1.2.0" - -"@nomicfoundation/ethereumjs-ethash@3.0.1": - version "3.0.1" - resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-ethash/-/ethereumjs-ethash-3.0.1.tgz#65ca494d53e71e8415c9a49ef48bc921c538fc41" - integrity sha512-KDjGIB5igzWOp8Ik5I6QiRH5DH+XgILlplsHR7TEuWANZA759G6krQ6o8bvj+tRUz08YygMQu/sGd9mJ1DYT8w== - dependencies: - "@nomicfoundation/ethereumjs-block" "5.0.1" - "@nomicfoundation/ethereumjs-rlp" "5.0.1" - "@nomicfoundation/ethereumjs-util" "9.0.1" - abstract-level "^1.0.3" - bigint-crypto-utils "^3.0.23" - ethereum-cryptography "0.1.3" - -"@nomicfoundation/ethereumjs-evm@2.0.1": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-evm/-/ethereumjs-evm-2.0.1.tgz#f35681e203363f69ce2b3d3bf9f44d4e883ca1f1" - integrity sha512-oL8vJcnk0Bx/onl+TgQOQ1t/534GKFaEG17fZmwtPFeH8S5soiBYPCLUrvANOl4sCp9elYxIMzIiTtMtNNN8EQ== - dependencies: - "@ethersproject/providers" "^5.7.1" - "@nomicfoundation/ethereumjs-common" "4.0.1" - "@nomicfoundation/ethereumjs-tx" "5.0.1" - "@nomicfoundation/ethereumjs-util" "9.0.1" - debug "^4.3.3" - ethereum-cryptography "0.1.3" - mcl-wasm "^0.7.1" - rustbn.js "~0.2.0" - -"@nomicfoundation/ethereumjs-rlp@5.0.1": - version "5.0.1" - resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-rlp/-/ethereumjs-rlp-5.0.1.tgz#0b30c1cf77d125d390408e391c4bb5291ef43c28" - integrity sha512-xtxrMGa8kP4zF5ApBQBtjlSbN5E2HI8m8FYgVSYAnO6ssUoY5pVPGy2H8+xdf/bmMa22Ce8nWMH3aEW8CcqMeQ== - -"@nomicfoundation/ethereumjs-statemanager@2.0.1": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-statemanager/-/ethereumjs-statemanager-2.0.1.tgz#8824a97938db4471911e2d2f140f79195def5935" - integrity sha512-B5ApMOnlruVOR7gisBaYwFX+L/AP7i/2oAahatssjPIBVDF6wTX1K7Qpa39E/nzsH8iYuL3krkYeUFIdO3EMUQ== - dependencies: - "@nomicfoundation/ethereumjs-common" "4.0.1" - "@nomicfoundation/ethereumjs-rlp" "5.0.1" - debug "^4.3.3" - ethereum-cryptography "0.1.3" - ethers "^5.7.1" - js-sdsl "^4.1.4" - -"@nomicfoundation/ethereumjs-trie@6.0.1": - version "6.0.1" - resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-trie/-/ethereumjs-trie-6.0.1.tgz#662c55f6b50659fd4b22ea9f806a7401cafb7717" - integrity sha512-A64It/IMpDVODzCgxDgAAla8jNjNtsoQZIzZUfIV5AY6Coi4nvn7+VReBn5itlxMiL2yaTlQr9TRWp3CSI6VoA== - dependencies: - "@nomicfoundation/ethereumjs-rlp" "5.0.1" - "@nomicfoundation/ethereumjs-util" "9.0.1" - "@types/readable-stream" "^2.3.13" - ethereum-cryptography "0.1.3" - readable-stream "^3.6.0" - -"@nomicfoundation/ethereumjs-tx@5.0.1": - version "5.0.1" - resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-tx/-/ethereumjs-tx-5.0.1.tgz#7629dc2036b4a33c34e9f0a592b43227ef4f0c7d" - integrity sha512-0HwxUF2u2hrsIM1fsasjXvlbDOq1ZHFV2dd1yGq8CA+MEYhaxZr8OTScpVkkxqMwBcc5y83FyPl0J9MZn3kY0w== - dependencies: - "@chainsafe/ssz" "^0.9.2" - "@ethersproject/providers" "^5.7.2" - "@nomicfoundation/ethereumjs-common" "4.0.1" - "@nomicfoundation/ethereumjs-rlp" "5.0.1" - "@nomicfoundation/ethereumjs-util" "9.0.1" - ethereum-cryptography "0.1.3" - -"@nomicfoundation/ethereumjs-util@9.0.1": - version "9.0.1" - resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-util/-/ethereumjs-util-9.0.1.tgz#530cda8bae33f8b5020a8f199ed1d0a2ce48ec89" - integrity sha512-TwbhOWQ8QoSCFhV/DDfSmyfFIHjPjFBj957219+V3jTZYZ2rf9PmDtNOeZWAE3p3vlp8xb02XGpd0v6nTUPbsA== - dependencies: - "@chainsafe/ssz" "^0.10.0" - "@nomicfoundation/ethereumjs-rlp" "5.0.1" - ethereum-cryptography "0.1.3" - -"@nomicfoundation/ethereumjs-vm@7.0.1": - version "7.0.1" - resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-vm/-/ethereumjs-vm-7.0.1.tgz#7d035e0993bcad10716c8b36e61dfb87fa3ca05f" - integrity sha512-rArhyn0jPsS/D+ApFsz3yVJMQ29+pVzNZ0VJgkzAZ+7FqXSRtThl1C1prhmlVr3YNUlfpZ69Ak+RUT4g7VoOuQ== - dependencies: - "@nomicfoundation/ethereumjs-block" "5.0.1" - "@nomicfoundation/ethereumjs-blockchain" "7.0.1" - "@nomicfoundation/ethereumjs-common" "4.0.1" - "@nomicfoundation/ethereumjs-evm" "2.0.1" - "@nomicfoundation/ethereumjs-rlp" "5.0.1" - "@nomicfoundation/ethereumjs-statemanager" "2.0.1" - "@nomicfoundation/ethereumjs-trie" "6.0.1" - "@nomicfoundation/ethereumjs-tx" "5.0.1" - "@nomicfoundation/ethereumjs-util" "9.0.1" - debug "^4.3.3" - ethereum-cryptography "0.1.3" - mcl-wasm "^0.7.1" - rustbn.js "~0.2.0" - -"@nomicfoundation/hardhat-chai-matchers@^1.0.0": - version "1.0.6" - resolved "https://registry.yarnpkg.com/@nomicfoundation/hardhat-chai-matchers/-/hardhat-chai-matchers-1.0.6.tgz#72a2e312e1504ee5dd73fe302932736432ba96bc" - integrity sha512-f5ZMNmabZeZegEfuxn/0kW+mm7+yV7VNDxLpMOMGXWFJ2l/Ct3QShujzDRF9cOkK9Ui/hbDeOWGZqyQALDXVCQ== - dependencies: - "@ethersproject/abi" "^5.1.2" - "@types/chai-as-promised" "^7.1.3" - chai-as-promised "^7.1.1" - deep-eql "^4.0.1" - ordinal "^1.0.3" - -"@nomicfoundation/hardhat-network-helpers@^1.0.0": - version "1.0.8" - resolved "https://registry.yarnpkg.com/@nomicfoundation/hardhat-network-helpers/-/hardhat-network-helpers-1.0.8.tgz#e4fe1be93e8a65508c46d73c41fa26c7e9f84931" - integrity sha512-MNqQbzUJZnCMIYvlniC3U+kcavz/PhhQSsY90tbEtUyMj/IQqsLwIRZa4ctjABh3Bz0KCh9OXUZ7Yk/d9hr45Q== - dependencies: - ethereumjs-util "^7.1.4" - -"@nomicfoundation/hardhat-toolbox@^2.0.0": - version "2.0.2" - resolved "https://registry.yarnpkg.com/@nomicfoundation/hardhat-toolbox/-/hardhat-toolbox-2.0.2.tgz#ec95f23b53cb4e71a1a7091380fa223aad18f156" - integrity sha512-vnN1AzxbvpSx9pfdRHbUzTRIXpMLPXnUlkW855VaDk6N1pwRaQ2gNzEmFAABk4lWf11E00PKwFd/q27HuwYrYg== - -"@nomicfoundation/solidity-analyzer-darwin-arm64@0.1.1": - version "0.1.1" - resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-darwin-arm64/-/solidity-analyzer-darwin-arm64-0.1.1.tgz#4c858096b1c17fe58a474fe81b46815f93645c15" - integrity sha512-KcTodaQw8ivDZyF+D76FokN/HdpgGpfjc/gFCImdLUyqB6eSWVaZPazMbeAjmfhx3R0zm/NYVzxwAokFKgrc0w== - -"@nomicfoundation/solidity-analyzer-darwin-x64@0.1.1": - version "0.1.1" - resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-darwin-x64/-/solidity-analyzer-darwin-x64-0.1.1.tgz#6e25ccdf6e2d22389c35553b64fe6f3fdaec432c" - integrity sha512-XhQG4BaJE6cIbjAVtzGOGbK3sn1BO9W29uhk9J8y8fZF1DYz0Doj8QDMfpMu+A6TjPDs61lbsmeYodIDnfveSA== - -"@nomicfoundation/solidity-analyzer-freebsd-x64@0.1.1": - version "0.1.1" - resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-freebsd-x64/-/solidity-analyzer-freebsd-x64-0.1.1.tgz#0a224ea50317139caeebcdedd435c28a039d169c" - integrity sha512-GHF1VKRdHW3G8CndkwdaeLkVBi5A9u2jwtlS7SLhBc8b5U/GcoL39Q+1CSO3hYqePNP+eV5YI7Zgm0ea6kMHoA== - -"@nomicfoundation/solidity-analyzer-linux-arm64-gnu@0.1.1": - version "0.1.1" - resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-linux-arm64-gnu/-/solidity-analyzer-linux-arm64-gnu-0.1.1.tgz#dfa085d9ffab9efb2e7b383aed3f557f7687ac2b" - integrity sha512-g4Cv2fO37ZsUENQ2vwPnZc2zRenHyAxHcyBjKcjaSmmkKrFr64yvzeNO8S3GBFCo90rfochLs99wFVGT/0owpg== - -"@nomicfoundation/solidity-analyzer-linux-arm64-musl@0.1.1": - version "0.1.1" - resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-linux-arm64-musl/-/solidity-analyzer-linux-arm64-musl-0.1.1.tgz#c9e06b5d513dd3ab02a7ac069c160051675889a4" - integrity sha512-WJ3CE5Oek25OGE3WwzK7oaopY8xMw9Lhb0mlYuJl/maZVo+WtP36XoQTb7bW/i8aAdHW5Z+BqrHMux23pvxG3w== - -"@nomicfoundation/solidity-analyzer-linux-x64-gnu@0.1.1": - version "0.1.1" - resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-linux-x64-gnu/-/solidity-analyzer-linux-x64-gnu-0.1.1.tgz#8d328d16839e52571f72f2998c81e46bf320f893" - integrity sha512-5WN7leSr5fkUBBjE4f3wKENUy9HQStu7HmWqbtknfXkkil+eNWiBV275IOlpXku7v3uLsXTOKpnnGHJYI2qsdA== - -"@nomicfoundation/solidity-analyzer-linux-x64-musl@0.1.1": - version "0.1.1" - resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-linux-x64-musl/-/solidity-analyzer-linux-x64-musl-0.1.1.tgz#9b49d0634b5976bb5ed1604a1e1b736f390959bb" - integrity sha512-KdYMkJOq0SYPQMmErv/63CwGwMm5XHenEna9X9aB8mQmhDBrYrlAOSsIPgFCUSL0hjxE3xHP65/EPXR/InD2+w== - -"@nomicfoundation/solidity-analyzer-win32-arm64-msvc@0.1.1": - version "0.1.1" - resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-win32-arm64-msvc/-/solidity-analyzer-win32-arm64-msvc-0.1.1.tgz#e2867af7264ebbcc3131ef837878955dd6a3676f" - integrity sha512-VFZASBfl4qiBYwW5xeY20exWhmv6ww9sWu/krWSesv3q5hA0o1JuzmPHR4LPN6SUZj5vcqci0O6JOL8BPw+APg== - -"@nomicfoundation/solidity-analyzer-win32-ia32-msvc@0.1.1": - version "0.1.1" - resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-win32-ia32-msvc/-/solidity-analyzer-win32-ia32-msvc-0.1.1.tgz#0685f78608dd516c8cdfb4896ed451317e559585" - integrity sha512-JnFkYuyCSA70j6Si6cS1A9Gh1aHTEb8kOTBApp/c7NRTFGNMH8eaInKlyuuiIbvYFhlXW4LicqyYuWNNq9hkpQ== - -"@nomicfoundation/solidity-analyzer-win32-x64-msvc@0.1.1": - version "0.1.1" - resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-win32-x64-msvc/-/solidity-analyzer-win32-x64-msvc-0.1.1.tgz#c9a44f7108646f083b82e851486e0f6aeb785836" - integrity sha512-HrVJr6+WjIXGnw3Q9u6KQcbZCtk0caVWhCdFADySvRyUxJ8PnzlaP+MhwNE8oyT8OZ6ejHBRrrgjSqDCFXGirw== - -"@nomicfoundation/solidity-analyzer@^0.1.0": - version "0.1.1" - resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer/-/solidity-analyzer-0.1.1.tgz#f5f4d36d3f66752f59a57e7208cd856f3ddf6f2d" - integrity sha512-1LMtXj1puAxyFusBgUIy5pZk3073cNXYnXUpuNKFghHbIit/xZgbk0AokpUADbNm3gyD6bFWl3LRFh3dhVdREg== - optionalDependencies: - "@nomicfoundation/solidity-analyzer-darwin-arm64" "0.1.1" - "@nomicfoundation/solidity-analyzer-darwin-x64" "0.1.1" - "@nomicfoundation/solidity-analyzer-freebsd-x64" "0.1.1" - "@nomicfoundation/solidity-analyzer-linux-arm64-gnu" "0.1.1" - "@nomicfoundation/solidity-analyzer-linux-arm64-musl" "0.1.1" - "@nomicfoundation/solidity-analyzer-linux-x64-gnu" "0.1.1" - "@nomicfoundation/solidity-analyzer-linux-x64-musl" "0.1.1" - "@nomicfoundation/solidity-analyzer-win32-arm64-msvc" "0.1.1" - "@nomicfoundation/solidity-analyzer-win32-ia32-msvc" "0.1.1" - "@nomicfoundation/solidity-analyzer-win32-x64-msvc" "0.1.1" - -"@nomiclabs/hardhat-ethers@npm:hardhat-deploy-ethers": - version "0.3.0-beta.13" - resolved "https://registry.yarnpkg.com/hardhat-deploy-ethers/-/hardhat-deploy-ethers-0.3.0-beta.13.tgz#b96086ff768ddf69928984d5eb0a8d78cfca9366" - integrity sha512-PdWVcKB9coqWV1L7JTpfXRCI91Cgwsm7KLmBcwZ8f0COSm1xtABHZTyz3fvF6p42cTnz1VM0QnfDvMFlIRkSNw== - -"@nomiclabs/hardhat-etherscan@^3.0.0": - version "3.1.7" - resolved "https://registry.yarnpkg.com/@nomiclabs/hardhat-etherscan/-/hardhat-etherscan-3.1.7.tgz#72e3d5bd5d0ceb695e097a7f6f5ff6fcbf062b9a" - integrity sha512-tZ3TvSgpvsQ6B6OGmo1/Au6u8BrAkvs1mIC/eURA3xgIfznUZBhmpne8hv7BXUzw9xNL3fXdpOYgOQlVMTcoHQ== - dependencies: - "@ethersproject/abi" "^5.1.2" - "@ethersproject/address" "^5.0.2" - cbor "^8.1.0" - chalk "^2.4.2" - debug "^4.1.1" - fs-extra "^7.0.1" - lodash "^4.17.11" - semver "^6.3.0" - table "^6.8.0" - undici "^5.14.0" - -"@openzeppelin/contract-loader@^0.6.2": - version "0.6.3" - resolved "https://registry.yarnpkg.com/@openzeppelin/contract-loader/-/contract-loader-0.6.3.tgz#61a7b44de327e40b7d53f39e0fb59bbf847335c3" - integrity sha512-cOFIjBjwbGgZhDZsitNgJl0Ye1rd5yu/Yx5LMgeq3u0ZYzldm4uObzHDFq4gjDdoypvyORjjJa3BlFA7eAnVIg== - dependencies: - find-up "^4.1.0" - fs-extra "^8.1.0" - -"@openzeppelin/contracts-upgradeable@^4.8.3": - version "4.8.3" - resolved "https://registry.yarnpkg.com/@openzeppelin/contracts-upgradeable/-/contracts-upgradeable-4.8.3.tgz#6b076a7b751811b90fe3a172a7faeaa603e13a3f" - integrity sha512-SXDRl7HKpl2WDoJpn7CK/M9U4Z8gNXDHHChAKh0Iz+Wew3wu6CmFYBeie3je8V0GSXZAIYYwUktSrnW/kwVPtg== - -"@openzeppelin/contracts@^4.8.3": - version "4.8.3" - resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-4.8.3.tgz#cbef3146bfc570849405f59cba18235da95a252a" - integrity sha512-bQHV8R9Me8IaJoJ2vPG4rXcL7seB7YVuskr4f+f5RyOStSZetwzkWtoqDMl5erkBJy0lDRUnIR2WIkPiC0GJlg== - -"@openzeppelin/hardhat-upgrades@^1.23.1": - version "1.24.0" - resolved "https://registry.yarnpkg.com/@openzeppelin/hardhat-upgrades/-/hardhat-upgrades-1.24.0.tgz#b56f9858fcbb852d5db7caa9cc0367fa1239a64d" - integrity sha512-PmNf6y1eXSZ4k4f6Y42mcHeMfwY81MBiuh6vne+fOnWNZANCpjMV9b2Dy7SoS6IgFjq0umAtQYBsHWVWiaMSaw== - dependencies: - "@openzeppelin/upgrades-core" "^1.25.0" - chalk "^4.1.0" - debug "^4.1.1" - proper-lockfile "^4.1.1" - -"@openzeppelin/test-helpers@^0.5.16": - version "0.5.16" - resolved "https://registry.yarnpkg.com/@openzeppelin/test-helpers/-/test-helpers-0.5.16.tgz#2c9054f85069dfbfb5e8cef3ed781e8caf241fb3" - integrity sha512-T1EvspSfH1qQO/sgGlskLfYVBbqzJR23SZzYl/6B2JnT4EhThcI85UpvDk0BkLWKaDScQTabGHt4GzHW+3SfZg== - dependencies: - "@openzeppelin/contract-loader" "^0.6.2" - "@truffle/contract" "^4.0.35" - ansi-colors "^3.2.3" - chai "^4.2.0" - chai-bn "^0.2.1" - ethjs-abi "^0.2.1" - lodash.flatten "^4.4.0" - semver "^5.6.0" - web3 "^1.2.5" - web3-utils "^1.2.5" - -"@openzeppelin/upgrades-core@^1.25.0": - version "1.25.0" - resolved "https://registry.yarnpkg.com/@openzeppelin/upgrades-core/-/upgrades-core-1.25.0.tgz#4f540e2043b98f8b59a4e8a988b9aeb5b5f23a35" - integrity sha512-vSxOSm1k+P156nNm15ydhOmSPGC37mnl092FMVOH+eGaoqLjr2Za6ULVjDMFzvMnG+sGE1UoDOqBNPfTm0ch8w== - dependencies: - cbor "^8.0.0" - chalk "^4.1.0" - compare-versions "^5.0.0" - debug "^4.1.1" - ethereumjs-util "^7.0.3" - proper-lockfile "^4.1.1" - solidity-ast "^0.4.15" - -"@scure/base@~1.1.0": - version "1.1.1" - resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.1.1.tgz#ebb651ee52ff84f420097055f4bf46cfba403938" - integrity sha512-ZxOhsSyxYwLJj3pLZCefNitxsj093tb2vq90mp2txoYeBqbcjDjqFhyM8eUjq/uFm6zJ+mUuqxlS2FkuSY1MTA== - -"@scure/bip32@1.1.5": - version "1.1.5" - resolved "https://registry.yarnpkg.com/@scure/bip32/-/bip32-1.1.5.tgz#d2ccae16dcc2e75bc1d75f5ef3c66a338d1ba300" - integrity sha512-XyNh1rB0SkEqd3tXcXMi+Xe1fvg+kUIcoRIEujP1Jgv7DqW2r9lg3Ah0NkFaCs9sTkQAQA8kw7xiRXzENi9Rtw== - dependencies: - "@noble/hashes" "~1.2.0" - "@noble/secp256k1" "~1.7.0" - "@scure/base" "~1.1.0" - -"@scure/bip39@1.1.1": - version "1.1.1" - resolved "https://registry.yarnpkg.com/@scure/bip39/-/bip39-1.1.1.tgz#b54557b2e86214319405db819c4b6a370cf340c5" - integrity sha512-t+wDck2rVkh65Hmv280fYdVdY25J9YeEUIgn2LG1WM6gxFkGzcksoDiUkWVpVp3Oex9xGC68JU2dSbUfwZ2jPg== - dependencies: - "@noble/hashes" "~1.2.0" - "@scure/base" "~1.1.0" - -"@sentry/core@5.30.0": - version "5.30.0" - resolved "https://registry.yarnpkg.com/@sentry/core/-/core-5.30.0.tgz#6b203664f69e75106ee8b5a2fe1d717379b331f3" - integrity sha512-TmfrII8w1PQZSZgPpUESqjB+jC6MvZJZdLtE/0hZ+SrnKhW3x5WlYLvTXZpcWePYBku7rl2wn1RZu6uT0qCTeg== - dependencies: - "@sentry/hub" "5.30.0" - "@sentry/minimal" "5.30.0" - "@sentry/types" "5.30.0" - "@sentry/utils" "5.30.0" - tslib "^1.9.3" - -"@sentry/hub@5.30.0": - version "5.30.0" - resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-5.30.0.tgz#2453be9b9cb903404366e198bd30c7ca74cdc100" - integrity sha512-2tYrGnzb1gKz2EkMDQcfLrDTvmGcQPuWxLnJKXJvYTQDGLlEvi2tWz1VIHjunmOvJrB5aIQLhm+dcMRwFZDCqQ== - dependencies: - "@sentry/types" "5.30.0" - "@sentry/utils" "5.30.0" - tslib "^1.9.3" - -"@sentry/minimal@5.30.0": - version "5.30.0" - resolved "https://registry.yarnpkg.com/@sentry/minimal/-/minimal-5.30.0.tgz#ce3d3a6a273428e0084adcb800bc12e72d34637b" - integrity sha512-BwWb/owZKtkDX+Sc4zCSTNcvZUq7YcH3uAVlmh/gtR9rmUvbzAA3ewLuB3myi4wWRAMEtny6+J/FN/x+2wn9Xw== - dependencies: - "@sentry/hub" "5.30.0" - "@sentry/types" "5.30.0" - tslib "^1.9.3" - -"@sentry/node@^5.18.1": - version "5.30.0" - resolved "https://registry.yarnpkg.com/@sentry/node/-/node-5.30.0.tgz#4ca479e799b1021285d7fe12ac0858951c11cd48" - integrity sha512-Br5oyVBF0fZo6ZS9bxbJZG4ApAjRqAnqFFurMVJJdunNb80brh7a5Qva2kjhm+U6r9NJAB5OmDyPkA1Qnt+QVg== - dependencies: - "@sentry/core" "5.30.0" - "@sentry/hub" "5.30.0" - "@sentry/tracing" "5.30.0" - "@sentry/types" "5.30.0" - "@sentry/utils" "5.30.0" - cookie "^0.4.1" - https-proxy-agent "^5.0.0" - lru_map "^0.3.3" - tslib "^1.9.3" - -"@sentry/tracing@5.30.0": - version "5.30.0" - resolved "https://registry.yarnpkg.com/@sentry/tracing/-/tracing-5.30.0.tgz#501d21f00c3f3be7f7635d8710da70d9419d4e1f" - integrity sha512-dUFowCr0AIMwiLD7Fs314Mdzcug+gBVo/+NCMyDw8tFxJkwWAKl7Qa2OZxLQ0ZHjakcj1hNKfCQJ9rhyfOl4Aw== - dependencies: - "@sentry/hub" "5.30.0" - "@sentry/minimal" "5.30.0" - "@sentry/types" "5.30.0" - "@sentry/utils" "5.30.0" - tslib "^1.9.3" - -"@sentry/types@5.30.0": - version "5.30.0" - resolved "https://registry.yarnpkg.com/@sentry/types/-/types-5.30.0.tgz#19709bbe12a1a0115bc790b8942917da5636f402" - integrity sha512-R8xOqlSTZ+htqrfteCWU5Nk0CDN5ApUTvrlvBuiH1DyP6czDZ4ktbZB0hAgBlVcK0U+qpD3ag3Tqqpa5Q67rPw== - -"@sentry/utils@5.30.0": - version "5.30.0" - resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-5.30.0.tgz#9a5bd7ccff85ccfe7856d493bffa64cabc41e980" - integrity sha512-zaYmoH0NWWtvnJjC9/CBseXMtKHm/tm40sz3YfJRxeQjyzRqNQPgivpd9R/oDJCYj999mzdW382p/qi2ypjLww== - dependencies: - "@sentry/types" "5.30.0" - tslib "^1.9.3" - -"@sindresorhus/is@^4.0.0", "@sindresorhus/is@^4.6.0": - version "4.6.0" - resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-4.6.0.tgz#3c7c9c46e678feefe7a2e5bb609d3dbd665ffb3f" - integrity sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw== - -"@solidity-parser/parser@^0.14.0", "@solidity-parser/parser@^0.14.1": - version "0.14.5" - resolved "https://registry.yarnpkg.com/@solidity-parser/parser/-/parser-0.14.5.tgz#87bc3cc7b068e08195c219c91cd8ddff5ef1a804" - integrity sha512-6dKnHZn7fg/iQATVEzqyUOyEidbn05q7YA2mQ9hC0MMXhhV3/JrsxmFSYZAcr7j1yUP700LLhTruvJ3MiQmjJg== - dependencies: - antlr4ts "^0.5.0-alpha.4" - -"@szmarczak/http-timer@^4.0.5": - version "4.0.6" - resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-4.0.6.tgz#b4a914bb62e7c272d4e5989fe4440f812ab1d807" - integrity sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w== - dependencies: - defer-to-connect "^2.0.0" - -"@szmarczak/http-timer@^5.0.1": - version "5.0.1" - resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-5.0.1.tgz#c7c1bf1141cdd4751b0399c8fc7b8b664cd5be3a" - integrity sha512-+PmQX0PiAYPMeVYe237LJAYvOMYW1j2rH5YROyS3b4CTVJum34HfRvKvAzozHAQG0TnHNdUfY9nCeUyRAs//cw== - dependencies: - defer-to-connect "^2.0.1" - -"@truffle/abi-utils@^0.3.9": - version "0.3.9" - resolved "https://registry.yarnpkg.com/@truffle/abi-utils/-/abi-utils-0.3.9.tgz#c476f5cfe01072b513b3e93fd7bea05cf7bd9d96" - integrity sha512-G5dqgwRHx5zwlXjz3QT8OJVfB2cOqWwD6DwKso0KttUt/zejhCjnkKq72rSgyeLMkz7wBB9ERLOsupLBILM8MA== - dependencies: - change-case "3.0.2" - fast-check "3.1.1" - web3-utils "1.8.2" - -"@truffle/blockchain-utils@^0.1.7": - version "0.1.7" - resolved "https://registry.yarnpkg.com/@truffle/blockchain-utils/-/blockchain-utils-0.1.7.tgz#cf7923a3ae5b591ae4c2a5ee45994a310ccaf1ee" - integrity sha512-1nibqGjEHC7KAyDThEFvbm2+EO8zAHee/VjCtxkYBE3ySwP50joh0QCEBjy7K/9z+icpMoDucfxmgaKToBFUgQ== - -"@truffle/codec@^0.14.17": - version "0.14.17" - resolved "https://registry.yarnpkg.com/@truffle/codec/-/codec-0.14.17.tgz#4ab11fab335854dad0d4aef75db2960ebd76fcd8" - integrity sha512-kD4dD86huLeaBEq5R8D1zleJEu6NsXbyYLdXl1V1TKdiO8odw5CBC6Y/+wdu5d3t1dyEYrTbhn1dqknZa52pmw== - dependencies: - "@truffle/abi-utils" "^0.3.9" - "@truffle/compile-common" "^0.9.4" - big.js "^6.0.3" - bn.js "^5.1.3" - cbor "^5.2.0" - debug "^4.3.1" - lodash "^4.17.21" - semver "7.3.7" - utf8 "^3.0.0" - web3-utils "1.8.2" - -"@truffle/compile-common@^0.9.4": - version "0.9.4" - resolved "https://registry.yarnpkg.com/@truffle/compile-common/-/compile-common-0.9.4.tgz#064208cda70491692b538f717809bb904a122c20" - integrity sha512-mnqJB/hLiPHNf+WKwt/2MH6lv34xSG/SFCib7+ckAklutUqVLeFo8EwQxinuHNkU7LY0C+YgZXhK1WTCO5YRJQ== - dependencies: - "@truffle/error" "^0.2.0" - colors "1.4.0" - -"@truffle/contract-schema@^3.4.13": - version "3.4.13" - resolved "https://registry.yarnpkg.com/@truffle/contract-schema/-/contract-schema-3.4.13.tgz#48447673f29380830f5821e8139ceefbbd545aac" - integrity sha512-emG7upuryYFrsPDbHqeASPWXL824M1tinhQwSPG0phSoa3g+RX9fUNNN/VPmF3tSkXLWUMhRnb7ehxnaCuRbZg== - dependencies: - ajv "^6.10.0" - debug "^4.3.1" - -"@truffle/contract@^4.0.35": - version "4.6.20" - resolved "https://registry.yarnpkg.com/@truffle/contract/-/contract-4.6.20.tgz#48237b9d3fe3e5019eac2c8ce9794201ae84fdf8" - integrity sha512-s7Mbc37L/CF5Apy/cjPnalkgACmG9tTAmcIW28cIZLRLOUAze18pqhtdHryxAQhEOtKGaDAho6TriqL7/74uHw== - dependencies: - "@ensdomains/ensjs" "^2.1.0" - "@truffle/blockchain-utils" "^0.1.7" - "@truffle/contract-schema" "^3.4.13" - "@truffle/debug-utils" "^6.0.48" - "@truffle/error" "^0.2.0" - "@truffle/interface-adapter" "^0.5.32" - bignumber.js "^7.2.1" - debug "^4.3.1" - ethers "^4.0.32" - web3 "1.8.2" - web3-core-helpers "1.8.2" - web3-core-promievent "1.8.2" - web3-eth-abi "1.8.2" - web3-utils "1.8.2" - -"@truffle/debug-utils@^6.0.48": - version "6.0.48" - resolved "https://registry.yarnpkg.com/@truffle/debug-utils/-/debug-utils-6.0.48.tgz#218caa0e00d95a03abadb05dfe63d621530e113a" - integrity sha512-HdK/7eH5EFrcTPeZVEgKaKkkzuZ4xsrH8yw+EoLEsScLsOEuQeKynY61NctjuU93voATWrYmV99Sfb/MRq2i2g== - dependencies: - "@truffle/codec" "^0.14.17" - "@trufflesuite/chromafi" "^3.0.0" - bn.js "^5.1.3" - chalk "^2.4.2" - debug "^4.3.1" - highlightjs-solidity "^2.0.6" - -"@truffle/error@^0.2.0": - version "0.2.0" - resolved "https://registry.yarnpkg.com/@truffle/error/-/error-0.2.0.tgz#65de6f03f5c041f883cc87677eecf8231428f1ab" - integrity sha512-Fe0/z4WWb7IP2gBnv3l6zqP87Y0kSMs7oiSLakKJq17q3GUunrHSdioKuNspdggxkXIBhEQLhi8C+LJdwmHKWQ== - -"@truffle/interface-adapter@^0.5.32": - version "0.5.32" - resolved "https://registry.yarnpkg.com/@truffle/interface-adapter/-/interface-adapter-0.5.32.tgz#2ae896ea85a9d267abcd5d0139afc0f06ebc5745" - integrity sha512-7Hgmdb4nJUcWtq4vvgWY7Mr2RLOTOp5FZaWyMiFmjkcEEhDlezm2QstALWAXgT0W6q7tDmDBpw3vTIFenRhHBA== - dependencies: - bn.js "^5.1.3" - ethers "^4.0.32" - web3 "1.8.2" - -"@trufflesuite/chromafi@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@trufflesuite/chromafi/-/chromafi-3.0.0.tgz#f6956408c1af6a38a6ed1657783ce59504a1eb8b" - integrity sha512-oqWcOqn8nT1bwlPPfidfzS55vqcIDdpfzo3HbU9EnUmcSTX+I8z0UyUFI3tZQjByVJulbzxHxUGS3ZJPwK/GPQ== - dependencies: - camelcase "^4.1.0" - chalk "^2.3.2" - cheerio "^1.0.0-rc.2" - detect-indent "^5.0.0" - highlight.js "^10.4.1" - lodash.merge "^4.6.2" - strip-ansi "^4.0.0" - strip-indent "^2.0.0" - -"@tsconfig/node10@^1.0.7": - version "1.0.9" - resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.9.tgz#df4907fc07a886922637b15e02d4cebc4c0021b2" - integrity sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA== - -"@tsconfig/node12@^1.0.7": - version "1.0.11" - resolved "https://registry.yarnpkg.com/@tsconfig/node12/-/node12-1.0.11.tgz#ee3def1f27d9ed66dac6e46a295cffb0152e058d" - integrity sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag== - -"@tsconfig/node14@^1.0.0": - version "1.0.3" - resolved "https://registry.yarnpkg.com/@tsconfig/node14/-/node14-1.0.3.tgz#e4386316284f00b98435bf40f72f75a09dabf6c1" - integrity sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow== - -"@tsconfig/node16@^1.0.2": - version "1.0.3" - resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.3.tgz#472eaab5f15c1ffdd7f8628bd4c4f753995ec79e" - integrity sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ== - -"@typechain/ethers-v5@^10.1.0": - version "10.2.0" - resolved "https://registry.yarnpkg.com/@typechain/ethers-v5/-/ethers-v5-10.2.0.tgz#68f5963efb5214cb2d881477228e4b5b315473e1" - integrity sha512-ikaq0N/w9fABM+G01OFmU3U3dNnyRwEahkdvi9mqy1a3XwKiPZaF/lu54OcNaEWnpvEYyhhS0N7buCtLQqC92w== - dependencies: - lodash "^4.17.15" - ts-essentials "^7.0.1" - -"@typechain/hardhat@^6.1.2": - version "6.1.5" - resolved "https://registry.yarnpkg.com/@typechain/hardhat/-/hardhat-6.1.5.tgz#caad58a1d3e9cd88061a584eb4f4fa763d5dcad1" - integrity sha512-lg7LW4qDZpxFMknp3Xool61Fg6Lays8F8TXdFGBG+MxyYcYU5795P1U2XdStuzGq9S2Dzdgh+1jGww9wvZ6r4Q== - dependencies: - fs-extra "^9.1.0" - -"@types/bn.js@^4.11.3": - version "4.11.6" - resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-4.11.6.tgz#c306c70d9358aaea33cd4eda092a742b9505967c" - integrity sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg== - dependencies: - "@types/node" "*" - -"@types/bn.js@^5.1.0", "@types/bn.js@^5.1.1": - version "5.1.1" - resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-5.1.1.tgz#b51e1b55920a4ca26e9285ff79936bbdec910682" - integrity sha512-qNrYbZqMx0uJAfKnKclPh+dTwK33KfLHYqtyODwd5HnXOjnkhc4qgn3BrK6RWyGZm5+sIFE7Q7Vz6QQtJB7w7g== - dependencies: - "@types/node" "*" - -"@types/cacheable-request@^6.0.1", "@types/cacheable-request@^6.0.2": - version "6.0.3" - resolved "https://registry.yarnpkg.com/@types/cacheable-request/-/cacheable-request-6.0.3.tgz#a430b3260466ca7b5ca5bfd735693b36e7a9d183" - integrity sha512-IQ3EbTzGxIigb1I3qPZc1rWJnH0BmSKv5QYTalEwweFvyBDLSAe24zP0le/hyi7ecGfZVlIVAg4BZqb8WBwKqw== - dependencies: - "@types/http-cache-semantics" "*" - "@types/keyv" "^3.1.4" - "@types/node" "*" - "@types/responselike" "^1.0.0" - -"@types/chai-as-promised@^7.1.3": - version "7.1.5" - resolved "https://registry.yarnpkg.com/@types/chai-as-promised/-/chai-as-promised-7.1.5.tgz#6e016811f6c7a64f2eed823191c3a6955094e255" - integrity sha512-jStwss93SITGBwt/niYrkf2C+/1KTeZCZl1LaeezTlqppAKeoQC7jxyqYuP72sxBGKCIbw7oHgbYssIRzT5FCQ== - dependencies: - "@types/chai" "*" - -"@types/chai@*", "@types/chai@^4.2.0": - version "4.3.5" - resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.3.5.tgz#ae69bcbb1bebb68c4ac0b11e9d8ed04526b3562b" - integrity sha512-mEo1sAde+UCE6b2hxn332f1g1E8WfYRu6p5SvTKr2ZKC1f7gFJXk4h5PyGP9Dt6gCaG8y8XhwnXWC6Iy2cmBng== - -"@types/concat-stream@^1.6.0": - version "1.6.1" - resolved "https://registry.yarnpkg.com/@types/concat-stream/-/concat-stream-1.6.1.tgz#24bcfc101ecf68e886aaedce60dfd74b632a1b74" - integrity sha512-eHE4cQPoj6ngxBZMvVf6Hw7Mh4jMW4U9lpGmS5GBPB9RYxlFg+CHaVN7ErNY4W9XfLIEn20b4VDYaIrbq0q4uA== - dependencies: - "@types/node" "*" - -"@types/form-data@0.0.33": - version "0.0.33" - resolved "https://registry.yarnpkg.com/@types/form-data/-/form-data-0.0.33.tgz#c9ac85b2a5fd18435b8c85d9ecb50e6d6c893ff8" - integrity sha512-8BSvG1kGm83cyJITQMZSulnl6QV8jqAGreJsc5tPu1Jq0vTSOiY/k24Wx82JRpWwZSqrala6sd5rWi6aNXvqcw== - dependencies: - "@types/node" "*" - -"@types/glob@^7.1.1": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.2.0.tgz#bc1b5bf3aa92f25bd5dd39f35c57361bdce5b2eb" - integrity sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA== - dependencies: - "@types/minimatch" "*" - "@types/node" "*" - -"@types/http-cache-semantics@*": - version "4.0.1" - resolved "https://registry.yarnpkg.com/@types/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz#0ea7b61496902b95890dc4c3a116b60cb8dae812" - integrity sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ== - -"@types/keyv@^3.1.4": - version "3.1.4" - resolved "https://registry.yarnpkg.com/@types/keyv/-/keyv-3.1.4.tgz#3ccdb1c6751b0c7e52300bcdacd5bcbf8faa75b6" - integrity sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg== - dependencies: - "@types/node" "*" - -"@types/lru-cache@^5.1.0": - version "5.1.1" - resolved "https://registry.yarnpkg.com/@types/lru-cache/-/lru-cache-5.1.1.tgz#c48c2e27b65d2a153b19bfc1a317e30872e01eef" - integrity sha512-ssE3Vlrys7sdIzs5LOxCzTVMsU7i9oa/IaW92wF32JFb3CVczqOkru2xspuKczHEbG3nvmPY7IFqVmGGHdNbYw== - -"@types/minimatch@*": - version "5.1.2" - resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-5.1.2.tgz#07508b45797cb81ec3f273011b054cd0755eddca" - integrity sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA== - -"@types/mocha@>=9.1.0": - version "10.0.1" - resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-10.0.1.tgz#2f4f65bb08bc368ac39c96da7b2f09140b26851b" - integrity sha512-/fvYntiO1GeICvqbQ3doGDIP97vWmvFt83GKguJ6prmQM2iXZfFcq6YE8KteFyRtX2/h5Hf91BYvPodJKFYv5Q== - -"@types/node@*", "@types/node@>=12.0.0": - version "20.0.0" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.0.0.tgz#081d9afd28421be956c1a47ced1c9a0034b467e2" - integrity sha512-cD2uPTDnQQCVpmRefonO98/PPijuOnnEy5oytWJFPY1N9aJCz2wJ5kSGWO+zJoed2cY2JxQh6yBuUq4vIn61hw== - -"@types/node@^10.0.3": - version "10.17.60" - resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.60.tgz#35f3d6213daed95da7f0f73e75bcc6980e90597b" - integrity sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw== - -"@types/node@^12.12.6": - version "12.20.55" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.55.tgz#c329cbd434c42164f846b909bd6f85b5537f6240" - integrity sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ== - -"@types/node@^8.0.0": - version "8.10.66" - resolved "https://registry.yarnpkg.com/@types/node/-/node-8.10.66.tgz#dd035d409df322acc83dff62a602f12a5783bbb3" - integrity sha512-tktOkFUA4kXx2hhhrB8bIFb5TbwzS4uOhKEmwiD+NoiL0qtP2OQ9mFldbgD4dV1djrlBYP6eBuQZiWjuHUpqFw== - -"@types/pbkdf2@^3.0.0": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@types/pbkdf2/-/pbkdf2-3.1.0.tgz#039a0e9b67da0cdc4ee5dab865caa6b267bb66b1" - integrity sha512-Cf63Rv7jCQ0LaL8tNXmEyqTHuIJxRdlS5vMh1mj5voN4+QFhVZnlZruezqpWYDiJ8UTzhP0VmeLXCmBk66YrMQ== - dependencies: - "@types/node" "*" - -"@types/prettier@^2.1.1": - version "2.7.2" - resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.7.2.tgz#6c2324641cc4ba050a8c710b2b251b377581fbf0" - integrity sha512-KufADq8uQqo1pYKVIYzfKbJfBAc0sOeXqGbFaSpv8MRmC/zXgowNZmFcbngndGk922QDmOASEXUZCaY48gs4cg== - -"@types/qs@^6.2.31", "@types/qs@^6.9.7": - version "6.9.7" - resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.7.tgz#63bb7d067db107cc1e457c303bc25d511febf6cb" - integrity sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw== - -"@types/readable-stream@^2.3.13": - version "2.3.15" - resolved "https://registry.yarnpkg.com/@types/readable-stream/-/readable-stream-2.3.15.tgz#3d79c9ceb1b6a57d5f6e6976f489b9b5384321ae" - integrity sha512-oM5JSKQCcICF1wvGgmecmHldZ48OZamtMxcGGVICOJA8o8cahXC1zEVAif8iwoc5j8etxFaRFnf095+CDsuoFQ== - dependencies: - "@types/node" "*" - safe-buffer "~5.1.1" - -"@types/responselike@^1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@types/responselike/-/responselike-1.0.0.tgz#251f4fe7d154d2bad125abe1b429b23afd262e29" - integrity sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA== - dependencies: - "@types/node" "*" - -"@types/secp256k1@^4.0.1": - version "4.0.3" - resolved "https://registry.yarnpkg.com/@types/secp256k1/-/secp256k1-4.0.3.tgz#1b8e55d8e00f08ee7220b4d59a6abe89c37a901c" - integrity sha512-Da66lEIFeIz9ltsdMZcpQvmrmmoqrfju8pm1BH8WbYjZSwUgCwXLb9C+9XYogwBITnbsSaMdVPb2ekf7TV+03w== - dependencies: - "@types/node" "*" - -abbrev@1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" - integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== - -abbrev@1.0.x: - version "1.0.9" - resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.0.9.tgz#91b4792588a7738c25f35dd6f63752a2f8776135" - integrity sha512-LEyx4aLEC3x6T0UguF6YILf+ntvmOaWsVfENmIW0E9H09vKlLDGelMjjSm0jkDHALj8A8quZ/HapKNigzwge+Q== - -abort-controller@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/abort-controller/-/abort-controller-3.0.0.tgz#eaf54d53b62bae4138e809ca225c8439a6efb392" - integrity sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg== - dependencies: - event-target-shim "^5.0.0" - -abortcontroller-polyfill@^1.7.3: - version "1.7.5" - resolved "https://registry.yarnpkg.com/abortcontroller-polyfill/-/abortcontroller-polyfill-1.7.5.tgz#6738495f4e901fbb57b6c0611d0c75f76c485bed" - integrity sha512-JMJ5soJWP18htbbxJjG7bG6yuI6pRhgJ0scHHTfkUjf6wjP912xZWvM+A4sJK3gqd9E8fcPbDnOefbA9Th/FIQ== - -abstract-level@^1.0.0, abstract-level@^1.0.2, abstract-level@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/abstract-level/-/abstract-level-1.0.3.tgz#78a67d3d84da55ee15201486ab44c09560070741" - integrity sha512-t6jv+xHy+VYwc4xqZMn2Pa9DjcdzvzZmQGRjTFc8spIbRGHgBrEKbPq+rYXc7CCo0lxgYvSgKVg9qZAhpVQSjA== - dependencies: - buffer "^6.0.3" - catering "^2.1.0" - is-buffer "^2.0.5" - level-supports "^4.0.0" - level-transcoder "^1.0.1" - module-error "^1.0.1" - queue-microtask "^1.2.3" - -accepts@~1.3.8: - version "1.3.8" - resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.8.tgz#0bf0be125b67014adcb0b0921e62db7bffe16b2e" - integrity sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw== - dependencies: - mime-types "~2.1.34" - negotiator "0.6.3" - -acorn-walk@^8.1.1: - version "8.2.0" - resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1" - integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA== - -acorn@^8.4.1: - version "8.8.2" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.2.tgz#1b2f25db02af965399b9776b0c2c391276d37c4a" - integrity sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw== - -address@^1.0.1: - version "1.2.2" - resolved "https://registry.yarnpkg.com/address/-/address-1.2.2.tgz#2b5248dac5485a6390532c6a517fda2e3faac89e" - integrity sha512-4B/qKCfeE/ODUaAUpSwfzazo5x29WD4r3vXiWsB7I2mSDAihwEqKO+g8GELZUQSSAo5e1XTYh3ZVfLyxBc12nA== - -adm-zip@^0.4.16: - version "0.4.16" - resolved "https://registry.yarnpkg.com/adm-zip/-/adm-zip-0.4.16.tgz#cf4c508fdffab02c269cbc7f471a875f05570365" - integrity sha512-TFi4HBKSGfIKsK5YCkKaaFG2m4PEDyViZmEwof3MTIgzimHLto6muaHVpbrljdIvIrFZzEq/p4nafOeLcYegrg== - -aes-js@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-3.0.0.tgz#e21df10ad6c2053295bcbb8dab40b09dbea87e4d" - integrity sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw== - -agent-base@6: - version "6.0.2" - resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" - integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ== - dependencies: - debug "4" - -aggregate-error@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/aggregate-error/-/aggregate-error-3.1.0.tgz#92670ff50f5359bdb7a3e0d40d0ec30c5737687a" - integrity sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA== - dependencies: - clean-stack "^2.0.0" - indent-string "^4.0.0" - -ajv@^6.10.0, ajv@^6.12.3: - version "6.12.6" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" - integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== - dependencies: - fast-deep-equal "^3.1.1" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.4.1" - uri-js "^4.2.2" - -ajv@^8.0.1: - version "8.12.0" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.12.0.tgz#d1a0527323e22f53562c567c00991577dfbe19d1" - integrity sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA== - dependencies: - fast-deep-equal "^3.1.1" - json-schema-traverse "^1.0.0" - require-from-string "^2.0.2" - uri-js "^4.2.2" - -amdefine@>=0.0.4: - version "1.0.1" - resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" - integrity sha512-S2Hw0TtNkMJhIabBwIojKL9YHO5T0n5eNqWJ7Lrlel/zDbftQpxpapi8tZs3X1HWa+u+QeydGmzzNU0m09+Rcg== - -ansi-colors@3.2.3: - version "3.2.3" - resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-3.2.3.tgz#57d35b8686e851e2cc04c403f1c00203976a1813" - integrity sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw== - -ansi-colors@4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" - integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== - -ansi-colors@^3.2.3: - version "3.2.4" - resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-3.2.4.tgz#e3a3da4bfbae6c86a9c285625de124a234026fbf" - integrity sha512-hHUXGagefjN2iRrID63xckIvotOXOojhQKWIPUZ4mNUZ9nLZW+7FMNoE1lOkEhNWYsx/7ysGIuJYCiMAA9FnrA== - -ansi-colors@^4.1.1: - version "4.1.3" - resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.3.tgz#37611340eb2243e70cc604cad35d63270d48781b" - integrity sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw== - -ansi-escapes@^4.3.0: - version "4.3.2" - resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" - integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== - dependencies: - type-fest "^0.21.3" - -ansi-regex@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" - integrity sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA== - -ansi-regex@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.1.tgz#123d6479e92ad45ad897d4054e3c7ca7db4944e1" - integrity sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw== - -ansi-regex@^4.1.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.1.tgz#164daac87ab2d6f6db3a29875e2d1766582dabed" - integrity sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g== - -ansi-regex@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" - integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== - -ansi-styles@^3.2.0, ansi-styles@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" - integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== - dependencies: - color-convert "^1.9.0" - -ansi-styles@^4.0.0, ansi-styles@^4.1.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" - integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== - dependencies: - color-convert "^2.0.1" - -antlr4ts@^0.5.0-alpha.4: - version "0.5.0-alpha.4" - resolved "https://registry.yarnpkg.com/antlr4ts/-/antlr4ts-0.5.0-alpha.4.tgz#71702865a87478ed0b40c0709f422cf14d51652a" - integrity sha512-WPQDt1B74OfPv/IMS2ekXAKkTZIHl88uMetg6q3OTqgFxZ/dxDXI0EWLyZid/1Pe6hTftyg5N7gel5wNAGxXyQ== - -anymatch@~3.1.1, anymatch@~3.1.2: - version "3.1.3" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e" - integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== - dependencies: - normalize-path "^3.0.0" - picomatch "^2.0.4" - -arg@^4.1.0: - version "4.1.3" - resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" - integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== - -argparse@^1.0.7: - version "1.0.10" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" - integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== - dependencies: - sprintf-js "~1.0.2" - -argparse@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" - integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== - -array-back@^3.0.1, array-back@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/array-back/-/array-back-3.1.0.tgz#b8859d7a508871c9a7b2cf42f99428f65e96bfb0" - integrity sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q== - -array-back@^4.0.1, array-back@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/array-back/-/array-back-4.0.2.tgz#8004e999a6274586beeb27342168652fdb89fa1e" - integrity sha512-NbdMezxqf94cnNfWLL7V/im0Ub+Anbb0IoZhvzie8+4HJ4nMQuzHuy49FkGYCJK2yAloZ3meiB6AVMClbrI1vg== - -array-buffer-byte-length@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz#fabe8bc193fea865f317fe7807085ee0dee5aead" - integrity sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A== - dependencies: - call-bind "^1.0.2" - is-array-buffer "^3.0.1" - -array-flatten@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" - integrity sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg== - -array-union@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" - integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== - -array-uniq@1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" - integrity sha512-MNha4BWQ6JbwhFhj03YK552f7cb3AzoE8SzeljgChvL1dl3IcvggXVz1DilzySZkCja+CXuZbdW7yATchWn8/Q== - -array.prototype.reduce@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/array.prototype.reduce/-/array.prototype.reduce-1.0.5.tgz#6b20b0daa9d9734dd6bc7ea66b5bbce395471eac" - integrity sha512-kDdugMl7id9COE8R7MHF5jWk7Dqt/fs4Pv+JXoICnYwqpjjjbUurz6w5fT5IG6brLdJhv6/VoHB0H7oyIBXd+Q== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - es-array-method-boxes-properly "^1.0.0" - is-string "^1.0.7" - -asap@~2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" - integrity sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA== - -asn1@~0.2.3: - version "0.2.6" - resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.6.tgz#0d3a7bb6e64e02a90c0303b31f292868ea09a08d" - integrity sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ== - dependencies: - safer-buffer "~2.1.0" - -assert-plus@1.0.0, assert-plus@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" - integrity sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw== - -assertion-error@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b" - integrity sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw== - -astral-regex@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31" - integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ== - -async-limiter@~1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.1.tgz#dd379e94f0db8310b08291f9d64c3209766617fd" - integrity sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ== - -async@1.x: - version "1.5.2" - resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" - integrity sha512-nSVgobk4rv61R9PUSDtYt7mPVB2olxNR5RWJcAsH676/ef11bUZwvu7+RGYrYauVdDPcO519v68wRhXQtxsV9w== - -asynckit@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" - integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== - -at-least-node@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2" - integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg== - -available-typed-arrays@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7" - integrity sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw== - -aws-sign2@~0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" - integrity sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA== - -aws4@^1.8.0: - version "1.12.0" - resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.12.0.tgz#ce1c9d143389679e253b314241ea9aa5cec980d3" - integrity sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg== - -axios@^0.21.1: - version "0.21.4" - resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.4.tgz#c67b90dc0568e5c1cf2b0b858c43ba28e2eda575" - integrity sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg== - dependencies: - follow-redirects "^1.14.0" - -balanced-match@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" - integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== - -base-x@^3.0.2, base-x@^3.0.8: - version "3.0.9" - resolved "https://registry.yarnpkg.com/base-x/-/base-x-3.0.9.tgz#6349aaabb58526332de9f60995e548a53fe21320" - integrity sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ== - dependencies: - safe-buffer "^5.0.1" - -base64-js@^1.3.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" - integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== - -bcrypt-pbkdf@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e" - integrity sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w== - dependencies: - tweetnacl "^0.14.3" - -bech32@1.1.4, bech32@^1.1.3: - version "1.1.4" - resolved "https://registry.yarnpkg.com/bech32/-/bech32-1.1.4.tgz#e38c9f37bf179b8eb16ae3a772b40c356d4832e9" - integrity sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ== - -big-integer@1.6.36: - version "1.6.36" - resolved "https://registry.yarnpkg.com/big-integer/-/big-integer-1.6.36.tgz#78631076265d4ae3555c04f85e7d9d2f3a071a36" - integrity sha512-t70bfa7HYEA1D9idDbmuv7YbsbVkQ+Hp+8KFSul4aE5e/i1bjCNIRYJZlA8Q8p0r9T8cF/RVvwUgRA//FydEyg== - -big.js@^6.0.3: - version "6.2.1" - resolved "https://registry.yarnpkg.com/big.js/-/big.js-6.2.1.tgz#7205ce763efb17c2e41f26f121c420c6a7c2744f" - integrity sha512-bCtHMwL9LeDIozFn+oNhhFoq+yQ3BNdnsLSASUxLciOb1vgvpHsIO1dsENiGMgbb4SkP5TrzWzRiLddn8ahVOQ== - -bigint-crypto-utils@^3.0.23: - version "3.2.2" - resolved "https://registry.yarnpkg.com/bigint-crypto-utils/-/bigint-crypto-utils-3.2.2.tgz#e30a49ec38357c6981cd3da5aaa6480b1f752ee4" - integrity sha512-U1RbE3aX9ayCUVcIPHuPDPKcK3SFOXf93J1UK/iHlJuQB7bhagPIX06/CLpLEsDThJ7KA4Dhrnzynl+d2weTiw== - -bignumber.js@^7.2.1: - version "7.2.1" - resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-7.2.1.tgz#80c048759d826800807c4bfd521e50edbba57a5f" - integrity sha512-S4XzBk5sMB+Rcb/LNcpzXr57VRTxgAvaAEDAl1AwRx27j00hT84O6OkteE7u8UB3NuaaygCRrEpqox4uDOrbdQ== - -bignumber.js@^9.0.0, bignumber.js@^9.0.1: - version "9.1.1" - resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.1.1.tgz#c4df7dc496bd849d4c9464344c1aa74228b4dac6" - integrity sha512-pHm4LsMJ6lzgNGVfZHjMoO8sdoRhOzOH4MLmY65Jg70bpxCKu5iOHNJyfF6OyvYw7t8Fpf35RuzUyqnQsj8Vig== - -binary-extensions@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" - integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== - -blakejs@^1.1.0: - version "1.2.1" - resolved "https://registry.yarnpkg.com/blakejs/-/blakejs-1.2.1.tgz#5057e4206eadb4a97f7c0b6e197a505042fc3814" - integrity sha512-QXUSXI3QVc/gJME0dBpXrag1kbzOqCjCX8/b54ntNyW6sjtoqxqRk3LTmXzaJoh71zMsDCjM+47jS7XiwN/+fQ== - -bluebird@^3.5.0, bluebird@^3.5.2: - version "3.7.2" - resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" - integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== - -bn.js@4.11.6: - version "4.11.6" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.6.tgz#53344adb14617a13f6e8dd2ce28905d1c0ba3215" - integrity sha512-XWwnNNFCuuSQ0m3r3C4LE3EiORltHd9M05pq6FOlVeiophzRbMo50Sbz1ehl8K3Z+jw9+vmgnXefY1hz8X+2wA== - -bn.js@^4.11.0, bn.js@^4.11.6, bn.js@^4.11.8, bn.js@^4.11.9: - version "4.12.0" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88" - integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA== - -bn.js@^5.1.2, bn.js@^5.1.3, bn.js@^5.2.0, bn.js@^5.2.1: - version "5.2.1" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.1.tgz#0bc527a6a0d18d0aa8d5b0538ce4a77dccfa7b70" - integrity sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ== - -body-parser@1.20.1: - version "1.20.1" - resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.1.tgz#b1812a8912c195cd371a3ee5e66faa2338a5c668" - integrity sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw== - dependencies: - bytes "3.1.2" - content-type "~1.0.4" - debug "2.6.9" - depd "2.0.0" - destroy "1.2.0" - http-errors "2.0.0" - iconv-lite "0.4.24" - on-finished "2.4.1" - qs "6.11.0" - raw-body "2.5.1" - type-is "~1.6.18" - unpipe "1.0.0" - -body-parser@^1.16.0: - version "1.20.2" - resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.2.tgz#6feb0e21c4724d06de7ff38da36dad4f57a747fd" - integrity sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA== - dependencies: - bytes "3.1.2" - content-type "~1.0.5" - debug "2.6.9" - depd "2.0.0" - destroy "1.2.0" - http-errors "2.0.0" - iconv-lite "0.4.24" - on-finished "2.4.1" - qs "6.11.0" - raw-body "2.5.2" - type-is "~1.6.18" - unpipe "1.0.0" - -boolbase@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" - integrity sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww== - -brace-expansion@^1.1.7: - version "1.1.11" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" - integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== - dependencies: - balanced-match "^1.0.0" - concat-map "0.0.1" - -brace-expansion@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae" - integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== - dependencies: - balanced-match "^1.0.0" - -braces@^3.0.2, braces@~3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" - integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== - dependencies: - fill-range "^7.0.1" - -brorand@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" - integrity sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w== - -browser-level@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/browser-level/-/browser-level-1.0.1.tgz#36e8c3183d0fe1c405239792faaab5f315871011" - integrity sha512-XECYKJ+Dbzw0lbydyQuJzwNXtOpbMSq737qxJN11sIRTErOMShvDpbzTlgju7orJKvx4epULolZAuJGLzCmWRQ== - dependencies: - abstract-level "^1.0.2" - catering "^2.1.1" - module-error "^1.0.2" - run-parallel-limit "^1.1.0" - -browser-stdout@1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" - integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== - -browserify-aes@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48" - integrity sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA== - dependencies: - buffer-xor "^1.0.3" - cipher-base "^1.0.0" - create-hash "^1.1.0" - evp_bytestokey "^1.0.3" - inherits "^2.0.1" - safe-buffer "^5.0.1" - -bs58@^4.0.0, bs58@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/bs58/-/bs58-4.0.1.tgz#be161e76c354f6f788ae4071f63f34e8c4f0a42a" - integrity sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw== - dependencies: - base-x "^3.0.2" - -bs58check@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/bs58check/-/bs58check-2.1.2.tgz#53b018291228d82a5aa08e7d796fdafda54aebfc" - integrity sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA== - dependencies: - bs58 "^4.0.0" - create-hash "^1.1.0" - safe-buffer "^5.1.2" - -buffer-from@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" - integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== - -buffer-to-arraybuffer@^0.0.5: - version "0.0.5" - resolved "https://registry.yarnpkg.com/buffer-to-arraybuffer/-/buffer-to-arraybuffer-0.0.5.tgz#6064a40fa76eb43c723aba9ef8f6e1216d10511a" - integrity sha512-3dthu5CYiVB1DEJp61FtApNnNndTckcqe4pFcLdvHtrpG+kcyekCJKg4MRiDcFW7A6AODnXB9U4dwQiCW5kzJQ== - -buffer-xor@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" - integrity sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ== - -buffer@6.0.3, buffer@^6.0.3: - version "6.0.3" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6" - integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA== - dependencies: - base64-js "^1.3.1" - ieee754 "^1.2.1" - -buffer@^5.0.5, buffer@^5.5.0, buffer@^5.6.0: - version "5.7.1" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" - integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== - dependencies: - base64-js "^1.3.1" - ieee754 "^1.1.13" - -bufferutil@^4.0.1: - version "4.0.7" - resolved "https://registry.yarnpkg.com/bufferutil/-/bufferutil-4.0.7.tgz#60c0d19ba2c992dd8273d3f73772ffc894c153ad" - integrity sha512-kukuqc39WOHtdxtw4UScxF/WVnMFVSQVKhtx3AjZJzhd0RGZZldcrfSEbVsWWe6KNH253574cq5F+wpv0G9pJw== - dependencies: - node-gyp-build "^4.3.0" - -busboy@^1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/busboy/-/busboy-1.6.0.tgz#966ea36a9502e43cdb9146962523b92f531f6893" - integrity sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA== - dependencies: - streamsearch "^1.1.0" - -bytes@3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5" - integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg== - -cacheable-lookup@^5.0.3: - version "5.0.4" - resolved "https://registry.yarnpkg.com/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz#5a6b865b2c44357be3d5ebc2a467b032719a7005" - integrity sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA== - -cacheable-lookup@^6.0.4: - version "6.1.0" - resolved "https://registry.yarnpkg.com/cacheable-lookup/-/cacheable-lookup-6.1.0.tgz#0330a543471c61faa4e9035db583aad753b36385" - integrity sha512-KJ/Dmo1lDDhmW2XDPMo+9oiy/CeqosPguPCrgcVzKyZrL6pM1gU2GmPY/xo6OQPTUaA/c0kwHuywB4E6nmT9ww== - -cacheable-request@^7.0.2: - version "7.0.2" - resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-7.0.2.tgz#ea0d0b889364a25854757301ca12b2da77f91d27" - integrity sha512-pouW8/FmiPQbuGpkXQ9BAPv/Mo5xDGANgSNXzTzJ8DrKGuXOssM4wIQRjfanNRh3Yu5cfYPvcorqbhg2KIJtew== - dependencies: - clone-response "^1.0.2" - get-stream "^5.1.0" - http-cache-semantics "^4.0.0" - keyv "^4.0.0" - lowercase-keys "^2.0.0" - normalize-url "^6.0.1" - responselike "^2.0.0" - -call-bind@^1.0.0, call-bind@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" - integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA== - dependencies: - function-bind "^1.1.1" - get-intrinsic "^1.0.2" - -camel-case@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/camel-case/-/camel-case-3.0.0.tgz#ca3c3688a4e9cf3a4cda777dc4dcbc713249cf73" - integrity sha512-+MbKztAYHXPr1jNTSKQF52VpcFjwY5RkR7fxksV8Doo4KAYc5Fl4UJRgthBbTmEx8C54DqahhbLJkDwjI3PI/w== - dependencies: - no-case "^2.2.0" - upper-case "^1.1.1" - -camelcase@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a" - integrity sha512-4nhGqUkc4BqbBBB4Q6zLuD7lzzrHYrjKGeYaEji/3tFR5VdJu9v+LilhGIVe8wxEJPPOeWo7eg8dwY13TZ1BNg== - -camelcase@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" - integrity sha512-FxAv7HpHrXbh3aPo4o2qxHay2lkLY3x5Mw3KeE4KQE8ysVfziWeRZDwcjauvwBSGEC/nXUPzZy8zeh4HokqOnw== - -camelcase@^5.0.0: - version "5.3.1" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" - integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== - -camelcase@^6.0.0: - version "6.3.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" - integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== - -case@^1.6.3: - version "1.6.3" - resolved "https://registry.yarnpkg.com/case/-/case-1.6.3.tgz#0a4386e3e9825351ca2e6216c60467ff5f1ea1c9" - integrity sha512-mzDSXIPaFwVDvZAHqZ9VlbyF4yyXRuX6IvB06WvPYkqJVO24kX1PPhv9bfpKNFZyxYFmmgo03HUiD8iklmJYRQ== - -caseless@^0.12.0, caseless@~0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" - integrity sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw== - -catering@^2.1.0, catering@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/catering/-/catering-2.1.1.tgz#66acba06ed5ee28d5286133982a927de9a04b510" - integrity sha512-K7Qy8O9p76sL3/3m7/zLKbRkyOlSZAgzEaLhyj2mXS8PsCud2Eo4hAb8aLtZqHh0QGqLcb9dlJSu6lHRVENm1w== - -cbor@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/cbor/-/cbor-5.2.0.tgz#4cca67783ccd6de7b50ab4ed62636712f287a67c" - integrity sha512-5IMhi9e1QU76ppa5/ajP1BmMWZ2FHkhAhjeVKQ/EFCgYSEaeVaoGtL7cxJskf9oCCk+XjzaIdc3IuU/dbA/o2A== - dependencies: - bignumber.js "^9.0.1" - nofilter "^1.0.4" - -cbor@^8.0.0, cbor@^8.1.0: - version "8.1.0" - resolved "https://registry.yarnpkg.com/cbor/-/cbor-8.1.0.tgz#cfc56437e770b73417a2ecbfc9caf6b771af60d5" - integrity sha512-DwGjNW9omn6EwP70aXsn7FQJx5kO12tX0bZkaTjzdVFM6/7nhA4t0EENocKGx6D2Bch9PE2KzCUf5SceBdeijg== - dependencies: - nofilter "^3.1.0" - -chai-as-promised@^7.1.1: - version "7.1.1" - resolved "https://registry.yarnpkg.com/chai-as-promised/-/chai-as-promised-7.1.1.tgz#08645d825deb8696ee61725dbf590c012eb00ca0" - integrity sha512-azL6xMoi+uxu6z4rhWQ1jbdUhOMhis2PvscD/xjLqNMkv3BPPp2JyyuTHOrf9BOosGpNQ11v6BKv/g57RXbiaA== - dependencies: - check-error "^1.0.2" - -chai-bn@^0.2.1: - version "0.2.2" - resolved "https://registry.yarnpkg.com/chai-bn/-/chai-bn-0.2.2.tgz#4dcf30dbc79db2378a00781693bc749c972bf34f" - integrity sha512-MzjelH0p8vWn65QKmEq/DLBG1Hle4WeyqT79ANhXZhn/UxRWO0OogkAxi5oGGtfzwU9bZR8mvbvYdoqNVWQwFg== - -chai@^4.2.0: - version "4.3.7" - resolved "https://registry.yarnpkg.com/chai/-/chai-4.3.7.tgz#ec63f6df01829088e8bf55fca839bcd464a8ec51" - integrity sha512-HLnAzZ2iupm25PlN0xFreAlBA5zaBSv3og0DdeGA4Ar6h6rJ3A0rolRUKJhSF2V10GZKDgWF/VmAEsNWjCRB+A== - dependencies: - assertion-error "^1.1.0" - check-error "^1.0.2" - deep-eql "^4.1.2" - get-func-name "^2.0.0" - loupe "^2.3.1" - pathval "^1.1.1" - type-detect "^4.0.5" - -chalk@^2.3.2, chalk@^2.4.2: - version "2.4.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" - integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== - dependencies: - ansi-styles "^3.2.1" - escape-string-regexp "^1.0.5" - supports-color "^5.3.0" - -chalk@^4.1.0, chalk@^4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" - integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== - dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" - -change-case@3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/change-case/-/change-case-3.0.2.tgz#fd48746cce02f03f0a672577d1d3a8dc2eceb037" - integrity sha512-Mww+SLF6MZ0U6kdg11algyKd5BARbyM4TbFBepwowYSR5ClfQGCGtxNXgykpN0uF/bstWeaGDT4JWaDh8zWAHA== - dependencies: - camel-case "^3.0.0" - constant-case "^2.0.0" - dot-case "^2.1.0" - header-case "^1.0.0" - is-lower-case "^1.1.0" - is-upper-case "^1.1.0" - lower-case "^1.1.1" - lower-case-first "^1.0.0" - no-case "^2.3.2" - param-case "^2.1.0" - pascal-case "^2.0.0" - path-case "^2.1.0" - sentence-case "^2.1.0" - snake-case "^2.1.0" - swap-case "^1.1.0" - title-case "^2.1.0" - upper-case "^1.1.1" - upper-case-first "^1.1.0" - -"charenc@>= 0.0.1": - version "0.0.2" - resolved "https://registry.yarnpkg.com/charenc/-/charenc-0.0.2.tgz#c0a1d2f3a7092e03774bfa83f14c0fc5790a8667" - integrity sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA== - -check-error@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82" - integrity sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA== - -cheerio-select@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/cheerio-select/-/cheerio-select-2.1.0.tgz#4d8673286b8126ca2a8e42740d5e3c4884ae21b4" - integrity sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g== - dependencies: - boolbase "^1.0.0" - css-select "^5.1.0" - css-what "^6.1.0" - domelementtype "^2.3.0" - domhandler "^5.0.3" - domutils "^3.0.1" - -cheerio@^1.0.0-rc.2: - version "1.0.0-rc.12" - resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-1.0.0-rc.12.tgz#788bf7466506b1c6bf5fae51d24a2c4d62e47683" - integrity sha512-VqR8m68vM46BNnuZ5NtnGBKIE/DfN0cRIzg9n40EIq9NOv90ayxLBXA8fXC5gquFRGJSTRqBq25Jt2ECLR431Q== - dependencies: - cheerio-select "^2.1.0" - dom-serializer "^2.0.0" - domhandler "^5.0.3" - domutils "^3.0.1" - htmlparser2 "^8.0.1" - parse5 "^7.0.0" - parse5-htmlparser2-tree-adapter "^7.0.0" - -chokidar@3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.3.0.tgz#12c0714668c55800f659e262d4962a97faf554a6" - integrity sha512-dGmKLDdT3Gdl7fBUe8XK+gAtGmzy5Fn0XkkWQuYxGIgWVPPse2CxFA5mtrlD0TOHaHjEUqkWNyP1XdHoJES/4A== - dependencies: - anymatch "~3.1.1" - braces "~3.0.2" - glob-parent "~5.1.0" - is-binary-path "~2.1.0" - is-glob "~4.0.1" - normalize-path "~3.0.0" - readdirp "~3.2.0" - optionalDependencies: - fsevents "~2.1.1" - -chokidar@3.5.3, chokidar@^3.4.0, chokidar@^3.5.2: - version "3.5.3" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" - integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== - dependencies: - anymatch "~3.1.2" - braces "~3.0.2" - glob-parent "~5.1.2" - is-binary-path "~2.1.0" - is-glob "~4.0.1" - normalize-path "~3.0.0" - readdirp "~3.6.0" - optionalDependencies: - fsevents "~2.3.2" - -chownr@^1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" - integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg== - -ci-info@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" - integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ== - -cids@^0.7.1: - version "0.7.5" - resolved "https://registry.yarnpkg.com/cids/-/cids-0.7.5.tgz#60a08138a99bfb69b6be4ceb63bfef7a396b28b2" - integrity sha512-zT7mPeghoWAu+ppn8+BS1tQ5qGmbMfB4AregnQjA/qHY3GC1m1ptI9GkWNlgeu38r7CuRdXB47uY2XgAYt6QVA== - dependencies: - buffer "^5.5.0" - class-is "^1.1.0" - multibase "~0.6.0" - multicodec "^1.0.0" - multihashes "~0.4.15" - -cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" - integrity sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q== - dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" - -class-is@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/class-is/-/class-is-1.1.0.tgz#9d3c0fba0440d211d843cec3dedfa48055005825" - integrity sha512-rhjH9AG1fvabIDoGRVH587413LPjTZgmDF9fOFCbFJQV4yuocX1mHxxvXI4g3cGwbVY9wAYIoKlg1N79frJKQw== - -classic-level@^1.2.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/classic-level/-/classic-level-1.3.0.tgz#5e36680e01dc6b271775c093f2150844c5edd5c8" - integrity sha512-iwFAJQYtqRTRM0F6L8h4JCt00ZSGdOyqh7yVrhhjrOpFhmBjNlRUey64MCiyo6UmQHMJ+No3c81nujPv+n9yrg== - dependencies: - abstract-level "^1.0.2" - catering "^2.1.0" - module-error "^1.0.1" - napi-macros "^2.2.2" - node-gyp-build "^4.3.0" - -clean-stack@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" - integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A== - -cli-table3@^0.5.0: - version "0.5.1" - resolved "https://registry.yarnpkg.com/cli-table3/-/cli-table3-0.5.1.tgz#0252372d94dfc40dbd8df06005f48f31f656f202" - integrity sha512-7Qg2Jrep1S/+Q3EceiZtQcDPWxhAvBw+ERf1162v4sikJrvojMHFqXt8QIVha8UlH9rgU0BeWPytZ9/TzYqlUw== - dependencies: - object-assign "^4.1.0" - string-width "^2.1.1" - optionalDependencies: - colors "^1.1.2" - -cliui@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" - integrity sha512-0yayqDxWQbqk3ojkYqUKqaAQ6AfNKeKWRNA8kR0WXzAsdHpP4BIaOmMAG87JGuO6qcobyW4GjxHd9PmhEd+T9w== - dependencies: - string-width "^1.0.1" - strip-ansi "^3.0.1" - wrap-ansi "^2.0.0" - -cliui@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-5.0.0.tgz#deefcfdb2e800784aa34f46fa08e06851c7bbbc5" - integrity sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA== - dependencies: - string-width "^3.1.0" - strip-ansi "^5.2.0" - wrap-ansi "^5.1.0" - -cliui@^7.0.2: - version "7.0.4" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" - integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== - dependencies: - string-width "^4.2.0" - strip-ansi "^6.0.0" - wrap-ansi "^7.0.0" - -clone-response@^1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/clone-response/-/clone-response-1.0.3.tgz#af2032aa47816399cf5f0a1d0db902f517abb8c3" - integrity sha512-ROoL94jJH2dUVML2Y/5PEDNaSHgeOdSDicUyS7izcF63G6sTc/FTjLub4b8Il9S8S0beOfYt0TaA5qvFK+w0wA== - dependencies: - mimic-response "^1.0.0" - -code-point-at@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" - integrity sha512-RpAVKQA5T63xEj6/giIbUEtZwJ4UFIc3ZtvEkiaUERylqe8xb5IvqcgOurZLahv93CLKfxcw5YI+DZcUBRyLXA== - -color-convert@^1.9.0: - version "1.9.3" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" - integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== - dependencies: - color-name "1.1.3" - -color-convert@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" - integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== - dependencies: - color-name "~1.1.4" - -color-name@1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" - integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== - -color-name@~1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" - integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== - -colors@1.4.0, colors@^1.1.2: - version "1.4.0" - resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" - integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA== - -combined-stream@^1.0.6, combined-stream@^1.0.8, combined-stream@~1.0.6: - version "1.0.8" - resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" - integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== - dependencies: - delayed-stream "~1.0.0" - -command-exists@^1.2.8: - version "1.2.9" - resolved "https://registry.yarnpkg.com/command-exists/-/command-exists-1.2.9.tgz#c50725af3808c8ab0260fd60b01fbfa25b954f69" - integrity sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w== - -command-line-args@^5.1.1: - version "5.2.1" - resolved "https://registry.yarnpkg.com/command-line-args/-/command-line-args-5.2.1.tgz#c44c32e437a57d7c51157696893c5909e9cec42e" - integrity sha512-H4UfQhZyakIjC74I9d34fGYDwk3XpSr17QhEd0Q3I9Xq1CETHo4Hcuo87WyWHpAF1aSLjLRf5lD9ZGX2qStUvg== - dependencies: - array-back "^3.1.0" - find-replace "^3.0.0" - lodash.camelcase "^4.3.0" - typical "^4.0.0" - -command-line-usage@^6.1.0: - version "6.1.3" - resolved "https://registry.yarnpkg.com/command-line-usage/-/command-line-usage-6.1.3.tgz#428fa5acde6a838779dfa30e44686f4b6761d957" - integrity sha512-sH5ZSPr+7UStsloltmDh7Ce5fb8XPlHyoPzTpyyMuYCtervL65+ubVZ6Q61cFtFl62UyJlc8/JwERRbAFPUqgw== - dependencies: - array-back "^4.0.2" - chalk "^2.4.2" - table-layout "^1.0.2" - typical "^5.2.0" - -commander@3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/commander/-/commander-3.0.2.tgz#6837c3fb677ad9933d1cfba42dd14d5117d6b39e" - integrity sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow== - -compare-versions@^5.0.0: - version "5.0.3" - resolved "https://registry.yarnpkg.com/compare-versions/-/compare-versions-5.0.3.tgz#a9b34fea217472650ef4a2651d905f42c28ebfd7" - integrity sha512-4UZlZP8Z99MGEY+Ovg/uJxJuvoXuN4M6B3hKaiackiHrgzQFEe3diJi1mf1PNHbFujM7FvLrK2bpgIaImbtZ1A== - -concat-map@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" - integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== - -concat-stream@^1.6.0, concat-stream@^1.6.2: - version "1.6.2" - resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" - integrity sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw== - dependencies: - buffer-from "^1.0.0" - inherits "^2.0.3" - readable-stream "^2.2.2" - typedarray "^0.0.6" - -constant-case@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/constant-case/-/constant-case-2.0.0.tgz#4175764d389d3fa9c8ecd29186ed6005243b6a46" - integrity sha512-eS0N9WwmjTqrOmR3o83F5vW8Z+9R1HnVz3xmzT2PMFug9ly+Au/fxRWlEBSb6LcZwspSsEn9Xs1uw9YgzAg1EQ== - dependencies: - snake-case "^2.1.0" - upper-case "^1.1.1" - -content-disposition@0.5.4: - version "0.5.4" - resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.4.tgz#8b82b4efac82512a02bb0b1dcec9d2c5e8eb5bfe" - integrity sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ== - dependencies: - safe-buffer "5.2.1" - -content-hash@^2.5.2: - version "2.5.2" - resolved "https://registry.yarnpkg.com/content-hash/-/content-hash-2.5.2.tgz#bbc2655e7c21f14fd3bfc7b7d4bfe6e454c9e211" - integrity sha512-FvIQKy0S1JaWV10sMsA7TRx8bpU+pqPkhbsfvOJAdjRXvYxEckAwQWGwtRjiaJfh+E0DvcWUGqcdjwMGFjsSdw== - dependencies: - cids "^0.7.1" - multicodec "^0.5.5" - multihashes "^0.4.15" - -content-type@~1.0.4, content-type@~1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.5.tgz#8b773162656d1d1086784c8f23a54ce6d73d7918" - integrity sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA== - -cookie-signature@1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" - integrity sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ== - -cookie@0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.5.0.tgz#d1f5d71adec6558c58f389987c366aa47e994f8b" - integrity sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw== - -cookie@^0.4.1: - version "0.4.2" - resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.2.tgz#0e41f24de5ecf317947c82fc789e06a884824432" - integrity sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA== - -core-util-is@1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" - integrity sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ== - -core-util-is@~1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" - integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== - -cors@^2.8.1: - version "2.8.5" - resolved "https://registry.yarnpkg.com/cors/-/cors-2.8.5.tgz#eac11da51592dd86b9f06f6e7ac293b3df875d29" - integrity sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g== - dependencies: - object-assign "^4" - vary "^1" - -crc-32@^1.2.0: - version "1.2.2" - resolved "https://registry.yarnpkg.com/crc-32/-/crc-32-1.2.2.tgz#3cad35a934b8bf71f25ca524b6da51fb7eace2ff" - integrity sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ== - -create-hash@^1.1.0, create-hash@^1.1.2, create-hash@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" - integrity sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg== - dependencies: - cipher-base "^1.0.1" - inherits "^2.0.1" - md5.js "^1.3.4" - ripemd160 "^2.0.1" - sha.js "^2.4.0" - -create-hmac@^1.1.4, create-hmac@^1.1.7: - version "1.1.7" - resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.7.tgz#69170c78b3ab957147b2b8b04572e47ead2243ff" - integrity sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg== - dependencies: - cipher-base "^1.0.3" - create-hash "^1.1.0" - inherits "^2.0.1" - ripemd160 "^2.0.0" - safe-buffer "^5.0.1" - sha.js "^2.4.8" - -create-require@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" - integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== - -cross-fetch@^3.1.4: - version "3.1.5" - resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.1.5.tgz#e1389f44d9e7ba767907f7af8454787952ab534f" - integrity sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw== - dependencies: - node-fetch "2.6.7" - -"crypt@>= 0.0.1": - version "0.0.2" - resolved "https://registry.yarnpkg.com/crypt/-/crypt-0.0.2.tgz#88d7ff7ec0dfb86f713dc87bbb42d044d3e6c41b" - integrity sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow== - -crypto-addr-codec@^0.1.7: - version "0.1.7" - resolved "https://registry.yarnpkg.com/crypto-addr-codec/-/crypto-addr-codec-0.1.7.tgz#e16cea892730178fe25a38f6d15b680cab3124ae" - integrity sha512-X4hzfBzNhy4mAc3UpiXEC/L0jo5E8wAa9unsnA8nNXYzXjCcGk83hfC5avJWCSGT8V91xMnAS9AKMHmjw5+XCg== - dependencies: - base-x "^3.0.8" - big-integer "1.6.36" - blakejs "^1.1.0" - bs58 "^4.0.1" - ripemd160-min "0.0.6" - safe-buffer "^5.2.0" - sha3 "^2.1.1" - -css-select@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/css-select/-/css-select-5.1.0.tgz#b8ebd6554c3637ccc76688804ad3f6a6fdaea8a6" - integrity sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg== - dependencies: - boolbase "^1.0.0" - css-what "^6.1.0" - domhandler "^5.0.2" - domutils "^3.0.1" - nth-check "^2.0.1" - -css-what@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/css-what/-/css-what-6.1.0.tgz#fb5effcf76f1ddea2c81bdfaa4de44e79bac70f4" - integrity sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw== - -d@1, d@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/d/-/d-1.0.1.tgz#8698095372d58dbee346ffd0c7093f99f8f9eb5a" - integrity sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA== - dependencies: - es5-ext "^0.10.50" - type "^1.0.1" - -dashdash@^1.12.0: - version "1.14.1" - resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" - integrity sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g== - dependencies: - assert-plus "^1.0.0" - -death@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/death/-/death-1.1.0.tgz#01aa9c401edd92750514470b8266390c66c67318" - integrity sha512-vsV6S4KVHvTGxbEcij7hkWRv0It+sGGWVOM67dQde/o5Xjnr+KmLjxWJii2uEObIrt1CcM9w0Yaovx+iOlIL+w== - -debug@2.6.9, debug@^2.2.0: - version "2.6.9" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" - integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== - dependencies: - ms "2.0.0" - -debug@3.2.6: - version "3.2.6" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" - integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== - dependencies: - ms "^2.1.1" - -debug@4, debug@4.3.4, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.3: - version "4.3.4" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" - integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== - dependencies: - ms "2.1.2" - -decamelize@^1.1.1, decamelize@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" - integrity sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA== - -decamelize@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-4.0.0.tgz#aa472d7bf660eb15f3494efd531cab7f2a709837" - integrity sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ== - -decode-uri-component@^0.2.0: - version "0.2.2" - resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.2.tgz#e69dbe25d37941171dd540e024c444cd5188e1e9" - integrity sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ== - -decompress-response@^3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-3.3.0.tgz#80a4dd323748384bfa248083622aedec982adff3" - integrity sha512-BzRPQuY1ip+qDonAOz42gRm/pg9F768C+npV/4JOsxRC2sq+Rlk+Q4ZCAsOhnIaMrgarILY+RMUIvMmmX1qAEA== - dependencies: - mimic-response "^1.0.0" - -decompress-response@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-6.0.0.tgz#ca387612ddb7e104bd16d85aab00d5ecf09c66fc" - integrity sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ== - dependencies: - mimic-response "^3.1.0" - -deep-eql@^4.0.1, deep-eql@^4.1.2: - version "4.1.3" - resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-4.1.3.tgz#7c7775513092f7df98d8df9996dd085eb668cc6d" - integrity sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw== - dependencies: - type-detect "^4.0.0" - -deep-extend@~0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" - integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== - -deep-is@~0.1.3: - version "0.1.4" - resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" - integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== - -defer-to-connect@^2.0.0, defer-to-connect@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-2.0.1.tgz#8016bdb4143e4632b77a3449c6236277de520587" - integrity sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg== - -define-properties@^1.1.2, define-properties@^1.1.3, define-properties@^1.1.4, define-properties@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.2.0.tgz#52988570670c9eacedd8064f4a990f2405849bd5" - integrity sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA== - dependencies: - has-property-descriptors "^1.0.0" - object-keys "^1.1.1" - -delayed-stream@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" - integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== - -depd@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df" - integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== - -destroy@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.2.0.tgz#4803735509ad8be552934c67df614f94e66fa015" - integrity sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg== - -detect-indent@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-5.0.0.tgz#3871cc0a6a002e8c3e5b3cf7f336264675f06b9d" - integrity sha512-rlpvsxUtM0PQvy9iZe640/IWwWYyBsTApREbA1pHOpmOUIl9MkP/U4z7vTtg4Oaojvqhxt7sdufnT0EzGaR31g== - -detect-port@^1.3.0: - version "1.5.1" - resolved "https://registry.yarnpkg.com/detect-port/-/detect-port-1.5.1.tgz#451ca9b6eaf20451acb0799b8ab40dff7718727b" - integrity sha512-aBzdj76lueB6uUst5iAs7+0H/oOjqI5D16XUWxlWMIMROhcM0rfsNVk93zTngq1dDNpoXRr++Sus7ETAExppAQ== - dependencies: - address "^1.0.1" - debug "4" - -diff@3.5.0: - version "3.5.0" - resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" - integrity sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA== - -diff@5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/diff/-/diff-5.0.0.tgz#7ed6ad76d859d030787ec35855f5b1daf31d852b" - integrity sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w== - -diff@^4.0.1: - version "4.0.2" - resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" - integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== - -difflib@^0.2.4: - version "0.2.4" - resolved "https://registry.yarnpkg.com/difflib/-/difflib-0.2.4.tgz#b5e30361a6db023176d562892db85940a718f47e" - integrity sha512-9YVwmMb0wQHQNr5J9m6BSj6fk4pfGITGQOOs+D9Fl+INODWFOfvhIU1hNv6GgR1RBoC/9NJcwu77zShxV0kT7w== - dependencies: - heap ">= 0.2.0" - -dir-glob@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" - integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== - dependencies: - path-type "^4.0.0" - -dom-serializer@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-2.0.0.tgz#e41b802e1eedf9f6cae183ce5e622d789d7d8e53" - integrity sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg== - dependencies: - domelementtype "^2.3.0" - domhandler "^5.0.2" - entities "^4.2.0" - -dom-walk@^0.1.0: - version "0.1.2" - resolved "https://registry.yarnpkg.com/dom-walk/-/dom-walk-0.1.2.tgz#0c548bef048f4d1f2a97249002236060daa3fd84" - integrity sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w== - -domelementtype@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.3.0.tgz#5c45e8e869952626331d7aab326d01daf65d589d" - integrity sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw== - -domhandler@^5.0.2, domhandler@^5.0.3: - version "5.0.3" - resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-5.0.3.tgz#cc385f7f751f1d1fc650c21374804254538c7d31" - integrity sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w== - dependencies: - domelementtype "^2.3.0" - -domutils@^3.0.1: - version "3.1.0" - resolved "https://registry.yarnpkg.com/domutils/-/domutils-3.1.0.tgz#c47f551278d3dc4b0b1ab8cbb42d751a6f0d824e" - integrity sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA== - dependencies: - dom-serializer "^2.0.0" - domelementtype "^2.3.0" - domhandler "^5.0.3" - -dot-case@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/dot-case/-/dot-case-2.1.1.tgz#34dcf37f50a8e93c2b3bca8bb7fb9155c7da3bee" - integrity sha512-HnM6ZlFqcajLsyudHq7LeeLDr2rFAVYtDv/hV5qchQEidSck8j9OPUsXY9KwJv/lHMtYlX4DjRQqwFYa+0r8Ug== - dependencies: - no-case "^2.2.0" - -ecc-jsbn@~0.1.1: - version "0.1.2" - resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" - integrity sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw== - dependencies: - jsbn "~0.1.0" - safer-buffer "^2.1.0" - -ee-first@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" - integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow== - -elliptic@6.5.4, elliptic@^6.4.0, elliptic@^6.5.2, elliptic@^6.5.4: - version "6.5.4" - resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb" - integrity sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ== - dependencies: - bn.js "^4.11.9" - brorand "^1.1.0" - hash.js "^1.0.0" - hmac-drbg "^1.0.1" - inherits "^2.0.4" - minimalistic-assert "^1.0.1" - minimalistic-crypto-utils "^1.0.1" - -emoji-regex@^7.0.1: - version "7.0.3" - resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" - integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA== - -emoji-regex@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" - integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== - -encode-utf8@^1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/encode-utf8/-/encode-utf8-1.0.3.tgz#f30fdd31da07fb596f281beb2f6b027851994cda" - integrity sha512-ucAnuBEhUK4boH2HjVYG5Q2mQyPorvv0u/ocS+zhdw0S8AlHYY+GOFhP1Gio5z4icpP2ivFSvhtFjQi8+T9ppw== - -encodeurl@~1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" - integrity sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w== - -end-of-stream@^1.1.0: - version "1.4.4" - resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" - integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== - dependencies: - once "^1.4.0" - -enquirer@^2.3.0, enquirer@^2.3.4, enquirer@^2.3.6: - version "2.3.6" - resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.3.6.tgz#2a7fe5dd634a1e4125a975ec994ff5456dc3734d" - integrity sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg== - dependencies: - ansi-colors "^4.1.1" - -entities@^4.2.0, entities@^4.4.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/entities/-/entities-4.5.0.tgz#5d268ea5e7113ec74c4d033b79ea5a35a488fb48" - integrity sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw== - -env-paths@^2.2.0: - version "2.2.1" - resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.1.tgz#420399d416ce1fbe9bc0a07c62fa68d67fd0f8f2" - integrity sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A== - -error-ex@^1.2.0: - version "1.3.2" - resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" - integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== - dependencies: - is-arrayish "^0.2.1" - -es-abstract@^1.19.0, es-abstract@^1.20.4, es-abstract@^1.21.2: - version "1.21.2" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.21.2.tgz#a56b9695322c8a185dc25975aa3b8ec31d0e7eff" - integrity sha512-y/B5POM2iBnIxCiernH1G7rC9qQoM77lLIMQLuob0zhp8C56Po81+2Nj0WFKnd0pNReDTnkYryc+zhOzpEIROg== - dependencies: - array-buffer-byte-length "^1.0.0" - available-typed-arrays "^1.0.5" - call-bind "^1.0.2" - es-set-tostringtag "^2.0.1" - es-to-primitive "^1.2.1" - function.prototype.name "^1.1.5" - get-intrinsic "^1.2.0" - get-symbol-description "^1.0.0" - globalthis "^1.0.3" - gopd "^1.0.1" - has "^1.0.3" - has-property-descriptors "^1.0.0" - has-proto "^1.0.1" - has-symbols "^1.0.3" - internal-slot "^1.0.5" - is-array-buffer "^3.0.2" - is-callable "^1.2.7" - is-negative-zero "^2.0.2" - is-regex "^1.1.4" - is-shared-array-buffer "^1.0.2" - is-string "^1.0.7" - is-typed-array "^1.1.10" - is-weakref "^1.0.2" - object-inspect "^1.12.3" - object-keys "^1.1.1" - object.assign "^4.1.4" - regexp.prototype.flags "^1.4.3" - safe-regex-test "^1.0.0" - string.prototype.trim "^1.2.7" - string.prototype.trimend "^1.0.6" - string.prototype.trimstart "^1.0.6" - typed-array-length "^1.0.4" - unbox-primitive "^1.0.2" - which-typed-array "^1.1.9" - -es-array-method-boxes-properly@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz#873f3e84418de4ee19c5be752990b2e44718d09e" - integrity sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA== - -es-set-tostringtag@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz#338d502f6f674301d710b80c8592de8a15f09cd8" - integrity sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg== - dependencies: - get-intrinsic "^1.1.3" - has "^1.0.3" - has-tostringtag "^1.0.0" - -es-to-primitive@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" - integrity sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA== - dependencies: - is-callable "^1.1.4" - is-date-object "^1.0.1" - is-symbol "^1.0.2" - -es5-ext@^0.10.35, es5-ext@^0.10.50: - version "0.10.62" - resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.62.tgz#5e6adc19a6da524bf3d1e02bbc8960e5eb49a9a5" - integrity sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA== - dependencies: - es6-iterator "^2.0.3" - es6-symbol "^3.1.3" - next-tick "^1.1.0" - -es6-iterator@^2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.3.tgz#a7de889141a05a94b0854403b2d0a0fbfa98f3b7" - integrity sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g== - dependencies: - d "1" - es5-ext "^0.10.35" - es6-symbol "^3.1.1" - -es6-promise@^4.2.8: - version "4.2.8" - resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.8.tgz#4eb21594c972bc40553d276e510539143db53e0a" - integrity sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w== - -es6-symbol@^3.1.1, es6-symbol@^3.1.3: - version "3.1.3" - resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.3.tgz#bad5d3c1bcdac28269f4cb331e431c78ac705d18" - integrity sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA== - dependencies: - d "^1.0.1" - ext "^1.1.2" - -escalade@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" - integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== - -escape-html@~1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" - integrity sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow== - -escape-string-regexp@1.0.5, escape-string-regexp@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" - integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== - -escape-string-regexp@4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" - integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== - -escodegen@1.8.x: - version "1.8.1" - resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.8.1.tgz#5a5b53af4693110bebb0867aa3430dd3b70a1018" - integrity sha512-yhi5S+mNTOuRvyW4gWlg5W1byMaQGWWSYHXsuFZ7GBo7tpyOwi2EdzMP/QWxh9hwkD2m+wDVHJsxhRIj+v/b/A== - dependencies: - esprima "^2.7.1" - estraverse "^1.9.1" - esutils "^2.0.2" - optionator "^0.8.1" - optionalDependencies: - source-map "~0.2.0" - -esprima@2.7.x, esprima@^2.7.1: - version "2.7.3" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" - integrity sha512-OarPfz0lFCiW4/AV2Oy1Rp9qu0iusTKqykwTspGCZtPxmF81JR4MmIebvF1F9+UOKth2ZubLQ4XGGaU+hSn99A== - -esprima@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" - integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== - -estraverse@^1.9.1: - version "1.9.3" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-1.9.3.tgz#af67f2dc922582415950926091a4005d29c9bb44" - integrity sha512-25w1fMXQrGdoquWnScXZGckOv+Wes+JDnuN/+7ex3SauFRS72r2lFDec0EKPt2YD1wUJ/IrfEex+9yp4hfSOJA== - -esutils@^2.0.2: - version "2.0.3" - resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" - integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== - -etag@~1.8.1: - version "1.8.1" - resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" - integrity sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg== - -eth-ens-namehash@2.0.8, eth-ens-namehash@^2.0.8: - version "2.0.8" - resolved "https://registry.yarnpkg.com/eth-ens-namehash/-/eth-ens-namehash-2.0.8.tgz#229ac46eca86d52e0c991e7cb2aef83ff0f68bcf" - integrity sha512-VWEI1+KJfz4Km//dadyvBBoBeSQ0MHTXPvr8UIXiLW6IanxvAV+DmlZAijZwAyggqGUfwQBeHf7tc9wzc1piSw== - dependencies: - idna-uts46-hx "^2.3.1" - js-sha3 "^0.5.7" - -eth-gas-reporter@^0.2.25: - version "0.2.25" - resolved "https://registry.yarnpkg.com/eth-gas-reporter/-/eth-gas-reporter-0.2.25.tgz#546dfa946c1acee93cb1a94c2a1162292d6ff566" - integrity sha512-1fRgyE4xUB8SoqLgN3eDfpDfwEfRxh2Sz1b7wzFbyQA+9TekMmvSjjoRu9SKcSVyK+vLkLIsVbJDsTWjw195OQ== - dependencies: - "@ethersproject/abi" "^5.0.0-beta.146" - "@solidity-parser/parser" "^0.14.0" - cli-table3 "^0.5.0" - colors "1.4.0" - ethereum-cryptography "^1.0.3" - ethers "^4.0.40" - fs-readdir-recursive "^1.1.0" - lodash "^4.17.14" - markdown-table "^1.1.3" - mocha "^7.1.1" - req-cwd "^2.0.0" - request "^2.88.0" - request-promise-native "^1.0.5" - sha1 "^1.1.1" - sync-request "^6.0.0" - -eth-lib@0.2.8: - version "0.2.8" - resolved "https://registry.yarnpkg.com/eth-lib/-/eth-lib-0.2.8.tgz#b194058bef4b220ad12ea497431d6cb6aa0623c8" - integrity sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw== - dependencies: - bn.js "^4.11.6" - elliptic "^6.4.0" - xhr-request-promise "^0.1.2" - -eth-lib@^0.1.26: - version "0.1.29" - resolved "https://registry.yarnpkg.com/eth-lib/-/eth-lib-0.1.29.tgz#0c11f5060d42da9f931eab6199084734f4dbd1d9" - integrity sha512-bfttrr3/7gG4E02HoWTDUcDDslN003OlOoBxk9virpAZQ1ja/jDgwkWB8QfJF7ojuEowrqy+lzp9VcJG7/k5bQ== - dependencies: - bn.js "^4.11.6" - elliptic "^6.4.0" - nano-json-stream-parser "^0.1.2" - servify "^0.1.12" - ws "^3.0.0" - xhr-request-promise "^0.1.2" - -ethereum-bloom-filters@^1.0.6: - version "1.0.10" - resolved "https://registry.yarnpkg.com/ethereum-bloom-filters/-/ethereum-bloom-filters-1.0.10.tgz#3ca07f4aed698e75bd134584850260246a5fed8a" - integrity sha512-rxJ5OFN3RwjQxDcFP2Z5+Q9ho4eIdEmSc2ht0fCu8Se9nbXjZ7/031uXoUYJ87KHCOdVeiUuwSnoS7hmYAGVHA== - dependencies: - js-sha3 "^0.8.0" - -ethereum-cryptography@0.1.3, ethereum-cryptography@^0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz#8d6143cfc3d74bf79bbd8edecdf29e4ae20dd191" - integrity sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ== - dependencies: - "@types/pbkdf2" "^3.0.0" - "@types/secp256k1" "^4.0.1" - blakejs "^1.1.0" - browserify-aes "^1.2.0" - bs58check "^2.1.2" - create-hash "^1.2.0" - create-hmac "^1.1.7" - hash.js "^1.1.7" - keccak "^3.0.0" - pbkdf2 "^3.0.17" - randombytes "^2.1.0" - safe-buffer "^5.1.2" - scrypt-js "^3.0.0" - secp256k1 "^4.0.1" - setimmediate "^1.0.5" - -ethereum-cryptography@^1.0.3: - version "1.2.0" - resolved "https://registry.yarnpkg.com/ethereum-cryptography/-/ethereum-cryptography-1.2.0.tgz#5ccfa183e85fdaf9f9b299a79430c044268c9b3a" - integrity sha512-6yFQC9b5ug6/17CQpCyE3k9eKBMdhyVjzUy1WkiuY/E4vj/SXDBbCw8QEIaXqf0Mf2SnY6RmpDcwlUmBSS0EJw== - dependencies: - "@noble/hashes" "1.2.0" - "@noble/secp256k1" "1.7.1" - "@scure/bip32" "1.1.5" - "@scure/bip39" "1.1.1" - -ethereumjs-abi@^0.6.8: - version "0.6.8" - resolved "https://registry.yarnpkg.com/ethereumjs-abi/-/ethereumjs-abi-0.6.8.tgz#71bc152db099f70e62f108b7cdfca1b362c6fcae" - integrity sha512-Tx0r/iXI6r+lRsdvkFDlut0N08jWMnKRZ6Gkq+Nmw75lZe4e6o3EkSnkaBP5NF6+m5PTGAr9JP43N3LyeoglsA== - dependencies: - bn.js "^4.11.8" - ethereumjs-util "^6.0.0" - -ethereumjs-util@^6.0.0, ethereumjs-util@^6.2.1: - version "6.2.1" - resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz#fcb4e4dd5ceacb9d2305426ab1a5cd93e3163b69" - integrity sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw== - dependencies: - "@types/bn.js" "^4.11.3" - bn.js "^4.11.0" - create-hash "^1.1.2" - elliptic "^6.5.2" - ethereum-cryptography "^0.1.3" - ethjs-util "0.1.6" - rlp "^2.2.3" - -ethereumjs-util@^7.0.3, ethereumjs-util@^7.1.0, ethereumjs-util@^7.1.1, ethereumjs-util@^7.1.2, ethereumjs-util@^7.1.4, ethereumjs-util@^7.1.5: - version "7.1.5" - resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-7.1.5.tgz#9ecf04861e4fbbeed7465ece5f23317ad1129181" - integrity sha512-SDl5kKrQAudFBUe5OJM9Ac6WmMyYmXX/6sTmLZ3ffG2eY6ZIGBes3pEDxNN6V72WyOw4CPD5RomKdsa8DAAwLg== - dependencies: - "@types/bn.js" "^5.1.0" - bn.js "^5.1.2" - create-hash "^1.1.2" - ethereum-cryptography "^0.1.3" - rlp "^2.2.4" - -ethers@5.7.2, ethers@^5.0.13, ethers@^5.5.3, ethers@^5.7.1: - version "5.7.2" - resolved "https://registry.yarnpkg.com/ethers/-/ethers-5.7.2.tgz#3a7deeabbb8c030d4126b24f84e525466145872e" - integrity sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg== - dependencies: - "@ethersproject/abi" "5.7.0" - "@ethersproject/abstract-provider" "5.7.0" - "@ethersproject/abstract-signer" "5.7.0" - "@ethersproject/address" "5.7.0" - "@ethersproject/base64" "5.7.0" - "@ethersproject/basex" "5.7.0" - "@ethersproject/bignumber" "5.7.0" - "@ethersproject/bytes" "5.7.0" - "@ethersproject/constants" "5.7.0" - "@ethersproject/contracts" "5.7.0" - "@ethersproject/hash" "5.7.0" - "@ethersproject/hdnode" "5.7.0" - "@ethersproject/json-wallets" "5.7.0" - "@ethersproject/keccak256" "5.7.0" - "@ethersproject/logger" "5.7.0" - "@ethersproject/networks" "5.7.1" - "@ethersproject/pbkdf2" "5.7.0" - "@ethersproject/properties" "5.7.0" - "@ethersproject/providers" "5.7.2" - "@ethersproject/random" "5.7.0" - "@ethersproject/rlp" "5.7.0" - "@ethersproject/sha2" "5.7.0" - "@ethersproject/signing-key" "5.7.0" - "@ethersproject/solidity" "5.7.0" - "@ethersproject/strings" "5.7.0" - "@ethersproject/transactions" "5.7.0" - "@ethersproject/units" "5.7.0" - "@ethersproject/wallet" "5.7.0" - "@ethersproject/web" "5.7.1" - "@ethersproject/wordlists" "5.7.0" - -ethers@^4.0.32, ethers@^4.0.40: - version "4.0.49" - resolved "https://registry.yarnpkg.com/ethers/-/ethers-4.0.49.tgz#0eb0e9161a0c8b4761be547396bbe2fb121a8894" - integrity sha512-kPltTvWiyu+OktYy1IStSO16i2e7cS9D9OxZ81q2UUaiNPVrm/RTcbxamCXF9VUSKzJIdJV68EAIhTEVBalRWg== - dependencies: - aes-js "3.0.0" - bn.js "^4.11.9" - elliptic "6.5.4" - hash.js "1.1.3" - js-sha3 "0.5.7" - scrypt-js "2.0.4" - setimmediate "1.0.4" - uuid "2.0.1" - xmlhttprequest "1.8.0" - -ethjs-abi@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/ethjs-abi/-/ethjs-abi-0.2.1.tgz#e0a7a93a7e81163a94477bad56ede524ab6de533" - integrity sha512-g2AULSDYI6nEJyJaEVEXtTimRY2aPC2fi7ddSy0W+LXvEVL8Fe1y76o43ecbgdUKwZD+xsmEgX1yJr1Ia3r1IA== - dependencies: - bn.js "4.11.6" - js-sha3 "0.5.5" - number-to-bn "1.7.0" - -ethjs-unit@0.1.6: - version "0.1.6" - resolved "https://registry.yarnpkg.com/ethjs-unit/-/ethjs-unit-0.1.6.tgz#c665921e476e87bce2a9d588a6fe0405b2c41699" - integrity sha512-/Sn9Y0oKl0uqQuvgFk/zQgR7aw1g36qX/jzSQ5lSwlO0GigPymk4eGQfeNTD03w1dPOqfz8V77Cy43jH56pagw== - dependencies: - bn.js "4.11.6" - number-to-bn "1.7.0" - -ethjs-util@0.1.6, ethjs-util@^0.1.6: - version "0.1.6" - resolved "https://registry.yarnpkg.com/ethjs-util/-/ethjs-util-0.1.6.tgz#f308b62f185f9fe6237132fb2a9818866a5cd536" - integrity sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w== - dependencies: - is-hex-prefixed "1.0.0" - strip-hex-prefix "1.0.0" - -event-target-shim@^5.0.0: - version "5.0.1" - resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789" - integrity sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ== - -eventemitter3@4.0.4: - version "4.0.4" - resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.4.tgz#b5463ace635a083d018bdc7c917b4c5f10a85384" - integrity sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ== - -evp_bytestokey@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02" - integrity sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA== - dependencies: - md5.js "^1.3.4" - safe-buffer "^5.1.1" - -express@^4.14.0: - version "4.18.2" - resolved "https://registry.yarnpkg.com/express/-/express-4.18.2.tgz#3fabe08296e930c796c19e3c516979386ba9fd59" - integrity sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ== - dependencies: - accepts "~1.3.8" - array-flatten "1.1.1" - body-parser "1.20.1" - content-disposition "0.5.4" - content-type "~1.0.4" - cookie "0.5.0" - cookie-signature "1.0.6" - debug "2.6.9" - depd "2.0.0" - encodeurl "~1.0.2" - escape-html "~1.0.3" - etag "~1.8.1" - finalhandler "1.2.0" - fresh "0.5.2" - http-errors "2.0.0" - merge-descriptors "1.0.1" - methods "~1.1.2" - on-finished "2.4.1" - parseurl "~1.3.3" - path-to-regexp "0.1.7" - proxy-addr "~2.0.7" - qs "6.11.0" - range-parser "~1.2.1" - safe-buffer "5.2.1" - send "0.18.0" - serve-static "1.15.0" - setprototypeof "1.2.0" - statuses "2.0.1" - type-is "~1.6.18" - utils-merge "1.0.1" - vary "~1.1.2" - -ext@^1.1.2: - version "1.7.0" - resolved "https://registry.yarnpkg.com/ext/-/ext-1.7.0.tgz#0ea4383c0103d60e70be99e9a7f11027a33c4f5f" - integrity sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw== - dependencies: - type "^2.7.2" - -extend@~3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" - integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== - -extsprintf@1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" - integrity sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g== - -extsprintf@^1.2.0: - version "1.4.1" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.1.tgz#8d172c064867f235c0c84a596806d279bf4bcc07" - integrity sha512-Wrk35e8ydCKDj/ArClo1VrPVmN8zph5V4AtHwIuHhvMXsKf73UT3BOD+azBIW+3wOJ4FhEH7zyaJCFvChjYvMA== - -fast-check@3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/fast-check/-/fast-check-3.1.1.tgz#72c5ae7022a4e86504762e773adfb8a5b0b01252" - integrity sha512-3vtXinVyuUKCKFKYcwXhGE6NtGWkqF8Yh3rvMZNzmwz8EPrgoc/v4pDdLHyLnCyCI5MZpZZkDEwFyXyEONOxpA== - dependencies: - pure-rand "^5.0.1" - -fast-deep-equal@^3.1.1: - version "3.1.3" - resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" - integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== - -fast-glob@^3.0.3: - version "3.2.12" - resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.12.tgz#7f39ec99c2e6ab030337142da9e0c18f37afae80" - integrity sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w== - dependencies: - "@nodelib/fs.stat" "^2.0.2" - "@nodelib/fs.walk" "^1.2.3" - glob-parent "^5.1.2" - merge2 "^1.3.0" - micromatch "^4.0.4" - -fast-json-stable-stringify@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" - integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== - -fast-levenshtein@~2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" - integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== - -fastq@^1.6.0: - version "1.15.0" - resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.15.0.tgz#d04d07c6a2a68fe4599fea8d2e103a937fae6b3a" - integrity sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw== - dependencies: - reusify "^1.0.4" - -fill-range@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" - integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== - dependencies: - to-regex-range "^5.0.1" - -finalhandler@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.2.0.tgz#7d23fe5731b207b4640e4fcd00aec1f9207a7b32" - integrity sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg== - dependencies: - debug "2.6.9" - encodeurl "~1.0.2" - escape-html "~1.0.3" - on-finished "2.4.1" - parseurl "~1.3.3" - statuses "2.0.1" - unpipe "~1.0.0" - -find-replace@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/find-replace/-/find-replace-3.0.0.tgz#3e7e23d3b05167a76f770c9fbd5258b0def68c38" - integrity sha512-6Tb2myMioCAgv5kfvP5/PkZZ/ntTpVK39fHY7WkWBgvbeE+VHd/tZuZ4mrC+bxh4cfOZeYKVPaJIZtZXV7GNCQ== - dependencies: - array-back "^3.0.1" - -find-up@3.0.0, find-up@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" - integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg== - dependencies: - locate-path "^3.0.0" - -find-up@5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" - integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== - dependencies: - locate-path "^6.0.0" - path-exists "^4.0.0" - -find-up@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" - integrity sha512-jvElSjyuo4EMQGoTwo1uJU5pQMwTW5lS1x05zzfJuTIyLR3zwO27LYrxNg+dlvKpGOuGy/MzBdXh80g0ve5+HA== - dependencies: - path-exists "^2.0.0" - pinkie-promise "^2.0.0" - -find-up@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" - integrity sha512-NWzkk0jSJtTt08+FBFMvXoeZnOJD+jTtsRmBYbAIzJdX6l7dLgR7CTubCM5/eDdPUBvLCeVasP1brfVR/9/EZQ== - dependencies: - locate-path "^2.0.0" - -find-up@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" - integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== - dependencies: - locate-path "^5.0.0" - path-exists "^4.0.0" - -flat@^4.1.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/flat/-/flat-4.1.1.tgz#a392059cc382881ff98642f5da4dde0a959f309b" - integrity sha512-FmTtBsHskrU6FJ2VxCnsDb84wu9zhmO3cUX2kGFb5tuwhfXxGciiT0oRY+cck35QmG+NmGh5eLz6lLCpWTqwpA== - dependencies: - is-buffer "~2.0.3" - -flat@^5.0.2: - version "5.0.2" - resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241" - integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== - -fmix@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/fmix/-/fmix-0.1.0.tgz#c7bbf124dec42c9d191cfb947d0a9778dd986c0c" - integrity sha512-Y6hyofImk9JdzU8k5INtTXX1cu8LDlePWDFU5sftm9H+zKCr5SGrVjdhkvsim646cw5zD0nADj8oHyXMZmCZ9w== - dependencies: - imul "^1.0.0" - -follow-redirects@^1.12.1, follow-redirects@^1.14.0: - version "1.15.2" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.2.tgz#b460864144ba63f2681096f274c4e57026da2c13" - integrity sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA== - -for-each@^0.3.3: - version "0.3.3" - resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e" - integrity sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw== - dependencies: - is-callable "^1.1.3" - -forever-agent@~0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" - integrity sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw== - -form-data-encoder@1.7.1: - version "1.7.1" - resolved "https://registry.yarnpkg.com/form-data-encoder/-/form-data-encoder-1.7.1.tgz#ac80660e4f87ee0d3d3c3638b7da8278ddb8ec96" - integrity sha512-EFRDrsMm/kyqbTQocNvRXMLjc7Es2Vk+IQFx/YW7hkUH1eBl4J1fqiP34l74Yt0pFLCNpc06fkbVk00008mzjg== - -form-data@^2.2.0: - version "2.5.1" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.5.1.tgz#f2cbec57b5e59e23716e128fe44d4e5dd23895f4" - integrity sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.6" - mime-types "^2.1.12" - -form-data@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452" - integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.8" - mime-types "^2.1.12" - -form-data@~2.3.2: - version "2.3.3" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" - integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.6" - mime-types "^2.1.12" - -forwarded@0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.2.0.tgz#2269936428aad4c15c7ebe9779a84bf0b2a81811" - integrity sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow== - -fp-ts@1.19.3: - version "1.19.3" - resolved "https://registry.yarnpkg.com/fp-ts/-/fp-ts-1.19.3.tgz#261a60d1088fbff01f91256f91d21d0caaaaa96f" - integrity sha512-H5KQDspykdHuztLTg+ajGN0Z2qUjcEf3Ybxc6hLt0k7/zPkn29XnKnxlBPyW2XIddWrGaJBzBl4VLYOtk39yZg== - -fp-ts@^1.0.0: - version "1.19.5" - resolved "https://registry.yarnpkg.com/fp-ts/-/fp-ts-1.19.5.tgz#3da865e585dfa1fdfd51785417357ac50afc520a" - integrity sha512-wDNqTimnzs8QqpldiId9OavWK2NptormjXnRJTQecNjzwfyp6P/8s/zG8e4h3ja3oqkKaY72UlTjQYt/1yXf9A== - -fresh@0.5.2: - version "0.5.2" - resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" - integrity sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q== - -fs-extra@^0.30.0: - version "0.30.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-0.30.0.tgz#f233ffcc08d4da7d432daa449776989db1df93f0" - integrity sha512-UvSPKyhMn6LEd/WpUaV9C9t3zATuqoqfWc3QdPhPLb58prN9tqYPlPWi8Krxi44loBoUzlobqZ3+8tGpxxSzwA== - dependencies: - graceful-fs "^4.1.2" - jsonfile "^2.1.0" - klaw "^1.0.0" - path-is-absolute "^1.0.0" - rimraf "^2.2.8" - -fs-extra@^10.0.0: - version "10.1.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-10.1.0.tgz#02873cfbc4084dde127eaa5f9905eef2325d1abf" - integrity sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ== - dependencies: - graceful-fs "^4.2.0" - jsonfile "^6.0.1" - universalify "^2.0.0" - -fs-extra@^4.0.2: - version "4.0.3" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.3.tgz#0d852122e5bc5beb453fb028e9c0c9bf36340c94" - integrity sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg== - dependencies: - graceful-fs "^4.1.2" - jsonfile "^4.0.0" - universalify "^0.1.0" - -fs-extra@^7.0.0, fs-extra@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9" - integrity sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw== - dependencies: - graceful-fs "^4.1.2" - jsonfile "^4.0.0" - universalify "^0.1.0" - -fs-extra@^8.1.0: - version "8.1.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0" - integrity sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g== - dependencies: - graceful-fs "^4.2.0" - jsonfile "^4.0.0" - universalify "^0.1.0" - -fs-extra@^9.1.0: - version "9.1.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.1.0.tgz#5954460c764a8da2094ba3554bf839e6b9a7c86d" - integrity sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ== - dependencies: - at-least-node "^1.0.0" - graceful-fs "^4.2.0" - jsonfile "^6.0.1" - universalify "^2.0.0" - -fs-minipass@^1.2.7: - version "1.2.7" - resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.7.tgz#ccff8570841e7fe4265693da88936c55aed7f7c7" - integrity sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA== - dependencies: - minipass "^2.6.0" - -fs-readdir-recursive@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz#e32fc030a2ccee44a6b5371308da54be0b397d27" - integrity sha512-GNanXlVr2pf02+sPN40XN8HG+ePaNcvM0q5mZBd668Obwb0yD5GiUbZOFgwn8kGMY6I3mdyDJzieUy3PTYyTRA== - -fs.realpath@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" - integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== - -fsevents@~2.1.1: - version "2.1.3" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.3.tgz#fb738703ae8d2f9fe900c33836ddebee8b97f23e" - integrity sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ== - -fsevents@~2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" - integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== - -function-bind@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" - integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== - -function.prototype.name@^1.1.5: - version "1.1.5" - resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.1.5.tgz#cce0505fe1ffb80503e6f9e46cc64e46a12a9621" - integrity sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - es-abstract "^1.19.0" - functions-have-names "^1.2.2" - -functional-red-black-tree@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" - integrity sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g== - -functions-have-names@^1.2.2, functions-have-names@^1.2.3: - version "1.2.3" - resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" - integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ== - -get-caller-file@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a" - integrity sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w== - -get-caller-file@^2.0.1, get-caller-file@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" - integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== - -get-func-name@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.0.tgz#ead774abee72e20409433a066366023dd6887a41" - integrity sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig== - -get-intrinsic@^1.0.2, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3, get-intrinsic@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.0.tgz#7ad1dc0535f3a2904bba075772763e5051f6d05f" - integrity sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q== - dependencies: - function-bind "^1.1.1" - has "^1.0.3" - has-symbols "^1.0.3" - -get-port@^3.1.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/get-port/-/get-port-3.2.0.tgz#dd7ce7de187c06c8bf353796ac71e099f0980ebc" - integrity sha512-x5UJKlgeUiNT8nyo/AcnwLnZuZNcSjSw0kogRB+Whd1fjjFq4B1hySFxSFWWSn4mIBzg3sRNUDFYc4g5gjPoLg== - -get-stream@^5.1.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.2.0.tgz#4966a1795ee5ace65e706c4b7beb71257d6e22d3" - integrity sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA== - dependencies: - pump "^3.0.0" - -get-stream@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" - integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== - -get-symbol-description@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/get-symbol-description/-/get-symbol-description-1.0.0.tgz#7fdb81c900101fbd564dd5f1a30af5aadc1e58d6" - integrity sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw== - dependencies: - call-bind "^1.0.2" - get-intrinsic "^1.1.1" - -getpass@^0.1.1: - version "0.1.7" - resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" - integrity sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng== - dependencies: - assert-plus "^1.0.0" - -ghost-testrpc@^0.0.2: - version "0.0.2" - resolved "https://registry.yarnpkg.com/ghost-testrpc/-/ghost-testrpc-0.0.2.tgz#c4de9557b1d1ae7b2d20bbe474a91378ca90ce92" - integrity sha512-i08dAEgJ2g8z5buJIrCTduwPIhih3DP+hOCTyyryikfV8T0bNvHnGXO67i0DD1H4GBDETTclPy9njZbfluQYrQ== - dependencies: - chalk "^2.4.2" - node-emoji "^1.10.0" - -glob-parent@^5.1.2, glob-parent@~5.1.0, glob-parent@~5.1.2: - version "5.1.2" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" - integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== - dependencies: - is-glob "^4.0.1" - -glob@7.1.3: - version "7.1.3" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1" - integrity sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.4" - once "^1.3.0" - path-is-absolute "^1.0.0" - -glob@7.1.7: - version "7.1.7" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.7.tgz#3b193e9233f01d42d0b3f78294bbeeb418f94a90" - integrity sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.4" - once "^1.3.0" - path-is-absolute "^1.0.0" - -glob@7.2.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023" - integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.4" - once "^1.3.0" - path-is-absolute "^1.0.0" - -glob@^5.0.15: - version "5.0.15" - resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1" - integrity sha512-c9IPMazfRITpmAAKi22dK1VKxGDX9ehhqfABDriL/lzO92xcUKEJPQHrVA/2YHSNFB4iFlykVmWvwo48nr3OxA== - dependencies: - inflight "^1.0.4" - inherits "2" - minimatch "2 || 3" - once "^1.3.0" - path-is-absolute "^1.0.0" - -glob@^7.0.0, glob@^7.1.3: - version "7.2.3" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" - integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.1.1" - once "^1.3.0" - path-is-absolute "^1.0.0" - -global-modules@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-2.0.0.tgz#997605ad2345f27f51539bea26574421215c7780" - integrity sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A== - dependencies: - global-prefix "^3.0.0" - -global-prefix@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/global-prefix/-/global-prefix-3.0.0.tgz#fc85f73064df69f50421f47f883fe5b913ba9b97" - integrity sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg== - dependencies: - ini "^1.3.5" - kind-of "^6.0.2" - which "^1.3.1" - -global@~4.4.0: - version "4.4.0" - resolved "https://registry.yarnpkg.com/global/-/global-4.4.0.tgz#3e7b105179006a323ed71aafca3e9c57a5cc6406" - integrity sha512-wv/LAoHdRE3BeTGz53FAamhGlPLhlssK45usmGFThIi4XqnBmjKQ16u+RNbP7WvigRZDxUsM0J3gcQ5yicaL0w== - dependencies: - min-document "^2.19.0" - process "^0.11.10" - -globalthis@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/globalthis/-/globalthis-1.0.3.tgz#5852882a52b80dc301b0660273e1ed082f0b6ccf" - integrity sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA== - dependencies: - define-properties "^1.1.3" - -globby@^10.0.1: - version "10.0.2" - resolved "https://registry.yarnpkg.com/globby/-/globby-10.0.2.tgz#277593e745acaa4646c3ab411289ec47a0392543" - integrity sha512-7dUi7RvCoT/xast/o/dLN53oqND4yk0nsHkhRgn9w65C4PofCLOoJ39iSOg+qVDdWQPIEj+eszMHQ+aLVwwQSg== - dependencies: - "@types/glob" "^7.1.1" - array-union "^2.1.0" - dir-glob "^3.0.1" - fast-glob "^3.0.3" - glob "^7.1.3" - ignore "^5.1.1" - merge2 "^1.2.3" - slash "^3.0.0" - -gopd@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.0.1.tgz#29ff76de69dac7489b7c0918a5788e56477c332c" - integrity sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA== - dependencies: - get-intrinsic "^1.1.3" - -got@12.1.0: - version "12.1.0" - resolved "https://registry.yarnpkg.com/got/-/got-12.1.0.tgz#099f3815305c682be4fd6b0ee0726d8e4c6b0af4" - integrity sha512-hBv2ty9QN2RdbJJMK3hesmSkFTjVIHyIDDbssCKnSmq62edGgImJWD10Eb1k77TiV1bxloxqcFAVK8+9pkhOig== - dependencies: - "@sindresorhus/is" "^4.6.0" - "@szmarczak/http-timer" "^5.0.1" - "@types/cacheable-request" "^6.0.2" - "@types/responselike" "^1.0.0" - cacheable-lookup "^6.0.4" - cacheable-request "^7.0.2" - decompress-response "^6.0.0" - form-data-encoder "1.7.1" - get-stream "^6.0.1" - http2-wrapper "^2.1.10" - lowercase-keys "^3.0.0" - p-cancelable "^3.0.0" - responselike "^2.0.0" - -got@^11.8.5: - version "11.8.6" - resolved "https://registry.yarnpkg.com/got/-/got-11.8.6.tgz#276e827ead8772eddbcfc97170590b841823233a" - integrity sha512-6tfZ91bOr7bOXnK7PRDCGBLa1H4U080YHNaAQ2KsMGlLEzRbk44nsZF2E1IeRc3vtJHPVbKCYgdFbaGO2ljd8g== - dependencies: - "@sindresorhus/is" "^4.0.0" - "@szmarczak/http-timer" "^4.0.5" - "@types/cacheable-request" "^6.0.1" - "@types/responselike" "^1.0.0" - cacheable-lookup "^5.0.3" - cacheable-request "^7.0.2" - decompress-response "^6.0.0" - http2-wrapper "^1.0.0-beta.5.2" - lowercase-keys "^2.0.0" - p-cancelable "^2.0.0" - responselike "^2.0.0" - -graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9, graceful-fs@^4.2.0, graceful-fs@^4.2.4: - version "4.2.11" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" - integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== - -growl@1.10.5: - version "1.10.5" - resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e" - integrity sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA== - -handlebars@^4.0.1: - version "4.7.7" - resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.7.tgz#9ce33416aad02dbd6c8fafa8240d5d98004945a1" - integrity sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA== - dependencies: - minimist "^1.2.5" - neo-async "^2.6.0" - source-map "^0.6.1" - wordwrap "^1.0.0" - optionalDependencies: - uglify-js "^3.1.4" - -har-schema@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" - integrity sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q== - -har-validator@~5.1.3: - version "5.1.5" - resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.5.tgz#1f0803b9f8cb20c0fa13822df1ecddb36bde1efd" - integrity sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w== - dependencies: - ajv "^6.12.3" - har-schema "^2.0.0" - -hardhat-deploy@^0.11.29: - version "0.11.29" - resolved "https://registry.yarnpkg.com/hardhat-deploy/-/hardhat-deploy-0.11.29.tgz#e6d76e37fa2ed74d76d15b01f3849da3bda49a81" - integrity sha512-9F+MRFkEocelzB8d+SDDCcTL7edBYAj2S63ldknvfIIBSajeB6q1/jm+dlK1GjcWzAzw7EVoxtjJXzxAxZfZcg== - dependencies: - "@ethersproject/abi" "^5.7.0" - "@ethersproject/abstract-signer" "^5.7.0" - "@ethersproject/address" "^5.7.0" - "@ethersproject/bignumber" "^5.7.0" - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/constants" "^5.7.0" - "@ethersproject/contracts" "^5.7.0" - "@ethersproject/providers" "^5.7.2" - "@ethersproject/solidity" "^5.7.0" - "@ethersproject/transactions" "^5.7.0" - "@ethersproject/wallet" "^5.7.0" - "@types/qs" "^6.9.7" - axios "^0.21.1" - chalk "^4.1.2" - chokidar "^3.5.2" - debug "^4.3.2" - enquirer "^2.3.6" - ethers "^5.5.3" - form-data "^4.0.0" - fs-extra "^10.0.0" - match-all "^1.2.6" - murmur-128 "^0.2.1" - qs "^6.9.4" - zksync-web3 "^0.14.3" - -hardhat-gas-reporter@^1.0.8: - version "1.0.9" - resolved "https://registry.yarnpkg.com/hardhat-gas-reporter/-/hardhat-gas-reporter-1.0.9.tgz#9a2afb354bc3b6346aab55b1c02ca556d0e16450" - integrity sha512-INN26G3EW43adGKBNzYWOlI3+rlLnasXTwW79YNnUhXPDa+yHESgt639dJEs37gCjhkbNKcRRJnomXEuMFBXJg== - dependencies: - array-uniq "1.0.3" - eth-gas-reporter "^0.2.25" - sha1 "^1.1.1" - -hardhat-shorthand@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/hardhat-shorthand/-/hardhat-shorthand-1.0.0.tgz#ccc059c7e03115222b879c0347a18d20d0b31e3a" - integrity sha512-ixvUHrZBfGRXXrerBziNwGFmQZtz8iX43z2mJZTPnQasoaDbZ7oDZ4FqqI80EmZvP0hIml4wgpiQhrE3P/eqXQ== - dependencies: - "@fvictorio/tabtab" "^0.0.3" - debug "^4.1.1" - semver "^6.3.0" - -hardhat@^2.11.1: - version "2.14.0" - resolved "https://registry.yarnpkg.com/hardhat/-/hardhat-2.14.0.tgz#b60c74861494aeb1b50803cf04cc47865a42b87a" - integrity sha512-73jsInY4zZahMSVFurSK+5TNCJTXMv+vemvGia0Ac34Mm19fYp6vEPVGF3sucbumszsYxiTT2TbS8Ii2dsDSoQ== - dependencies: - "@ethersproject/abi" "^5.1.2" - "@metamask/eth-sig-util" "^4.0.0" - "@nomicfoundation/ethereumjs-block" "5.0.1" - "@nomicfoundation/ethereumjs-blockchain" "7.0.1" - "@nomicfoundation/ethereumjs-common" "4.0.1" - "@nomicfoundation/ethereumjs-evm" "2.0.1" - "@nomicfoundation/ethereumjs-rlp" "5.0.1" - "@nomicfoundation/ethereumjs-statemanager" "2.0.1" - "@nomicfoundation/ethereumjs-trie" "6.0.1" - "@nomicfoundation/ethereumjs-tx" "5.0.1" - "@nomicfoundation/ethereumjs-util" "9.0.1" - "@nomicfoundation/ethereumjs-vm" "7.0.1" - "@nomicfoundation/solidity-analyzer" "^0.1.0" - "@sentry/node" "^5.18.1" - "@types/bn.js" "^5.1.0" - "@types/lru-cache" "^5.1.0" - abort-controller "^3.0.0" - adm-zip "^0.4.16" - aggregate-error "^3.0.0" - ansi-escapes "^4.3.0" - chalk "^2.4.2" - chokidar "^3.4.0" - ci-info "^2.0.0" - debug "^4.1.1" - enquirer "^2.3.0" - env-paths "^2.2.0" - ethereum-cryptography "^1.0.3" - ethereumjs-abi "^0.6.8" - find-up "^2.1.0" - fp-ts "1.19.3" - fs-extra "^7.0.1" - glob "7.2.0" - immutable "^4.0.0-rc.12" - io-ts "1.10.4" - keccak "^3.0.2" - lodash "^4.17.11" - mnemonist "^0.38.0" - mocha "^10.0.0" - p-map "^4.0.0" - qs "^6.7.0" - raw-body "^2.4.1" - resolve "1.17.0" - semver "^6.3.0" - solc "0.7.3" - source-map-support "^0.5.13" - stacktrace-parser "^0.1.10" - tsort "0.0.1" - undici "^5.14.0" - uuid "^8.3.2" - ws "^7.4.6" - -has-bigints@^1.0.1, has-bigints@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.2.tgz#0871bd3e3d51626f6ca0966668ba35d5602d6eaa" - integrity sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ== - -has-flag@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" - integrity sha512-DyYHfIYwAJmjAjSSPKANxI8bFY9YtFrgkAfinBojQ8YJTOuOuav64tMUJv584SES4xl74PmuaevIyaLESHdTAA== - -has-flag@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" - integrity sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw== - -has-flag@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" - integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== - -has-property-descriptors@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz#610708600606d36961ed04c196193b6a607fa861" - integrity sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ== - dependencies: - get-intrinsic "^1.1.1" - -has-proto@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.1.tgz#1885c1305538958aff469fef37937c22795408e0" - integrity sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg== - -has-symbols@^1.0.0, has-symbols@^1.0.2, has-symbols@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" - integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== - -has-tostringtag@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.0.tgz#7e133818a7d394734f941e73c3d3f9291e658b25" - integrity sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ== - dependencies: - has-symbols "^1.0.2" - -has@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" - integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== - dependencies: - function-bind "^1.1.1" - -hash-base@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.1.0.tgz#55c381d9e06e1d2997a883b4a3fddfe7f0d3af33" - integrity sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA== - dependencies: - inherits "^2.0.4" - readable-stream "^3.6.0" - safe-buffer "^5.2.0" - -hash.js@1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.3.tgz#340dedbe6290187151c1ea1d777a3448935df846" - integrity sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA== - dependencies: - inherits "^2.0.3" - minimalistic-assert "^1.0.0" - -hash.js@1.1.7, hash.js@^1.0.0, hash.js@^1.0.3, hash.js@^1.1.7: - version "1.1.7" - resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" - integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== - dependencies: - inherits "^2.0.3" - minimalistic-assert "^1.0.1" - -he@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" - integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== - -header-case@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/header-case/-/header-case-1.0.1.tgz#9535973197c144b09613cd65d317ef19963bd02d" - integrity sha512-i0q9mkOeSuhXw6bGgiQCCBgY/jlZuV/7dZXyZ9c6LcBrqwvT8eT719E9uxE5LiZftdl+z81Ugbg/VvXV4OJOeQ== - dependencies: - no-case "^2.2.0" - upper-case "^1.1.3" - -"heap@>= 0.2.0": - version "0.2.7" - resolved "https://registry.yarnpkg.com/heap/-/heap-0.2.7.tgz#1e6adf711d3f27ce35a81fe3b7bd576c2260a8fc" - integrity sha512-2bsegYkkHO+h/9MGbn6KWcE45cHZgPANo5LXF7EvWdT0yT2EguSVO1nDgU5c8+ZOPwp2vMNa7YFsJhVcDR9Sdg== - -highlight.js@^10.4.1: - version "10.7.3" - resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-10.7.3.tgz#697272e3991356e40c3cac566a74eef681756531" - integrity sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A== - -highlightjs-solidity@^2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/highlightjs-solidity/-/highlightjs-solidity-2.0.6.tgz#e7a702a2b05e0a97f185e6ba39fd4846ad23a990" - integrity sha512-DySXWfQghjm2l6a/flF+cteroJqD4gI8GSdL4PtvxZSsAHie8m3yVe2JFoRg03ROKT6hp2Lc/BxXkqerNmtQYg== - -hmac-drbg@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" - integrity sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg== - dependencies: - hash.js "^1.0.3" - minimalistic-assert "^1.0.0" - minimalistic-crypto-utils "^1.0.1" - -hosted-git-info@^2.1.4: - version "2.8.9" - resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.9.tgz#dffc0bf9a21c02209090f2aa69429e1414daf3f9" - integrity sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw== - -htmlparser2@^8.0.1: - version "8.0.2" - resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-8.0.2.tgz#f002151705b383e62433b5cf466f5b716edaec21" - integrity sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA== - dependencies: - domelementtype "^2.3.0" - domhandler "^5.0.3" - domutils "^3.0.1" - entities "^4.4.0" - -http-basic@^8.1.1: - version "8.1.3" - resolved "https://registry.yarnpkg.com/http-basic/-/http-basic-8.1.3.tgz#a7cabee7526869b9b710136970805b1004261bbf" - integrity sha512-/EcDMwJZh3mABI2NhGfHOGOeOZITqfkEO4p/xK+l3NpyncIHUQBoMvCSF/b5GqvKtySC2srL/GGG3+EtlqlmCw== - dependencies: - caseless "^0.12.0" - concat-stream "^1.6.2" - http-response-object "^3.0.1" - parse-cache-control "^1.0.1" - -http-cache-semantics@^4.0.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz#abe02fcb2985460bf0323be664436ec3476a6d5a" - integrity sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ== - -http-errors@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-2.0.0.tgz#b7774a1486ef73cf7667ac9ae0858c012c57b9d3" - integrity sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ== - dependencies: - depd "2.0.0" - inherits "2.0.4" - setprototypeof "1.2.0" - statuses "2.0.1" - toidentifier "1.0.1" - -http-https@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/http-https/-/http-https-1.0.0.tgz#2f908dd5f1db4068c058cd6e6d4ce392c913389b" - integrity sha512-o0PWwVCSp3O0wS6FvNr6xfBCHgt0m1tvPLFOCc2iFDKTRAXhB7m8klDf7ErowFH8POa6dVdGatKU5I1YYwzUyg== - -http-response-object@^3.0.1: - version "3.0.2" - resolved "https://registry.yarnpkg.com/http-response-object/-/http-response-object-3.0.2.tgz#7f435bb210454e4360d074ef1f989d5ea8aa9810" - integrity sha512-bqX0XTF6fnXSQcEJ2Iuyr75yVakyjIDCqroJQ/aHfSdlM743Cwqoi2nDYMzLGWUcuTWGWy8AAvOKXTfiv6q9RA== - dependencies: - "@types/node" "^10.0.3" - -http-signature@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" - integrity sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ== - dependencies: - assert-plus "^1.0.0" - jsprim "^1.2.2" - sshpk "^1.7.0" - -http2-wrapper@^1.0.0-beta.5.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/http2-wrapper/-/http2-wrapper-1.0.3.tgz#b8f55e0c1f25d4ebd08b3b0c2c079f9590800b3d" - integrity sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg== - dependencies: - quick-lru "^5.1.1" - resolve-alpn "^1.0.0" - -http2-wrapper@^2.1.10: - version "2.2.0" - resolved "https://registry.yarnpkg.com/http2-wrapper/-/http2-wrapper-2.2.0.tgz#b80ad199d216b7d3680195077bd7b9060fa9d7f3" - integrity sha512-kZB0wxMo0sh1PehyjJUWRFEd99KC5TLjZ2cULC4f9iqJBAmKQQXEICjxl5iPJRwP40dpeHFqqhm7tYCvODpqpQ== - dependencies: - quick-lru "^5.1.1" - resolve-alpn "^1.2.0" - -https-proxy-agent@^5.0.0: - version "5.0.1" - resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz#c59ef224a04fe8b754f3db0063a25ea30d0005d6" - integrity sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA== - dependencies: - agent-base "6" - debug "4" - -iconv-lite@0.4.24: - version "0.4.24" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" - integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== - dependencies: - safer-buffer ">= 2.1.2 < 3" - -idna-uts46-hx@^2.3.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/idna-uts46-hx/-/idna-uts46-hx-2.3.1.tgz#a1dc5c4df37eee522bf66d969cc980e00e8711f9" - integrity sha512-PWoF9Keq6laYdIRwwCdhTPl60xRqAloYNMQLiyUnG42VjT53oW07BXIRM+NK7eQjzXjAk2gUvX9caRxlnF9TAA== - dependencies: - punycode "2.1.0" - -ieee754@^1.1.13, ieee754@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" - integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== - -ignore@^5.1.1: - version "5.2.4" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.4.tgz#a291c0c6178ff1b960befe47fcdec301674a6324" - integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ== - -immutable@^4.0.0-rc.12: - version "4.3.0" - resolved "https://registry.yarnpkg.com/immutable/-/immutable-4.3.0.tgz#eb1738f14ffb39fd068b1dbe1296117484dd34be" - integrity sha512-0AOCmOip+xgJwEVTQj1EfiDDOkPmuyllDuTuEX+DDXUgapLAsBIfkg3sxCYyCEA8mQqZrrxPUGjcOQ2JS3WLkg== - -imul@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/imul/-/imul-1.0.1.tgz#9d5867161e8b3de96c2c38d5dc7cb102f35e2ac9" - integrity sha512-WFAgfwPLAjU66EKt6vRdTlKj4nAgIDQzh29JonLa4Bqtl6D8JrIMvWjCnx7xEjVNmP3U0fM5o8ZObk7d0f62bA== - -indent-string@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251" - integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg== - -inflight@^1.0.4: - version "1.0.6" - resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" - integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== - dependencies: - once "^1.3.0" - wrappy "1" - -inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.3: - version "2.0.4" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" - integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== - -ini@^1.3.5: - version "1.3.8" - resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" - integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== - -internal-slot@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.5.tgz#f2a2ee21f668f8627a4667f309dc0f4fb6674986" - integrity sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ== - dependencies: - get-intrinsic "^1.2.0" - has "^1.0.3" - side-channel "^1.0.4" - -interpret@^1.0.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.4.0.tgz#665ab8bc4da27a774a40584e812e3e0fa45b1a1e" - integrity sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA== - -invert-kv@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" - integrity sha512-xgs2NH9AE66ucSq4cNG1nhSFghr5l6tdL15Pk+jl46bmmBapgoaY/AacXyaDznAqmGL99TiLSQgO/XazFSKYeQ== - -io-ts@1.10.4: - version "1.10.4" - resolved "https://registry.yarnpkg.com/io-ts/-/io-ts-1.10.4.tgz#cd5401b138de88e4f920adbcb7026e2d1967e6e2" - integrity sha512-b23PteSnYXSONJ6JQXRAlvJhuw8KOtkqa87W4wDtvMrud/DTJd5X+NpOOI+O/zZwVq6v0VLAaJ+1EDViKEuN9g== - dependencies: - fp-ts "^1.0.0" - -ipaddr.js@1.9.1: - version "1.9.1" - resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" - integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== - -is-arguments@^1.0.4: - version "1.1.1" - resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.1.1.tgz#15b3f88fda01f2a97fec84ca761a560f123efa9b" - integrity sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA== - dependencies: - call-bind "^1.0.2" - has-tostringtag "^1.0.0" - -is-array-buffer@^3.0.1, is-array-buffer@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/is-array-buffer/-/is-array-buffer-3.0.2.tgz#f2653ced8412081638ecb0ebbd0c41c6e0aecbbe" - integrity sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w== - dependencies: - call-bind "^1.0.2" - get-intrinsic "^1.2.0" - is-typed-array "^1.1.10" - -is-arrayish@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" - integrity sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg== - -is-bigint@^1.0.1: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.4.tgz#08147a1875bc2b32005d41ccd8291dffc6691df3" - integrity sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg== - dependencies: - has-bigints "^1.0.1" - -is-binary-path@~2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" - integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== - dependencies: - binary-extensions "^2.0.0" - -is-boolean-object@^1.1.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.1.2.tgz#5c6dc200246dd9321ae4b885a114bb1f75f63719" - integrity sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA== - dependencies: - call-bind "^1.0.2" - has-tostringtag "^1.0.0" - -is-buffer@^2.0.5, is-buffer@~2.0.3: - version "2.0.5" - resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.5.tgz#ebc252e400d22ff8d77fa09888821a24a658c191" - integrity sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ== - -is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.7: - version "1.2.7" - resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055" - integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== - -is-core-module@^2.11.0: - version "2.12.0" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.12.0.tgz#36ad62f6f73c8253fd6472517a12483cf03e7ec4" - integrity sha512-RECHCBCd/viahWmwj6enj19sKbHfJrddi/6cBDsNTKbNq0f7VeaUkBo60BqzvPqo/W54ChS62Z5qyun7cfOMqQ== - dependencies: - has "^1.0.3" - -is-date-object@^1.0.1: - version "1.0.5" - resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.5.tgz#0841d5536e724c25597bf6ea62e1bd38298df31f" - integrity sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ== - dependencies: - has-tostringtag "^1.0.0" - -is-extglob@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" - integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== - -is-fullwidth-code-point@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" - integrity sha512-1pqUqRjkhPJ9miNq9SwMfdvi6lBJcd6eFxvfaivQhaH3SgisfiuudvFntdKOmxuee/77l+FPjKrQjWvmPjWrRw== - dependencies: - number-is-nan "^1.0.0" - -is-fullwidth-code-point@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" - integrity sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w== - -is-fullwidth-code-point@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" - integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== - -is-function@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-function/-/is-function-1.0.2.tgz#4f097f30abf6efadac9833b17ca5dc03f8144e08" - integrity sha512-lw7DUp0aWXYg+CBCN+JKkcE0Q2RayZnSvnZBlwgxHBQhqt5pZNVy4Ri7H9GmmXkdu7LUthszM+Tor1u/2iBcpQ== - -is-generator-function@^1.0.7: - version "1.0.10" - resolved "https://registry.yarnpkg.com/is-generator-function/-/is-generator-function-1.0.10.tgz#f1558baf1ac17e0deea7c0415c438351ff2b3c72" - integrity sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A== - dependencies: - has-tostringtag "^1.0.0" - -is-glob@^4.0.1, is-glob@~4.0.1: - version "4.0.3" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" - integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== - dependencies: - is-extglob "^2.1.1" - -is-hex-prefixed@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz#7d8d37e6ad77e5d127148913c573e082d777f554" - integrity sha512-WvtOiug1VFrE9v1Cydwm+FnXd3+w9GaeVUss5W4v/SLy3UW00vP+6iNF2SdnfiBoLy4bTqVdkftNGTUeOFVsbA== - -is-lower-case@^1.1.0: - version "1.1.3" - resolved "https://registry.yarnpkg.com/is-lower-case/-/is-lower-case-1.1.3.tgz#7e147be4768dc466db3bfb21cc60b31e6ad69393" - integrity sha512-+5A1e/WJpLLXZEDlgz4G//WYSHyQBD32qa4Jd3Lw06qQlv3fJHnp3YIHjTQSGzHMgzmVKz2ZP3rBxTHkPw/lxA== - dependencies: - lower-case "^1.1.0" - -is-negative-zero@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.2.tgz#7bf6f03a28003b8b3965de3ac26f664d765f3150" - integrity sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA== - -is-number-object@^1.0.4: - version "1.0.7" - resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.7.tgz#59d50ada4c45251784e9904f5246c742f07a42fc" - integrity sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ== - dependencies: - has-tostringtag "^1.0.0" - -is-number@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" - integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== - -is-plain-obj@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287" - integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA== - -is-regex@^1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958" - integrity sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg== - dependencies: - call-bind "^1.0.2" - has-tostringtag "^1.0.0" - -is-shared-array-buffer@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz#8f259c573b60b6a32d4058a1a07430c0a7344c79" - integrity sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA== - dependencies: - call-bind "^1.0.2" - -is-string@^1.0.5, is-string@^1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.7.tgz#0dd12bf2006f255bb58f695110eff7491eebc0fd" - integrity sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg== - dependencies: - has-tostringtag "^1.0.0" - -is-symbol@^1.0.2, is-symbol@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.4.tgz#a6dac93b635b063ca6872236de88910a57af139c" - integrity sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg== - dependencies: - has-symbols "^1.0.2" - -is-typed-array@^1.1.10, is-typed-array@^1.1.3, is-typed-array@^1.1.9: - version "1.1.10" - resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.10.tgz#36a5b5cb4189b575d1a3e4b08536bfb485801e3f" - integrity sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A== - dependencies: - available-typed-arrays "^1.0.5" - call-bind "^1.0.2" - for-each "^0.3.3" - gopd "^1.0.1" - has-tostringtag "^1.0.0" - -is-typedarray@^1.0.0, is-typedarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" - integrity sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA== - -is-unicode-supported@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7" - integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw== - -is-upper-case@^1.1.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/is-upper-case/-/is-upper-case-1.1.2.tgz#8d0b1fa7e7933a1e58483600ec7d9661cbaf756f" - integrity sha512-GQYSJMgfeAmVwh9ixyk888l7OIhNAGKtY6QA+IrWlu9MDTCaXmeozOZ2S9Knj7bQwBO/H6J2kb+pbyTUiMNbsw== - dependencies: - upper-case "^1.1.0" - -is-utf8@^0.2.0: - version "0.2.1" - resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" - integrity sha512-rMYPYvCzsXywIsldgLaSoPlw5PfoB/ssr7hY4pLfcodrA5M/eArza1a9VmTiNIBNMjOGr1Ow9mTyU2o69U6U9Q== - -is-weakref@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-weakref/-/is-weakref-1.0.2.tgz#9529f383a9338205e89765e0392efc2f100f06f2" - integrity sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ== - dependencies: - call-bind "^1.0.2" - -isarray@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.5.tgz#8af1e4c1221244cc62459faf38940d4e644a5723" - integrity sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw== - -isarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" - integrity sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ== - -isexe@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" - integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== - -isstream@~0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" - integrity sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g== - -js-sdsl@^4.1.4: - version "4.4.0" - resolved "https://registry.yarnpkg.com/js-sdsl/-/js-sdsl-4.4.0.tgz#8b437dbe642daa95760400b602378ed8ffea8430" - integrity sha512-FfVSdx6pJ41Oa+CF7RDaFmTnCaFhua+SNYQX74riGOpl96x+2jQCqEfQ2bnXu/5DPCqlRuiqyvTJM0Qjz26IVg== - -js-sha3@0.5.5: - version "0.5.5" - resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.5.5.tgz#baf0c0e8c54ad5903447df96ade7a4a1bca79a4a" - integrity sha512-yLLwn44IVeunwjpDVTDZmQeVbB0h+dZpY2eO68B/Zik8hu6dH+rKeLxwua79GGIvW6xr8NBAcrtiUbYrTjEFTA== - -js-sha3@0.5.7, js-sha3@^0.5.7: - version "0.5.7" - resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.5.7.tgz#0d4ffd8002d5333aabaf4a23eed2f6374c9f28e7" - integrity sha512-GII20kjaPX0zJ8wzkTbNDYMY7msuZcTWk8S5UOh6806Jq/wz1J8/bnr8uGU0DAUmYDjj2Mr4X1cW8v/GLYnR+g== - -js-sha3@0.8.0, js-sha3@^0.8.0: - version "0.8.0" - resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.8.0.tgz#b9b7a5da73afad7dedd0f8c463954cbde6818840" - integrity sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q== - -js-yaml@3.13.1: - version "3.13.1" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847" - integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw== - dependencies: - argparse "^1.0.7" - esprima "^4.0.0" - -js-yaml@3.x: - version "3.14.1" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" - integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== - dependencies: - argparse "^1.0.7" - esprima "^4.0.0" - -js-yaml@4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" - integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== - dependencies: - argparse "^2.0.1" - -jsbn@~0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" - integrity sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg== - -json-buffer@3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13" - integrity sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ== - -json-schema-traverse@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" - integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== - -json-schema-traverse@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2" - integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug== - -json-schema@0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.4.0.tgz#f7de4cf6efab838ebaeb3236474cbba5a1930ab5" - integrity sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA== - -json-stringify-safe@~5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" - integrity sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA== - -jsonfile@^2.1.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-2.4.0.tgz#3736a2b428b87bbda0cc83b53fa3d633a35c2ae8" - integrity sha512-PKllAqbgLgxHaj8TElYymKCAgrASebJrWpTnEkOaTowt23VKXXN0sUeriJ+eh7y6ufb/CC5ap11pz71/cM0hUw== - optionalDependencies: - graceful-fs "^4.1.6" - -jsonfile@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" - integrity sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg== - optionalDependencies: - graceful-fs "^4.1.6" - -jsonfile@^6.0.1: - version "6.1.0" - resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae" - integrity sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ== - dependencies: - universalify "^2.0.0" - optionalDependencies: - graceful-fs "^4.1.6" - -jsonschema@^1.2.4: - version "1.4.1" - resolved "https://registry.yarnpkg.com/jsonschema/-/jsonschema-1.4.1.tgz#cc4c3f0077fb4542982973d8a083b6b34f482dab" - integrity sha512-S6cATIPVv1z0IlxdN+zUk5EPjkGCdnhN4wVSBlvoUO1tOLJootbo9CquNJmbIh4yikWHiUedhRYrNPn1arpEmQ== - -jsprim@^1.2.2: - version "1.4.2" - resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.2.tgz#712c65533a15c878ba59e9ed5f0e26d5b77c5feb" - integrity sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw== - dependencies: - assert-plus "1.0.0" - extsprintf "1.3.0" - json-schema "0.4.0" - verror "1.10.0" - -keccak@^3.0.0, keccak@^3.0.2: - version "3.0.3" - resolved "https://registry.yarnpkg.com/keccak/-/keccak-3.0.3.tgz#4bc35ad917be1ef54ff246f904c2bbbf9ac61276" - integrity sha512-JZrLIAJWuZxKbCilMpNz5Vj7Vtb4scDG3dMXLOsbzBmQGyjwE61BbW7bJkfKKCShXiQZt3T6sBgALRtmd+nZaQ== - dependencies: - node-addon-api "^2.0.0" - node-gyp-build "^4.2.0" - readable-stream "^3.6.0" - -keyv@^4.0.0: - version "4.5.2" - resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.2.tgz#0e310ce73bf7851ec702f2eaf46ec4e3805cce56" - integrity sha512-5MHbFaKn8cNSmVW7BYnijeAVlE4cYA/SVkifVgrh7yotnfhKmjuXpDKjrABLnT0SfHWV21P8ow07OGfRrNDg8g== - dependencies: - json-buffer "3.0.1" - -kind-of@^6.0.2: - version "6.0.3" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" - integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== - -klaw@^1.0.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/klaw/-/klaw-1.3.1.tgz#4088433b46b3b1ba259d78785d8e96f73ba02439" - integrity sha512-TED5xi9gGQjGpNnvRWknrwAB1eL5GciPfVFOt3Vk1OJCVDQbzuSfrF3hkUQKlsgKrG1F+0t5W0m+Fje1jIt8rw== - optionalDependencies: - graceful-fs "^4.1.9" - -lcid@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" - integrity sha512-YiGkH6EnGrDGqLMITnGjXtGmNtjoXw9SVUzcaos8RBi7Ps0VBylkq+vOcY9QE5poLasPCR849ucFUkl0UzUyOw== - dependencies: - invert-kv "^1.0.0" - -level-supports@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/level-supports/-/level-supports-4.0.1.tgz#431546f9d81f10ff0fea0e74533a0e875c08c66a" - integrity sha512-PbXpve8rKeNcZ9C1mUicC9auIYFyGpkV9/i6g76tLgANwWhtG2v7I4xNBUlkn3lE2/dZF3Pi0ygYGtLc4RXXdA== - -level-transcoder@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/level-transcoder/-/level-transcoder-1.0.1.tgz#f8cef5990c4f1283d4c86d949e73631b0bc8ba9c" - integrity sha512-t7bFwFtsQeD8cl8NIoQ2iwxA0CL/9IFw7/9gAjOonH0PWTTiRfY7Hq+Ejbsxh86tXobDQ6IOiddjNYIfOBs06w== - dependencies: - buffer "^6.0.3" - module-error "^1.0.1" - -level@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/level/-/level-8.0.0.tgz#41b4c515dabe28212a3e881b61c161ffead14394" - integrity sha512-ypf0jjAk2BWI33yzEaaotpq7fkOPALKAgDBxggO6Q9HGX2MRXn0wbP1Jn/tJv1gtL867+YOjOB49WaUF3UoJNQ== - dependencies: - browser-level "^1.0.1" - classic-level "^1.2.0" - -levn@~0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" - integrity sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA== - dependencies: - prelude-ls "~1.1.2" - type-check "~0.3.2" - -load-json-file@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" - integrity sha512-cy7ZdNRXdablkXYNI049pthVeXFurRyb9+hA/dZzerZ0pGTx42z+y+ssxBaVV2l70t1muq5IdKhn4UtcoGUY9A== - dependencies: - graceful-fs "^4.1.2" - parse-json "^2.2.0" - pify "^2.0.0" - pinkie-promise "^2.0.0" - strip-bom "^2.0.0" - -locate-path@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" - integrity sha512-NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA== - dependencies: - p-locate "^2.0.0" - path-exists "^3.0.0" - -locate-path@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" - integrity sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A== - dependencies: - p-locate "^3.0.0" - path-exists "^3.0.0" - -locate-path@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" - integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== - dependencies: - p-locate "^4.1.0" - -locate-path@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" - integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== - dependencies: - p-locate "^5.0.0" - -lodash.assign@^4.0.3, lodash.assign@^4.0.6: - version "4.2.0" - resolved "https://registry.yarnpkg.com/lodash.assign/-/lodash.assign-4.2.0.tgz#0d99f3ccd7a6d261d19bdaeb9245005d285808e7" - integrity sha512-hFuH8TY+Yji7Eja3mGiuAxBqLagejScbG8GbG0j6o9vzn0YL14My+ktnqtZgFTosKymC9/44wP6s7xyuLfnClw== - -lodash.camelcase@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" - integrity sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA== - -lodash.flatten@^4.4.0: - version "4.4.0" - resolved "https://registry.yarnpkg.com/lodash.flatten/-/lodash.flatten-4.4.0.tgz#f31c22225a9632d2bbf8e4addbef240aa765a61f" - integrity sha512-C5N2Z3DgnnKr0LOpv/hKCgKdb7ZZwafIrsesve6lmzvZIRZRGaZ/l6Q8+2W7NaT+ZwO3fFlSCzCzrDCFdJfZ4g== - -lodash.merge@^4.6.2: - version "4.6.2" - resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" - integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== - -lodash.truncate@^4.4.2: - version "4.4.2" - resolved "https://registry.yarnpkg.com/lodash.truncate/-/lodash.truncate-4.4.2.tgz#5a350da0b1113b837ecfffd5812cbe58d6eae193" - integrity sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw== - -lodash@^4.17.11, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.16, lodash@^4.17.19, lodash@^4.17.21: - version "4.17.21" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" - integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== - -log-symbols@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-3.0.0.tgz#f3a08516a5dea893336a7dee14d18a1cfdab77c4" - integrity sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ== - dependencies: - chalk "^2.4.2" - -log-symbols@4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.1.0.tgz#3fbdbb95b4683ac9fc785111e792e558d4abd503" - integrity sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg== - dependencies: - chalk "^4.1.0" - is-unicode-supported "^0.1.0" - -loupe@^2.3.1: - version "2.3.6" - resolved "https://registry.yarnpkg.com/loupe/-/loupe-2.3.6.tgz#76e4af498103c532d1ecc9be102036a21f787b53" - integrity sha512-RaPMZKiMy8/JruncMU5Bt6na1eftNoo++R4Y+N2FrxkDVTrGvcyzFTsaGif4QTeKESheMGegbhw6iUAq+5A8zA== - dependencies: - get-func-name "^2.0.0" - -lower-case-first@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/lower-case-first/-/lower-case-first-1.0.2.tgz#e5da7c26f29a7073be02d52bac9980e5922adfa1" - integrity sha512-UuxaYakO7XeONbKrZf5FEgkantPf5DUqDayzP5VXZrtRPdH86s4kN47I8B3TW10S4QKiE3ziHNf3kRN//okHjA== - dependencies: - lower-case "^1.1.2" - -lower-case@^1.1.0, lower-case@^1.1.1, lower-case@^1.1.2: - version "1.1.4" - resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-1.1.4.tgz#9a2cabd1b9e8e0ae993a4bf7d5875c39c42e8eac" - integrity sha512-2Fgx1Ycm599x+WGpIYwJOvsjmXFzTSc34IwDWALRA/8AopUKAVPwfJ+h5+f85BCp0PWmmJcWzEpxOpoXycMpdA== - -lowercase-keys@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-2.0.0.tgz#2603e78b7b4b0006cbca2fbcc8a3202558ac9479" - integrity sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA== - -lowercase-keys@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-3.0.0.tgz#c5e7d442e37ead247ae9db117a9d0a467c89d4f2" - integrity sha512-ozCC6gdQ+glXOQsveKD0YsDy8DSQFjDTz4zyzEHNV5+JP5D62LmfDZ6o1cycFx9ouG940M5dE8C8CTewdj2YWQ== - -lru-cache@^5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" - integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== - dependencies: - yallist "^3.0.2" - -lru-cache@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" - integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== - dependencies: - yallist "^4.0.0" - -lru_map@^0.3.3: - version "0.3.3" - resolved "https://registry.yarnpkg.com/lru_map/-/lru_map-0.3.3.tgz#b5c8351b9464cbd750335a79650a0ec0e56118dd" - integrity sha512-Pn9cox5CsMYngeDbmChANltQl+5pi6XmTrraMSzhPmMBbmgcxmqWry0U3PGapCU1yB4/LqCcom7qhHZiF/jGfQ== - -make-error@^1.1.1: - version "1.3.6" - resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" - integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== - -markdown-table@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/markdown-table/-/markdown-table-1.1.3.tgz#9fcb69bcfdb8717bfd0398c6ec2d93036ef8de60" - integrity sha512-1RUZVgQlpJSPWYbFSpmudq5nHY1doEIv89gBtF0s4gW1GF2XorxcA/70M5vq7rLv0a6mhOUccRsqkwhwLCIQ2Q== - -match-all@^1.2.6: - version "1.2.6" - resolved "https://registry.yarnpkg.com/match-all/-/match-all-1.2.6.tgz#66d276ad6b49655551e63d3a6ee53e8be0566f8d" - integrity sha512-0EESkXiTkWzrQQntBu2uzKvLu6vVkUGz40nGPbSZuegcfE5UuSzNjLaIu76zJWuaT/2I3Z/8M06OlUOZLGwLlQ== - -mcl-wasm@^0.7.1: - version "0.7.9" - resolved "https://registry.yarnpkg.com/mcl-wasm/-/mcl-wasm-0.7.9.tgz#c1588ce90042a8700c3b60e40efb339fc07ab87f" - integrity sha512-iJIUcQWA88IJB/5L15GnJVnSQJmf/YaxxV6zRavv83HILHaJQb6y0iFyDMdDO0gN8X37tdxmAOrH/P8B6RB8sQ== - -md5.js@^1.3.4: - version "1.3.5" - resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.5.tgz#b5d07b8e3216e3e27cd728d72f70d1e6a342005f" - integrity sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg== - dependencies: - hash-base "^3.0.0" - inherits "^2.0.1" - safe-buffer "^5.1.2" - -media-typer@0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" - integrity sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ== - -memory-level@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/memory-level/-/memory-level-1.0.0.tgz#7323c3fd368f9af2f71c3cd76ba403a17ac41692" - integrity sha512-UXzwewuWeHBz5krr7EvehKcmLFNoXxGcvuYhC41tRnkrTbJohtS7kVn9akmgirtRygg+f7Yjsfi8Uu5SGSQ4Og== - dependencies: - abstract-level "^1.0.0" - functional-red-black-tree "^1.0.1" - module-error "^1.0.1" - -memorystream@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/memorystream/-/memorystream-0.3.1.tgz#86d7090b30ce455d63fbae12dda51a47ddcaf9b2" - integrity sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw== - -merge-descriptors@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" - integrity sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w== - -merge2@^1.2.3, merge2@^1.3.0: - version "1.4.1" - resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" - integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== - -methods@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" - integrity sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w== - -micromatch@^4.0.4: - version "4.0.5" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" - integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== - dependencies: - braces "^3.0.2" - picomatch "^2.3.1" - -mime-db@1.52.0: - version "1.52.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" - integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== - -mime-types@^2.1.12, mime-types@^2.1.16, mime-types@~2.1.19, mime-types@~2.1.24, mime-types@~2.1.34: - version "2.1.35" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" - integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== - dependencies: - mime-db "1.52.0" - -mime@1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" - integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== - -mimic-response@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.1.tgz#4923538878eef42063cb8a3e3b0798781487ab1b" - integrity sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ== - -mimic-response@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-3.1.0.tgz#2d1d59af9c1b129815accc2c46a022a5ce1fa3c9" - integrity sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ== - -min-document@^2.19.0: - version "2.19.0" - resolved "https://registry.yarnpkg.com/min-document/-/min-document-2.19.0.tgz#7bd282e3f5842ed295bb748cdd9f1ffa2c824685" - integrity sha512-9Wy1B3m3f66bPPmU5hdA4DR4PB2OfDU/+GS3yAB7IQozE3tqXaVv2zOjgla7MEGSRv95+ILmOuvhLkOK6wJtCQ== - dependencies: - dom-walk "^0.1.0" - -minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" - integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== - -minimalistic-crypto-utils@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" - integrity sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg== - -"minimatch@2 || 3", minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1: - version "3.1.2" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" - integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== - dependencies: - brace-expansion "^1.1.7" - -minimatch@3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" - integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== - dependencies: - brace-expansion "^1.1.7" - -minimatch@5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.0.1.tgz#fb9022f7528125187c92bd9e9b6366be1cf3415b" - integrity sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g== - dependencies: - brace-expansion "^2.0.1" - -minimist@^1.2.0, minimist@^1.2.5, minimist@^1.2.6: - version "1.2.8" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" - integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== - -minipass@^2.6.0, minipass@^2.9.0: - version "2.9.0" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.9.0.tgz#e713762e7d3e32fed803115cf93e04bca9fcc9a6" - integrity sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg== - dependencies: - safe-buffer "^5.1.2" - yallist "^3.0.0" - -minizlib@^1.3.3: - version "1.3.3" - resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.3.3.tgz#2290de96818a34c29551c8a8d301216bd65a861d" - integrity sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q== - dependencies: - minipass "^2.9.0" - -mkdirp-promise@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/mkdirp-promise/-/mkdirp-promise-5.0.1.tgz#e9b8f68e552c68a9c1713b84883f7a1dd039b8a1" - integrity sha512-Hepn5kb1lJPtVW84RFT40YG1OddBNTOVUZR2bzQUHc+Z03en8/3uX0+060JDhcEzyO08HmipsN9DcnFMxhIL9w== - dependencies: - mkdirp "*" - -mkdirp@*: - version "3.0.1" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-3.0.1.tgz#e44e4c5607fb279c168241713cc6e0fea9adcb50" - integrity sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg== - -mkdirp@0.5.5: - version "0.5.5" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" - integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== - dependencies: - minimist "^1.2.5" - -mkdirp@0.5.x, mkdirp@^0.5.5: - version "0.5.6" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.6.tgz#7def03d2432dcae4ba1d611445c48396062255f6" - integrity sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw== - dependencies: - minimist "^1.2.6" - -mkdirp@^1.0.3, mkdirp@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" - integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== - -mnemonist@^0.38.0: - version "0.38.5" - resolved "https://registry.yarnpkg.com/mnemonist/-/mnemonist-0.38.5.tgz#4adc7f4200491237fe0fa689ac0b86539685cade" - integrity sha512-bZTFT5rrPKtPJxj8KSV0WkPyNxl72vQepqqVUAW2ARUpUSF2qXMB6jZj7hW5/k7C1rtpzqbD/IIbJwLXUjCHeg== - dependencies: - obliterator "^2.0.0" - -mocha@7.1.2: - version "7.1.2" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-7.1.2.tgz#8e40d198acf91a52ace122cd7599c9ab857b29e6" - integrity sha512-o96kdRKMKI3E8U0bjnfqW4QMk12MwZ4mhdBTf+B5a1q9+aq2HRnj+3ZdJu0B/ZhJeK78MgYuv6L8d/rA5AeBJA== - dependencies: - ansi-colors "3.2.3" - browser-stdout "1.3.1" - chokidar "3.3.0" - debug "3.2.6" - diff "3.5.0" - escape-string-regexp "1.0.5" - find-up "3.0.0" - glob "7.1.3" - growl "1.10.5" - he "1.2.0" - js-yaml "3.13.1" - log-symbols "3.0.0" - minimatch "3.0.4" - mkdirp "0.5.5" - ms "2.1.1" - node-environment-flags "1.0.6" - object.assign "4.1.0" - strip-json-comments "2.0.1" - supports-color "6.0.0" - which "1.3.1" - wide-align "1.1.3" - yargs "13.3.2" - yargs-parser "13.1.2" - yargs-unparser "1.6.0" - -mocha@^10.0.0: - version "10.2.0" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-10.2.0.tgz#1fd4a7c32ba5ac372e03a17eef435bd00e5c68b8" - integrity sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg== - dependencies: - ansi-colors "4.1.1" - browser-stdout "1.3.1" - chokidar "3.5.3" - debug "4.3.4" - diff "5.0.0" - escape-string-regexp "4.0.0" - find-up "5.0.0" - glob "7.2.0" - he "1.2.0" - js-yaml "4.1.0" - log-symbols "4.1.0" - minimatch "5.0.1" - ms "2.1.3" - nanoid "3.3.3" - serialize-javascript "6.0.0" - strip-json-comments "3.1.1" - supports-color "8.1.1" - workerpool "6.2.1" - yargs "16.2.0" - yargs-parser "20.2.4" - yargs-unparser "2.0.0" - -mocha@^7.1.1: - version "7.2.0" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-7.2.0.tgz#01cc227b00d875ab1eed03a75106689cfed5a604" - integrity sha512-O9CIypScywTVpNaRrCAgoUnJgozpIofjKUYmJhiCIJMiuYnLI6otcb1/kpW9/n/tJODHGZ7i8aLQoDVsMtOKQQ== - dependencies: - ansi-colors "3.2.3" - browser-stdout "1.3.1" - chokidar "3.3.0" - debug "3.2.6" - diff "3.5.0" - escape-string-regexp "1.0.5" - find-up "3.0.0" - glob "7.1.3" - growl "1.10.5" - he "1.2.0" - js-yaml "3.13.1" - log-symbols "3.0.0" - minimatch "3.0.4" - mkdirp "0.5.5" - ms "2.1.1" - node-environment-flags "1.0.6" - object.assign "4.1.0" - strip-json-comments "2.0.1" - supports-color "6.0.0" - which "1.3.1" - wide-align "1.1.3" - yargs "13.3.2" - yargs-parser "13.1.2" - yargs-unparser "1.6.0" - -mock-fs@^4.1.0: - version "4.14.0" - resolved "https://registry.yarnpkg.com/mock-fs/-/mock-fs-4.14.0.tgz#ce5124d2c601421255985e6e94da80a7357b1b18" - integrity sha512-qYvlv/exQ4+svI3UOvPUpLDF0OMX5euvUH0Ny4N5QyRyhNdgAgUrVH3iUINSzEPLvx0kbo/Bp28GJKIqvE7URw== - -module-error@^1.0.1, module-error@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/module-error/-/module-error-1.0.2.tgz#8d1a48897ca883f47a45816d4fb3e3c6ba404d86" - integrity sha512-0yuvsqSCv8LbaOKhnsQ/T5JhyFlCYLPXK3U2sgV10zoKQwzs/MyfuQUOZQ1V/6OCOJsK/TRgNVrPuPDqtdMFtA== - -ms@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" - integrity sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A== - -ms@2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" - integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg== - -ms@2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" - integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== - -ms@2.1.3, ms@^2.1.1: - version "2.1.3" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" - integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== - -multibase@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/multibase/-/multibase-0.7.0.tgz#1adfc1c50abe05eefeb5091ac0c2728d6b84581b" - integrity sha512-TW8q03O0f6PNFTQDvh3xxH03c8CjGaaYrjkl9UQPG6rz53TQzzxJVCIWVjzcbN/Q5Y53Zd0IBQBMVktVgNx4Fg== - dependencies: - base-x "^3.0.8" - buffer "^5.5.0" - -multibase@~0.6.0: - version "0.6.1" - resolved "https://registry.yarnpkg.com/multibase/-/multibase-0.6.1.tgz#b76df6298536cc17b9f6a6db53ec88f85f8cc12b" - integrity sha512-pFfAwyTjbbQgNc3G7D48JkJxWtoJoBMaR4xQUOuB8RnCgRqaYmWNFeJTTvrJ2w51bjLq2zTby6Rqj9TQ9elSUw== - dependencies: - base-x "^3.0.8" - buffer "^5.5.0" - -multicodec@^0.5.5: - version "0.5.7" - resolved "https://registry.yarnpkg.com/multicodec/-/multicodec-0.5.7.tgz#1fb3f9dd866a10a55d226e194abba2dcc1ee9ffd" - integrity sha512-PscoRxm3f+88fAtELwUnZxGDkduE2HD9Q6GHUOywQLjOGT/HAdhjLDYNZ1e7VR0s0TP0EwZ16LNUTFpoBGivOA== - dependencies: - varint "^5.0.0" - -multicodec@^1.0.0: - version "1.0.4" - resolved "https://registry.yarnpkg.com/multicodec/-/multicodec-1.0.4.tgz#46ac064657c40380c28367c90304d8ed175a714f" - integrity sha512-NDd7FeS3QamVtbgfvu5h7fd1IlbaC4EQ0/pgU4zqE2vdHCmBGsUa0TiM8/TdSeG6BMPC92OOCf8F1ocE/Wkrrg== - dependencies: - buffer "^5.6.0" - varint "^5.0.0" - -multihashes@^0.4.15, multihashes@~0.4.15: - version "0.4.21" - resolved "https://registry.yarnpkg.com/multihashes/-/multihashes-0.4.21.tgz#dc02d525579f334a7909ade8a122dabb58ccfcb5" - integrity sha512-uVSvmeCWf36pU2nB4/1kzYZjsXD9vofZKpgudqkceYY5g2aZZXJ5r9lxuzoRLl1OAp28XljXsEJ/X/85ZsKmKw== - dependencies: - buffer "^5.5.0" - multibase "^0.7.0" - varint "^5.0.0" - -murmur-128@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/murmur-128/-/murmur-128-0.2.1.tgz#a9f6568781d2350ecb1bf80c14968cadbeaa4b4d" - integrity sha512-WseEgiRkI6aMFBbj8Cg9yBj/y+OdipwVC7zUo3W2W1JAJITwouUOtpqsmGSg67EQmwwSyod7hsVsWY5LsrfQVg== - dependencies: - encode-utf8 "^1.0.2" - fmix "^0.1.0" - imul "^1.0.0" - -nano-base32@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/nano-base32/-/nano-base32-1.0.1.tgz#ba548c879efcfb90da1c4d9e097db4a46c9255ef" - integrity sha512-sxEtoTqAPdjWVGv71Q17koMFGsOMSiHsIFEvzOM7cNp8BXB4AnEwmDabm5dorusJf/v1z7QxaZYxUorU9RKaAw== - -nano-json-stream-parser@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/nano-json-stream-parser/-/nano-json-stream-parser-0.1.2.tgz#0cc8f6d0e2b622b479c40d499c46d64b755c6f5f" - integrity sha512-9MqxMH/BSJC7dnLsEMPyfN5Dvoo49IsPFYMcHw3Bcfc2kN0lpHRBSzlMSVx4HGyJ7s9B31CyBTVehWJoQ8Ctew== - -nanoid@3.3.3: - version "3.3.3" - resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.3.tgz#fd8e8b7aa761fe807dba2d1b98fb7241bb724a25" - integrity sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w== - -napi-macros@^2.2.2: - version "2.2.2" - resolved "https://registry.yarnpkg.com/napi-macros/-/napi-macros-2.2.2.tgz#817fef20c3e0e40a963fbf7b37d1600bd0201044" - integrity sha512-hmEVtAGYzVQpCKdbQea4skABsdXW4RUh5t5mJ2zzqowJS2OyXZTU1KhDVFhx+NlWZ4ap9mqR9TcDO3LTTttd+g== - -negotiator@0.6.3: - version "0.6.3" - resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd" - integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg== - -neo-async@^2.6.0: - version "2.6.2" - resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" - integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== - -next-tick@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.1.0.tgz#1836ee30ad56d67ef281b22bd199f709449b35eb" - integrity sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ== - -no-case@^2.2.0, no-case@^2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/no-case/-/no-case-2.3.2.tgz#60b813396be39b3f1288a4c1ed5d1e7d28b464ac" - integrity sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ== - dependencies: - lower-case "^1.1.1" - -node-addon-api@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-2.0.2.tgz#432cfa82962ce494b132e9d72a15b29f71ff5d32" - integrity sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA== - -node-emoji@^1.10.0: - version "1.11.0" - resolved "https://registry.yarnpkg.com/node-emoji/-/node-emoji-1.11.0.tgz#69a0150e6946e2f115e9d7ea4df7971e2628301c" - integrity sha512-wo2DpQkQp7Sjm2A0cq+sN7EHKO6Sl0ctXeBdFZrL9T9+UywORbufTcTZxom8YqpLQt/FqNMUkOpkZrJVYSKD3A== - dependencies: - lodash "^4.17.21" - -node-environment-flags@1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/node-environment-flags/-/node-environment-flags-1.0.6.tgz#a30ac13621f6f7d674260a54dede048c3982c088" - integrity sha512-5Evy2epuL+6TM0lCQGpFIj6KwiEsGh1SrHUhTbNX+sLbBtjidPZFAnVK9y5yU1+h//RitLbRHTIMyxQPtxMdHw== - dependencies: - object.getownpropertydescriptors "^2.0.3" - semver "^5.7.0" - -node-fetch@2.6.7: - version "2.6.7" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad" - integrity sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ== - dependencies: - whatwg-url "^5.0.0" - -node-gyp-build@^4.2.0, node-gyp-build@^4.3.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.6.0.tgz#0c52e4cbf54bbd28b709820ef7b6a3c2d6209055" - integrity sha512-NTZVKn9IylLwUzaKjkas1e4u2DLNcV4rdYagA4PWdPwW87Bi7z+BznyKSRwS/761tV/lzCGXplWsiaMjLqP2zQ== - -nofilter@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/nofilter/-/nofilter-1.0.4.tgz#78d6f4b6a613e7ced8b015cec534625f7667006e" - integrity sha512-N8lidFp+fCz+TD51+haYdbDGrcBWwuHX40F5+z0qkUjMJ5Tp+rdSuAkMJ9N9eoolDlEVTf6u5icM+cNKkKW2mA== - -nofilter@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/nofilter/-/nofilter-3.1.0.tgz#c757ba68801d41ff930ba2ec55bab52ca184aa66" - integrity sha512-l2NNj07e9afPnhAhvgVrCD/oy2Ai1yfLpuo3EpiO1jFTsB4sFz6oIfAfSZyQzVpkZQ9xS8ZS5g1jCBgq4Hwo0g== - -nopt@3.x: - version "3.0.6" - resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9" - integrity sha512-4GUt3kSEYmk4ITxzB/b9vaIDfUVWN/Ml1Fwl11IlnIG2iaJ9O6WXZ9SrYM9NLI8OCBieN2Y8SWC2oJV0RQ7qYg== - dependencies: - abbrev "1" - -normalize-package-data@^2.3.2: - version "2.5.0" - resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" - integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA== - dependencies: - hosted-git-info "^2.1.4" - resolve "^1.10.0" - semver "2 || 3 || 4 || 5" - validate-npm-package-license "^3.0.1" - -normalize-path@^3.0.0, normalize-path@~3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" - integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== - -normalize-url@^6.0.1: - version "6.1.0" - resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-6.1.0.tgz#40d0885b535deffe3f3147bec877d05fe4c5668a" - integrity sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A== - -nth-check@^2.0.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-2.1.1.tgz#c9eab428effce36cd6b92c924bdb000ef1f1ed1d" - integrity sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w== - dependencies: - boolbase "^1.0.0" - -number-is-nan@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" - integrity sha512-4jbtZXNAsfZbAHiiqjLPBiCl16dES1zI4Hpzzxw61Tk+loF+sBDBKx1ICKKKwIqQ7M0mFn1TmkN7euSncWgHiQ== - -number-to-bn@1.7.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/number-to-bn/-/number-to-bn-1.7.0.tgz#bb3623592f7e5f9e0030b1977bd41a0c53fe1ea0" - integrity sha512-wsJ9gfSz1/s4ZsJN01lyonwuxA1tml6X1yBDnfpMglypcBRFZZkus26EdPSlqS5GJfYddVZa22p3VNb3z5m5Ig== - dependencies: - bn.js "4.11.6" - strip-hex-prefix "1.0.0" - -oauth-sign@~0.9.0: - version "0.9.0" - resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" - integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== - -object-assign@^4, object-assign@^4.1.0, object-assign@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" - integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== - -object-inspect@^1.12.3, object-inspect@^1.9.0: - version "1.12.3" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.3.tgz#ba62dffd67ee256c8c086dfae69e016cd1f198b9" - integrity sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g== - -object-keys@^1.0.11, object-keys@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" - integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== - -object.assign@4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.0.tgz#968bf1100d7956bb3ca086f006f846b3bc4008da" - integrity sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w== - dependencies: - define-properties "^1.1.2" - function-bind "^1.1.1" - has-symbols "^1.0.0" - object-keys "^1.0.11" - -object.assign@^4.1.4: - version "4.1.4" - resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.4.tgz#9673c7c7c351ab8c4d0b516f4343ebf4dfb7799f" - integrity sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - has-symbols "^1.0.3" - object-keys "^1.1.1" - -object.getownpropertydescriptors@^2.0.3: - version "2.1.6" - resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.6.tgz#5e5c384dd209fa4efffead39e3a0512770ccc312" - integrity sha512-lq+61g26E/BgHv0ZTFgRvi7NMEPuAxLkFU7rukXjc/AlwH4Am5xXVnIXy3un1bg/JPbXHrixRkK1itUzzPiIjQ== - dependencies: - array.prototype.reduce "^1.0.5" - call-bind "^1.0.2" - define-properties "^1.2.0" - es-abstract "^1.21.2" - safe-array-concat "^1.0.0" - -obliterator@^2.0.0: - version "2.0.4" - resolved "https://registry.yarnpkg.com/obliterator/-/obliterator-2.0.4.tgz#fa650e019b2d075d745e44f1effeb13a2adbe816" - integrity sha512-lgHwxlxV1qIg1Eap7LgIeoBWIMFibOjbrYPIPJZcI1mmGAI2m3lNYpK12Y+GBdPQ0U1hRwSord7GIaawz962qQ== - -oboe@2.1.5: - version "2.1.5" - resolved "https://registry.yarnpkg.com/oboe/-/oboe-2.1.5.tgz#5554284c543a2266d7a38f17e073821fbde393cd" - integrity sha512-zRFWiF+FoicxEs3jNI/WYUrVEgA7DeET/InK0XQuudGHRg8iIob3cNPrJTKaz4004uaA9Pbe+Dwa8iluhjLZWA== - dependencies: - http-https "^1.0.0" - -on-finished@2.4.1: - version "2.4.1" - resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.4.1.tgz#58c8c44116e54845ad57f14ab10b03533184ac3f" - integrity sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg== - dependencies: - ee-first "1.1.1" - -once@1.x, once@^1.3.0, once@^1.3.1, once@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" - integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== - dependencies: - wrappy "1" - -optionator@^0.8.1: - version "0.8.3" - resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" - integrity sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA== - dependencies: - deep-is "~0.1.3" - fast-levenshtein "~2.0.6" - levn "~0.3.0" - prelude-ls "~1.1.2" - type-check "~0.3.2" - word-wrap "~1.2.3" - -ordinal@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/ordinal/-/ordinal-1.0.3.tgz#1a3c7726a61728112f50944ad7c35c06ae3a0d4d" - integrity sha512-cMddMgb2QElm8G7vdaa02jhUNbTSrhsgAGUz1OokD83uJTwSUn+nKoNoKVVaRa08yF6sgfO7Maou1+bgLd9rdQ== - -os-locale@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-1.4.0.tgz#20f9f17ae29ed345e8bde583b13d2009803c14d9" - integrity sha512-PRT7ZORmwu2MEFt4/fv3Q+mEfN4zetKxufQrkShY2oGvUms9r8otu5HfdyIFHkYXjO7laNsoVGmM2MANfuTA8g== - dependencies: - lcid "^1.0.0" - -os-tmpdir@~1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" - integrity sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g== - -p-cancelable@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-2.1.1.tgz#aab7fbd416582fa32a3db49859c122487c5ed2cf" - integrity sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg== - -p-cancelable@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-3.0.0.tgz#63826694b54d61ca1c20ebcb6d3ecf5e14cd8050" - integrity sha512-mlVgR3PGuzlo0MmTdk4cXqXWlwQDLnONTAg6sm62XkMJEiRxN3GL3SffkYvqwonbkJBcrI7Uvv5Zh9yjvn2iUw== - -p-limit@^1.1.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" - integrity sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q== - dependencies: - p-try "^1.0.0" - -p-limit@^2.0.0, p-limit@^2.2.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" - integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== - dependencies: - p-try "^2.0.0" - -p-limit@^3.0.2: - version "3.1.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" - integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== - dependencies: - yocto-queue "^0.1.0" - -p-locate@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" - integrity sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg== - dependencies: - p-limit "^1.1.0" - -p-locate@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" - integrity sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ== - dependencies: - p-limit "^2.0.0" - -p-locate@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" - integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== - dependencies: - p-limit "^2.2.0" - -p-locate@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" - integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== - dependencies: - p-limit "^3.0.2" - -p-map@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/p-map/-/p-map-4.0.0.tgz#bb2f95a5eda2ec168ec9274e06a747c3e2904d2b" - integrity sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ== - dependencies: - aggregate-error "^3.0.0" - -p-try@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" - integrity sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww== - -p-try@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" - integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== - -param-case@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/param-case/-/param-case-2.1.1.tgz#df94fd8cf6531ecf75e6bef9a0858fbc72be2247" - integrity sha512-eQE845L6ot89sk2N8liD8HAuH4ca6Vvr7VWAWwt7+kvvG5aBcPmmphQ68JsEG2qa9n1TykS2DLeMt363AAH8/w== - dependencies: - no-case "^2.2.0" - -parse-cache-control@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/parse-cache-control/-/parse-cache-control-1.0.1.tgz#8eeab3e54fa56920fe16ba38f77fa21aacc2d74e" - integrity sha512-60zvsJReQPX5/QP0Kzfd/VrpjScIQ7SHBW6bFCYfEP+fp0Eppr1SHhIO5nd1PjZtvclzSzES9D/p5nFJurwfWg== - -parse-headers@^2.0.0: - version "2.0.5" - resolved "https://registry.yarnpkg.com/parse-headers/-/parse-headers-2.0.5.tgz#069793f9356a54008571eb7f9761153e6c770da9" - integrity sha512-ft3iAoLOB/MlwbNXgzy43SWGP6sQki2jQvAyBg/zDFAgr9bfNWZIUj42Kw2eJIl8kEi4PbgE6U1Zau/HwI75HA== - -parse-json@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" - integrity sha512-QR/GGaKCkhwk1ePQNYDRKYZ3mwU9ypsKhB0XyFnLQdomyEqk3e8wpW3V5Jp88zbxK4n5ST1nqo+g9juTpownhQ== - dependencies: - error-ex "^1.2.0" - -parse5-htmlparser2-tree-adapter@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-7.0.0.tgz#23c2cc233bcf09bb7beba8b8a69d46b08c62c2f1" - integrity sha512-B77tOZrqqfUfnVcOrUvfdLbz4pu4RopLD/4vmu3HUPswwTA8OH0EMW9BlWR2B0RCoiZRAHEUu7IxeP1Pd1UU+g== - dependencies: - domhandler "^5.0.2" - parse5 "^7.0.0" - -parse5@^7.0.0: - version "7.1.2" - resolved "https://registry.yarnpkg.com/parse5/-/parse5-7.1.2.tgz#0736bebbfd77793823240a23b7fc5e010b7f8e32" - integrity sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw== - dependencies: - entities "^4.4.0" - -parseurl@~1.3.3: - version "1.3.3" - resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" - integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== - -pascal-case@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/pascal-case/-/pascal-case-2.0.1.tgz#2d578d3455f660da65eca18ef95b4e0de912761e" - integrity sha512-qjS4s8rBOJa2Xm0jmxXiyh1+OFf6ekCWOvUaRgAQSktzlTbMotS0nmG9gyYAybCWBcuP4fsBeRCKNwGBnMe2OQ== - dependencies: - camel-case "^3.0.0" - upper-case-first "^1.1.0" - -path-case@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/path-case/-/path-case-2.1.1.tgz#94b8037c372d3fe2906e465bb45e25d226e8eea5" - integrity sha512-Ou0N05MioItesaLr9q8TtHVWmJ6fxWdqKB2RohFmNWVyJ+2zeKIeDNWAN6B/Pe7wpzWChhZX6nONYmOnMeJQ/Q== - dependencies: - no-case "^2.2.0" - -path-exists@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" - integrity sha512-yTltuKuhtNeFJKa1PiRzfLAU5182q1y4Eb4XCJ3PBqyzEDkAZRzBrKKBct682ls9reBVHf9udYLN5Nd+K1B9BQ== - dependencies: - pinkie-promise "^2.0.0" - -path-exists@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" - integrity sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ== - -path-exists@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" - integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== - -path-is-absolute@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" - integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== - -path-parse@^1.0.6, path-parse@^1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" - integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== - -path-to-regexp@0.1.7: - version "0.1.7" - resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" - integrity sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ== - -path-type@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" - integrity sha512-S4eENJz1pkiQn9Znv33Q+deTOKmbl+jj1Fl+qiP/vYezj+S8x+J3Uo0ISrx/QoEvIlOaDWJhPaRd1flJ9HXZqg== - dependencies: - graceful-fs "^4.1.2" - pify "^2.0.0" - pinkie-promise "^2.0.0" - -path-type@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" - integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== - -pathval@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.1.tgz#8534e77a77ce7ac5a2512ea21e0fdb8fcf6c3d8d" - integrity sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ== - -pbkdf2@^3.0.17: - version "3.1.2" - resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.1.2.tgz#dd822aa0887580e52f1a039dc3eda108efae3075" - integrity sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA== - dependencies: - create-hash "^1.1.2" - create-hmac "^1.1.4" - ripemd160 "^2.0.1" - safe-buffer "^5.0.1" - sha.js "^2.4.8" - -performance-now@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" - integrity sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow== - -picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.3.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" - integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== - -pify@^2.0.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" - integrity sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog== - -pify@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231" - integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g== - -pinkie-promise@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" - integrity sha512-0Gni6D4UcLTbv9c57DfxDGdr41XfgUjqWZu492f0cIGr16zDU06BWP/RAEvOuo7CQ0CNjHaLlM59YJJFm3NWlw== - dependencies: - pinkie "^2.0.0" - -pinkie@^2.0.0: - version "2.0.4" - resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" - integrity sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg== - -prelude-ls@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" - integrity sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w== - -prettier@^2.3.1: - version "2.8.8" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.8.tgz#e8c5d7e98a4305ffe3de2e1fc4aca1a71c28b1da" - integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q== - -process-nextick-args@~2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" - integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== - -process@^0.11.10: - version "0.11.10" - resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" - integrity sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A== - -promise@^8.0.0: - version "8.3.0" - resolved "https://registry.yarnpkg.com/promise/-/promise-8.3.0.tgz#8cb333d1edeb61ef23869fbb8a4ea0279ab60e0a" - integrity sha512-rZPNPKTOYVNEEKFaq1HqTgOwZD+4/YHS5ukLzQCypkj+OkYx7iv0mA91lJlpPPZ8vMau3IIGj5Qlwrx+8iiSmg== - dependencies: - asap "~2.0.6" - -proper-lockfile@^4.1.1: - version "4.1.2" - resolved "https://registry.yarnpkg.com/proper-lockfile/-/proper-lockfile-4.1.2.tgz#c8b9de2af6b2f1601067f98e01ac66baa223141f" - integrity sha512-TjNPblN4BwAWMXU8s9AEz4JmQxnD1NNL7bNOY/AKUzyamc379FWASUhc/K1pL2noVb+XmZKLL68cjzLsiOAMaA== - dependencies: - graceful-fs "^4.2.4" - retry "^0.12.0" - signal-exit "^3.0.2" - -proxy-addr@~2.0.7: - version "2.0.7" - resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.7.tgz#f19fe69ceab311eeb94b42e70e8c2070f9ba1025" - integrity sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg== - dependencies: - forwarded "0.2.0" - ipaddr.js "1.9.1" - -psl@^1.1.28: - version "1.9.0" - resolved "https://registry.yarnpkg.com/psl/-/psl-1.9.0.tgz#d0df2a137f00794565fcaf3b2c00cd09f8d5a5a7" - integrity sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag== - -pump@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" - integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww== - dependencies: - end-of-stream "^1.1.0" - once "^1.3.1" - -punycode@2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.0.tgz#5f863edc89b96db09074bad7947bf09056ca4e7d" - integrity sha512-Yxz2kRwT90aPiWEMHVYnEf4+rhwF1tBmmZ4KepCP+Wkium9JxtWnUm1nqGwpiAHr/tnTSeHqr3wb++jgSkXjhA== - -punycode@^2.1.0, punycode@^2.1.1: - version "2.3.0" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.0.tgz#f67fa67c94da8f4d0cfff981aee4118064199b8f" - integrity sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA== - -pure-rand@^5.0.1: - version "5.0.5" - resolved "https://registry.yarnpkg.com/pure-rand/-/pure-rand-5.0.5.tgz#bda2a7f6a1fc0f284d78d78ca5902f26f2ad35cf" - integrity sha512-BwQpbqxSCBJVpamI6ydzcKqyFmnd5msMWUGvzXLm1aXvusbbgkbOto/EUPM00hjveJEaJtdbhUjKSzWRhQVkaw== - -qs@6.11.0: - version "6.11.0" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.0.tgz#fd0d963446f7a65e1367e01abd85429453f0c37a" - integrity sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q== - dependencies: - side-channel "^1.0.4" - -qs@^6.4.0, qs@^6.7.0: - version "6.11.1" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.1.tgz#6c29dff97f0c0060765911ba65cbc9764186109f" - integrity sha512-0wsrzgTz/kAVIeuxSjnpGC56rzYtr6JT/2BwEvMaPhFIoYa1aGO8LbzuU1R0uUYQkLpWBTOj0l/CLAJB64J6nQ== - dependencies: - side-channel "^1.0.4" - -qs@^6.9.4: - version "6.11.2" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.2.tgz#64bea51f12c1f5da1bc01496f48ffcff7c69d7d9" - integrity sha512-tDNIz22aBzCDxLtVH++VnTfzxlfeK5CbqohpSqpJgj1Wg/cQbStNAz3NuqCs5vV+pjBsK4x4pN9HlVh7rcYRiA== - dependencies: - side-channel "^1.0.4" - -qs@~6.5.2: - version "6.5.3" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.3.tgz#3aeeffc91967ef6e35c0e488ef46fb296ab76aad" - integrity sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA== - -query-string@^5.0.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/query-string/-/query-string-5.1.1.tgz#a78c012b71c17e05f2e3fa2319dd330682efb3cb" - integrity sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw== - dependencies: - decode-uri-component "^0.2.0" - object-assign "^4.1.0" - strict-uri-encode "^1.0.0" - -queue-microtask@^1.2.2, queue-microtask@^1.2.3: - version "1.2.3" - resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" - integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== - -quick-lru@^5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-5.1.1.tgz#366493e6b3e42a3a6885e2e99d18f80fb7a8c932" - integrity sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA== - -randombytes@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" - integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== - dependencies: - safe-buffer "^5.1.0" - -range-parser@~1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" - integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== - -raw-body@2.5.1: - version "2.5.1" - resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.5.1.tgz#fe1b1628b181b700215e5fd42389f98b71392857" - integrity sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig== - dependencies: - bytes "3.1.2" - http-errors "2.0.0" - iconv-lite "0.4.24" - unpipe "1.0.0" - -raw-body@2.5.2, raw-body@^2.4.1: - version "2.5.2" - resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.5.2.tgz#99febd83b90e08975087e8f1f9419a149366b68a" - integrity sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA== - dependencies: - bytes "3.1.2" - http-errors "2.0.0" - iconv-lite "0.4.24" - unpipe "1.0.0" - -read-pkg-up@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" - integrity sha512-WD9MTlNtI55IwYUS27iHh9tK3YoIVhxis8yKhLpTqWtml739uXc9NWTpxoHkfZf3+DkCCsXox94/VWZniuZm6A== - dependencies: - find-up "^1.0.0" - read-pkg "^1.0.0" - -read-pkg@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" - integrity sha512-7BGwRHqt4s/uVbuyoeejRn4YmFnYZiFl4AuaeXHlgZf3sONF0SOGlxs2Pw8g6hCKupo08RafIO5YXFNOKTfwsQ== - dependencies: - load-json-file "^1.0.0" - normalize-package-data "^2.3.2" - path-type "^1.0.0" - -readable-stream@^2.2.2: - version "2.3.8" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.8.tgz#91125e8042bba1b9887f49345f6277027ce8be9b" - integrity sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA== - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.3" - isarray "~1.0.0" - process-nextick-args "~2.0.0" - safe-buffer "~5.1.1" - string_decoder "~1.1.1" - util-deprecate "~1.0.1" - -readable-stream@^3.6.0: - version "3.6.2" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.2.tgz#56a9b36ea965c00c5a93ef31eb111a0f11056967" - integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== - dependencies: - inherits "^2.0.3" - string_decoder "^1.1.1" - util-deprecate "^1.0.1" - -readdirp@~3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.2.0.tgz#c30c33352b12c96dfb4b895421a49fd5a9593839" - integrity sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ== - dependencies: - picomatch "^2.0.4" - -readdirp@~3.6.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" - integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== - dependencies: - picomatch "^2.2.1" - -rechoir@^0.6.2: - version "0.6.2" - resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" - integrity sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw== - dependencies: - resolve "^1.1.6" - -recursive-readdir@^2.2.2: - version "2.2.3" - resolved "https://registry.yarnpkg.com/recursive-readdir/-/recursive-readdir-2.2.3.tgz#e726f328c0d69153bcabd5c322d3195252379372" - integrity sha512-8HrF5ZsXk5FAH9dgsx3BlUer73nIhuj+9OrQwEbLTPOBzGkL1lsFCR01am+v+0m2Cmbs1nP12hLDl5FA7EszKA== - dependencies: - minimatch "^3.0.5" - -reduce-flatten@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/reduce-flatten/-/reduce-flatten-2.0.0.tgz#734fd84e65f375d7ca4465c69798c25c9d10ae27" - integrity sha512-EJ4UNY/U1t2P/2k6oqotuX2Cc3T6nxJwsM0N0asT7dhrtH1ltUxDn4NalSYmPE2rCkVpcf/X6R0wDwcFpzhd4w== - -regenerator-runtime@^0.13.11: - version "0.13.11" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz#f6dca3e7ceec20590d07ada785636a90cdca17f9" - integrity sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg== - -regexp.prototype.flags@^1.4.3: - version "1.5.0" - resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.0.tgz#fe7ce25e7e4cca8db37b6634c8a2c7009199b9cb" - integrity sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA== - dependencies: - call-bind "^1.0.2" - define-properties "^1.2.0" - functions-have-names "^1.2.3" - -req-cwd@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/req-cwd/-/req-cwd-2.0.0.tgz#d4082b4d44598036640fb73ddea01ed53db49ebc" - integrity sha512-ueoIoLo1OfB6b05COxAA9UpeoscNpYyM+BqYlA7H6LVF4hKGPXQQSSaD2YmvDVJMkk4UDpAHIeU1zG53IqjvlQ== - dependencies: - req-from "^2.0.0" - -req-from@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/req-from/-/req-from-2.0.0.tgz#d74188e47f93796f4aa71df6ee35ae689f3e0e70" - integrity sha512-LzTfEVDVQHBRfjOUMgNBA+V6DWsSnoeKzf42J7l0xa/B4jyPOuuF5MlNSmomLNGemWTnV2TIdjSSLnEn95fOQA== - dependencies: - resolve-from "^3.0.0" - -request-promise-core@1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/request-promise-core/-/request-promise-core-1.1.4.tgz#3eedd4223208d419867b78ce815167d10593a22f" - integrity sha512-TTbAfBBRdWD7aNNOoVOBH4pN/KigV6LyapYNNlAPA8JwbovRti1E88m3sYAwsLi5ryhPKsE9APwnjFTgdUjTpw== - dependencies: - lodash "^4.17.19" - -request-promise-native@^1.0.5: - version "1.0.9" - resolved "https://registry.yarnpkg.com/request-promise-native/-/request-promise-native-1.0.9.tgz#e407120526a5efdc9a39b28a5679bf47b9d9dc28" - integrity sha512-wcW+sIUiWnKgNY0dqCpOZkUbF/I+YPi+f09JZIDa39Ec+q82CpSYniDp+ISgTTbKmnpJWASeJBPZmoxH84wt3g== - dependencies: - request-promise-core "1.1.4" - stealthy-require "^1.1.1" - tough-cookie "^2.3.3" - -request@^2.79.0, request@^2.88.0: - version "2.88.2" - resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3" - integrity sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw== - dependencies: - aws-sign2 "~0.7.0" - aws4 "^1.8.0" - caseless "~0.12.0" - combined-stream "~1.0.6" - extend "~3.0.2" - forever-agent "~0.6.1" - form-data "~2.3.2" - har-validator "~5.1.3" - http-signature "~1.2.0" - is-typedarray "~1.0.0" - isstream "~0.1.2" - json-stringify-safe "~5.0.1" - mime-types "~2.1.19" - oauth-sign "~0.9.0" - performance-now "^2.1.0" - qs "~6.5.2" - safe-buffer "^5.1.2" - tough-cookie "~2.5.0" - tunnel-agent "^0.6.0" - uuid "^3.3.2" - -require-directory@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" - integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== - -require-from-string@^1.1.0: - version "1.2.1" - resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-1.2.1.tgz#529c9ccef27380adfec9a2f965b649bbee636418" - integrity sha512-H7AkJWMobeskkttHyhTVtS0fxpFLjxhbfMa6Bk3wimP7sdPRGL3EyCg3sAQenFfAe+xQ+oAc85Nmtvq0ROM83Q== - -require-from-string@^2.0.0, require-from-string@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" - integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== - -require-main-filename@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" - integrity sha512-IqSUtOVP4ksd1C/ej5zeEh/BIP2ajqpn8c5x+q99gvcIG/Qf0cud5raVnE/Dwd0ua9TXYDoDc0RE5hBSdz22Ug== - -require-main-filename@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" - integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== - -resolve-alpn@^1.0.0, resolve-alpn@^1.2.0: - version "1.2.1" - resolved "https://registry.yarnpkg.com/resolve-alpn/-/resolve-alpn-1.2.1.tgz#b7adbdac3546aaaec20b45e7d8265927072726f9" - integrity sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g== - -resolve-from@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" - integrity sha512-GnlH6vxLymXJNMBo7XP1fJIzBFbdYt49CuTwmB/6N53t+kMPRMFKz783LlQ4tv28XoQfMWinAJX6WCGf2IlaIw== - -resolve@1.1.x: - version "1.1.7" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" - integrity sha512-9znBF0vBcaSN3W2j7wKvdERPwqTxSpCq+if5C0WoTCyV9n24rua28jeuQ2pL/HOf+yUe/Mef+H/5p60K0Id3bg== - -resolve@1.17.0: - version "1.17.0" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.17.0.tgz#b25941b54968231cc2d1bb76a79cb7f2c0bf8444" - integrity sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w== - dependencies: - path-parse "^1.0.6" - -resolve@^1.1.6, resolve@^1.10.0: - version "1.22.2" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.2.tgz#0ed0943d4e301867955766c9f3e1ae6d01c6845f" - integrity sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g== - dependencies: - is-core-module "^2.11.0" - path-parse "^1.0.7" - supports-preserve-symlinks-flag "^1.0.0" - -responselike@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/responselike/-/responselike-2.0.1.tgz#9a0bc8fdc252f3fb1cca68b016591059ba1422bc" - integrity sha512-4gl03wn3hj1HP3yzgdI7d3lCkF95F21Pz4BPGvKHinyQzALR5CapwC8yIi0Rh58DEMQ/SguC03wFj2k0M/mHhw== - dependencies: - lowercase-keys "^2.0.0" - -retry@^0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/retry/-/retry-0.12.0.tgz#1b42a6266a21f07421d1b0b54b7dc167b01c013b" - integrity sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow== - -reusify@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" - integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== - -rimraf@^2.2.8: - version "2.7.1" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" - integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== - dependencies: - glob "^7.1.3" - -ripemd160-min@0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/ripemd160-min/-/ripemd160-min-0.0.6.tgz#a904b77658114474d02503e819dcc55853b67e62" - integrity sha512-+GcJgQivhs6S9qvLogusiTcS9kQUfgR75whKuy5jIhuiOfQuJ8fjqxV6EGD5duH1Y/FawFUMtMhyeq3Fbnib8A== - -ripemd160@^2.0.0, ripemd160@^2.0.1, ripemd160@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c" - integrity sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA== - dependencies: - hash-base "^3.0.0" - inherits "^2.0.1" - -rlp@^2.2.3, rlp@^2.2.4: - version "2.2.7" - resolved "https://registry.yarnpkg.com/rlp/-/rlp-2.2.7.tgz#33f31c4afac81124ac4b283e2bd4d9720b30beaf" - integrity sha512-d5gdPmgQ0Z+AklL2NVXr/IoSjNZFfTVvQWzL/AM2AOcSzYP2xjlb0AC8YyCLc41MSNf6P6QVtjgPdmVtzb+4lQ== - dependencies: - bn.js "^5.2.0" - -run-parallel-limit@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/run-parallel-limit/-/run-parallel-limit-1.1.0.tgz#be80e936f5768623a38a963262d6bef8ff11e7ba" - integrity sha512-jJA7irRNM91jaKc3Hcl1npHsFLOXOoTkPCUL1JEa1R82O2miplXXRaGdjW/KM/98YQWDhJLiSs793CnXfblJUw== - dependencies: - queue-microtask "^1.2.2" - -run-parallel@^1.1.9: - version "1.2.0" - resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" - integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== - dependencies: - queue-microtask "^1.2.2" - -rustbn.js@~0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/rustbn.js/-/rustbn.js-0.2.0.tgz#8082cb886e707155fd1cb6f23bd591ab8d55d0ca" - integrity sha512-4VlvkRUuCJvr2J6Y0ImW7NvTCriMi7ErOAqWk1y69vAdoNIzCF3yPmgeNzx+RQTLEDFq5sHfscn1MwHxP9hNfA== - -safe-array-concat@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/safe-array-concat/-/safe-array-concat-1.0.0.tgz#2064223cba3c08d2ee05148eedbc563cd6d84060" - integrity sha512-9dVEFruWIsnie89yym+xWTAYASdpw3CJV7Li/6zBewGf9z2i1j31rP6jnY0pHEO4QZh6N0K11bFjWmdR8UGdPQ== - dependencies: - call-bind "^1.0.2" - get-intrinsic "^1.2.0" - has-symbols "^1.0.3" - isarray "^2.0.5" - -safe-buffer@5.2.1, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@^5.2.1, safe-buffer@~5.2.0: - version "5.2.1" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" - integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== - -safe-buffer@~5.1.0, safe-buffer@~5.1.1: - version "5.1.2" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" - integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== - -safe-regex-test@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/safe-regex-test/-/safe-regex-test-1.0.0.tgz#793b874d524eb3640d1873aad03596db2d4f2295" - integrity sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA== - dependencies: - call-bind "^1.0.2" - get-intrinsic "^1.1.3" - is-regex "^1.1.4" - -"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: - version "2.1.2" - resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" - integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== - -sc-istanbul@^0.4.5: - version "0.4.6" - resolved "https://registry.yarnpkg.com/sc-istanbul/-/sc-istanbul-0.4.6.tgz#cf6784355ff2076f92d70d59047d71c13703e839" - integrity sha512-qJFF/8tW/zJsbyfh/iT/ZM5QNHE3CXxtLJbZsL+CzdJLBsPD7SedJZoUA4d8iAcN2IoMp/Dx80shOOd2x96X/g== - dependencies: - abbrev "1.0.x" - async "1.x" - escodegen "1.8.x" - esprima "2.7.x" - glob "^5.0.15" - handlebars "^4.0.1" - js-yaml "3.x" - mkdirp "0.5.x" - nopt "3.x" - once "1.x" - resolve "1.1.x" - supports-color "^3.1.0" - which "^1.1.1" - wordwrap "^1.0.0" - -scrypt-js@2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/scrypt-js/-/scrypt-js-2.0.4.tgz#32f8c5149f0797672e551c07e230f834b6af5f16" - integrity sha512-4KsaGcPnuhtCZQCxFxN3GVYIhKFPTdLd8PLC552XwbMndtD0cjRFAhDuuydXQ0h08ZfPgzqe6EKHozpuH74iDw== - -scrypt-js@3.0.1, scrypt-js@^3.0.0, scrypt-js@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/scrypt-js/-/scrypt-js-3.0.1.tgz#d314a57c2aef69d1ad98a138a21fe9eafa9ee312" - integrity sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA== - -secp256k1@^4.0.1: - version "4.0.3" - resolved "https://registry.yarnpkg.com/secp256k1/-/secp256k1-4.0.3.tgz#c4559ecd1b8d3c1827ed2d1b94190d69ce267303" - integrity sha512-NLZVf+ROMxwtEj3Xa562qgv2BK5e2WNmXPiOdVIPLgs6lyTzMvBq0aWTYMI5XCP9jZMVKOcqZLw/Wc4vDkuxhA== - dependencies: - elliptic "^6.5.4" - node-addon-api "^2.0.0" - node-gyp-build "^4.2.0" - -"semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.5.0, semver@^5.6.0, semver@^5.7.0: - version "5.7.1" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" - integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== - -semver@7.3.7: - version "7.3.7" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.7.tgz#12c5b649afdbf9049707796e22a4028814ce523f" - integrity sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g== - dependencies: - lru-cache "^6.0.0" - -semver@^6.3.0: - version "6.3.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" - integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== - -semver@^7.3.4: - version "7.5.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.0.tgz#ed8c5dc8efb6c629c88b23d41dc9bf40c1d96cd0" - integrity sha512-+XC0AD/R7Q2mPSRuy2Id0+CGTZ98+8f+KvwirxOKIEyid+XSx6HbC63p+O4IndTHuX5Z+JxQ0TghCkO5Cg/2HA== - dependencies: - lru-cache "^6.0.0" - -send@0.18.0: - version "0.18.0" - resolved "https://registry.yarnpkg.com/send/-/send-0.18.0.tgz#670167cc654b05f5aa4a767f9113bb371bc706be" - integrity sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg== - dependencies: - debug "2.6.9" - depd "2.0.0" - destroy "1.2.0" - encodeurl "~1.0.2" - escape-html "~1.0.3" - etag "~1.8.1" - fresh "0.5.2" - http-errors "2.0.0" - mime "1.6.0" - ms "2.1.3" - on-finished "2.4.1" - range-parser "~1.2.1" - statuses "2.0.1" - -sentence-case@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/sentence-case/-/sentence-case-2.1.1.tgz#1f6e2dda39c168bf92d13f86d4a918933f667ed4" - integrity sha512-ENl7cYHaK/Ktwk5OTD+aDbQ3uC8IByu/6Bkg+HDv8Mm+XnBnppVNalcfJTNsp1ibstKh030/JKQQWglDvtKwEQ== - dependencies: - no-case "^2.2.0" - upper-case-first "^1.1.2" - -serialize-javascript@6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.0.tgz#efae5d88f45d7924141da8b5c3a7a7e663fefeb8" - integrity sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag== - dependencies: - randombytes "^2.1.0" - -serve-static@1.15.0: - version "1.15.0" - resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.15.0.tgz#faaef08cffe0a1a62f60cad0c4e513cff0ac9540" - integrity sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g== - dependencies: - encodeurl "~1.0.2" - escape-html "~1.0.3" - parseurl "~1.3.3" - send "0.18.0" - -servify@^0.1.12: - version "0.1.12" - resolved "https://registry.yarnpkg.com/servify/-/servify-0.1.12.tgz#142ab7bee1f1d033b66d0707086085b17c06db95" - integrity sha512-/xE6GvsKKqyo1BAY+KxOWXcLpPsUUyji7Qg3bVD7hh1eRze5bR1uYiuDA/k3Gof1s9BTzQZEJK8sNcNGFIzeWw== - dependencies: - body-parser "^1.16.0" - cors "^2.8.1" - express "^4.14.0" - request "^2.79.0" - xhr "^2.3.3" - -set-blocking@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" - integrity sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw== - -setimmediate@1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.4.tgz#20e81de622d4a02588ce0c8da8973cbcf1d3138f" - integrity sha512-/TjEmXQVEzdod/FFskf3o7oOAsGhHf2j1dZqRFbDzq4F3mvvxflIIi4Hd3bLQE9y/CpwqfSQam5JakI/mi3Pog== - -setimmediate@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" - integrity sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA== - -setprototypeof@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424" - integrity sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw== - -sha.js@^2.4.0, sha.js@^2.4.8: - version "2.4.11" - resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7" - integrity sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ== - dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" - -sha1@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/sha1/-/sha1-1.1.1.tgz#addaa7a93168f393f19eb2b15091618e2700f848" - integrity sha512-dZBS6OrMjtgVkopB1Gmo4RQCDKiZsqcpAQpkV/aaj+FCrCg8r4I4qMkDPQjBgLIxlmu9k4nUbWq6ohXahOneYA== - dependencies: - charenc ">= 0.0.1" - crypt ">= 0.0.1" - -sha3@^2.1.1: - version "2.1.4" - resolved "https://registry.yarnpkg.com/sha3/-/sha3-2.1.4.tgz#000fac0fe7c2feac1f48a25e7a31b52a6492cc8f" - integrity sha512-S8cNxbyb0UGUM2VhRD4Poe5N58gJnJsLJ5vC7FYWGUmGhcsj4++WaIOBFVDxlG0W3To6xBuiRh+i0Qp2oNCOtg== - dependencies: - buffer "6.0.3" - -shelljs@^0.8.3: - version "0.8.5" - resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.5.tgz#de055408d8361bed66c669d2f000538ced8ee20c" - integrity sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow== - dependencies: - glob "^7.0.0" - interpret "^1.0.0" - rechoir "^0.6.2" - -side-channel@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" - integrity sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw== - dependencies: - call-bind "^1.0.0" - get-intrinsic "^1.0.2" - object-inspect "^1.9.0" - -signal-exit@^3.0.2: - version "3.0.7" - resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" - integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== - -simple-concat@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/simple-concat/-/simple-concat-1.0.1.tgz#f46976082ba35c2263f1c8ab5edfe26c41c9552f" - integrity sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q== - -simple-get@^2.7.0: - version "2.8.2" - resolved "https://registry.yarnpkg.com/simple-get/-/simple-get-2.8.2.tgz#5708fb0919d440657326cd5fe7d2599d07705019" - integrity sha512-Ijd/rV5o+mSBBs4F/x9oDPtTx9Zb6X9brmnXvMW4J7IR15ngi9q5xxqWBKU744jTZiaXtxaPL7uHG6vtN8kUkw== - dependencies: - decompress-response "^3.3.0" - once "^1.3.1" - simple-concat "^1.0.0" - -slash@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" - integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== - -slice-ansi@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-4.0.0.tgz#500e8dd0fd55b05815086255b3195adf2a45fe6b" - integrity sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ== - dependencies: - ansi-styles "^4.0.0" - astral-regex "^2.0.0" - is-fullwidth-code-point "^3.0.0" - -snake-case@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/snake-case/-/snake-case-2.1.0.tgz#41bdb1b73f30ec66a04d4e2cad1b76387d4d6d9f" - integrity sha512-FMR5YoPFwOLuh4rRz92dywJjyKYZNLpMn1R5ujVpIYkbA9p01fq8RMg0FkO4M+Yobt4MjHeLTJVm5xFFBHSV2Q== - dependencies: - no-case "^2.2.0" - -solc@0.7.3: - version "0.7.3" - resolved "https://registry.yarnpkg.com/solc/-/solc-0.7.3.tgz#04646961bd867a744f63d2b4e3c0701ffdc7d78a" - integrity sha512-GAsWNAjGzIDg7VxzP6mPjdurby3IkGCjQcM8GFYZT6RyaoUZKmMU6Y7YwG+tFGhv7dwZ8rmR4iwFDrrD99JwqA== - dependencies: - command-exists "^1.2.8" - commander "3.0.2" - follow-redirects "^1.12.1" - fs-extra "^0.30.0" - js-sha3 "0.8.0" - memorystream "^0.3.1" - require-from-string "^2.0.0" - semver "^5.5.0" - tmp "0.0.33" - -solc@^0.4.20: - version "0.4.26" - resolved "https://registry.yarnpkg.com/solc/-/solc-0.4.26.tgz#5390a62a99f40806b86258c737c1cf653cc35cb5" - integrity sha512-o+c6FpkiHd+HPjmjEVpQgH7fqZ14tJpXhho+/bQXlXbliLIS/xjXb42Vxh+qQY1WCSTMQ0+a5vR9vi0MfhU6mA== - dependencies: - fs-extra "^0.30.0" - memorystream "^0.3.1" - require-from-string "^1.1.0" - semver "^5.3.0" - yargs "^4.7.1" - -solidity-ast@^0.4.15: - version "0.4.49" - resolved "https://registry.yarnpkg.com/solidity-ast/-/solidity-ast-0.4.49.tgz#ecba89d10c0067845b7848c3a3e8cc61a4fc5b82" - integrity sha512-Pr5sCAj1SFqzwFZw1HPKSq0PehlQNdM8GwKyAVYh2DOn7/cCK8LUKD1HeHnKtTgBW7hi9h4nnnan7hpAg5RhWQ== - -solidity-coverage@^0.8.0: - version "0.8.2" - resolved "https://registry.yarnpkg.com/solidity-coverage/-/solidity-coverage-0.8.2.tgz#bc39604ab7ce0a3fa7767b126b44191830c07813" - integrity sha512-cv2bWb7lOXPE9/SSleDO6czkFiMHgP4NXPj+iW9W7iEKLBk7Cj0AGBiNmGX3V1totl9wjPrT0gHmABZKZt65rQ== - dependencies: - "@ethersproject/abi" "^5.0.9" - "@solidity-parser/parser" "^0.14.1" - chalk "^2.4.2" - death "^1.1.0" - detect-port "^1.3.0" - difflib "^0.2.4" - fs-extra "^8.1.0" - ghost-testrpc "^0.0.2" - global-modules "^2.0.0" - globby "^10.0.1" - jsonschema "^1.2.4" - lodash "^4.17.15" - mocha "7.1.2" - node-emoji "^1.10.0" - pify "^4.0.1" - recursive-readdir "^2.2.2" - sc-istanbul "^0.4.5" - semver "^7.3.4" - shelljs "^0.8.3" - web3-utils "^1.3.6" - -source-map-support@^0.5.13: - version "0.5.21" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" - integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== - dependencies: - buffer-from "^1.0.0" - source-map "^0.6.0" - -source-map@^0.6.0, source-map@^0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" - integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== - -source-map@~0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.2.0.tgz#dab73fbcfc2ba819b4de03bd6f6eaa48164b3f9d" - integrity sha512-CBdZ2oa/BHhS4xj5DlhjWNHcan57/5YuvfdLf17iVmIpd9KRm+DFLmC6nBNj+6Ua7Kt3TmOjDpQT1aTYOQtoUA== - dependencies: - amdefine ">=0.0.4" - -spdx-correct@^3.0.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.2.0.tgz#4f5ab0668f0059e34f9c00dce331784a12de4e9c" - integrity sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA== - dependencies: - spdx-expression-parse "^3.0.0" - spdx-license-ids "^3.0.0" - -spdx-exceptions@^2.1.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz#3f28ce1a77a00372683eade4a433183527a2163d" - integrity sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A== - -spdx-expression-parse@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz#cf70f50482eefdc98e3ce0a6833e4a53ceeba679" - integrity sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q== - dependencies: - spdx-exceptions "^2.1.0" - spdx-license-ids "^3.0.0" - -spdx-license-ids@^3.0.0: - version "3.0.13" - resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.13.tgz#7189a474c46f8d47c7b0da4b987bb45e908bd2d5" - integrity sha512-XkD+zwiqXHikFZm4AX/7JSCXA98U5Db4AFd5XUg/+9UNtnH75+Z9KxtpYiJZx36mUDVOwH83pl7yvCer6ewM3w== - -sprintf-js@~1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" - integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g== - -sshpk@^1.7.0: - version "1.17.0" - resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.17.0.tgz#578082d92d4fe612b13007496e543fa0fbcbe4c5" - integrity sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ== - dependencies: - asn1 "~0.2.3" - assert-plus "^1.0.0" - bcrypt-pbkdf "^1.0.0" - dashdash "^1.12.0" - ecc-jsbn "~0.1.1" - getpass "^0.1.1" - jsbn "~0.1.0" - safer-buffer "^2.0.2" - tweetnacl "~0.14.0" - -stacktrace-parser@^0.1.10: - version "0.1.10" - resolved "https://registry.yarnpkg.com/stacktrace-parser/-/stacktrace-parser-0.1.10.tgz#29fb0cae4e0d0b85155879402857a1639eb6051a" - integrity sha512-KJP1OCML99+8fhOHxwwzyWrlUuVX5GQ0ZpJTd1DFXhdkrvg1szxfHhawXUZ3g9TkXORQd4/WG68jMlQZ2p8wlg== - dependencies: - type-fest "^0.7.1" - -statuses@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/statuses/-/statuses-2.0.1.tgz#55cb000ccf1d48728bd23c685a063998cf1a1b63" - integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ== - -stealthy-require@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/stealthy-require/-/stealthy-require-1.1.1.tgz#35b09875b4ff49f26a777e509b3090a3226bf24b" - integrity sha512-ZnWpYnYugiOVEY5GkcuJK1io5V8QmNYChG62gSit9pQVGErXtrKuPC55ITaVSukmMta5qpMU7vqLt2Lnni4f/g== - -streamsearch@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/streamsearch/-/streamsearch-1.1.0.tgz#404dd1e2247ca94af554e841a8ef0eaa238da764" - integrity sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg== - -strict-uri-encode@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713" - integrity sha512-R3f198pcvnB+5IpnBlRkphuE9n46WyVl8I39W/ZUTZLz4nqSP/oLYUrcnJrw462Ds8he4YKMov2efsTIw1BDGQ== - -string-format@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/string-format/-/string-format-2.0.0.tgz#f2df2e7097440d3b65de31b6d40d54c96eaffb9b" - integrity sha512-bbEs3scLeYNXLecRRuk6uJxdXUSj6le/8rNPHChIJTn2V79aXVTR1EH2OH5zLKKoz0V02fOUKZZcw01pLUShZA== - -string-width@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" - integrity sha512-0XsVpQLnVCXHJfyEs8tC0zpTVIr5PKKsQtkT29IwupnPTjtPmQ3xT/4yCREF9hYkV/3M3kzcUTSAZT6a6h81tw== - dependencies: - code-point-at "^1.0.0" - is-fullwidth-code-point "^1.0.0" - strip-ansi "^3.0.0" - -"string-width@^1.0.2 || 2", string-width@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" - integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== - dependencies: - is-fullwidth-code-point "^2.0.0" - strip-ansi "^4.0.0" - -string-width@^3.0.0, string-width@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961" - integrity sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w== - dependencies: - emoji-regex "^7.0.1" - is-fullwidth-code-point "^2.0.0" - strip-ansi "^5.1.0" - -string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: - version "4.2.3" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" - integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== - dependencies: - emoji-regex "^8.0.0" - is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.1" - -string.prototype.trim@^1.2.7: - version "1.2.7" - resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.7.tgz#a68352740859f6893f14ce3ef1bb3037f7a90533" - integrity sha512-p6TmeT1T3411M8Cgg9wBTMRtY2q9+PNy9EV1i2lIXUN/btt763oIfxwN3RR8VU6wHX8j/1CFy0L+YuThm6bgOg== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - -string.prototype.trimend@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz#c4a27fa026d979d79c04f17397f250a462944533" - integrity sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - -string.prototype.trimstart@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz#e90ab66aa8e4007d92ef591bbf3cd422c56bdcf4" - integrity sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - -string_decoder@^1.1.1: - version "1.3.0" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" - integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== - dependencies: - safe-buffer "~5.2.0" - -string_decoder@~1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" - integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== - dependencies: - safe-buffer "~5.1.0" - -strip-ansi@^3.0.0, strip-ansi@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" - integrity sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg== - dependencies: - ansi-regex "^2.0.0" - -strip-ansi@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" - integrity sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow== - dependencies: - ansi-regex "^3.0.0" - -strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" - integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA== - dependencies: - ansi-regex "^4.1.0" - -strip-ansi@^6.0.0, strip-ansi@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" - integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== - dependencies: - ansi-regex "^5.0.1" - -strip-bom@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" - integrity sha512-kwrX1y7czp1E69n2ajbG65mIo9dqvJ+8aBQXOGVxqwvNbsXdFM6Lq37dLAY3mknUwru8CfcCbfOLL/gMo+fi3g== - dependencies: - is-utf8 "^0.2.0" - -strip-hex-prefix@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz#0c5f155fef1151373377de9dbb588da05500e36f" - integrity sha512-q8d4ue7JGEiVcypji1bALTos+0pWtyGlivAWyPuTkHzuTCJqrK9sWxYQZUq6Nq3cuyv3bm734IhHvHtGGURU6A== - dependencies: - is-hex-prefixed "1.0.0" - -strip-indent@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-2.0.0.tgz#5ef8db295d01e6ed6cbf7aab96998d7822527b68" - integrity sha512-RsSNPLpq6YUL7QYy44RnPVTn/lcVZtb48Uof3X5JLbF4zD/Gs7ZFDv2HWol+leoQN2mT86LAzSshGfkTlSOpsA== - -strip-json-comments@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" - integrity sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ== - -strip-json-comments@3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" - integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== - -supports-color@6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-6.0.0.tgz#76cfe742cf1f41bb9b1c29ad03068c05b4c0e40a" - integrity sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg== - dependencies: - has-flag "^3.0.0" - -supports-color@8.1.1: - version "8.1.1" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" - integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== - dependencies: - has-flag "^4.0.0" - -supports-color@^3.1.0: - version "3.2.3" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6" - integrity sha512-Jds2VIYDrlp5ui7t8abHN2bjAu4LV/q4N2KivFPpGH0lrka0BMq/33AmECUXlKPcHigkNaqfXRENFju+rlcy+A== - dependencies: - has-flag "^1.0.0" - -supports-color@^5.3.0: - version "5.5.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" - integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== - dependencies: - has-flag "^3.0.0" - -supports-color@^7.1.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" - integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== - dependencies: - has-flag "^4.0.0" - -supports-preserve-symlinks-flag@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" - integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== - -swap-case@^1.1.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/swap-case/-/swap-case-1.1.2.tgz#c39203a4587385fad3c850a0bd1bcafa081974e3" - integrity sha512-BAmWG6/bx8syfc6qXPprof3Mn5vQgf5dwdUNJhsNqU9WdPt5P+ES/wQ5bxfijy8zwZgZZHslC3iAsxsuQMCzJQ== - dependencies: - lower-case "^1.1.1" - upper-case "^1.1.1" - -swarm-js@^0.1.40: - version "0.1.42" - resolved "https://registry.yarnpkg.com/swarm-js/-/swarm-js-0.1.42.tgz#497995c62df6696f6e22372f457120e43e727979" - integrity sha512-BV7c/dVlA3R6ya1lMlSSNPLYrntt0LUq4YMgy3iwpCIc6rZnS5W2wUoctarZ5pXlpKtxDDf9hNziEkcfrxdhqQ== - dependencies: - bluebird "^3.5.0" - buffer "^5.0.5" - eth-lib "^0.1.26" - fs-extra "^4.0.2" - got "^11.8.5" - mime-types "^2.1.16" - mkdirp-promise "^5.0.1" - mock-fs "^4.1.0" - setimmediate "^1.0.5" - tar "^4.0.2" - xhr-request "^1.0.1" - -sync-request@^6.0.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/sync-request/-/sync-request-6.1.0.tgz#e96217565b5e50bbffe179868ba75532fb597e68" - integrity sha512-8fjNkrNlNCrVc/av+Jn+xxqfCjYaBoHqCsDz6mt030UMxJGr+GSfCV1dQt2gRtlL63+VPidwDVLr7V2OcTSdRw== - dependencies: - http-response-object "^3.0.1" - sync-rpc "^1.2.1" - then-request "^6.0.0" - -sync-rpc@^1.2.1: - version "1.3.6" - resolved "https://registry.yarnpkg.com/sync-rpc/-/sync-rpc-1.3.6.tgz#b2e8b2550a12ccbc71df8644810529deb68665a7" - integrity sha512-J8jTXuZzRlvU7HemDgHi3pGnh/rkoqR/OZSjhTyyZrEkkYQbk7Z33AXp37mkPfPpfdOuj7Ex3H/TJM1z48uPQw== - dependencies: - get-port "^3.1.0" - -table-layout@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/table-layout/-/table-layout-1.0.2.tgz#c4038a1853b0136d63365a734b6931cf4fad4a04" - integrity sha512-qd/R7n5rQTRFi+Zf2sk5XVVd9UQl6ZkduPFC3S7WEGJAmetDTjY3qPN50eSKzwuzEyQKy5TN2TiZdkIjos2L6A== - dependencies: - array-back "^4.0.1" - deep-extend "~0.6.0" - typical "^5.2.0" - wordwrapjs "^4.0.0" - -table@^6.8.0: - version "6.8.1" - resolved "https://registry.yarnpkg.com/table/-/table-6.8.1.tgz#ea2b71359fe03b017a5fbc296204471158080bdf" - integrity sha512-Y4X9zqrCftUhMeH2EptSSERdVKt/nEdijTOacGD/97EKjhQ/Qs8RTlEGABSJNNN8lac9kheH+af7yAkEWlgneA== - dependencies: - ajv "^8.0.1" - lodash.truncate "^4.4.2" - slice-ansi "^4.0.0" - string-width "^4.2.3" - strip-ansi "^6.0.1" - -tar@^4.0.2: - version "4.4.19" - resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.19.tgz#2e4d7263df26f2b914dee10c825ab132123742f3" - integrity sha512-a20gEsvHnWe0ygBY8JbxoM4w3SJdhc7ZAuxkLqh+nvNQN2IOt0B5lLgM490X5Hl8FF0dl0tOf2ewFYAlIFgzVA== - dependencies: - chownr "^1.1.4" - fs-minipass "^1.2.7" - minipass "^2.9.0" - minizlib "^1.3.3" - mkdirp "^0.5.5" - safe-buffer "^5.2.1" - yallist "^3.1.1" - -testrpc@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/testrpc/-/testrpc-0.0.1.tgz#83e2195b1f5873aec7be1af8cbe6dcf39edb7aed" - integrity sha512-afH1hO+SQ/VPlmaLUFj2636QMeDvPCeQMc/9RBMW0IfjNe9gFD9Ra3ShqYkB7py0do1ZcCna/9acHyzTJ+GcNA== - -then-request@^6.0.0: - version "6.0.2" - resolved "https://registry.yarnpkg.com/then-request/-/then-request-6.0.2.tgz#ec18dd8b5ca43aaee5cb92f7e4c1630e950d4f0c" - integrity sha512-3ZBiG7JvP3wbDzA9iNY5zJQcHL4jn/0BWtXIkagfz7QgOL/LqjCEOBQuJNZfu0XYnv5JhKh+cDxCPM4ILrqruA== - dependencies: - "@types/concat-stream" "^1.6.0" - "@types/form-data" "0.0.33" - "@types/node" "^8.0.0" - "@types/qs" "^6.2.31" - caseless "~0.12.0" - concat-stream "^1.6.0" - form-data "^2.2.0" - http-basic "^8.1.1" - http-response-object "^3.0.1" - promise "^8.0.0" - qs "^6.4.0" - -timed-out@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-4.0.1.tgz#f32eacac5a175bea25d7fab565ab3ed8741ef56f" - integrity sha512-G7r3AhovYtr5YKOWQkta8RKAPb+J9IsO4uVmzjl8AZwfhs8UcUwTiD6gcJYSgOtzyjvQKrKYn41syHbUWMkafA== - -title-case@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/title-case/-/title-case-2.1.1.tgz#3e127216da58d2bc5becf137ab91dae3a7cd8faa" - integrity sha512-EkJoZ2O3zdCz3zJsYCsxyq2OC5hrxR9mfdd5I+w8h/tmFfeOxJ+vvkxsKxdmN0WtS9zLdHEgfgVOiMVgv+Po4Q== - dependencies: - no-case "^2.2.0" - upper-case "^1.0.3" - -tmp@0.0.33: - version "0.0.33" - resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" - integrity sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw== - dependencies: - os-tmpdir "~1.0.2" - -to-regex-range@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" - integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== - dependencies: - is-number "^7.0.0" - -toidentifier@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35" - integrity sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA== - -tough-cookie@^2.3.3, tough-cookie@~2.5.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" - integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g== - dependencies: - psl "^1.1.28" - punycode "^2.1.1" - -tr46@~0.0.3: - version "0.0.3" - resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" - integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== - -ts-command-line-args@^2.2.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/ts-command-line-args/-/ts-command-line-args-2.5.0.tgz#7eeed3a6937b2612ea08a0794cf9d43fbbea89c4" - integrity sha512-Ff7Xt04WWCjj/cmPO9eWTJX3qpBZWuPWyQYG1vnxJao+alWWYjwJBc5aYz3h5p5dE08A6AnpkgiCtP/0KXXBYw== - dependencies: - "@morgan-stanley/ts-mocking-bird" "^0.6.2" - chalk "^4.1.0" - command-line-args "^5.1.1" - command-line-usage "^6.1.0" - string-format "^2.0.0" - -ts-essentials@^7.0.1: - version "7.0.3" - resolved "https://registry.yarnpkg.com/ts-essentials/-/ts-essentials-7.0.3.tgz#686fd155a02133eedcc5362dc8b5056cde3e5a38" - integrity sha512-8+gr5+lqO3G84KdiTSMRLtuyJ+nTBVRKuCrK4lidMPdVeEp0uqC875uE5NMcaA7YYMN7XsNiFQuMvasF8HT/xQ== - -ts-node@>=8.0.0: - version "10.9.1" - resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.1.tgz#e73de9102958af9e1f0b168a6ff320e25adcff4b" - integrity sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw== - dependencies: - "@cspotcode/source-map-support" "^0.8.0" - "@tsconfig/node10" "^1.0.7" - "@tsconfig/node12" "^1.0.7" - "@tsconfig/node14" "^1.0.0" - "@tsconfig/node16" "^1.0.2" - acorn "^8.4.1" - acorn-walk "^8.1.1" - arg "^4.1.0" - create-require "^1.1.0" - diff "^4.0.1" - make-error "^1.1.1" - v8-compile-cache-lib "^3.0.1" - yn "3.1.1" - -tslib@^1.9.3: - version "1.14.1" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" - integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== - -tsort@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/tsort/-/tsort-0.0.1.tgz#e2280f5e817f8bf4275657fd0f9aebd44f5a2786" - integrity sha512-Tyrf5mxF8Ofs1tNoxA13lFeZ2Zrbd6cKbuH3V+MQ5sb6DtBj5FjrXVsRWT8YvNAQTqNoz66dz1WsbigI22aEnw== - -tunnel-agent@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" - integrity sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w== - dependencies: - safe-buffer "^5.0.1" - -tweetnacl-util@^0.15.1: - version "0.15.1" - resolved "https://registry.yarnpkg.com/tweetnacl-util/-/tweetnacl-util-0.15.1.tgz#b80fcdb5c97bcc508be18c44a4be50f022eea00b" - integrity sha512-RKJBIj8lySrShN4w6i/BonWp2Z/uxwC3h4y7xsRrpP59ZboCd0GpEVsOnMDYLMmKBpYhb5TgHzZXy7wTfYFBRw== - -tweetnacl@^0.14.3, tweetnacl@~0.14.0: - version "0.14.5" - resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" - integrity sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA== - -tweetnacl@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-1.0.3.tgz#ac0af71680458d8a6378d0d0d050ab1407d35596" - integrity sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw== - -type-check@~0.3.2: - version "0.3.2" - resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" - integrity sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg== - dependencies: - prelude-ls "~1.1.2" - -type-detect@^4.0.0, type-detect@^4.0.5: - version "4.0.8" - resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" - integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== - -type-fest@^0.21.3: - version "0.21.3" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" - integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== - -type-fest@^0.7.1: - version "0.7.1" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.7.1.tgz#8dda65feaf03ed78f0a3f9678f1869147f7c5c48" - integrity sha512-Ne2YiiGN8bmrmJJEuTWTLJR32nh/JdL1+PSicowtNb0WFpn59GK8/lfD61bVtzguz7b3PBt74nxpv/Pw5po5Rg== - -type-is@~1.6.18: - version "1.6.18" - resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" - integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g== - dependencies: - media-typer "0.3.0" - mime-types "~2.1.24" - -type@^1.0.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/type/-/type-1.2.0.tgz#848dd7698dafa3e54a6c479e759c4bc3f18847a0" - integrity sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg== - -type@^2.7.2: - version "2.7.2" - resolved "https://registry.yarnpkg.com/type/-/type-2.7.2.tgz#2376a15a3a28b1efa0f5350dcf72d24df6ef98d0" - integrity sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw== - -typechain@^8.1.0: - version "8.1.1" - resolved "https://registry.yarnpkg.com/typechain/-/typechain-8.1.1.tgz#9c2e8012c2c4c586536fc18402dcd7034c4ff0bd" - integrity sha512-uF/sUvnXTOVF2FHKhQYnxHk4su4JjZR8vr4mA2mBaRwHTbwh0jIlqARz9XJr1tA0l7afJGvEa1dTSi4zt039LQ== - dependencies: - "@types/prettier" "^2.1.1" - debug "^4.3.1" - fs-extra "^7.0.0" - glob "7.1.7" - js-sha3 "^0.8.0" - lodash "^4.17.15" - mkdirp "^1.0.4" - prettier "^2.3.1" - ts-command-line-args "^2.2.0" - ts-essentials "^7.0.1" - -typed-array-length@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/typed-array-length/-/typed-array-length-1.0.4.tgz#89d83785e5c4098bec72e08b319651f0eac9c1bb" - integrity sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng== - dependencies: - call-bind "^1.0.2" - for-each "^0.3.3" - is-typed-array "^1.1.9" - -typedarray-to-buffer@^3.1.5: - version "3.1.5" - resolved "https://registry.yarnpkg.com/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz#a97ee7a9ff42691b9f783ff1bc5112fe3fca9080" - integrity sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q== - dependencies: - is-typedarray "^1.0.0" - -typedarray@^0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" - integrity sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA== - -typescript@>=4.5.0: - version "5.0.4" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.0.4.tgz#b217fd20119bd61a94d4011274e0ab369058da3b" - integrity sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw== - -typical@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/typical/-/typical-4.0.0.tgz#cbeaff3b9d7ae1e2bbfaf5a4e6f11eccfde94fc4" - integrity sha512-VAH4IvQ7BDFYglMd7BPRDfLgxZZX4O4TFcRDA6EN5X7erNJJq+McIEp8np9aVtxrCJ6qx4GTYVfOWNjcqwZgRw== - -typical@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/typical/-/typical-5.2.0.tgz#4daaac4f2b5315460804f0acf6cb69c52bb93066" - integrity sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg== - -uglify-js@^3.1.4: - version "3.17.4" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.17.4.tgz#61678cf5fa3f5b7eb789bb345df29afb8257c22c" - integrity sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g== - -ultron@~1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.1.1.tgz#9fe1536a10a664a65266a1e3ccf85fd36302bc9c" - integrity sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og== - -unbox-primitive@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.2.tgz#29032021057d5e6cdbd08c5129c226dff8ed6f9e" - integrity sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw== - dependencies: - call-bind "^1.0.2" - has-bigints "^1.0.2" - has-symbols "^1.0.3" - which-boxed-primitive "^1.0.2" - -undici@^5.14.0: - version "5.22.0" - resolved "https://registry.yarnpkg.com/undici/-/undici-5.22.0.tgz#5e205d82a5aecc003fc4388ccd3d2c6e8674a0ad" - integrity sha512-fR9RXCc+6Dxav4P9VV/sp5w3eFiSdOjJYsbtWfd4s5L5C4ogyuVpdKIVHeW0vV1MloM65/f7W45nR9ZxwVdyiA== - dependencies: - busboy "^1.6.0" - -universalify@^0.1.0: - version "0.1.2" - resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" - integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== - -universalify@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717" - integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ== - -unpipe@1.0.0, unpipe@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" - integrity sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ== - -untildify@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/untildify/-/untildify-4.0.0.tgz#2bc947b953652487e4600949fb091e3ae8cd919b" - integrity sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw== - -upper-case-first@^1.1.0, upper-case-first@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/upper-case-first/-/upper-case-first-1.1.2.tgz#5d79bedcff14419518fd2edb0a0507c9b6859115" - integrity sha512-wINKYvI3Db8dtjikdAqoBbZoP6Q+PZUyfMR7pmwHzjC2quzSkUq5DmPrTtPEqHaz8AGtmsB4TqwapMTM1QAQOQ== - dependencies: - upper-case "^1.1.1" - -upper-case@^1.0.3, upper-case@^1.1.0, upper-case@^1.1.1, upper-case@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/upper-case/-/upper-case-1.1.3.tgz#f6b4501c2ec4cdd26ba78be7222961de77621598" - integrity sha512-WRbjgmYzgXkCV7zNVpy5YgrHgbBv126rMALQQMrmzOVC4GM2waQ9x7xtm8VU+1yF2kWyPzI9zbZ48n4vSxwfSA== - -uri-js@^4.2.2: - version "4.4.1" - resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" - integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== - dependencies: - punycode "^2.1.0" - -url-set-query@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/url-set-query/-/url-set-query-1.0.0.tgz#016e8cfd7c20ee05cafe7795e892bd0702faa339" - integrity sha512-3AChu4NiXquPfeckE5R5cGdiHCMWJx1dwCWOmWIL4KHAziJNOFIYJlpGFeKDvwLPHovZRCxK3cYlwzqI9Vp+Gg== - -utf-8-validate@^5.0.2: - version "5.0.10" - resolved "https://registry.yarnpkg.com/utf-8-validate/-/utf-8-validate-5.0.10.tgz#d7d10ea39318171ca982718b6b96a8d2442571a2" - integrity sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ== - dependencies: - node-gyp-build "^4.3.0" - -utf8@3.0.0, utf8@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/utf8/-/utf8-3.0.0.tgz#f052eed1364d696e769ef058b183df88c87f69d1" - integrity sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ== - -util-deprecate@^1.0.1, util-deprecate@~1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" - integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== - -util@^0.12.5: - version "0.12.5" - resolved "https://registry.yarnpkg.com/util/-/util-0.12.5.tgz#5f17a6059b73db61a875668781a1c2b136bd6fbc" - integrity sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA== - dependencies: - inherits "^2.0.3" - is-arguments "^1.0.4" - is-generator-function "^1.0.7" - is-typed-array "^1.1.3" - which-typed-array "^1.1.2" - -utils-merge@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" - integrity sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA== - -uuid@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-2.0.1.tgz#c2a30dedb3e535d72ccf82e343941a50ba8533ac" - integrity sha512-nWg9+Oa3qD2CQzHIP4qKUqwNfzKn8P0LtFhotaCTFchsV7ZfDhAybeip/HZVeMIpZi9JgY1E3nUlwaCmZT1sEg== - -uuid@^3.3.2: - version "3.4.0" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" - integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== - -uuid@^7.0.3: - version "7.0.3" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-7.0.3.tgz#c5c9f2c8cf25dc0a372c4df1441c41f5bd0c680b" - integrity sha512-DPSke0pXhTZgoF/d+WSt2QaKMCFSfx7QegxEWT+JOuHF5aWrKEn0G+ztjuJg/gG8/ItK+rbPCD/yNv8yyih6Cg== - -uuid@^8.3.2: - version "8.3.2" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" - integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== - -uuid@^9.0.0: - version "9.0.0" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-9.0.0.tgz#592f550650024a38ceb0c562f2f6aa435761efb5" - integrity sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg== - -v8-compile-cache-lib@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf" - integrity sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg== - -validate-npm-package-license@^3.0.1: - version "3.0.4" - resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" - integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew== - dependencies: - spdx-correct "^3.0.0" - spdx-expression-parse "^3.0.0" - -varint@^5.0.0: - version "5.0.2" - resolved "https://registry.yarnpkg.com/varint/-/varint-5.0.2.tgz#5b47f8a947eb668b848e034dcfa87d0ff8a7f7a4" - integrity sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow== - -vary@^1, vary@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" - integrity sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg== - -verror@1.10.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" - integrity sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw== - dependencies: - assert-plus "^1.0.0" - core-util-is "1.0.2" - extsprintf "^1.2.0" - -web3-bzz@1.8.2: - version "1.8.2" - resolved "https://registry.yarnpkg.com/web3-bzz/-/web3-bzz-1.8.2.tgz#67ea1c775874056250eece551ded22905ed08784" - integrity sha512-1EEnxjPnFnvNWw3XeeKuTR8PBxYd0+XWzvaLK7OJC/Go9O8llLGxrxICbKV+8cgIE0sDRBxiYx02X+6OhoAQ9w== - dependencies: - "@types/node" "^12.12.6" - got "12.1.0" - swarm-js "^0.1.40" - -web3-bzz@1.9.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/web3-bzz/-/web3-bzz-1.9.0.tgz#3334049f386e73e2b3dcfa96432e65391538d8ac" - integrity sha512-9Zli9dikX8GdHwBb5/WPzpSVuy3EWMKY3P4EokCQra31fD7DLizqAAaTUsFwnK7xYkw5ogpHgelw9uKHHzNajg== - dependencies: - "@types/node" "^12.12.6" - got "12.1.0" - swarm-js "^0.1.40" - -web3-core-helpers@1.8.2: - version "1.8.2" - resolved "https://registry.yarnpkg.com/web3-core-helpers/-/web3-core-helpers-1.8.2.tgz#82066560f8085e6c7b93bcc8e88b441289ea9f9f" - integrity sha512-6B1eLlq9JFrfealZBomd1fmlq1o4A09vrCVQSa51ANoib/jllT3atZrRDr0zt1rfI7TSZTZBXdN/aTdeN99DWw== - dependencies: - web3-eth-iban "1.8.2" - web3-utils "1.8.2" - -web3-core-helpers@1.9.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/web3-core-helpers/-/web3-core-helpers-1.9.0.tgz#a1ca4ac7b9cec822886643312d2e98b0e4d8f1bc" - integrity sha512-NeJzylAp9Yj9xAt2uTT+kyug3X0DLnfBdnAcGZuY6HhoNPDIfQRA9CkJjLngVRlGTLZGjNp9x9eR+RyZQgUlXg== - dependencies: - web3-eth-iban "1.9.0" - web3-utils "1.9.0" - -web3-core-method@1.8.2: - version "1.8.2" - resolved "https://registry.yarnpkg.com/web3-core-method/-/web3-core-method-1.8.2.tgz#ba5ec68084e903f0516415010477618be017eac2" - integrity sha512-1qnr5mw5wVyULzLOrk4B+ryO3gfGjGd/fx8NR+J2xCGLf1e6OSjxT9vbfuQ3fErk/NjSTWWreieYWLMhaogcRA== - dependencies: - "@ethersproject/transactions" "^5.6.2" - web3-core-helpers "1.8.2" - web3-core-promievent "1.8.2" - web3-core-subscriptions "1.8.2" - web3-utils "1.8.2" - -web3-core-method@1.9.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/web3-core-method/-/web3-core-method-1.9.0.tgz#81da8aa21503b470537c9f075f30adfad194a2d8" - integrity sha512-sswbNsY2xRBBhGeaLt9c/eDc+0yDDhi6keUBAkgIRa9ueSx/VKzUY9HMqiV6bXDcGT2fJyejq74FfEB4lc/+/w== - dependencies: - "@ethersproject/transactions" "^5.6.2" - web3-core-helpers "1.9.0" - web3-core-promievent "1.9.0" - web3-core-subscriptions "1.9.0" - web3-utils "1.9.0" - -web3-core-promievent@1.8.2: - version "1.8.2" - resolved "https://registry.yarnpkg.com/web3-core-promievent/-/web3-core-promievent-1.8.2.tgz#e670d6b4453632e6ecfd9ad82da44f77ac1585c9" - integrity sha512-nvkJWDVgoOSsolJldN33tKW6bKKRJX3MCPDYMwP5SUFOA/mCzDEoI88N0JFofDTXkh1k7gOqp1pvwi9heuaxGg== - dependencies: - eventemitter3 "4.0.4" - -web3-core-promievent@1.9.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/web3-core-promievent/-/web3-core-promievent-1.9.0.tgz#2598a4d91b4edd3607366529f52bc96dee9f6d83" - integrity sha512-PHG1Mn23IGwMZhnPDN8dETKypqsFbHfiyRqP+XsVMPmTHkVfzDQTCBU/c2r6hUktBDoGKut5xZQpGfhFk71KbQ== - dependencies: - eventemitter3 "4.0.4" - -web3-core-requestmanager@1.8.2: - version "1.8.2" - resolved "https://registry.yarnpkg.com/web3-core-requestmanager/-/web3-core-requestmanager-1.8.2.tgz#dda95e83ca4808949612a41e54ecea557f78ef26" - integrity sha512-p1d090RYs5Mu7DK1yyc3GCBVZB/03rBtFhYFoS2EruGzOWs/5Q0grgtpwS/DScdRAm8wB8mYEBhY/RKJWF6B2g== - dependencies: - util "^0.12.5" - web3-core-helpers "1.8.2" - web3-providers-http "1.8.2" - web3-providers-ipc "1.8.2" - web3-providers-ws "1.8.2" - -web3-core-requestmanager@1.9.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/web3-core-requestmanager/-/web3-core-requestmanager-1.9.0.tgz#9d7d0e7f890cf7a24e9c568b9772c64d57fc4fcd" - integrity sha512-hcJ5PCtTIJpj+8qWxoseqlCovDo94JJjTX7dZOLXgwp8ah7E3WRYozhGyZocerx+KebKyg1mCQIhkDpMwjfo9Q== - dependencies: - util "^0.12.5" - web3-core-helpers "1.9.0" - web3-providers-http "1.9.0" - web3-providers-ipc "1.9.0" - web3-providers-ws "1.9.0" - -web3-core-subscriptions@1.8.2: - version "1.8.2" - resolved "https://registry.yarnpkg.com/web3-core-subscriptions/-/web3-core-subscriptions-1.8.2.tgz#0c8bd49439d83c6f0a03c70f00b24a915a70a5ed" - integrity sha512-vXQogHDmAIQcKpXvGiMddBUeP9lnKgYF64+yQJhPNE5PnWr1sAibXuIPV7mIPihpFr/n/DORRj6Wh1pUv9zaTw== - dependencies: - eventemitter3 "4.0.4" - web3-core-helpers "1.8.2" - -web3-core-subscriptions@1.9.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/web3-core-subscriptions/-/web3-core-subscriptions-1.9.0.tgz#dc67b478875dab1875844df3307a986dd7d468dd" - integrity sha512-MaIo29yz7hTV8X8bioclPDbHFOVuHmnbMv+D3PDH12ceJFJAXGyW8GL5KU1DYyWIj4TD1HM4WknyVA/YWBiiLA== - dependencies: - eventemitter3 "4.0.4" - web3-core-helpers "1.9.0" - -web3-core@1.8.2: - version "1.8.2" - resolved "https://registry.yarnpkg.com/web3-core/-/web3-core-1.8.2.tgz#333e93d7872b1a36efe758ed8b89a7acbdd962c2" - integrity sha512-DJTVEAYcNqxkqruJE+Rxp3CIv0y5AZMwPHQmOkz/cz+MM75SIzMTc0AUdXzGyTS8xMF8h3YWMQGgGEy8SBf1PQ== - dependencies: - "@types/bn.js" "^5.1.0" - "@types/node" "^12.12.6" - bignumber.js "^9.0.0" - web3-core-helpers "1.8.2" - web3-core-method "1.8.2" - web3-core-requestmanager "1.8.2" - web3-utils "1.8.2" - -web3-core@1.9.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/web3-core/-/web3-core-1.9.0.tgz#9cfafb2f8c01931429108af75205610406a5a1ab" - integrity sha512-DZ+TPmq/ZLlx4LSVzFgrHCP/QFpKDbGWO4HoquZSdu24cjk5SZ+FEU1SZB2OaK3/bgBh+25mRbmv8y56ysUu1w== - dependencies: - "@types/bn.js" "^5.1.1" - "@types/node" "^12.12.6" - bignumber.js "^9.0.0" - web3-core-helpers "1.9.0" - web3-core-method "1.9.0" - web3-core-requestmanager "1.9.0" - web3-utils "1.9.0" - -web3-eth-abi@1.8.2: - version "1.8.2" - resolved "https://registry.yarnpkg.com/web3-eth-abi/-/web3-eth-abi-1.8.2.tgz#16e1e9be40e2527404f041a4745111211488f31a" - integrity sha512-Om9g3kaRNjqiNPAgKwGT16y+ZwtBzRe4ZJFGjLiSs6v5I7TPNF+rRMWuKnR6jq0azQZDj6rblvKFMA49/k48Og== - dependencies: - "@ethersproject/abi" "^5.6.3" - web3-utils "1.8.2" - -web3-eth-abi@1.9.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/web3-eth-abi/-/web3-eth-abi-1.9.0.tgz#18662ef68bd3d25eedd9a1a1484089c39529c652" - integrity sha512-0BLQ3FKMrzJkA930jOX3fMaybAyubk06HChclLpiR0NWmgWXm1tmBrJdkyRy2ZTZpmfuZc9xTFRfl0yZID1voA== - dependencies: - "@ethersproject/abi" "^5.6.3" - web3-utils "1.9.0" - -web3-eth-accounts@1.8.2: - version "1.8.2" - resolved "https://registry.yarnpkg.com/web3-eth-accounts/-/web3-eth-accounts-1.8.2.tgz#b894f5d5158fcae429da42de75d96520d0712971" - integrity sha512-c367Ij63VCz9YdyjiHHWLFtN85l6QghgwMQH2B1eM/p9Y5lTlTX7t/Eg/8+f1yoIStXbk2w/PYM2lk+IkbqdLA== - dependencies: - "@ethereumjs/common" "2.5.0" - "@ethereumjs/tx" "3.3.2" - eth-lib "0.2.8" - ethereumjs-util "^7.1.5" - scrypt-js "^3.0.1" - uuid "^9.0.0" - web3-core "1.8.2" - web3-core-helpers "1.8.2" - web3-core-method "1.8.2" - web3-utils "1.8.2" - -web3-eth-accounts@1.9.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/web3-eth-accounts/-/web3-eth-accounts-1.9.0.tgz#fab7d563c63bdff2aa5ad89a94faf128961d9504" - integrity sha512-VeIZVevmnSll0AC1k5F/y398ZE89d1SRuYk8IewLUhL/tVAsFEsjl2SGgm0+aDcHmgPrkW+qsCJ+C7rWg/N4ZA== - dependencies: - "@ethereumjs/common" "2.5.0" - "@ethereumjs/tx" "3.3.2" - eth-lib "0.2.8" - ethereumjs-util "^7.1.5" - scrypt-js "^3.0.1" - uuid "^9.0.0" - web3-core "1.9.0" - web3-core-helpers "1.9.0" - web3-core-method "1.9.0" - web3-utils "1.9.0" - -web3-eth-contract@1.8.2: - version "1.8.2" - resolved "https://registry.yarnpkg.com/web3-eth-contract/-/web3-eth-contract-1.8.2.tgz#5388b7130923d2b790c09a420391a81312a867fb" - integrity sha512-ID5A25tHTSBNwOPjiXSVzxruz006ULRIDbzWTYIFTp7NJ7vXu/kynKK2ag/ObuTqBpMbobP8nXcA9b5EDkIdQA== - dependencies: - "@types/bn.js" "^5.1.0" - web3-core "1.8.2" - web3-core-helpers "1.8.2" - web3-core-method "1.8.2" - web3-core-promievent "1.8.2" - web3-core-subscriptions "1.8.2" - web3-eth-abi "1.8.2" - web3-utils "1.8.2" - -web3-eth-contract@1.9.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/web3-eth-contract/-/web3-eth-contract-1.9.0.tgz#00b7ac8314d562d10d7dd0c7d0f52555c3862995" - integrity sha512-+j26hpSaEtAdUed0TN5rnc+YZOcjPxMjFX4ZBKatvFkImdbVv/tzTvcHlltubSpgb2ZLyZ89lSL6phKYwd2zNQ== - dependencies: - "@types/bn.js" "^5.1.1" - web3-core "1.9.0" - web3-core-helpers "1.9.0" - web3-core-method "1.9.0" - web3-core-promievent "1.9.0" - web3-core-subscriptions "1.9.0" - web3-eth-abi "1.9.0" - web3-utils "1.9.0" - -web3-eth-ens@1.8.2: - version "1.8.2" - resolved "https://registry.yarnpkg.com/web3-eth-ens/-/web3-eth-ens-1.8.2.tgz#0a086ad4d919102e28b9fd3036df246add9df22a" - integrity sha512-PWph7C/CnqdWuu1+SH4U4zdrK4t2HNt0I4XzPYFdv9ugE8EuojselioPQXsVGvjql+Nt3jDLvQvggPqlMbvwRw== - dependencies: - content-hash "^2.5.2" - eth-ens-namehash "2.0.8" - web3-core "1.8.2" - web3-core-helpers "1.8.2" - web3-core-promievent "1.8.2" - web3-eth-abi "1.8.2" - web3-eth-contract "1.8.2" - web3-utils "1.8.2" - -web3-eth-ens@1.9.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/web3-eth-ens/-/web3-eth-ens-1.9.0.tgz#2014b16e1116be5ab34404a8db29ad1d8632ced0" - integrity sha512-LOJZeN+AGe9arhuExnrPPFYQr4WSxXEkpvYIlst/joOEUNLDwfndHnJIK6PI5mXaYSROBtTx6erv+HupzGo7vA== - dependencies: - content-hash "^2.5.2" - eth-ens-namehash "2.0.8" - web3-core "1.9.0" - web3-core-helpers "1.9.0" - web3-core-promievent "1.9.0" - web3-eth-abi "1.9.0" - web3-eth-contract "1.9.0" - web3-utils "1.9.0" - -web3-eth-iban@1.8.2: - version "1.8.2" - resolved "https://registry.yarnpkg.com/web3-eth-iban/-/web3-eth-iban-1.8.2.tgz#5cb3022234b13986f086353b53f0379a881feeaf" - integrity sha512-h3vNblDWkWMuYx93Q27TAJz6lhzpP93EiC3+45D6xoz983p6si773vntoQ+H+5aZhwglBtoiBzdh7PSSOnP/xQ== - dependencies: - bn.js "^5.2.1" - web3-utils "1.8.2" - -web3-eth-iban@1.9.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/web3-eth-iban/-/web3-eth-iban-1.9.0.tgz#a8f838e42c20d49ff58aaa9f67ece47a968e40b1" - integrity sha512-jPAm77PuEs1kE/UrrBFJdPD2PN42pwfXA0gFuuw35bZezhskYML9W4QCxcqnUtceyEA4FUn7K2qTMuCk+23fog== - dependencies: - bn.js "^5.2.1" - web3-utils "1.9.0" - -web3-eth-personal@1.8.2: - version "1.8.2" - resolved "https://registry.yarnpkg.com/web3-eth-personal/-/web3-eth-personal-1.8.2.tgz#3526c1ebaa4e7bf3a0a8ec77e34f067cc9a750b2" - integrity sha512-Vg4HfwCr7doiUF/RC+Jz0wT4+cYaXcOWMAW2AHIjHX6Z7Xwa8nrURIeQgeEE62qcEHAzajyAdB1u6bJyTfuCXw== - dependencies: - "@types/node" "^12.12.6" - web3-core "1.8.2" - web3-core-helpers "1.8.2" - web3-core-method "1.8.2" - web3-net "1.8.2" - web3-utils "1.8.2" - -web3-eth-personal@1.9.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/web3-eth-personal/-/web3-eth-personal-1.9.0.tgz#f5092bcb2688979dd7778d5a56ae6922c341ce52" - integrity sha512-r9Ldo/luBqJlv1vCUEQnUS+C3a3ZdbYxVHyfDkj6RWMyCqqo8JE41HWE+pfa0RmB1xnGL2g8TbYcHcqItck/qg== - dependencies: - "@types/node" "^12.12.6" - web3-core "1.9.0" - web3-core-helpers "1.9.0" - web3-core-method "1.9.0" - web3-net "1.9.0" - web3-utils "1.9.0" - -web3-eth@1.8.2: - version "1.8.2" - resolved "https://registry.yarnpkg.com/web3-eth/-/web3-eth-1.8.2.tgz#8562287ae1803c30eb54dc7d832092e5739ce06a" - integrity sha512-JoTiWWc4F4TInpbvDUGb0WgDYJsFhuIjJlinc5ByjWD88Gvh+GKLsRjjFdbqe5YtwIGT4NymwoC5LQd1K6u/QQ== - dependencies: - web3-core "1.8.2" - web3-core-helpers "1.8.2" - web3-core-method "1.8.2" - web3-core-subscriptions "1.8.2" - web3-eth-abi "1.8.2" - web3-eth-accounts "1.8.2" - web3-eth-contract "1.8.2" - web3-eth-ens "1.8.2" - web3-eth-iban "1.8.2" - web3-eth-personal "1.8.2" - web3-net "1.8.2" - web3-utils "1.8.2" - -web3-eth@1.9.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/web3-eth/-/web3-eth-1.9.0.tgz#1fe82ba429a44b1aa0a3b95de3e79e6c5a9eb00c" - integrity sha512-c5gSWk9bLNr6VPATHmZ1n7LTIefIZQnJMzfnvkoBcIFGKJbGmsuRhv6lEXsKdAO/FlqYnSbaw3fOq1fVFiIOFQ== - dependencies: - web3-core "1.9.0" - web3-core-helpers "1.9.0" - web3-core-method "1.9.0" - web3-core-subscriptions "1.9.0" - web3-eth-abi "1.9.0" - web3-eth-accounts "1.9.0" - web3-eth-contract "1.9.0" - web3-eth-ens "1.9.0" - web3-eth-iban "1.9.0" - web3-eth-personal "1.9.0" - web3-net "1.9.0" - web3-utils "1.9.0" - -web3-net@1.8.2: - version "1.8.2" - resolved "https://registry.yarnpkg.com/web3-net/-/web3-net-1.8.2.tgz#97e1e0015fabc4cda31017813e98d0b5468dd04f" - integrity sha512-1itkDMGmbgb83Dg9nporFes9/fxsU7smJ3oRXlFkg4ZHn8YJyP1MSQFPJWWwSc+GrcCFt4O5IrUTvEkHqE3xag== - dependencies: - web3-core "1.8.2" - web3-core-method "1.8.2" - web3-utils "1.8.2" - -web3-net@1.9.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/web3-net/-/web3-net-1.9.0.tgz#ee8799bf766039aa5b157d6db0be5ffdecd39d64" - integrity sha512-L+fDZFgrLM5Y15aonl2q6L+RvfaImAngmC0Jv45hV2FJ5IfRT0/2ob9etxZmvEBWvOpbqSvghfOhJIT3XZ37Pg== - dependencies: - web3-core "1.9.0" - web3-core-method "1.9.0" - web3-utils "1.9.0" - -web3-providers-http@1.8.2: - version "1.8.2" - resolved "https://registry.yarnpkg.com/web3-providers-http/-/web3-providers-http-1.8.2.tgz#fbda3a3bbc8db004af36e91bec35f80273b37885" - integrity sha512-2xY94IIEQd16+b+vIBF4IC1p7GVaz9q4EUFscvMUjtEq4ru4Atdzjs9GP+jmcoo49p70II0UV3bqQcz0TQfVyQ== - dependencies: - abortcontroller-polyfill "^1.7.3" - cross-fetch "^3.1.4" - es6-promise "^4.2.8" - web3-core-helpers "1.8.2" - -web3-providers-http@1.9.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/web3-providers-http/-/web3-providers-http-1.9.0.tgz#93cd3eb42fff974c9f7634ede1a9795d6435c3fe" - integrity sha512-5+dMNDAE0rRFz6SJpfnBqlVi2J5bB/Ivr2SanMt2YUrkxW5t8betZbzVwRkTbwtUvkqgj3xeUQzqpOttiv+IqQ== - dependencies: - abortcontroller-polyfill "^1.7.3" - cross-fetch "^3.1.4" - es6-promise "^4.2.8" - web3-core-helpers "1.9.0" - -web3-providers-ipc@1.8.2: - version "1.8.2" - resolved "https://registry.yarnpkg.com/web3-providers-ipc/-/web3-providers-ipc-1.8.2.tgz#e52a7250f40c83b99a2482ec5b4cf2728377ae5c" - integrity sha512-p6fqKVGFg+WiXGHWnB1hu43PbvPkDHTz4RgoEzbXugv5rtv5zfYLqm8Ba6lrJOS5ks9kGKR21a0y3NzE3u7V4w== - dependencies: - oboe "2.1.5" - web3-core-helpers "1.8.2" - -web3-providers-ipc@1.9.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/web3-providers-ipc/-/web3-providers-ipc-1.9.0.tgz#db486cb0dde9062ac6055478861e3d37535924d2" - integrity sha512-cPXU93Du40HCylvjaa5x62DbnGqH+86HpK/+kMcFIzF6sDUBhKpag2tSbYhGbj7GMpfkmDTUiiMLdWnFV6+uBA== - dependencies: - oboe "2.1.5" - web3-core-helpers "1.9.0" - -web3-providers-ws@1.8.2: - version "1.8.2" - resolved "https://registry.yarnpkg.com/web3-providers-ws/-/web3-providers-ws-1.8.2.tgz#56a2b701387011aca9154ca4bc06ea4b5f27e4ef" - integrity sha512-3s/4K+wHgbiN+Zrp9YjMq2eqAF6QGABw7wFftPdx+m5hWImV27/MoIx57c6HffNRqZXmCHnfWWFCNHHsi7wXnA== - dependencies: - eventemitter3 "4.0.4" - web3-core-helpers "1.8.2" - websocket "^1.0.32" - -web3-providers-ws@1.9.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/web3-providers-ws/-/web3-providers-ws-1.9.0.tgz#568330766e8abbb6eb43e1153a72fb24398fcb7e" - integrity sha512-JRVsnQZ7j2k1a2yzBNHe39xqk1ijOv01dfIBFw52VeEkSRzvrOcsPIM/ttSyBuJqt70ntMxXY0ekCrqfleKH/w== - dependencies: - eventemitter3 "4.0.4" - web3-core-helpers "1.9.0" - websocket "^1.0.32" - -web3-shh@1.8.2: - version "1.8.2" - resolved "https://registry.yarnpkg.com/web3-shh/-/web3-shh-1.8.2.tgz#217a417f0d6e243dd4d441848ffc2bd164cea8a0" - integrity sha512-uZ+3MAoNcaJsXXNCDnizKJ5viBNeHOFYsCbFhV755Uu52FswzTOw6DtE7yK9nYXMtIhiSgi7nwl1RYzP8pystw== - dependencies: - web3-core "1.8.2" - web3-core-method "1.8.2" - web3-core-subscriptions "1.8.2" - web3-net "1.8.2" - -web3-shh@1.9.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/web3-shh/-/web3-shh-1.9.0.tgz#75a37cd9f78d485ee5f018e2e66853e1e1c6ce4f" - integrity sha512-bIBZlralgz4ICCrwkefB2nPPJWfx28NuHIpjB7d9ADKynElubQuqudYhKtSEkKXACuME/BJm0pIFJcJs/gDnMg== - dependencies: - web3-core "1.9.0" - web3-core-method "1.9.0" - web3-core-subscriptions "1.9.0" - web3-net "1.9.0" - -web3-utils@1.8.2: - version "1.8.2" - resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.8.2.tgz#c32dec5e9b955acbab220eefd7715bc540b75cc9" - integrity sha512-v7j6xhfLQfY7xQDrUP0BKbaNrmZ2/+egbqP9q3KYmOiPpnvAfol+32slgL0WX/5n8VPvKCK5EZ1HGrAVICSToA== - dependencies: - bn.js "^5.2.1" - ethereum-bloom-filters "^1.0.6" - ethereumjs-util "^7.1.0" - ethjs-unit "0.1.6" - number-to-bn "1.7.0" - randombytes "^2.1.0" - utf8 "3.0.0" - -web3-utils@1.9.0, web3-utils@^1.0.0-beta.31, web3-utils@^1.2.5, web3-utils@^1.3.6: - version "1.9.0" - resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.9.0.tgz#7c5775a47586cefb4ad488831be8f6627be9283d" - integrity sha512-p++69rCNNfu2jM9n5+VD/g26l+qkEOQ1m6cfRQCbH8ZRrtquTmrirJMgTmyOoax5a5XRYOuws14aypCOs51pdQ== - dependencies: - bn.js "^5.2.1" - ethereum-bloom-filters "^1.0.6" - ethereumjs-util "^7.1.0" - ethjs-unit "0.1.6" - number-to-bn "1.7.0" - randombytes "^2.1.0" - utf8 "3.0.0" - -web3@1.8.2: - version "1.8.2" - resolved "https://registry.yarnpkg.com/web3/-/web3-1.8.2.tgz#95a4e5398fd0f01325264bf8e5e8cdc69a7afe86" - integrity sha512-92h0GdEHW9wqDICQQKyG4foZBYi0OQkyg4CRml2F7XBl/NG+fu9o6J19kzfFXzSBoA4DnJXbyRgj/RHZv5LRiw== - dependencies: - web3-bzz "1.8.2" - web3-core "1.8.2" - web3-eth "1.8.2" - web3-eth-personal "1.8.2" - web3-net "1.8.2" - web3-shh "1.8.2" - web3-utils "1.8.2" - -web3@^1.2.5: - version "1.9.0" - resolved "https://registry.yarnpkg.com/web3/-/web3-1.9.0.tgz#4fde5d134f8ee11355ed5bfa1bb41f8bc58e23f3" - integrity sha512-E9IvVy/d2ozfQQsCiV+zh/LmlZGv9fQxI0UedDVjm87yOKf4AYbBNEn1iWtHveiGzAk2CEMZMUzAZzaQNSSYog== - dependencies: - web3-bzz "1.9.0" - web3-core "1.9.0" - web3-eth "1.9.0" - web3-eth-personal "1.9.0" - web3-net "1.9.0" - web3-shh "1.9.0" - web3-utils "1.9.0" - -webidl-conversions@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" - integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== - -websocket@^1.0.32: - version "1.0.34" - resolved "https://registry.yarnpkg.com/websocket/-/websocket-1.0.34.tgz#2bdc2602c08bf2c82253b730655c0ef7dcab3111" - integrity sha512-PRDso2sGwF6kM75QykIesBijKSVceR6jL2G8NGYyq2XrItNC2P5/qL5XeR056GhA+Ly7JMFvJb9I312mJfmqnQ== - dependencies: - bufferutil "^4.0.1" - debug "^2.2.0" - es5-ext "^0.10.50" - typedarray-to-buffer "^3.1.5" - utf-8-validate "^5.0.2" - yaeti "^0.0.6" - -whatwg-url@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d" - integrity sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw== - dependencies: - tr46 "~0.0.3" - webidl-conversions "^3.0.0" - -which-boxed-primitive@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz#13757bc89b209b049fe5d86430e21cf40a89a8e6" - integrity sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg== - dependencies: - is-bigint "^1.0.1" - is-boolean-object "^1.1.0" - is-number-object "^1.0.4" - is-string "^1.0.5" - is-symbol "^1.0.3" - -which-module@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f" - integrity sha512-F6+WgncZi/mJDrammbTuHe1q0R5hOXv/mBaiNA2TCNT/LTHusX0V+CJnj9XT8ki5ln2UZyyddDgHfCzyrOH7MQ== - -which-module@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.1.tgz#776b1fe35d90aebe99e8ac15eb24093389a4a409" - integrity sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ== - -which-typed-array@^1.1.2, which-typed-array@^1.1.9: - version "1.1.9" - resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.9.tgz#307cf898025848cf995e795e8423c7f337efbde6" - integrity sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA== - dependencies: - available-typed-arrays "^1.0.5" - call-bind "^1.0.2" - for-each "^0.3.3" - gopd "^1.0.1" - has-tostringtag "^1.0.0" - is-typed-array "^1.1.10" - -which@1.3.1, which@^1.1.1, which@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" - integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== - dependencies: - isexe "^2.0.0" - -wide-align@1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" - integrity sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA== - dependencies: - string-width "^1.0.2 || 2" - -window-size@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.2.0.tgz#b4315bb4214a3d7058ebeee892e13fa24d98b075" - integrity sha512-UD7d8HFA2+PZsbKyaOCEy8gMh1oDtHgJh1LfgjQ4zVXmYjAT/kvz3PueITKuqDiIXQe7yzpPnxX3lNc+AhQMyw== - -word-wrap@~1.2.3: - version "1.2.3" - resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" - integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== - -wordwrap@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" - integrity sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q== - -wordwrapjs@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/wordwrapjs/-/wordwrapjs-4.0.1.tgz#d9790bccfb110a0fc7836b5ebce0937b37a8b98f" - integrity sha512-kKlNACbvHrkpIw6oPeYDSmdCTu2hdMHoyXLTcUKala++lx5Y+wjJ/e474Jqv5abnVmwxw08DiTuHmw69lJGksA== - dependencies: - reduce-flatten "^2.0.0" - typical "^5.2.0" - -workerpool@6.2.1: - version "6.2.1" - resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.2.1.tgz#46fc150c17d826b86a008e5a4508656777e9c343" - integrity sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw== - -wrap-ansi@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" - integrity sha512-vAaEaDM946gbNpH5pLVNR+vX2ht6n0Bt3GXwVB1AuAqZosOvHNF3P7wDnh8KLkSqgUh0uh77le7Owgoz+Z9XBw== - dependencies: - string-width "^1.0.1" - strip-ansi "^3.0.1" - -wrap-ansi@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-5.1.0.tgz#1fd1f67235d5b6d0fee781056001bfb694c03b09" - integrity sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q== - dependencies: - ansi-styles "^3.2.0" - string-width "^3.0.0" - strip-ansi "^5.0.0" - -wrap-ansi@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" - integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - -wrappy@1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" - integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== - -ws@7.4.6: - version "7.4.6" - resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.6.tgz#5654ca8ecdeee47c33a9a4bf6d28e2be2980377c" - integrity sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A== - -ws@^3.0.0: - version "3.3.3" - resolved "https://registry.yarnpkg.com/ws/-/ws-3.3.3.tgz#f1cf84fe2d5e901ebce94efaece785f187a228f2" - integrity sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA== - dependencies: - async-limiter "~1.0.0" - safe-buffer "~5.1.0" - ultron "~1.1.0" - -ws@^7.4.6: - version "7.5.9" - resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.9.tgz#54fa7db29f4c7cec68b1ddd3a89de099942bb591" - integrity sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q== - -xhr-request-promise@^0.1.2: - version "0.1.3" - resolved "https://registry.yarnpkg.com/xhr-request-promise/-/xhr-request-promise-0.1.3.tgz#2d5f4b16d8c6c893be97f1a62b0ed4cf3ca5f96c" - integrity sha512-YUBytBsuwgitWtdRzXDDkWAXzhdGB8bYm0sSzMPZT7Z2MBjMSTHFsyCT1yCRATY+XC69DUrQraRAEgcoCRaIPg== - dependencies: - xhr-request "^1.1.0" - -xhr-request@^1.0.1, xhr-request@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/xhr-request/-/xhr-request-1.1.0.tgz#f4a7c1868b9f198723444d82dcae317643f2e2ed" - integrity sha512-Y7qzEaR3FDtL3fP30k9wO/e+FBnBByZeybKOhASsGP30NIkRAAkKD/sCnLvgEfAIEC1rcmK7YG8f4oEnIrrWzA== - dependencies: - buffer-to-arraybuffer "^0.0.5" - object-assign "^4.1.1" - query-string "^5.0.1" - simple-get "^2.7.0" - timed-out "^4.0.1" - url-set-query "^1.0.0" - xhr "^2.0.4" - -xhr@^2.0.4, xhr@^2.3.3: - version "2.6.0" - resolved "https://registry.yarnpkg.com/xhr/-/xhr-2.6.0.tgz#b69d4395e792b4173d6b7df077f0fc5e4e2b249d" - integrity sha512-/eCGLb5rxjx5e3mF1A7s+pLlR6CGyqWN91fv1JgER5mVWg1MZmlhBvy9kjcsOdRk8RrIujotWyJamfyrp+WIcA== - dependencies: - global "~4.4.0" - is-function "^1.0.1" - parse-headers "^2.0.0" - xtend "^4.0.0" - -xmlhttprequest@1.8.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz#67fe075c5c24fef39f9d65f5f7b7fe75171968fc" - integrity sha512-58Im/U0mlVBLM38NdZjHyhuMtCqa61469k2YP/AaPbvCoV9aQGUpbJBj1QRm2ytRiVQBD/fsw7L2bJGDVQswBA== - -xtend@^4.0.0: - version "4.0.2" - resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" - integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== - -y18n@^3.2.1: - version "3.2.2" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.2.tgz#85c901bd6470ce71fc4bb723ad209b70f7f28696" - integrity sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ== - -y18n@^4.0.0: - version "4.0.3" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.3.tgz#b5f259c82cd6e336921efd7bfd8bf560de9eeedf" - integrity sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ== - -y18n@^5.0.5: - version "5.0.8" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" - integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== - -yaeti@^0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/yaeti/-/yaeti-0.0.6.tgz#f26f484d72684cf42bedfb76970aa1608fbf9577" - integrity sha512-MvQa//+KcZCUkBTIC9blM+CU9J2GzuTytsOUwf2lidtvkx/6gnEp1QvJv34t9vdjhFmha/mUiNDbN0D0mJWdug== - -yallist@^3.0.0, yallist@^3.0.2, yallist@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" - integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== - -yallist@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" - integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== - -yargs-parser@13.1.2, yargs-parser@^13.1.2: - version "13.1.2" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.2.tgz#130f09702ebaeef2650d54ce6e3e5706f7a4fb38" - integrity sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg== - dependencies: - camelcase "^5.0.0" - decamelize "^1.2.0" - -yargs-parser@20.2.4: - version "20.2.4" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54" - integrity sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA== - -yargs-parser@^2.4.1: - version "2.4.1" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-2.4.1.tgz#85568de3cf150ff49fa51825f03a8c880ddcc5c4" - integrity sha512-9pIKIJhnI5tonzG6OnCFlz/yln8xHYcGl+pn3xR0Vzff0vzN1PbNRaelgfgRUwZ3s4i3jvxT9WhmUGL4whnasA== - dependencies: - camelcase "^3.0.0" - lodash.assign "^4.0.6" - -yargs-parser@^20.2.2: - version "20.2.9" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" - integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== - -yargs-unparser@1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-1.6.0.tgz#ef25c2c769ff6bd09e4b0f9d7c605fb27846ea9f" - integrity sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw== - dependencies: - flat "^4.1.0" - lodash "^4.17.15" - yargs "^13.3.0" - -yargs-unparser@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-2.0.0.tgz#f131f9226911ae5d9ad38c432fe809366c2325eb" - integrity sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA== - dependencies: - camelcase "^6.0.0" - decamelize "^4.0.0" - flat "^5.0.2" - is-plain-obj "^2.1.0" - -yargs@13.3.2, yargs@^13.3.0: - version "13.3.2" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.2.tgz#ad7ffefec1aa59565ac915f82dccb38a9c31a2dd" - integrity sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw== - dependencies: - cliui "^5.0.0" - find-up "^3.0.0" - get-caller-file "^2.0.1" - require-directory "^2.1.1" - require-main-filename "^2.0.0" - set-blocking "^2.0.0" - string-width "^3.0.0" - which-module "^2.0.0" - y18n "^4.0.0" - yargs-parser "^13.1.2" - -yargs@16.2.0: - version "16.2.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" - integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== - dependencies: - cliui "^7.0.2" - escalade "^3.1.1" - get-caller-file "^2.0.5" - require-directory "^2.1.1" - string-width "^4.2.0" - y18n "^5.0.5" - yargs-parser "^20.2.2" - -yargs@^4.7.1: - version "4.8.1" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-4.8.1.tgz#c0c42924ca4aaa6b0e6da1739dfb216439f9ddc0" - integrity sha512-LqodLrnIDM3IFT+Hf/5sxBnEGECrfdC1uIbgZeJmESCSo4HoCAaKEus8MylXHAkdacGc0ye+Qa+dpkuom8uVYA== - dependencies: - cliui "^3.2.0" - decamelize "^1.1.1" - get-caller-file "^1.0.1" - lodash.assign "^4.0.3" - os-locale "^1.4.0" - read-pkg-up "^1.0.1" - require-directory "^2.1.1" - require-main-filename "^1.0.1" - set-blocking "^2.0.0" - string-width "^1.0.1" - which-module "^1.0.0" - window-size "^0.2.0" - y18n "^3.2.1" - yargs-parser "^2.4.1" - -yn@3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" - integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q== - -yocto-queue@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" - integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== - -zksync-web3@^0.14.3: - version "0.14.3" - resolved "https://registry.yarnpkg.com/zksync-web3/-/zksync-web3-0.14.3.tgz#64ac2a16d597464c3fc4ae07447a8007631c57c9" - integrity sha512-hT72th4AnqyLW1d5Jlv8N2B/qhEnl2NePK2A3org7tAa24niem/UAaHMkEvmWI3SF9waYUPtqAtjpf+yvQ9zvQ==